(function($){
        $('#share_item, #history_item').hover(
            function() {
                $(this).find('.tools_drop_menu').addClass('active');
            },
            function() {
                $(this).find('.tools_drop_menu').removeClass('active');
            }
        );

        $('#share_item .email').click(function() {
            modalShow($('#email_friend_form').html());
            return false;
        });

        if ($('.ef_form .errortext').length != 0) {
            modalShow($('#email_friend_form').html());
        }

        if ($('.ef_form .mf-ok-text').length != 0) {
            modalShow($('#email_friend_form').html());
            setTimeout('modalClose()', 3000);
        }

        if ($('.mfeedback .errortext').length != 0) {
            modalShow($('#feedback_form').html());
        }

        if ($('.mfeedback .mf-ok-text').length != 0) {
            modalShow($('#feedback_form').html());
            setTimeout('modalClose()', 3000);
        }

        $('#overlay, #modal_window .close').click(function() {
            modalClose();
            return false;
        });
})(jQuery);