$(document).ready(function() {


<!-- *** Hämta länkarna till fotona på tema, recept och pengar från html-sidan *** -->
var linkTheme = $("#temaFoto").attr("src");
var linkRecipe = $("#imgLinkRecept").attr("src");
var linkMoney = $("#imgLinkPengar").attr("src");


<!-- *** Scriptet för pilanimationen och fotot på startsidan *** -->
   $(function() {
      $(".utlosare")
            .mouseover(function() {
				  
				  // Byt fotot vid pilarna
				  switch($(this).attr("id"))
				  {
					case "pilTema_":
				  $("#temaFoto").attr("src", linkTheme);
				  //$("#temaFoto").attr("src", "/Global/Puffar/2011/Julstartsida2011/Startsidepuffen/BilderPuffen/v47/fotoTema.jpg");
				  break;
				  
					case "pilJulrecept_":
				  $("#temaFoto").attr("src", linkRecipe);
				  //$("#temaFoto").attr("src", "/Global/Puffar/2011/Julstartsida2011/Startsidepuffen/BilderPuffen/v47/fotoRecept.jpg");
				  break;
				  
					case "pilPengar_":
				  $("#temaFoto").attr("src", linkMoney);
				  //$("#temaFoto").attr("src", "/Global/Puffar/2011/Julstartsida2011/Startsidepuffen/BilderPuffen/v47/fotoPengar.jpg");
				  break;
				  }
				  
				  // Byt länk på fotot till samma länk som pilen
				  var lank = $(this).children("a").attr("href");
				  $("#temaFoto").parent("a").attr("href", lank);
				  
				  // Sträck ut pilen åt höger
				  $(this).stop().animate({left:'+=12px'},{queue:false, duration:400, easing: 'easeInOutCubic'})  
            
            })
            
            .mouseout(function() {
				  // Dra tillbaka pilen
              $(this).stop().animate({left:'249px'},{queue:false, duration:500, easing: 'easeOutBounce'})   
            });  
            
   });
	

<!-- *** Scriptet för pilanimationen i popuppen *** -->
   $(function() {
      $(".popUtlosare")
            .mouseover(function() {
				  
				  
				  // Sträck ut pilen åt höger
				  $(this).stop().animate({left:'+=16px'},{queue:false, duration:400, easing: 'easeInOutCubic'})  
            
            })
            
            .mouseout(function() {
				  // Dra tillbaka pilen
              $(this).stop().animate({left:'291px'},{queue:false, duration:500, easing: 'easeOutBounce'})   
            });  
            
   });
});

