|
|
|
/*
|
|
|
|
* jQuery JavaScript Library v1.3.2
|
|
|
|
* http://jquery.com/
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009 John Resig
|
|
|
|
* Dual licensed under the MIT and GPL licenses.
|
|
|
|
* http://docs.jquery.com/License
|
|
|
|
*
|
|
|
|
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
|
|
|
|
* Revision: 6246
|
|
|
|
*/
|
|
|
|
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)
|
|
|
|
/*
|
|
|
|
* Sizzle CSS Selector Engine - v0.9.3
|
|
|
|
* Copyright 2009, The Dojo Foundation
|
|
|
|
* Released under the MIT, BSD, and GPL Licenses.
|
|
|
|
* More information: http://sizzlejs.com/
|
|
|
|
*/
|
|
|
|
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
ColorBox v1.2.5 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
|
|
|
|
(c) 2009 Jack Moore : colorpowered.com
|
|
|
|
*/
|
|
|
|
(function(w){var t,j,I,B,s,G,a,d,L,f,v,b,C,F,H,o,h,A,i,g,J,K,c,n,z,e,x,k,D,p,r;function u(){z.css({position:"absolute",width:H.width(),height:H.height(),top:H.scrollTop(),left:H.scrollLeft()})}function m(){var M;function N(){F.text(I.slideshowStop).bind("cbox_complete",function(){C=setTimeout(w.fn.colorbox.next,I.slideshowSpeed)}).bind("cbox_load",function(){clearTimeout(C)}).one("click",function(){M();w(this).removeClass("hover")});J.removeClass("cboxSlideshow_off").addClass("cboxSlideshow_on")}M=function(){clearTimeout(C);F.text(I.slideshowStart).unbind("cbox_complete cbox_load").one("click",function(){N();C=setTimeout(w.fn.colorbox.next,I.slideshowSpeed);w(this).removeClass("hover")});J.removeClass("cboxSlideshow_on").addClass("cboxSlideshow_off")};if(I.slideshow&&b.length>1){if(I.slideshowAuto){N()}else{M()}}}function l(){if(w("#cboxInlineTemp").length>0){x.children().insertBefore("#cboxInlineTemp");w("#cboxInlineTemp").remove()}}function E(M){if(M.keyCode==37){M.preventDefault();A.click()}else{if(M.keyCode==39){M.preventDefault();h.click()}}}function y(M,N){N=N=="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return(typeof M=="string")?(M.match(/%/)?(N/100)*parseInt(M,10):parseInt(M,10)):M}function q(M){return I.photo?true:M.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(.*))?$/i)}w(function(){w.fn.colorbox.init()});w.fn.colorbox=function(N,M){if(this.length){this.each(function(){var O=w(this).data("colorbox")?w.extend({},w(this).data("colorbox"),N):w.extend({},w.fn.colorbox.settings,N);O.title=O.title?O.title:this.title;O.href=O.href?O.href:this.href;O.rel=O.rel?O.rel:this.rel;w(this).data("colorbox",O).addClass("cboxelement")})}else{w(this).data("colorbox",w.extend({},w.fn.colorbox.settings,N))}w(this).unbind("click.colorbox").bind("click.colorbox",function(O){j=this;I=w(this).data("colorbox");this.blur();B=M?M:false;if(I.rel&&I.rel!="nofollow"){b=w(".cboxelement").filter(function(){return(w(this).data("colorbox").rel==I.rel)});v=b.index(this)}else{b=w(this);v=0}if(!t){w.event.trigger("cbox_open");o.html(I.close);z.css({opacity:I.opacity}).show();t=true;w.fn.colorbox.position(y(I.initialWidth,"x"),y(I.initialHeight,"y"),0);if(w.browser.msie&&w.browser.version<7){H.bind("resize scroll",u)}}m();w.fn.colorbox.load();if(I.overlayClose===true){z.css({cursor:"pointer"}).click(w.fn.colorbox.close)}O.preventDefault()});if(N&&N.open){w(this).triggerHandler("click.colorbox")}return this};w.fn.colorbox.element=function(){return j};w.fn.colorbox.init=function(){H=w(window);w("body").prepend(z=w('<div id="cboxOverlay" />').hide(),J=w('<div id="colorbox" />'));K=w('<div id="cboxWrapper" />').appendTo(J).append(w("<div/>").append(w('<div id="cboxTopLeft"/>'),k=w('<div id="cboxTopCenter"/>'),w('<div id="cboxTopRight"/>')),D=w('<div id="cboxMiddleLeft" />'),e=w('<div id="cboxContent" />'),p=w('<div id="cboxMiddleRight" />'),w("<div/>").append(w('<div id="cboxBottomLeft"/>'),r=w('<div id="cboxBottomCenter"/>'),w('<div id="cboxBottomRight"/>')));K.find("[id]").css({"float":"left"});e.append(x=w('<div id="cboxLoadedContent" style="width:0; height:0;" />'),c=w('<div id="cboxLoadingOverlay" />'),n=w('<div id="cboxLoadingGraphic" />'),g=w('<div id="cboxTitle" />'),i=w('<div id="cboxCurrent" />'),F=w('<div id="cboxSlideshow" />'),h=w('<div id="cboxNext" />').click(w.fn.colorbox.next),A=w('<div id="cboxPrevious" />').click(w.fn.colorbox.prev),o=w('<div id="cboxClose" />').click(w.fn.colorbox.close));e.children().addClass("hover").mouseover(function(){w(this).addClass("hover")}).mouseout(function(){w(this).removeClass("hover")}).hide();L=k.height()+r.height()+e.outerHeight(true)-e.height();f=D.width()+p.width()+e.outerWidth(true)-e.width();d=x.outerHeight(true);a=x.outerWidth(true);J.css({"padding-bottom":L,"padding-right":f}).hide();w().bind("keydown.cbox_close",function(M){if(M.keyCode==27){M.preventDefault();o.click()}});e.children().removeClass("hover")};w.fn.colorbox.next=function(){v=v<b.length-1?v+1:0;w.fn.colorbox.load()};w.fn.colorbox.prev=function(){v=v>0?v-1:b.length-1;w.fn.colorbox.load()};w.f
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* jQuery Cookie plugin 1.0
|
|
|
|
*
|
|
|
|
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
|
|
|
* Dual licensed under the MIT and GPL licenses:
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('o.5=B(9,b,2){6(h b!=\'E\'){2=2||{};6(b===n){b=\'\';2.3=-1}4 3=\'\';6(2.3&&(h 2.3==\'j\'||2.3.k)){4 7;6(h 2.3==\'j\'){7=w u();7.t(7.q()+(2.3*r*l*l*x))}m{7=2.3}3=\'; 3=\'+7.k()}4 8=2.8?\'; 8=\'+(2.8):\'\';4 a=2.a?\'; a=\'+(2.a):\'\';4 c=2.c?\'; c\':\'\';d.5=[9,\'=\',C(b),3,8,a,c].y(\'\')}m{4 e=n;6(d.5&&d.5!=\'\'){4 g=d.5.A(\';\');s(4 i=0;i<g.f;i++){4 5=o.z(g[i]);6(5.p(0,9.f+1)==(9+\'=\')){e=D(5.p(9.f+1));v}}}F e}};',42,42,'||options|expires|var|cookie|if|date|path|name|domain|value|secure|document|cookieValue|length|cookies|typeof||number|toUTCString|60|else|null|jQuery|substring|getTime|24|for|setTime|Date|break|new|1000|join|trim|split|function|encodeURIComponent|decodeURIComponent|undefined|return'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* jQuery hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
|
|
|
|
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
|
|
|
*
|
|
|
|
* @param f onMouseOver function || An object with configuration options
|
|
|
|
* @param g onMouseOut function || Nothing (use configuration options object)
|
|
|
|
* @author Brian Cherne <brian@cherne.net>
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(6($){$.J.K=6(f,g){8 5={y:7,l:I,H:0};5=$.u(5,g?{v:f,z:g}:f);8 d,b,k,i;8 h=6(3){d=3.G;b=3.B};8 m=6(3,2){2.4=o(2.4);9((w.x(k-d)+w.x(i-b))<5.y){$(2).D("n",h);2.j=1;c 5.v.t(2,[3])}E{k=d;i=b;2.4=r(6(){m(3,2)},5.l)}};8 C=6(3,2){2.4=o(2.4);2.j=0;c 5.z.t(2,[3])};8 q=6(e){8 p=(e.A=="s"?e.N:e.U)||e.T;R(p&&p!=a){S{p=p.O}P(e){p=a}}9(p==a){c Q}8 3=F.u({},e);8 2=a;9(2.4){2.4=o(2.4)}9(e.A=="s"){k=3.G;i=3.B;$(2).M("n",h);9(2.j!=1){2.4=r(6(){m(3,2)},5.l)}}E{$(2).D("n",h);9(2.j==1){2.4=r(6(){C(3,2)},5.H)}}};c a.s(q).L(q)}})(F);',57,57,'||ob|ev|hoverIntent_t|cfg|function||var|if|this|cY|return|cX||||track|pY|hoverIntent_s|pX|interval|compare|mousemove|clearTimeout||handleHover|setTimeout|mouseover|apply|extend|over|Math|abs|sensitivity|out|type|pageY|delay|unbind|else|jQuery|pageX|timeout|100|fn|hoverIntent|mouseout|bind|fromElement|parentNode|catch|false|while|try|relatedTarget|toElement'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
/*! jQuery LiveQuery Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
|
|
|
|
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
|
|
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
|
|
|
*
|
|
|
|
* Version: 1.0.3
|
|
|
|
* Requires jQuery 1.1.3+
|
|
|
|
* Docs: http://docs.jquery.com/Plugins/livequery
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(5($){$.T($.4,{3:5(6,4,8){g t=2,q;7($.N(6))8=4,4=6,6=C;$.h($.3.j,5(i,9){7(t.d==9.d&&t.f==9.f&&6==9.6&&(!4||4.$e==9.4.$e)&&(!8||8.$e==9.8.$e))k(q=9)&&z});q=q||U $.3(2.d,2.f,6,4,8);q.A=z;q.v();k 2},W:5(6,4,8){g t=2;7($.N(6))8=4,4=6,6=C;$.h($.3.j,5(i,9){7(t.d==9.d&&t.f==9.f&&(!6||6==9.6)&&(!4||4.$e==9.4.$e)&&(!8||8.$e==9.8.$e)&&!2.A)$.3.B(9.b)});k 2}});$.3=5(d,f,6,4,8){2.d=d;2.f=f||O;2.6=6;2.4=4;2.8=8;2.u=[];2.A=z;2.b=$.3.j.I(2)-1;4.$e=4.$e||$.3.H++;7(8)8.$e=8.$e||$.3.H++;k 2};$.3.p={B:5(){g 9=2;7(2.6)2.u.12(2.6,2.4);G 7(2.8)2.u.h(5(i,m){9.8.x(m)});2.u=[];2.A=P},v:5(){7(2.A)k;g 9=2;g o=2.u,w=$(2.d,2.f),J=w.Z(o);2.u=w;7(2.6){J.10(2.6,2.4);7(o.s>0)$.h(o,5(i,m){7($.D(m,w)<0)$.Y.Q(m,9.6,9.4)})}G{J.h(5(){9.4.x(2)});7(2.8&&o.s>0)$.h(o,5(i,m){7($.D(m,w)<0)9.8.x(m)})}}};$.T($.3,{H:0,j:[],l:[],F:z,E:11,S:5(){7($.3.F&&$.3.l.s){g s=$.3.l.s;X(s--)$.3.j[$.3.l.V()].v()}},16:5(){$.3.F=z},R:5(){$.3.F=P;$.3.v()},L:5(){$.h(K,5(i,n){7(!$.4[n])k;g M=$.4[n];$.4[n]=5(){g r=M.x(2,K);$.3.v();k r}})},v:5(b){7(b!=C){7($.D(b,$.3.l)<0)$.3.l.I(b)}G $.h($.3.j,5(b){7($.D(b,$.3.l)<0)$.3.l.I(b)});7($.3.E)1f($.3.E);$.3.E=13($.3.S,1h)},B:5(b){7(b!=C)$.3.j[b].B();G $.h($.3.j,5(b){$.3.j[b].B()})}});$.3.L(\'1j\',\'1k\',\'1g\',\'1d\',\'17\',\'1e\',\'15\',\'14\',\'18\',\'19\',\'1c\',\'Q\');$(5(){$.3.R()});g y=$.p.y;$.p.y=5(a,c){g r=y.x(2,K);7(a&&a.d)r.f=a.f,r.d=a.d;7(1b a==\'1a\')r.f=c||O,r.d=a;k r};$.p.y.p=$.p})(1i);',62,83,'||this|livequery|fn|function|type|if|fn2|query||id||selector|lqguid|context|var|each||queries|return|queue|el||oEls|prototype|||length|self|elements|run|els|apply|init|false|stopped|stop|undefined|inArray|timeout|running|else|guid|push|nEls|arguments|registerPlugin|old|isFunction|document|true|remove|play|checkQueue|extend|new|shift|expire|while|event|not|bind|null|unbind|setTimeout|addClass|removeAttr|pause|wrap|removeClass|toggleClass|string|typeof|empty|before|attr|clearTimeout|after|20|jQuery|append|prepend'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pagination jQuery plugin -- with modifications by pairofdimes, where noted
|
|
|
|
*
|
|
|
|
* @author Gabriel Birke (birke *at* d-scribe *dot* de)
|
|
|
|
* @version 1.2
|
|
|
|
*/
|
|
|
|
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() {
|
|
|
|
/**
|
|
|
|
* Calculate the maximum number of pages
|
|
|
|
*/
|
|
|
|
function numPages() {
|
|
|
|
return Math.ceil(maxentries/opts.items_per_page);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Calculate start and end point of pagination links depending on
|
|
|
|
* current_page and num_display_entries.
|
|
|
|
* @return {Array}
|
|
|
|
*/
|
|
|
|
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];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the event handling function for the pagination links.
|
|
|
|
* @param {int} page_id The new page number
|
|
|
|
*/
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This function inserts the pagination links into the container element
|
|
|
|
*/
|
|
|
|
function drawLinks() {
|
|
|
|
panel.empty();
|
|
|
|
var interval = getInterval();
|
|
|
|
var np = numPages();
|
|
|
|
// This helper function returns a handler function that calls pageSelected with the right page_id
|
|
|
|
var getClickHandler = function(page_id) {
|
|
|
|
return function(evt){ return pageSelected(page_id,evt); }
|
|
|
|
}
|
|
|
|
// Helper function for generating a single link (or a span tag if it's the current page)
|
|
|
|
var appendItem = function(page_id, appendopts){
|
|
|
|
page_id = page_id<0?0:(page_id<np?page_id:np-1); // Normalize page id to sane value
|
|
|
|
appendopts = jQuery.extend({text:page_id+1, classes:""}, appendopts||{});
|
|
|
|
if(page_id == current_page){
|
|
|
|
var lnk = jQuery("<span class='current'>"+(appendopts.text)+"</span>");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
var lnk = jQuery("<a>"+(appendopts.text)+"</a>")
|
|
|
|
.bind("click", getClickHandler(page_id))
|
|
|
|
; //.attr('href', opts.link_to.replace(/__id__/,page_id)); // modification by pairofdimes
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
if(appendopts.classes){lnk.addClass(appendopts.classes);}
|
|
|
|
panel.append(lnk);
|
|
|
|
}
|
|
|
|
// Generate "Previous"-Link
|
|
|
|
if(opts.prev_text && (current_page > 0 || opts.prev_show_always)){
|
|
|
|
appendItem(current_page-1,{text:opts.prev_text, classes:"prev"});
|
|
|
|
}
|
|
|
|
// Generate starting points
|
|
|
|
if (interval[0] > 0 && opts.num_edge_entries > 0)
|
|
|
|
{
|
|
|
|
var end = Math.min(opts.num_edge_entries, interval[0]);
|
|
|
|
for(var i=0; i<end; i++) {
|
|
|
|
appendItem(i);
|
|
|
|
}
|
|
|
|
if(opts.num_edge_entries < interval[0] && opts.ellipse_text)
|
|
|
|
{
|
|
|
|
jQuery("<span>"+opts.ellipse_text+"</span>").appendTo(panel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Generate interval links
|
|
|
|
for(var i=interval[0]; i<interval[1]; i++) {
|
|
|
|
appendItem(i);
|
|
|
|
}
|
|
|
|
// Generate ending points
|
|
|
|
if (interval[1] < np && opts.num_edge_entries > 0)
|
|
|
|
{
|
|
|
|
if(np-opts.num_edge_entries > interval[1]&& opts.ellipse_text)
|
|
|
|
{
|
|
|
|
jQuery("<span>"+opts.ellipse_text+"</span>").appendTo(panel);
|
|
|
|
}
|
|
|
|
var begin = Math.max(np-opts.num_edge_entries, interval[1]);
|
|
|
|
for(var i=begin; i<np; i++) {
|
|
|
|
appendItem(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// Generate "Next"-Link
|
|
|
|
if(opts.next_text && (current_page < np-1 || opts.next_show_always)){
|
|
|
|
appendItem(current_page+1,{text:opts.next_text, classes:"next"});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Extract current_page from options
|
|
|
|
var current_page = opts.current_page;
|
|
|
|
// Create a sane value for maxentries and items_per_page
|
|
|
|
maxentries = (!maxentries || maxentries < 0)?1:maxentries;
|
|
|
|
opts.items_per_page = (!opts.items_per_page || opts.items_per_page < 0)?1:opts.items_per_page;
|
|
|
|
// Store DOM element for easy access from all inner functions
|
|
|
|
var panel = jQuery(this);
|
|
|
|
// Attach control functions to the DOM element
|
|
|
|
this.selectPage = function(page_id){ pageSelected(page_id);}
|
|
|
|
this.prevPage = function(){
|
|
|
|
if (current_page > 0) {
|
|
|
|
pageSelected(current_page - 1);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.nextPage = function(){
|
|
|
|
if(current_page < numPages()-1) {
|
|
|
|
pageSelected(current_page+1);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// When all initialisation is done, draw the links
|
|
|
|
drawLinks();
|
|
|
|
// call callback function
|
|
|
|
//opts.callback(current_page, this); // modification by pairofdimes
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* jQuery-Plugin "preloadCssImages"
|
|
|
|
* by Scott Jehl, scott@filamentgroup.com
|
|
|
|
* http://www.filamentgroup.com
|
|
|
|
* reference article: http://www.filamentgroup.com/lab/update_automatically_preload_images_from_css_with_jquery/
|
|
|
|
* demo page: http://www.filamentgroup.com/examples/preloadImages/index_v2.php
|
|
|
|
*
|
|
|
|
* Copyright (c) 2008 Filament Group, Inc
|
|
|
|
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
|
|
|
|
*
|
|
|
|
* Version: 5.0, 10.31.2008
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}(';f.1f=p(b){b=f.1e({D:12,s:12,S:1d,10:2},b);3 1b=[],a=0,4=[],d,I;p n(){1c(I);6(4&&4.8&&4[a]){a++;6(b.D){3 R=(4[a])?\'1a 14: <c>\'+4[a].r(\'/\')[4[a].r(\'/\').8-1]:\'14 13\';f(b.D).1g(\'<c o="1h">\'+a+\'</c> 1l <c o="1k">\'+4.8+\'</c> a (<c o="1j">\'+(a/4.8*1i).Z(0)+\'%</c>) <c o="1m">\'+R+\'</c></c>\')}6(b.s){3 C=f(b.s).19();f(b.s).18(\'16-17\',-(C-(C*a/4.8).Z(0))+\'1q 1A%\')}A()}}p A(){6(4&&4.8&&4[a]){3 t=1D 1E();t.1C=4[a];6(!t.13){f(t).1F(\'1H 1J 1I\',n)}J{n()}I=T(n,b.S)}}p y(7,q){3 K=V,m=[],z=[],e;3 5=7.8;w(5--){3 B=\'\';6(q&&q[5]){e=q[5]}J{3 P=(7[5].u)?7[5].u:\'1G.1B.u\';3 L=P.r(\'/\');L.Y();e=L.11(\'/\');6(e){e+=\'/\'}}6(7[5].E||7[5].N){d=(7[5].E)?7[5].E:7[5].N;3 j=d.8;w(j--){6(d[j].x&&d[j].x.Q){3 M=d[j].x.Q;6(M.1y().1r(\'1n\')!=-1){B+=M}}J 6(d[j].15){m.v(d[j].15);K=1z}}}3 h=B.G(/[^\\("]+\\.(1p|1o|1s|1t)/g);6(h){3 i=h.8;w(i--){3 F=(h[i].U(0)==\'/\'||h[i].G(\'://\'))?h[i]:e+h[i];6(f.1x(F,4)==-1){4.v(F)}}}6(!K&&7[5].l&&7[5].l.8){1w(3 k=0,X=7[5].l.8;k<X;k++){3 9=7[5].l[k].u;9=9.r(\'/\');9.Y();9=9.11(\'/\');6(9){9+=\'/\'}3 W=(9.U(0)==\'/\'||9.G(\'://\'))?9:e+9;z.v(W);m.v(7[5].l[k])}}}6(m.8){y(m,z);O V}3 H=b.10;w(H--){T(A,H)}}y(1v.1u);O 4};',62,108,'|||var|imgUrls|sheetIndex|if|sheets|length|iHref|loaded|settings|span|thisSheetRules|baseURL|jQuery||tmpImage||ruleIndex|iImport|imports|imported|onImgComplete|class|function|urls|split|statusBarEl|img|href|push|while|style|parseCSS|importedSrc|loadImgs|cssPile|barWidth|statusTextEl|cssRules|imgSrc|match|downloads|errorTimer|else|w3cImport|baseURLarr|text|rules|return|csshref|cssText|nowloading|errorDelay|setTimeout|charAt|false|iSrc|importLen|pop|toFixed|simultaneousCacheLoading|join|null|complete|Loading|styleSheet|background|position|css|width|Now|allImgs|clearTimeout|999|extend|preloadCssImages|html|numLoaded|100|percentLoaded|numTotal|of|currentImg|url|jpg|gif|px|indexOf|jpeg|png|styleSheets|document|for|inArray|toLowerCase|true|50|location|src|new|Image|bind|window|error|onreadystatechange|load'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Superfish v1.4.8 - jQuery menu widget
|
|
|
|
* Copyright (c) 2008 Joel Birch
|
|
|
|
*
|
|
|
|
* Dual licensed under the MIT and GPL licenses:
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
*
|
|
|
|
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}(';(3($){$.h.F=3(b){8 2=$.h.F,c=2.c,$S=$([\'<Q 1t="\',c.O,\'"> s;</Q>\'].f(\'\')),t=3(){8 $$=$(4),9=z($$);X(9.y);$$.10().1u().q()},I=3(){8 $$=$(4),9=z($$),o=2.b;X(9.y);9.y=1v(3(){o.x=($.1y($$[0],o.$k)>-1);$$.q();p(o.$k.G&&$$.J([\'d.\',o.g].f(\'\')).G<1){t.e(o.$k)}},o.1g)},z=3($9){8 9=$9.J([\'5.\',c.C,\':N\'].f(\'\'))[0];2.b=2.o[9.W];l 9},R=3($a){$a.u(c.M).1q($S.1i())};l 4.j(3(){8 s=4.W=2.o.G;8 o=$.12({},2.Y,b);o.$k=$(\'d.\'+o.B,4).1l(0,o.K).j(3(){$(4).u([o.g,c.D].f(\' \')).1n(\'d:T(5)\').Z(o.B)});2.o[s]=2.b=o;$(\'d:T(5)\',4)[($.h.P&&!o.13)?\'P\':\'1o\'](t,I).j(3(){p(o.1d)R($(\'>a:N-1M\',4))}).m(\'.\'+c.D).q();8 $a=$(\'a\',4);$a.j(3(i){8 $d=$a.U(i).J(\'d\');$a.U(i).1N(3(){t.e($d)}).1J(3(){I.e($d)})});o.14.e(4)}).j(3(){E=[c.C];p(2.b.A&&!($.n.V&&$.n.L<7))E.1D(c.r);$(4).u(E.f(\' \'))})};8 2=$.h.F;2.o=[];2.b={};2.H=3(){8 o=2.b;p($.n.V&&$.n.L>6&&o.A&&o.v.1f!=1G)4.1z(2.c.r+\'-15\')};2.c={D:\'2-1I\',C:\'2-1E-1B\',M:\'2-1O-5\',O:\'2-1p-1m\',r:\'2-1k\'};2.Y={g:\'1w\',B:\'1r\',K:1,1g:1A,v:{1f:\'1F\'},17:\'1H\',1d:w,A:w,13:11,14:3(){},19:3(){},18:3(){},1e:3(){}};$.h.12({q:3(){8 o=2.b,m=(o.x===w)?o.$k:\'\';o.x=11;8 $5=$([\'d.\',o.g].f(\'\'),4).1C(4).m(m).Z(o.g).16(\'>5\').1K().1c(\'1a\',\'1b\');o.1e.e($5);l 4},10:3(){8 o=2.b,1L=2.c.r+\'-15\',$5=4.u(o.g).16(\'>5:1b\').1c(\'1a\',\'1j\');2.H.e($5);o.19.e($5);$5.1x(o.v,o.17,3(){2.H.e($5);o.18.e($5)});l 4}})})(1h);',62,113,'||sf|function|this|ul|||var|menu||op||li|call|join|hoverClass|fn||each|path|return|not|browser||if|hideSuperfishUl|shadowClass||over|addClass|animation|true|retainPath|sfTimer|getMenu|dropShadows|pathClass|menuClass|bcClass|menuClasses|superfish|length|IE7fix|out|parents|pathLevels|version|anchorClass|first|arrowClass|hoverIntent|span|addArrow|arrow|has|eq|msie|serial|clearTimeout|defaults|removeClass|showSuperfishUl|false|extend|disableHI|onInit|off|find|speed|onShow|onBeforeShow|visibility|hidden|css|autoArrows|onHide|opacity|delay|jQuery|clone|visible|shadow|slice|indicator|filter|hover|sub|append|overideThisToUse|187|class|siblings|setTimeout|sfHover|animate|inArray|toggleClass|800|enabled|add|push|js|show|undefined|normal|breadcrumb|blur|hide|sh|child|focus|with'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TableDnD plug-in for JQuery, allows you to drag and drop table rows
|
|
|
|
* You can set up various options to control how the system will work
|
|
|
|
* Copyright (c) Denis Howlett <denish@isocra.com>
|
|
|
|
* Licensed like jQuery, see http://docs.jquery.com/License.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('1.3={j:f,h:f,G:f,F:0,1x:a(1p){8.z(a(){8.k=1.1A({1m:f,1r:f,v:"1C",12:f,t:f,w:5,15:/[^\\-]*$/,1N:f,N:f},1p||{});1.3.O(8)});1(g).1s(\'V\',1.3.V).1s(\'Z\',1.3.Z);9 8},O:a(c){4 7=c.k;6(c.k.N){4 1u=1("1J."+c.k.N,c);1u.z(a(){1(8).1l(a(b){1.3.h=8.Y;1.3.j=c;1.3.G=1.3.Q(8,b);6(7.t){7.t(c,8)}9 L})})}m{4 l=1("1H",c);l.z(a(){4 d=1(8);6(!d.1t("1K")){d.1l(a(b){6(b.P.1F=="1E"){1.3.h=8;1.3.j=c;1.3.G=1.3.Q(8,b);6(7.t){7.t(c,8)}9 L}}).11("1M","1L")}})}},1D:a(){8.z(a(){6(8.k){1.3.O(8)}})},U:a(b){6(b.1k||b.1h){9{x:b.1k,y:b.1h}}9{x:b.1z+g.o.1B-g.o.1w,y:b.1y+g.o.S-g.o.1G}},Q:a(P,b){b=b||q.23;4 X=8.C(P);4 p=8.U(b);9{x:p.x-X.x,y:p.y-X.y}},C:a(e){4 K=0;4 I=0;6(e.E==0){e=e.M}21(e.1f){K+=e.1e;I+=e.1g;e=e.1f}K+=e.1e;I+=e.1g;9{x:K,y:I}},V:a(b){6(1.3.h==f){9}4 D=1(1.3.h);4 7=1.3.j.k;4 p=1.3.U(b);4 y=p.y-1.3.G.y;4 u=q.27;6(g.26){6(18 g.17!=\'1b\'&&g.17!=\'24\'){u=g.T.S}m 6(18 g.o!=\'1b\'){u=g.o.S}}6(p.y-u<7.w){q.1v(0,-7.w)}m{4 1j=q.1a?q.1a:g.T.W?g.T.W:g.o.W;6(1j-(p.y-u)<7.w){q.1v(0,7.w)}}6(y!=1.3.F){4 R=y>1.3.F;1.3.F=y;6(7.v){D.1X(7.v)}m{D.11(7.1m)}4 r=1.3.1o(D,y);6(r){6(R&&1.3.h!=r){1.3.h.Y.1q(1.3.h,r.1W)}m 6(!R&&1.3.h!=r){1.3.h.Y.1q(1.3.h,r)}}}9 L},1o:a(16,y){4 l=1.3.j.l;1d(4 i=0;i<l.10;i++){4 d=l[i];4 B=8.C(d).y;4 H=1n(d.E)/2;6(d.E==0){B=8.C(d.M).y;H=1n(d.M.E)/2}6((y>B-H)&&(y<(B+H))){6(d==16){9 f}4 7=1.3.j.k;6(7.1i){6(7.1i(16,d)){9 d}m{9 f}}m{4 13=1(d).1t("13");6(!13){9 d}m{9 f}}9 d}}9 f},Z:a(e){6(1.3.j&&1.3.h){4 A=1.3.h;4 7=1.3.j.k;6(7.v){1(A).1V(7.v)}m{1(A).11(7.1r)}1.3.h=f;6(7.12){7.12(1.3.j,A)}1.3.j=f}},1Y:a(){6(1.3.j){9 1.3.14(1.3.j)}m{9"1U: 1T 1P J 19, 1Q 1R 20 19 1S J 1Z 28 c 25 1O d"}},14:a(c){4 n="";4 1c=c.J;4 l=c.l;1d(4 i=0;i<l.10;i++){6(n.10>0)n+="&";4 s=l[i].J;6(s&&s&&c.k&&c.k.15){s=s.22(c.k.15)[0]}n+=1c+\'[]=\'+s}9 n},1I:a(){4 n="";8.z(a(){n+=1.3.14(8)});9 n}}',62,133,'|jQuery||tableDnD|var||if|config|this|return|function|ev|table|row||null|document|dragObject||currentTable|tableDnDConfig|rows|else|result|body|mousePos|window|currentRow|rowId|onDragStart|yOffset|onDragClass|scrollAmount|||each|droppedRow|rowY|getPosition|dragObj|offsetHeight|oldY|mouseOffset|rowHeight|top|id|left|false|firstChild|dragHandle|makeDraggable|target|getMouseOffset|movingDown|scrollTop|documentElement|mouseCoords|mousemove|clientHeight|docPos|parentNode|mouseup|length|css|onDrop|nodrop|serializeTable|serializeRegexp|draggedRow|compatMode|typeof|set|innerHeight|undefined|tableId|for|offsetLeft|offsetParent|offsetTop|pageY|onAllowDrop|windowHeight|pageX|mousedown|onDragStyle|parseInt|findDropTargetRow|options|insertBefore|onDropStyle|bind|hasClass|cells|scrollBy|clientLeft|build|clientY|clientX|extend|scrollLeft|tDnD_whileDrag|updateTables|TD|tagName|clientTop|tr|serializeTables|td|nodrag|move|cursor|serializeParamName|every|Table|you|need|an|No|Error|removeClass|nextSibling|addClass|serialize|on|to|while|match|event|BackCompat|and|all|pageYOffset|your'.split('|'),0,{}))
|
|
|
|
jQuery.fn.extend({ tableDnD: jQuery.tableDnD.build, tableDnDUpdate: jQuery.tableDnD.updateTables, tableDnDSerialize: jQuery.tableDnD.serializeTables });
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* jQuery Tooltip plugin 1.3
|
|
|
|
*
|
|
|
|
* http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
|
|
|
|
* http://docs.jquery.com/Plugins/Tooltip
|
|
|
|
*
|
|
|
|
* Copyright (c) 2006 - 2008 Jörn Zaefferer
|
|
|
|
*
|
|
|
|
* $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
|
|
|
|
*
|
|
|
|
* Dual licensed under the MIT and GPL licenses:
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
*/
|
|
|
|
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}(';(8($){j e={},9,m,B,A=$.2u.2g&&/29\\s(5\\.5|6\\.)/.1M(1H.2t),M=12;$.k={w:12,1h:{Z:25,r:12,1d:19,X:"",G:15,E:15,16:"k"},2s:8(){$.k.w=!$.k.w}};$.N.1v({k:8(a){a=$.1v({},$.k.1h,a);1q(a);g 2.F(8(){$.1j(2,"k",a);2.11=e.3.n("1g");2.13=2.m;$(2).24("m");2.22=""}).21(1e).1U(q).1S(q)},H:A?8(){g 2.F(8(){j b=$(2).n(\'Y\');4(b.1J(/^o\\(["\']?(.*\\.1I)["\']?\\)$/i)){b=1F.$1;$(2).n({\'Y\':\'1D\',\'1B\':"2r:2q.2m.2l(2j=19, 2i=2h, 1p=\'"+b+"\')"}).F(8(){j a=$(2).n(\'1o\');4(a!=\'2f\'&&a!=\'1u\')$(2).n(\'1o\',\'1u\')})}})}:8(){g 2},1l:A?8(){g 2.F(8(){$(2).n({\'1B\':\'\',Y:\'\'})})}:8(){g 2},1x:8(){g 2.F(8(){$(2)[$(2).D()?"l":"q"]()})},o:8(){g 2.1k(\'28\')||2.1k(\'1p\')}});8 1q(a){4(e.3)g;e.3=$(\'<t 16="\'+a.16+\'"><10></10><t 1i="f"></t><t 1i="o"></t></t>\').27(K.f).q();4($.N.L)e.3.L();e.m=$(\'10\',e.3);e.f=$(\'t.f\',e.3);e.o=$(\'t.o\',e.3)}8 7(a){g $.1j(a,"k")}8 1f(a){4(7(2).Z)B=26(l,7(2).Z);p l();M=!!7(2).M;$(K.f).23(\'W\',u);u(a)}8 1e(){4($.k.w||2==9||(!2.13&&!7(2).U))g;9=2;m=2.13;4(7(2).U){e.m.q();j a=7(2).U.1Z(2);4(a.1Y||a.1V){e.f.1c().T(a)}p{e.f.D(a)}e.f.l()}p 4(7(2).18){j b=m.1T(7(2).18);e.m.D(b.1R()).l();e.f.1c();1Q(j i=0,R;(R=b[i]);i++){4(i>0)e.f.T("<1P/>");e.f.T(R)}e.f.1x()}p{e.m.D(m).l();e.f.q()}4(7(2).1d&&$(2).o())e.o.D($(2).o().1O(\'1N://\',\'\')).l();p e.o.q();e.3.P(7(2).X);4(7(2).H)e.3.H();1f.1L(2,1K)}8 l(){B=S;4((!A||!$.N.L)&&7(9).r){4(e.3.I(":17"))e.3.Q().l().O(7(9).r,9.11);p e.3.I(\':1a\')?e.3.O(7(9).r,9.11):e.3.1G(7(9).r)}p{e.3.l()}u()}8 u(c){4($.k.w)g;4(c&&c.1W.1X=="1E"){g}4(!M&&e.3.I(":1a")){$(K.f).1b(\'W\',u)}4(9==S){$(K.f).1b(\'W\',u);g}e.3.V("z-14").V("z-1A");j b=e.3[0].1z;j a=e.3[0].1y;4(c){b=c.2o+7(9).E;a=c.2n+7(9).G;j d=\'1w\';4(7(9).2k){d=$(C).1r()-b;b=\'1w\'}e.3.n({E:b,14:d,G:a})}j v=z(),h=e.3[0];4(v.x+v.1s<h.1z+h.1n){b-=h.1n+20+7(9).E;e.3.n({E:b+\'1C\'}).P("z-14")}4(v.y+v.1t<h.1y+h.1m){a-=h.1m+20+7(9).G;e.3.n({G:a+\'1C\'}).P("z-1A")}}8 z(){g{x:$(C).2e(),y:$(C).2d(),1s:$(C).1r(),1t:$(C).2p()}}8 q(a){4($.k.w)g;4(B)2c(B);9=S;j b=7(2);8 J(){e.3.V(b.X).q().n("1g","")}4((!A||!$.N.L)&&b.r){4(e.3.I(\':17\'))e.3.Q().O(b.r,0,J);p e.3.Q().2b(b.r,J)}p J();4(7(2).H)e.3.1l()}})(2a);',62,155,'||this|parent|if|||settings|function|current||||||body|return|||var|tooltip|show|title|css|url|else|hide|fade||div|update||blocked|||viewport|IE|tID|window|html|left|each|top|fixPNG|is|complete|document|bgiframe|track|fn|fadeTo|addClass|stop|part|null|append|bodyHandler|removeClass|mousemove|extraClass|backgroundImage|delay|h3|tOpacity|false|tooltipText|right||id|animated|showBody|true|visible|unbind|empty|showURL|save|handle|opacity|defaults|class|data|attr|unfixPNG|offsetHeight|offsetWidth|position|src|createHelper|width|cx|cy|relative|extend|auto|hideWhenEmpty|offsetTop|offsetLeft|bottom|filter|px|none|OPTION|RegExp|fadeIn|navigator|png|match|arguments|apply|test|http|replace|br|for|shift|click|split|mouseout|jquery|target|tagName|nodeType|call||mouseover|alt|bind|removeAttr|200|setTimeout|appendTo|href|MSIE|jQuery|fadeOut|clearTimeout|scrollTop|scrollLeft|absolute|msie|crop|sizingMethod|enabled|positionLeft|AlphaImageLoader|Microsoft|pageY|pageX|height|DXImageTransform|progid|block|userAgent|browser'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* AJAX IFRAME METHOD (AIM)
|
|
|
|
* http://www.webtoolkit.info/
|
|
|
|
*
|
|
|
|
* Copyright (c) 2006-2008 www.webtoolkit.info
|
|
|
|
* Licensed under Gnu Public Licence V3 or higher.
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
**/
|
|
|
|
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('6={h:0(c){1 n=\'f\'+k.z(k.w()*u);1 d=3.y(\'C\');d.e=\'<o B="D:t" x="g:s" 7="\'+n+\'" 8="\'+n+\'" v="6.p(\\\'\'+n+\'\\\')"></o>\';3.j.A(d);1 i=3.m(n);2(c&&a(c.4)==\'0\'){i.4=c.4}5 n},l:0(f,8){f.J(\'K\',8)},I:0(f,c){6.l(f,6.h(c));2(c&&a(c.b)==\'0\'){5 c.b()}9{5 E}},p:0(7){1 i=3.m(7);2(i.q){1 d=i.q}9 2(i.r){1 d=i.r.3}9{1 d=G.L[7].3}2(d.F.H=="g:s"){5}2(a(i.4)==\'0\'){i.4(d.j.e)}}}',48,48,'function|var|if|document|onComplete|return|AIM|id|name|else|typeof|onStart|||innerHTML||about|frame||body|Math|form|getElementById||iframe|loaded|contentDocument|contentWindow|blank|none|99999|onload|random|src|createElement|floor|appendChild|style|DIV|display|true|location|window|href|submit|setAttribute|target|frames'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************
|
|
|
|
// Plush main code as follows, by pairofdimes (see LICENSE-CC.txt)
|
|
|
|
|
|
|
|
|
|
|
|
jQuery(function($) { // safely invoke $ selector
|
|
|
|
|
|
|
|
$.plush = { // object definition
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
Plush defaults
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
refreshRate: $.cookie('refreshRate') ? $.cookie('refreshRate') : 30, // refresh rate in seconds
|
|
|
|
queuePerPage: $.cookie('queuePerPage') ? $.cookie('queuePerPage') : 10, // pagination - nzbs per page
|
|
|
|
histPerPage: $.cookie('histPerPage') ? $.cookie('histPerPage') : 10, // pagination - nzbs per page
|
|
|
|
confirmDeleteQueue: $.cookie('confirmDeleteQueue') == 0 ? false : true, // confirm queue nzb removal
|
|
|
|
confirmDeleteHistory: $.cookie('confirmDeleteHistory') == 0 ? false : true, // confirm history nzb removal
|
|
|
|
blockRefresh: $.cookie('blockRefresh') == 0 ? false : true, // prevent refreshing when hovering queue
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
$.plush.refreshQueue() -- fetch HTML data from queue.tmpl, make updates throughout interface
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
refreshQueue : function(page) {
|
|
|
|
|
|
|
|
// Skip refresh if cursor hovers queue, to prevent annoyance
|
|
|
|
if ($.plush.blockRefresh && $.plush.skipRefresh) {
|
|
|
|
$('#manual_refresh').addClass('refresh_skipped');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deal with pagination for start/limit
|
|
|
|
if (typeof( page ) == 'undefined' || page == "ok\n" || page < 0 )
|
|
|
|
page = $.plush.queuecurpage;
|
|
|
|
else if (page != $.plush.queuecurpage)
|
|
|
|
$.plush.queuecurpage = page;
|
|
|
|
|
|
|
|
// Refresh state notification
|
|
|
|
$('#manual_refresh').removeClass('refresh_skipped').addClass('refreshing');
|
|
|
|
|
|
|
|
// Fetch updated content from queue.tmpl
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "queue/",
|
|
|
|
data: 'start='+( page * $.plush.queuePerPage )+'&limit='+$.plush.queuePerPage,
|
|
|
|
success: function(result){
|
|
|
|
|
|
|
|
// Replace queue contents with queue.tmpl -- this file also sets several stat vars via javascript
|
|
|
|
$('#queue').html(result);
|
|
|
|
|
|
|
|
// Refresh state notification
|
|
|
|
$('#manual_refresh').removeClass('refreshing');
|
|
|
|
|
|
|
|
// Tooltips
|
|
|
|
$('#time-left').attr('title',$.plush.eta);
|
|
|
|
$('#time-left, #queueTable tr .download-title a').tooltip({
|
|
|
|
extraClass: "tooltip",
|
|
|
|
showURL: false,
|
|
|
|
track: true
|
|
|
|
});
|
|
|
|
|
|
|
|
// Speed limit selector
|
|
|
|
if ($("#maxSpeed-option").val() != $.plush.speedlimit && !$.plush.focusedOnSpeedChanger)
|
|
|
|
$("#maxSpeed-option").val($.plush.speedlimit);
|
|
|
|
|
|
|
|
// Completion script selector
|
|
|
|
if ($("#onQueueFinish-option").val() != $.plush.finishaction)
|
|
|
|
$("#onQueueFinish-option").val($.plush.finishaction);
|
|
|
|
|
|
|
|
// Pause/resume button state
|
|
|
|
if ( $.plush.paused && $('#pause_resume').attr('class') != 'tip q_menu_pause q_menu_paused')
|
|
|
|
$('#pause_resume').attr('class','tip q_menu_pause q_menu_paused');
|
|
|
|
else if ( !$.plush.paused && $('#pause_resume').attr('class') != 'tip q_menu_pause q_menu_unpaused')
|
|
|
|
$('#pause_resume').attr('class','tip q_menu_pause q_menu_unpaused');
|
|
|
|
|
|
|
|
// Pause interval
|
|
|
|
($.plush.pause_int == "0") ? $('#pause_int').html("") : $('#pause_int').html($.plush.pause_int);
|
|
|
|
|
|
|
|
// ETA/speed stats at top of queue
|
|
|
|
if ($.plush.queuenoofslots < 1)
|
|
|
|
$('#stats_speed, #stats_eta').html('—');
|
|
|
|
else if ($.plush.kbpersec < 1 && $.plush.paused)
|
|
|
|
$('#stats_speed, #stats_eta').html('—');
|
|
|
|
else {
|
|
|
|
$('#stats_speed').html($.plush.speed+"B/s");
|
|
|
|
$('#stats_eta').html($.plush.timeleft);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update bottom right stats
|
|
|
|
$('#queue_stats').html($.plush.queuestats);
|
|
|
|
|
|
|
|
// Update warnings count/latest warning text in main menu
|
|
|
|
$('#have_warnings').html('('+$.plush.have_warnings+')');
|
|
|
|
($.plush.have_warnings > 0) ? $('#last_warning').html($.plush.last_warning) : $('#last_warning').html('');
|
|
|
|
|
|
|
|
// *** don't forget the live() & livequery() methods defined in $.plush.initEvents() ***
|
|
|
|
},
|
|
|
|
error: function() {
|
|
|
|
// Failed refresh notification
|
|
|
|
$('#manual_refresh').addClass('refresh_skipped');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}, // end $.plush.refreshQueue()
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
$.plush.refreshHistory() -- fetch HTML data from history.tmpl
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
refreshHistory : function(page) {
|
|
|
|
|
|
|
|
if ($.plush.modalOpen) // Skip refreshing when modal is open, which destroys colorbox rel prev/next
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Deal with pagination for start/limit
|
|
|
|
if (typeof( page ) == 'undefined')
|
|
|
|
page = $.plush.histcurpage;
|
|
|
|
else if (page != $.plush.histcurpage)
|
|
|
|
$.plush.histcurpage = page;
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "history/",
|
|
|
|
data: 'start='+( page * $.plush.histPerPage )+'&limit='+$.plush.histPerPage,
|
|
|
|
success: function(result){
|
|
|
|
|
|
|
|
// Replace history contents with history.tmpl -- this file sets a couple stat vars via javascript
|
|
|
|
$('#history').html(result);
|
|
|
|
|
|
|
|
// Update bottom right stats
|
|
|
|
$('#history_stats').html($.plush.histstats);
|
|
|
|
|
|
|
|
// Tooltips for verbose notices
|
|
|
|
$('#history .verbose div').tooltip({
|
|
|
|
extraClass: "tooltip",
|
|
|
|
track: true
|
|
|
|
});
|
|
|
|
|
|
|
|
// *** don't forget the live() & livequery() methods defined in $.plush.initEvents() ***
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}, // end $.plush.refreshHistory()
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
$.plush.refresh()
|
|
|
|
triggers refreshQueue & refreshHistory
|
|
|
|
then loops (calls itself) after $.plush.refreshRate seconds
|
|
|
|
accepts 'force' boolean, used by manual refresh event (in event of refresh otherwise disabled)
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
refresh : function(force) {
|
|
|
|
|
|
|
|
// Clear timeout in case multiple refreshes are triggered
|
|
|
|
clearTimeout($.plush.timeout);
|
|
|
|
|
|
|
|
if (force || $.plush.refreshRate > 0) {
|
|
|
|
|
|
|
|
$.plush.refreshQueue();
|
|
|
|
$.plush.refreshHistory();
|
|
|
|
|
|
|
|
// Loop
|
|
|
|
$.plush.timeout = setTimeout("$.plush.refresh()", $.plush.refreshRate*1000);
|
|
|
|
|
|
|
|
} else if (!$.plush.histstats) {
|
|
|
|
// Initial load if refresh rate saved as "Disabled"
|
|
|
|
$.plush.refreshQueue();
|
|
|
|
$.plush.refreshHistory();
|
|
|
|
}
|
|
|
|
|
|
|
|
}, // end $.plush.refresh()
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
$.plush.initEvents() -- initialize all the UI events
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
initEvents : function() {
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
"Add NZB" Methods
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
// Fetch NZB by URL/Newzbin Report ID
|
|
|
|
$('#addID').click(function(){ // also works when hitting enter because of <form>
|
|
|
|
if ($('#addID_input').val()!='enter URL') {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=addid&name="+$("#addID_input").val()+"&pp="+$("#addID_pp").val()+"&script="+$("#addID_script").val()+"&cat="+$("#addID_cat").val()+"&priority="+$("#addID_priority").val()+'&apikey='+$.plush.apikey,
|
|
|
|
success: $.plush.refreshQueue
|
|
|
|
});
|
|
|
|
$("#addID_input").val('');
|
|
|
|
}
|
|
|
|
return false; // aborts <form> submission
|
|
|
|
});
|
|
|
|
$('#addID_input').val('enter URL')
|
|
|
|
.focus( function(){
|
|
|
|
if ($(this).val()=="enter URL")
|
|
|
|
$(this).val('');
|
|
|
|
}).blur( function(){
|
|
|
|
if (!$(this).val())
|
|
|
|
$(this).val('enter URL');
|
|
|
|
});
|
|
|
|
|
|
|
|
// Upload NZB ajax with webtoolkit
|
|
|
|
$('#uploadNZBFile').change( function(){ $('#uploadNZBForm').submit(); });
|
|
|
|
$('#uploadNZBForm').submit( function(){
|
|
|
|
return AIM.submit(this, {'onComplete': $.plush.refreshQueue})
|
|
|
|
});
|
|
|
|
|
|
|
|
// Fetch Newzbin Bookmarks
|
|
|
|
$('#fetch_newzbin_bookmarks').click(function(){
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=newzbin&name=get_bookmarks&apikey="+$.plush.apikey,
|
|
|
|
success: function(result){
|
|
|
|
$.plush.refreshQueue();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
Main Menu Methods
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
// Main menu
|
|
|
|
$("#main_menu ul.sf-menu").superfish(); // uses jQuery hoverIntent
|
|
|
|
|
|
|
|
// Main menu positioning
|
|
|
|
$('#main_menu .sf-menu, #main_menu .sf-navbar').attr('style','margin-left:'+ ($(window).width()/2-250) +'px;');
|
|
|
|
$(window).bind('resize', function() {
|
|
|
|
$('#main_menu .sf-menu, #main_menu .sf-navbar').attr('style','margin-left:'+ ($(window).width()/2-250) +'px;');
|
|
|
|
});
|
|
|
|
if ($.browser.mozilla) $('#main_menu .sf-navbar input').attr('style','margin: -4px 0px;');
|
|
|
|
else if ($.browser.safari) $('#main_menu .sf-navbar input').attr('style','margin: -1px 0px 0px -1px;');
|
|
|
|
|
|
|
|
|
|
|
|
// Max Speed main menu input -- don't change value on refresh when focused
|
|
|
|
$("#maxSpeed-option").focus(function(){ $.plush.focusedOnSpeedChanger = true; })
|
|
|
|
.blur(function(){ $.plush.focusedOnSpeedChanger = false; });
|
|
|
|
$("#maxSpeed-option").change( function() { // works with hitting enter
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=config&name=set_speedlimit&value="+$("#maxSpeed-option").val()+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// Refresh rate
|
|
|
|
$("#refreshRate-option").val($.plush.refreshRate).change( function() {
|
|
|
|
$.plush.refreshRate = $("#refreshRate-option").val();
|
|
|
|
$.cookie('refreshRate', $.plush.refreshRate, { expires: 365 });
|
|
|
|
$.plush.refresh();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Confirm Queue Deletions toggle
|
|
|
|
$("#confirmDeleteQueue").attr('checked', $.plush.confirmDeleteQueue ).change( function() {
|
|
|
|
$.plush.confirmDeleteQueue = $("#confirmDeleteQueue").attr('checked');
|
|
|
|
$.cookie('confirmDeleteQueue', $.plush.confirmDeleteQueue ? 1 : 0, { expires: 365 });
|
|
|
|
});
|
|
|
|
|
|
|
|
// Confirm History Deletions toggle
|
|
|
|
$("#confirmDeleteHistory").attr('checked', $.plush.confirmDeleteHistory ).change( function() {
|
|
|
|
$.plush.confirmDeleteHistory = $("#confirmDeleteHistory").attr('checked');
|
|
|
|
$.cookie('confirmDeleteHistory', $.plush.confirmDeleteHistory ? 1 : 0, { expires: 365 });
|
|
|
|
});
|
|
|
|
|
|
|
|
// Block Refreshes on Hover toggle
|
|
|
|
$("#blockRefresh").attr('checked', $.plush.blockRefresh ).change( function() {
|
|
|
|
$.plush.blockRefresh = $("#blockRefresh").attr('checked');
|
|
|
|
$.cookie('blockRefresh', $.plush.blockRefresh ? 1 : 0, { expires: 365 });
|
|
|
|
});
|
|
|
|
|
|
|
|
// Sabnzbd shutdown
|
|
|
|
$('#shutdown_sabnzbd').click( function(){
|
|
|
|
if(confirm($('#shutdown_sabnzbd').attr('rel')))
|
|
|
|
window.location='shutdown?session='+$.plush.apikey;
|
|
|
|
});
|
|
|
|
|
|
|
|
// Queue "Upon Completion" script
|
|
|
|
$("#onQueueFinish-option").change( function() {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=change_complete_action&value="+$("#onQueueFinish-option").val()+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// Queue purge
|
|
|
|
$('#queue_purge').click(function(event) {
|
|
|
|
if(confirm($('#queue_purge').attr('rel'))){
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=delete&value=all&apikey="+$.plush.apikey,
|
|
|
|
success: $.plush.refreshQueue
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Queue sort (6-in-1)
|
|
|
|
$('#queue_sort_list .queue_sort').click(function(event) {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=sort&sort="+$(event.target).attr('rel')+'&apikey='+$.plush.apikey,
|
|
|
|
success: $.plush.refreshQueue
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// Queue pause intervals
|
|
|
|
$('#set_pause_list .set_pause').click(function(event) {
|
|
|
|
var minutes = $(event.target).attr('rel');
|
|
|
|
if (minutes == "custom")
|
|
|
|
minutes = prompt($(event.target).attr('title'));
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=config&name=set_pause&value="+minutes+'&apikey='+$.plush.apikey,
|
|
|
|
success: $.plush.refreshQueue
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// Manual refresh
|
|
|
|
$('#manual_refresh_wrapper').click(function(){
|
|
|
|
$.plush.refresh(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
Queue Events
|
|
|
|
|
|
|
|
several of these methods will remain instantiated
|
|
|
|
even when the contents of the queue change,
|
|
|
|
through use of live() & livequery()
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
// Skip queue refresh on mouseover
|
|
|
|
$('#queueTable').live("mouseover", function(){ $.plush.skipRefresh=true; });
|
|
|
|
$('#queueTable').live("mouseout", function(){ $.plush.skipRefresh=false; });
|
|
|
|
$('#box_fatbottom_queue').live("mouseover mouseout", function(){ $.plush.skipRefresh=false; });
|
|
|
|
|
|
|
|
// NZB pause/resume individual toggle
|
|
|
|
$('#queueTable .download-grippie').live('click',function(event){
|
|
|
|
if ($(this).attr('class') == "download-grippie download-queued") {
|
|
|
|
$(this).toggleClass('download-queued').toggleClass('download-paused');
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=pause&value="+$(this).parent().attr('id')+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
} else if ($(this).attr('class') == "download-grippie download-active") {
|
|
|
|
$(this).toggleClass('download-active').toggleClass('download-paused');
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=pause&value="+$(this).parent().attr('id')+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
$(this).toggleClass('download-queued').toggleClass('download-paused');
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=resume&value="+$(this).parent().attr('id')+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// NZB individual deletion
|
|
|
|
$('#queue .queue_delete').live('click', function(event) {
|
|
|
|
if (!$.plush.confirmDeleteQueue || confirm($.plush.Tconfirmation)){
|
|
|
|
delid = $(event.target).parent().parent().attr('id');
|
|
|
|
$('#'+delid).fadeOut('fast');
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=queue&name=delete&value="+delid+'&apikey='+$.plush.apikey,
|
|
|
|
success: function(){
|
|
|
|
if ( $("#queueTable tr:visible").length - 1 < 1 ) { // don't leave stranded on non-page
|
|
|
|
$.plush.skipRefresh = false;
|
|
|
|
$.plush.queueforcerepagination = true;
|
|
|
|
$.plush.refreshQueue($.plush.queuecurpage-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Pagination per-page selection
|
|
|
|
$("#queue-pagination-perpage").change(function(event){
|
|
|
|
$.plush.queuecurpage = Math.floor($.plush.queuecurpage * $.plush.queuePerPage / $(event.target).val() );
|
|
|
|
$.plush.queuePerPage = $(event.target).val();
|
|
|
|
$.cookie('queuePerPage', $.plush.queuePerPage, { expires: 365 });
|
|
|
|
$.plush.queueforcerepagination = true;
|
|
|
|
$.plush.refreshQueue();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Set queue per-page preference
|
|
|
|
$("#queue-pagination-perpage").val($.plush.queuePerPage);
|
|
|
|
$.plush.queuecurpage = 0; // default 1st page
|
|
|
|
|
|
|
|
// Sustained binding of events for elements added to DOM
|
|
|
|
// Same idea as jQuery live(), but use jQuery livequery() plugin for functions/events not supported by live()
|
|
|
|
$('#queueTable').livequery(function() {
|
|
|
|
|
|
|
|
// Build pagination only when needed
|
|
|
|
if ( ( $.plush.queueforcerepagination && $.plush.queuenoofslots > $.plush.queuePerPage) || $.plush.queuenoofslots > $.plush.queuePerPage &&
|
|
|
|
Math.ceil($.plush.queueprevslots/$.plush.queuePerPage) !=
|
|
|
|
Math.ceil($.plush.queuenoofslots/$.plush.queuePerPage) ) {
|
|
|
|
|
|
|
|
$.plush.queueforcerepagination = false;
|
|
|
|
if ( $("#queueTable tr:visible").length - 1 < 1 ) // don't leave stranded on non-page
|
|
|
|
$.plush.queuecurpage--;
|
|
|
|
$("#queue-pagination").pagination( $.plush.queuenoofslots , {
|
|
|
|
current_page: $.plush.queuecurpage,
|
|
|
|
items_per_page: $.plush.queuePerPage,
|
|
|
|
num_display_entries: 8,
|
|
|
|
num_edge_entries: 1,
|
|
|
|
prev_text: "« "+$.plush.Tprev, // translation
|
|
|
|
next_text: $.plush.Tnext+" »", // translation
|
|
|
|
callback: $.plush.refreshQueue
|
|
|
|
});
|
|
|
|
} else if ($.plush.queuenoofslots <= $.plush.queuePerPage) {
|
|
|
|
$("#queue-pagination").html(''); // remove pages if history empty
|
|
|
|
}
|
|
|
|
$.plush.queueprevslots = $.plush.queuenoofslots; // for the next refresh
|
|
|
|
|
|
|
|
// Drag and drop sorting
|
|
|
|
$("#queueTable").tableDnD({
|
|
|
|
onDrop: function(table, row) {
|
|
|
|
if (table.tBodies[0].rows.length < 2)
|
|
|
|
return false;
|
|
|
|
// determine which position the repositioned row is at now
|
|
|
|
for ( var i=0; i < table.tBodies[0].rows.length; i++ ) {
|
|
|
|
if (table.tBodies[0].rows[i].id == row.id) {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=switch&value="+row.id+"&value2="+(i + $.plush.queuecurpage * $.plush.queuePerPage)+'&apikey='+$.plush.apikey,
|
|
|
|
success: function(result){
|
|
|
|
// change priority of the nzb if necessary (priority is returned by API)
|
|
|
|
var newPriority = $.trim(result.substring(result.length-2));
|
|
|
|
if (newPriority != $('#'+row.id+' .options .proc_priority').val())
|
|
|
|
$('#'+row.id+' .options .proc_priority').val(newPriority);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// NZB change priority
|
|
|
|
$('#queueTable .options .proc_priority').change(function(){
|
|
|
|
var nzbid = $(this).parent().parent().attr('id');
|
|
|
|
var oldPos = $('#'+nzbid)[0].rowIndex + $.plush.queuecurpage * $.plush.queuePerPage;
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: 'mode=queue&name=priority&value='+nzbid+'&value2='+$(this).val()+'&apikey='+$.plush.apikey,
|
|
|
|
success: function(newPos){
|
|
|
|
// reposition the nzb if necessary (new position is returned by the API)
|
|
|
|
if (parseInt(newPos) < $.plush.queuecurpage * $.plush.queuePerPage
|
|
|
|
|| ($.plush.queuecurpage + 1) * $.plush.queuePerPage < parseInt(newPos)) {
|
|
|
|
$.plush.skipRefresh = false;
|
|
|
|
$.plush.refreshQueue();
|
|
|
|
} else if (oldPos < newPos)
|
|
|
|
$('#'+nzbid).insertAfter($('#queueTable tr:eq('+ (newPos - $.plush.queuecurpage * $.plush.queuePerPage) +')'));
|
|
|
|
else if (oldPos > newPos)
|
|
|
|
$('#'+nzbid).insertBefore($('#queueTable tr:eq('+ (newPos - $.plush.queuecurpage * $.plush.queuePerPage) +')'));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// 3-in-1 change nzb [category + processing + script]
|
|
|
|
$('#queueTable .options .change_cat, #queueTable .options .change_opts, #queueTable .options .change_script').change(function(){
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode="+$(this).attr('class')+"&value="+$(this).parent().parent().attr('id')+'&value2='+$(this).val()+'&apikey='+$.plush.apikey
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}); // end livequery
|
|
|
|
|
|
|
|
// Pause/resume toggle (queue)
|
|
|
|
$('#pause_resume').click(function(event) {
|
|
|
|
if ($(event.target).attr('class') == 'tip q_menu_pause q_menu_paused')
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=resume&apikey="+$.plush.apikey
|
|
|
|
});
|
|
|
|
else
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=pause&apikey="+$.plush.apikey
|
|
|
|
});
|
|
|
|
if ($('#pause_resume').attr('class') == 'tip q_menu_pause q_menu_paused') {
|
|
|
|
$('#pause_resume').attr('class','tip q_menu_pause q_menu_unpaused');
|
|
|
|
$('#pause_int').html("");
|
|
|
|
} else
|
|
|
|
$('#pause_resume').attr('class','tip q_menu_pause q_menu_paused');
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
History Methods
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
// NZB individual removal
|
|
|
|
$('#history .queue_delete').live('click', function(event) {
|
|
|
|
if (!$.plush.confirmDeleteHistory || confirm($.plush.Tconfirmation)){
|
|
|
|
delid = $(event.target).parent().parent().attr('id');
|
|
|
|
$('#'+delid).fadeOut('fast');
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: "mode=history&name=delete&value="+delid+'&apikey='+$.plush.apikey,
|
|
|
|
success: function(){
|
|
|
|
if ( $("#historyTable tr:visible").length - 1 < 1 ) { // don't leave stranded on non-page
|
|
|
|
$.plush.histforcerepagination = true;
|
|
|
|
$.plush.refreshHistory($.plush.histcurpage-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Pagination per-page selection
|
|
|
|
$("#history-pagination-perpage").change(function(event){
|
|
|
|
$.plush.histcurpage = Math.floor($.plush.histcurpage * $.plush.histPerPage / $(event.target).val() );
|
|
|
|
$.plush.histPerPage = $(event.target).val();
|
|
|
|
$.cookie('histPerPage', $.plush.histPerPage, { expires: 365 });
|
|
|
|
$.plush.histforcerepagination = true;
|
|
|
|
$.plush.refreshHistory();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Set history per-page preference
|
|
|
|
$("#history-pagination-perpage").val($.plush.histPerPage);
|
|
|
|
$.plush.histcurpage = 0; // default 1st page
|
|
|
|
|
|
|
|
// Sustained binding of events for elements added to DOM
|
|
|
|
$('#historyTable').livequery(function() {
|
|
|
|
|
|
|
|
// Build pagination only when needed
|
|
|
|
if ( ( $.plush.histforcerepagination && $.plush.histnoofslots > $.plush.histPerPage) || $.plush.histnoofslots > $.plush.histPerPage &&
|
|
|
|
Math.ceil($.plush.histprevslots/$.plush.histPerPage) !=
|
|
|
|
Math.ceil($.plush.histnoofslots/$.plush.histPerPage) ) {
|
|
|
|
|
|
|
|
$.plush.histforcerepagination = false;
|
|
|
|
if ( $("#historyTable tr:visible").length - 1 < 1 ) // don't leave stranded on non-page
|
|
|
|
$.plush.histcurpage--;
|
|
|
|
$("#history-pagination").pagination( $.plush.histnoofslots , {
|
|
|
|
current_page: $.plush.histcurpage,
|
|
|
|
items_per_page: $.plush.histPerPage,
|
|
|
|
num_display_entries: 8,
|
|
|
|
num_edge_entries: 1,
|
|
|
|
prev_text: "« "+$.plush.Tprev, // translation
|
|
|
|
next_text: $.plush.Tnext+" »", // translation
|
|
|
|
callback: $.plush.refreshHistory
|
|
|
|
});
|
|
|
|
} else if ($.plush.histnoofslots <= $.plush.histPerPage) {
|
|
|
|
$("#history-pagination").html(''); // remove pages if history empty
|
|
|
|
}
|
|
|
|
$.plush.histprevslots = $.plush.histnoofslots; // for the next refresh
|
|
|
|
|
|
|
|
// modal for viewing script logs
|
|
|
|
$('#historyTable .verbose .modal').colorbox({ width:"80%", height:"80%", initialWidth:"80%", initialHeight:"80%", speed:0, opacity:0.7 });
|
|
|
|
|
|
|
|
}); // end livequery
|
|
|
|
|
|
|
|
// colorbox event bindings - so history doesn't refresh when viewing modal (thereby breaking rel prev/next)
|
|
|
|
$().bind('cbox_open', function(){ $.plush.modalOpen=true; });
|
|
|
|
$().bind('cbox_closed', function(){ $.plush.modalOpen=false; });
|
|
|
|
$().bind('cbox_complete', function(){
|
|
|
|
$('#cboxLoadedContent input').hide(); // hide back button
|
|
|
|
$('#cboxLoadedContent h3').append('<br/><br/>'); // add spacing to header
|
|
|
|
});
|
|
|
|
|
|
|
|
// Purge
|
|
|
|
$('#hist_purge').click(function(event) {
|
|
|
|
if (confirm($('#hist_purge').attr('rel'))) {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "tapi",
|
|
|
|
data: 'mode=history&name=delete&value=all&apikey='+$.plush.apikey,
|
|
|
|
success: $.plush.refreshHistory
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************
|
|
|
|
*********************************************
|
|
|
|
|
|
|
|
Misc Methods
|
|
|
|
|
|
|
|
*********************************************
|
|
|
|
********************************************/
|
|
|
|
|
|
|
|
// Static tooltips
|
|
|
|
$('#explain-blockRefresh, #uploadTip, #fetch_newzbin_bookmarks, #pause_resume, #hist_purge').tooltip({
|
|
|
|
extraClass: "tooltip",
|
|
|
|
track: true
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} // end $.plush.initEvents()
|
|
|
|
|
|
|
|
}; // end $.plush object
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Once the DOM is ready, run this
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
|
|
|
|
$.preloadCssImages(); // jQuery plugin that preloads all images from all stylesheets
|
|
|
|
$.plush.initEvents(); // Initialize Plush UI
|
|
|
|
$.plush.refresh(); // Initiate Plush refresh cycle
|
|
|
|
|
|
|
|
});
|