Bepress.namespace("jumplist");Bepress.jumplist.getJSONFileName=function(b){var c=null,a,d=b;a=d.one(".pagination_jumplist_filename_base").get("innerHTML");if(a!=null){c=a+"_jumplist.json";}return c;};Bepress.jumplist.handleSuccess=function(j,q,n){var o,m,b,e,l,h={},s=null,r,a="",d,f,c=n.yuiObj,p="Bepress.jumplist.handleSuccess";m=c.all(".pagination_jumplist_picker");b=c.all(".pagination_jumplist_label"),o=c.JSON.parse(q.responseText);if(o.length===0){for(var k=0;k<m.length;k++){m[k].one("option").set("value","").set("label","- none -");}return;}d=new Date();m.each(function(x,w,t){var u,v,g;for(g=0;g<o.length;g++){v=o[g];u=c.Node.getDOMNode(x).options;u[g]=new Option(v.label,v.url);}});for(f=0;f<o.length;f++){if(!h[o[f].url]){h[o[f].url]=o[f].label;}}e=window.location.toString();l=h[e];if(typeof l!=="undefined"&&l){for(f=0;f<m.size();f++){if(m.item(f).all("option:contains("+l+")").size()>0){s=l;break;}}}if(s==null){s=b.item(0).get("innerHTML");}for(f=0;f<m.size();f++){r=m.item(f).one("option:contains("+s+")");if(r){r.set("selected",true);}}m.on("change",function(i){var t=c.Node.getDOMNode(i.currentTarget).options,g=i.currentTarget.get("selectedIndex");document.location=t[g].value;});};Bepress.jumplist.handleFailure=function(c,b,d){var a,e=d.yuiObj;a=e.all(".pagination_jumplist_picker");a.each(function(i,h,f){var g;i.one("option").set("text","- Error -");g=e.Node.create('<em style="color: red">Unable to build JumpList: '+b.statusText+"</em>");i.get("parentNode").insertBefore(g,i.next());});};Bepress.jumplist.handleStart=function(b,c){var a=c.yuiObj.all(".pagination_jumplist_picker"),d=c.yuiObj;a.each(function(g,f,e){g.one("option").set("text","... Loading ...");});};Bepress.jumplist.handleComplete=function(b,a,c){var d=c.yuiObj;};Bepress.jumplist.handleEnd=function(a,b){var c=b.yuiObj;};yuiObj.use("node","io-base","json-parse","selector-css3",function(a){a.on("domready",function(){var b=a.all(".pagination_jumplist_picker"),g=a.one(".pagination_jumplist_filename_base"),f=a.all(".pagination_jumplist_label"),e,h=[],c=Bepress.jumplist;if(b.size()==0){h.push("Unable to find any jumplist select boxes.");}if(f.size()==0){h.push("Unable to find any jumplist labels.");}if(!g){h.push("Unable to find any jumplist select boxes.");}if(h.length<=0){e=Bepress.jumplist.getJSONFileName(a);a.io(e,{on:{start:c.handleStart,complete:c.handleComplete,success:c.handleSuccess,failure:c.handleFailure,end:c.handleEnd},arguments:{yuiObj:a}});}else{for(var d=0;d<h.length;d++){}}});});