//top导航more弹出层 jquery(function() { jquery('.topnav>dd>strong.more').hover( function(){jquery(this).find('span').css('display','block')}, function(){jquery(this).find('span').css('display','none')}) var sbtn = jquery('.searchbox>span>strong'); var sele = jquery('.searchbox>span>em'); sbtn.click( function(){ if( sele.is(':visible') ) {sele.hide();} else{sele.show();return false;} }); jquery("body").click(function(){ sele.hide(); }); sele.find('b').click(function(){ var vals = jquery(this).text(); sbtn.find('ins').text(vals); sele.hide() }); //tab function jquery('.hook1tab>a').mouseover(function() { tabselect(".hook1tab>a", ".hook1", "current", jquery(this)) });jquery('.hook1tab>a').eq(0).trigger("mouseover"); jquery('.hook2tab>span>a').mouseover(function() { tabselect(".hook2tab>span>a", ".hook2", "current", jquery(this)) });jquery('.hook2tab>span>a').eq(0).trigger("mouseover"); jquery('.hook21tab>a').mouseover(function() { tabselect(".hook21tab>a", ".hook21", "current", jquery(this)) });jquery('.hook21tab>a').eq(0).trigger("mouseover"); jquery('.hook3tab>div').mouseover(function() { tabselect(".hook3tab>div", ".hook3>a", "current", jquery(this)) });jquery('.hook3tab>div').eq(0).trigger("mouseover"); jquery('.hook4tab>div').mouseover(function() { tabselect(".hook4tab>div", ".hook4>a", "current", jquery(this)) });jquery('.hook4tab>div').eq(0).trigger("mouseover"); jquery('.hook5tab>div').mouseover(function() { tabselect(".hook5tab>div", ".hook5>a", "current", jquery(this)) });jquery('.hook5tab>div').eq(0).trigger("mouseover"); jquery('.hook6tab>div').mouseover(function() { tabselect(".hook6tab>div", ".hook6>a", "current", jquery(this)) });jquery('.hook6tab>div').eq(0).trigger("mouseover"); jquery('.hook7tab>a').mouseover(function() { tabselect(".hook7tab>a", ".hook7", "current", jquery(this)) });jquery('.hook7tab>a').eq(0).trigger("mouseover"); jquery('.hook8tab>a').mouseover(function() { tabselect(".hook8tab>a", ".hook8", "current", jquery(this)) });jquery('.hook8tab>a').eq(0).trigger("mouseover"); jquery('.hook9tab>a').mouseover(function() { tabselect(".hook9tab>a", ".hook9", "current", jquery(this)) });jquery('.hook9tab>a').eq(0).trigger("mouseover"); jquery('.hookfrom>a').mouseover(function() { tabselect(".hookfrom>a", ".cityfrom", "current", jquery(this)) });jquery('.hookfrom>a').eq(0).trigger("mouseover"); jquery(document).ready(function(){ jquery(".travelweibo li").mouseover(function(){jquery(this).addclass("hover")}); jquery(".travelweibo li").mouseout(function(){ jquery(this).removeclass("hover")}); }); function tabselect(tab,con,addclass,obj) { var $_self = obj; var $_nav = jquery(tab); $_nav.removeclass(addclass), $_self.addclass(addclass); var $_index = $_nav.index($_self); var $_con = jquery(con); $_con.hide(), $_con.eq($_index).show(); } }) //焦点图 jquery(function(){ var index=1; mytime =setinterval(function(){ showimg(index); index++; if(index==5){index=0;} } , 5000); jquery(".fadthumb b").click(function(){ index=parseint(jquery(".fadthumb b").index(jquery(this))); showimg(index); index++; if(index==5)index=0; }); jquery(".fousad").mouseover(function(){ if(mytime){clearinterval(mytime);} }); jquery(".fousad").mouseout(function(){ mytime =setinterval(function(){ showimg(index); index++; if(index==5){index=0;} }, 5000); }); function showimg(i){ jquery(".fadthumb").css("backgroundposition","0 "+(i+1)*(-109)+"px"); jquery(".fadimg a").hide(); jquery(".fadimg a").eq(i).show(); jquery(".fadinfo div").hide(); jquery(".fadinfo div").eq(i).fadein(500); } }); //焦点图2 jquery(function(){ var index=1; mytime2 =setinterval(function(){ showimg2(index); index++; if(index==3){index=0;} } , 5000); jquery(".fadthumb2 div").click(function(){ index=parseint(jquery(".fadthumb2 div").index(jquery(this))); showimg2(index); index++; if(index==3)index=0; }); jquery(".fousad2").mouseover(function(){ if(mytime2){clearinterval(mytime2);} }); jquery(".fousad2").mouseout(function(){ mytime2 =setinterval(function(){ showimg2(index); index++; if(index==3){index=0;} }, 5000); }); function showimg2(i){ jquery(".fadthumb2 div").css("background-image"," url(../images/numbg_red3.png)"); jquery(".fadthumb2 div").eq(i).css("background-image"," url(../images/numbg_red.png)"); jquery(".fadthumb2 div").css("background"," url(../images/numbg_red3.png)"); jquery(".fadthumb2 div").eq(i).css("background"," url(../images/numbg_red.png)"); jquery(".fadimg2 a").hide(); jquery(".fadimg2 a").eq(i).show(); jquery(".fadinfo2 div").hide(); jquery(".fadinfo2 div").eq(i).fadein(500); } }); //节庆游 jquery(function(){ jquery(".jqytab>li").eq(0).addclass("current"); jquery(".jqytab>li").mouseover( function(){ jquery(this).addclass("current").siblings("li").removeclass("current") }) }) //深度游策划 jquery(function(){ var page = 1; var len = parseint(jquery('.rollitems>ul>li').length/2); var t_width =parseint(jquery(".rollitems>ul>li:first").width()*2); jquery('.gor').click(function(){ if( !jquery('.rollitems>ul').is(":animated") ){ if( page == len ){ jquery('.rollitems>ul').animate({marginleft:'0'}, 500); page = 1; }else{ jquery('.rollitems>ul').animate({marginleft:'-='+t_width}, 200); page++; } } }); jquery('.gol').click(function(){ if( !jquery('.rollitems>ul').is(":animated") ){ if( page == 1 ){ jquery('.rollitems>ul').animate({marginleft:'-='+t_width*(len-1)}, 200); page = len; }else{ jquery('.rollitems>ul').animate({marginleft:'+='+t_width}, 500); page--; } } }); }) //acc jquery(function(){ var index=0; jquery("dl.ac dt").eq(index).css("width","523px"); jquery("dl.ac dd").eq(index).css("backgroundposition",(-35)*index+"px -160px"); jquery("dl.ac dd").mouseover(function(){ if(jquery("dl.ac dt").eq(index).css("width")!="523px")return false; i=jquery("dl.ac dd").index(this); if(i==index)return false; jquery("dl.ac dd").eq(index).css("backgroundposition",(-35)*index+"px 0px"); jquery(this).css("backgroundposition",(-35)*i+"px -160px"); jquery("dl.ac dt").eq(index).animate({width:0},200); jquery(this).next().animate({width:523},200); index=i; }); /* mytime =setinterval(function(){ jquery("dl.ac dd").eq(index).trigger("mouseover"); }, 8000);*/ }); //读旅游 jquery(function(){ var $index = 0; var $nav = jquery(".dlyl span i"); var $text = jquery(".dlyl h4 a"); var $pics = jquery(".dlyl div a"); jquery(".dlyl span i").click(function() { var $self = jquery(this); var $index = $nav.index($self); showmzin($index); jquery(".dlyl b.next").click(function(){ if($index<5){$index++}//20110316,改为6个杂志 else if($index==5){$index=0}//20110316,改为6个杂志 showmzin($index); }); jquery(".dlyl b.prev").click(function(){ if($index>0){$index--} else if($index==0){$index=5}//20110316,改为6个杂志 showmzin($index); }); }).eq(0).trigger("click"); function showmzin(i){ $pics.hide(), $pics.eq(i).show(), $text.hide(), $text.eq(i).show(), $nav.removeclass("current"), $nav.eq(i).addclass("current"); } dlytime =setinterval(function(){ jquery(".dlyl b.next").trigger("click"); }, 3000); jquery(".dlyl").mouseover(function(){ if(dlytime){clearinterval(dlytime);} }); jquery(".dlyl").mouseout(function(){ dlytime =setinterval(function(){ jquery(".dlyl b.next").trigger("click"); },3000); }); }); //表格列交替颜色 jquery(function(){jquery(".rankboxw").find("div ul").find("li:even").addclass("evenli");}); jquery(function(){jquery(".months div table").find("tr:even").addclass("even");}); //输入框获得焦点文本消失 /** jquery(function() { jquery(":input").not(jquery("#form1 input")).not(jquery("#leju_search_form input")).addclass('notype').focus(function() {//乐居搜索框不消失 if (jquery(this).val() == this.defaultvalue) { jquery(this).val("").removeclass('notype'); } }).blur(function() { if (jquery(this).val() == '') { jquery(this).val(this.defaultvalue).addclass('notype'); } else{ jquery('.sobtn').focus(); } }); }); **/