$(window).load(function(){
	$('.menua').hover(
		//enter
		function() {
			$(this).css({"background-image": "url(menua_aktiv_background.jpg)"});
			var test = $(this).children().attr('id');
			$(this).children().css({"background": "url(menupall.png) no-repeat scroll -210px -"+(test.charAt(5)*40)+"px"});
			$(this).css({"cursor":"hand"});

		},
		//leave
		function() {
			$(this).css({"background-image": "url(menua_inaktiv_background.jpg)"});
			var test = $(this).children().attr('id');
			$(this).children().css({"background": "url(menupall.png) no-repeat scroll 0px -"+(test.charAt(5)*40)+"px"});
			$(this).css({"cursor":"pointer"});
		}
		);
		});
/*
   1. $(window).load(function(){  
   2.     var spotlight = {  
   3.          // the opacity of the "transparent" images - change it if you like  
   4.         opacity : 0.2,  
   5.   
   6.         //the vars bellow are for width and height of the images so we can make 
   7.         //the <li> same size 
   8.         imgWidth : $('.spotlightWrapper ul li').find('img').width(),  
   9.         imgHeight : $('.spotlightWrapper ul li').find('img').height()  
  10.   
  11.     };  
  12.   
  13.     //set the width and height of the list items same as the images  
  14.     $('.spotlightWrapper ul li').css({ 'width' : spotlight.imgWidth, 'height' : spotlight.imgHeight });  
  15.   
  16.     //when mouse over the list item...  
  17.     $('.spotlightWrapper ul li').hover(function(){  
  18.   
  19.         //...find the image inside of it and add active class to it and change opacity to 1 (no transparency)  
  20.         $(this).find('img').addClass('active').css({ 'opacity' : 1});  
  21.   
  22.         //get the other list items and change the opacity of the images inside it to the one we have set in the spotlight array  
  23.         $(this).siblings('li').find('img').css({'opacity' : spotlight.opacity}) ;  
  24.   
  25.         //when mouse leave...  
  26.     }, function(){  
  27.   
  28.         //... find the image inside of the list item we just left and remove the active class  
  29.         $(this).find('img').removeClass('active');  
  30.   
  31.     });  
  32.   
  33.     //when mouse leaves the unordered list...  
  34.     $('.spotlightWrapper ul').bind('mouseleave',function(){  
  35.         //find the images and change the opacity to 1 (fully visible)  
  36.         $(this).find('img').css('opacity', 1);  
  37.     });  
  38.   
  39. });  
*/



