// JavaScript Document
$(function(){
	//修复ie 6/7下的兼容性问题
	$("dd > input").wrap("<label></label>")
	//$(".left_category").accordion({
	//	collapsible: true
	//});

	//alert(window.screen.availHeight);
	//&& $(".$(".right_div").height() < window.screen.availHeight 
	if ($(".left_div").height() < window.screen.availHeight ){
		//alert($(".left_div").height());
		$(".left_div").css("height",window.screen.availHeight - 290 +'px')
	}
	
	if($(".left_div").height() < $(".right_div").height() ) {
		$(".left_div").height($(".right_div").height());
	}
	
	$(".menu a").each(function(){
			if (window.location.href.indexOf($(this).attr("href")) !== -1)
			{
				$(this).parent().addClass("on");
			}
							   
	   })
	
	$(".menu li[class!=on]").mouseover(function(){
		//alert('xx');
		$(this).addClass("on");
	}).mouseout(function(){	
		$(this).removeClass("on");
	});
	
	$(".left_category li[class!=on]").mouseover(function(){
		//alert('xx');
		$(this).addClass("on");
	}).mouseout(function(){	
		$(this).removeClass("on");
	});
	
	//logoinout
	
	$("a[action=logout]").click(function(){
										 
			//$("#sys-dialog").attr("title",$SystemLanguage.btn_loginout_system).html('<p align="center" >'+ $SystemLanguage.tip_loginout_confirm +'？</p>');
			//var customButton = {};	
			//customButton[$SystemLanguage.btn_cancel] = function() {
			//	$(this).dialog("close");
			//};
			
			//customButton[$SystemLanguage.btn_loginout_member] = function() {
			    	$.post('/php/member/member.php',{"runmode":"logout"},function(){
					//window.location.href = "/member/sign-in.php";
					window.location.href = "/index.php";
				});
			//};
			
		//	$("#sys-dialog").dialog("destroy").dialog({
		//		resizable: false,
		//		width :360,
		//		height:150,
		//		modal: true,
		//		buttons: customButton
		//	});	
			
		
	});
});

