﻿$ef(document).ready(function () {

    $ef(".thumbContents a").fancybox({
        'padding': 0,
        'centerOnScroll': false,
        'hideOnContentClick': false,
        'transitionIn': 'fade',
        'transitionOut': 'fade',
        'speedIn': 400,
        'speedOut': 300,
        'overlayShow': true,
        'easingIn': 'swing',
        'easingOut': 'swing',
        'overlayColor': '#000',
        'overlayOpacity': 0.9,
        'titlePosition': 'over'	// 'outside', 'inside' or 'over',
		// 'onClosed'   : StartFancyBox,
		// 'onCancel'   : StartFancyBox,
		// 'onStart'    : StartFancyBox,
		// 'onComplete' : StartFancyBox,
		// 'onCleanup'  : StartFancyBox
    });

    // StartFancyBox();
	
	//OLD CODE - On hover handler
	
	// function StartFancyBox() {
	//     $ef("a#fancybox-close strong, #fancybox-title-over, #fancybox-left-ico, #fancybox-right-ico").css({ 'display': 'none' });
	// 
	//     $ef('#fancybox-wrap').hover(function () {
	// 	// FADE IN
	// 		$ef(this).find('a#fancybox-close strong, #fancybox-title-over').fadeIn(400);
	// 	    },
	// 	function () {
	// 	    $ef(this).find('a#fancybox-close strong, #fancybox-title-over').stop(true, true).fadeOut(400);
	// 	});
	// 	
	// 	$ef('#fancybox-left, #fancybox-right').hover(function () {
	// 	// FADE IN
	// 		$ef(this).find('#fancybox-left-ico, #fancybox-right-ico').fadeIn(400);
	// 	    },
	// 	function () {
	// 	    $ef(this).find('#fancybox-left-ico, #fancybox-right-ico').stop(true, true).fadeOut(400);
	// 	});
	// }
	
	// On mouseenter handler
	
	// function StartFancyBox() {
	// 	    $ef(".fancy-bg, a#fancybox-close strong, #fancybox-title-over, #fancybox-left-ico, #fancybox-right-ico").css({ 'display': 'none' });
	// 	
	// 	    $ef('#fancybox-outer').mouseenter(function () {
	// 		// FADE IN
	// 			$ef(this).find('a#fancybox-close strong, #fancybox-title-over').fadeIn(400);
	// 		    }).mouseleave(function () {
	// 		    $ef(this).find('a#fancybox-close strong, #fancybox-title-over').stop(true, true).fadeOut(400);
	// 		});
	// 		
	// 		$ef('#fancybox-left, #fancybox-right').mouseenter(function () {
	// 		// FADE IN
	// 			$ef(this).find('#fancybox-left-ico, #fancybox-right-ico').fadeIn(400);
	// 		    }).mouseleave(function () {
	// 		    $ef(this).find('#fancybox-left-ico, #fancybox-right-ico').stop(true, true).fadeOut(400);
	// 		});
	// 	}
	
});