$(function() 
		
		{
		
		$("#pikame").PikaChoose({show_prev_next:false, slide_enabled:true, auto_play:true});
		
				
			// ================= 
			// ! Menu functions   
			// ================= 

			//Basic functions
			
   				 $("#menu_button").click(function () 
   				 {
    			  $("#sub_menu").slideToggle("slow");
     			 $(this).parent().hover(function() 
     			{
			}, function()
			{
			$("#menu_overlay").find("#sub_menu").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
			});
    });



			//Fade menu items
			$(".fade").hover(function() 
		
				{
		
					$(this).animate({ backgroundColor: "#e1e1e1" }, 1000);
					},function() 
				{
			$(this).animate({ backgroundColor: "#88888" }, 500);
			
			});
			
			
			
			//story index animation
			
			
			
			  
			  $("ul.stories li").hover(function() {
					$(this).find("div").stop()
					.animate({left: "20", opacity:1}, "fast")
					.css("display","block")

					}, function() {
					$(this).find("div").stop()
					.animate({left: "0", opacity: 0}, "fast")
				});

			  
			  
			  
			  // setup ul.tabs to work as tabs for each div directly under div.panes
				$("ul.tabs").tabs("div.panes > div");
				
					// enable tooltip for "download" element. use the "slide" effect
				$("#download_now").tooltip({ effect: 'slide'}); 
    
   				 $(".menu_button").click(function () 
   				 {
    			  $("#the_menu").slideToggle("slow");
     			 $(this).parent().hover(function() 
     			{
			}, function()
			{
			$("#wrapper").find("#the_menu").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
			});
			
			
			
			
    });


			

		
	
				
		});
