// JavaScript Document
$(document).ready( function() {

	//If the User resizes the window, adjust the #container height
//	$(window).bind("resize", resizeWindow);
//	resizeWindow();

/*
	// Capture right click
	$(document).rightClick( function(el) {
		alert('Function disabled');
		// Do something
	});
*/
// Disable context menu on an element
//	$(document).noContext();

/*
function resizeWindow(e){
	if($(window).width() < 1244){
		var diff = (1244-$(window).width()-25);
			//            alert('to small, diff:'+diff);
	if(diff > 51)diff = 51;
	 $("#tosmallBrowserWindowFix").css("padding-left", diff);
	 //$("#tosmallBrowserWindowFix2").css("padding-left", diff+75);
	}else{
	  $("#tosmallBrowserWindowFix").css("padding-left", 0);
	 //$("#tosmallBrowserWindowFix2").css("padding-left", 0);
	}
	var diff = ( $(window).width() - 990 ) / 2;
	if(diff < 18 ){diff = 18;}
	$("#tosmallBrowserWindowFix2").css("left", diff);
}
*/

	$('ul#homepageimglist').innerfade({
		speed: 1000,
		timeout: 4000,
		type: 'sequence',
		containerheight: '220px'
	});
	$('#homepageimglist').show();//show the list on the screen, disabled in css to prevent listing all images in list on page load



	//Hide the submenu  when on the home page!
	if($('#homepageimglist').attr('id') != undefined){
			$('#mainsubmenu').hide()
	}
	
	
	//assign action to generalBackButton
	$('a.generalBackButton').click(function(){
		history.go(-1);
	});
	
});

