function highdpi_init() {
	if(jQuery('.replace-2x').css('font-size') == "1px") {
		var els = jQuery(".replace-2x").get();
		for(var i in els) {
			var src = els[i].src
			src = src.replace(".png", "@2x.png");
			els[i].src = src;
		}
	}
}

jQuery(function(){
			jQuery('.sf-menu').superfish({
			
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: false                            // disable drop shadows      
			});
		});
		
jQuery(document).ready(function() {
			highdpi_init();
			jQuery('.slideshow').after('<div id="nav">')
			jQuery(".loader  img").css("display", "none");	
	 		jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
			"theme": 'light_square' 																
	});
	  });
	  


jQuery(window).load(function() { //fades in image and hides loading image
	jQuery(".loader").css("background", "none");
    jQuery(".loader  img").fadeIn("fast");
});	

jQuery('h4.tog').click(function () {
	jQuery(this).next('div.togcont').toggle(300);
	});
	
	jQuery('h4.tog').toggle(
	function () { jQuery(this).css('background-position', '0 -46px'); },
	function () { jQuery(this).css('background-position', '0 8px'); }
	);