$(document).ready(function() {
	var idToOpen = $(document).getUrlParam("open");
    if(idToOpen == null){ var $number = 0; }
	else { var $number = idToOpen; }
	$('#tarieven').accordion({
		 autoHeight: false,
		 active: parseInt($number),
		// the drawer handle
		 header: 'h3',	
		 // our selected class
		 selectedClass: 'open',
		 //alwaysOpen
		 alwaysOpen: false, 
		 // match the Apple slide out effect
		 event: 'click'
	}).bind('accordionchange', function(event, ui) {
			$('h3 small').html('Meer informatie'); 
			$('h3.open small').html('Minder informatie');
	});	$('h3 small').html('Meer informatie'); 
	$('h3.open small').html('Minder informatie');
	
	$('div.more').hide();	
	$('p.more').click(function (){$('p.more').next().toggle();	});

	
	

	$.fn.width = function() {
		var $browser = document.documentElement.clientWidth;
		if($browser>917){
			$("body").css('overflow-x', 'hidden');
		}
		else {
			$("body").css('overflow-x', 'visible');
		}		
		var $height = $('#container').height();
		if($height<757){
			$newheight = $height;
			$('#background').css('height', $newheight+'px');
		}
	}
	
	$("body").width();
	
	$(window).resize(function(){
		$("body").width();
	});
	
	 
      // Usage
    var detective = new Detector();
	if(detective.test('Myriad Pro')==false){
		$('*').css("font-family","Arial");
	}
	
});
