// JavaScript Document
var TIMEINTER=0;
$(function (){
			
	$("td[id^='bglink_']").mouseover(function (){
	var tmpname=this.id.split('_');
	$("#abouts").attr("class","abouts"+tmpname[1]);
	$("td[id^='bglink_']").attr("class","claslink");
	$(this).attr("class","claslinks");
	

		
})
	$("td[id^='titles_']").mouseover(function (){
		var tmpname=this.id.split('_');
		$("#tablescong").attr("class","bg"+tmpname[1]);
		if (tmpname[1]==1)
		{
			$("#imgscr1").attr("src","img/xswl1.jpg");
			$("#imgscr2").attr("src","img/qdxz2.jpg");
		}else
		{
			$("#imgscr1").attr("src","img/xswl2.jpg");
			$("#imgscr2").attr("src","img/qdxz1.jpg");
		}
		$("div[name^='news_']").each(function(){
			$(this).hide();
		});									  
		$("div[name^='news_"+tmpname[1]+"']").show();
		
	})
	

		
})
function onmover(nameStr)//ΟΤΚΎΟκΟΈΠΕΟ’
{
	setTimeout("actiononover('"+nameStr+"')","200");
}
function onmout(nameStr)
{
	
	setTimeout("actiononout('"+nameStr+"')","200");
}



function actiononover(nameStr)
{
	$("#"+nameStr).each(function (){
	var tmpNum =  this.src.split('.jpg');
	var tmpname=this.id.split('_');
	this.src=tmpNum[0]+"s."+"jpg";
	
	$("#divs_"+tmpname[1]).show()
	
	})	
}

function actiononout(nameStr)
{
	$("#"+nameStr).each(function (){
	var tmpNum =  this.src.split('.jpg');
	var tmpname=this.id.split('_');
	if (tmpNum[0].substr(tmpNum[0].length-1,1)=="s")
	{
	this.src=tmpNum[0].substr(0,tmpNum[0].length-1)+"."+"jpg";
	}
	$("#divs_"+ tmpname[1]).hide();
	//$(this).fadeIn("slow");
	})
}

function pagejpe(n,sum)
	{
		 if (TIMEINTER != '' || TIMEINTER != null)
			{
				window.clearInterval(TIMEINTER);
			}
		//alert(n);
		if (n>4)
		{
			n=1;
		}
		if (sum=="")
		{
			sum=4;
		}
		for(i=1;i<=sum;i++)
		{
			if (n==i)
			{
				$("#berd_"+i).attr("class","h1s1");
				$("#img_"+i).fadeIn("slow");
				$("#titless_"+i).fadeIn("slow");
			}else
			{
				$("#berd_"+i).attr("class","h1s");
				$("#img_"+i).hide();
				$("#titless_"+i).hide();
			}
			
		}
		 n++;
		
		TIMEINTER = setInterval("pagejpe("+n+",4);","5000");	
	}

	pagejpe(1,4);
