/* jQuery staff */
jQuery(function($) {
var timer;
var nBaner;

function fade(event)
{
	 switch (nBaner) {
	 	case 1: $("#baner_1").animate({"opacity":0},1200, "linear", null);
	 		nBaner = 2;
	 		break;
	 	case 2: $("#baner_2").animate({"opacity":0},1200, "linear", null);
			nBaner = 3;	 		
	 		break;
	 	case 3: $("#baner_3").animate({"opacity":0},1200, "linear", null);
			nBaner = 4;	 		
	 		break;
	 	case 4: $("#baner_4").animate({"opacity":0},1200, "linear", null);
			nBaner = 5;	 		
	 		break;
	 	case 5: $("#baner_5").animate({"opacity":0},1200, "linear", null);
			nBaner = 1;	 		
	 		break;
	  }
     clearTimeout(timer);
     timer = setTimeout(eval("unfade"), "3000");
}

function unfade(event)
{
	 switch (nBaner) {
	 	case 1: $("#baner_1").animate({"opacity":1},1800, "swing", null);
	 		break;
	 	case 2: $("#baner_2").animate({"opacity":1},1800, "swing", null);
	 		break;
	 	case 3: $("#baner_3").animate({"opacity":1},1800, "swing", null);
	 		break;
	 	case 4: $("#baner_4").animate({"opacity":1},1800, "swing", null);
	 		break;
	 	case 5: $("#baner_5").animate({"opacity":1},1800, "swing", null);
	 		break;
	  }
    clearTimeout(timer);
    timer = setTimeout(eval("fade"), "3000");
}

function OnLoad(event)
{
     nBaner = 1;
     clearTimeout(timer);
     timer = setTimeout(eval("fade"),"3000");
}

OnLoad();

});

/* NORMAL STAFF */

function goHover(hover) {
	var goObj = document.getElementById("goBtn");
	if ( hover > 0 ) {
		goObj.src = imgPath+"button-go2.gif";
	} else {
		goObj.src = imgPath+"button-go.gif";
	}
}

function hoverOut(obj) {
	var stylename = obj.className;
	obj.className = stylename;
}

function navIn(obj) {
	var stylename = obj.className;
	obj.className = stylename+"-hover";
}

function navOut(obj) {
	var stylename = obj.className;
	stylename = stylename.replace(/-hover/gi,"");
	obj.className = stylename;
}

function imgOn(pic)
{
  document.images[pic].src = eval(pic + "_on.src");
}
function imgOff(pic)
{
  document.images[pic].src = eval(pic + "_off.src");
}
