$(document).ready(function() {
	//--------menu script--------------
	//main menu toggle	
    $("#menu-animaiton").toggle(
		function (){
        	$("#menu-content").animate({marginLeft: "-1110px"}, 200)
							  .animate({marginLeft: "0px"}, 400)
							  .animate({marginLeft: "-20px"}, 200);
			$("#menu-animaiton").animate({backgroundPosition: '-40px 0px'}, 2000);
			$("#menu-background").css('visibility', 'visible');
			$("#menu-background").animate({opacity: 0.9}, 500);
    	},
		function (){
        	$("#menu-content").animate({marginLeft: "0px"}, 200)
							  .animate({marginLeft: "-1110px"}, 400)
							  .animate({marginLeft: "-1090px"}, 200);
			$("#menu-animaiton").animate({backgroundPosition: '0px 0px'}, 2000);
			$("#menu-background").animate({opacity: 0.0}, 1000).css('visibility', 'hidden');
    	}
	);
	//background white open	| thickbox/lightbox like effect
	$('body').append('<div id="menu-background"> </div>');
	
	//close menu	
	$("#menu-background").click(
		function(){
			$("#menu-content").animate({marginLeft: "0px"}, 200)
							  .animate({marginLeft: "-1110px"}, 400)
							  .animate({marginLeft: "-1090px"}, 200);
			$("#menu-animaiton").animate({backgroundPosition: '0px 0px'}, 2000);
			$("#menu-background").animate({opacity: 0.0}, 1000).css('visibility', 'hidden');
		}
	);
	
	//fade menu click area
	$("#menu-animaiton").fadeTo("slow", 0.2);
	
	//animate menu click area
    $("#menu-animaiton").hover(
		function (){
			$("#menu-animaiton").fadeTo("slow", 0.5);			
    	},
		function (){
			$("#menu-animaiton").fadeTo("slow", 0.2);
    	}
	);	

	//--------shop script--------------	
	//shop hide background | proportional image
	$("#product_header_img_small").hide();

	//shop day/night switcher | iphone like
    $("#shop_tag-nacht-bt").toggle(
      function () {
        $("#product_header-overlay").fadeIn("slow");
        $("#inside-shop_tag-nacht-bt").animate({marginLeft: "0px"}, 200 );
      }, 
      function () {
        $("#product_header-overlay").fadeOut("slow");
        $("#inside-shop_tag-nacht-bt").animate({marginLeft: "41px"}, 200 ); 
      }
    );	

	//shop proportional image switcher | iphone like
	$("#shop_ein_aus-bt").toggle(
      function () {
        $("#inside-shop_ein_aus-bt").animate({marginLeft: "41px"}, 200 );
	    $("#product_header_img").animate({opacity: 0.0}, 200 );
		$("#product_header_img_small").show();
		$("#product_header_img_small").animate({opacity: 1.0}, 200 );
      }, 
      function () {
        $("#inside-shop_ein_aus-bt").animate({marginLeft: "0px"}, 200 );
	    $("#product_header_img").animate({opacity: 1.0}, 200 );
		$("#product_header_img_small").animate({opacity: 0.0}, 200 );
      }
    );

});
