//Modules -> News, javascript

var currentNews = "#newsView1";

function showNews() {
	var actNewsM = "newsM1";
	$("#newsM1").css( {background:"#FFF",width:"190px",paddingBottom:"6px"} );
	$("p.newsM").mouseover(function() {
			if(this.id != actNewsM) $(this).css( {background:"#fefdfc", width:"190px"} );
	});
	$("p.newsM").mouseout(function() {
			if(this.id != actNewsM) $(this).css( {background:"#f2f0eb", width:"200px"} );
	});
	$("p.newsM").click(function() {
			$("p.newsM").css( {background:"#f2f0eb",width:"200px",paddingBottom:"6px",border:"0px"} );
			$(this).css( {background:"#FFF",width:"190px",paddingBottom:"6px"} );
			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";});
}

$(document).ready(function(){
	showNews();
	$("#newsView1").show();
});
