jQuery.cookie=function(c,o,r){if(typeof o!="undefined"){r=r||{};if(o===null){o="";r.expires=-1}var g="";if(r.expires&&(typeof r.expires=="number"||r.expires.toUTCString)){var k;if(typeof r.expires=="number"&&r.expires<3600000){k=new Date();k.setTime(k.getTime()+(r.expires*24*60*60*1000))}else{if(typeof r.expires=="number"&&r.expires>=3600000){k=new Date();k.setTime(k.getTime()+r.expires)}else{k=r.expires}}g="; expires="+k.toUTCString()}var q=r.path?"; path="+(r.path):"";var m=r.domain?"; domain="+(r.domain):"";var b=r.secure?"; secure":"";var j=[c,"=",encodeURIComponent(o),g,q,m,b].join("");document.cookie=j}else{var f=null;if(document.cookie&&document.cookie!=""){var p=document.cookie.split(";");for(var n=0;n<p.length;n++){var e=jQuery.trim(p[n]);if(e.substring(0,c.length+1)==(c+"=")){f=decodeURIComponent(e.substring(c.length+1));break}}}return f}};(function(c){c.fn.ajaxSubmit=function(t){if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof t=="function"){t={success:t}}t=c.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},t||{});var v={};this.trigger("form-pre-serialize",[this,t,v]);if(v.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}var o=this.formToArray(t.semantic);if(t.data){t.extraData=t.data;for(var g in t.data){o.push({name:g,value:t.data[g]})}}if(t.beforeSubmit&&t.beforeSubmit(o,this,t)===false){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[o,this,t,v]);if(v.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var f=c.param(o);if(t.type.toUpperCase()=="GET"){t.url+=(t.url.indexOf("?")>=0?"&":"?")+f;t.data=null}else{t.data=f}var u=this,m=[];if(t.resetForm){m.push(function(){u.resetForm()})}if(t.clearForm){m.push(function(){u.clearForm()})}if(!t.dataType&&t.target){var r=t.success||function(){};m.push(function(j){c(t.target).html(j).each(r,arguments)})}else{if(t.success){m.push(t.success)}}t.success=function(w,n){for(var q=0,j=m.length;q<j;q++){m[q](w,n,u)}};var e=c("input:file",this).fieldValue();var s=false;for(var k=0;k<e.length;k++){if(e[k]){s=true}}if(t.iframe||s){if(c.browser.safari&&t.closeKeepAlive){c.get(t.closeKeepAlive,p)}else{p()}}else{c.ajax(t)}this.trigger("form-submit-notify",[this,t]);return this;function p(){var y=u[0];if(c(":input[@name=submit]",y).length){alert('Error: Form elements must not be named "submit".');return}var w=c.extend({},c.ajaxSettings,t);var x="jqFormIO"+(new Date().getTime());var D=c('<iframe id="'+x+'" name="'+x+'" />');var F=D[0];if(c.browser.msie||c.browser.opera){F.src='javascript:false;document.write("");'}D.css({position:"absolute",top:"-1000px",left:"-1000px"});var G={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var E=w.global;if(E&&!c.active++){c.event.trigger("ajaxStart")}if(E){c.event.trigger("ajaxSend",[G,w])}var q=0;var A=0;var j=y.clk;if(j){var z=j.name;if(z&&!j.disabled){t.extraData=t.extraData||{};t.extraData[z]=j.value;if(j.type=="image"){t.extraData[name+".x"]=y.clk_x;t.extraData[name+".y"]=y.clk_y}}}setTimeout(function(){var J=u.attr("target"),H=u.attr("action");u.attr({target:x,encoding:"multipart/form-data",enctype:"multipart/form-data",method:"POST",action:w.url});if(w.timeout){setTimeout(function(){A=true;B()},w.timeout)}var I=[];try{if(t.extraData){for(var K in t.extraData){I.push(c('<input type="hidden" name="'+K+'" value="'+t.extraData[K]+'" />').appendTo(y)[0])}}D.appendTo("body");F.attachEvent?F.attachEvent("onload",B):F.addEventListener("load",B,false);y.submit()}finally{u.attr("action",H);J?u.attr("target",J):u.removeAttr("target");c(I).remove()}},10);function B(){if(q++){return}F.detachEvent?F.detachEvent("onload",B):F.removeEventListener("load",B,false);var H=0;var I=true;try{if(A){throw"timeout"}var J,L;L=F.contentWindow?F.contentWindow.document:F.contentDocument?F.contentDocument:F.document;if(L.body==null&&!H&&c.browser.opera){H=1;q--;setTimeout(B,100);return}G.responseText=L.body?L.body.innerHTML:null;G.responseXML=L.XMLDocument?L.XMLDocument:L;G.getResponseHeader=function(N){var M={"content-type":w.dataType};return M[N]};if(w.dataType=="json"||w.dataType=="script"){var n=L.getElementsByTagName("textarea")[0];G.responseText=n?n.value:G.responseText}else{if(w.dataType=="xml"&&!G.responseXML&&G.responseText!=null){G.responseXML=C(G.responseText)}}J=c.httpData(G,w.dataType)}catch(K){I=false;c.handleError(w,G,"error",K)}if(I){w.success(J,"success");if(E){c.event.trigger("ajaxSuccess",[G,w])}}if(E){c.event.trigger("ajaxComplete",[G,w])}if(E&&!--c.active){c.event.trigger("ajaxStop")}if(w.complete){w.complete(G,I?"success":"error")}setTimeout(function(){D.remove();G.responseXML=null},100)}function C(n,H){if(window.ActiveXObject){H=new ActiveXObject("Microsoft.XMLDOM");H.async="false";H.loadXML(n)}else{H=(new DOMParser()).parseFromString(n,"text/xml")}return(H&&H.documentElement&&H.documentElement.tagName!="parsererror")?H:null}}};c.fn.ajaxForm=function(e){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){c(this).ajaxSubmit(e);return false}).each(function(){c(":submit,input:image",this).bind("click.form-plugin",function(g){var f=this.form;f.clk=this;if(this.type=="image"){if(g.offsetX!=undefined){f.clk_x=g.offsetX;f.clk_y=g.offsetY}else{if(typeof c.fn.offset=="function"){var j=c(this).offset();f.clk_x=g.pageX-j.left;f.clk_y=g.pageY-j.top}else{f.clk_x=g.pageX-this.offsetLeft;f.clk_y=g.pageY-this.offsetTop}}}setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},10)})})};c.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){c(":submit,input:image",this).unbind("click.form-plugin")})};c.fn.formToArray=function(u){var t=[];if(this.length==0){return t}var f=this[0];var o=u?f.getElementsByTagName("*"):f.elements;if(!o){return t}for(var p=0,r=o.length;p<r;p++){var g=o[p];var k=g.name;if(!k){continue}if(u&&f.clk&&g.type=="image"){if(!g.disabled&&f.clk==g){t.push({name:k+".x",value:f.clk_x},{name:k+".y",value:f.clk_y})}continue}var w=c.fieldValue(g,true);if(w&&w.constructor==Array){for(var m=0,e=w.length;m<e;m++){t.push({name:k,value:w[m]})}}else{if(w!==null&&typeof w!="undefined"){t.push({name:k,value:w})}}}if(!u&&f.clk){var q=f.getElementsByTagName("input");for(var p=0,r=q.length;p<r;p++){var s=q[p];var k=s.name;if(k&&!s.disabled&&s.type=="image"&&f.clk==s){t.push({name:k+".x",value:f.clk_x},{name:k+".y",value:f.clk_y})}}}return t};c.fn.formSerialize=function(e){return c.param(this.formToArray(e))};c.fn.fieldSerialize=function(f){var e=[];this.each(function(){var m=this.name;if(!m){return}var j=c.fieldValue(this,f);if(j&&j.constructor==Array){for(var k=0,g=j.length;k<g;k++){e.push({name:m,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){e.push({name:this.name,value:j})}}});return c.param(e)};c.fn.fieldValue=function(m){for(var k=[],g=0,e=this.length;g<e;g++){var j=this[g];var f=c.fieldValue(j,m);if(f===null||typeof f=="undefined"||(f.constructor==Array&&!f.length)){continue}f.constructor==Array?c.merge(k,f):k.push(f)}return k};c.fieldValue=function(e,o){var g=e.name,u=e.type,w=e.tagName.toLowerCase();if(typeof o=="undefined"){o=true}if(o&&(!g||e.disabled||u=="reset"||u=="button"||(u=="checkbox"||u=="radio")&&!e.checked||(u=="submit"||u=="image")&&e.form&&e.form.clk!=e||w=="select"&&e.selectedIndex==-1)){return null}if(w=="select"){var p=e.selectedIndex;if(p<0){return null}var r=[],f=e.options;var k=(u=="select-one");var q=(k?p+1:f.length);for(var j=(k?p:0);j<q;j++){var m=f[j];if(m.selected){var s=c.browser.msie&&!(m.attributes.value.specified)?m.text:m.value;if(k){return s}r.push(s)}}return r}return e.value};c.fn.clearForm=function(){return this.each(function(){c("input,select,textarea",this).clearFields()})};c.fn.clearFields=c.fn.clearInputs=function(){return this.each(function(){var f=this.type,e=this.tagName.toLowerCase();if(f=="text"||f=="password"||e=="textarea"){this.value=""}else{if(f=="checkbox"||f=="radio"){this.checked=false}else{if(e=="select"){this.selectedIndex=-1}}}})};c.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};c.fn.enable=function(e){if(e==undefined){e=true}return this.each(function(){this.disabled=!e})};c.fn.select=function(e){if(e==undefined){e=true}return this.each(function(){var f=this.type;if(f=="checkbox"||f=="radio"){this.checked=e}else{if(this.tagName.toLowerCase()=="option"){var g=c(this).parent("select");if(e&&g[0]&&g[0].type=="select-one"){g.find("option").select(false)}this.selected=e}}})};function b(){if(c.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);Scroller={speed:10,gy:function(b){gy=b.offsetTop;if(b.offsetParent){while(b=b.offsetParent){gy+=b.offsetTop}}return gy},scrollTop:function(){body=document.body;d=document.documentElement;if(body&&body.scrollTop){return body.scrollTop}if(d&&d.scrollTop){return d.scrollTop}if(window.pageYOffset){return window.pageYOffset}return 0},add:function(c,b,e){if(c.addEventListener){return c.addEventListener(b,e,false)}if(c.attachEvent){return c.attachEvent("on"+b,e)}},end:function(b){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;return}if(b.preventDefault&&b.stopPropagation){b.preventDefault();b.stopPropagation()}},scroll:function(b){i=window.innerHeight||document.documentElement.clientHeight;h=document.body.scrollHeight;a=Scroller.scrollTop();if(b>a){if(h-b>i){a+=Math.ceil((b-a)/Scroller.speed)}else{a+=Math.ceil((b-a-(h-b))/Scroller.speed)}}else{a=a+(b-a)/Scroller.speed}window.scrollTo(0,a);if(a==b||Scroller.offsetTop==a){clearInterval(Scroller.interval)}Scroller.offsetTop=a},init:function(){Scroller.add(window,"load",Scroller.render)},render:function(){a=document.getElementsByTagName("a");Scroller.end(this);window.onscroll;for(i=0;i<a.length;i++){l=a[i];if(l.href&&l.href.indexOf("#")!=-1&&((l.pathname==location.pathname)||("/"+l.pathname==location.pathname))){Scroller.add(l,"click",Scroller.end);l.onclick=function(){Scroller.end(this);l=this.hash.substr(1);div=document.getElementsByTagName("div");for(i=0;i<div.length;i++){if(div[i].id==l){clearInterval(Scroller.interval);Scroller.interval=setInterval("Scroller.scroll("+Scroller.gy(div[i])+")",10)}}}}}}};Scroller.init();