function slter_camera(){ var dtw=$(".icam").outerwidth(); $(".icam_dt_in").css("left",-dtw); $(".icam_dt li").width(dtw); var slter={}; slter.h=$(".icam_slter").outerwidth()+29; slter.len=$(".icam_slter").length; if(slter.len < 3 && slter.len != 0){ var xxxx=$(".icam_slt_in").html(); $(".icam_slt_in").append(xxxx); slter.len=$(".icam_slter").length; while(slter.len < 4){ $(".icam_slt_in").append(xxxx); slter.len=$(".icam_slter").length; } } slter.counter=0; slter.flag=true; $slter=$(".icam_slter"); $slt_in=$(".icam_slt_in"); var $slter_first=$(".icam_slter:first"); $(".dt_now").find("a").attr("href",$slter_first.attr("rel")); $(".dt_now").css("background-image",$slter_first.attr("alt")); $(".icam_slter").click(function(){ if(!$(".icam_dt_in").is(":animated")){ var $this=$(this); $this.src=$this.find("img").attr("alt"); $this.hf=$this.find("img").attr("rel"); $this.dtsrc=$(".dt_now").css("background-image"); if($this.src!==$this.dtsrc){ if(slter.flag){ $(".dt_down").css("background-image",$this.src); $(".icam_dt_in").stop(true,true).animate({left:"-="+dtw},500,function(){ $(".dt_now").css("background-image",$this.src); $(".dt_now").find("a").attr("href",$this.hf); $(".icam_dt_in").css("left","-"+dtw+"px"); }) }else{ $(".dt_up").css("background-image",$this.src); $(".icam_dt_in").stop(true,true).animate({left:"+="+dtw},500,function(){ $(".dt_now").css("background-image",$this.src); $(".dt_now").find("a").attr("href",$this.hf); $(".icam_dt_in").css("left","-"+dtw+"px"); }) } } } }) if(slter.len > 3){ $(".icam_t").click(function(){ slter.flag=true; $(".icam_slter").eq(1).trigger("click"); $(".icam_slter").eq(0).appendto($slt_in); }) $(".icam_b").click(function(){ slter.flag=false; $(".icam_slter").eq(slter.len-1).prependto($slt_in).trigger("click"); }) var timer=setinterval(function(){$(".icam_t").trigger("click");},2000); $(".iwrap_a").hover(function(){ clearinterval(timer); },function(){ timer=setinterval(function(){$(".icam_t").trigger("click");},2000); }); } } $(function(){ scrolling("h_con","h1p","h2p"); slter_camera(); var picshow="

"; $(".iproer_a").click(function(){ var _this=$(this),liindex,picurl,picshowbod,leng,_val,_href; liindex=_this.parents(".iproer").index(); picurl=_this.parents(".iproer").find("> img").attr("rel"); _href=_this.parents(".iproer").find("a").attr("href"); _this.parents(".ipro").append(picshow); picshowbod=$(".pic_show_box"); picshowbod.find("img").attr("src",picurl); _val=_this.parents(".iproer").find(".iproer_z").find("span").eq(0).text(); $("#piclink").text(_val); $("#piclink").attr("href",_href); leng = _this.parents(".ipro").find(".iproer").length; $(".lbtn").click(function(){ if(liindex>0){ picurl=_this.parents(".ipro").find(".iproer").eq(liindex-1).find("img").attr("rel"); _val=_this.parents(".ipro").find(".iproer").eq(liindex-1).find(".iproer_z").find("span").eq(0).text(); _href=_this.parents(".ipro").find(".iproer").eq(liindex-1).find("a").attr("href"); $("#piclink").text(_val); picshowbod.find("img").attr("src",picurl); $("#piclink").attr("href",_href); return liindex--; }else{ picurl=_this.parents(".ipro").find(".iproer").eq(leng-1).find("img").attr("rel"); _val=_this.parents(".ipro").find(".iproer").eq(leng-1).find(".iproer_z").find("span").eq(0).text(); _href=_this.parents(".ipro").find(".iproer").eq(leng-1).find("a").attr("href"); $("#piclink").text(_val); picshowbod.find("img").attr("src",picurl); $("#piclink").attr("href",_href); liindex=leng-1; return liindex; } }); $(".rbtn").click(function(){ if(liindex