$(document).ready(function(){
	if($.cookie('newstab')=="close"){
		$('.bzMainRight').css("left","640px").removeClass("open").parent().css("width","840px");
	}else{
		$('.bzMainRight').css("left","800px").addClass("open").parent().css("width","1000px");
	}
	$('a.moduleNewsHandle').click(function(){	
		if(!$('.bzMainRight').hasClass("open")){
			$('.bzMainRight').stop().animate({left:800},"slow", function(){
				$(this).addClass('open'); 
				$.cookie('newstab', 'open');
				});
			$('.bzMain').stop().animate({width:1000},"slow");
		}else{
			$('.bzMainRight').stop().animate({left:640},"slow", function(){
				$(this).removeClass('open');
				$.cookie('newstab', 'close');
			});
			$('.bzMain').stop().animate({width:840},"slow");
		}
		
	});
	$('.navMenu li').hover(function(){
		$(this).children('.subbox, ul').stop(true,true).slideDown("slow");
	}, function(){$(this).children('.subbox, ul').stop(true,true).slideUp("fast");});
	$('.searchHandle').click(function(){
		if(!$(this).hasClass("open"))
			{$('.searchModule').stop().animate({left:0},"slow");$(this).addClass('open');}
		else
			{$('.searchModule').stop().animate({left:-200},"slow");$(this).removeClass('open');}
	})
})
