var icon = new Image(); icon.src = '/css/galleri-riis-logo-small.gif';
var icon = new Image(); icon.src = '/css/arrow-left.gif';
var icon = new Image(); icon.src = '/css/arrow-right.gif';

var isIe6 = $.browser.msie && $.browser.version=="6.0" &&!window.XMLHttpRequest;

var savedContent = null;

$(document).ready(function() {
	savedContent = $('<div id="savedContent" />').append($('body').children()).appendTo('body').hide();
	
	$('html').css('overflow', 'auto');
	$('body').css('margin-top', '0px');
			
});


function extractImageObjects(element){
	return $.map($('li', element), function(e){
		var thumbUrl = $('img', e).attr('src');
		var imageName = thumbUrl.split('/').pop();
		return {thumbUrl: thumbUrl, description: $(e).text(), fileName: imageName};
	});
}

function setSubmenuCallback(func){
	$('#subMenu li').click(function(){
		$('#subMenu li').removeClass('selected');
		$(this).addClass('selected');
		$(".subview").hide();
		var label = $.trim($(this).text());
		func(label);
	});
	
	if (isIe6) {
		$('#subMenu li').hover(
			function () {$(this).addClass('hover');},
			function () {$(this).removeClass('hover');}
		);
	}
	
}


