$.backstretch("http://bowlers.no/wp/wp-content/themes/blur/images/bg.jpg");
/*$( function() {
  $.vegas({
    src:'http://bowlers.no/wp/wp-content/themes/blur/images/bg.jpg'
  });
  $.vegas('overlay', {
    src:'overlays/01.png'
  });
});*/

$(document).ready(function(){
	if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
	{
	     $("#header").css("position", "static");
	};
	
	$("#facebook-icon").before("<em id='facebook-note'>Følg oss på Facebook</em>");
	
	$("#facebook-icon").hover(function() {
	  $("#facebook-note").not(":animated").animate({ opacity: "show", bottom: "50" }, "slow");
	}, function() {
	  $("#facebook-note").animate({ opacity: "hide", bottom: "80" }, "fast");
	});
	
	$(".meny ul li:first-child").addClass('menyTitle');
	$(".meny ul li:last-child").addClass('menyPrice');
	$("#nav li ul li").each(function(index){
		$('a', this).attr('href', '#'+$('a', this).attr('title'));
	});
	
	$('#nav li ul li a').click(function () {
		goToByScroll($(this).attr('title'));
	});
});

function goToByScroll(id){
     	$('html,body').animate({scrollTop: $("#"+id).offset().top},'fast');
}
