/*nav*/ $(function(){if($.browser.msie&&$.browser.version==6){$('#allsort-nav > li').hover(function(){var $slideDiv=$(this).find('div.item-box');if($slideDiv.length===0){return}$(this).children("a").addClass("hover");$slideDiv.show();$(this).append('');$('#selectMask').height($slideDiv.height()+3).width($slideDiv.width()+6)},function(){var $that=$(this);var $slideDiv=$(this).find('div.item-box');if($slideDiv.length===0){return}$slideDiv.hide(0);$(this).find('iframe').remove().children("a").removeClass('hover')});try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}}$("#allsort-nav > li").hover(function(){var $slideDiv=$(this).find('div.item-box');if($slideDiv.length===0){return}$(this).children("a").addClass("hover");$slideDiv.show()},function(){var $that=$(this);var $slideDiv=$(this).find('div.item-box');if($slideDiv.length===0){return}$slideDiv.hide();$(this).children("a").removeClass('hover')});$("#hd2 li.myPage").hover(function(){$(this).children("ul").show();$(this).addClass("hover");$(this).css({paddingLeft:"10px",paddingRight:"11px",marginTop:"-1px"})},function(){$(this).children("ul").hide();$(this).removeClass("hover");$(this).css({paddingLeft:"11px",paddingRight:"11px",marginTop:"0px"})});$(window).bind("scroll",function(){if($(document).scrollTop()==0){$("#rttop .desgin a").css("border-bottom","solid 1px #eee");$("#rttop .top").hide();}else{$("#rttop .desgin a").css("border-bottom","none");$("#rttop .top").show();}})}); /*shortcutSub*/ (function($){$.fn.hoverForIE6=function(option){var s=$.extend({current:"hover",delay:10},option||{});$.each(this,function(){var timer1=null,timer2=null,flag=false;$(this).bind("mouseover",function(){if(flag){clearTimeout(timer2)}else{var _this=$(this);timer1=setTimeout(function(){_this.addClass(s.current);flag=true},s.delay)}}).bind("mouseout",function(){if(flag){var _this=$(this);timer2=setTimeout(function(){_this.removeClass(s.current);flag=false},s.delay)}else{clearTimeout(timer1)}})})}})(jQuery); /*myTab*/ (function($){$.fn.myTab=function(option,callback){if(!this.length){return}if(typeof option=="function"){callback=option;option={}};var s=$.extend({type:"static",auto:false,source:"data",event:"mouseover",currClass:"curr",tab:".tab",content:".tabcon",itemTag:"li",stay:5000,delay:100,mainTimer:null,index:0},option||{});var tabItem=$(this).find(s.tab).eq(0).find(s.itemTag),contentItem=$(this).find(s.content);if(tabItem.length!=contentItem.length)return false;var reg=s.source.toLowerCase().match(/http:\/\/|\d|\.aspx|\.ascx|\.asp|\.php|\.html\.htm|.shtml|.js|\W/g);var init=function(n,tag){tabItem.removeClass(s.currClass);contentItem.hide();if(tag){s.index++;if(s.index==tabItem.length)s.index=0}else{s.index=n};show()};var autoSwitch=function(){s.mainTimer=setInterval(function(){init(s.index,true)},s.stay)};var show=function(){tabItem.eq(s.index).addClass(s.currClass);contentItem.eq(s.index).show();switch(s.type){default:case"static":var source="";break;case"dynamic":var source=(reg==null)?tabItem.eq(s.index).attr(s.source):s.source;tabItem.eq(s.index).removeAttr(s.source);break};if(callback){callback()}};tabItem.each(function(n){$(this).bind(s.event,function(){clearInterval(s.mainTimer);init(n,false)}).bind("mouseleave",function(){if(s.auto){autoSwitch()}else{return}})});if(s.type=="dynamic"){init(s.index,false)};if(s.auto){autoSwitch()}}})(jQuery); /*floatNav*/ (function($){$.fn.floatNav=function(c){if(!this.length){return}var d=$.extend({start:null,end:null,fixedClass:"nav-fixed",anchor:null,targetEle:null,range:0},c);var g=$(this),h=g.height(),f=g.width(),b=$('
');g.css({height:h,width:f});if(!g.parent().hasClass("float-nav-wrap")){g.wrap(b.css("height",h))}$(window).bind("scroll",function(){var j=$(document).scrollTop(),l=g.find("a").eq(0).attr("href"),n=d.start||g.parent(".float-nav-wrap").offset().top,m=d.targetEle?$(d.targetEle).offset().top:10000;if(j>n&&j<(d.end||m)-d.range){g.addClass(d.fixedClass);if(d.anchor&&l!==d.anchor){g.find("a").attr("href",d.anchor)}}else{g.removeClass(d.fixedClass);if(d.anchor){g.find("a").attr("href","javascript:;")}}});return this}})(jQuery); /*imgScroll*/ (function(e){e.fn.imgScroll=function(t,i){var s={evtType:"click",visible:1,direction:"x",next:"#next",prev:"#prev",disableClass:"disabled",disableClassPerfix:!1,speed:300,step:1,loop:!1,showControl:!1,width:null,height:null,navItems:!1,navItmesWrapClass:"scroll-nav-wrap",navItemActivedClass:"current",status:!1,statusWrapSelector:".scroll-status-wrap"},a=e.extend(s,t);return this.each(function(){function t(e){h>=k+$&&!w?(g.addClass(I),v.removeClass(N)):w||v.addClass(N),"left"!==m.eq(0).css("float")&&m.css("float","left"),u=a.width||m.eq(0).outerWidth(),f=a.height||m.eq(0).outerHeight(),d.css({position:"static"==d.css("position")?"relative":d.css("position"),width:"x"==e?u*$:u,height:"x"==e?f:f*$,overflow:"hidden"}),p.css({position:"absolute",width:"x"==e?u*h:u,height:"x"==e?f:f*h,top:0,left:0}),"function"==typeof i&&i.apply(d,[C,b,m.slice(C*k,C*k+$),m.slice(C*k+$-k,C*k+$)])}function s(e,t){function s(){w?(R=$>=h-e*k?!0:!1,D=0>=e?!0:!1):($>=h-e*k?(v.addClass(N),R=!0):(v.removeClass(N),R=!1),0>=e?(g.addClass(I),D=!0):(g.removeClass(I),D=!1)),(T||P)&&l(e),"function"==typeof i&&i.apply(d,[e,b,m.slice(e*k,e*k+$),m.slice(e*k+$-k,e*k+$)])}if(p.is(":animated"))return!1;if(w)D&&t&&(C=b),R&&!t&&(C=-1),e=t?--C:++C;else{if(D&&t||R&&!t)return!1;e=t?--C:++C}c="x"==y?{left:e>=b-1?-(h-$)*u:-e*k*u}:{top:e>=b-1?-(h-$)*f:-e*k*f},a.speed?p.animate(c,a.speed,s):(p.css(c),s())}function o(t,i){for(var s=S?e("."+t).eq(0):e('
'),a=0;b>a;a++)s.append("'+(a+1)+"");S||d.after(s)}function n(){var t=E?e(L).eq(0):e('
');t.html("1/"+b),E||d.after(t)}function l(t){T&&e("."+j).find("em").removeClass(W).eq(t).addClass(W),P&&e(L).html(""+(t+1)+"/"+b)}function r(){g.unbind(x).bind(x,function(){s(C,!0)}),v.unbind(x).bind(x,function(){s(C,!1)})}var c,d=e(this),p=d.find("ul").eq(0),m=p.children("li"),h=m.length,u=null,f=null,v="string"==typeof a.next?e(a.next):a.next,g="string"==typeof a.prev?e(a.prev):a.prev,C=0,k=a.step,$=a.visible,b=Math.ceil((h-$)/k)+1,w=a.loop,y=a.direction,x=a.evtType,_=a.disableClass,I=a.disableClassPerfix?"prev-"+_:_,N=a.disableClassPerfix?"next-"+_:_,T=a.navItems,j=a.navItmesWrapClass,S=e("."+j).length>0,W=a.navItemActivedClass,P=a.status,L=a.statusWrapSelector,E=e(L).length>0,R=!1,D=!0;h>$&&$>=k?(t(y),r(),T&&o(j,W),P&&n(L)):(a.showControl?v.add(g).show():v.add(g).hide(),g.addClass(I),v.addClass(N))})}})(jQuery); /*mySlide*/ (function(a){a.fn.mySlide=function(k){var p=a.extend({width:null,height:null,pics:[],index:0,type:"num",current:"curr",delay1:100,delay2:5000},k||{});var i=this;var g,f,d,h=0,e=true,b=true;var n=p.pics.length;var o=function(){var q="";i.css({position:"relative"}).html(q);a(function(){c()})};o();var j=function(){var s=[];s.push("
");var r;var q;for(var t=0;t";default:break}s.push("");s.push(q);s.push("")}s.push("
");i.append(s.join(""));i.find("span").bind("mouseover",function(){b=false;clearTimeout(g);clearTimeout(d);var u=i.find("span").index(this);if(p.index==u){return}else{d=setInterval(function(){if(e){l(u)}},p.delay1)}}).bind("mouseleave",function(){b=true;clearTimeout(g);clearTimeout(d);g=setTimeout(function(){l(p.index+1,true)},p.delay2)})};var l=function(r,q){if(r==n){r=0}f=setTimeout(function(){i.find("span").eq(p.index).removeClass(p.current);i.find("span").eq(r).addClass(p.current);m(r,q)},20)};var m=function(u,q){var s=parseInt(h);var v=Math.abs(s+p.index*p.height);var t=Math.abs(u-p.index)*p.height;var r=Math.ceil((t-v)/4);if(v==t){clearTimeout(f);if(q){p.index++;if(p.index==n){p.index=0}}else{p.index=u}e=true;if(e&&b){clearTimeout(g);g=setTimeout(function(){l(p.index+1,true)},p.delay2)}}else{if(p.index")}i.find("ul").append(q.join(""));g=setTimeout(function(){l(p.index+1,true)},p.delay2);if(p.type){j()}}}})(jQuery); /*Ebuyropdown*/ (function(a){a.fn.Ebuyropdown=function(d,e){if(!this.length){return};if(typeof d=="function"){e=d;d={}};var c=a.extend({event:"mouseover",current:"hover",delay:0},d||{});var b=(c.event=="mouseover")?"mouseout":"mouseleave";a.each(this,function(){var h=null,g=null,f=false;a(this).bind(c.event,function(){if(f){clearTimeout(g)}else{var j=a(this);h=setTimeout(function(){j.addClass(c.current);f=true;if(e){e(j)}},c.delay)}}).bind(b,function(){if(f){var j=a(this);g=setTimeout(function(){j.removeClass(c.current);f=false},c.delay)}else{clearTimeout(h)}})})}})(jQuery); /*Elazyload*/ (function(a){a.fn.Elazyload=function(j,n){if(!this.length){return}var f=a.extend({type:null,offsetParent:null,source:"data-lazyload",placeholderImage:"http://misc.shushi100.com/images/none/1x1.gif",placeholderClass:"loading-style2",threshold:200},j||{}),k=this,g,m,l=function(r){var u=r.scrollLeft,t=r.scrollTop,s=r.offsetWidth,q=r.offsetHeight;while(r.offsetParent){u+=r.offsetLeft;t+=r.offsetTop;r=r.offsetParent}return{left:u,top:t,width:s,height:q}},e=function(){var v=document.documentElement,r=document.body,u=window.pageXOffset?window.pageXOffset:(v.scrollLeft||r.scrollLeft),t=window.pageYOffset?window.pageYOffset:(v.scrollTop||r.scrollTop),s=v.clientWidth,q=v.clientHeight;return{left:u,top:t,width:s,height:q}},d=function(w,v){var y,x,s,r,q,u,z=f.threshold?parseInt(f.threshold):0;y=w.left+w.width/2;x=v.left+v.width/2;s=w.top+w.height/2;r=v.top+v.height/2;q=(w.width+v.width)/2;u=(w.height+v.height)/2;return Math.abs(y-x)<(q+z)&&Math.abs(s-r)<(u+z)},b=function(q,s,r){if(f.placeholderImage&&f.placeholderClass){r.attr("src",f.placeholderImage).addClass(f.placeholderClass)}if(q){r.attr("src",s).removeAttr(f.source);if(n){n(s,r)}}},c=function(q,t,r){if(q){var s=a("#"+t);s.html(r.val()).removeAttr(f.source);r.remove();if(n){n(t,r)}}},p=function(q,s,r){if(q){r.removeAttr(f.source);if(n){n(s,r)}}},o=function(){m=e(),k=k.filter(function(){return a(this).attr(f.source)});a.each(k,function(){var t=a(this).attr(f.source);if(!t){return}var s=(!f.offsetParent)?m:l(a(f.offsetParent).get(0)),r=l(this),q=d(s,r);switch(f.type){case"image":b(q,t,a(this));break;case"textarea":c(q,t,a(this));break;case"module":p(q,t,a(this));break;default:break}})},h=function(){if(k.length>0){clearTimeout(g);g=setTimeout(function(){o()},10)}};o();if(!f.offsetParent){a(window).bind("scroll",function(){h()}).bind("reset",function(){h()})}else{a(f.offsetParent).bind("scroll",function(){h()})}}})(jQuery); /*Marquee*/ function SsMarqueeDown(t_demo,t_demo1,t_demo2,speed){var t=document.getElementById(t_demo);if(t==null){return false}var t1=document.getElementById(t_demo1);var t2=document.getElementById(t_demo2);t2.innerHTML=t1.innerHTML;function Marquee(){if(t2.offsetTop-t.scrollTop<=0){t.scrollTop-=t1.offsetHeight}else{t.scrollTop++}}var MyMar=setInterval(Marquee,speed);t.onmouseover=function(){clearInterval(MyMar)};t.onmouseout=function(){MyMar=setInterval(Marquee,speed)}}function SsMarquee(t_demo,t_demo1,speed){var t1=document.getElementById(t_demo);if(t1==null){return false}var t=t1.scrollWidth;var t2=document.getElementById(t_demo1);t2.innerHTML+=t2.innerHTML;function doMarquee(){t1.scrollLeft=t1.scrollLeft=o.scrollHeight/2)o.scrollTop=0}else{clearInterval(t);setTimeout(start,delay)}}setTimeout(start,delay)} /*openthickBox*/ (function($){$.extend($.browser,{client:function(){return{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,bodyWidth:document.body.clientWidth,bodyHeight:document.body.clientHeight}},scroll:function(){return{width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight,bodyWidth:document.body.scrollWidth,bodyHeight:document.body.scrollHeight,left:document.documentElement.scrollLeft+document.body.scrollLeft,top:document.documentElement.scrollTop+document.body.scrollTop}},screen:function(){return{width:window.screen.width,height:window.screen.height}},isIE6:$.browser.msie&&$.browser.version==6,isMinW:function(val){return Math.min($.browser.client().bodyWidth,$.browser.client().width)<=val},isMinH:function(val){return $.browser.client().height<=val}})})(jQuery);(function($){$.fn.hoverForIE6=function(option){var s=$.extend({current:"hover",delay:10},option||{});$.each(this,function(){var timer1=null,timer2=null,flag=false;$(this).bind("mouseover",function(){if(flag){clearTimeout(timer2)}else{var _this=$(this);timer1=setTimeout(function(){_this.addClass(s.current);flag=true},s.delay)}}).bind("mouseout",function(){if(flag){var _this=$(this);timer2=setTimeout(function(){_this.removeClass(s.current);flag=false},s.delay)}else{clearTimeout(timer1)}})})}}) /*stJsonpajax*/ function setJsonpAjax(_url,_errorTi){$.ajax({url:_url,type:"GET",dataType:"jsonp",timeout:5000,success:function(newprocess){},error:function(xhr){if(_errorTi!=""){alert(_errorTi)}else{alert("服务器处理延迟,请稍后再试…………")}}})} /*misc*/ function search(id){var selKey=document.getElementById(id).value.replace(/(^\s*)|(\s*$)/g,"");selKey=selKey.replace("<","").replace(">","");if(selKey.length>30){alert("搜索关键字太长,请重新输入!");return};if(selKey.length<1){alert("请搜索到少2个字以上的内容!");return};window.location='http://search.shushi100.com/Search.aspx?keyword='+escape(selKey)}function login(){location.+escape(location.href);return false}function register(){location.+escape(location.href);return false}function getPara(name){var httpUrl=document.URL;var reg=new RegExp("(^|&|\\?)"+name+"=([^&]*)(&|$)"),r;if(r=httpUrl.match(reg))return unescape(r[2]);return""}function AddFavorite(sURL,sTitle){try{window.external.addFavorite(sURL,sTitle)}catch(e){try{window.sidebar.addPanel(sTitle,sURL,"")}catch(e){alert("加入收藏失败,请使用Ctrl+D进行添加")}}}function divisview(divname,ishide){try{objview=document.getElementById(divname);if(ishide==1){objview.style.display="block"}else{objview.style.display="none"}}catch(er){}}function ChangeinnerHTML(_obj,_value){try{obj=document.getElementById(_obj);obj.innerHTML=_value}catch(er){}}function getCurrentKey(allStr,defStr){var tempKey=allStr.split(",");var reStr=defStr;var setValue=Math.round(Math.random()*(tempKey.length-1)+1);if(setValue
  • 暂无商品浏览记录!
  • ");alert("清除成功!")})});$(function(){$("#clearTcRec").click(function(){writerecentCook("history_taocan","");$("#recentlist").html("
    • 暂无浏览记录!
    ");alert("清除成功!")})}); /*city*/ function writeCityCook(_data){var _expval=7;var _dataArr=_data.split("|");if(_dataArr.length==3){_expval=_dataArr[2]*1}var _cityCook=$.cookie("city");if(_cityCook){var _cityArr=_cityCook.split("|");if(_dataArr[0]==_cityArr[0]&&_dataArr.length==_cityArr.length)return}$.cookie("city",_data,{expires:_expval,path:"/",domain:"shushi100.com",secure:false})}function setCityName(){var s_cityid=document.getElementById('curCity');if(window.location!="http://www.shushi100.com/"&&s_cityid){var _cityCook=$.cookie("city");if(_cityCook){if(_cityCook.length>0){var _dataArr=_cityCook.split("|");var _cityename=_dataArr[0];var _cityname=_dataArr[1];if(_cityename!="www"){s_cityid.innerHTML=_cityname}}}else{setJsonpAjax("http://my.shushi100.com/ashx/changecity.ashx?myCallback=getCityForIPback&r="+Math.random(),"")}}}function getCityForIPback(data){if(data.success!=""){var _ipArr=data.success.split("|");var _cityname=_ipArr[0];var _cityename=_ipArr[1];var _citystatus=_ipArr[2];if(_citystatus=='3'){writeCityCook(_cityename+"|"+_cityname);document.getElementById('curCity').innerHTML=_cityname+""}}}function disputcity(cityename,cityname){var _cityCook=$.cookie("city");if(_cityCook==null){setTimeout(function(){var fileref=document.createElement('link');fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href","http://misc.shushi100.com/skin/thickbox.css");document.getElementsByTagName("head")[0].appendChild(fileref);myModelCallCenter.disput(cityename)},2000)}else{var _dataArr=_cityCook.split("|");if(_dataArr[0]!=cityename){writeCityCook(cityename+"|"+cityname)}}} /*cityclick*/ function writeCityClickCook(_data,_cityename){$.cookie("cityclick",_data,{expires:1,path:"/",domain:"shushi100.com",secure:false});setJsonpAjax("http://my.shushi100.com/ashx/changecity.ashx?cityename="+_cityename+"&r="+Math.random(),"")}function setCityClick(){var _cityename;var now=new Date();var strDate=now.toLocaleDateString();var _cityCook=$.cookie("city");if(_cityCook){if(_cityCook.length>0){var _dataArr=_cityCook.split("|");_cityename=_dataArr[0]}}else{_cityename="www"}var _cityClick=$.cookie("cityclick");if(_cityClick){if(_cityClick.length>0){var isbool=false;var _citylist=_cityClick.split(",");for(var i=0;i<_citylist.length;i++){var _cityArr=_citylist[i].split("|");if(_cityename==_cityArr[0]){isbool=true;if(strDate!=_cityArr[1]){_cityClick=_cityClick.replace(_citylist[i],_cityename+"|"+strDate);writeCityClickCook(_cityClick,_cityename);break}}}if(!isbool){_cityClick+=","+_cityename+"|"+strDate;writeCityClickCook(_cityClick,_cityename)}}}else{writeCityClickCook(_cityename+"|"+strDate,_cityename)}} /*flashPic*/ function flashPic(flash_id,flash_ad,flash_a,flash_w,flash_h,flash_opt){var id="flash_click_"+Math.ceil(Math.random()*1000000);flash_nad='';$(flash_id).append('
    '+flash_nad+'
    ')} /*uniquemac*/ (function($){function S4(){return(((1+Math.random())*0x10000)|0).toString(16).substring(1)};var uniquemac=$.cookie("uniquemac");if(!uniquemac){var uniquemac=(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());$.cookie("uniquemac",uniquemac,{expires:365,path:"/",domain:"shushi100.com",secure:false})}})(jQuery);