jQuery.noConflict();
jQuery(document).ready(function() {
	jQuery("#nav > li.parent").each(function(){
			 var $_width = jQuery(this).find("ul.level0 > li").length*175;
			 jQuery(this).find("ul.level0").width($_width);
	});
	jQuery("#nav ul.level0, .mini-cart").before("<span class='space'> </span>");
	jQuery("#navigation .searchbtn").hover(function()
	{ 
		jQuery('#search').focus();
		jQuery(this).find(".form-search").show();
	}).focusout(function()
	{
		jQuery(this).find(".form-search").hide();
	});
	

    jQuery(".button").hover(function () {
			    jQuery(this).animate({
				    opacity: 0.8
			    }, "fast");
		    },
		    function () {
		    	jQuery(this).animate({
		    		opacity: 1
		    	}, "fast");
	});


	jQuery("#slider > div").easySlider({
			prevId: 		'galleryLeft',
			nextId: 		'galleryRight'
	});

	jQuery("#sticky-1 > div").easySlider({
			prevId: 		'stickyLeft1',
			nextId: 		'stickyRight1'
	});

	jQuery("#sticky-2 > div").easySlider({
			prevId: 		'stickyLeft2',
			nextId: 		'stickyRight2'
	});

	jQuery("#sticky-3 > div").easySlider({
			prevId: 		'stickyLeft3',
			nextId: 		'stickyRight3'
	});

	jQuery("#sticky-4 > div").easySlider({
			prevId: 		'stickyLeft4',
			nextId: 		'stickyRight4'
	});

	jQuery(".upsell-list > div").easySlider({
			prevId: 		'upsellLeft',
			nextId: 		'upsellRight'
	});

	jQuery("a.fancybox").fancybox({
			titlePosition: 'inside'
	});
    jQuery("a.quickview").fancybox({
    		type: 'iframe',
    		autoDimensions	: false,
			width         		: 650,
			height        		: 650
    });
	

});

function replaceQuickViewImage(src){
	jQuery("#quick_image").attr("src",src);
	jQuery("#quick_image").attr("width","220");
	jQuery("#quick_image").attr("height","220");
}
