jsHover = function() {
	var arr = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0, len=arr.length; i<len; i++) {
		arr[i].onmouseover=function() {this.className+=" jshover";}
		arr[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
	}
}

function reloadPage() {
	$("body").css("display","inline").css("display","block");
}

function switchPhoto(current,link) {
	$(current).parents("div.sliderSpace").next("div.sliderBig").find("img.switch").attr("src",current.href);
	return false;
}

function showPopup (current) {
	$("#shadow").height($("#wrap").height()).show();
	$("#"+current).show();
	return false;
}

function closePopup (current) {
	$("#shadow").hide();
	$("#"+current).hide();
	return false;
}

function initGallery() {
	if ($(".gallery a").size() > 0) {
		$(".gallery a").find('img').fadeTo(1, 0.75);
		$(".gallery a").hover(function(){$(this).find('img').fadeTo(200, 1);},function(){$(this).find('img').fadeTo(300, 0.75);});
	}
}


$(document).ready(function(){
	if ($.browser.msie) {jsHover();};
	if ($(".gallery").size() > 0) {initGallery();}
	if ($(".slider").size() > 0) {m1SliderInit();}
	reloadPage();
})
