// JavaScript Document

var sAlt = '';

$(document).ready(function(){
	adjust();
	window.onresize = adjust;
	
	//去除链接虚框
	$(".menu a").focus(function(){
		this.blur();
	})
	
	//去除文字提示
	$("img").mouseover(function(){
		sAlt = $(this).attr('alt')
		$(this).attr('alt','')
	}).mouseout(function(){
		$(this).attr('alt',sAlt)
	});
	
	//去除文字提示
	$("a").mouseover(function(){
		sAlt = $(this).attr('title')
		$(this).attr('title','')
	}).mouseout(function(){
		$(this).attr('title',sAlt)
	});
	
	//单视频页面
	$("#mainmenu_4 a").addClass('thickbox');
	var aaa = $("#mainmenu_4 a").attr('href')
	$("#mainmenu_4 a").attr('href',aaa+'&act=AjaxLoginWidget&amp;loginCID=1&amp;TB_iframe=true')
	
	DD_belatedPNG.fix('a,div,img');//png图片透明
	
})
	

function adjust(){
	var divHeight = $('#wrap').height();
    var bodyHeight  = $(window).height();
    if(bodyHeight>divHeight){ 
		$("#wrap").css('margin-top',-divHeight/2+'px')
		$("#wrap").css('top','50%')
	}else{
		$("#wrap").css('margin-top','0');
		$("#wrap").css('top','0')
	}
}

function testS(obj,_width,_height){
	if(_width=='' || _height ==''){
		_width = 708;
		_height = 220;
	}
	$('#showThinBox').attr("href",obj+"?act=AjaxLoginWidget&amp;loginCID=1&amp;TB_iframe=true&amp;height="+_height+"&amp;width="+_width+"");
	$('#showThinBox').click();
}


/*$(document).ready(function(){
	$("a").attr('title','')
	DD_belatedPNG.fix('a,div,img');//png图片透明
	adjust($('wrap'),600);
	window.onresize = adjust($('wrap'),600);
})

function adjust(obj,h){
	var divHeight = obj.height();
    var bodyHeight  = $(window).height();
    if(bodyHeight>h){ 
		obj.css({'margin-top':-divHeight/2+'px','top':'50%'});
	}else{
		obj.css({'margin-top':0,'top':0});
	}
}*/
