﻿$(function(){
//jQuey 

//会员状态
var userName = GetCookie("usernameJS");
var userKey = GetCookie("userKeyJS");


//缩放图片
$(".imgResize").each(function(i){
	var imgObj = $(this).find("img").get(0);
	var width = $(this).css("width").replace("px","");
	var height = $(this).css("height").replace("px","");
	if (!width && $(imgObj).attr("title")) {
		var midNum = $(imgObj).attr("title").indexOf("*");
		width = $(imgObj).attr("title").substr(0,midNum); 
		height = $(imgObj).attr("title").substr(midNum+1);
	}
	if(imgObj.complete || imgObj.readyState =="complete") { DrawImage(imgObj,width,height);}
	else {
		imgObj.onreadystatechange = function(){ 
			if(imgObj.readyState =="complete") { DrawImage(imgObj,width,height); }
		} 
	}
});
$(".imgResize2").each(function(i){
	var imgObj = $(this).find("img").get(0);
	var width = $(this).css("width").replace("px","");
	var height = $(this).css("height").replace("px","");
	if (!width && $(imgObj).attr("title")) {
		var midNum = $(imgObj).attr("title").indexOf("*");
		width = $(imgObj).attr("title").substr(0,midNum); 
		height = $(imgObj).attr("title").substr(midNum+1);
	}
	if(imgObj.complete || imgObj.readyState =="complete") { DrawImage2(imgObj,width,height);}
	else {
		imgObj.onreadystatechange = function(){ 
			if(imgObj.readyState =="complete") { DrawImage2(imgObj,width,height); }
		} 
	}
});



//表格鼠标效果
$("table.tableTrOn tr").not(".head").mouseover(function(){
	$(this).css({'background':'#F7FFE8'});
}).mouseout(function(){
	$(this).css({'background':'none'});
});


//栏目收起
$(".win_head .close").each(function(){
	$(this).parent(".win_head").toggle(function(){
		$(this).siblings(".win_body").slideUp();
		$(this).children(".close").css("background","url(../images/icn_doShow.gif) no-repeat center");
	},function(){
		$(this).siblings(".win_body").slideDown();
		$(this).children(".close").css("background","url(../images/icn_doHide.gif) no-repeat center");
	});
});
$(".win_head .close2").each(function(){
	$(this).parent(".win_head").toggle(function(){
		$(this).siblings(".win_body").slideDown();
		$(this).children(".close").css("background","url(../images/icn_doHide.gif) no-repeat center");
	},function(){
		$(this).siblings(".win_body").slideUp();
		$(this).children(".close").css("background","url(../images/icn_doShow.gif) no-repeat center");
	});
});

//jQuey End
});

