
$(document).ready(function(){
	PhotoGallery();
	Nav();
});

/**
 * фотогалерея
 */
function PhotoGallery(){
//	$("#previews a").each(function(){
//		$(this).click(function(){
//			n = $(this).children("img").attr("src");
//			b = n.substr(0, n.length - 8) + ".jpg";
//			
//			window.open(b,'','width=600px,height=500px,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,status=1');
//
//			m = n.substr(0, n.length - 8) + "_mid.jpg";
//			
//			$pigphoto
//			$("#bigphoto a").attr({href:b});
//			$("#bigphoto img").attr({src:m});
//			
//			return false;
//		});
//	});

	$('#previews a').lightBox({fixedNavigation:true});
	$('.photo-gallery a').lightBox({fixedNavigation:true});
}


function Nav() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
				this.className+=" over";
				}
			node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
