var Weplay = {
	Init: function(){
		$.ifixpng('/js/pixel.gif');
		$('#MainMenu a.over').show();
		$('img[@src$=.png], #mainWrap ').ifixpng(); 
		$('#MainMenu a.over').hide();
		Weplay.Mainmenu.Init();
		Weplay.Forum.init();
	},
	
	Mainmenu:{
		Init: function() {
			$('#MainMenu a.out').mouseover(
				function (){
					$(this).hide().parent().find('a.over').show();
				}
			);
			$('#MainMenu a.over').mouseout(
				function (){
					$(this).hide().parent().find('a.out').show();
				}
			);
		}
	},
	
	ToggleNews: function(el){
		var e = $(el);
		if(e.parent().parent().find('.newsContent').css('display')=='none'){
			/* show */
			e.parent().parent().find('.newsContent').css('display','');
			e.parent().find('.openCloseArr').attr('src','images/newsOpen.gif');
		} else {
			e.parent().parent().find('.newsContent').css('display','none');
			e.parent().find('.openCloseArr').attr('src','images/newsClosed.gif');
			/* hide */
		}
	},
	
	Forum: {
		init: function(){
			$('.forumTbl .cell span').each(function(){
				$(this).height($(this).parent().parent().height()-4);
			});
			$('.forumTbl .cell').each(function(){
				$(this).height($(this).parent().height()-4);
			});
		}
	}
}

$(document).ready(function(){
	Weplay.Init();
});
