/**
 * @author Maxvoloshin
 */

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.")
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"))
try {
	var pageTracker = _gat._getTracker("UA-9572245-1")
	pageTracker._trackPageview()
}
catch(err) {}

function imageslide() {
	var obj1=$("#imageslide > img:first"), obj2=$("#imageslide > img:last");
	$("#imageslide > img").css("position","absolute");
	obj2.fadeOut(0);
	$("#imageslide").everyTime(20000, function(i) {
		obj1.fadeIn(5000,function(){
			obj1.fadeOut(5000,function(){
				obj2.fadeIn(5000,function(){
					obj2.fadeOut(5000);
				});
			});
		});
	});
}
function heightControl() {
	var navHeight = $("#nav").height(),
		contentHeight = $("#copyright").offset().top;
	if (navHeight + 150 > contentHeight) $("#content").height(navHeight+15);
}
function menu() {
	$("#nav > li > ul").css("display", "none");
	$("#nav > li").hover(function(){
		$(this).nextAll().find("ul:visible").slideUp("fast");
		$(this).find("ul").slideDown("slow",function(){
			heightControl();
		});
	});
	$("#content").hover(function(){
		$("#nav > li > ul:visible").slideUp("fast",function(){
			heightControl();		
		});
	});
	heightControl();
}