jQuery.noConflict();
(function ($){
	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();
			
			/* banneri osa uus */

			$('#myBanner').banner({
				width: 603, 
				height: 243, 
				interval: 5,
				zindex: 100
			});

			 $('.gateImageList').cycle({
				fx: 'fade'
			});

			
		},
		
		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,imgOpen,imgClose){
			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',imgOpen);
			} else {
				e.parent().parent().find('.newsContent').css('display','none');
				e.parent().find('.openCloseArr').attr('src',imgClose);
				/* 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();
	});

	window.Weplay = Weplay;
})(jQuery);


