// JavaScript Document

$(document).ready(function(){
	

//Fancybox for image gallery
$(".simple_image").fancybox({
		'opacity'		: true,
		'overlayShow'	       : true,
		'overlayColor': '#000000',
		'overlayOpacity'     : 0.9,
		'titleShow':true,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
});



//Gallery - On Hover Event 
	$('.simple_image').mouseenter(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.zoom').fadeIn(400);
        }).mouseleave(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.zoom').fadeOut(400);
});


	$('.simple_image').mouseenter(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.category_zoom').fadeIn(400);
        }).mouseleave(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.category_zoom').fadeOut(400);
});


	$('.simple_image').mouseenter(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.product_zoom').fadeIn(400);
        }).mouseleave(function(e) {
            $(this).children('img').animate(300);
            $(this).children('.product_zoom').fadeOut(400);
});

	$("a[rel=trio]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
});





});
