-九游官网入口
/*livequery*/
eval(function(p,a,c,k,e,r){e=function(c){return(c35?string.fromcharcode(c 29):c.tostring(36))};if(!''.replace(/^/,string)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w '};c=1};while(c--)if(k[c])p=p.replace(new regexp('\\b' e(c) '\\b','g'),k[c]);return p}('(4($){$.r($.7,{3:4(c,b,d){9 e=2,q;5($.o(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&c==a.m&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6))l(q=a)&&v});q=q||y $.3(2.8,2.g,c,b,d);q.u=v;$.3.s(q.f);l 2},t:4(c,b,d){9 e=2;5($.o(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&(!c||c==a.m)&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6)&&!2.u)$.3.y(a.f)});l 2}});$.3=4(e,c,a,b,d){2.8=e;2.g=c||s;2.m=a;2.7=b;2.o=d;2.t=[];2.u=v;2.f=$.3.j.k(2)-1;b.$6=b.$6||$.3.i ;5(d)d.$6=d.$6||$.3.i ;l 2};$.3.p={y:4(){9 b=2;5(2.m)2.t.16(2.m,2.7);e 5(2.o)2.t.h(4(i,a){b.o.x(a)});2.t=[];2.u=q},s:4(){5(2.u)l;9 b=2;9 c=2.t,w=$(2.8,2.g),h=w.11(c);2.t=w;5(2.m){h.10(2.m,2.7);5(c.c>0)$.h(c,4(i,a){5($.b(a,w)<0)$.z.p(a,b.m,b.7)})}e{h.h(4(){b.7.x(2)});5(2.o&&c.c>0)$.h(c,4(i,a){5($.b(a,w)<0)b.o.x(a)})}}};$.r($.3,{i:0,j:[],k:[],a:v,d:x,n:4(){5($.3.a&&$.3.k.c){9 a=$.3.k.c;w(a--)$.3.j[$.3.k.v()].s()}},u:4(){$.3.a=v},m:4(){$.3.a=q;$.3.s()},l:4(){$.h(g,4(i,n){5(!$.7[n])l;9 a=$.7[n];$.7[n]=4(){9 r=a.x(2,g);$.3.s();l r}})},s:4(b){5(b!=z){5($.b(b,$.3.k)<0)$.3.k.k(b)}e $.h($.3.j,4(a){5($.b(a,$.3.k)<0)$.3.k.k(a)});5($.3.d)1j($.3.d);$.3.d=1i($.3.n,1h)},y:4(b){5(b!=z)$.3.j[b].y();e $.h($.3.j,4(a){$.3.j[a].y()})}});$.3.l(\'1g\',\'1f\',\'1e\',\'1b\',\'1a\',\'19\',\'18\',\'17\',\'1c\',\'15\',\'1d\',\'p\');$(4(){$.3.m()});9 f=$.p.j;$.p.j=4(a,c){9 r=f.x(2,g);5(a&&a.8)r.g=a.g,r.8=a.8;5(14 a==\'13\')r.g=c||s,r.8=a;l r};$.p.j.p=$.p})(12);',62,82,'||this|livequery|function|if|lqguid|fn|selector|var|||||||context|each||queries|queue|return|type||fn2|prototype|||run|elements|stopped|false|els|apply|stop|undefined|running|inarray|length|timeout|else|id|arguments|nels|guid|init|push|registerplugin|play|checkqueue|isfunction|remove|true|extend|document|expire|pause|shift|while|null|new|event|bind|not|jquery|string|typeof|toggleclass|unbind|addclass|removeattr|attr|wrap|before|removeclass|empty|after|prepend|append|20|settimeout|cleartimeout'.split('|'),0,{}))
/*query*/
new function(settings){var $separator=settings.separator||'&';var $spaces=settings.spaces===false?false:true;var $suffix=settings.suffix===false?'':'[]';var $prefix=settings.prefix===false?false:true;var $hash=$prefix?settings.hash===true?"#":"?":"";var $numbers=settings.numbers===false?false:true;jquery.query=new function(){var is=function(o,t){return o!=undefined&&o!==null&&(!!t?o.constructor==t:true)};var parse=function(path){var m,rx=/\[([^[]*)\]/g,match=/^(\s ?)(\[\s*\])?$/.exec(path),base=match[1],tokens=[];while(m=rx.exec(match[2]))tokens.push(m[1]);return[base,tokens]};var set=function(target,tokens,value){var o,token=tokens.shift();if(typeof target!='object')target=null;if(token===""){if(!target)target=[];if(is(target,array)){target.push(tokens.length==0?value:set(null,tokens.slice(0),value))}else if(is(target,object)){var i=0;while(target[i ]!=null);target[--i]=tokens.length==0?value:set(target[i],tokens.slice(0),value)}else{target=[];target.push(tokens.length==0?value:set(null,tokens.slice(0),value))}}else if(token&&token.match(/^\s*[0-9] \s*$/)){var index=parseint(token,10);if(!target)target=[];target[index]=tokens.length==0?value:set(target[index],tokens.slice(0),value)}else if(token){var index=token.replace(/^\s*|\s*$/g,"");if(!target)target={};if(is(target,array)){var temp={};for(var i=0;i0)querystring.push($hash);querystring.push(chunks.join($separator));return querystring.join("")}};return new queryobject(location.search,location.hash)}}(jquery.query||{});
/*cookie*/
eval(function(p,a,c,k,e,r){e=function(c){return(c35?string.fromcharcode(c 29):c.tostring(36))};if(!''.replace(/^/,string)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w '};c=1};while(c--)if(k[c])p=p.replace(new regexp('\\b' e(c) '\\b','g'),k[c]);return p}('n.5=v(a,b,c){4(7 b!=\'w\'){c=c||{};4(b===o){b=\'\';c.3=-1}2 d=\'\';4(c.3&&(7 c.3==\'p\'||c.3.q)){2 e;4(7 c.3==\'p\'){e=x y();e.z(e.a() (c.3*b*r*r*c))}s{e=c.3}d=\';3=\' e.q()}2 f=c.8?\';8=\' (c.8):\'\';2 g=c.9?\';9=\' (c.9):\'\';2 h=c.t?\';t\':\'\';6.5=[a,\'=\',d(b),d,f,g,h].e(\'\')}s{2 j=o;4(6.5&&6.5!=\'\'){2 k=6.5.f(\';\');g(2 i=0;i=9?this.getmonth() 1:"0" (this.getmonth() 1));
result=result.replace(/m/,this.getmonth());
result=result.replace(/dd|dd/,this.getdate()>9?this.getdate():"0" this.getdate());
result=result.replace(/d|d/,this.getdate());
result=result.replace(/hh|hh/,this.gethours()>9?this.gethours():"0" this.gethours());
result=result.replace(/h|h/,this.gethours());
result=result.replace(/mm/,this.getminutes()>9?this.getminutes():"0" this.getminutes());
result=result.replace(/m/,this.getminutes());
result=result.replace(/ss|ss/,this.getseconds()>9?this.getseconds():"0" this.getseconds());
result=result.replace(/s|s/,this.getseconds());}
return result;});
string.prototype.format=function(){
var result=this;
if(arguments.length>0){
parameters=$.makearray(arguments);
$.each(
parameters,
function(i,n){
result=result.replace(new regexp("\\{" i "\\}","g"),n);});}
return result;}
function stringbuilder(){
this.strings=new array();
this.length=0;}
stringbuilder.prototype.append=function(string){
this.strings.push(string);
this.length =string.length;}
stringbuilder.prototype.tostring=function(start,length){
return this.strings.join("").substr(start,length);}
/*login*/
$.login=function(options){options=$.extend({loginservice:"http://passport.360buy.com/loginservice.aspx?callback=?",loginmethod:"login",loginurl:"https://passport.360buy.com/new/login.aspx",returnurl:location.href,automatic:true,complete:null},options||{});if(options.loginservice!=""&&options.loginmethod!=""){$.getjson(options.loginservice,{method:options.loginmethod},function(result){if(result!=null){if(options.complete!=null){options.complete(result.identity)}if(!result.identity.isauthenticated&&options.automatic&&options.loginurl!=""){location.href=options.loginurl "?returnurl=" escape(options.returnurl)}}})}};
/*jmsajax*/
(function($){$.jmsajax=function(options){var defaults={type:"post",datatype:"msjson",data:{},beforesend:function(xhr){xhr.setrequestheader("content-type","application/json; charset=utf-8");},contenttype:"application/json; charset=utf-8",error:function(x,s,m){alert("status: " ((x.statustext)?x.statustext:"unknown") "\nmessage: " msjson.parse(((x.responsetext)?x.responsetext:"unknown")).message);}};var options=$.extend(defaults,options);if(options.method)
options.url ="/" options.method;if(options.data){if(options.type=="get"){var data="";for(var i in options.data){if(data!="")
data ="&";data =i "=" msjson.stringify(options.data[i]);}
options.url ="?" data;data=null;options.data="{}";}
else if(options.type=="post"){options.data=msjson.stringify(options.data);}}
if(options.success){if(options.datatype){if(options.datatype=="msjson"){var base=options.success;options.success=function(response,status){var y=dateparse(response);if(options.version){if(options.version>=3.5)
y=y.d;}
else{if(response.indexof("{\"d\":")==0)
y=y.d;}
base(y,status);}}}}
return $.ajax(options);};dateparse=function(data){try{return msjson.parse(data,function(key,value){var a;if(typeof value==="string"){if(value.indexof("date")>=0){a=/^\/date\(([0-9] )\)\/$/.exec(value);if(a){return new date(parseint(a[1],10));}}}
return value;});}
catch(e){return null;}}
msjson=function(){function f(n){return n<10?'0' n:n;}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapeable.lastindex=0;return escapeable.test(string)?'"' string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
return'\\u' ('0000' ( (a.charcodeat(0))).tostring(16)).slice(-4);}) '"':'"' string '"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.tojson==='function'){value=value.tojson(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isfinite(value)?string(value):'null';case'boolean':case'null':return string(value);case'object':if(!value){return'null';}
if(value.toutcstring){return '"\\/date(' (value.gettime()) ')\\/"';}
gap =indent;partial=[];if(typeof value.length==='number'&&!(value.propertyisenumerable('length'))){length=value.length;for(i=0;i/g,">");},
"capitalize":function(s){return string(s).touppercase();},
"default":function(s,d){return s!=null?s:d;}}
trimpath.parsetemplate_etc.modifierdef.h=trimpath.parsetemplate_etc.modifierdef.escape;
trimpath.parsetemplate_etc.template=function(tmplname,tmplcontent,funcsrc,func,etc){
this.process=function(context,flags){
if(context==null)
context={};
if(context._modifiers==null)
context._modifiers={};
if(context.defined==null)
context.defined=function(str){return(context[str]!=undefined);};
for(var k in etc.modifierdef){
if(context._modifiers[k]==null)
context._modifiers[k]=etc.modifierdef[k];}
if(flags==null)
flags={};
var resultarr=[];
var resultout={write:function(m){resultarr.push(m);}};
try{
func(resultout,context,flags);}catch(e){
if(flags.throwexceptions==true)
throw e;
var result=new string(resultarr.join("") "[error: " e.tostring() (e.message?'; ' e.message:'') "]");
result["exception"]=e;
return result;}
return resultarr.join("");}
this.name=tmplname;
this.source=tmplcontent;
this.sourcefunc=funcsrc;
this.tostring=function(){return "trimpath.template [" tmplname "]";}}
trimpath.parsetemplate_etc.parseerror=function(name,line,message){
this.name=name;
this.line=line;
this.message=message;}
trimpath.parsetemplate_etc.parseerror.prototype.tostring=function(){
return("trimpath template parseerror in " this.name ": line " this.line ", " this.message);}
var parse=function(body,tmplname,etc){
body=cleanwhitespace(body);
var functext=["var trimpath_template_temp = function(_out, _context, _flags) { with (_context) {"];
var state={stack:[],line:1};
var endstmtprev=-1;
while(endstmtprev 1=0){
var endstmt=body.indexof('}',begstmt 1);
var stmt=body.substring(begstmt,endstmt);
var blockrx=stmt.match(/^\{(cdata|minify|eval)/);
if(blockrx){
var blocktype=blockrx[1];
var blockmarkerbeg=begstmt blocktype.length 1;
var blockmarkerend=body.indexof('}',blockmarkerbeg);
if(blockmarkerend>=0){
var blockmarker;
if(blockmarkerend-blockmarkerbeg<=0){
blockmarker="{/" blocktype "}";}else{
blockmarker=body.substring(blockmarkerbeg 1,blockmarkerend);}
var blockend=body.indexof(blockmarker,blockmarkerend 1);
if(blockend>=0){
emitsectiontext(body.substring(endstmtprev 1,begstmt),functext);
var blocktext=body.substring(blockmarkerend 1,blockend);
if(blocktype=='cdata'){
emittext(blocktext,functext);}else if(blocktype=='minify'){
emittext(scrubwhitespace(blocktext),functext);}else if(blocktype=='eval'){
if(blocktext!=null&&blocktext.length>0)
functext.push('_out.write( (function() { ' blocktext ' })() );');}
begstmt=endstmtprev=blockend blockmarker.length-1;}}}else if(body.charat(begstmt-1)!='$'&&
body.charat(begstmt-1)!='\\'){
var offset=(body.charat(begstmt 1)=='/'?2:1);
if(body.substring(begstmt offset,begstmt 10 offset).search(trimpath.parsetemplate_etc.statementtag)==0)
break;}
begstmt=body.indexof("{",begstmt 1);}
if(begstmt<0)
break;
var endstmt=body.indexof("}",begstmt 1);
if(endstmt<0)
break;
emitsectiontext(body.substring(endstmtprev 1,begstmt),functext);
emitstatement(body.substring(begstmt,endstmt 1),state,functext,tmplname,etc);
endstmtprev=endstmt;}
emitsectiontext(body.substring(endstmtprev 1),functext);
if(state.stack.length!=0)
throw new etc.parseerror(tmplname,state.line,"unclosed, unmatched statement(s): " state.stack.join(","));
functext.push("}}; trimpath_template_temp");
return functext.join("");}
var emitstatement=function(stmtstr,state,functext,tmplname,etc){
var parts=stmtstr.slice(1,-1).split(' ');
var stmt=etc.statementdef[parts[0]];
if(stmt==null){
emitsectiontext(stmtstr,functext);
return;}
if(stmt.delta<0){
if(state.stack.length<=0)
throw new etc.parseerror(tmplname,state.line,"close tag does not match any previous statement: " stmtstr);
state.stack.pop();}
if(stmt.delta>0)
state.stack.push(stmtstr);
if(stmt.parammin!=null&&
stmt.parammin>=parts.length)
throw new etc.parseerror(tmplname,state.line,"statement needs more parameters: " stmtstr);
if(stmt.prefixfunc!=null)
functext.push(stmt.prefixfunc(parts,state,tmplname,etc));
else
functext.push(stmt.prefix);
if(stmt.suffix!=null){
if(parts.length<=1){
if(stmt.paramdefault!=null)
functext.push(stmt.paramdefault);}else{
for(var i=1;i1)
functext.push(' ');
functext.push(parts[i]);}}
functext.push(stmt.suffix);}}
var emitsectiontext=function(text,functext){
if(text.length<=0)
return;
var nlprefix=0;
var nlsuffix=text.length-1;
while(nlprefix=0&&(text.charat(nlsuffix)==' '||text.charat(nlsuffix)=='\t'))
nlsuffix--;
if(nlsuffix0){
functext.push('if (_flags.keepwhitespace == true) _out.write("');
var s=text.substring(0,nlprefix).replace('\n','\\n');
if(s.charat(s.length-1)=='\n')
s=s.substring(0,s.length-1);
functext.push(s);
functext.push('");');}
var lines=text.substring(nlprefix,nlsuffix 1).split('\n');
for(var i=0;i1){
functext.push(',');
functext.push(parts[1]);}
functext.push(')');}
var cleanwhitespace=function(result){
result=result.replace(/\t/g," ");
result=result.replace(/\r\n/g,"\n");
result=result.replace(/\r/g,"\n");
result=result.replace(/^(\s*\s*(\s \s )*)\s*$/,'$1');
return result;}
var scrubwhitespace=function(result){
result=result.replace(/^\s /g,"");
result=result.replace(/\s $/g,"");
result=result.replace(/\s /g," ");
result=result.replace(/^(\s*\s*(\s \s )*)\s*$/,'$1');
return result;}
trimpath.parsedomtemplate=function(elementid,optdocument,optetc){
if(optdocument==null)
optdocument=document;
var element=optdocument.getelementbyid(elementid);
var content=element.value;
if(content==null)
content=element.innerhtml;
content=content.replace(//g,">");
return trimpath.parsetemplate(content,elementid,optetc);}
trimpath.processdomtemplate=function(elementid,context,optflags,optdocument,optetc){
return trimpath.parsedomtemplate(elementid,optdocument,optetc).process(context,optflags);}})();
/*pagination*/
jquery.fn.pagination=function(maxentries,opts){
opts=jquery.extend({
items_per_page:10,
num_display_entries:10,
current_page:0,
num_edge_entries:0,
link_to:"#",
prev_text:"prev",
next_text:"next",
ellipse_text:"...",
prev_show_always:true,
next_show_always:true,
callback:function(){return false;}},opts||{});
return this.each(function(){
function numpages(){
return math.ceil(maxentries/opts.items_per_page);}
function getinterval(){
var ne_half=math.ceil(opts.num_display_entries/2);
var np=numpages();
var upper_limit=np-opts.num_display_entries;
var start=current_page>ne_half?math.max(math.min(current_page-ne_half,upper_limit),0):0;
var end=current_page>ne_half?math.min(current_page ne_half,np):math.min(opts.num_display_entries,np);
return[start,end];}
function pageselected(page_id,evt){
current_page=page_id;
drawlinks();
var continuepropagation=opts.callback(page_id,panel);
if(!continuepropagation){
if(evt.stoppropagation){
evt.stoppropagation();}
else{
evt.cancelbubble=true;}}
return continuepropagation;}
function drawlinks(){
panel.empty();
var interval=getinterval();
var np=numpages();
if(np==1){
$(".pagination").css({display:"none"});}
var getclickhandler=function(page_id){
return function(evt){return pageselected(page_id,evt);}}
var appenditem=function(page_id,appendopts){
page_id=page_id<0?0:(page_id" (appendopts.text) "");}
else{
var lnk=$("")
.bind("click",getclickhandler(page_id))
.attr('href',opts.link_to.replace(/__id__/,page_id));}
if(appendopts.classes){lnk.addclass(appendopts.classes);}
panel.append(lnk);}
if(opts.prev_text&&(current_page>0||opts.prev_show_always)){
appenditem(current_page-1,{text:opts.prev_text,classes:"prev"});}
if(interval[0]>0&&opts.num_edge_entries>0){
var end=math.min(opts.num_edge_entries,interval[0]);
for(var i=0;i" opts.ellipse_text "").appendto(panel);}}
for(var i=interval[0];i0){
if(np-opts.num_edge_entries>interval[1]&&opts.ellipse_text){
jquery("" opts.ellipse_text "").appendto(panel);}
var begin=math.max(np-opts.num_edge_entries,interval[1]);
for(var i=begin;i0){
pageselected(current_page-1);
return true;}
else{
return false;}}
this.nextpage=function(){
if(current_page�ƽ�ʒ��";var d1=data[i]["b"],d2=data[i]["p"];if (d1.length>0){$.each(d1,function(j){html ="";});}else{html ="�����ƽ�ʒ�ƣ�
";}html ="- �����
";if (d2.length>0){$.each(d2,function(k){html ="- ��
";});}else{html ="���������
";}html ="
";$("#jd_sort_" data[i]["id"]).html(html);});}
/*jdthickbox*/
(function($){$.fn.jdposition=function(option){var s=$.extend({mode:null},option||{});switch(s.mode){default:case "center":var ow=$(this).outerwidth(),oh=$(this).outerheight();var w=$.browser.isminw(ow),h=$.browser.isminh(oh);$(this).css({left:(!$.browser.isie6)?(w?0:math.max(($.browser.client().width-ow)/2,0) "px"):(w?0:math.max($.browser.scroll().left ($.browser.client().width-ow)/2,0) "px"),top:(!$.browser.isie6)?(h?0:math.max(($.browser.client().height-oh)/2,0) "px"):(($.browser.scroll().top<=$.browser.client().bodyheight-oh)?(math.max($.browser.scroll().top ($.browser.client().height-oh)/2,0) "px"):($.browser.client().bodyheight-oh) "px")});break;case "auto":break;case "fixed":break;}}})(jquery);(function($){$.fn.jdthickbox=function(option,callback){if(typeof option=="function"){callback=option;option={};};var s=$.extend({type:"text",source:null,width:null,height:null,title:null,_frame:"",_div:"",_box:"",_con:"",_loading:"thickloading",close:false,_close:"",_fastclose:false,_close_val:"��",_titleon:true,_title:"",_autoreposi:false},option||{});var object=(typeof this !="function")?$(this):null;var close=function(){$(".thickframe").add(".thickdiv").hide();$(".thickbox").empty().remove();if(s._autoreposi){$(window).unbind("resize.jdthickbox").unbind("scroll.jdthickbox");};};if(s.close){close();return false;};var reg=function(str){if(str!=""){return str.match(/\w /);}else{return "";};};var init=function(element){if($(".thickframe").length==0||$(".thickdiv").length==0){$("").appendto($(document.body));$("").appendto($(document.body));}else{$(".thickframe").add(".thickdiv").show();};$("").appendto($(document.body));if(s._titleon)inittitle(element);$("").appendto($(".thickbox"));$(".thickcon").addclass(s._loading);reposi();initclose();inputdata(element);if(s._autoreposi){$(window).bind("resize.jdthickbox",reposi).bind("scroll.jdthickbox",reposi);};if(s._fastclose){$(document.body).bind("click.jdthickbox",function(e){e=e?e:window.event;var tag=e.srcelement?e.srcelement:e.target;if(tag.classname=="thickdiv"){$(this).unbind("click.jdthickbox");close();}})}};var inittitle=function(element){s.title=(s.title==null&&element)?element.attr("title"):s.title;$("" s.title "
").appendto($(".thickbox"));s.title=null;};var initclose=function(){if(s._close!=null){$("").appendto($(".thickbox"));$(".thickclose").one("click",function(){close();return false;});}};var inputdata=function(element){s.source=(s.source==null)?element.attr("href"):s.source;switch(s.type){default:case "text":$(".thickcon").html(s.source);$(".thickcon").removeclass(s._loading);break;case "html":$(s.source).clone().appendto($(".thickcon")).show();$(".thickcon").removeclass(s._loading);break;case "image":s._index=(s._index==null)?object.index(element):s._index;$(".thickcon").append("");s.source=null;$(".thickcon").removeclass(s._loading);break;case "ajax":case "json":if(callback){callback(s.source,$(".thickcon"),function(){$(".thickcon").removeclass(s._loading);});};break;case "iframe":$("").appendto($(".thickcon"));$(".thickcon").removeclass(s._loading);break;};};var reposi=function(){var w1=$(".thickcon").outerwidth(),h1=(s._titleon?$(".thicktitle").outerheight():0) $(".thickcon").outerheight();$(".thickbox").css({width:w1 "px",height:h1 "px"});$(".thickbox").jdposition({mode:"center"});if($.browser.isie6){var ow=$(".thickbox").outerwidth(),oh=$(".thickbox").outerheight();var w2=$.browser.isminw(ow),h2=$.browser.isminh(oh);$(".thickframe").add(".thickdiv").css({width:w2?ow:"100%",height:math.max($.browser.client().height,$.browser.client().bodyheight) "px"});}};if(object!=null){object.click(function(){init($(this));return false;});}else{init();}};$.jdthickbox=$.fn.jdthickbox;})(jquery);function jdthickboxclose(){$.jdthickbox({close:true});};
/*jdmarquee*/
(function($){$.fn.jdmarquee=function(option,callback){if(typeof option=="function"){callback=option;option={};};var s=$.extend({deriction:"up",speed:10,auto:false,width:null,height:null,step:1,control:false,_front:null,_back:null,_stop:null,_continue:null,wrapstyle:"",stay:5000,delay:20,dom:"div>ul>li".split(">"),maintimer:null,subtimer:null,tag:false,convert:false,btn:null,disabled:"disabled",pos:{ojbect:null,clone:null}},option||{});var object=this.find(s.dom[1]);var subobject=this.find(s.dom[2]);var clone;if(s.deriction=="up"||s.deriction=="down"){var height=object.eq(0).outerheight();var step=s.step*subobject.eq(0).outerheight();object.css({width:s.width "px",overflow:"hidden"});};if(s.deriction=="left"||s.deriction=="right"){var width=subobject.length*subobject.eq(0).outerwidth();object.css({width:width "px",overflow:"hidden"});var step=s.step*subobject.eq(0).outerwidth();};var init=function(){var wrap="";object.css({position:"absolute",left:0,top:0}).wrap(wrap);s.pos.object=0;clone=object.clone();object.after(clone);switch(s.deriction){default:case "up":object.css({marginleft:0,margintop:0});clone.css({marginleft:0,margintop:height "px"});s.pos.clone=height;break;case "down":object.css({marginleft:0,margintop:0});clone.css({marginleft:0,margintop:-height "px"});s.pos.clone=-height;break;case "left":object.css({margintop:0,marginleft:0});clone.css({margintop:0,marginleft:width "px"});s.pos.clone=width;break;case "right":object.css({margintop:0,marginleft:0});clone.css({margintop:0,marginleft:-width "px"});s.pos.clone=-width;break;};if(s.auto){initmaintimer();object.hover(function(){clear(s.maintimer);},function(){initmaintimer();});clone.hover(function(){clear(s.maintimer);},function(){initmaintimer();});};if(callback){callback();};if(s.control){initcontrols();}};var initmaintimer=function(delay){clear(s.maintimer);s.stay=delay?delay:s.stay;s.maintimer=setinterval(function(){initsubtimer()},s.stay);};var initsubtimer=function(){clear(s.subtimer);s.subtimer=setinterval(function(){roll()},s.delay);};var clear=function(timer){if(timer!=null){clearinterval(timer);}};var discontrol=function(a){if(a){$(s._front).unbind("click");$(s._back).unbind("click");$(s._stop).unbind("click");$(s._continue).unbind("click");}else{initcontrols();}};var initcontrols=function(){if(s._front!=null){$(s._front).click(function(){$(s._front).addclass(s.disabled);discontrol(true);clear(s.maintimer);s.convert=true;s.btn="front";if(!s.auto){s.tag=true;};convert();});};if(s._back!=null){$(s._back).click(function(){$(s._back).addclass(s.disabled);discontrol(true);clear(s.maintimer);s.convert=true;s.btn="back";if(!s.auto){s.tag=true;};convert();});};if(s._stop!=null){$(s._stop).click(function(){clear(s.maintimer);});};if(s._continue!=null){$(s._continue).click(function(){initmaintimer();});}};var convert=function(){if(s.tag&&s.convert){s.convert=false;if(s.btn=="front"){if(s.deriction=="down"){s.deriction="up";};if(s.deriction=="right"){s.deriction="left";}};if(s.btn=="back"){if(s.deriction=="up"){s.deriction="down";};if(s.deriction=="left"){s.deriction="right";}};if(s.auto){initmaintimer();}else{initmaintimer(4*s.delay);}}};var setpos=function(y1,y2,x){if(x){clear(s.subtimer);s.pos.object=y1;s.pos.clone=y2;s.tag=true;}else{s.tag=false;};if(s.tag){if(s.convert){convert();}else{if(!s.auto){clear(s.maintimer);}}};if(s.deriction=="up"||s.deriction=="down"){object.css({margintop:y1 "px"});clone.css({margintop:y2 "px"});};if(s.deriction=="left"||s.deriction=="right"){object.css({marginleft:y1 "px"});clone.css({marginleft:y2 "px"});}};var roll=function(){var y_object=(s.deriction=="up"||s.deriction=="down")?parseint(object.get(0).style.margintop):parseint(object.get(0).style.marginleft);var y_clone=(s.deriction=="up"||s.deriction=="down")?parseint(clone.get(0).style.margintop):parseint(clone.get(0).style.marginleft);var y_add=math.max(math.abs(y_object-s.pos.object),math.abs(y_clone-s.pos.clone));var y_ceil=math.ceil((step-y_add)/s.speed);switch(s.deriction){case "up":if(y_add==step){setpos(y_object,y_clone,true);$(s._front).removeclass(s.disabled);discontrol(false);}else{if(y_object<=-height){y_object=y_clone height;s.pos.object=y_object;};if(y_clone<=-height){y_clone=y_object height;s.pos.clone=y_clone;};setpos((y_object-y_ceil),(y_clone-y_ceil));};break;case "down":if(y_add==step){setpos(y_object,y_clone,true);$(s._back).removeclass(s.disabled);discontrol(false);}else{if(y_object>=height){y_object=y_clone-height;s.pos.object=y_object;};if(y_clone>=height){y_clone=y_object-height;s.pos.clone=y_clone;};setpos((y_object y_ceil),(y_clone y_ceil));};break;case "left":if(y_add==step){setpos(y_object,y_clone,true);$(s._front).removeclass(s.disabled);discontrol(false);}else{if(y_object<=-width){y_object=y_clone width;s.pos.object=y_object;};if(y_clone<=-width){y_clone=y_object width;s.pos.clone=y_clone;};setpos((y_object-y_ceil),(y_clone-y_ceil));};break;case "right":if(y_add==step){setpos(y_object,y_clone,true);$(s._back).removeclass(s.disabled);discontrol(false);}else{if(y_object>=width){y_object=y_clone-width;s.pos.object=y_object;};if(y_clone>=width){y_clone=y_object-width;s.pos.clone=y_clone;};setpos((y_object y_ceil),(y_clone y_ceil));};break;}};if(s.deriction=="up"||s.deriction=="down"){if(height>=s.height&&height>=s.step){init();}};if(s.deriction=="left"||s.deriction=="right"){if(width>=s.width&&width>=s.step){init();}}}})(jquery);
/*search_plug*/
var $global_var={"_text":"","_arr":null,"_count":0,"_num":0,"_select":null,"_out_select":null,"_flag":true};var $callback={"hidden":function(){if($global_var._flag){$dt._div.style.display="none";}},"input_event":function(event){var _e=event||window.event;if($global_var._text==$dt._tbox.value||_e.keycode=="40"||_e.keycode=="38"){$o.move(_e);}else{$global_var._count=0;$global_var._text=$dt._tbox.value;if(_e.keycode=="13"){$callback.hidden();}else{$util.createelement($o.updatelist);}}}};var operator=function(){this.updatelist=function(){if(text.length<1){$dt._div.style.display="none";return;}$global_var._arr=text.split("|");var _t;var _html="";for(var _i=0;_i<$global_var._arr.length-1;_i ){_t=$global_var._arr[_i].split(",");_html =$pro._htmls[0] _t[0] $pro._htmls[1] (_i 1) $pro._htmls[2] _t[1] $pro._htmls[3] _t[0] $pro._htmls[4];}_html =$pro._htmls[5];$dt._div.innerhtml=_html;$dt._div.style.display="block";$dt._div.onmouseover=function(){$global_var._flag=false;};$dt._div.onmouseout=function(){$global_var._flag=true;};$global_var._num=$global_var._arr.length-1;};this.xg=function(){$global_var._arr=text.split("|");var _t;var _html="";for(var _i=0;_i<$global_var._arr.length-1;_i ){if(_i==10){continue;}_t=$global_var._arr[_i].split(",");if(_t[0].length>10||_t[0]==$dt._tbox.value){continue;}_html =$pro._xghtmls[0] _t[0] $pro._xghtmls[1] _t[0] $pro._xghtmls[2];}if(_html.length<1){$util.get("corrsearch").style.display="none";}return _html;};this.move=function(_e){if(_e.keycode=="40"){$global_var._count ;if($global_var._count>$global_var._num){$global_var._count=1;}this.movedown();}if(_e.keycode=="38"){$global_var._count--;if($global_var._count<1){$global_var._count=$global_var._num;}this.moveup();}};this.moveup=function(){$global_var._select=$util.get("d_" $global_var._count);if($global_var._count==$global_var._num){$global_var._out_select=$util.get("d_1");}else{$global_var._out_select=$util.get("d_" ($global_var._count 1));}$global_var._out_select.style.backgroundcolor="";$global_var._select.style.backgroundcolor="#ffff99";$dt._tbox.value=$global_var._arr[$global_var._count-1].split(",")[0];};this.movedown=function(){$global_var._select=$util.get("d_" $global_var._count);if($global_var._count==1){$global_var._out_select=$util.get("d_" $global_var._num);}else{$global_var._out_select=$util.get("d_" ($global_var._count-1));}$global_var._out_select.style.backgroundcolor="";$global_var._select.style.backgroundcolor="#ffff99";$dt._tbox.value=$global_var._arr[$global_var._count-1].split(",")[0];};this.selecttext=function(_d){$global_var._flag=true;$dt._tbox.value=_d.title;$callback.hidden();window.location.href="http://search.360buy.com/search?keyword=" _d.title;};this.over=function(_d){_d.style.backgroundcolor="#ffff99";};this.out=function(_d){_d.style.backgroundcolor="";};};var myutil=function(){this.get=function(_id){return document.getelementbyid(_id);};this.createelement=function(_callback){if($dt._tbox.value.length<1){$dt._div.style.display="none";return;}var flag=function(){if(_callback==null)return;};var _element=null;var _e=this.get($pro._script_id);if(_e){_e.parentnode.removechild(_e);}_element=document.createelement("script");_element.id=$pro._script_id;_element.src=$pro._action ($dt._tbox.value);_element.type="text/javascript";document.getelementsbytagname("head")[0].appendchild(_element);if(document.all){_element.onreadystatechange=function(){var state=_element.readystate;if(state=="loaded"||state=="interactive"||state=="complete"){if(_callback==null){return;}_callback();}};}else{flag();_element.onload=_callback;}};};var properties={"_action":"http://search.360buy.com/ks?keyword=","_input":"key","_div":"tie","_script_id":"_rs","_htmls":new array("լ","��","
",""),"_xghtmls":new array("")};var dt=function(t,d){this._div=d;this._tbox=t;};var $util=new myutil();var $pro=properties;var $o=new operator();var $dt=new dt($util.get($pro._input),$util.get($pro._div));if(null!==$dt._tbox){$dt._tbox.onkeyup=$callback.input_event;$dt._tbox.onblur=$callback.hidden;}
/* friend */
var jdfriendurl='http://club.360buy.com/jdfriend/tuijianservice.aspx';function friendscript(){var param=getparam();if(param!=""){var js=document.createelement('script');js.type='text/javascript';js.src=jdfriendurl '?roid=' math.random() param;js.charset='gbk';document.getelementsbytagname('head')[0].appendchild(js)}}window.onload=function(){friendscript()};function getparam(){var sid="";var type="";var args=new object();var query=location.search.substring(1);var pairs=query.split("&");for(var i=0;i{2}�����ۣ�{4}{5}
";var html1="";$.each(s.pros,function(i){var id=s.pros[i].id,tp=s.pros[i].tp,zt=(s.pros[i].zt==1)?"":"",mc=unescape(s.pros[i].mc),qg=s.pros[i].qg,zk="(" s.pros[i].zk "��)";html1 =html.replace(/\{0\}/g,id).replace("{1}",tp).replace("{2}",zt).replace("{3}",mc).replace("{4}",qg).replace("{5}",zk).replace(/\{6\}/g,purl);});html1 ="
";s.contentid.html(html1);};var run=function(){if(st>0){return;}else{if(et>0){h=math.floor(et/3600);m=math.floor((et-h*3600)/60);s=(et-h*3600)`;s.clockid.html("ʣ��" h "сʱ" m "��" s "��");et--;}else{s.clockid.html("��������");clearinterval(timer);s.limitid.hide();if (s.rankid.length>0){s.rankid.show();}}}};if(st<=0&&et>0){createhtml();if (s.rankid.length>0){s.rankid.hide();}s.limitid.show();};run();timer=setinterval(function(){run()},1000);};var format=function(t){var t=t.split(" ");var a=t[0].split("-");var b=t[1].split(":");return new date(a[0],a[1]-1,a[2],b[0],b[1],b[2]);};$.getjson(dataurl,function(json){if(json){arr=json.data;$.each(arr,function(i){init(arr[i]);})}});}})(jquery);
/* getrecent */
var jdrecent={element:$("#recent ul"),jsurl:"http://www.360buy.com/lishiset.aspx?id=",cookiename:"_recent",list:$.cookie("_recent"),url:location.href,init:function(){var _matchstr=this.url.match(/\/(\d ).html/);var _id=(_matchstr!=null&&_matchstr[0].indexof("html")!=-1)?_matchstr[1]:"";if(!this.list||this.list==null||this.list==""){if(_id==""){return this.getdata(0);}else{this.list=_id;}}else{if(_id==""||this.list.indexof(_id)!=-1){this.list=this.list;}else{if(this.list.split(".").length>=10){this.list=this.list.replace(/.\d $/,"");}this.list=_id "." this.list;}}$.cookie(this.cookiename,this.list,{expires:7,path:"/",domain:"360buy.com",secure:false});this.getdata(this.list);},clear:function(){$.cookie(this.cookiename,"",{expires:7,path:"/",domain:"360buy.com",secure:false});},getdata:function(list){if(list==0){this.element.html("����¼!
");return;}var rec=list.split(".");for(i in rec){if (i==0){this.element.empty()};$.getjsonp(this.jsurl rec[i],this.setdata);}},setdata:function(result){this.element.append("");}};if (jdrecent.element.length==1){jdrecent.init();}$("#clearrec").click(function(){jdrecent.clear();jdrecent.getdata(0);});
/*showtip2*/
var display2=false;
function showtip2(proobj){
var tipdivw=$(proobj).width();
var tipdivh=$(proobj).height();
var tipdiv=$("");
if(display2==false){
tipdiv.append($(proobj));
$(document.body).prepend(tipdiv);
$(proobj).show();
display2=true;
}else{
$("#c02tip").show();
}
$("#c02tip").css({top:parseint(document.documentelement.scrolltop (document.documentelement.clientheight-$("#c02tip").height())/2 ) "px",left:(document.documentelement.clientwidth-$("#c02tip").width())/2 "px"})
$(".tip_close").click(function(){
$("#c02tip").fadeout();
});
timer_5=settimeout("showtime()",1000);
}
function showtime(){
cleartimeout(timer_5);
var overtime=parseint($("#timer_5").html())-1;
if(overtime==0){
$("#c02tip").fadeout();
return;
}
$("#timer_5").html(overtime);
timer_5=settimeout("showtime()",1000)
}
/*coll*/
var homeserviceurl = "http://jd2008.360buy.com/homeservice.aspx?callback=?";
$(".btn-coll").livequery("click",function() {
var current = $(this);
$.login({
complete: function(result) {
if (result != null && result.isauthenticated != null && result.isauthenticated) {
var productid = parseint(current.attr("id").replace("coll", ""));
if (productid > 0) {
$.getjson(homeserviceurl, {
method: "savefavorite",
productid: productid
},
function(result) {
if (result.savefavorite != null) {
/*$.jdthickbox({
type:"text",
source:result.savefavorite.process(result),
width:300,
height:200,
_titleon:false
})*/
//alert(result.savefavorite.process(result))
$("#collect_tip").html(result.savefavorite.process(result));
showtip2("#collect_tip");
}
});
}
}
}
});
});
/*mycart*/
var minicartserviceurl = "http://jd2008.360buy.com/purchase/minicartservice.aspx?tmp=0&callback=?";
refreshminicart();
$(function(){
var object=$("#o-mycart-list");
$("#i-mycart").bind("mouseover",function(){
object.fadein();
}).bind("mouseleave",function(){
object.fadeout();
})
})
function refreshminicart() {
$.login({
automatic: false,
complete: function(result) {
$.getjson(minicartserviceurl, {
method: "getcart"
},
function(result) {
if (result.cart != null && result.getcartnew != null) {
$("#mycart-amount").text(result.cart.num);
$("#mycart-list").html(result.getcartnew.process(result))
}
})
}
})
}
$("#mycart-list .extra a[id][name]").livequery("click",function() {
var cartid = parseint($(this).attr("id"));
var carttype = $(this).attr("name");
if (cartid > 0 && carttype != "") {
$.getjson(minicartserviceurl, {
method: carttype,
cartid: cartid
},
function(result) {
if (result.result) {
refreshminicart()
}
})
}
});
$("#btn-savetocart").livequery("click",function() {
$.login({
complete: function(result) {
if (result.isauthenticated) {
$.getjson(minicartserviceurl, {
method: "savecart"
},
function(result) {
if (result.result) {
alert("�ĵ湺�ﳵ�ɹ�")
}
})
}
}
})
});