//Modules -> News, javascript

var currentNews = "#newsView1";

function showNews() {
	var actNewsM = "newsM1";
	$("#newsM1").css( {background:"url(../images/home/artz.gif)",width:"257px",paddingBottom:"4px", color:"#ffff00"} );
	$("p.newsM").mouseover(function() {
			if(this.id != actNewsM) $(this).css( {background:"url(../images/home/artz.gif)", width:"257px", color:"#ffff00"} );
	});
	$("p.newsM").mouseout(function() {
			if(this.id != actNewsM) $(this).css( {background:"", width:"200px", color:"#fff"} );
	});
	$("p.newsM").click(function() {
			$("p.newsM").css( {background:"",width:"200px",paddingBottom:"4px",border:"0px", color:"#fff"} );
			$(this).css( {background:"url(../images/home/artz.gif)",width:"257px",paddingBottom:"4px", color:"#ffff00"} );
			actNewsM = this.id;
	});
	$("#newsBtn1").click(function() { $(currentNews).hide(); $("#newsView1").show(); currentNews = "#newsView1";});
	$("#newsBtn2").click(function() { $(currentNews).hide(); $("#newsView2").show(); currentNews = "#newsView2";});
	$("#newsBtn3").click(function() { $(currentNews).hide(); $("#newsView3").show(); currentNews = "#newsView3";});
	$("#newsBtn4").click(function() { $(currentNews).hide(); $("#newsView4").show(); currentNews = "#newsView4";});
	$("#newsBtn5").click(function() { $(currentNews).hide(); $("#newsView5").show(); currentNews = "#newsView5";});
	$("#newsBtn6").click(function() { $(currentNews).hide(); $("#newsView6").show(); currentNews = "#newsView6";});
}

$(document).ready(function(){
	showNews();
	$("#newsView1").show();
});