function closeFlygg(){
     $("#BannerZoneAD_Div176").width(80);
	 $("#BannerZoneAD_Div176").height(80);
}
function openFlygg(){
     $("#BannerZoneAD_Div176").width(200);
	 $("#BannerZoneAD_Div176").height(200);
}
$(function(){ 
		   //$(".text_more a").html("<img src=\"/tagsimages/seeall.gif\" />");
		   $(".onlyList li:nth-child(8n)").attr("class","bg");
		   
		   if($(".piclist").children().is("li")==false)
	      {
		   $(".onlyList .textlist").css({"float":"left","width":"600px"});
		   }
$(".Leftc .tag .pic").find("img").each( function(){
    $(this).error(function(){  
	  $(this).attr("src","http://img3.yxlady.com/skin/yx2010/images/img_error.gif");
	  $(this).removeAttr("width");
	  $(this).removeAttr("height");
	})	 
 })
$("a").each(function(){
   if($(this).parent().attr("class")!="ot page"){
	$(this).attr("target","_blank");
   }
	});
if(navigator.userAgent.indexOf("Firefox")<0){
if($("#f_gg_L2").children().is("ins")==false){
	$("#f_gg_L2").wrapInner("<ins></ins>");
	$("#f_gg_L2").wrapInner("<ins></ins>");
}

$("#f_gg_L2 ins").css({"position":"absolute","width":"200","height":"200"})
$("#f_gg_L2 ins ins").prepend("<div class=\"f_gg_L2_btn\"><a onclick=\"closeFlygg()\">X关闭</a> <a onclick=\"openFlygg()\" >O还原</a></div> ");

//if($(this).width() > 1240){
	$("#f_gg_L").hide();
	$("#f_gg_L2").show();
	$("#f_gg_L2").css("left","2");
	$("#f_gg_L2 ins").css("display","inline-table");
if(navigator.userAgent.indexOf("Firefox")>0){ 
	$("#f_gg_L2 ins").css("position","relative");
	$("#f_gg_L2").css("position","absolute");
  }
//}
//else{ $("#f_gg_L").show(); $("#f_gg_L2").hide(); }

}

$(".main .Leftc .tag .pic").each(function(){
	if($(this).html()==""){
		$(this).siblings(".text").width(520);
		$(this).siblings(".text_more").width(520);
	}
})

})

$(this).scroll(function() { // 页面发生scroll事件时触发   
var bodyTop = 0;
if (typeof window.pageYOffset != 'undefined') {
bodyTop = window.pageYOffset;   
}   
else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat')   
{   
bodyTop = document.documentElement.scrollTop;   
}   
else if (typeof document.body != 'undefined') {
bodyTop = document.body.scrollTop;
}

if($(this).height() < 640){
  if(bodyTop < 130){
    $("#f_gg_L").css("top", 280 );
	$("#f_gg_L2 ins ins").css("top", 92 );
  }
  else{
    $("#f_gg_L").css("top", 150 + bodyTop);
	$("#f_gg_L2 ins ins").css("top", 120 + bodyTop);
	
  }
}
else{
$("#f_gg_L").css("top", 280 + bodyTop); // 设置层的CSS样式中的top属性, 注意要是小写，要符合"标准"
$("#f_gg_L2 ins ins").css("top", 92 + bodyTop);

}

});

var yibu2_script = document.createElement('script');
yibu2_script.src="http://www.yxlady.com/extend/1.ashx";
yibu2_script.text = "sorttable.init()";
document.getElementsByTagName('head')[0].appendChild(yibu2_script);

var yibu3_script = document.createElement('script');
yibu3_script.src="http://www.yxlady.com/js/xmlhttp.js";
yibu3_script.text = "sorttable.init()";
document.getElementsByTagName('head')[0].appendChild(yibu3_script);

