if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z";};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};var cx=new RegExp("/[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g"),escapeable=new RegExp('/[\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g'),gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c;}return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}return{stringify:function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");}};}();}(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a);},M=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this;}if(typeof e==="string"){var c=M.exec(e);if(c&&(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b);}else{var a=document.getElementById(c[3]);if(a&&a.id!=c[3]){return T().find(e);}var d=T(a||[]);d.context=document;d.selector=e;return d;}}else{return T(b).find(e);}}else{if(T.isFunction(e)){return T(document).ready(e);}}if(e.selector&&e.context){this.selector=e.selector;this.context=e.context;}return this.setArray(T.isArray(e)?e:T.makeArray(e));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(a){return a===ab?Array.prototype.slice.call(this):this[a];},pushStack:function(c,a,d){var b=T(c);b.prevObject=this;b.context=this.context;if(a==="find"){b.selector=this.selector+(this.selector?" ":"")+d;}else{if(a){b.selector=this.selector+"."+a+"("+d+")";}}return b;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(a,b){return T.each(this,a,b);},index:function(a){return T.inArray(a&&a.jquery?a[0]:a,this);},attr:function(c,a,b){var d=c;if(typeof c==="string"){if(a===ab){return this[0]&&T[b||"attr"](this[0],c);}else{d={};d[c]=a;}}return this.each(function(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c));}});},css:function(b,a){if((b=="width"||b=="height")&&parseFloat(a)<0){a=ab;}return this.attr(b,a,"curCSS");},text:function(a){if(typeof a!=="object"&&a!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a));}var b="";T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this]);}});});return b;},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0]);}a.map(function(){var c=this;while(c.firstChild){c=c.firstChild;}return c;}).append(this);}return this;},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a);});},wrap:function(a){return this.each(function(){T(this).wrapAll(a);});},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a);}});},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||T([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(b){if(this.length===1){var a=this.pushStack([],"find",b);a.length=0;T.find(b,this[0],a);return a;}else{return this.pushStack(T.unique(T.map(this,function(c){return T.find(b,c);})),"find",b);}},clone:function(b){var d=this.map(function(){if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){var f=this.outerHTML;if(!f){var e=this.ownerDocument.createElement("div");e.appendChild(this.cloneNode(true));f=e.innerHTML;}return T.clean([f.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else{return this.cloneNode(true);}});if(b===true){var a=this.find("*").andSelf(),c=0;d.find("*").andSelf().each(function(){if(this.nodeName!==a[c].nodeName){return;}var g=T.data(a[c],"events");for(var e in g){for(var f in g[e]){T.event.add(this,e,g[e][f],g[e][f].data);}}c++;});}return d;},filter:function(a){return this.pushStack(T.isFunction(a)&&T.grep(this,function(b,c){return a.call(b,c);})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1;})),"filter",a);},closest:function(c){var a=T.expr.match.POS.test(c)?T(c):null,b=0;return this.map(function(){var d=this;while(d&&d.ownerDocument){if(a?a.index(d)>-1:T(d).is(c)){T.data(d,"closest",b);return d;}d=d.parentNode;b++;}});},not:function(b){if(typeof b==="string"){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),"not",b);}else{b=T.multiFilter(b,this);}}var a=b.length&&b[b.length-1]!==ab&&!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)<0:this!=b;});},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a==="string"?T(a):T.makeArray(a))));},is:function(a){return !!a&&T.multiFilter(a,this).length>0;},hasClass:function(a){return !!a&&this.is("."+a);},val:function(c){if(c===ab){var i=this[0];if(i){if(T.nodeName(i,"option")){return(i.attributes.value||{}).specified?i.value:i.text;}if(T.nodeName(i,"select")){var e=i.selectedIndex,b=[],a=i.options,f=i.type=="select-one";if(e<0){return null;}for(var h=f?e:0,d=f?e+1:a.length;h<d;h++){var g=a[h];if(g.selected){c=T(g).val();if(f){return c;}b.push(c);}}return b;}return(i.value||"").replace(/\r/g,"");}return ab;}if(typeof c==="number"){c+="";}return this.each(function(){if(this.nodeType!=1){return;}if(T.isArray(c)&&/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,c)>=0||T.inArray(this.name,c)>=0);}else{if(T.nodeName(this,"select")){var j=T.makeArray(c);T("option",this).each(function(){this.selected=(T.inArray(this.value,j)>=0||T.inArray(this.text,j)>=0);});if(!j.length){this.selectedIndex=-1;}}else{this.value=c;}}});},html:function(a){return a===ab?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(a);},replaceWith:function(a){return this.after(a).remove();},eq:function(a){return this.slice(a,+a+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(a){return this.pushStack(T.map(this,function(b,c){return a.call(b,c,b);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(d,a,b){if(this[0]){var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild;if(f){for(var g=0,i=this.length;g<i;g++){b.call(c(this[g],f),this.length>1||g>0?e.cloneNode(true):e);}}if(h){T.each(h,E);}}return this;function c(k,j){return a&&T.nodeName(k,"table")&&T.nodeName(j,"tr")?(k.getElementsByTagName("tbody")[0]||k.appendChild(k.ownerDocument.createElement("tbody"))):k;}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:"script"});}else{T.globalEval(a.text||a.textContent||a.innerHTML||"");}if(a.parentNode){a.parentNode.removeChild(a);}}function ad(){return +new Date;}T.extend=T.fn.extend=function(){var c=arguments[0]||{},e=1,d=arguments.length,h=false,f;if(typeof c==="boolean"){h=c;c=arguments[1]||{};e=2;}if(typeof c!=="object"&&!T.isFunction(c)){c={};}if(d==e){c=this;--e;}for(;e<d;e++){if((f=arguments[e])!=null){for(var g in f){var b=c[g],a=f[g];if(c===a){continue;}if(h&&a&&typeof a==="object"&&!a.nodeType){c[g]=T.extend(h,b||(a.length!=null?[]:{}),a);}else{if(a!==ab){c[g]=a;}}}}}return c;};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F;}return T;},isFunction:function(a){return L.call(a)==="[object Function]";},isArray:function(a){return L.call(a)==="[object Array]";},isXMLDoc:function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&T.isXMLDoc(a.ownerDocument);},globalEval:function(a){if(a&&/\S/.test(a)){var b=document.getElementsByTagName("head")[0]||document.documentElement,c=document.createElement("script");c.type="text/javascript";if(T.support.scriptEval){c.appendChild(document.createTextNode(a));}else{c.text=a;}b.insertBefore(c,b.firstChild);b.removeChild(c);}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase();},each:function(e,a,f){var g,d=0,c=e.length;if(f){if(c===ab){for(g in e){if(a.apply(e[g],f)===false){break;}}}else{for(;d<c;){if(a.apply(e[d++],f)===false){break;}}}}else{if(c===ab){for(g in e){if(a.call(e[g],g,e[g])===false){break;}}}else{for(var b=e[0];d<c&&a.call(b,d,b)!==false;b=e[++d]){}}}return e;},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d);}return typeof a==="number"&&c=="curCSS"&&!ag.test(e)?a+"px":a;},className:{add:function(b,a){T.each((a||"").split(/\s+/),function(d,c){if(b.nodeType==1&&!T.className.has(b.className,c)){b.className+=(b.className?" ":"")+c;}});},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){return !T.className.has(a,c);}).join(" "):"";}},has:function(a,b){return a&&T.inArray(b,(a.className||a).toString().split(/\s+/))>-1;}},swap:function(b,c,a){var e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d];}a.call(b);for(var d in c){b.style[d]=e[d];}},css:function(e,g,c,h){if(g=="width"||g=="height"){var a,f={position:"absolute",visibility:"hidden",display:"block"},b=g=="width"?["Left","Right"]:["Top","Bottom"];function d(){a=g=="width"?e.offsetWidth:e.offsetHeight;if(h==="border"){return;}T.each(b,function(){if(!h){a-=parseFloat(T.curCSS(e,"padding"+this,true))||0;}if(h==="margin"){a+=parseFloat(T.curCSS(e,"margin"+this,true))||0;}else{a-=parseFloat(T.curCSS(e,"border"+this+"Width",true))||0;}});}if(e.offsetWidth!==0){d();}else{T.swap(e,f,d);}return Math.max(0,Math.round(a));}return T.curCSS(e,g,c);},curCSS:function(e,h,g){var b,i=e.style;if(h=="opacity"&&!T.support.opacity){b=T.attr(i,"opacity");return b==""?"1":b;}if(h.match(/float/i)){h=H;}if(!g&&i&&i[h]){b=i[h];}else{if(Q.getComputedStyle){if(h.match(/float/i)){h="float";}h=h.replace(/([A-Z])/g,"-$1").toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(h);}if(h=="opacity"&&b==""){b="1";}}else{if(e.currentStyle){var d=h.replace(/\-(\w)/g,function(k,j){return j.toUpperCase();});b=e.currentStyle[h]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){var f=i.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;i.left=b||0;b=i.pixelLeft+"px";i.left=f;e.runtimeStyle.left=c;}}}}return b;},clean:function(g,b,d){b=b||document;if(typeof b.createElement==="undefined"){b=b.ownerDocument||b[0]&&b[0].ownerDocument||document;}if(!d&&g.length===1&&typeof g[0]==="string"){var e=/^<(\w+)\s*\/?>$/.exec(g[0]);if(e){return[b.createElement(e[1])];}}var f=[],h=[],a=b.createElement("div");T.each(g,function(l,i){if(typeof i==="number"){i+="";}if(!i){return;}if(typeof i==="string"){i=i.replace(/(<(\w+)[^>]*?)\/>/g,function(q,p,r){return r.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?q:p+"></"+r+">";});var m=i.replace(/^\s+/,"").substring(0,10).toLowerCase();var k=!m.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!m.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||m.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!m.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!m.indexOf("<td")||!m.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!m.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];a.innerHTML=k[1]+i+k[2];while(k[0]--){a=a.lastChild;}if(!T.support.tbody){var j=/<tbody/i.test(i),n=!m.indexOf("<table")&&!j?a.firstChild&&a.firstChild.childNodes:k[1]=="<table>"&&!j?a.childNodes:[];for(var o=n.length-1;o>=0;--o){if(T.nodeName(n[o],"tbody")&&!n[o].childNodes.length){n[o].parentNode.removeChild(n[o]);}}}if(!T.support.leadingWhitespace&&/^\s/.test(i)){a.insertBefore(b.createTextNode(i.match(/^\s*/)[0]),a.firstChild);}i=T.makeArray(a.childNodes);}if(i.nodeType){f.push(i);}else{f=T.merge(f,i);}});if(d){for(var c=0;f[c];c++){if(T.nodeName(f[c],"script")&&(!f[c].type||f[c].type.toLowerCase()==="text/javascript")){h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c]);}else{if(f[c].nodeType===1){f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName("script"))));}d.appendChild(f[c]);}}return h;}return f;},attr:function(c,f,b){if(!c||c.nodeType==3||c.nodeType==8){return ab;}var e=!T.isXMLDoc(c),a=b!==ab;f=e&&T.props[f]||f;if(c.tagName){var g=/href|src|style/.test(f);if(f=="selected"&&c.parentNode){c.parentNode.selectedIndex;}if(f in c&&e&&!g){if(a){if(f=="type"&&T.nodeName(c,"input")&&c.parentNode){throw"type property can't be changed";}c[f]=b;}if(T.nodeName(c,"form")&&c.getAttributeNode(f)){return c.getAttributeNode(f).nodeValue;}if(f=="tabIndex"){var d=c.getAttributeNode("tabIndex");return d&&d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&&c.href?0:ab;}return c[f];}if(!T.support.style&&e&&f=="style"){return T.attr(c.style,"cssText",b);}if(a){c.setAttribute(f,""+b);}var h=!T.support.hrefNormalized&&e&&g?c.getAttribute(f,2):c.getAttribute(f);return h===null?ab:h;}if(!T.support.opacity&&f=="opacity"){if(a){c.zoom=1;c.filter=(c.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(b)+""=="NaN"?"":"alpha(opacity="+b*100+")");}return c.filter&&c.filter.indexOf("opacity=")>=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}f=f.replace(/-([a-z])/ig,function(j,i){return i.toUpperCase();});if(a){c[f]=b;}return c[f];},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var c=[];if(a!=null){var b=a.length;if(b==null||typeof a==="string"||T.isFunction(a)||a.setInterval){c[0]=a;}else{while(b){c[--b]=a[b];}}}return c;},inArray:function(b,a){for(var d=0,c=a.length;d<c;d++){if(a[d]===b){return d;}}return -1;},merge:function(b,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c;}}}else{while((c=e[d++])!=null){b[a++]=c;}}return b;},unique:function(a){var f=[],g={};try{for(var e=0,d=a.length;e<d;e++){var b=T.data(a[e]);if(!g[b]){g[b]=true;f.push(a[e]);}}}catch(c){f=a;}return f;},grep:function(e,a,f){var d=[];for(var c=0,b=e.length;c<b;c++){if(!f!=!a(e[c],c)){d.push(e[c]);}}return d;},map:function(f,a){var e=[];for(var d=0,c=f.length;d<c;d++){var b=a(f[d],d);if(b!=null){e[e.length]=b;}}return e.concat.apply([],e);}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&&!/opera/.test(O),mozilla:/mozilla/.test(O)&&!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode;},parents:function(a){return T.dir(a,"parentNode");},next:function(a){return T.nth(a,2,"nextSibling");},prev:function(a){return T.nth(a,2,"previousSibling");},nextAll:function(a){return T.dir(a,"nextSibling");},prevAll:function(a){return T.dir(a,"previousSibling");},siblings:function(a){return T.sibling(a.parentNode.firstChild,a);},children:function(a){return T.sibling(a.firstChild);},contents:function(a){return T.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes);}},function(b,a){T.fn[b]=function(d){var c=T.map(this,a);if(d&&typeof d=="string"){c=T.multiFilter(d,c);}return this.pushStack(T.unique(c),b,d);};});T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,a){T.fn[b]=function(h){var e=[],c=T(h);for(var d=0,g=c.length;d<g;d++){var f=(d>0?this.clone(true):this).get();T.fn[a].apply(T(c[d]),f);e=e.concat(f);}return this.pushStack(e,b,h);};});T.each({removeAttr:function(a){T.attr(this,a,"");if(this.nodeType==1){this.removeAttribute(a);}},addClass:function(a){T.className.add(this,a);},removeClass:function(a){T.className.remove(this,a);},toggleClass:function(a,b){if(typeof b!=="boolean"){b=!T.className.has(this,a);}T.className[b?"add":"remove"](this,a);},remove:function(a){if(!a||T.filter(a,[this]).length){T("*",this).add([this]).each(function(){T.event.remove(this);T.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){T(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments);};});function Y(b,a){return b[0]&&parseInt(T.curCSS(b[0],a,true),10)||0;}var aa="jQuery"+ad(),I=0,R={};T.extend({cache:{},data:function(c,d,b){c=c==W?R:c;var a=c[aa];if(!a){a=c[aa]=++I;}if(d&&!T.cache[a]){T.cache[a]={};}if(b!==ab){T.cache[a][d]=b;}return d?T.cache[a][d]:a;},removeData:function(c,d){c=c==W?R:c;var a=c[aa];if(d){if(T.cache[a]){delete T.cache[a][d];d="";for(d in T.cache[a]){break;}if(!d){T.removeData(c);}}}else{try{delete c[aa];}catch(b){if(c.removeAttribute){c.removeAttribute(aa);}}delete T.cache[a];}},queue:function(c,d,a){if(c){d=(d||"fx")+"queue";var b=T.data(c,d);if(!b||T.isArray(a)){b=T.data(c,d,T.makeArray(a));}else{if(a){b.push(a);}}}return b;},dequeue:function(a,b){var d=T.queue(a,b),c=d.shift();if(!b||b==="fx"){c=d[0];}if(c!==ab){c.call(a);}}});T.fn.extend({data:function(d,b){var a=d.split(".");a[1]=a[1]?"."+a[1]:"";if(b===ab){var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);if(c===ab&&this.length){c=T.data(this[0],d);}return c===ab&&a[1]?this.data(a[0]):c;}else{return this.trigger("setData"+a[1]+"!",[a[0],b]).each(function(){T.data(this,d,b);});}},removeData:function(a){return this.each(function(){T.removeData(this,a);});},queue:function(b,a){if(typeof b!=="string"){a=b;b="fx";}if(a===ab){return T.queue(this[0],b);}return this.each(function(){var c=T.queue(this,b,a);if(b=="fx"&&c.length==1){c[0].call(this);}});},dequeue:function(a){return this.each(function(){T.dequeue(this,a);});}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,h=0,l=Object.prototype.toString;var n=function(r,v,ai,D){ai=ai||[];v=v||document;if(v.nodeType!==1&&v.nodeType!==9){return[];}if(!r||typeof r!=="string"){return ai;}var q=[],t,A,x,w,C,u,s=true;b.lastIndex=0;while((t=b.exec(r))!==null){q.push(t[1]);if(t[2]){u=RegExp.rightContext;break;}}if(q.length>1&&g.exec(r)){if(q.length===2&&k.relative[q[0]]){A=j(q[0]+q[1],v);}else{A=k.relative[q[0]]?[v]:n(q.shift(),v);while(q.length){r=q.shift();if(k.relative[r]){r+=q.shift();}A=j(r,A);}}}else{var B=D?{expr:q.pop(),set:o(D)}:n.find(q.pop(),q.length===1&&v.parentNode?v.parentNode:v,c(v));A=n.filter(B.expr,B.set);if(q.length>0){x=o(A);}else{s=false;}while(q.length){var y=q.pop(),z=y;if(!k.relative[y]){y="";}else{z=q.pop();}if(z==null){z=v;}k.relative[y](x,z,c(v));}}if(!x){x=A;}if(!x){throw"Syntax error, unrecognized expression: "+(y||r);}if(l.call(x)==="[object Array]"){if(!s){ai.push.apply(ai,x);}else{if(v.nodeType===1){for(var p=0;x[p]!=null;p++){if(x[p]&&(x[p]===true||x[p].nodeType===1&&i(v,x[p]))){ai.push(A[p]);}}}else{for(var p=0;x[p]!=null;p++){if(x[p]&&x[p].nodeType===1){ai.push(A[p]);}}}}}else{o(x,ai);}if(u){n(u,v,ai,D);if(m){hasDuplicate=false;ai.sort(m);if(hasDuplicate){for(var p=1;p<ai.length;p++){if(ai[p]===ai[p-1]){ai.splice(p--,1);}}}}}return ai;};n.matches=function(q,p){return n(q,null,null,p);};n.find=function(p,w,x){var q,s;if(!p){return[];}for(var t=0,u=k.order.length;t<u;t++){var r=k.order[t],s;if((s=k.match[r].exec(p))){var v=RegExp.leftContext;if(v.substr(v.length-1)!=="\\"){s[1]=(s[1]||"").replace(/\\/g,"");q=k.find[r](s,w,x);if(q!=null){p=p.replace(k.match[r],"");break;}}}}if(!q){q=w.getElementsByTagName("*");}return{set:q,expr:p};};n.filter=function(C,D,z,t){var u=C,x=[],p=D,r,w,q=D&&D[0]&&c(D[0]);while(C&&D.length){for(var ai in k.filter){if((r=k.match[ai].exec(C))!=null){var v=k.filter[ai],y,A;w=false;if(p==x){x=[];}if(k.preFilter[ai]){r=k.preFilter[ai](r,p,z,x,t,q);if(!r){w=y=true;}else{if(r===true){continue;}}}if(r){for(var s=0;(A=p[s])!=null;s++){if(A){y=v(A,r,s,p);var B=t^!!y;if(z&&y!=null){if(B){w=true;}else{p[s]=false;}}else{if(B){x.push(A);w=true;}}}}}if(y!==ab){if(!z){p=x;}C=C.replace(k.match[ai],"");if(!w){return[];}break;}}}if(C==u){if(w==null){throw"Syntax error, unrecognized expression: "+C;}else{break;}}u=C;}return p;};var k=n.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(p){return p.getAttribute("href");}},relative:{"+":function(p,w,q){var s=typeof w==="string",x=s&&!/\W/.test(w),r=s&&!x;if(x&&!q){w=w.toUpperCase();}for(var t=0,u=p.length,v;t<u;t++){if((v=p[t])){while((v=v.previousSibling)&&v.nodeType!==1){}p[t]=r||v&&v.nodeName===w?v||false:v===w;}}if(r){n.filter(w,p,true);}},">":function(u,r,t){var w=typeof r==="string";if(w&&!/\W/.test(r)){r=t?r:r.toUpperCase();for(var q=0,s=u.length;q<s;q++){var v=u[q];if(v){var p=v.parentNode;u[q]=p.nodeName===r?p:false;}}}else{for(var q=0,s=u.length;q<s;q++){var v=u[q];if(v){u[q]=w?v.parentNode:v.parentNode===r;}}if(w){n.filter(r,u,true);}}},"":function(p,r,t){var q=h++,s=a;if(!r.match(/\W/)){var u=r=t?r:r.toUpperCase();s=d;}s("parentNode",r,q,p,u,t);},"~":function(p,r,t){var q=h++,s=a;if(typeof r==="string"&&!r.match(/\W/)){var u=r=t?r:r.toUpperCase();s=d;}s("previousSibling",r,q,p,u,t);}},find:{ID:function(r,q,p){if(typeof q.getElementById!=="undefined"&&!p){var s=q.getElementById(r[1]);return s?[s]:[];}},NAME:function(q,u,t){if(typeof u.getElementsByName!=="undefined"){var r=[],v=u.getElementsByName(q[1]);for(var p=0,s=v.length;p<s;p++){if(v[p].getAttribute("name")===q[1]){r.push(v[p]);}}return r.length===0?null:r;}},TAG:function(q,p){return p.getElementsByTagName(q[1]);}},preFilter:{CLASS:function(p,r,q,s,u,t){p=" "+p[1].replace(/\\/g,"")+" ";if(t){return p;}for(var w=0,v;(v=r[w])!=null;w++){if(v){if(u^(v.className&&(" "+v.className+" ").indexOf(p)>=0)){if(!q){s.push(v);}}else{if(q){r[w]=false;}}}}return false;},ID:function(p){return p[1].replace(/\\/g,"");},TAG:function(q,r){for(var p=0;r[p]===false;p++){}return r[p]&&c(r[p])?q[1]:q[1].toUpperCase();},CHILD:function(q){if(q[1]=="nth"){var p=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(q[2]=="even"&&"2n"||q[2]=="odd"&&"2n+1"||!/\D/.test(q[2])&&"0n+"+q[2]||q[2]);q[2]=(p[1]+(p[2]||1))-0;q[3]=p[3]-0;}q[0]=h++;return q;},ATTR:function(v,r,q,s,u,t){var p=v[1].replace(/\\/g,"");if(!t&&k.attrMap[p]){v[1]=k.attrMap[p];}if(v[2]==="~="){v[4]=" "+v[4]+" ";}return v;},PSEUDO:function(u,r,q,s,t){if(u[1]==="not"){if(u[3].match(b).length>1||/^\w/.test(u[3])){u[3]=n(u[3],null,null,r);}else{var p=n.filter(u[3],r,q,true^t);if(!q){s.push.apply(s,p);}return false;}}else{if(k.match.POS.test(u[0])||k.match.CHILD.test(u[0])){return true;}}return u;},POS:function(p){p.unshift(true);return p;}},filters:{enabled:function(p){return p.disabled===false&&p.type!=="hidden";},disabled:function(p){return p.disabled===true;},checked:function(p){return p.checked===true;},selected:function(p){p.parentNode.selectedIndex;return p.selected===true;},parent:function(p){return !!p.firstChild;},empty:function(p){return !p.firstChild;},has:function(p,q,r){return !!n(r[3],p).length;},header:function(p){return/h\d/i.test(p.nodeName);},text:function(p){return"text"===p.type;},radio:function(p){return"radio"===p.type;},checkbox:function(p){return"checkbox"===p.type;},file:function(p){return"file"===p.type;},password:function(p){return"password"===p.type;},submit:function(p){return"submit"===p.type;},image:function(p){return"image"===p.type;},reset:function(p){return"reset"===p.type;},button:function(p){return"button"===p.type||p.nodeName.toUpperCase()==="BUTTON";},input:function(p){return/input|select|textarea|button/i.test(p.nodeName);}},setFilters:{first:function(p,q){return q===0;},last:function(q,r,s,p){return r===p.length-1;},even:function(p,q){return q%2===0;},odd:function(p,q){return q%2===1;},lt:function(p,q,r){return q<r[3]-0;},gt:function(p,q,r){return q>r[3]-0;},nth:function(p,q,r){return r[3]-0==q;},eq:function(p,q,r){return r[3]-0==q;}},filter:{PSEUDO:function(u,q,p,t){var r=q[1],w=k.filters[r];if(w){return w(u,p,q,t);}else{if(r==="contains"){return(u.textContent||u.innerText||"").indexOf(q[3])>=0;}else{if(r==="not"){var v=q[3];for(var p=0,s=v.length;p<s;p++){if(v[p]===u){return false;}}return true;}}}},CHILD:function(w,t){var q=t[1],v=w;switch(q){case"only":case"first":while(v=v.previousSibling){if(v.nodeType===1){return false;}}if(q=="first"){return true;}v=w;case"last":while(v=v.nextSibling){if(v.nodeType===1){return false;}}return true;case"nth":var u=t[2],x=t[3];if(u==1&&x==0){return true;}var r=t[0],y=w.parentNode;if(y&&(y.sizcache!==r||!w.nodeIndex)){var s=0;for(v=y.firstChild;v;v=v.nextSibling){if(v.nodeType===1){v.nodeIndex=++s;}}y.sizcache=r;}var p=w.nodeIndex-x;if(u==0){return p==0;}else{return(p%u==0&&p/u>=0);}}},ID:function(p,q){return p.nodeType===1&&p.getAttribute("id")===q;},TAG:function(p,q){return(q==="*"&&p.nodeType===1)||p.nodeName===q;},CLASS:function(p,q){return(" "+(p.className||p.getAttribute("class"))+" ").indexOf(q)>-1;},ATTR:function(u,p){var q=p[1],s=k.attrHandle[q]?k.attrHandle[q](u):u[q]!=null?u[q]:u.getAttribute(q),t=s+"",v=p[2],r=p[4];return s==null?v==="!=":v==="="?t===r:v==="*="?t.indexOf(r)>=0:v==="~="?(" "+t+" ").indexOf(r)>=0:!r?t&&s!==false:v==="!="?t!=r:v==="^="?t.indexOf(r)===0:v==="$="?t.substr(t.length-r.length)===r:v==="|="?t===r||t.substr(0,r.length+1)===r+"-":false;},POS:function(u,r,q,t){var s=r[2],p=k.setFilters[s];if(p){return p(u,q,r,t);}}}};var g=k.match.POS;for(var e in k.match){k.match[e]=RegExp(k.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var o=function(p,q){p=Array.prototype.slice.call(p);if(q){q.push.apply(q,p);return q;}return p;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(f){o=function(t,p){var r=p||[];if(l.call(t)==="[object Array]"){Array.prototype.push.apply(r,t);}else{if(typeof t.length==="number"){for(var q=0,s=t.length;q<s;q++){r.push(t[q]);}}else{for(var q=0;t[q];q++){r.push(t[q]);}}}return r;};}var m;if(document.documentElement.compareDocumentPosition){m=function(q,r){var p=q.compareDocumentPosition(r)&4?-1:q===r?0:1;if(p===0){hasDuplicate=true;}return p;};}else{if("sourceIndex" in document.documentElement){m=function(q,r){var p=q.sourceIndex-r.sourceIndex;if(p===0){hasDuplicate=true;}return p;};}else{if(document.createRange){m=function(p,r){var q=p.ownerDocument.createRange(),s=r.ownerDocument.createRange();q.selectNode(p);q.collapse(true);s.selectNode(r);s.collapse(true);var t=q.compareBoundaryPoints(Range.START_TO_END,s);if(t===0){hasDuplicate=true;}return t;};}}}(function(){var q=document.createElement("form"),p="script"+(new Date).getTime();q.innerHTML="<input name='"+p+"'/>";var r=document.documentElement;r.insertBefore(q,r.firstChild);if(!!document.getElementById(p)){k.find.ID=function(v,u,t){if(typeof u.getElementById!=="undefined"&&!t){var s=u.getElementById(v[1]);return s?s.id===v[1]||typeof s.getAttributeNode!=="undefined"&&s.getAttributeNode("id").nodeValue===v[1]?[s]:ab:[];}};k.filter.ID=function(t,s){var u=typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id");return t.nodeType===1&&u&&u.nodeValue===s;};}r.removeChild(q);})();(function(){var p=document.createElement("div");p.appendChild(document.createComment(""));if(p.getElementsByTagName("*").length>0){k.find.TAG=function(s,t){var u=t.getElementsByTagName(s[1]);if(s[1]==="*"){var q=[];for(var r=0;u[r];r++){if(u[r].nodeType===1){q.push(u[r]);}}u=q;}return u;};}p.innerHTML="<a href='#'></a>";if(p.firstChild&&typeof p.firstChild.getAttribute!=="undefined"&&p.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(q){return q.getAttribute("href",2);};}})();if(document.querySelectorAll){(function(){var q=n,p=document.createElement("div");p.innerHTML="<p class='TEST'></p>";if(p.querySelectorAll&&p.querySelectorAll(".TEST").length===0){return;}n=function(u,v,s,r){v=v||document;if(!r&&v.nodeType===9&&!c(v)){try{return o(v.querySelectorAll(u),s);}catch(t){}}return q(u,v,s,r);};n.find=q.find;n.filter=q.filter;n.selectors=q.selectors;n.matches=q.matches;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var p=document.createElement("div");p.innerHTML="<div class='test e'></div><div class='test'></div>";if(p.getElementsByClassName("e").length===0){return;}p.lastChild.className="e";if(p.getElementsByClassName("e").length===1){return;}k.order.splice(1,0,"CLASS");k.find.CLASS=function(s,r,q){if(typeof r.getElementsByClassName!=="undefined"&&!q){return r.getElementsByClassName(s[1]);}};})();}function d(v,q,r,x,p,y){var z=v=="previousSibling"&&!y;for(var t=0,u=x.length;t<u;t++){var w=x[t];if(w){if(z&&w.nodeType===1){w.sizcache=r;w.sizset=t;}w=w[v];var s=false;while(w){if(w.sizcache===r){s=x[w.sizset];break;}if(w.nodeType===1&&!y){w.sizcache=r;w.sizset=t;}if(w.nodeName===q){s=w;break;}w=w[v];}x[t]=s;}}}function a(v,q,r,x,p,y){var z=v=="previousSibling"&&!y;for(var t=0,u=x.length;t<u;t++){var w=x[t];if(w){if(z&&w.nodeType===1){w.sizcache=r;w.sizset=t;}w=w[v];var s=false;while(w){if(w.sizcache===r){s=x[w.sizset];break;}if(w.nodeType===1){if(!y){w.sizcache=r;w.sizset=t;}if(typeof q!=="string"){if(w===q){s=true;break;}}else{if(n.filter(q,[w]).length>0){s=w;break;}}}w=w[v];}x[t]=s;}}}var i=document.compareDocumentPosition?function(p,q){return p.compareDocumentPosition(q)&16;}:function(p,q){return p!==q&&(p.contains?p.contains(q):true);};var c=function(p){return p.nodeType===9&&p.documentElement.nodeName!=="HTML"||!!p.ownerDocument&&c(p.ownerDocument);};var j=function(s,u){var p=[],w="",v,q=u.nodeType?[u]:u;while((v=k.match.PSEUDO.exec(s))){w+=v[0];s=s.replace(k.match.PSEUDO,"");}s=k.relative[s]?s+"*":s;for(var t=0,r=q.length;t<r;t++){n(s,q[t],p);}return n.filter(w,p);};T.find=n;T.filter=n.filter;T.expr=n.selectors;T.expr[":"]=T.expr.filters;n.selectors.filters.hidden=function(p){return p.offsetWidth===0||p.offsetHeight===0;};n.selectors.filters.visible=function(p){return p.offsetWidth>0||p.offsetHeight>0;};n.selectors.filters.animated=function(p){return T.grep(T.timers,function(q){return p===q.elem;}).length;};T.multiFilter=function(p,r,q){if(q){p=":not("+p+")";}return n.matches(p,r);};T.dir=function(q,r){var s=[],p=q[r];while(p&&p!=document){if(p.nodeType==1){s.push(p);}p=p[r];}return s;};T.nth=function(t,s,q,p){s=s||1;var r=0;for(;t;t=t[q]){if(t.nodeType==1&&++r==s){break;}}return t;};T.sibling=function(p,q){var r=[];for(;p;p=p.nextSibling){if(p.nodeType==1&&p!=q){r.push(p);}}return r;};return;W.Sizzle=n;})();T.event={add:function(c,f,d,a){if(c.nodeType==3||c.nodeType==8){return;}if(c.setInterval&&c!=W){c=W;}if(!d.guid){d.guid=this.guid++;}if(a!==ab){var e=d;d=this.proxy(e);d.data=a;}var g=T.data(c,"events")||T.data(c,"events",{}),b=T.data(c,"handle")||T.data(c,"handle",function(){return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab;});b.elem=c;T.each(f.split(/\s+/),function(k,j){var i=j.split(".");j=i.shift();d.type=i.slice().sort().join(".");var h=g[j];if(T.event.specialAll[j]){T.event.specialAll[j].setup.call(c,a,i);}if(!h){h=g[j]={};if(!T.event.special[j]||T.event.special[j].setup.call(c,a,i)===false){if(c.addEventListener){c.addEventListener(j,b,false);}else{if(c.attachEvent){c.attachEvent("on"+j,b);}}}}h[d.guid]=d;T.event.global[j]=true;});c=null;},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return;}var f=T.data(b,"events"),g,h;if(f){if(e===ab||(typeof e==="string"&&e.charAt(0)==".")){for(var d in f){this.remove(b,d+(e||""));}}else{if(e.type){c=e.handler;e=e.type;}T.each(e.split(/\s+/),function(m,k){var i=k.split(".");k=i.shift();var l=RegExp("(^|\\.)"+i.slice().sort().join(".*\\.")+"(\\.|$)");if(f[k]){if(c){delete f[k][c.guid];}else{for(var j in f[k]){if(l.test(f[k][j].type)){delete f[k][j];}}}if(T.event.specialAll[k]){T.event.specialAll[k].teardown.call(b,i);}for(g in f[k]){break;}if(!g){if(!T.event.special[k]||T.event.special[k].teardown.call(b,i)===false){if(b.removeEventListener){b.removeEventListener(k,T.data(b,"handle"),false);}else{if(b.detachEvent){b.detachEvent("on"+k,T.data(b,"handle"));}}}g=null;delete f[k];}}});}for(g in f){break;}if(!g){var a=T.data(b,"handle");if(a){a.elem=null;}T.removeData(b,"events");T.removeData(b,"handle");}}},trigger:function(d,b,e,h){var f=d.type||d;if(!h){d=typeof d==="object"?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);if(f.indexOf("!")>=0){d.type=f=f.slice(0,-1);d.exclusive=true;}if(!e){d.stopPropagation();if(this.global[f]){T.each(T.cache,function(){if(this.events&&this.events[f]){T.event.trigger(d,b,this.handle.elem);}});}}if(!e||e.nodeType==3||e.nodeType==8){return ab;}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d);}d.currentTarget=e;var c=T.data(e,"handle");if(c){c.apply(e,b);}if((!e[f]||(T.nodeName(e,"a")&&f=="click"))&&e["on"+f]&&e["on"+f].apply(e,b)===false){d.result=false;}if(!h&&e[f]&&!d.isDefaultPrevented()&&!(T.nodeName(e,"a")&&f=="click")){this.triggered=true;try{e[f]();}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var g=e.parentNode||e.ownerDocument;if(g){T.event.trigger(d,b,g,true);}}},handle:function(b){var c,h;b=arguments[0]=T.event.fix(b||W.event);b.currentTarget=this;var a=b.type.split(".");b.type=a.shift();c=!a.length&&!b.exclusive;var d=RegExp("(^|\\.)"+a.slice().sort().join(".*\\.")+"(\\.|$)");h=(T.data(this,"events")||{})[b.type];for(var f in h){var e=h[f];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var g=e.apply(this,arguments);if(g!==ab){b.result=g;if(g===false){b.preventDefault();b.stopPropagation();}}if(b.isImmediatePropagationStopped()){break;}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(c){if(c[aa]){return c;}var e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[a];}if(!c.target){c.target=c.srcElement||document;}if(c.target.nodeType==3){c.target=c.target.parentNode;}if(!c.relatedTarget&&c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement;}if(c.pageX==null&&c.clientX!=null){var b=document.documentElement,f=document.body;c.pageX=c.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&&b.scrollTop||f&&f.scrollTop||0)-(b.clientTop||0);}if(!c.which&&((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode;}if(!c.metaKey&&c.ctrlKey){c.metaKey=c.ctrlKey;}if(!c.which&&c.button){c.which=(c.button&1?1:(c.button&2?3:(c.button&4?2:0)));}return c;},proxy:function(a,b){b=b||function(){return a.apply(this,arguments);};b.guid=a.guid=a.guid||b.guid||this.guid++;return b;},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af);},teardown:function(a){if(a.length){var c=0,b=RegExp("(^|\\.)"+a[0]+"(\\.|$)");T.each((T.data(this,"events").live||{}),function(){if(b.test(this.type)){c++;}});if(c<1){T.event.remove(this,a[0],af);}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a);}if(a&&a.type){this.originalEvent=a;this.type=a.type;}else{this.type=a;}this.timeStamp=ad();this[aa]=true;};function X(){return false;}function J(){return true;}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return;}if(a.preventDefault){a.preventDefault();}a.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return;}if(a.stopPropagation){a.stopPropagation();}a.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation();},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var c=b.relatedTarget;while(c&&c!=this){try{c=c.parentNode;}catch(a){c=this;}}if(c!=this){b.type=b.data;T.event.handle.apply(this,arguments);}};T.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b);},teardown:function(){T.event.remove(this,a,ah);}};});T.fn.extend({bind:function(b,a,c){return b=="unload"?this.one(b,a,c):this.each(function(){T.event.add(this,b,c||a,c&&a);});},one:function(b,a,c){var d=T.event.proxy(c||a,function(e){T(this).unbind(e,d);return(c||a).apply(this,arguments);});return this.each(function(){T.event.add(this,b,d,c&&a);});},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b);});},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this);});},triggerHandler:function(c,a){if(this[0]){var b=T.Event(c);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result;}},toggle:function(a){var c=arguments,b=1;while(b<c.length){T.event.proxy(a,c[b++]);}return this.click(T.event.proxy(a,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(b,a){return this.mouseenter(b).mouseleave(a);},ready:function(a){P();if(T.isReady){a.call(document,T);}else{T.readyList.push(a);}return this;},live:function(a,b){var c=T.event.proxy(b);c.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,c);return this;},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this;}});function af(a){var d=RegExp("(^|\\.)"+a.type+"(\\.|$)"),b=true,c=[];T.each(T.data(this,"events").live||[],function(g,f){if(d.test(f.type)){var e=T(a.target).closest(f.data)[0];if(e){c.push({elem:e,fn:f});}}});c.sort(function(e,f){return T.data(e.elem,"closest")-T.data(f.elem,"closest");});T.each(c,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){return(b=false);}});return b;}function Z(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".");}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T);});T.readyList=null;}T(document).triggerHandler("ready");}}});var G=false;function P(){if(G){return;}G=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);T.ready();},false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);T.ready();}});if(document.documentElement.doScroll&&W==W.top){(function(){if(T.isReady){return;}try{document.documentElement.doScroll("left");}catch(a){setTimeout(arguments.callee,0);return;}T.ready();})();}}}T.event.add(W,"load",T.ready);}T.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(a,b){T.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b);};});T(W).bind("unload",function(){for(var a in T.cache){if(a!=1&&T.cache[a].handle){T.event.remove(T.cache[a].handle.elem);}}});(function(){T.support={};var f=document.documentElement,e=document.createElement("script"),a=document.createElement("div"),b="script"+(new Date).getTime();a.style.display="none";a.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var d=a.getElementsByTagName("*"),g=a.getElementsByTagName("a")[0];if(!d||!d.length||!g){return;}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName("tbody").length,objectAll:!!a.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(g.getAttribute("style")),hrefNormalized:g.getAttribute("href")==="/a",opacity:g.style.opacity==="0.5",cssFloat:!!g.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type="text/javascript";try{e.appendChild(document.createTextNode("window."+b+"=1;"));}catch(c){}f.insertBefore(e,f.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b];}f.removeChild(e);if(a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function(){T.support.noCloneEvent=false;a.detachEvent("onclick",arguments.callee);});a.cloneNode(true).fireEvent("onclick");}T(function(){var h=document.createElement("div");h.style.width=h.style.paddingLeft="1px";document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h).style.display="none";});})();var H=T.support.cssFloat?"cssFloat":"styleFloat";T.props={"for":"htmlFor","class":"className","float":H,cssFloat:H,styleFloat:H,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};T.fn.extend({_load:T.fn.load,load:function(e,b,a){if(typeof e!=="string"){return this._load(e);}var c=e.indexOf(" ");if(c>=0){var g=e.slice(c,e.length);e=e.slice(0,c);}var d="GET";if(b){if(T.isFunction(b)){a=b;b=null;}else{if(typeof b==="object"){b=T.param(b);d="POST";}}}var f=this;T.ajax({url:e,type:d,dataType:"html",data:b,complete:function(i,h){if(h=="success"||h=="notmodified"){f.html(g?T("<div/>").append(i.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):i.responseText);}if(a){f.each(a,[i.responseText,h,i]);}}});return this;},serialize:function(){return T.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(c,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(d,e){return{name:b.name,value:d};}):{name:b.name,value:a};}).get();}});T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(b,a){T.fn[a]=function(c){return this.bind(a,c);};});var N=ad();T.extend({get:function(d,b,a,c){if(T.isFunction(b)){a=b;b=null;}return T.ajax({type:"GET",url:d,data:b,success:a,dataType:c});},getScript:function(b,a){return T.get(b,null,a,"script");},getJSON:function(c,b,a){return T.get(c,b,a,"json");},post:function(d,b,a,c){if(T.isFunction(b)){a=b;b={};}return T.ajax({type:"POST",url:d,data:b,success:a,dataType:c});},ajaxSetup:function(a){T.extend(T.ajaxSettings,a);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(k){k=T.extend(true,k,T.extend(true,{},T.ajaxSettings,k));var a,r=/=\?(&|$)/g,f,b,q=k.type.toUpperCase();if(k.data&&k.processData&&typeof k.data!=="string"){k.data=T.param(k.data);}if(k.dataType=="jsonp"){if(q=="GET"){if(!k.url.match(r)){k.url+=(k.url.match(/\?/)?"&":"?")+(k.jsonp||"callback")+"=?";}}else{if(!k.data||!k.data.match(r)){k.data=(k.data?k.data+"&":"")+(k.jsonp||"callback")+"=?";}}k.dataType="json";}if(k.dataType=="json"&&(k.data&&k.data.match(r)||k.url.match(r))){a="jsonp"+N++;if(k.data){k.data=(k.data+"").replace(r,"="+a+"$1");}k.url=k.url.replace(r,"="+a+"$1");k.dataType="script";W[a]=function(u){b=u;o();l();W[a]=ab;try{delete W[a];}catch(t){}if(p){p.removeChild(d);}};}if(k.dataType=="script"&&k.cache==null){k.cache=false;}if(k.cache===false&&q=="GET"){var s=ad();var c=k.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+s+"$2");k.url=c+((c==k.url)?(k.url.match(/\?/)?"&":"?")+"_="+s:"");}if(k.data&&q=="GET"){k.url+=(k.url.match(/\?/)?"&":"?")+k.data;k.data=null;}if(k.global&&!T.active++){T.event.trigger("ajaxStart");}var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(k.url);if(k.dataType=="script"&&q=="GET"&&g&&(g[1]&&g[1]!=location.protocol||g[2]!=location.host)){var p=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=k.url;if(k.scriptCharset){d.charset=k.scriptCharset;}if(!a){var i=false;d.onload=d.onreadystatechange=function(){if(!i&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){i=true;o();l();d.onload=d.onreadystatechange=null;p.removeChild(d);}};}p.appendChild(d);return ab;}var m=false;var n=k.xhr();if(k.username){n.open(q,k.url,k.async,k.username,k.password);}else{n.open(q,k.url,k.async);}try{if(k.data){n.setRequestHeader("Content-Type",k.contentType);}if(k.ifModified){n.setRequestHeader("If-Modified-Since",T.lastModified[k.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}n.setRequestHeader("X-Requested-With","XMLHttpRequest");n.setRequestHeader("Accept",k.dataType&&k.accepts[k.dataType]?k.accepts[k.dataType]+", */*":k.accepts._default);}catch(e){}if(k.beforeSend&&k.beforeSend(n,k)===false){if(k.global&&!--T.active){T.event.trigger("ajaxStop");}n.abort();return false;}if(k.global){T.event.trigger("ajaxSend",[n,k]);}var j=function(v){if(n.readyState==0){if(h){clearInterval(h);h=null;if(k.global&&!--T.active){T.event.trigger("ajaxStop");}}}else{if(!m&&n&&(n.readyState==4||v=="timeout")){m=true;if(h){clearInterval(h);h=null;}f=v=="timeout"?"timeout":!T.httpSuccess(n)?"error":k.ifModified&&T.httpNotModified(n,k.url)?"notmodified":"success";if(f=="success"){try{b=T.httpData(n,k.dataType,k);}catch(t){f="parsererror";}}if(f=="success"){var u;try{u=n.getResponseHeader("Last-Modified");}catch(t){}if(k.ifModified&&u){T.lastModified[k.url]=u;}if(!a){o();}}else{T.handleError(k,n,f);}l();if(v){n.abort();}if(k.async){n=null;}}}};if(k.async){var h=setInterval(j,13);if(k.timeout>0){setTimeout(function(){if(n&&!m){j("timeout");}},k.timeout);}}try{n.send(k.data);}catch(e){T.handleError(k,n,null,e);}if(!k.async){j();}function o(){if(k.success){k.success(b,f);}if(k.global){T.event.trigger("ajaxSuccess",[n,k]);}}function l(){if(k.complete){k.complete(n,f);}if(k.global){T.event.trigger("ajaxComplete",[n,k]);}if(k.global&&!--T.active){T.event.trigger("ajaxStop");}}return n;},handleError:function(c,a,d,b){if(c.error){c.error(a,d,b);}if(c.global){T.event.trigger("ajaxError",[a,c,b]);}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223;}catch(b){}return false;},httpNotModified:function(b,d){try{var a=b.getResponseHeader("Last-Modified");return b.status==304||a==T.lastModified[d];}catch(c){}return false;},httpData:function(a,c,d){var e=a.getResponseHeader("content-type"),f=c=="xml"||!c&&e&&e.indexOf("xml")>=0,b=f?a.responseXML:a.responseText;if(f&&b.documentElement.tagName=="parsererror"){throw"parsererror";}if(d&&d.dataFilter){b=d.dataFilter(b,c);}if(typeof b==="string"){if(c=="script"){T.globalEval(b);}if(c=="json"){b=W["eval"]("("+b+")");}}return b;},param:function(d){var b=[];function a(f,e){b[b.length]=encodeURIComponent(f)+"="+encodeURIComponent(e);}if(T.isArray(d)||d.jquery){T.each(d,function(){a(this.name,this.value);});}else{for(var c in d){if(T.isArray(d[c])){T.each(d[c],function(){a(c,this);});}else{a(c,T.isFunction(d[c])?d[c]():d[c]);}}}return b.join("&").replace(/%20/g,"+");}});var V={},U,ae=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function K(b,c){var a={};T.each(ae.concat.apply([],ae.slice(0,c)),function(){a[this]=b;});return a;}T.fn.extend({show:function(c,a){if(c){return this.animate(K("show",3),c,a);}else{for(var e=0,g=this.length;e<g;e++){var h=T.data(this[e],"olddisplay");this[e].style.display=h||"";if(T.css(this[e],"display")==="none"){var f=this[e].tagName,b;if(V[f]){b=V[f];}else{var d=T("<"+f+" />").appendTo("body");b=d.css("display");if(b==="none"){b="block";}d.remove();V[f]=b;}T.data(this[e],"olddisplay",b);}}for(var e=0,g=this.length;e<g;e++){this[e].style.display=T.data(this[e],"olddisplay")||"";}return this;}},hide:function(b,a){if(b){return this.animate(K("hide",3),b,a);}else{for(var c=0,d=this.length;c<d;c++){var e=T.data(this[c],"olddisplay");if(!e&&e!=="none"){T.data(this[c],"olddisplay",T.css(this[c],"display"));}}for(var c=0,d=this.length;c<d;c++){this[c].style.display="none";}return this;}},_toggle:T.fn.toggle,toggle:function(a,b){var c=typeof a==="boolean";return T.isFunction(a)&&T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){var d=c?a:T(this).is(":hidden");T(this)[d?"show":"hide"]();}):this.animate(K("toggle",3),a,b);},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b);},animate:function(a,d,b,c){var e=T.speed(d,b,c);return this[e.queue===false?"each":"queue"](function(){var g=T.extend({},e),i,f=this.nodeType==1&&T(this).is(":hidden"),h=this;for(i in a){if(a[i]=="hide"&&f||a[i]=="show"&&!f){return g.complete.call(this);}if((i=="height"||i=="width")&&this.style){g.display=T.css(this,"display");g.overflow=this.style.overflow;}}if(g.overflow!=null){this.style.overflow="hidden";}g.curAnim=T.extend({},a);T.each(a,function(o,k){var l=new T.fx(h,g,o);if(/toggle|show|hide/.test(k)){l[k=="toggle"?f?"show":"hide":k](a);}else{var m=k.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),j=l.cur(true)||0;if(m){var p=parseFloat(m[2]),n=m[3]||"px";if(n!="px"){h.style[o]=(p||1)+n;j=((p||1)/l.cur(true))*j;h.style[o]=j+n;}if(m[1]){p=((m[1]=="-="?-1:1)*p)+j;}l.custom(j,p,n);}else{l.custom(j,k,"");}}});return true;});},stop:function(b,c){var a=T.timers;if(b){this.queue([]);}this.each(function(){for(var d=a.length-1;d>=0;d--){if(a[d].elem==this){if(c){a[d](true);}a.splice(d,1);}}});if(!c){this.dequeue();}return this;}});T.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(b,a){T.fn[b]=function(d,c){return this.animate(a,d,c);};});T.extend({speed:function(b,a,c){var d=typeof b==="object"?b:{complete:c||!c&&a||T.isFunction(b)&&b,duration:b,easing:c&&a||a&&!T.isFunction(a)&&a};d.duration=T.fx.off?0:typeof d.duration==="number"?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false){T(this).dequeue();}if(T.isFunction(d.old)){d.old.call(this);}};return d;},easing:{linear:function(b,a,d,c){return d+c*b;},swing:function(b,a,d,c){return((-Math.cos(b*Math.PI)/2)+0.5)*c+d;}},timers:[],fx:function(b,c,a){this.options=c;this.elem=b;this.prop=a;if(!c.orig){c.orig={};}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var b=parseFloat(T.css(this.elem,this.prop,a));return b&&b>-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0;},custom:function(a,b,c){this.startTime=ad();this.start=a;this.end=b;this.unit=c||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;function d(f){return e.step(f);}d.elem=this.elem;if(d()&&T.timers.push(d)&&!U){U=setInterval(function(){var f=T.timers;for(var g=0;g<f.length;g++){if(!f[g]()){f.splice(g--,1);}}if(!f.length){clearInterval(U);U=ab;}},13);}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());T(this.elem).show();},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(c){var d=ad();if(c||d>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var f=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){f=false;}}if(f){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){T(this.elem).hide();}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b]);}}this.options.complete.call(this.elem);}return false;}else{var a=d-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,"opacity",a.now);},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit;}else{a.elem[a.prop]=a.now;}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0]);}var f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&&h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&&h.scrollLeft||g.scrollLeft)-b;return{top:d,left:e};};}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0]);}T.offset.initialized||T.offset.initialize();var f=this[0],i=f.offsetParent,j=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,k=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;while((f=f.parentNode)&&f!==e&&f!==h){c=d.getComputedStyle(f,null);b-=f.scrollTop,g-=f.scrollLeft;if(f===i){b+=f.offsetTop,g+=f.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0;}j=i,i=f.offsetParent;}if(T.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0;}k=c;}if(k.position==="relative"||k.position==="static"){b+=e.offsetTop,g+=e.offsetLeft;}if(k.position==="fixed"){b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft);}return{top:b,left:g};};}T.offset={initialize:function(){if(this.initialized){return;}var c=document.body,i=document.createElement("div"),g,h,a,f,b,j,e=c.style.marginTop,d='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';b={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(j in b){i.style[j]=b[j];}i.innerHTML=d;c.insertBefore(i,c.firstChild);g=i.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);g.style.overflow="hidden",g.style.position="relative";this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);c.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(i);this.initialized=true;},bodyOffset:function(c){T.offset.initialized||T.offset.initialize();var a=c.offsetTop,b=c.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(c,"marginTop",true),10)||0,b+=parseInt(T.curCSS(c,"marginLeft",true),10)||0;}return{top:a,left:b};}};T.fn.extend({position:function(){var b=0,c=0,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,"marginTop");a.left-=Y(this,"marginLeft");f.top+=Y(d,"borderTopWidth");f.left+=Y(d,"borderLeftWidth");e={top:a.top-f.top,left:a.left-f.left};}return e;},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&T.css(a,"position")=="static")){a=a.offsetParent;}return T(a);}});T.each(["Left","Top"],function(b,c){var a="scroll"+c;T.fn[a]=function(d){if(!this[0]){return null;}return d!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d;}):this[0]==W||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[a]||document.body[a]:this[0][a];};});T.each(["Height","Width"],function(b,d){var f=b?"Left":"Top",c=b?"Right":"Bottom",e=d.toLowerCase();T.fn["inner"+d]=function(){return this[0]?T.css(this[0],e,false,"padding"):null;};T.fn["outer"+d]=function(g){return this[0]?T.css(this[0],e,false,g?"margin":"border"):null;};var a=d.toLowerCase();T.fn[a]=function(g){return this[0]==W?document.compatMode=="CSS1Compat"&&document.documentElement["client"+d]||document.body["client"+d]:this[0]==document?Math.max(document.documentElement["client"+d],document.body["scroll"+d],document.documentElement["scroll"+d],document.body["offset"+d],document.documentElement["offset"+d]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g==="string"?g:g+"px");};});})();var jssm={created:false,rid:0,zerolength:false,pointer:false,interval:100,stackelem:false,lengthelem:false,pointerelem:false,iframe:false,stack:[],settings:{formid:"jssmform",stackid:"jssmstack",lengthid:"jssmlength",pointerid:"jssmpointer",iframeid:"jssmiframe",blankurl:"/blank.html",basetitle:"",titleseparator:" : "},functions:{pageload:false,beforeload:false,load:false,afterload:false,beforeunload:false,unload:false,afterunload:false},inline:function(a){if(this.created){return;}this.created=true;this.settings=jQuery.fn.extend(this.settings,a);document.write('<div style="display: none;">');document.write('<form id="'+this.settings.formid+'" action="" method="post"><div><textarea name="'+this.settings.stackid+'" id="'+this.settings.stackid+'"></textarea><input type="text" id="'+this.settings.lengthid+'" name="'+this.settings.lengthid+'" /><input type="text" id="'+this.settings.pointerid+'" name="'+this.settings.pointerid+'" /></div></form>');if(jQuery.browser.msie&&jQuery.browser.version<8){document.write('<iframe id="'+this.settings.iframeid+'" src="'+this.settings.blankurl+"?"+this.getHash()+'"></iframe>');}document.write("</div>");if(jQuery.browser.opera){document.write('<img style="position: absolute; left: -999em; top: -999em;" width="1" height="1"  src="javascript:location.href=\'javascript:jssm.fixOpera();\';" />');}},init:function(a){if(jQuery.browser.msie&&a=="ready"){return;}if(!jQuery.browser.msie&&a=="load"){return;}jQuery(window).bind("hashchange",jssm.hashchange);this.stackelem=document.getElementById(this.settings.stackid);this.lengthelem=document.getElementById(this.settings.lengthid);this.pointerelem=document.getElementById(this.settings.pointerid);this.iframe=document.getElementById(this.settings.iframeid);if(jQuery.browser.opera){this.stackelem.focus();this.lengthelem.focus();this.pointerelem.focus();window.focus();}if(this.lengthelem.value){this.zerolength=this.lengthelem.value;this.load();}else{this.zerolength=history.length;this.pointer=this.zerolength;this.stack[this.pointer]=this.getHash();this.save();}this.rid=this.getRID(this.stack[this.pointer]);this.rid++;if(this.functions.pageload){this.functions.pageload(this.stack[this.pointer]);}if(!jQuery.browser.msie||(jQuery.browser.msie&&jQuery.browser.version<8)){this.poll();}},poll:function(){if(jssm.getHash()!=jssm.stack[jssm.pointer]){jQuery(window).trigger("hashchange");}setTimeout(jssm.poll,jssm.interval);},fixOpera:function(){},iframeEvent:function(a){if(a||window.location.hash){window.location.hash=a;}},hashchange:function(){var d=jssm.getHash();var c=d;jssm.functions.beforeunload(d);if(d===""){c=jssm.getCurrentPage();}if(jQuery.browser.msie&&jQuery.browser.version<8&&jssm.iframe.contentWindow.document.body.innerText!=d){jssm.setHash(d);}jssm.functions.unload(c);jssm.functions.load(c);var b=[];for(var a=jssm.zerolength;a<jssm.stack.length;a++){if(d===jssm.stack[a]){b.push(a);}}switch(b.length){case 0:jssm.pointer++;jssm.stack[jssm.pointer]=d;jssm.stack.length=jssm.pointer+1;break;case 1:jssm.pointer=b[0];break;}jssm.save();},load:function(){this.stack=JSON.parse(this.stackelem.value);this.length=this.lengthelem.value;this.pointer=this.pointerelem.value;},save:function(){this.stackelem.value=JSON.stringify(this.stack);this.lengthelem.value=this.zerolength;this.pointerelem.value=this.pointer;},getHash:function(){if(jQuery.browser.safari&&parseInt(jQuery.browser.version,10)<522&&!/adobeair/i.test(jQuery.browser.userAgent)){this.getHash=function(){return jssm.stack[history.length-jssm.zerolength-1];};}else{this.getHash=function(){var b=window.location.href;var a=b.indexOf("#");return(a>=0?b.substr(a+1):"");};}return this.getHash();},setHash:function(a){if(jQuery.browser.msie&&jQuery.browser.version<8){this.setHash=function(c){var b=jssm.iframe.contentWindow.document;b.open("javascript:'<html></html>'");b.write("<html><head><scri"+'pt type="text/javascript">window.parent.jssm.iframeEvent("'+c+'");</scri'+"pt></head><body>"+c+"</body></html>");b.close();};}else{this.setHash=function(b){window.location.hash=b;};}return this.setHash(a);},getRID:function(a){if(!a){return 0;}var b=a.match(/rid=[\d]+/);return b?b[0].substr(4):0;},getHref:function(){var a=window.location.href.indexOf("#");return(a>=0?window.location.href.substr(0,a):window.location.href);},getPathTokens:function(b){var d=b.indexOf("#");var c=b.indexOf("?");var a="";var f="";if(d!=-1){if(c!=-1&&c<d){a=b.substring(c,d);f=b.substring(d);}else{f=b.substring(d);}}else{if(c>=0){a=b.substring(c);}else{}}if(d!=-1&&c!=-1){b=b.substring(0,Math.min(d,c));}else{if(d!=-1){b=b.substring(0,d);}else{if(c!=-1){b=b.substring(0,c);}}}var e=/^(https?:\/\/){0,1}([A-Za-z0-9\-\.]+){0,1}(\:\d+){0,1}(\/){0,1}((?:[^\/]*\/)*){0,1}(.*)$/;b=e.exec(b);if(b[5]){b[5]=b[5].split("/");b[5].pop();}else{b[5]=[];}b.push(a);b.push(f);return b;},getCurrentPath:function(){var a=this.getPathTokens(this.getHref());return(a&&a[5]?a[5].join("/")+"/":"");},getCurrentPage:function(){var a=this.getPathTokens(this.getHref());return(a&&a[6]?a[6]:"");},getRelativePath:function(f,e,b){if(f==e&&e.indexOf("?")==-1){return this.getCurrentPage(e);}f=this.getPathTokens(f);e=this.getPathTokens(e);b=b||false;if((b||e[1])&&(f[1]!==e[1])){return false;}if((b||e[2])&&(f[2]!==e[2])){return false;}if(f[3]!==e[3]){if(b){return false;}var c=false;switch(f[1]){case"http":c=80;break;case"https":c=443;break;}if(!c){return false;}if(!(f[3]===""&&e[3]==c)&&!(f[3]==c&&e[3]==="")){return false;}}var a="";if(!f[5].length||!e[4]){a+=e[5].join("/")+"/"+(e[6]?e[6]:"");}else{var d=0;if(f[5].length&&e[5].length){for(d=0;d<f[5].length;d++){if(f[5][d]==e[5][d]){f[5].shift();e[5].shift();d--;}else{break;}}for(d=0;d<f[5].length;d++){a+="../";}a+=e[5].join("/")+(e[5].length?"/":"")+(e[6]?e[6]:"");}else{for(d=0;d<f[5].length;d++){a+="../";}a+=(e[6]?e[6]:"");}}if(e[7]){a+=e[7];}if(e[8]){a+=e[8];}return a;},getRootRelativePath:function(f,e,b){if(arguments.length==1){var d=jssm.getPathTokens(f);return"/"+d[5].join("/")+"/"+(d[6]?d[6]:"");}f=this.getPathTokens(f);e=this.getPathTokens(e);b=b||false;if((b||e[1])&&(f[1]!==e[1])){return false;}if((b||e[2])&&(f[2]!==e[2])){return false;}if(f[3]!==e[3]){if(b){return false;}var c=false;switch(f[1]){case"http":c=80;break;case"https":c=443;break;}if(!c){return false;}if(!(f[3]===""&&e[3]==c)&&!(f[3]==c&&e[3]==="")){return false;}}var a="/";if(!e[4]){a+=f[5].join("/")+"/";}if(e[5].length){a+=e[5].join("/")+"/";}if(e[6]){a+=e[6];}if(e[7]){a+=e[7];}if(e[8]){a+=e[8];}return a;},setTitle:function(a){document.title=a;},buildTitle:function(b,a){a=a||this.settings.titleseparator;return this.settings.basetitle+(b?a+b:"");}};jQuery.fn.jssm=function(a,b){return this.each(function(c){jQuery(this).bind(a,function(e){var h=jQuery.data(this,"jssm");var d="";var f="";if(a=="submit"&&this.action){d=jQuery('<a href="'+this.action+'"></a>').get(0).href;f="&"+jQuery(this).serialize();}else{if(this.href){d=this.href;}}var g=jssm.getRelativePath(jssm.getHref(),d);if(g!==false){g=g+(g.indexOf("?")>=0?"&":"?")+"rid="+(jssm.rid++)+f;jssm.setHash(g);}e.preventDefault();return false;});});};jQuery(document).ready(function(){jssm.init("ready");});jQuery(window).load(function(){jssm.init("load");});jssm.settings.blankurl="blank.html";jssm.settings.basetitle="";jssm.settings.titleseparator=" : ";jssm.functions.pageload=function(a){if(a){jssm.functions.load(a);}$("#cntnt").fadeIn(500);};function eseguiCustomJs(e){switch(e){case"gallery.php":case"gallery_it.php":jQuery(function(j){var i=0.67;j("#thumbs-adv ul.thumbs li").css("opacity",i).hover(function(){j(this).not(".selected").fadeTo("fast",1);},function(){j(this).not(".selected").fadeTo("fast",i);});var h=j("#cdx").galleriffic("#thumbs-adv",{delay:2000,numThumbs:40,preloadAhead:-1,enableTopPager:false,enableBottomPager:false,imageContainerSel:"#slideshow-adv",controlsContainerSel:"#controls-adv",captionContainerSel:"#caption-adv",loadingContainerSel:"#loading-adv",renderSSControls:true,renderNavControls:true,playLinkText:"Play Slideshow",pauseLinkText:"Pause Slideshow",prevLinkText:"&lsaquo; Previous Photo",nextLinkText:"Next Photo &rsaquo;",nextPageLinkText:"Next &rsaquo;",prevPageLinkText:"&lsaquo; Prev",enableHistory:false,autoStart:false,onChange:function(m,l){j("#thumbs-adv ul.thumbs").children().eq(m).fadeTo("fast",i).end().eq(l).fadeTo("fast",1);},onTransitionOut:function(l){j("#slideshow-adv").fadeOut("fast",l);},onTransitionIn:function(){j("#slideshow-adv").fadeIn("fast");},onPageTransitionOut:function(l){j("#thumbs-adv ul.thumbs").fadeOut("fast",l);},onPageTransitionIn:function(){j("#thumbs-adv ul.thumbs").fadeIn("fast");}});var k=j("#gallery-min").galleriffic("#thumbs-min",{imageContainerSel:"#slideshow-min",controlsContainerSel:"#controls-min"});});break;case"contacts.php":case"contacts_it.php":if(e=="contacts.php"){var d="<h2>Contact Form Submitted!</h2>";var c="<p>We will be in touch soon.</p>";}else{var d="<h2>Richiesta inviata con successo!</h2>";var c="<p>Grazie per il vostro interesse<br/> Verrete presto contattati.</p>";}function f(){var h="name="+$("input#name").val()+"&company="+$("input#company").val()+"&country="+$("input#country").val()+"&address="+$("input#address").val()+"&mail="+$("input#mail").val()+"&comment="+$("textarea#comment").val();$.ajax({type:"POST",url:"forms.php",data:h,success:function(){$("#ReqForm").html("<div id='message'></div>");$("#message").html(d).append(c).hide().fadeIn(1500);}});return false;}$("#ReqForm").RSV({onCompleteHandler:f,errorFieldClass:"errorField",errorTextIntro:"Vi preghiamo di compilare i campi evidenziati, ed inviare nuovamente il form",displayType:"alert-all",rules:["required,name,Please enter your name.","required,mail,Please enter a valid e-mail address."]});break;case"home.php":case"home_it.php":var a={};var g={};g.menu="true";g.scale="noscale";var b={};b.align="top center";swfobject.embedSWF("IntroPescaja.swf","intro","966","475","9.0.0",false,a,g,b);break;case"":var a={};var g={};g.menu="true";g.scale="noscale";var b={};b.align="top center";swfobject.embedSWF("IntroPescaja.swf","intro","966","475","9.0.0",false,a,g,b);break;}}jssm.functions.load=function(c){if(c.charAt(0)==="/"){c=c.substring(1);}var a=new Array();a=c.split("?");var b=a[0];$.get(jssm.getCurrentPath()+c,function(f){var e=f.substring(f.indexOf("<body>")+6,f.indexOf("</body>"));var d=new String();$("a.selezionato").removeClass("selezionato");switch(b){case"philo.php":case"philo_it.php":d="graph/BK_philo.jpg";$("a#n2").addClass("selezionato");break;case"terroir.php":case"terroir_it.php":d="graph/BK_terroir.jpg";$("a#n3").addClass("selezionato");break;case"gallery.php":case"gallery_it.php":d="graph/BK_gallery.gif";$("a#n5").addClass("selezionato");break;case"downloads.php":case"downloads_it.php":d="graph/BK_downloads.jpg";$("a#n6").addClass("selezionato");break;case"contacts.php":case"contacts_it.php":d="graph/BK_contacts.jpg";$("a#n7").addClass("selezionato");break;case"tales.php":case"tales_it.php":d="graph/BK_tales.jpg";$("a#n8").addClass("selezionato");break;case"alfieri.php":case"alfieri_it.php":d="graph/BK_alfieri.jpg";$("a#n4").addClass("selezionato");break;case"arneis.php":case"arneis_it.php":d="graph/BK_arneis.jpg";$("a#n4").addClass("selezionato");break;case"luna.php":case"luna_it.php":d="graph/BK_sololuna.jpg";$("a#n4").addClass("selezionato");break;case"solis.php":case"solis_it.php":d="graph/BK_solis.jpg";$("a#n4").addClass("selezionato");break;case"soliter.php":case"soliter_it.php":d="graph/BK_soliter.jpg";$("a#n4").addClass("selezionato");break;case"solneri.php":case"solneri_it.php":d="graph/BK_solneri.jpg";$("a#n4").addClass("selezionato");break;case"tuke.php":case"tuke_it.php":d="graph/BK_tuke.jpg";$("a#n4").addClass("selezionato");break;default:d="";$("a#n1").addClass("selezionato");}var g=new Image();var g=new Image();g.src=d;if(g.complete&d!=""){$("#cntnt").queue(function(){$(this).css("background-image","url("+d+")");$(this).html($(e).find("div#cntnt").html());$("#menues").html($(e).find("#menues").html());$("#menues a.his").jssm("click");eseguiCustomJs(b);$("#loadingg").empty();$(this).fadeIn(500);$(this).dequeue();});}else{if(d!=""){$(g).attr("src",d).load(function(){$("#cntnt").queue(function(){$(this).css("background-image","url("+d+")");$(this).html($(e).find("div#cntnt").html());$("#menues").html($(e).find("#menues").html());$("#menues a.his").jssm("click");eseguiCustomJs(b);$("#loadingg").empty();$(this).fadeIn(500);$(this).dequeue();});});}else{$("#cntnt").queue(function(){$(this).css("background-image","none");$(this).html($(e).find("div#cntnt").html());$("#menues").html($(e).find("#menues").html());$("#menues a.his").jssm("click");eseguiCustomJs(b);$("#loadingg").empty();$(this).fadeIn(500);$(this).dequeue();});}}});};jssm.functions.beforeunload=function(a){};jssm.functions.unload=function(a){hideSub();$("#loadingg").html('<img src="graph/loader.gif" width="16" height="16"/>');$("#cntnt").queue(function(){$(this).empty();$(this).hide();$(this).dequeue();});};jssm.functions.afterunload=function(a){};jQuery.preloadCssImages=function(c){c=jQuery.extend({statusTextEl:null,statusBarEl:null,errorDelay:999,simultaneousCacheLoading:2},c);var a=[],f=0,d=[],g,e;function i(){clearTimeout(e);if(d&&d.length&&d[f]){f++;if(c.statusTextEl){var j=(d[f])?"Now Loading: <span>"+d[f].split("/")[d[f].split("/").length-1]:"Loading complete";jQuery(c.statusTextEl).html('<span class="numLoaded">'+f+'</span> of <span class="numTotal">'+d.length+'</span> loaded (<span class="percentLoaded">'+(f/d.length*100).toFixed(0)+'%</span>) <span class="currentImg">'+j+"</span></span>");}if(c.statusBarEl){var k=jQuery(c.statusBarEl).width();jQuery(c.statusBarEl).css("background-position",-(k-(k*f/d.length).toFixed(0))+"px 50%");}h();}}function h(){if(d&&d.length&&d[f]){var j=new Image();j.src=d[f];if(!j.complete){jQuery(j).bind("error load onreadystatechange",i);}else{i();}e=setTimeout(i,c.errorDelay);}}function b(n,y){var v=false,r=[],p=[],z;var o=n.length;while(o--){var x="";if(y&&y[o]){z=y[o];}else{var B=(n[o].href)?n[o].href:"window.location.href";var A=B.split("/");A.pop();z=A.join("/");if(z){z+="/";}}if(n[o].cssRules||n[o].rules){g=(n[o].cssRules)?n[o].cssRules:n[o].rules;var s=g.length;while(s--){if(g[s].style&&g[s].style.cssText){var q=g[s].style.cssText;if(q.toLowerCase().indexOf("url")!=-1){x+=q;}}else{if(g[s].styleSheet){r.push(g[s].styleSheet);v=true;}}}}var C=x.match(/[^\("]+\.(gif|jpg|jpeg|png)/g);if(C){var u=C.length;while(u--){var k=(C[u].charAt(0)=="/"||C[u].match("://"))?C[u]:z+C[u];if(jQuery.inArray(k,d)==-1){d.push(k);}}}if(!v&&n[o].imports&&n[o].imports.length){for(var l=0,j=n[o].imports.length;l<j;l++){var w=n[o].imports[l].href;w=w.split("/");w.pop();w=w.join("/");if(w){w+="/";}var m=(w.charAt(0)=="/"||w.match("://"))?w:z+w;p.push(m);r.push(n[o].imports[l]);}}}if(r.length){b(r,p);return false;}var t=c.simultaneousCacheLoading;while(t--){setTimeout(h,t);}}b(document.styleSheets);return d;};var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0;}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7");}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always";}catch(t){if(AC[0]==6){AB=true;}}if(!AB){try{y=new ActiveXObject(p);}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)];}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w};}();var L=function(){if(!h.w3cdom){return;}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S);}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E();}},10);}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null);}R(E);}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E();}}function E(){if(e){return;}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u);}catch(w){return;}}e=true;if(Z){clearInterval(Z);Z=null;}var q=o.length;for(var r=0;r<q;r++){o[r]();}}function f(q){if(e){q();}else{o[o.length]=q;}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false);}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false);}else{if(typeof j.attachEvent!=b){I(j,"onload",r);}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r();};}else{j.onload=r;}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r);}W(u,true);}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q]);}else{O(r);}}}}else{W(u,true);}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue);}else{w.setAttribute(y[u].nodeName,y[u].nodeValue);}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"));}}}t.parentNode.replaceChild(w,t);}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId;}}else{M=G(u);}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310";}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137";}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u);};I(j,"onload",v);}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x);}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t);};I(j,"onload",q);}else{t.parentNode.replaceChild(G(t),t);}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML;}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true));}}}}}return u;}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t;}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB];}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"';}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"';}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />';}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id);}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z]);}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z]);}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z]);}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y]);}}}v.parentNode.replaceChild(AC,v);q=AC;}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x]);}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x]);}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w]);}}v.parentNode.replaceChild(u,v);q=u;}}}return q;}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u);}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r);}else{j.attachEvent("onload",function(){B(r);});}}else{q.parentNode.removeChild(q);}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null;}}r.parentNode.removeChild(r);}}function C(t){var q=null;try{q=K.getElementById(t);}catch(r){}return q;}function a(q){return K.createElement(q);}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r];}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false;}function V(v,r){if(h.ie&&h.mac){return;}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"));}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r);}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r;}else{V("#"+t,"visibility:"+r);}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s;}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2]);}var t=i.length;for(var u=0;u<t;u++){X(i[u]);}for(var r in h){h[r]=null;}h=null;for(var q in swfobject){swfobject[q]=null;}swfobject=null;});}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return;}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false);},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t;}else{if(typeof u.SetVariable!=b){q=u;}}}}return q;},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return;}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v];}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u];}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t];}else{y.flashvars=t+"="+r[t];}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true);}});}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF);});}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]};},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q);}else{return undefined;}},removeSWF:function(q){if(h.w3cdom){X(q);}},createCSS:function(r,q){if(h.w3cdom){V(r,q);}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u);}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)));}}}return"";},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block";}}M=null;l=null;A=false;}}}};}();(function(e){var d="galleriffic-1.0";var g=0;var a=[];var o=[];var n;var c;var b;var l=false;var w=false;var u=false;function p(x){if(!x){return -1;}x=x.replace(/^.*#/,"");if(isNaN(x)){return -1;}return(+x);}function q(){var x=location.hash;return p(x);}function f(x){a.push(x);g+=x.data.length;}function t(y){for(i=0;i<a.length;i++){var x=a[i];if(y<(x.data.length+x.offset)){return x;}}return 0;}function v(x,y){return y-x.offset;}function k(B,x,z){x.pause();if(!x.settings.enableHistory){var A=p(z.href);if(A>=0){var y=v(x,A);if(y>=0){x.gotoo(y);}}B.preventDefault();}}function h(){var z=q();if(z<0){return;}var x=t(z);if(!x){return;}var y=z-x.offset;x.gotoo(y);}function r(){if(u){return;}u=true;var x=location.hash;n=x;if(e.browser.msie){if(n===""){n="#";}}else{if(e.browser.safari){c=[];c.length=history.length;b=[];l=true;}}setInterval(function(){m();},100);}function s(x){c.push(x);b.length=0;l=true;}function m(){if(e.browser.safari){if(!w){var x=history.length-c.length;if(x){l=false;if(x<0){for(var y=0;y<Math.abs(x);y++){b.unshift(c.pop());}}else{for(var z=0;z<x;z++){c.push(b.shift());}}var A=c[c.length-1];if(A!==undefined){n=location.hash;h();}}else{if(c[c.length-1]===undefined&&!l){h();l=true;}}}}else{var B=location.hash;if(B!=n){n=B;h();}}}var j={delay:3000,numThumbs:20,preloadAhead:40,enableTopPager:false,enableBottomPager:true,imageContainerSel:"",captionContainerSel:"",controlsContainerSel:"",loadingContainerSel:"",renderSSControls:true,renderNavControls:true,playLinkText:"Play",pauseLinkText:"Pause",prevLinkText:"Previous",nextLinkText:"Next",nextPageLinkText:"Next &rsaquo;",prevPageLinkText:"&lsaquo; Prev",enableHistory:false,autoStart:false,onChange:undefined,onTransitionOut:undefined,onTransitionIn:undefined,onPageTransitionOut:undefined,onPageTransitionIn:undefined};e.fn.galleriffic=function(z,A){e.extend(this,{ver:function(){return d;},initializeThumbs:function(){this.data=[];var E=this;this.$thumbsContainer.find("ul.thumbs > li").each(function(G){var I=e(this);var F=I.find("a.thumb");var H=E.offset+G;E.data.push({title:F.attr("title"),slideUrl:F.attr("href"),caption:I.find(".caption").remove(),hash:H});F.attr("rel","history");F.attr("href","#"+H);F.click(function(J){k(J,E,this);});});return this;},isPreloadComplete:false,preloadInit:function(){if(this.settings.preloadAhead===0){return this;}this.preloadStartIndex=this.currentIndex;var E=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,E);},preloadRelocate:function(E){this.preloadStartIndex=E;return this;},preloadRecursive:function(J,G){if(J!=this.preloadStartIndex){var E=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,E);}var F=this;var H=G-J;if(H<0){H=this.data.length-1-J+G;}if(this.settings.preloadAhead>=0&&H>this.settings.preloadAhead){setTimeout(function(){F.preloadRecursive(J,G);},500);return this;}var K=this.data[G];if(!K){return this;}if(K.image){return this.preloadNext(J,G);}var I=new Image();I.onload=function(){K.image=this;F.preloadNext(J,G);};I.alt=K.title;I.src=K.slideUrl;return this;},preloadNext:function(H,G){var E=this.getNextIndex(G);if(E==H){this.isPreloadComplete=true;}else{var F=this;setTimeout(function(){F.preloadRecursive(H,E);},100);}return this;},getNextIndex:function(F){var E=F+1;if(E>=this.data.length){E=0;}return E;},getPrevIndex:function(E){var F=E-1;if(F<0){F=this.data.length-1;}return F;},pause:function(){if(this.interval){this.toggleSlideshow();}return this;},play:function(){if(!this.interval){this.toggleSlideshow();}return this;},toggleSlideshow:function(){if(this.interval){clearInterval(this.interval);this.interval=0;if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("play").attr("title",this.settings.playLinkText).attr("href","#play").html(this.settings.playLinkText);}}else{this.ssAdvance();var E=this;this.interval=setInterval(function(){E.ssAdvance();},this.settings.delay);if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("pause").attr("title",this.settings.pauseLinkText).attr("href","#pause").html(this.settings.pauseLinkText);}}return this;},ssAdvance:function(){var E=this.getNextIndex(this.currentIndex);var F=this.data[E].hash;if(this.settings.enableHistory){location.href="#"+F;}else{this.gotoo(E);}return this;},gotoo:function(E){if(E<0){E=0;}else{if(E>=this.data.length){E=this.data.length-1;}}if(this.settings.onChange){this.settings.onChange(this.currentIndex,E);}this.currentIndex=E;this.preloadRelocate(E);return this.refresh();},refresh:function(){var I=this.data[this.currentIndex];if(!I){return this;}var H=true;var E=this;var G=function(){H=false;if(E.$controlsContainer){E.$controlsContainer.find("div.nav-controls a.prev").attr("href","#"+E.data[E.getPrevIndex(E.currentIndex)].hash).end().find("div.nav-controls a.next").attr("href","#"+E.data[E.getNextIndex(E.currentIndex)].hash);}var J=E.data[E.currentIndex];if(E.$captionContainer){E.$captionContainer.empty().append(J.caption);}if(J.image){E.buildImage(J.image);}else{if(E.$loadingContainer){E.$loadingContainer.show();}}};if(this.settings.onTransitionOut){this.settings.onTransitionOut(G);}else{this.$transitionContainers.hide();G();}if(!I.image){var F=new Image();F.onload=function(){I.image=this;if(!H){E.buildImage(I.image);}};F.alt=I.title;F.src=I.slideUrl;}this.relocatePreload=true;return this.syncThumbs();},buildImage:function(G){if(this.$imageContainer){this.$imageContainer.empty();var F=this;var E=this.getNextIndex(this.currentIndex);if(this.$loadingContainer){this.$loadingContainer.hide();}this.$imageContainer.append('<span class="image-wrapper"><a class="advance-link" rel="history" href="#'+this.data[E].hash+'" title="'+G.alt+'"></a></span>').find("a").append(G).click(function(H){k(H,F,this);});}if(this.settings.onTransitionIn){this.settings.onTransitionIn();}else{this.$transitionContainers.show();}return this;},syncThumbs:function(){if(this.$thumbsContainer){var F=Math.floor(this.currentIndex/this.settings.numThumbs);if(F!=this.currentPage){this.currentPage=F;this.updateThumbs();}var E=this.$thumbsContainer.find("ul.thumbs").children();E.filter(".selected").removeClass("selected");E.eq(this.currentIndex).addClass("selected");}return this;},updateThumbs:function(){var E=this;var F=function(){E.rebuildThumbs();if(E.settings.onPageTransitionIn){E.settings.onPageTransitionIn();}else{E.$thumbsContainer.show();}};if(this.settings.onPageTransitionOut){this.settings.onPageTransitionOut(F);}else{this.$thumbsContainer.hide();F();}return this;},rebuildThumbs:function(){if(this.currentPage<0){this.currentPage=0;}var G=this.data.length>this.settings.numThumbs;var E=this.$thumbsContainer.find("div.top");if(E.length===0){E=this.$thumbsContainer.prepend('<div class="top pagination"></div>').find("div.top");}if(G&&this.settings.enableTopPager){E.empty();this.buildPager(E);}if(G&&this.settings.enableBottomPager){var I=this.$thumbsContainer.find("div.bottom");if(I.length===0){I=this.$thumbsContainer.append('<div class="bottom pagination"></div>').find("div.bottom");}else{I.empty();}this.buildPager(I);}var J=this.currentPage*this.settings.numThumbs;var F=J+this.settings.numThumbs-1;if(F>=this.data.length){F=this.data.length-1;}var H=this.$thumbsContainer.find("ul.thumbs");H.find("li").each(function(K){var L=e(this);if(K>=J&&K<=F){L.show();}else{L.hide();}});H.removeClass("noscript");return this;},buildPager:function(H){var G=this;var K=this.currentPage*this.settings.numThumbs;if(this.currentPage>0){var I=K-this.settings.numThumbs;H.append('<a rel="history" href="#'+this.data[I].hash+'" title="'+this.settings.prevPageLinkText+'">'+this.settings.prevPageLinkText+"</a>");}for(i=this.currentPage-3;i<=this.currentPage+3;i++){var J=i+1;if(i==this.currentPage){H.append('<span class="current">'+J+"</span>");}else{if(i>=0&&i<this.numPages){var E=i*this.settings.numThumbs;H.append('<a rel="history" href="#'+this.data[E].hash+'" title="'+J+'">'+J+"</a>");}}}var F=K+this.settings.numThumbs;if(F<this.data.length){H.append('<a rel="history" href="#'+this.data[F].hash+'" title="'+this.settings.nextPageLinkText+'">'+this.settings.nextPageLinkText+"</a>");}H.find("a").click(function(L){k(L,G,this);});return this;}});this.settings=e.extend({},j,A);if(this.interval){clearInterval(this.interval);}this.interval=0;if(this.settings.imageContainerSel){this.$imageContainer=e(this.settings.imageContainerSel);}if(this.settings.captionContainerSel){this.$captionContainer=e(this.settings.captionContainerSel);}if(this.settings.loadingContainerSel){this.$loadingContainer=e(this.settings.loadingContainerSel);}this.$transitionContainers=e([]);if(this.$imageContainer){this.$transitionContainers=this.$transitionContainers.add(this.$imageContainer);}if(this.$captionContainer){this.$transitionContainers=this.$transitionContainers.add(this.$captionContainer);}this.offset=g;this.$thumbsContainer=e(z);this.initializeThumbs();f(this);this.numPages=Math.ceil(this.data.length/this.settings.numThumbs);this.currentPage=-1;this.currentIndex=0;var x=this;if(this.$loadingContainer){this.$loadingContainer.hide();}if(this.settings.controlsContainerSel){this.$controlsContainer=e(this.settings.controlsContainerSel).empty();if(this.settings.renderSSControls){if(this.settings.autoStart){this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.settings.pauseLinkText+'">'+this.settings.pauseLinkText+"</a></div>");}else{this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.settings.playLinkText+'">'+this.settings.playLinkText+"</a></div>");}this.$controlsContainer.find("div.ss-controls a").click(function(E){x.toggleSlideshow();E.preventDefault();return false;});}if(this.settings.renderNavControls){var D=this.$controlsContainer.append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.settings.prevLinkText+'">'+this.settings.prevLinkText+'</a><a class="next" rel="history" title="'+this.settings.nextLinkText+'">'+this.settings.nextLinkText+"</a></div>").find("div.nav-controls a").click(function(E){k(E,x,this);});}}r();var B=q();var C=(B>=0)?t(B):0;var y=(C&&this==C)?(B-this.offset):0;this.gotoo(y);if(this.settings.autoStart){setTimeout(function(){x.play();},this.settings.delay);}setTimeout(function(){x.preloadInit();},1000);return this;};})(jQuery);(function($){var options={};var returnHash=[];$.fn.RSV=function(params){options=$.extend({},$.fn.RSV.defaults,params);return this.each(function(){$(this).bind("submit",{currForm:this,options:options},$(this).RSV.validate);});};$.fn.RSV.defaults={rules:[],displayType:"alert-all",errorFieldClass:null,errorTextIntro:"Please fix the following error(s) and resubmit:",errorJSItemBullet:"* ",errorHTMLItemBullet:"&bull; ",errorTargetElementId:"rsvErrors",customErrorHandler:null,onCompleteHandler:null};$.fn.RSV.validate=function(event){options=event.data.options;var form=event.data.currForm;var rules=options.rules;returnHash=[];for(var i=0;i<rules.length;i++){var row=rules[i].replace(/\\,/ig,"%%C%%");row=row.split(",");var satisfiesIfConditions=true;while(row[0].match("^if:")){var cond=row[0];cond=cond.replace("if:","");var comparison="equal";var parts=[];if(cond.search("!=")!=-1){parts=cond.split("!=");comparison="not_equal";}else{parts=cond.split("=");}var fieldToCheck=parts[0];var valueToCheck=parts[1];var fieldnameValue="";if(form[fieldToCheck].type==undefined){for(var j=0;j<form[fieldToCheck].length;j++){if(form[fieldToCheck][j].checked){fieldnameValue=form[fieldToCheck][j].value;}}}else{if(form[fieldToCheck].type=="checkbox"){if(form[fieldToCheck].checked){fieldnameValue=form[parts[0]].value;}}else{fieldnameValue=form[parts[0]].value;}}if(comparison=="equal"&&fieldnameValue!=valueToCheck){satisfiesIfConditions=false;break;}else{if(comparison=="not_equal"&&fieldnameValue==valueToCheck){satisfiesIfConditions=false;break;}else{row.shift();}}}if(!satisfiesIfConditions){continue;}var requirement=row[0];var fieldName=row[1];var fieldName2,fieldName3,errorMessage,lengthRequirements,date_flag;if(requirement!="function"&&form[fieldName]==undefined){alert('RSV Error: the field "'+fieldName+"\" doesn't exist! Please check your form and settings.");return false;}if(requirement!="function"&&options.errorFieldClass){if(form[fieldName].type==undefined){for(var j=0;j<form[fieldName].length;j++){if($(form[fieldName][j]).hasClass(options.errorFieldClass)){$(form[fieldName][j]).removeClass(options.errorFieldClass);}}}else{if($(form[fieldName]).hasClass(options.errorFieldClass)){$(form[fieldName]).removeClass(options.errorFieldClass);}}}if(row.length==6){fieldName2=row[2];fieldName3=row[3];date_flag=row[4];errorMessage=row[5];}else{if(row.length==5){fieldName2=row[2];fieldName3=row[3];errorMessage=row[4];}else{if(row.length==4){fieldName2=row[2];errorMessage=row[3];}else{errorMessage=row[2];}}}if(requirement.match("^length")){lengthRequirements=requirement;requirement="length";}if(requirement.match("^range")){rangeRequirements=requirement;requirement="range";}switch(requirement){case"required":if(form[fieldName].type==undefined){var oneIsChecked=false;for(var j=0;j<form[fieldName].length;j++){if(form[fieldName][j].checked){oneIsChecked=true;}}if(!oneIsChecked){if(!processError(form[fieldName],errorMessage)){return false;}}}else{if(form[fieldName].type=="select-multiple"){var oneIsSelected=false;for(var k=0;k<form[fieldName].length;k++){if(form[fieldName][k].selected){oneIsSelected=true;}}if(!oneIsSelected||form[fieldName].length==0){if(!processError(form[fieldName],errorMessage)){return false;}}}else{if(form[fieldName].type=="checkbox"){if(!form[fieldName].checked){if(!processError(form[fieldName],errorMessage)){return false;}}}else{if(!form[fieldName].value){if(!processError(form[fieldName],errorMessage)){return false;}}}}}break;case"digits_only":if(form[fieldName].value&&form[fieldName].value.match(/\D/)){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"letters_only":if(form[fieldName].value&&form[fieldName].value.match(/[^a-zA-Z]/)){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"is_alpha":if(form[fieldName].value&&form[fieldName].value.match(/\W/)){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"custom_alpha":var conversion={"L":"[A-Z]","V":"[AEIOU]","l":"[a-z]","v":"[aeiou]","D":"[a-zA-Z]","F":"[aeiouAEIOU]","C":"[BCDFGHJKLMNPQRSTVWXYZ]","x":"[0-9]","c":"[bcdfghjklmnpqrstvwxyz]","X":"[1-9]","E":"[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]"};var reg_exp_str="";for(var j=0;j<fieldName2.length;j++){if(conversion[fieldName2.charAt(j)]){reg_exp_str+=conversion[fieldName2.charAt(j)];}else{reg_exp_str+=fieldName2.charAt(j);}}var reg_exp=new RegExp(reg_exp_str);if(form[fieldName].value&&reg_exp.exec(form[fieldName].value)==null){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"reg_exp":var reg_exp_str=fieldName2.replace(/%%C%%/ig,",");if(row.length==5){var reg_exp=new RegExp(reg_exp_str,fieldName3);}else{var reg_exp=new RegExp(reg_exp_str);}if(form[fieldName].value&&reg_exp.exec(form[fieldName].value)==null){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"length":comparison_rule="";rule_string="";if(lengthRequirements.match(/length=/)){comparison_rule="equal";rule_string=lengthRequirements.replace("length=","");}else{if(lengthRequirements.match(/length>=/)){comparison_rule="greater_than_or_equal";rule_string=lengthRequirements.replace("length>=","");}else{if(lengthRequirements.match(/length>/)){comparison_rule="greater_than";rule_string=lengthRequirements.replace("length>","");}else{if(lengthRequirements.match(/length<=/)){comparison_rule="less_than_or_equal";rule_string=lengthRequirements.replace("length<=","");}else{if(lengthRequirements.match(/length</)){comparison_rule="less_than";rule_string=lengthRequirements.replace("length<","");}}}}}switch(comparison_rule){case"greater_than_or_equal":if(!(form[fieldName].value.length>=parseInt(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"greater_than":if(!(form[fieldName].value.length>parseInt(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"less_than_or_equal":if(!(form[fieldName].value.length<=parseInt(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"less_than":if(!(form[fieldName].value.length<parseInt(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"equal":var range_or_exact_number=rule_string.match(/[^_]+/);var fieldCount=range_or_exact_number[0].split("-");if(fieldCount.length==2){if(form[fieldName].value.length<fieldCount[0]||form[fieldName].value.length>fieldCount[1]){if(!processError(form[fieldName],errorMessage)){return false;}}}else{if(form[fieldName].value.length!=fieldCount[0]){if(!processError(form[fieldName],errorMessage)){return false;}}}break;}break;case"valid_email":if(form[fieldName].value&&!isValidEmail(form[fieldName].value)){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"valid_date":var isLaterDate=false;if(date_flag=="later_date"){isLaterDate=true;}else{if(date_flag=="any_date"){isLaterDate=false;}}if(!isValidDate(form[fieldName].value,form[fieldName2].value,form[fieldName3].value,isLaterDate)){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"same_as":if(form[fieldName].value!=form[fieldName2].value){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"range":comparison_rule="";rule_string="";if(rangeRequirements.match(/range=/)){comparison_rule="equal";rule_string=rangeRequirements.replace("range=","");}else{if(rangeRequirements.match(/range>=/)){comparison_rule="greater_than_or_equal";rule_string=rangeRequirements.replace("range>=","");}else{if(rangeRequirements.match(/range>/)){comparison_rule="greater_than";rule_string=rangeRequirements.replace("range>","");}else{if(rangeRequirements.match(/range<=/)){comparison_rule="less_than_or_equal";rule_string=rangeRequirements.replace("range<=","");}else{if(rangeRequirements.match(/range</)){comparison_rule="less_than";rule_string=rangeRequirements.replace("range<","");}}}}}switch(comparison_rule){case"greater_than_or_equal":if(!(form[fieldName].value>=Number(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"greater_than":if(!(form[fieldName].value>Number(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"less_than_or_equal":if(!(form[fieldName].value<=Number(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"less_than":if(!(form[fieldName].value<Number(rule_string))){if(!processError(form[fieldName],errorMessage)){return false;}}break;case"equal":var rangeValues=rule_string.split("-");if((form[fieldName].value<Number(rangeValues[0]))||(form[fieldName].value>Number(rangeValues[1]))){if(!processError(form[fieldName],errorMessage)){return false;}}break;}break;case"function":custom_function=fieldName;eval("var result = "+custom_function+"()");if(result.constructor.toString().indexOf("Array")!=-1){for(var j=0;j<result.length;j++){if(!processError(result[j][0],result[j][1])){return false;}}}break;default:alert("Unknown requirement flag in validateFields(): "+requirement);return false;}}if(typeof options.customErrorHandler=="function"){return options.customErrorHandler(form,returnHash);}else{if(options.displayType=="alert-all"){var errorStr=options.errorTextIntro+"\n\n";for(var i=0;i<returnHash.length;i++){errorStr+=options.errorJSItemBullet+returnHash[i][1]+"\n";styleField(returnHash[i][0],i==0);}if(returnHash.length>0){alert(errorStr);return false;}}else{if(options.displayType=="display-html"){var success=displayHTMLErrors(form,returnHash);if(!success){return false;}}}}if(typeof options.onCompleteHandler=="function"){return options.onCompleteHandler();}else{return true;}};function processError(obj,message){message=message.replace(/%%C%%/ig,",");var continueProcessing=true;switch(options.displayType){case"alert-one":alert(message);styleField(obj,true);continueProcessing=false;break;case"alert-all":case"display-html":returnHash.push([obj,message]);break;}return continueProcessing;}function displayHTMLErrors(f,errorInfo){var errorHTML=options.errorTextIntro+"<br /><br />";for(var i=0;i<errorInfo.length;i++){errorHTML+=options.errorHTMLItemBullet+errorInfo[i][1]+"<br />";styleField(errorInfo[i][0],i==0);}if(errorInfo.length>0){$("#"+options.errorTargetElementId).css("display","block");$("#"+options.errorTargetElementId).html(errorHTML);return false;}return true;}function styleField(field,focus){if(field.type==undefined){if(focus){field[0].focus();}for(var i=0;i<field.length;i++){if(!$(field[i]).hasClass(options.errorFieldClass)){$(field[i]).addClass(options.errorFieldClass);}}}else{if(options.errorFieldClass){$(field).addClass(options.errorFieldClass);}if(focus){field.focus();}}}function isValidEmail(str){var s=$.trim(str);var at="@";var dot=".";var lat=s.indexOf(at);var lstr=s.length;var ldot=s.indexOf(dot);if(s.indexOf(at)==-1||(s.indexOf(at)==-1||s.indexOf(at)==0||s.indexOf(at)==lstr)||(s.indexOf(dot)==-1||s.indexOf(dot)==0||s.indexOf(dot)==lstr)||(s.indexOf(at,(lat+1))!=-1)||(s.substring(lat-1,lat)==dot||s.substring(lat+1,lat+2)==dot)||(s.indexOf(dot,(lat+2))==-1)||(s.indexOf(" ")!=-1)){return false;}return true;}function isValidDate(month,day,year,isLaterDate){var daysInMonth;if((year%4==0)&&((year%100!=0)||(year%400==0))){daysInMonth=[31,29,31,30,31,30,31,31,30,31,30,31];}else{daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];}if(!month||!day||!year){return false;}if(1>month||month>12){return false;}if(year<0){return false;}if(1>day||day>daysInMonth[month-1]){return false;}if(isLaterDate){var today=new Date();var currMonth=today.getMonth()+1;var currDay=today.getDate();var currYear=today.getFullYear();if(String(currMonth).length==1){currMonth="0"+currMonth;}if(String(currDay).length==1){currDay="0"+currDay;}var currDate=String(currYear)+String(currMonth)+String(currDay);if(String(month).length==1){month="0"+month;}if(String(day).length==1){day="0"+day;}incomingDate=String(year)+String(month)+String(day);if(Number(currDate)>Number(incomingDate)){return false;}}return true;}})(jQuery);
