// Slideshow front (http://www.htmldrive.net/items/show/582/jShowOff-jQuery-Content-Rotator.html)
	$(document).ready(function(){ 
	$('#slideshow').jshowoff({ 
			autoPlay : true,
			changeSpeed : 600,
			controls : false,
			effect : 'fade',
			hoverPause : true,
			links : true,
			speed : 7000
	});
});

// Slideshow banner 2 (Bannerannonser interne)(http://www.htmldrive.net/items/show/582/jShowOff-jQuery-Content-Rotator.html)
	$(document).ready(function(){ 
	$('#slideshow2').jshowoff({ 
			autoPlay : true,
			changeSpeed : 1000,
			controls : false,
			effect : 'fade',
			hoverPause : true,
			links : false,
			speed : 7000
	});
});

// Slideshow banner 3 (Bannerannonser eksterne)(http://www.htmldrive.net/items/show/582/jShowOff-jQuery-Content-Rotator.html)
	$(document).ready(function(){ 
	$('#slideshow3').jshowoff({ 
			autoPlay : true,
			changeSpeed : 1000,
			controls : false,
			effect : 'fade',
			hoverPause : true,
			links : false,
			speed : 7000
	});
});

// Slideshow banner 4 (Om oss > Bildegalleri)(http://www.htmldrive.net/items/show/582/jShowOff-jQuery-Content-Rotator.html)
	$(document).ready(function(){ 
	$('#slideshow4').jshowoff({ 
			autoPlay : true,
			changeSpeed : 600,
			controls : false,
			effect : 'fade',
			hoverPause : true,
			links : true,
			speed : 7000
	});
});

// Dropdown billetter
	$(window).load(function(){
	var $multiple= $('.multiple');
	$('.button_show a').click(function(e) {
   	var $ul= $($(this).attr('href'));
    	$multiple.not($ul).hide();
    	$ul.toggle('fast');
   	 return false;
	});
});

// Dropdown flere datoer
	$(window).load(function(){
	var $multiple= $('.multiple');
	$('.view_dates a').click(function(e) {
   	var $ul= $($(this).attr('href'));
    	$multiple.not($ul).hide();
    	$ul.toggle('fast');
   	 return false;
	});
});

// Scroller forbi location-bar pa iPhone (http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/)
/mobile/i.test(navigator.userAgent) && !location.hash && setTimeout(function () {
  if (!pageYOffset) window.scrollTo(0, 1);
}, 1000);

 // Select-meny ved smale vinduer (http://css-tricks.com/13303-convert-menu-to-dropdown/)
	   // To make dropdown actually work
	   // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/
	$(function() {
	$(".narrow select").change(function() {
		window.location = $(this).find("option:selected").val();
    }); 
});

