


	

/* fade page in */
jQuery(document).ready( function() {
		jQuery("ul.where-to-buy li a").click(function(event){
								   event.preventDefault();

}); 
		if (jQuery.browser.opera || jQuery.browser.msie){
			fadePageIn();
			
		}
		/* fade page out on click */
		jQuery("a.logo,a.size-thumbnail,.menu-header a,.items div a,ul#soap-collection li a,.pd-back a,#footer a,span#body_links a,.quiz-home h4 a,#contact-area p a,.breadcrumbs a,.page-template-page-soap-collection-php #content h3 a,ul.shop-online li a").not('a[href^="#"],a.press_group').click(function(event){
								   event.preventDefault();
								   linkLocation = this.href;
								   fadePageOut();

});
		
	
		
jQuery(window).bind('pageshow', function() {
		fadePageIn();
});

function fadePageIn(){
	jQuery("#wrapper").removeClass("hide").addClass("show");
	jQuery("#wrapper").animate({opacity: 0},0).animate({opacity: 1},1000);
	
	}
	
function fadePageOut(){
	jQuery("#wrapper").animate({opacity: 0},500, redirectPage);
}

function redirectPage() {
	window.location = linkLocation;
}

} //functon end
); //ready end



jQuery(document).ready(function(){
         jQuery('ul.where-to-buy li a,ul.shop-online li a,#site-info a,.items div a img,ul#soaps-collection li a,#branding h1 img,#content a').hover(function(){
		         jQuery(this).stop().animate({'opacity' : '.60'}, 500);
		 }, function(){jQuery(this).stop().animate({'opacity' : '1'}, 500);});
});

jQuery(document).ready(function(){
			jQuery('ul#press li a,ul.where-to-buy li a,ul.shop-online li a').css({'opacity' : '1'});
         jQuery('ul#press li a,ul.where-to-buy li a').hover(function(){
		         jQuery(this).stop().animate({'opacity' : '0'}, 500);
		 }, function(){jQuery(this).stop().animate({'opacity' : '1'}, 500);
		 });
		 
});




		jQuery(function () {
			jQuery('img,ul#press li,ul.where-to-buy li,ul.shop-online li,#site-info img').hide();
		});
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		jQuery(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("imagePreLoader(i)",100);//fade in speed in milliseconds
			
		});
		function imagePreLoader() {
			var imgs = jQuery('img,div ul#press li,ul.where-to-buy li,ul.shop-online li,#site-info img').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends

			}
	
						jQuery('img:hidden,div ul#press li:hidden,ul.where-to-buy li:hidden,ul.shop-online li:hidden,#site-info img:hidden').eq(0).fadeIn(100);//fades in the hidden images one by one

			i++;//add 1 to the count
			
		}
		
