;(function($){$.tinysort={ id: "TinySort",version: "1.0.5",copyright: "Copyright (c) 2008-2011 Ron Valstar",uri: "http://tinysort.sjeiti.com/",defaults: { order: "asc",attr: "",place: "start",returns: false,useVal: false}};$.fn.extend({tinysort:function(_find,_settings){if(_find&&typeof(_find)!="string"){_settings=_find;_find=null;}var oSettings=$.extend({},$.tinysort.defaults, _settings);var oElements={};this.each(function(i){var mElm=(!_find||_find=="")?$(this):$(this).find(_find);var sSort=oSettings.order=="rand"?""+Math.random():(oSettings.attr==""?(oSettings.useVal?mElm.val():mElm.text()):mElm.attr(oSettings.attr));var mParent=$(this).parent();if(!oElements[mParent]){oElements[mParent]={s:[],n:[]};}if(mElm.length>0){oElements[mParent].s.push({s:sSort,e:$(this),n:i});}else{oElements[mParent].n.push({e:$(this),n:i});}});for (var sParent in oElements){var oParent=oElements[sParent];oParent.s.sort(function zeSort(a,b){var x=a.s.toLowerCase?a.s.toLowerCase():a.s;var y=b.s.toLowerCase?b.s.toLowerCase():b.s;if(isNum(a.s)&&isNum(b.s)){x=x.replace(/[,\s%]/g,"");y=y.replace(/[,\s%]/g,"");x=parseFloat(x);y=parseFloat(y);}return (oSettings.order=="asc"?1:-1)*(x<y?-1:(x>y?1:0));});}var aNewOrder=[];for (var sParent in oElements){var oParent=oElements[sParent];var aOrg=[];var iLow=$(this).length;switch (oSettings.place){case "first": $.each(oParent.s,function(i,obj){ iLow=Math.min(iLow,obj.n) }); break;case "org": $.each(oParent.s,function(i,obj){ aOrg.push(obj.n) }); break;case "end": iLow=oParent.n.length; break;default: iLow=0;}var aCnt=[0,0];for (var i=0;i<$(this).length;i++){var bSList=i>=iLow&&i<iLow+oParent.s.length;if(contains(aOrg,i)){bSList=true;}var mEl=(bSList?oParent.s:oParent.n)[aCnt[bSList?0:1]].e;mEl.parent().append(mEl);if(bSList||!oSettings.returns){aNewOrder.push(mEl.get(0));}aCnt[bSList?0:1]++;}}return this.pushStack(aNewOrder);}});function isNum(n){var x=/^\s*?[\+-]?([\d|,]*\.?\d*?\%?)\s*?$/.exec(n);return x&&x.length>0?x[1]:false;};function contains(a,n){var bInside=false;$.each(a,function(i,m){if(!bInside){bInside=m==n};});return bInside;};$.fn.TinySort=$.fn.Tinysort=$.fn.tsort=$.fn.tinysort;})(jQuery);(function($){$.fn.ajaxSubmit=function(_1){if(!this.length){_2("ajaxSubmit: skipping submit process - no element selected");return this;}if(typeof _1=="function"){_1={success:_1};}var _3=this.attr("action");var _4=(typeof _3==="string")?$.trim(_3):"";if(_4){_4=(_4.match(/^([^#]+)/)||[])[1];}_4=_4||window.location.href||"";_1=$.extend(true,{url:_4,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},_1);var _5={};this.trigger("form-pre-serialize",[this,_1,_5]);if(_5.veto){_2("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(_1.beforeSerialize&&_1.beforeSerialize(this,_1)===false){_2("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var n,v,a=this.formToArray(_1.semantic);if(_1.data){_1.extraData=_1.data;for(n in _1.data){if(_1.data[n] instanceof Array){for(var k in _1.data[n]){a.push({name:n,value:_1.data[n][k]});}}else{v=_1.data[n];v=$.isFunction(v)?v():v;a.push({name:n,value:v});}}}if(_1.beforeSubmit&&_1.beforeSubmit(a,this,_1)===false){_2("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,_1,_5]);if(_5.veto){_2("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a);if(_1.type.toUpperCase()=="GET"){_1.url+=(_1.url.indexOf("?")>=0?"&":"?")+q;_1.data=null;}else{_1.data=q;}var _6=this,_7=[];if(_1.resetForm){_7.push(function(){_6.resetForm();});}if(_1.clearForm){_7.push(function(){_6.clearForm();});}if(!_1.dataType&&_1.target){var _8=_1.success||function(){};_7.push(function(_9){var fn=_1.replaceTarget?"replaceWith":"html";$(_1.target)[fn](_9).each(_8,arguments);});}else{if(_1.success){_7.push(_1.success);}}_1.success=function(_a,_b,_c){var _d=_1.context||_1;for(var i=0,_e=_7.length;i<_e;i++){_7[i].apply(_d,[_a,_b,_c||_6,_6]);}};var _f=$("input:file",this).length>0;var mp="multipart/form-data";var _10=(_6.attr("enctype")==mp||_6.attr("encoding")==mp);if(_1.iframe!==false&&(_f||_1.iframe||_10)){if(_1.closeKeepAlive){$.get(_1.closeKeepAlive,_11);}else{_11();}}else{$.ajax(_1);}this.trigger("form-submit-notify",[this,_1]);return this;function _11(){var _12=_6[0];if($(":input[name=submit],:input[id=submit]",_12).length){alert("Error: Form elements must not have name or id of \"submit\".");return;}var s=$.extend(true,{},$.ajaxSettings,_1);s.context=s.context||s;var id="jqFormIO"+(new Date().getTime()),fn="_"+id;var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" src=\""+s.iframeSrc+"\" />");var io=$io[0];$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){_2("aborting upload...");var e="aborted";this.aborted=1;$io.attr("src",s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,"error",e);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,"error");}};var g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,s]);}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}return;}if(xhr.aborted){return;}var _13=0;var sub=_12.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=_12.clk_x;s.extraData[n+".y"]=_12.clk_y;}}}function _14(){var t=_6.attr("target"),a=_6.attr("action");_12.setAttribute("target",id);if(_12.getAttribute("method")!="POST"){_12.setAttribute("method","POST");}if(_12.getAttribute("action")!=s.url){_12.setAttribute("action",s.url);}if(!s.skipEncodingOverride){_6.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(s.timeout){setTimeout(function(){_13=true;cb();},s.timeout);}var _15=[];try{if(s.extraData){for(var n in s.extraData){_15.push($("<input type=\"hidden\" name=\""+n+"\" value=\""+s.extraData[n]+"\" />").appendTo(_12)[0]);}}$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);_12.submit();}finally{_12.setAttribute("action",a);if(t){_12.setAttribute("target",t);}else{_6.removeAttr("target");}$(_15).remove();}};if(s.forceSync){_14();}else{setTimeout(_14,10);}var _16,doc,_17=50;function cb(){if(xhr.aborted){return;}var doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(!doc||doc.location.href==s.iframeSrc){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(_13){throw "timeout";}var _18=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);_2("isXml="+_18);if(!_18&&window.opera&&(doc.body==null||doc.body.innerHTML=="")){if(--_17){_2("requeing onLoad callback, DOM not available");setTimeout(cb,250);return;}}xhr.responseText=doc.body?doc.body.innerHTML:doc.documentElement?doc.documentElement.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(_19){var _1a={"content-type":s.dataType};return _1a[_19];};var scr=/(json|script)/.test(s.dataType);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent;}else{if(b){xhr.responseText=b.innerHTML;}}}}}else{if(s.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=_1b(xhr.responseText);}}_16=_1d(xhr,s.dataType,s);}catch(e){_2("error caught:",e);ok=false;xhr.error=e;s.error&&s.error.call(s.context,xhr,"error",e);g&&$.event.trigger("ajaxError",[xhr,s,e]);}if(xhr.aborted){_2("upload aborted");ok=false;}if(ok){s.success&&s.success.call(s.context,_16,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}s.complete&&s.complete.call(s.context,xhr,ok?"success":"error");setTimeout(function(){$io.removeData("form-plugin-onload");$io.remove();xhr.responseXML=null;},100);};var _1b=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null;};var _1c=$.parseJSON||function(s){return window["eval"]("("+s+")");};var _1d=function(xhr,_1e,s){var ct=xhr.getResponseHeader("content-type")||"",xml=_1e==="xml"||!_1e&&ct.indexOf("xml")>=0,_16=xml?xhr.responseXML:xhr.responseText;if(xml&&_16.documentElement.nodeName==="parsererror"){$.error&&$.error("parsererror");}if(s&&s.dataFilter){_16=s.dataFilter(_16,_1e);}if(typeof _16==="string"){if(_1e==="json"||!_1e&&ct.indexOf("json")>=0){_16=_1c(_16);}else{if(_1e==="script"||!_1e&&ct.indexOf("javascript")>=0){$.globalEval(_16);}}}return _16;};};};$.fn.ajaxForm=function(_1f){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){_2("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(_1f);});return this;}_2("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(_1f);}}).bind("click.form-plugin",function(e){var _20=e.target;var $el=$(_20);if(!($el.is(":submit,input:image"))){var t=$el.closest(":submit");if(t.length==0){return;}_20=t[0];}var _21=this;_21.clk=_20;if(_20.type=="image"){if(e.offsetX!=undefined){_21.clk_x=e.offsetX;_21.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _22=$el.offset();_21.clk_x=e.pageX-_22.left;_21.clk_y=e.pageY-_22.top;}else{_21.clk_x=e.pageX-_20.offsetLeft;_21.clk_y=e.pageY-_20.offsetTop;}}}setTimeout(function(){_21.clk=_21.clk_x=_21.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin");};$.fn.formToArray=function(_23){var a=[];if(this.length===0){return a;}var _24=this[0];var els=_23?_24.getElementsByTagName("*"):_24.elements;if(!els){return a;}var i,j,n,v,el,max,_25;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}if(_23&&_24.clk&&el.type=="image"){if(!el.disabled&&_24.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+".x",value:_24.clk_x},{name:n+".y",value:_24.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,_25=v.length;j<_25;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!_23&&_24.clk){var _26=$(_24.clk),_27=_26[0];n=_27.name;if(n&&!_27.disabled&&_27.type=="image"){a.push({name:n,value:_26.val()});a.push({name:n+".x",value:_24.clk_x},{name:n+".y",value:_24.clk_y});}}return a;};$.fn.formSerialize=function(_28){return $.param(this.formToArray(_28));};$.fn.fieldSerialize=function(_29){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_29);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_2a){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_2a);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_2b){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(_2b===undefined){_2b=true;}if(_2b&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _2c=el.selectedIndex;if(_2c<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_2c+1:ops.length);for(var i=(one?_2c:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return $(el).val();};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(_2d){if(_2d===undefined){_2d=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=_2d;}else{if(this.tagName.toLowerCase()=="option"){var _2e=$(this).parent("select");if(_2d&&_2e[0]&&_2e[0].type=="select-one"){_2e.find("option").selected(false);}this.selected=_2d;}}});};function _2(){if($.fn.ajaxSubmit.debug){var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg);}else{if(window.opera&&window.opera.postError){window.opera.postError(msg);}}}};})(jQuery);(function($){$.fn.ajaxSubmit=function(_1){if(!this.length){_2("ajaxSubmit: skipping submit process - no element selected");return this;}if(typeof _1=="function"){_1={success:_1};}var _3=this.attr("action");var _4=(typeof _3==="string")?$.trim(_3):"";if(_4){_4=(_4.match(/^([^#]+)/)||[])[1];}_4=_4||window.location.href||"";_1=$.extend(true,{url:_4,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},_1);var _5={};this.trigger("form-pre-serialize",[this,_1,_5]);if(_5.veto){_2("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(_1.beforeSerialize&&_1.beforeSerialize(this,_1)===false){_2("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var n,v,a=this.formToArray(_1.semantic);if(_1.data){_1.extraData=_1.data;for(n in _1.data){if(_1.data[n] instanceof Array){for(var k in _1.data[n]){a.push({name:n,value:_1.data[n][k]});}}else{v=_1.data[n];v=$.isFunction(v)?v():v;a.push({name:n,value:v});}}}if(_1.beforeSubmit&&_1.beforeSubmit(a,this,_1)===false){_2("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,_1,_5]);if(_5.veto){_2("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a);if(_1.type.toUpperCase()=="GET"){_1.url+=(_1.url.indexOf("?")>=0?"&":"?")+q;_1.data=null;}else{_1.data=q;}var _6=this,_7=[];if(_1.resetForm){_7.push(function(){_6.resetForm();});}if(_1.clearForm){_7.push(function(){_6.clearForm();});}if(!_1.dataType&&_1.target){var _8=_1.success||function(){};_7.push(function(_9){var fn=_1.replaceTarget?"replaceWith":"html";$(_1.target)[fn](_9).each(_8,arguments);});}else{if(_1.success){_7.push(_1.success);}}_1.success=function(_a,_b,_c){var _d=_1.context||_1;for(var i=0,_e=_7.length;i<_e;i++){_7[i].apply(_d,[_a,_b,_c||_6,_6]);}};var _f=$("input:file",this).length>0;var mp="multipart/form-data";var _10=(_6.attr("enctype")==mp||_6.attr("encoding")==mp);if(_1.iframe!==false&&(_f||_1.iframe||_10)){if(_1.closeKeepAlive){$.get(_1.closeKeepAlive,_11);}else{_11();}}else{$.ajax(_1);}this.trigger("form-submit-notify",[this,_1]);return this;function _11(){var _12=_6[0];if($(":input[name=submit],:input[id=submit]",_12).length){alert("Error: Form elements must not have name or id of \"submit\".");return;}var s=$.extend(true,{},$.ajaxSettings,_1);s.context=s.context||s;var id="jqFormIO"+(new Date().getTime()),fn="_"+id;var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" src=\""+s.iframeSrc+"\" />");var io=$io[0];$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){_2("aborting upload...");var e="aborted";this.aborted=1;$io.attr("src",s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,"error",e);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,"error");}};var g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,s]);}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}return;}if(xhr.aborted){return;}var _13=0;var sub=_12.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=_12.clk_x;s.extraData[n+".y"]=_12.clk_y;}}}function _14(){var t=_6.attr("target"),a=_6.attr("action");_12.setAttribute("target",id);if(_12.getAttribute("method")!="POST"){_12.setAttribute("method","POST");}if(_12.getAttribute("action")!=s.url){_12.setAttribute("action",s.url);}if(!s.skipEncodingOverride){_6.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(s.timeout){setTimeout(function(){_13=true;cb();},s.timeout);}var _15=[];try{if(s.extraData){for(var n in s.extraData){_15.push($("<input type=\"hidden\" name=\""+n+"\" value=\""+s.extraData[n]+"\" />").appendTo(_12)[0]);}}$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);_12.submit();}finally{_12.setAttribute("action",a);if(t){_12.setAttribute("target",t);}else{_6.removeAttr("target");}$(_15).remove();}};if(s.forceSync){_14();}else{setTimeout(_14,10);}var _16,doc,_17=50;function cb(){if(xhr.aborted){return;}var doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(!doc||doc.location.href==s.iframeSrc){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(_13){throw "timeout";}var _18=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);_2("isXml="+_18);if(!_18&&window.opera&&(doc.body==null||doc.body.innerHTML=="")){if(--_17){_2("requeing onLoad callback, DOM not available");setTimeout(cb,250);return;}}xhr.responseText=doc.body?doc.body.innerHTML:doc.documentElement?doc.documentElement.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(_19){var _1a={"content-type":s.dataType};return _1a[_19];};var scr=/(json|script)/.test(s.dataType);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent;}else{if(b){xhr.responseText=b.innerHTML;}}}}}else{if(s.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=_1b(xhr.responseText);}}_16=_1d(xhr,s.dataType,s);}catch(e){_2("error caught:",e);ok=false;xhr.error=e;s.error&&s.error.call(s.context,xhr,"error",e);g&&$.event.trigger("ajaxError",[xhr,s,e]);}if(xhr.aborted){_2("upload aborted");ok=false;}if(ok){s.success&&s.success.call(s.context,_16,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}s.complete&&s.complete.call(s.context,xhr,ok?"success":"error");setTimeout(function(){$io.removeData("form-plugin-onload");$io.remove();xhr.responseXML=null;},100);};var _1b=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null;};var _1c=$.parseJSON||function(s){return window["eval"]("("+s+")");};var _1d=function(xhr,_1e,s){var ct=xhr.getResponseHeader("content-type")||"",xml=_1e==="xml"||!_1e&&ct.indexOf("xml")>=0,_16=xml?xhr.responseXML:xhr.responseText;if(xml&&_16.documentElement.nodeName==="parsererror"){$.error&&$.error("parsererror");}if(s&&s.dataFilter){_16=s.dataFilter(_16,_1e);}if(typeof _16==="string"){if(_1e==="json"||!_1e&&ct.indexOf("json")>=0){_16=_1c(_16);}else{if(_1e==="script"||!_1e&&ct.indexOf("javascript")>=0){$.globalEval(_16);}}}return _16;};};};$.fn.ajaxForm=function(_1f){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){_2("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(_1f);});return this;}_2("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(_1f);}}).bind("click.form-plugin",function(e){var _20=e.target;var $el=$(_20);if(!($el.is(":submit,input:image"))){var t=$el.closest(":submit");if(t.length==0){return;}_20=t[0];}var _21=this;_21.clk=_20;if(_20.type=="image"){if(e.offsetX!=undefined){_21.clk_x=e.offsetX;_21.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _22=$el.offset();_21.clk_x=e.pageX-_22.left;_21.clk_y=e.pageY-_22.top;}else{_21.clk_x=e.pageX-_20.offsetLeft;_21.clk_y=e.pageY-_20.offsetTop;}}}setTimeout(function(){_21.clk=_21.clk_x=_21.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin");};$.fn.formToArray=function(_23){var a=[];if(this.length===0){return a;}var _24=this[0];var els=_23?_24.getElementsByTagName("*"):_24.elements;if(!els){return a;}var i,j,n,v,el,max,_25;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}if(_23&&_24.clk&&el.type=="image"){if(!el.disabled&&_24.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+".x",value:_24.clk_x},{name:n+".y",value:_24.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,_25=v.length;j<_25;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!_23&&_24.clk){var _26=$(_24.clk),_27=_26[0];n=_27.name;if(n&&!_27.disabled&&_27.type=="image"){a.push({name:n,value:_26.val()});a.push({name:n+".x",value:_24.clk_x},{name:n+".y",value:_24.clk_y});}}return a;};$.fn.formSerialize=function(_28){return $.param(this.formToArray(_28));};$.fn.fieldSerialize=function(_29){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_29);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_2a){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_2a);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_2b){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(_2b===undefined){_2b=true;}if(_2b&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _2c=el.selectedIndex;if(_2c<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_2c+1:ops.length);for(var i=(one?_2c:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return $(el).val();};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(_2d){if(_2d===undefined){_2d=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=_2d;}else{if(this.tagName.toLowerCase()=="option"){var _2e=$(this).parent("select");if(_2d&&_2e[0]&&_2e[0].type=="select-one"){_2e.find("option").selected(false);}this.selected=_2d;}}});};function _2(){if($.fn.ajaxSubmit.debug){var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg);}else{if(window.opera&&window.opera.postError){window.opera.postError(msg);}}}};})(jQuery);(function(a,b,c){function B(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(f,g,h,l){if(k.tip){var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.split(" "),q=p[0],r=p[1]||p[0],s={left:e,top:e,x:0,y:0},t,u={},v;i.corner.fixed!==d&&(q==="shift"&&n.precedance==="x"&&o.left&&n.y!=="center"?n.precedance=n.precedance==="x"?"y":"x":q==="flip"&&o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),r==="shift"&&n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":r==="flip"&&o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top"),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&i.update(n,e)),t=i.position(n,o),t.right!==c&&(t.left=-t.right),t.bottom!==c&&(t.top=-t.bottom),t.user=Math.max(0,j.offset);if(s.left=q==="shift"&&!!o.left)n.x==="center"?u["margin-left"]=s.x=t["margin-left"]-o.left:(v=t.right!==c?[o.left,-t.left]:[-o.left,t.left],(s.x=Math.max(v[0],v[1]))>v[0]&&(h.left-=o.left,s.left=e),u[t.right!==c?"right":"left"]=s.x);if(s.top=r==="shift"&&!!o.top)n.y==="center"?u["margin-top"]=s.y=t["margin-top"]-o.top:(v=t.bottom!==c?[o.top,-t.top]:[-o.top,t.top],(s.y=Math.max(v[0],v[1]))>v[0]&&(h.top-=o.top,s.top=e),u[t.bottom!==c?"bottom":"top"]=s.y);k.tip.css(u).toggle(!(s.x&&s.y||n.x==="center"&&s.y||n.y==="center"&&s.x)),h.left-=t.left.charAt?t.user:q!=="shift"||s.top||!s.left&&!s.top?t.left:0,h.top-=t.top.charAt?t.user:r!=="shift"||s.left||!s.left&&!s.top?t.top:0,m.left=o.left,m.top=o.top,m.corner=n.string()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0,corner:""},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("<canvas />")[0]||{}).getContext;i.corner=f,i.mimic=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(){var c,d,e,f=k.tip.css({backgroundColor:"",border:""}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,s="background-color",t="transparent",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),x=w?k.titlebar:k.content;l.addClass(r),o.fill=d=f.css(s),o.border=e=f[0].style[p]||l.css(m);if(!d||q.test(d))o.fill=x.css(s)||t,q.test(o.fill)&&(o.fill=l.css(s)||d);if(!e||q.test(e)||e===u){o.border=x.css(m)||t;if(q.test(o.border)||o.border===v)o.border=e}a("*",f).add(f).css(s,t).css("border",""),l.removeClass(r)},create:function(){var b=n.width,c=n.height,d;k.tip&&k.tip.remove(),k.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(d+d))},update:function(b,c){var g=k.tip,l=g.children(),m=n.width,q=n.height,r="px solid ",t="px dashed transparent",v=j.mimic,x=Math.round,y,z,B,C,D;b||(b=i.corner),v===e?v=b:(v=new h.Corner(v),v.precedance=b.precedance,v.x==="inherit"?v.x=b.x:v.y==="inherit"?v.y=b.y:v.x===v.y&&(v[b.precedance]=b[b.precedance])),y=v.precedance,i.detectColours(),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,B=A(v,m,q),i.size=D=w(b),g.css(D),b.precedance==="y"?C=[x(v.x==="left"?p:v.x==="right"?D.width-m-p:(D.width-m)/2),x(v.y==="top"?D.height-q:0)]:C=[x(v.x==="left"?D.width-m:0),x(v.y==="top"?p:v.y==="bottom"?D.height-q-p:(D.height-q)/2)],s?(l.attr(D),z=l[0].getContext("2d"),z.restore(),z.save(),z.clearRect(0,0,3e3,3e3),z.translate(C[0],C[1]),z.beginPath(),z.moveTo(B[0][0],B[0][1]),z.lineTo(B[1][0],B[1][1]),z.lineTo(B[2][0],B[2][1]),z.closePath(),z.fillStyle=o.fill,z.strokeStyle=o.border,z.lineWidth=p*2,z.lineJoin="miter",z.miterLimit=100,p&&z.stroke(),z.fill()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" xe",C[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(v.string().indexOf("center")>-1),left:C[0]-C[2]*Number(y==="x"),top:C[1]-C[2]*Number(y==="y"),width:m+p,height:q+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:m+p+" "+(q+p),path:B,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),i.init()}function A(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function z(b,c){var i,j,k,l,m=a(this),n=a(document.body),o=this===document?n:m,p=m.metadata?m.metadata(c.metadata):f,q=c.metadata.type==="html5"&&p?p[c.metadata.name]:f,r=m.data(c.metadata.name||"qtipopts");try{r=typeof r==="string"?(new Function("return "+r))():r}catch(s){w("Unable to parse HTML5 attribute data: "+r)}l=a.extend(d,{},g.defaults,c,typeof r==="object"?x(r):f,x(q||p)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=m.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",m);return e}}j.container===e&&(j.container=n),j.target===e&&(j.target=o),l.show.target===e&&(l.show.target=o),l.show.solo===d&&(l.show.solo=n),l.hide.target===e&&(l.hide.target=o),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)m.qtip("destroy");else if(l.overwrite===e)return e;a.attr(this,"title")&&(a.attr(this,u,a.attr(this,"title")),this.removeAttribute("title")),i=new y(m,l,b,!!k),a.data(this,"qtip",i),m.bind("remove.qtip",function(){i.destroy()});return i}function y(c,s,t,w){function Q(){var c=[s.show.target[0],s.hide.target[0],y.rendered&&F.tooltip[0],s.position.container[0],s.position.viewport[0],b,document];y.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(E):s.show.target.unbind(E+"-create")}function P(){function r(a){D.is(":visible")&&y.reposition(a)}function p(a){if(D.hasClass(m))return e;clearTimeout(y.timers.inactive),y.timers.inactive=setTimeout(function(){y.hide(a)},s.hide.inactive)}function o(b){if(D.hasClass(m))return e;var c=a(b.relatedTarget||b.target),d=c.closest(n)[0]===D[0],g=c[0]===h.show[0];clearTimeout(y.timers.show),clearTimeout(y.timers.hide);f.target==="mouse"&&d||s.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||g))?b.preventDefault():s.hide.delay>0?y.timers.hide=setTimeout(function(){y.hide(b)},s.hide.delay):y.hide(b)}function l(a){if(D.hasClass(m))return e;h.show.trigger("qtip-"+t+"-inactive"),clearTimeout(y.timers.show),clearTimeout(y.timers.hide);var b=function(){y.toggle(d,a)};s.show.delay>0?y.timers.show=setTimeout(b,s.show.delay):b()}var f=s.position,h={show:s.show.target,hide:s.hide.target,viewport:a(f.viewport),document:a(document),window:a(b)},j={show:a.trim(""+s.show.event).split(" "),hide:a.trim(""+s.hide.event).split(" ")},k=a.browser.msie&&parseInt(a.browser.version,10)===6;D.bind("mouseenter"+E+" mouseleave"+E,function(a){var b=a.type==="mouseenter";b&&y.focus(a),D.toggleClass(q,b)}),s.hide.fixed&&(h.hide=h.hide.add(D),D.bind("mouseover"+E,function(){D.hasClass(m)||clearTimeout(y.timers.hide)})),/mouse(out|leave)/i.test(s.hide.event)?s.hide.leave&&h.window.bind("mouse"+(s.hide.leave.indexOf("frame")>-1?"out":"leave")+E,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&y.hide(a)}):/mouse(over|enter)/i.test(s.show.event)&&h.hide.bind("mouseleave"+E,function(a){clearTimeout(y.timers.show)}),(""+s.hide.event).indexOf("unfocus")>-1&&h.document.bind("mousedown"+E,function(b){var d=a(b.target),e=!D.hasClass(m)&&D.is(":visible");d.parents(n).length===0&&d.add(c).length>1&&y.hide(b)}),"number"===typeof s.hide.inactive&&(h.show.bind("qtip-"+t+"-inactive",p),a.each(g.inactiveEvents,function(a,b){h.hide.add(F.tooltip).bind(b+E+"-inactive",p)})),a.each(j.hide,function(b,c){var d=a.inArray(c,j.show),e=a(h.hide);d>-1&&e.add(h.show).length===e.length||c==="unfocus"?(h.show.bind(c+E,function(a){D.is(":visible")?o(a):l(a)}),delete j.show[d]):h.hide.bind(c+E,o)}),a.each(j.show,function(a,b){h.show.bind(b+E,l)}),"number"===typeof s.hide.distance&&h.show.bind("mousemove"+E,function(a){var b=G.origin||{},c=s.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&y.hide(a)}),f.target==="mouse"&&(h.show.bind("mousemove"+E,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),f.adjust.mouse&&(s.hide.event&&D.bind("mouseleave"+E,function(a){(a.relatedTarget||a.target)!==h.show[0]&&y.hide(a)}),h.document.bind("mousemove"+E,function(a){!D.hasClass(m)&&D.is(":visible")&&y.reposition(a||i)}))),(f.adjust.resize||h.viewport.length)&&(a.event.special.resize?h.viewport:h.window).bind("resize"+E,r),(h.viewport.length||k&&D.css("position")==="fixed")&&h.viewport.bind("scroll"+E,r)}function O(b,d){function g(b){function g(f){clearTimeout(y.timers.img[this]),a(this).unbind(E),(c=c.not(this)).length===0&&(y.redraw(),d!==e&&y.reposition(G.event),b())}var c;if((c=f.find("img:not([height]):not([width])")).length===0)return g.call(c);c.each(function(b,c){(function d(){if(c.height&&c.width)return g.call(c);y.timers.img[c]=setTimeout(d,1e3)})(),a(c).bind("error"+E+" load"+E,g)})}var f=F.content;if(!y.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,G.event,y)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),y.rendered<0?D.queue("fx",g):(C=0,g(a.noop));return y}function N(b,d){var f=F.title;if(f&&b===e)J();else if(!y.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,G.event,y)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),y.redraw(),d!==e&&y.rendered&&D.is(":visible")&&y.reposition(G.event)}function M(a){var b=F.button,c=F.title;if(!y.rendered)return e;a?(c||L(),K()):b.remove()}function L(){var b=A+"-title";F.titlebar&&J(),F.titlebar=a("<div />",{"class":k+"-titlebar "+(s.style.widget?"ui-widget-header":"")}).append(F.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(F.content),s.content.title.button?K():y.rendered&&y.redraw()}function K(){var b=s.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";F.button&&F.button.remove(),b.jquery?F.button=b:F.button=a("<a />",{"class":"ui-state-default "+(s.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),F.button.appendTo(F.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){D.hasClass(m)||y.hide(a);return e}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}),y.redraw()}function J(){F.title&&(F.titlebar.remove(),F.titlebar=F.title=F.button=f,y.reposition())}function I(){var a=s.style.widget;D.toggleClass(l,a).toggleClass(o,!a),F.content.toggleClass(l+"-content",a),F.titlebar&&F.titlebar.toggleClass(l+"-header",a),F.button&&F.button.toggleClass(k+"-icon",!a)}function H(a){var b=0,c,d=s,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||s,e.pop()]}var y=this,z=document.body,A=k+"-"+t,B=0,C=0,D=a(),E=".qtip-"+t,F,G;y.id=t,y.rendered=e,y.elements=F={target:c},y.timers={img:{}},y.options=s,y.checks={},y.plugins={},y.cache=G={event:{},target:a(),disabled:e,attr:w},y.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(D[0].id=i,F.content[0].id=i+"-content",F.title[0].id=i+"-title")},"^content.text$":function(a,b,c){O(c)},"^content.title.text$":function(a,b,c){if(!c)return J();!F.title&&c&&L(),N(c)},"^content.title.button$":function(a,b,c){M(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){y.rendered&&D.appendTo(c)},"^show.ready$":function(){y.rendered?y.toggle(d):y.render(1)},"^style.classes$":function(b,c,d){a.attr(D[0],"class",k+" qtip ui-helper-reset "+d)},"^style.widget|content.title":I,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){D[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=s.position;D.attr("tracking",a.target==="mouse"&&a.adjust.mouse),Q(),P()}},a.extend(y,{render:function(b){if(y.rendered)return y;var f=s.content.title.text,g=s.position,i=a.Event("tooltiprender");a.attr(c[0],"aria-describedby",A),D=F.tooltip=a("<div/>",{id:A,"class":k+" qtip ui-helper-reset "+o+" "+s.style.classes,width:s.style.width||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":A+"-content","aria-hidden":d}).toggleClass(m,G.disabled).data("qtip",y).appendTo(s.position.container).append(F.content=a("<div />",{"class":k+"-content",id:A+"-content","aria-atomic":d})),y.rendered=-1,C=1,f&&(L(),N(f)),O(s.content.text,e),y.rendered=d,I(),a.each(s.events,function(b,c){a.isFunction(c)&&D.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(y)}),P(),D.queue("fx",function(a){i.originalEvent=G.event,D.trigger(i,[y]),C=0,y.redraw(),(s.show.ready||b)&&y.toggle(d,G.event),a()});return y},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:D.outerHeight(),width:D.outerWidth()};break;case"offset":b=h.offset(D,s.position.container);break;default:c=H(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(y,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=y.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=H(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(s),B=C=1,a.each(b,m),B=C=0,D.is(":visible")&&y.rendered&&(i&&y.reposition(s.position.target==="mouse"?f:G.event),j&&y.redraw());return y},toggle:function(b,c){function q(){b?(a.browser.msie&&D[0].style.removeAttribute("filter"),D.css("overflow","")):D.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!y.rendered)if(b)y.render(1);else return y;var g=b?"show":"hide",h=s[g],j=D.is(":visible"),k=!c||s[g].target.length<2||G.target[0]===c.target,l=s.position,m=s.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!D.is(":animated")&&j===b&&k)return y;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(G.event.type)&&c.target===s.show.target[0]&&D.has(c.relatedTarget).length)return y;G.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?G.event:f,D.trigger(p,[y,90]);if(p.isDefaultPrevented())return y;a.attr(D[0],"aria-hidden",!b),b?(G.origin=a.extend({},i),y.focus(c),a.isFunction(m.text)&&O(m.text,e),a.isFunction(m.title.text)&&N(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),y.reposition(c),h.solo&&a(n,h.solo).not(D).qtip("hide",p)):(clearTimeout(y.timers.show),delete G.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(D).length&&(a(document).unbind("mousemove.qtip"),v=e),y.blur(c)),k&&D.stop(0,1),h.effect===e?(D[g](),q.call(D)):a.isFunction(h.effect)?(h.effect.call(D,y),D.queue("fx",function(a){q(),a()})):D.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+t+"-inactive");return y},show:function(a){return y.toggle(d,a)},hide:function(a){return y.toggle(e,a)},focus:function(b){if(!y.rendered)return y;var c=a(n),d=parseInt(D[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;D.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,D.trigger(i,[y,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),D.addClass(p)[0].style.zIndex=e));return y},blur:function(b){var c=a.extend({},b),d;D.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,D.trigger(d,[y]);return y},reposition:function(c,d){if(!y.rendered||B)return y;B=1;var f=s.position.target,g=s.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=D.outerWidth(),p=D.outerHeight(),q=0,r=0,t=a.Event("tooltipmove"),u=D.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=y.plugins.tip,A={horizontal:n[0],vertical:n[1]||n[0],left:function(a){var b=A.horizontal==="shift",c=v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=x&&x.size?x.size.width||0:0,g=x&&x.corner&&x.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=x&&x.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(v.offset.left+(g&&x.corner.x==="center"?x.offset:0),a-k,Math.min(Math.max(v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k+(n?0:2*m.x):i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k+2*m.x),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=A.vertical==="shift",c=v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=x&&x.size?x.size.height||0:0,g=x&&x.corner&&x.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=x&&x.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(v.offset.top+(g&&x.corner.x==="center"?x.offset:0),a-k,Math.min(Math.max(v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k+(n?0:2*m.y):i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k+2*m.y),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}};if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||G.event.pageX))l={x:"left",y:"top"},c=c&&(c.type==="resize"||c.type==="scroll")?G.event:c&&c.pageX&&c.type==="mousemove"?c:i&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&G.origin?G.origin:c,w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=G.target=a(c.target):f=G.target:G.target=a(f),f=a(f).eq(0);if(f.length===0)return y;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:!u||h.iOS?(v||f).scrollTop():0,left:!u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,g.container,u)),w.offset&&(q=w.width,r=w.height,w=w.offset),w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),v.jquery&&f[0]!==b&&f[0]!==z&&A.vertical+A.horizontal!=="nonenone"?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},w.adjusted={left:A.horizontal!=="none"?A.left(w.left):0,top:A.vertical!=="none"?A.top(w.top):0}):w.adjusted={left:0,top:0},D.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(k+"-pos-"+j.abbreviation()),t.originalEvent=a.extend({},c),D.trigger(t,[y,w,v.elem||v]);if(t.isDefaultPrevented())return y;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?D.css(w):a.isFunction(g.effect)&&(g.effect.call(D,y,a.extend({},w)),D.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),B=0;return y},redraw:function(){if(y.rendered<1||C)return y;var a=s.position.container,b,c,d,e;C=1,s.style.width?D.css("width",s.style.width):(D.css("width","").addClass(r),c=D.width()+1,d=D.css("max-width")||"",e=D.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,D.css("width",Math.round(c)).removeClass(r)),C=0;return y},disable:function(b){var c=m;"boolean"!==typeof b&&(b=!D.hasClass(c)&&!G.disabled),y.rendered?(D.toggleClass(c,b),a.attr(D[0],"aria-disabled",b)):G.disabled=!!b;return y},enable:function(){return y.disable(e)},destroy:function(){var b=c[0],d=a.attr(b,u);y.rendered&&(D.remove(),a.each(y.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(y.timers.show),clearTimeout(y.timers.hide),Q(),a.removeData(b,"qtip"),d&&(a.attr(b,"title",d),c.removeAttr(u)),c.removeAttr("aria-describedby").unbind(".qtip"),delete j[y.id];return c}})}function x(b){var c;if(!b||"object"!==typeof b)return e;"object"!==typeof b.metadata&&(b.metadata={type:b.metadata});if("content"in b){if("object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e),"title"in b.content&&("object"!==typeof b.content.title&&(b.content.title={text:b.content.title}),c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e))}"position"in b&&("object"!==typeof b.position&&(b.position={my:b.position,at:b.position})),"show"in b&&("object"!==typeof b.show&&(b.show.jquery?b.show={target:b.show}:b.show={event:b.show})),"hide"in b&&("object"!==typeof b.hide&&(b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide})),"style"in b&&("object"!==typeof b.style&&(b.style={classes:b.style})),a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console)var a=console[console.warn?"warn":"log"],b=a.apply?a.apply(console,arguments):a(Array.prototype.slice.call(arguments))}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=j==="disable"?[d]:a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(i){function q(b){function d(){o.render(typeof b==="object"||k.show.ready),l.show.add(l.hide).unbind(n)}if(o.cache.disabled)return e;o.cache.event=a.extend({},b),o.cache.target=b?a(b.target):[c],k.show.delay>0?(clearTimeout(o.timers.show),o.timers.show=setTimeout(d,k.show.delay),m.show!==m.hide&&l.hide.bind(m.hide,function(){clearTimeout(o.timers.show)})):d()}var k,l,m,n,o,p;p=a.isArray(b.id)?b.id[i]:b.id,p=!p||p===e||p.length<1||j[p]?g.nextid++:j[p]=p,n=".qtip-"+p+"-create",o=z.call(this,p,b);if(o===e)return d;k=o.options,a.each(h,function(){this.initialize==="initialize"&&this(o)}),l={show:k.show.target,hide:k.hide.target},m={show:a.trim(""+k.show.event).replace(/ /g,n+" ")+n,hide:a.trim(""+k.hide.event).replace(/ /g,n+" ")+n},/mouse(over|enter)/i.test(m.show)&&!/mouse(out|leave)/i.test(m.hide)&&(m.hide+=" mouseleave"+n),l.show.bind(m.show,q),(k.show.ready||k.prerender)&&q(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.precedance=a.charAt(0).search(/^(t|b)/)>-1?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbreviation=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(c,d,e){function l(a,b){f.left+=b*a.scrollLeft(),f.top+=b*a.scrollTop()}var f=c.offset(),g=d,i=0,j=document.body,k;if(g){do{g.css("position")!=="static"&&(k=g[0]===j?{left:parseInt(g.css("left"),10)||0,top:parseInt(g.css("top"),10)||0}:g.position(),f.left-=k.left+(parseInt(g.css("borderLeftWidth"),10)||0),f.top-=k.top+(parseInt(g.css("borderTopWidth"),10)||0),i++);if(g[0]===j)break}while(g=g.offsetParent());(d[0]!==j||i>1)&&l(d,1),(h.iOS<4.1&&h.iOS>3.1||!h.iOS&&e)&&l(a(b),-1)}return f},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e){if(arguments.length<2)return a.attr(d,u);if(typeof f==="object"){f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+t].apply(this,arguments),a.attr(d,u,a.attr(d,e));return this.removeAttr(e)}}}},clone:function(b){var c=a([]),d="title",e;e=a.fn["clone"+t].apply(this,arguments).filter("[oldtitle]").each(function(){a.attr(this,d,a.attr(this,u)),this.removeAttribute(u)}).end();return e},remove:a.ui?f:function(b,c){a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c)return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e},events:{render:f,move:f,show:f,hide:f,toggle:f,focus:f,blur:f}},h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new B(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}})})(jQuery,window);var general_overlay, aa, twitter_overlay, ajax_overlay, list_overlay, delay_execute, delay_execute2, section, is_mobile, displaying_log=0;function tweetspinner_highlights(){$("span.triggerable, div.triggerable", section).attr("title", "delete");$("div.triggerable", "#the_lists_body").attr("title", "delete");$(".subscriber_only", section).attr("title", "This advanced feature is only available to subscribers.  Click now to learn more -- and get a free trial of all our features!");$("div.tooltip_upload", "#section_designs").attr("title", "upload now to your Twitter account");$("div.tooltip_edit_list", "#the_lists_body").attr("title", "edit");$("div.tooltip_recip_preview", section).attr("title", "<i>Reciprocity scores</i> are a powerful way to monitor how many people are following you back, per keyword. We show you precise statistics, including a small pie chart.<p/>Click on this link to upgrade now to activate this feature -- as well as many others.");$("div.purge_schedule_tooltip, div.prune_schedule_tooltip", section).attr("title", "This schedule does two things: 1. FINDS new unfollow candidates and puts them in 'found'; AND 2. UNFOLLOWS those users you have manually moved to 'queued'.  This schedule runs every few hours.");$("a.tooltip_followed", section).attr("title", "Click to review a list of all users you have followed for this item.  We'll also show you whether they followed you back, or whether you eventually purged them.");$("div.tooltip_recip", section).attr("title", "We track every person you follow through Tweet Spinner.  We show you 'reciprocity scores' which tell you the percentage of people who you follow who follow you back.");$("div.tooltip_shared", section).attr("title", "This little chart shows you the percentage of this user's friends/followers that you follow.  Click for a more detailed comparison.");$("div.tooltip_shared_limited", section).attr("title", "This little chart shows you the percentage of this user's friends/followers that you follow.  Click for a more detailed comparison.<p/><b>Since this user has more than 100,000 friends/followers, this pie chart only shows you the shared followers of their most recent 50,000 (because it would take too long to download all of them).</b><p/>We recommend mimic following users who have fewer than 100,000 friends/followers for performance reasons.");$("span.tooltip_action_queue", section).attr("title", "Click to review the queue of users that we will follow for you for this item -- provided that the schedule is on.");$("span.tooltip_action_queue_un", section).attr("title", "Click to review the queue of users that we will unfollow for you for this item -- provided that the schedule is on.");$("span.tooltip_approve_queue, div.tooltip_approve_queue", section).attr("title", "Click to decide which of the users we've found you'd like to follow -- or not follow!  We'll automatically follow them for you once approved.");$("span.tooltip_approve_queue_un, div.tooltip_approve_queue_un", section).attr("title", "Click to decide which of the users we've found you'd like to unfollow -- or not!  We'll automatically unfollow them for you once approved.");$("div.tooltip_findnow", section).attr("title", "This action will search Twitter using your filters and assemble a list of candidates to follow!");$("div.tooltip_findnow_un", section).attr("title", "This action will search Twitter using your filters and assemble a list of candidates to unfollow!");$("div.remove_all", section).attr("title", "delete all");$("div.followback_schedule_tooltip, div.mimic_follow_schedule_tooltip, div.keyword_follow_schedule_tooltip", section).attr("title", "This schedule does two things: 1. FINDS new follow candidates and puts them in 'found'; AND 2. FOLLOWS those users you have manually moved to 'queued'.  This schedule runs every few hours.");$("img.fudge").attr("title", "When you select a 'fudge', we will randomly add or subtract a number of minutes within the range you've selected to the next time the schedule executes.");if(typeof delay_execute=="function"){delay_execute();delay_execute=undefined;}if(typeof delay_execute2=="function"){delay_execute2();delay_execute2=undefined;}if(is_mobile){}else{$("[title]").qtip({style: {tip: {corner: true, method: 'polygon'},classes: 'ui-tooltip-rounded ui-tooltip-shadow'},position: {viewport: $(window)}});}$("input:submit").button();}function uu(url){return url+twitid_qs;}function show_list_overlay(url,titl){$('#list_overlay_inside').html('<center><img src="ajax-loader.gif" alt=""/></center>');$('#list_overlay').dialog("option", "title", titl).dialog('open');url="home?op=get_queue&amp;"+url+"&amp;via_ajax=1";_gaq.push(['_trackPageview', url]);$.ajax({type: "GET",url: uu(url),success:function(msg){$('#list_overlay_inside').html(msg);tweetspinner_highlights();}});return void(0);}function close_list_overlay(){if(list_overlay.dialog('isOpen')){list_overlay.dialog('close');}}function display_activity_log(data){if(displaying_log===0){displaying_log=1;$("#invisible_activity_list").empty();var first_time=$("#time_compare").html();$("#activity_list").html(data);var second_time=$("#time_compare").html();if(first_time!==second_time){$("#invisible_activity_list").html(data);$("#invisible_activity_floater").slideDown("normal").delay(5000).slideUp("normal",function(){displaying_log=0;});}}}function get_activity_log(){var url="home?op=get_short_activity_log";$.get(uu(url),function(data){if(aa.dialog('isOpen')){aa.dialog('close');}display_activity_log(data);});}function radio_toggle(calling,turnon){$(calling).parents("form.ajax_form").find("input[value='"+turnon+"']").attr("checked", "checked"); }function delete_via_AJAX(to_delete,url){aa=ajax_overlay;_gaq.push(['_trackPageview', url]);$.ajax({url: uu(url),beforeSend:function(msg){aa.dialog('open');},success:function(data){$(to_delete).fadeOut("fast");display_activity_log(data);},complete:function(){aa.dialog('close');}});}function do_AJAX_delete(event){var ev_target=$(event.target);var action=ev_target.parents("div.deletable_list").attr("id");var to_delete=ev_target.parents("div.deletable, td.deletable");var id=to_delete.find(".id");var id_qs=id.length ? "&id="+jQuery.trim(id.html()) : "";var nm=to_delete.find(".nm");var nm_qs=nm.length ? "&nm="+jQuery.trim(nm.html()) : "";var url="home?op="+action+id_qs + nm_qs;delete_via_AJAX(to_delete,url);}function get_via_AJAX(url,where_to_put_data, where_to_put_data_wrapper,disable_activity_get){var original_title=$(document).attr("title");_gaq.push(['_trackPageview', url]);$.ajax({url: uu(url),beforeSend:function(msg){aa.dialog('open');$(document).attr("title", "[working]");},success:function(data){$(where_to_put_data).html(data);if(typeof disable_activity_get==="undefined"){get_activity_log();}},error:function(data,txt){alert("Hm, we got an error back from the server.  Possibly Twitter is very slow right now?  Try again, and let us know if this problem keeps happening. "+txt);},complete:function(msg){tweetspinner_highlights();$(document).attr("title", original_title);if(typeof where_to_put_data_wrapper!=="undefined"){where_to_put_data_wrapper=$(where_to_put_data_wrapper);if(where_to_put_data_wrapper.is(':hidden')){where_to_put_data_wrapper.slideDown("normal");}}if(aa.dialog('isOpen')){aa.dialog('close');}}});}function boolean_schedule(caller,state){var parent_id=$(caller).parents("span.button_holder").attr("id");var answer, when;if(state=="off"){when="We will automatically perform this action every few hours.";if(parent_id.match("(keyword|mimic)")){when=when+" We will start with the first item below, and slowly walk down your list -- re-starting when the cycle has completed.";}if(typeof when!=="undefined"){when=when+"\n\n";}if(parent_id.match("(keyword|mimic|followback)")){when=when+"This schedule will do two things: 1. FIND new candidate users to follow, placing them in 'found'; AND 2. follow those who you've moved to 'queue'.\n\n";}else if(parent_id.match("(purge|prune)")){when=when+"This schedule will do two things: 1. FIND new candidate users to unfollow, placing them in 'found'; AND 2. unfollow those who you've moved to 'queue'.\n\n";}answer=confirm("This subscriber-only feature will turn on the schedule for this feature.\n\n"+when+"Are you sure you wish to turn this on?");}if(answer || state=="on"){var url="home?op=save_boolean_schedule&amp;type="+parent_id+"&amp;current=" + state;aa=ajax_overlay;get_via_AJAX(url, "#"+parent_id);}}function ajax_twitter_get(url,caller){aa=twitter_overlay;get_via_AJAX("home?"+url+"&amp;via_ajax=1", $("#section_body"));}function ajax_section_get(url,caller){aa=ajax_overlay;get_via_AJAX("home?"+url+"&amp;via_ajax=1", $("#section_body"));}function ajax_general_toggle(url,place, wrapper){wrapper=$(wrapper);if(wrapper.is(":visible")){wrapper.slideUp("normal");}else{if(wrapper.find(".iexist").length){wrapper.slideDown("normal");}else{aa=ajax_overlay;get_via_AJAX("home?"+url+"&amp;via_ajax=1", place, wrapper, 1);}}}function close_only(who){who=$(who);if(who){if(who.is(':visible')){who.slideUp("normal");}}return;}function send_post(the_form){the_form=$(the_form);aa=the_form.hasClass("twitter_call") ? twitter_overlay : ajax_overlay;var original_title=$(document).attr("title");var data=twitid ? {twitid: twitid, via_ajax: 1} : {via_ajax: 1};var where_to_put_data=the_form.parents("#the_lists_body").length ? $("#the_lists_body") : $("#section_body");var options={url: 'home', type: "POST", data: data,beforeSend:function(msg){aa.dialog('open');$(document).attr("title", "[working]");},success:function(results){where_to_put_data.html(results);close_only(the_form.parents(".hidden")); },complete:function(msg){$(document).attr("title", original_title); get_activity_log(); tweetspinner_highlights();}};_gaq.push(['_trackPageview', 'home?sending_post']);the_form.ajaxSubmit(options);}function load_section(tab_id){var url="home?op=get_section&amp;section="+tab_id;_gaq.push(['_trackPageview', url]);$.ajax({type: "GET",url: uu(url),beforeSend:function(msg){$("#section").slideUp();},success:function(msg){$("#section").html(msg).slideDown();tweetspinner_highlights();}});}function non_ajax_overlay(who,title){who=$(who);if(who){$("#general_overlay_inside").html($(who).html());general_overlay.dialog("option", "title", title).dialog("open");}return;}function toggle(who){who=$(who);if(who){who.is(":hidden") ? who.slideDown("normal") : who.slideUp("normal");}return;}function toggle_siblings(who){who=$(who);who.siblings().slideUp();toggle(who);}function save_prefs(name,value){var sort_url="home?op=save_prefs&amp;type="+name+"&amp;value="+value+"&amp;uncacheme="+Date();_gaq.push(['_trackPageview', sort_url]);$.ajax({url: sort_url});}function icon_toggle(state,calling){var icn_h=$("div.icn_h");if(state==1){icn_h.removeClass("c2");icn_h.empty();}else{icn_h.addClass("c2");icn_h.each(function(){var item=$(this);var scrn=item.parent("div.prv_r").find("a.s_t").html();item.html("<img src='http://img.tweetimag.es/i/"+scrn+"_m' width='24' alt=''/>&nbsp;");})}save_prefs("hide_icon_list", state);calling_hi(calling);}function hi_sort(general_sort,what_to_sort, how_to_sort,calling){div_sort(general_sort,what_to_sort, how_to_sort);calling_hi(calling);}function calling_hi(calling){calling=$(calling);calling.parent("div").children("span").removeClass("hi");calling.addClass("hi");}function div_sort(general_sort,what_to_sort, how_to_sort){var order="desc";if(how_to_sort===".s_n" || how_to_sort===".s_t" || (how_to_sort===".s_default" && general_sort!=="affiliate_sort")){order="asc";}save_prefs(general_sort, how_to_sort+"-"+order);core_sort(what_to_sort,how_to_sort, order);}function core_sort(what_to_sort,how_to_sort, order){$(what_to_sort).tsort(how_to_sort,{order: order});}function from_server_sort(what_to_sort,how_plus_order){var args=how_plus_order.split("-");core_sort(what_to_sort,args[0], args[1]);}$(function(){is_mobile=navigator.userAgent.match(/(iPad|mobile|iPhone)/i)!=null;section=$("#section");$("#atsign").replaceWith("&#0064;");var options={autoOpen: false, modal: true, draggable: true, resizable: false, closeOnEscape: true, hide: 'slide', show: 'slide'};general_overlay=$("#general_overlay").dialog($.extend({},options, {width: 450}));list_overlay=$("#list_overlay").dialog($.extend({},options, {width: 850}));twitter_overlay=$("#twitter_overlay").dialog($.extend({}, options, {width: 250, draggable: false, closeOnEscape: false, dialogClass: 'overlay_suppress'}));ajax_overlay=$("#ajax_overlay").dialog($.extend({}, options, {width: 100, height: 100, closeOnEscape: false, dialogClass: 'overlay_suppress'}));var the_nav=$("#the_nav");var cross_sell=$("#cross_sell");if(is_mobile){$("#list_overlay").removeClass("not_mobile").addClass("mobile");$("#list_overlay").dialog("option",  "position", ['center',10]);}else{var div_stripable=$("div.stripable");div_stripable.live("mouseenter",function(){$(this).css("background-color", "#E1F2F9");});div_stripable.live("mouseleave",function(){$(this).css("background-color", "");});$("div.logo_flip", cross_sell).live("mouseenter",function(){$(this).attr("id", $(this).attr("id").split("_g").join(""));});$("div.logo_flip:not([id*='_g'])", cross_sell).live("mouseleave",function(){$(this).attr("id", $(this).attr("id")+"_g");});}$("div.logo_flip", cross_sell).click(function(){$(this).attr("id").match("va_logo")?window.open("http://versionista.com"):$(this).attr("id").match("twepe_logo")?window.open("http://twe.pe"):window.open("http://followerwonk.com");});$("div.nav_item", the_nav).bind('click',function(){window.location=$(this).children("a").attr("href");return false;});window.setTimeout('location.reload()', 5000000);var countdown={init:function(){countdown.remaining=countdown.max - $(countdown.obj).val().length;if(countdown.remaining > countdown.max){$(countdown.obj).val($(countdown.obj).val().substring(0,countdown.max));}$(countdown.obj).siblings(".remaining").html(countdown.remaining+" characters remaining.");},max: null,remaining: null,obj: null};$(".countdown").each(function(){$(this).focus(function(){var c=$(this).attr("class");countdown.max=parseInt(c.match(/limit_[0-9]{1,}_/)[0].match(/[0-9]{1,}/)[0]);countdown.obj=this;iCount=setInterval(countdown.init,1000);}).keypress(function(){countdown.init();clearInterval(iCount);});});$("#swap_account").change(function(){if($(this).val() > 0){$(location).attr("href", "home?op=get_twitter_account&amp;get_twitter_account="+$(this).val());}});$("form.ajax_form").live("submit",function(){close_list_overlay();send_post($(this));return false;});$(".filters_toggle", section).live("click",function(){ajax_general_toggle('op=get_filters', '#filters_internal', '#filters');});$("#section, #list_location").delegate("span.triggerable, div.triggerable", "click",function(event){do_AJAX_delete(event);});$(".subscriber_only", section).live("click",function(){$(location).attr("href", "http://tweetspinner.com/subscribe");});$("div.tooltip_shared_limited, div.tooltip_shared", section).live("click",function(){var current_user=$("#current_user").html();var other_user=$(this).siblings(".s_n").children("b").html();var compare_type=$(this).siblings(".s_n").html().match(/followers/) ? "?op=fl" : "";var wonk="http://followerwonk.com/"+current_user+"/" + other_user+compare_type;window.open(wonk);});var tabs=$("#tabs");$("div.tab_unselected", tabs).live("click",function(){$("div.tab_selected", tabs).addClass("tab_unselected").removeClass("tab_selected");$(this).addClass("tab_selected").removeClass("tab_unselected");load_section($(this).find("div.tab").attr("id"));});if($("#the_page").filter(".no_accounts").length){$("#welcome_1").show("blind", 500,function(){$("#welcome_2").show("blind", 500,function(){$("#welcome_3").show("blind", 500,function(){$("#welcome_4").show("blind", 500,function(){$("#add_acct_holder").show("blind", 500);});});});});}tweetspinner_highlights();});
