;/*!
 * jQuery JavaScript Library v1.4
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://docs.jquery.com/License
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Wed Jan 13 15:23:05 2010 -0500
 */
(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j?
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType===
11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=
i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];
c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;
this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===
"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&
!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,
htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,
a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a,
b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&&
a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=
" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=
-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};
if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+
i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},
handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},
props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||
s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a,
b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",
mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+
d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d===
"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)},
remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,
f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?
this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===
k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();
u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+
(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];
for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-
1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]=
k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];
h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h=
h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,
h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/,
cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
{},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"],
legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);
return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&
this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,
"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===
1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()===
"text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&&
s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""===
"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=
parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e=
a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=
f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/,
wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,
e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&
B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",
e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",
[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=
null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
"file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&&
d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i=
c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/,
Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),
p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);
else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",
1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.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];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);
d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);;/**
 * --------------------------------------------------------------------
 * jQuery-Plugin "pngFix"
 * Version: 1.2, 09.03.2009
 * by Andreas Eberhard, andreas.eberhard@gmail.com
 *                      http://jquery.andreaseberhard.de/
 *
 * Copyright (c) 2007 Andreas Eberhard
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 *
 * Changelog:
 *    30.10.2009 by martin veith
 *    - added sizingMethod property ("scale", "crop")
 *    - added selectorOnly property for better replacement efficiency
 *    - fixed png-background selector bug
 *    09.03.2009 Version 1.2
 *    - Update for jQuery 1.3.x, removed @ from selectors
 *    11.09.2007 Version 1.1
 *    - removed noConflict
 *    - added png-support for input type=image
 *    - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
 *    31.05.2007 initial Version 1.0
 * --------------------------------------------------------------------
 * @example $(function(){$(document).pngFix();});
 * @desc Fixes all PNG's in the document on document.ready
 *
 * jQuery(function(){jQuery(document).pngFix();});
 * @desc Fixes all PNG's in the document on document.ready when using noConflict
 *
 * @example $(function(){$('div.examples').pngFix();});
 * @desc Fixes all PNG's within div with class examples
 *
 * @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );});
 * @desc Fixes all PNG's within div with class examples, provides blank gif for input with png
 * --------------------------------------------------------------------
 */

(function($) {

jQuery.fn.pngFix = function(settings) {

	// Settings
	settings = jQuery.extend({
		blankgif: 'images/blank.gif',
		sizingMethod: 'crop',
		selectorOnly: true
	}, settings);

	var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
	var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

	if (jQuery.browser.msie && (ie55 || ie6)) {

		//fix images with png-source
		jQuery(this).find("img[src$=.png]").each(function() {

			jQuery(this).attr('width',jQuery(this).width());
			jQuery(this).attr('height',jQuery(this).height());

			var prevStyle = '';
			var strNewHTML = '';
			var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
			var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
			var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
			var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
			var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
			var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
			if (this.style.border) {
				prevStyle += 'border:'+this.style.border+';';
				this.style.border = '';
			}
			if (this.style.padding) {
				prevStyle += 'padding:'+this.style.padding+';';
				this.style.padding = '';
			}
			if (this.style.margin) {
				prevStyle += 'margin:'+this.style.margin+';';
				this.style.margin = '';
			}
			var imgStyle = (this.style.cssText);

			strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;
			strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;
			strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
			strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'' + settings.sizingMethod + '\');';
			strNewHTML += imgStyle+'"></span>';
			if (prevStyle != ''){
				strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>';
			}

			jQuery(this).hide();
			jQuery(this).after(strNewHTML);

		});
		
		// fix css background pngs
		var fixBackground = function($obj) {
			var bgIMG = $obj.css('background-image');
			if(bgIMG.indexOf(".png")!=-1){ 
				var iebg = bgIMG.split('url("')[1].split('")')[0];
				$obj.css('background-image', 'none'); 
				$obj.get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='" + settings.sizingMethod + "')";
			}
		}
		
		if(settings.selectorOnly)
		{
			fixBackground(jQuery(this));
		}
		else
		{
			jQuery(this).find("*").each(function(){ 
				fixBackground(jQuery(this)); 
			});
		}
		
		//fix input with png-source
		jQuery(this).find("input[src$=.png]").each(function() {
			var bgIMG = jQuery(this).attr('src');
			jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'' + settings.sizingMethod + '\');';
   		jQuery(this).attr('src', settings.blankgif)
		});
	
	}
	
	return jQuery;

};

})(jQuery);;/*
 *
 * jqTransform
 * by mathieu vilaplana mvilaplana@dfc-e.com
 * Designer ghyslain armand garmand@dfc-e.com
 *
 *
 * Version 1.0 25.09.08
 * Version 1.1 06.08.09
 * Add event click on Checkbox and Radio
 * Auto calculate the size of a select element
 * Can now, disabled the elements
 * Correct bug in ff if click on select (overflow=hidden)
 * No need any more preloading !!
 * 06.11.09 - by martin veith
 * - added class for select opener
 * - additional wrapper for select list
 * - added input[type=file] transformation
 * 
 ******************************************** */
 
(function($){
	var defaultOptions = {preloadImg:true};
	var jqTransformImgPreloaded = false;

	var jqTransformPreloadHoverFocusImg = function(strImgUrl) {
		//guillemets to remove for ie
		strImgUrl = strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1');
		var imgHover = new Image();
		imgHover.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1');
		var imgFocus = new Image();
		imgFocus.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1');				
	};

	
	/***************************
	  Labels
	***************************/
	var jqTransformGetLabel = function(objfield){
		var selfForm = $(objfield.get(0).form);
		
		var oLabel = selfForm.find('label[for="'+objfield.attr('id')+'"]');
		if(oLabel.is("label"))
			return oLabel.css('cursor','pointer');
		return false;
		/*
		var oLabel = objfield.next();
		if(!oLabel.is('label')) {				
			oLabel = objfield.prev();
			if(oLabel.is('label')){
				var inputname = objfield.attr('id');
				if(inputname){
					oLabel = selfForm.find('label[for="'+inputname+'"]');
				} 
			}
		}
		if(oLabel.is('label')){return oLabel.css('cursor','pointer');}
		return false;
		*/
	};
	
	/* Hide all open selects */
	var jqTransformHideSelect = function(oTarget){
		var ulVisible = $('.jqTransformSelectWrapper ul:visible');
		$('.jqTransformSelectWrapper span:eq(0)').removeAttr("class", "jqTransformSelectOpened");
		$('.jqTransformSelectWrapper .jqTransformSelectList').hide();
		ulVisible.each(function(){
			var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);
			//do not hide if click on the label object associated to the select
			if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();}
		});
	};
	/* Check for an external click */
	var jqTransformCheckExternalClick = function(event) {  
		if ($(event.target).parents('.select').length === 0) { jqTransformHideSelect($(event.target)); }
	};

	/* Apply document listener */
	var jqTransformAddDocumentListener = function (){
		$(document).mousedown(jqTransformCheckExternalClick);
	};	
			
	/* Add a new handler for the reset action */
	var jqTransformReset = function(f){
		var sel;
		$('.jqTransformSelectWrapper select', f).each(function(){sel = (this.selectedIndex<0) ? 0 : this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});});
		$('a.jqTransformCheckbox, a.jqTransformRadio', f).removeClass('jqTransformChecked');
		$('input:checkbox, input:radio', f).each(function(){if(this.checked){$('a', $(this).parent()).addClass('jqTransformChecked');}});
	};

	/***************************
	  Buttons
	 ***************************/
	$.fn.jqTransInputButton = function(selfForm){
		return this.each(function(){ /*<button id="'+ this.id +'" name="'+ this.name +'" type="'+ this.type +'" class="'+ this.className +' jqTransformButton">*/
			var click_fn = this.onclick; 
			var btn_id="";
			var button_class=" jqTransformButton";
			
			btn_id=' id="' + this.id + '"';
			if(this.type == "submit")
			{
				var button_class = button_class + " jqTransformSubmitButton";
			}
		
			var newBtn = $('<div' + btn_id + ' class="'+ this.className + button_class + '"><span class="left"><span>'+ $(this).attr('value') +'</span></span></div>')
				.hover(function(){newBtn.addClass('jqTransformButton_hover');},function(){newBtn.removeClass('jqTransformButton_hover')})
				.click(function() {
					newBtn.addClass('jqTransformButton_click');
					if (typeof(click_fn) == "function")
					{
						click_fn();
					}
					else
					{
						selfForm.submit();
					}
				})
				.mouseup(function(){newBtn.removeClass('jqTransformButton_click')})
			;
			$(this).replaceWith(newBtn);
		});
	};
	
	/***************************
	  Text Fields 
	 ***************************/
	$.fn.jqTransInputText = function(selfForm){
		return this.each(function(){
			var $input = $(this);
	
			if($input.hasClass('jqtranformdone') || !$input.is('input')) {return;}
			$input.addClass('jqtranformdone');
			
			var oLabel = jqTransformGetLabel($(this));
			oLabel && oLabel.bind('click',function(){$input.focus();});
	
			var inputSize=$input.width();
			if($input.attr('size')){
				inputSize = $input.attr('size')*10;
				$input.css('width',inputSize);
			}
			
			//var click_fn = this.onclick;
			
			if($input.val().length == 0 & $input.attr("title").length > 0)
			{
				$input.val($input.attr("title"));	
			}
		
			$input.addClass("jqTransformInput").wrap('<div class="jqTransformInputWrapper"><div class="jqTransformInputInner"><div></div></div></div>');
			var $wrapper = $input.parent().parent().parent();
			$wrapper.css("width", inputSize+10);
			$input 
				.focus(function(){
					$wrapper.addClass("jqTransformInputWrapper_focus");
					
					if($input.val() == $input.attr("title"))
					{
						$input.val("");	
					}					
				})
				.blur(function(){
					$wrapper.removeClass("jqTransformInputWrapper_focus");

					if(($input.val().length == 0) & $input.attr("title").length > 0)
					{
						$input.val($input.attr("title"));	
					}
				})
				.hover(function(){$wrapper.addClass("jqTransformInputWrapper_hover");},function(){$wrapper.removeClass("jqTransformInputWrapper_hover");})
				.keyup(function(event) { 
					if((window.event && event.keyCode == 13) | (event.which && event.which == 13))
					{
						var $submit = $("#" + selfForm.attr("id") + "submit-button", selfForm);
						$submit.click();
					};
				})
			;
	
			/* If this is safari we need to add an extra class */

			$.browser.safari && $wrapper.addClass('jqTransformSafari');
			//$.browser.safari && $input.css('width',$wrapper.width()+16);
			this.wrapper = $wrapper;
			
		});
	};
	
	/***************************
	  File Fields 
	 ***************************/
	$.fn.jqTransInputFile = function(selfForm){
		return this.each(function(){
			var $input = $(this);
			$input.animate({opacity : "0"}, 0);
			
			if($input.hasClass('jqtranformdone') || !$input.is('input')) {return;}
			$input.addClass('jqtranformdone');
			
			var oLabel = jqTransformGetLabel($(this));
			//oLabel && oLabel.bind('click',function(){$input.focus();});

			var inputSize=$input.width();
			if($input.attr('size')){
				inputSize = $input.attr('size')*10;
				$input.css('width',inputSize);
			}
			
			$input.addClass("jqTransformInput").wrap('<div class="jqTransformInputFileWrapper"><div class="jqTransformInputFileInner"></div><div class="jqTransformInputFile"><input disabled="disabled" type="text" value="" /></div></div>');
			var $wrapper = $input.parent().parent().parent();
			var $btn = $(".jqTransformInputFileInner", $wrapper);
			$input_filename = $("input:last", $wrapper);
			$wrapper.css("width", inputSize+10);
			$input 
				.focus(function(){$btn.addClass("jqTransformInputFileInner_focus");})
				.blur(function(){$btn.removeClass("jqTransformInputFileInner_focus");})
				.hover(function(){$btn.addClass("jqTransformInputFileInner_hover");},function(){$btn.removeClass("jqTransformInputFileInner_hover");})
				.change(function(){$input_filename.val($input.val());})
			;			
	
			/* If this is safari we need to add an extra class */
			$.browser.safari && $wrapper.addClass('jqTransformSafari');
			$.browser.safari && $input.css('width',$wrapper.width()+16);
			this.wrapper = $wrapper;
		});
	};
	
	/***************************
	  Check Boxes 
	 ***************************/	
	$.fn.jqTransCheckBox = function(){
		return this.each(function(){
			if($(this).hasClass('jqTransformHidden')) {return;}

			var $input = $(this);
			var inputSelf = this;

			//set the click on the label
			var oLabel=jqTransformGetLabel($input); 	
			oLabel && oLabel.click(function(){
											
				if(!this.checked)
				{
					$input.checked = true;
					aLink.addClass('jqTransformChecked');
				}
				else
				{
					$input.checked = false;
					aLink.removeClass('jqTransformChecked');
				}
				if(jQuery.browser.msie) aLink.trigger("click");
			});

			var aLink = $('<a href="#" class="jqTransformCheckbox"></a>');
			//wrap and add the link
			$input.addClass('jqTransformHidden').wrap('<span class="jqTransformCheckboxWrapper"></span>').parent().prepend(aLink);
			//on change, change the class of the link
			
			$input.change(function(){
				this.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
				return true;
			});
			
			// Click Handler, trigger the click and change event on the input
			aLink.click(function(){
				//do nothing if the original input is disabled
				if($input.attr('disabled')){return false;}
				//trigger the envents on the input object
				$input.trigger('click').trigger("change");	
				return false;
			});

			// set the default state 
			this.checked && aLink.addClass('jqTransformChecked');		
		});
	};
	/***************************
	  Radio Buttons 
	 ***************************/	
	$.fn.jqTransRadio = function(){
		return this.each(function(){
			if($(this).hasClass('jqTransformHidden')) {return;}

			var $input = $(this);
			var inputSelf = this;
				
			oLabel = jqTransformGetLabel($input);
			oLabel && oLabel.click(function(){aLink.trigger('click');});
	
			var aLink = $('<a href="#" class="jqTransformRadio" rel="'+ this.name +'"></a>');
			$input.addClass('jqTransformHidden').wrap('<span class="jqTransformRadioWrapper"></span>').parent().prepend(aLink);
			
			$input.change(function(){
				inputSelf.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
				return true;
			});
			// Click Handler
			aLink.click(function(){
				if($input.attr('disabled')){return false;}
				$input.trigger('click').trigger('change');
	
				// uncheck all others of same name input radio elements
				$('input[name="'+$input.attr('name')+'"]',inputSelf.form).not($input).each(function(){
					$(this).attr('type')=='radio' && $(this).trigger('change');
				});
	
				return false;					
			});
			// set the default state
			inputSelf.checked && aLink.addClass('jqTransformChecked');
		});
	};
	
	/***************************
	  TextArea 
	 ***************************/	
	$.fn.jqTransTextarea = function(){
		return this.each(function(){
			var textarea = $(this);
	
			if(textarea.hasClass('jqtransformdone')) {return;}
			textarea.addClass('jqtransformdone');
	
			oLabel = jqTransformGetLabel(textarea);
			oLabel && oLabel.click(function(){textarea.focus();});
			
			var strTable = '<table cellspacing="0" cellpadding="0" border="0" class="jqTransformTextarea">';
			strTable +='<tr><td id="jqTransformTextarea-tl"></td><td id="jqTransformTextarea-tm"></td><td id="jqTransformTextarea-tr"></td></tr>';
			strTable +='<tr><td id="jqTransformTextarea-ml">&nbsp;</td><td id="jqTransformTextarea-mm"><div></div></td><td id="jqTransformTextarea-mr">&nbsp;</td></tr>';	
			strTable +='<tr><td id="jqTransformTextarea-bl"></td><td id="jqTransformTextarea-bm"></td><td id="jqTransformTextarea-br"></td></tr>';
			strTable +='</table>';					
			var oTable = $(strTable)
					.insertAfter(textarea)
					.hover(function(){
						!oTable.hasClass('jqTransformTextarea-focus') && oTable.addClass('jqTransformTextarea-hover');
					},function(){
						oTable.removeClass('jqTransformTextarea-hover');					
					})
				;
				
			textarea
				.focus(function(){oTable.removeClass('jqTransformTextarea-hover').addClass('jqTransformTextarea-focus');})
				.blur(function(){oTable.removeClass('jqTransformTextarea-focus');})
				.appendTo($('#jqTransformTextarea-mm div',oTable))
			;
			this.oTable = oTable;
			if($.browser.safari){
				$('#jqTransformTextarea-mm',oTable)
					.addClass('jqTransformSafariTextarea')
					.find('div')
						.css('height',textarea.height())
						.css('width',textarea.width())
				;
			}
		});
	};
	
	/***************************
	  Select 
	 ***************************/	
	$.fn.jqTransSelect = function(){
		return this.each(function(index){
			var $select = $(this);

			if($select.hasClass('jqTransformHidden')) {return;}
			if($select.attr('multiple')) {return;}

			var oLabel = jqTransformGetLabel($select);

			/* First thing we do is Wrap it */
			var $wrapper = $select
				.addClass('jqTransformHidden')
				.wrap('<div class="jqTransformSelectWrapper"></div>')
				.parent()
				.css({zIndex: 10-index})
			;

			/* Now add the html for the select */
			$wrapper.prepend('<div class="jqTransformSelectedItem"><span></span><a href="#" class="jqTransformSelectOpen"></a></div><div class="jqTransformSelectList"><ul></ul></div>');
			$wrapper.parent().css({zIndex: 10-index});
			var $ul = $('ul', $wrapper).css('width',$select.width()).hide();
			var $transformedwrapper = $(".jqTransformSelectList", $wrapper).hide();
			/* Now we add the options */
			$('option', this).each(function(i){
				var oLi = i == 0 ? $('<li class="first-item"><a href="#" index="'+ i +'"><span>'+ $(this).html() +'</span></a></li>') : $('<li><a href="#" index="'+ i +'"><span>'+ $(this).html() +'</span></a></li>');
				$ul.append(oLi);
			});
			
			/* Add click handler to the a */
			$ul.find('a').click(function(){
					$('a.selected', $wrapper).removeClass('selected');
					$(this).addClass('selected');	
					/* Fire the onchange event */
					if ($select[0].selectedIndex != $(this).attr('index') && $select[0].onchange) { $select[0].selectedIndex = $(this).attr('index'); $select[0].onchange(); }
					$select[0].selectedIndex = $(this).attr('index');
					$('span:eq(0)', $wrapper).html($(this).html());
					$ul.hide(); 
					$transformedwrapper.hide();
					return false;
			});
			/* Set the default */
			$('a:eq('+ this.selectedIndex +')', $ul).click();
			$('span:first', $wrapper).click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});

			oLabel && oLabel.click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
			this.oLabel = oLabel;
			
			/* Apply the click handler to the Open */
			var oLinkOpen = $('.jqTransformSelectedItem a', $wrapper)
				.click(function(event){ 
								
					//Check if box is already open to still allow toggle, but close all other selects
					if( $ul.css('display') == 'none' ) {
						jqTransformHideSelect(); 
						$('span:eq(0)', $wrapper).addClass("jqTransformSelectOpened");
						$('a:eq(0)', $wrapper).addClass("jqTransformSelectOpened");
					} 
					
					if($select.attr('disabled')){return false;}
					
					$transformedwrapper.show();
					
					$ul.slideToggle('fast', function(){	
						var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top);
						$ul.animate({scrollTop: offSet});
						if($ul.css("display") == "none")
						{
							$('span:eq(0)', $wrapper).removeAttr("class", "jqTransformSelectOpened");
							$('a:eq(0)', $wrapper).toggleClass("jqTransformSelectOpened");		
						}
					});
					
					return false;
				})
			;

			// Set the new width
			var iSelectWidth = $select.outerWidth();
			var oSpan = $('span:first',$wrapper);
			var newWidth = (iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width();
			$wrapper.css('width',newWidth);
			$transformedwrapper.css("width", newWidth);
			$ul.css('width',newWidth-1);
			$transformedwrapper.show();
			
			if(jQuery.browser.msie & (jQuery.browser.version).indexOf("6") > -1) //ie6
			{
				$ul.css('height', Math.min(150, $ul.find("li").length * 25) + "px");
			}
			
			oSpan.css({width:iSelectWidth});
		
			// Calculate the height if necessary, less elements that the default height
			//show the ul to calculate the block, if ul is not displayed li height value is 0
			$ul.css({display:'block',visibility:'hidden'});
			var iSelectHeight = ($('li',$ul).length)*($('li:first',$ul).height());//+1 else bug ff
			(iSelectHeight < $ul.height()) && $ul.css({height:iSelectHeight,'overflow':'hidden'});//hidden else bug with ff
			$ul.css({display:'none',visibility:'visible'});
			
		});
	};
	$.fn.jqTransform = function(options){
		var opt = $.extend({},defaultOptions,options);

		/* each form */
		 return this.each(function(){
			var selfForm = $(this);
			if(selfForm.hasClass('jqtransformdone')) {return;}
			selfForm.addClass('jqtransformdone');
			
			if(options == undefined || options.button != undefined)
				$('input:submit, input:reset, input[type="button"]', this).jqTransInputButton(selfForm);	
				
			if(options == undefined || options.input != undefined)
				$('input:text, input:password', this).jqTransInputText(selfForm);	

			if(options == undefined || options.input != undefined)
				$('input:file', this).jqTransInputFile(selfForm);	

			if(options == undefined || options.checkbox != undefined)
				$('input:checkbox', this).jqTransCheckBox();
				
			if(options == undefined || options.radio != undefined)
				$('input:radio', this).jqTransRadio();
				
			if(options == undefined || options.textarea != undefined)
				$('textarea', this).jqTransTextarea();
			
			if( $('select', this).jqTransSelect().length > 0 ){jqTransformAddDocumentListener();}
			selfForm.bind('reset',function(){var action = function(){jqTransformReset(this);}; window.setTimeout(action, 10);});
			
			//preloading dont needed anymore since normal, focus and hover image are the same one
			/*if(opt.preloadImg && !jqTransformImgPreloaded){
				jqTransformImgPreloaded = true;
				var oInputText = $('input:text:first', selfForm);
				if(oInputText.length > 0){
					//pour ie on eleve les ""
					var strWrapperImgUrl = oInputText.get(0).wrapper.css('background-image');
					jqTransformPreloadHoverFocusImg(strWrapperImgUrl);					
					var strInnerImgUrl = $('div.jqTransformInputInner',$(oInputText.get(0).wrapper)).css('background-image');
					jqTransformPreloadHoverFocusImg(strInnerImgUrl);
				}
				
				var oTextarea = $('textarea',selfForm);
				if(oTextarea.length > 0){
					var oTable = oTextarea.get(0).oTable;
					$('td',oTable).each(function(){
						var strImgBack = $(this).css('background-image');
						jqTransformPreloadHoverFocusImg(strImgBack);
					});
				}
			}*/
			
			
		}); /* End Form each */
				
	};/* End the Plugin */

})(jQuery);
				   ;/*
 * jQuery UI 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
;jQuery.ui || (function($) {

var _remove = $.fn.remove,
	isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);

//Helper functions and ui object
$.ui = {
	version: "1.7.2",

	// $.ui.plugin is deprecated.  Use the proxy pattern instead.
	plugin: {
		add: function(module, option, set) {
			var proto = $.ui[module].prototype;
			for(var i in set) {
				proto.plugins[i] = proto.plugins[i] || [];
				proto.plugins[i].push([option, set[i]]);
			}
		},
		call: function(instance, name, args) {
			var set = instance.plugins[name];
			if(!set || !instance.element[0].parentNode) { return; }

			for (var i = 0; i < set.length; i++) {
				if (instance.options[set[i][0]]) {
					set[i][1].apply(instance.element, args);
				}
			}
		}
	},

	contains: function(a, b) {
		return document.compareDocumentPosition
			? a.compareDocumentPosition(b) & 16
			: a !== b && a.contains(b);
	},

	hasScroll: function(el, a) {

		//If overflow is hidden, the element might have extra content, but the user wants to hide it
		if ($(el).css('overflow') == 'hidden') { return false; }

		var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
			has = false;

		if (el[scroll] > 0) { return true; }

		// TODO: determine which cases actually cause this to happen
		// if the element doesn't have the scroll set, see if it's possible to
		// set the scroll
		el[scroll] = 1;
		has = (el[scroll] > 0);
		el[scroll] = 0;
		return has;
	},

	isOverAxis: function(x, reference, size) {
		//Determines when x coordinate is over "b" element axis
		return (x > reference) && (x < (reference + size));
	},

	isOver: function(y, x, top, left, height, width) {
		//Determines when x, y coordinates is over "b" element
		return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
	},

	keyCode: {
		BACKSPACE: 8,
		CAPS_LOCK: 20,
		COMMA: 188,
		CONTROL: 17,
		DELETE: 46,
		DOWN: 40,
		END: 35,
		ENTER: 13,
		ESCAPE: 27,
		HOME: 36,
		INSERT: 45,
		LEFT: 37,
		NUMPAD_ADD: 107,
		NUMPAD_DECIMAL: 110,
		NUMPAD_DIVIDE: 111,
		NUMPAD_ENTER: 108,
		NUMPAD_MULTIPLY: 106,
		NUMPAD_SUBTRACT: 109,
		PAGE_DOWN: 34,
		PAGE_UP: 33,
		PERIOD: 190,
		RIGHT: 39,
		SHIFT: 16,
		SPACE: 32,
		TAB: 9,
		UP: 38
	}
};

// WAI-ARIA normalization
if (isFF2) {
	var attr = $.attr,
		removeAttr = $.fn.removeAttr,
		ariaNS = "http://www.w3.org/2005/07/aaa",
		ariaState = /^aria-/,
		ariaRole = /^wairole:/;

	$.attr = function(elem, name, value) {
		var set = value !== undefined;

		return (name == 'role'
			? (set
				? attr.call(this, elem, name, "wairole:" + value)
				: (attr.apply(this, arguments) || "").replace(ariaRole, ""))
			: (ariaState.test(name)
				? (set
					? elem.setAttributeNS(ariaNS,
						name.replace(ariaState, "aaa:"), value)
					: attr.call(this, elem, name.replace(ariaState, "aaa:")))
				: attr.apply(this, arguments)));
	};

	$.fn.removeAttr = function(name) {
		return (ariaState.test(name)
			? this.each(function() {
				this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
			}) : removeAttr.call(this, name));
	};
}

//jQuery plugins
$.fn.extend({
	remove: function() {
		// Safari has a native remove event which actually removes DOM elements,
		// so we have to use triggerHandler instead of trigger (#3037).
		$("*", this).add(this).each(function() {
			$(this).triggerHandler("remove");
		});
		return _remove.apply(this, arguments );
	},

	enableSelection: function() {
		return this
			.attr('unselectable', 'off')
			.css('MozUserSelect', '')
			.unbind('selectstart.ui');
	},

	disableSelection: function() {
		return this
			.attr('unselectable', 'on')
			.css('MozUserSelect', 'none')
			.bind('selectstart.ui', function() { return false; });
	},

	scrollParent: function() {
		var scrollParent;
		if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
			scrollParent = this.parents().filter(function() {
				return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
			}).eq(0);
		} else {
			scrollParent = this.parents().filter(function() {
				return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
			}).eq(0);
		}

		return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
	}
});


//Additional selectors
$.extend($.expr[':'], {
	data: function(elem, i, match) {
		return !!$.data(elem, match[3]);
	},

	focusable: function(element) {
		var nodeName = element.nodeName.toLowerCase(),
			tabIndex = $.attr(element, 'tabindex');
		return (/input|select|textarea|button|object/.test(nodeName)
			? !element.disabled
			: 'a' == nodeName || 'area' == nodeName
				? element.href || !isNaN(tabIndex)
				: !isNaN(tabIndex))
			// the element and all of its ancestors must be visible
			// the browser may report that the area is hidden
			&& !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
	},

	tabbable: function(element) {
		var tabIndex = $.attr(element, 'tabindex');
		return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
	}
});


// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
function getter(namespace, plugin, method, args) {
	function getMethods(type) {
		var methods = $[namespace][plugin][type] || [];
		return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
	}

	var methods = getMethods('getter');
	if (args.length == 1 && typeof args[0] == 'string') {
		methods = methods.concat(getMethods('getterSetter'));
	}
	return ($.inArray(method, methods) != -1);
}

$.widget = function(name, prototype) {
	var namespace = name.split(".")[0];
	name = name.split(".")[1];

	// create plugin method
	$.fn[name] = function(options) {
		var isMethodCall = (typeof options == 'string'),
			args = Array.prototype.slice.call(arguments, 1);

		// prevent calls to internal methods
		if (isMethodCall && options.substring(0, 1) == '_') {
			return this;
		}

		// handle getter methods
		if (isMethodCall && getter(namespace, name, options, args)) {
			var instance = $.data(this[0], name);
			return (instance ? instance[options].apply(instance, args)
				: undefined);
		}

		// handle initialization and non-getter methods
		return this.each(function() {
			var instance = $.data(this, name);

			// constructor
			(!instance && !isMethodCall &&
				$.data(this, name, new $[namespace][name](this, options))._init());

			// method call
			(instance && isMethodCall && $.isFunction(instance[options]) &&
				instance[options].apply(instance, args));
		});
	};

	// create widget constructor
	$[namespace] = $[namespace] || {};
	$[namespace][name] = function(element, options) {
		var self = this;

		this.namespace = namespace;
		this.widgetName = name;
		this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
		this.widgetBaseClass = namespace + '-' + name;

		this.options = $.extend({},
			$.widget.defaults,
			$[namespace][name].defaults,
			$.metadata && $.metadata.get(element)[name],
			options);

		this.element = $(element)
			.bind('setData.' + name, function(event, key, value) {
				if (event.target == element) {
					return self._setData(key, value);
				}
			})
			.bind('getData.' + name, function(event, key) {
				if (event.target == element) {
					return self._getData(key);
				}
			})
			.bind('remove', function() {
				return self.destroy();
			});
	};

	// add widget prototype
	$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);

	// TODO: merge getter and getterSetter properties from widget prototype
	// and plugin prototype
	$[namespace][name].getterSetter = 'option';
};

$.widget.prototype = {
	_init: function() {},
	destroy: function() {
		this.element.removeData(this.widgetName)
			.removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
			.removeAttr('aria-disabled');
	},

	option: function(key, value) {
		var options = key,
			self = this;

		if (typeof key == "string") {
			if (value === undefined) {
				return this._getData(key);
			}
			options = {};
			options[key] = value;
		}

		$.each(options, function(key, value) {
			self._setData(key, value);
		});
	},
	_getData: function(key) {
		return this.options[key];
	},
	_setData: function(key, value) {
		this.options[key] = value;

		if (key == 'disabled') {
			this.element
				[value ? 'addClass' : 'removeClass'](
					this.widgetBaseClass + '-disabled' + ' ' +
					this.namespace + '-state-disabled')
				.attr("aria-disabled", value);
		}
	},

	enable: function() {
		this._setData('disabled', false);
	},
	disable: function() {
		this._setData('disabled', true);
	},

	_trigger: function(type, event, data) {
		var callback = this.options[type],
			eventName = (type == this.widgetEventPrefix
				? type : this.widgetEventPrefix + type);

		event = $.Event(event);
		event.type = eventName;

		// copy original event properties over to the new event
		// this would happen if we could call $.event.fix instead of $.Event
		// but we don't have a way to force an event to be fixed multiple times
		if (event.originalEvent) {
			for (var i = $.event.props.length, prop; i;) {
				prop = $.event.props[--i];
				event[prop] = event.originalEvent[prop];
			}
		}

		this.element.trigger(event, data);

		return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
			|| event.isDefaultPrevented());
	}
};

$.widget.defaults = {
	disabled: false
};


/** Mouse Interaction Plugin **/

$.ui.mouse = {
	_mouseInit: function() {
		var self = this;

		this.element
			.bind('mousedown.'+this.widgetName, function(event) {
				return self._mouseDown(event);
			})
			.bind('click.'+this.widgetName, function(event) {
				if(self._preventClickEvent) {
					self._preventClickEvent = false;
					event.stopImmediatePropagation();
					return false;
				}
			});

		// Prevent text selection in IE
		if ($.browser.msie) {
			this._mouseUnselectable = this.element.attr('unselectable');
			this.element.attr('unselectable', 'on');
		}

		this.started = false;
	},

	// TODO: make sure destroying one instance of mouse doesn't mess with
	// other instances of mouse
	_mouseDestroy: function() {
		this.element.unbind('.'+this.widgetName);

		// Restore text selection in IE
		($.browser.msie
			&& this.element.attr('unselectable', this._mouseUnselectable));
	},

	_mouseDown: function(event) {
		// don't let more than one widget handle mouseStart
		// TODO: figure out why we have to use originalEvent
		event.originalEvent = event.originalEvent || {};
		if (event.originalEvent.mouseHandled) { return; }

		// we may have missed mouseup (out of window)
		(this._mouseStarted && this._mouseUp(event));

		this._mouseDownEvent = event;

		var self = this,
			btnIsLeft = (event.which == 1),
			elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
			return true;
		}

		this.mouseDelayMet = !this.options.delay;
		if (!this.mouseDelayMet) {
			this._mouseDelayTimer = setTimeout(function() {
				self.mouseDelayMet = true;
			}, this.options.delay);
		}

		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
			this._mouseStarted = (this._mouseStart(event) !== false);
			if (!this._mouseStarted) {
				event.preventDefault();
				return true;
			}
		}

		// these delegates are required to keep context
		this._mouseMoveDelegate = function(event) {
			return self._mouseMove(event);
		};
		this._mouseUpDelegate = function(event) {
			return self._mouseUp(event);
		};
		$(document)
			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);

		// preventDefault() is used to prevent the selection of text here -
		// however, in Safari, this causes select boxes not to be selectable
		// anymore, so this fix is needed
		($.browser.safari || event.preventDefault());

		event.originalEvent.mouseHandled = true;
		return true;
	},

	_mouseMove: function(event) {
		// IE mouseup check - mouseup happened when mouse was out of window
		if ($.browser.msie && !event.button) {
			return this._mouseUp(event);
		}

		if (this._mouseStarted) {
			this._mouseDrag(event);
			return event.preventDefault();
		}

		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
			this._mouseStarted =
				(this._mouseStart(this._mouseDownEvent, event) !== false);
			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
		}

		return !this._mouseStarted;
	},

	_mouseUp: function(event) {
		$(document)
			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);

		if (this._mouseStarted) {
			this._mouseStarted = false;
			this._preventClickEvent = (event.target == this._mouseDownEvent.target);
			this._mouseStop(event);
		}

		return false;
	},

	_mouseDistanceMet: function(event) {
		return (Math.max(
				Math.abs(this._mouseDownEvent.pageX - event.pageX),
				Math.abs(this._mouseDownEvent.pageY - event.pageY)
			) >= this.options.distance
		);
	},

	_mouseDelayMet: function(event) {
		return this.mouseDelayMet;
	},

	// These are placeholder methods, to be overriden by extending plugin
	_mouseStart: function(event) {},
	_mouseDrag: function(event) {},
	_mouseStop: function(event) {},
	_mouseCapture: function(event) { return true; }
};

$.ui.mouse.defaults = {
	cancel: null,
	distance: 1,
	delay: 0
};

})(jQuery);
;/*
 * jQuery UI Datepicker 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	ui.core.js
 */

(function($) { // hide the namespace

$.extend($.ui, { datepicker: { version: "1.7.2" } });

var PROP_NAME = 'datepicker';

/* Date picker manager.
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
   Settings for (groups of) date pickers are maintained in an instance object,
   allowing multiple different settings on the same page. */

function Datepicker() {
	this.debug = false; // Change this to true to start debugging
	this._curInst = null; // The current instance in use
	this._keyEvent = false; // If the last event was a key event
	this._disabledInputs = []; // List of date picker inputs that have been disabled
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
	this._inDialog = false; // True if showing within a "dialog", false if not
	this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
	this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
	this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
	this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
	this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
	this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
	this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
	this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
	this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
	this.regional = []; // Available regional settings, indexed by language code
	this.regional[''] = { // Default regional settings
		closeText: 'Done', // Display text for close link
		prevText: 'Prev', // Display text for previous month link
		nextText: 'Next', // Display text for next month link
		currentText: 'Today', // Display text for current month link
		monthNames: ['January','February','March','April','May','June',
			'July','August','September','October','November','December'], // Names of months for drop-down and formatting
		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
		dateFormat: 'mm/dd/yy', // See format options on parseDate
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
		isRTL: false // True if right-to-left language, false if left-to-right
	};
	this._defaults = { // Global defaults for all the date picker instances
		showOn: 'focus', // 'focus' for popup on focus,
			// 'button' for trigger button, or 'both' for either
		showAnim: 'show', // Name of jQuery animation for popup
		showOptions: {}, // Options for enhanced animations
		defaultDate: null, // Used when field is blank: actual date,
			// +/-number for offset from today, null for today
		appendText: '', // Display text following the input box, e.g. showing the format
		buttonText: '...', // Text for trigger button
		buttonImage: '', // URL for trigger button image
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
		hideIfNoPrevNext: false, // True to hide next/previous month links
			// if not applicable, false to just disable them
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
		gotoCurrent: false, // True if today link goes back to current selection instead
		changeMonth: false, // True if month can be selected directly, false if only prev/next
		changeYear: false, // True if year can be selected directly, false if only prev/next
		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
		yearRange: '-10:+10', // Range of years to display in drop-down,
			// either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
		showOtherMonths: false, // True to show dates in other months, false to leave blank
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
			// takes a Date and returns the number of the week for it
		shortYearCutoff: '+10', // Short year values < this are in the current century,
			// > this are in the previous century,
			// string value starting with '+' for current year + value
		minDate: null, // The earliest selectable date, or null for no limit
		maxDate: null, // The latest selectable date, or null for no limit
		duration: 'normal', // Duration of display/closure
		beforeShowDay: null, // Function that takes a date and returns an array with
			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
		beforeShow: null, // Function that takes an input field and
			// returns a set of custom settings for the date picker
		onSelect: null, // Define a callback function when a date is selected
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
		onClose: null, // Define a callback function when the datepicker is closed
		numberOfMonths: 1, // Number of months to show at a time
		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
		stepMonths: 1, // Number of months to step back/forward
		stepBigMonths: 12, // Number of months to step back/forward for the big links
		altField: '', // Selector for an alternate field to store selected dates into
		altFormat: '', // The date format to use for the alternate field
		constrainInput: true, // The input is constrained by the current date format
		showButtonPanel: false // True to show button panel, false to not show it
	};
	$.extend(this._defaults, this.regional['']);
	this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
}

$.extend(Datepicker.prototype, {
	/* Class name added to elements to indicate already configured with a date picker. */
	markerClassName: 'hasDatepicker',

	/* Debug logging (if enabled). */
	log: function () {
		if (this.debug)
			console.log.apply('', arguments);
	},

	/* Override the default settings for all instances of the date picker.
	   @param  settings  object - the new settings to use as defaults (anonymous object)
	   @return the manager object */
	setDefaults: function(settings) {
		extendRemove(this._defaults, settings || {});
		return this;
	},

	/* Attach the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span
	   @param  settings  object - the new settings to use for this date picker instance (anonymous) */
	_attachDatepicker: function(target, settings) {
		// check for settings on the control itself - in namespace 'date:'
		var inlineSettings = null;
		for (var attrName in this._defaults) {
			var attrValue = target.getAttribute('date:' + attrName);
			if (attrValue) {
				inlineSettings = inlineSettings || {};
				try {
					inlineSettings[attrName] = eval(attrValue);
				} catch (err) {
					inlineSettings[attrName] = attrValue;
				}
			}
		}
		var nodeName = target.nodeName.toLowerCase();
		var inline = (nodeName == 'div' || nodeName == 'span');
		if (!target.id)
			target.id = 'dp' + (++this.uuid);
		var inst = this._newInst($(target), inline);
		inst.settings = $.extend({}, settings || {}, inlineSettings || {});
		if (nodeName == 'input') {
			this._connectDatepicker(target, inst);
		} else if (inline) {
			this._inlineDatepicker(target, inst);
		}
	},

	/* Create a new instance object. */
	_newInst: function(target, inline) {
		var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars
		return {id: id, input: target, // associated target
			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
			drawMonth: 0, drawYear: 0, // month being drawn
			inline: inline, // is datepicker inline or not
			dpDiv: (!inline ? this.dpDiv : // presentation div
			$('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};
	},

	/* Attach the date picker to an input field. */
	_connectDatepicker: function(target, inst) {
		var input = $(target);
		inst.append = $([]);
		inst.trigger = $([]);
		if (input.hasClass(this.markerClassName))
			return;
		var appendText = this._get(inst, 'appendText');
		var isRTL = this._get(inst, 'isRTL');
		if (appendText) {
			inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
			input[isRTL ? 'before' : 'after'](inst.append);
		}
		var showOn = this._get(inst, 'showOn');
		if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
			input.focus(this._showDatepicker);
		if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
			var buttonText = this._get(inst, 'buttonText');
			var buttonImage = this._get(inst, 'buttonImage');
			inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
				$('<img/>').addClass(this._triggerClass).
					attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
				$('<button type="button"></button>').addClass(this._triggerClass).
					html(buttonImage == '' ? buttonText : $('<img/>').attr(
					{ src:buttonImage, alt:buttonText, title:buttonText })));
			input[isRTL ? 'before' : 'after'](inst.trigger);
			inst.trigger.click(function() {
				if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
					$.datepicker._hideDatepicker();
				else
					$.datepicker._showDatepicker(target);
				return false;
			});
		}
		input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
			bind("setData.datepicker", function(event, key, value) {
				inst.settings[key] = value;
			}).bind("getData.datepicker", function(event, key) {
				return this._get(inst, key);
			});
		$.data(target, PROP_NAME, inst);
	},

	/* Attach an inline date picker to a div. */
	_inlineDatepicker: function(target, inst) {
		var divSpan = $(target);
		if (divSpan.hasClass(this.markerClassName))
			return;
		divSpan.addClass(this.markerClassName).append(inst.dpDiv).
			bind("setData.datepicker", function(event, key, value){
				inst.settings[key] = value;
			}).bind("getData.datepicker", function(event, key){
				return this._get(inst, key);
			});
		$.data(target, PROP_NAME, inst);
		this._setDate(inst, this._getDefaultDate(inst));
		this._updateDatepicker(inst);
		this._updateAlternate(inst);
	},

	/* Pop-up the date picker in a "dialog" box.
	   @param  input     element - ignored
	   @param  dateText  string - the initial date to display (in the current format)
	   @param  onSelect  function - the function(dateText) to call when a date is selected
	   @param  settings  object - update the dialog date picker instance's settings (anonymous object)
	   @param  pos       int[2] - coordinates for the dialog's position within the screen or
	                     event - with x/y coordinates or
	                     leave empty for default (screen centre)
	   @return the manager object */
	_dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
		var inst = this._dialogInst; // internal instance
		if (!inst) {
			var id = 'dp' + (++this.uuid);
			this._dialogInput = $('<input type="text" id="' + id +
				'" size="1" style="position: absolute; top: -100px;"/>');
			this._dialogInput.keydown(this._doKeyDown);
			$('body').append(this._dialogInput);
			inst = this._dialogInst = this._newInst(this._dialogInput, false);
			inst.settings = {};
			$.data(this._dialogInput[0], PROP_NAME, inst);
		}
		extendRemove(inst.settings, settings || {});
		this._dialogInput.val(dateText);

		this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
		if (!this._pos) {
			var browserWidth = window.innerWidth || document.documentElement.clientWidth ||	document.body.clientWidth;
			var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
			var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
			var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
			this._pos = // should use actual width/height below
				[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
		}

		// move input on screen for focus, but hidden behind dialog
		this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
		inst.settings.onSelect = onSelect;
		this._inDialog = true;
		this.dpDiv.addClass(this._dialogClass);
		this._showDatepicker(this._dialogInput[0]);
		if ($.blockUI)
			$.blockUI(this.dpDiv);
		$.data(this._dialogInput[0], PROP_NAME, inst);
		return this;
	},

	/* Detach a datepicker from its control.
	   @param  target    element - the target input field or division or span */
	_destroyDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		$.removeData(target, PROP_NAME);
		if (nodeName == 'input') {
			inst.append.remove();
			inst.trigger.remove();
			$target.removeClass(this.markerClassName).
				unbind('focus', this._showDatepicker).
				unbind('keydown', this._doKeyDown).
				unbind('keypress', this._doKeyPress);
		} else if (nodeName == 'div' || nodeName == 'span')
			$target.removeClass(this.markerClassName).empty();
	},

	/* Enable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_enableDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		if (nodeName == 'input') {
			target.disabled = false;
			inst.trigger.filter('button').
				each(function() { this.disabled = false; }).end().
				filter('img').css({opacity: '1.0', cursor: ''});
		}
		else if (nodeName == 'div' || nodeName == 'span') {
			var inline = $target.children('.' + this._inlineClass);
			inline.children().removeClass('ui-state-disabled');
		}
		this._disabledInputs = $.map(this._disabledInputs,
			function(value) { return (value == target ? null : value); }); // delete entry
	},

	/* Disable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_disableDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		if (nodeName == 'input') {
			target.disabled = true;
			inst.trigger.filter('button').
				each(function() { this.disabled = true; }).end().
				filter('img').css({opacity: '0.5', cursor: 'default'});
		}
		else if (nodeName == 'div' || nodeName == 'span') {
			var inline = $target.children('.' + this._inlineClass);
			inline.children().addClass('ui-state-disabled');
		}
		this._disabledInputs = $.map(this._disabledInputs,
			function(value) { return (value == target ? null : value); }); // delete entry
		this._disabledInputs[this._disabledInputs.length] = target;
	},

	/* Is the first field in a jQuery collection disabled as a datepicker?
	   @param  target    element - the target input field or division or span
	   @return boolean - true if disabled, false if enabled */
	_isDisabledDatepicker: function(target) {
		if (!target) {
			return false;
		}
		for (var i = 0; i < this._disabledInputs.length; i++) {
			if (this._disabledInputs[i] == target)
				return true;
		}
		return false;
	},

	/* Retrieve the instance data for the target control.
	   @param  target  element - the target input field or division or span
	   @return  object - the associated instance data
	   @throws  error if a jQuery problem getting data */
	_getInst: function(target) {
		try {
			return $.data(target, PROP_NAME);
		}
		catch (err) {
			throw 'Missing instance data for this datepicker';
		}
	},

	/* Update or retrieve the settings for a date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span
	   @param  name    object - the new settings to update or
	                   string - the name of the setting to change or retrieve,
	                   when retrieving also 'all' for all instance settings or
	                   'defaults' for all global defaults
	   @param  value   any - the new value for the setting
	                   (omit if above is an object or to retrieve a value) */
	_optionDatepicker: function(target, name, value) {
		var inst = this._getInst(target);
		if (arguments.length == 2 && typeof name == 'string') {
			return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
				(inst ? (name == 'all' ? $.extend({}, inst.settings) :
				this._get(inst, name)) : null));
		}
		var settings = name || {};
		if (typeof name == 'string') {
			settings = {};
			settings[name] = value;
		}
		if (inst) {
			if (this._curInst == inst) {
				this._hideDatepicker(null);
			}
			var date = this._getDateDatepicker(target);
			extendRemove(inst.settings, settings);
			this._setDateDatepicker(target, date);
			this._updateDatepicker(inst);
		}
	},

	// change method deprecated
	_changeDatepicker: function(target, name, value) {
		this._optionDatepicker(target, name, value);
	},

	/* Redraw the date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span */
	_refreshDatepicker: function(target) {
		var inst = this._getInst(target);
		if (inst) {
			this._updateDatepicker(inst);
		}
	},

	/* Set the dates for a jQuery selection.
	   @param  target   element - the target input field or division or span
	   @param  date     Date - the new date
	   @param  endDate  Date - the new end date for a range (optional) */
	_setDateDatepicker: function(target, date, endDate) {
		var inst = this._getInst(target);
		if (inst) {
			this._setDate(inst, date, endDate);
			this._updateDatepicker(inst);
			this._updateAlternate(inst);
		}
	},

	/* Get the date(s) for the first entry in a jQuery selection.
	   @param  target  element - the target input field or division or span
	   @return Date - the current date or
	           Date[2] - the current dates for a range */
	_getDateDatepicker: function(target) {
		var inst = this._getInst(target);
		if (inst && !inst.inline)
			this._setDateFromField(inst);
		return (inst ? this._getDate(inst) : null);
	},

	/* Handle keystrokes. */
	_doKeyDown: function(event) {
		var inst = $.datepicker._getInst(event.target);
		var handled = true;
		var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
		inst._keyEvent = true;
		if ($.datepicker._datepickerShowing)
			switch (event.keyCode) {
				case 9:  $.datepicker._hideDatepicker(null, '');
						break; // hide on tab out
				case 13: var sel = $('td.' + $.datepicker._dayOverClass +
							', td.' + $.datepicker._currentClass, inst.dpDiv);
						if (sel[0])
							$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
						else
							$.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
						return false; // don't submit the form
						break; // select the value on enter
				case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
						break; // hide on escape
				case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
							-$.datepicker._get(inst, 'stepBigMonths') :
							-$.datepicker._get(inst, 'stepMonths')), 'M');
						break; // previous month/year on page up/+ ctrl
				case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
							+$.datepicker._get(inst, 'stepBigMonths') :
							+$.datepicker._get(inst, 'stepMonths')), 'M');
						break; // next month/year on page down/+ ctrl
				case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
						handled = event.ctrlKey || event.metaKey;
						break; // clear on ctrl or command +end
				case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
						handled = event.ctrlKey || event.metaKey;
						break; // current on ctrl or command +home
				case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
						handled = event.ctrlKey || event.metaKey;
						// -1 day on ctrl or command +left
						if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
									-$.datepicker._get(inst, 'stepBigMonths') :
									-$.datepicker._get(inst, 'stepMonths')), 'M');
						// next month/year on alt +left on Mac
						break;
				case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
						handled = event.ctrlKey || event.metaKey;
						break; // -1 week on ctrl or command +up
				case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
						handled = event.ctrlKey || event.metaKey;
						// +1 day on ctrl or command +right
						if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
									+$.datepicker._get(inst, 'stepBigMonths') :
									+$.datepicker._get(inst, 'stepMonths')), 'M');
						// next month/year on alt +right
						break;
				case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
						handled = event.ctrlKey || event.metaKey;
						break; // +1 week on ctrl or command +down
				default: handled = false;
			}
		else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
			$.datepicker._showDatepicker(this);
		else {
			handled = false;
		}
		if (handled) {
			event.preventDefault();
			event.stopPropagation();
		}
	},

	/* Filter entered characters - based on date format. */
	_doKeyPress: function(event) {
		var inst = $.datepicker._getInst(event.target);
		if ($.datepicker._get(inst, 'constrainInput')) {
			var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
			var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
			return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
		}
	},

	/* Pop-up the date picker for a given input field.
	   @param  input  element - the input field attached to the date picker or
	                  event - if triggered by focus */
	_showDatepicker: function(input) {
		input = input.target || input;
		if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
			input = $('input', input.parentNode)[0];
		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
			return;
		var inst = $.datepicker._getInst(input);
		var beforeShow = $.datepicker._get(inst, 'beforeShow');
		extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
		$.datepicker._hideDatepicker(null, '');
		$.datepicker._lastInput = input;
		$.datepicker._setDateFromField(inst);
		if ($.datepicker._inDialog) // hide cursor
			input.value = '';
		if (!$.datepicker._pos) { // position below input
			$.datepicker._pos = $.datepicker._findPos(input);
			$.datepicker._pos[1] += input.offsetHeight; // add the height
		}
		var isFixed = false;
		$(input).parents().each(function() {
			isFixed |= $(this).css('position') == 'fixed';
			return !isFixed;
		});
		if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
			$.datepicker._pos[0] -= document.documentElement.scrollLeft;
			$.datepicker._pos[1] -= document.documentElement.scrollTop;
		}
		var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
		$.datepicker._pos = null;
		inst.rangeStart = null;
		// determine sizing offscreen
		inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
		$.datepicker._updateDatepicker(inst);
		// fix width for dynamic number of date pickers
		// and adjust position before showing
		offset = $.datepicker._checkOffset(inst, offset, isFixed);
		inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
			'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
			left: offset.left + 'px', top: offset.top + 'px'});
		if (!inst.inline) {
			var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
			var duration = $.datepicker._get(inst, 'duration');
			var postProcess = function() {
				$.datepicker._datepickerShowing = true;
				if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems
					$('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
						height: inst.dpDiv.height() + 4});
			};
			if ($.effects && $.effects[showAnim])
				inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
			else
				inst.dpDiv[showAnim](duration, postProcess);
			if (duration == '')
				postProcess();
			if (inst.input[0].type != 'hidden')
				inst.input[0].focus();
			$.datepicker._curInst = inst;
		}
	},

	/* Generate the date picker content. */
	_updateDatepicker: function(inst) {
		var dims = {width: inst.dpDiv.width() + 4,
			height: inst.dpDiv.height() + 4};
		var self = this;
		inst.dpDiv.empty().append(this._generateHTML(inst))
			.find('iframe.ui-datepicker-cover').
				css({width: dims.width, height: dims.height})
			.end()
			.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
				.bind('mouseout', function(){
					$(this).removeClass('ui-state-hover');
					if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
					if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
				})
				.bind('mouseover', function(){
					if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
						$(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
						$(this).addClass('ui-state-hover');
						if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
						if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
					}
				})
			.end()
			.find('.' + this._dayOverClass + ' a')
				.trigger('mouseover')
			.end();
		var numMonths = this._getNumberOfMonths(inst);
		var cols = numMonths[1];
		var width = 17;
		if (cols > 1) {
			inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
		} else {
			inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
		}
		inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
			'Class']('ui-datepicker-multi');
		inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
			'Class']('ui-datepicker-rtl');
		if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
			$(inst.input[0]).focus();
	},

	/* Check positioning to remain on screen. */
	_checkOffset: function(inst, offset, isFixed) {
		var dpWidth = inst.dpDiv.outerWidth();
		var dpHeight = inst.dpDiv.outerHeight();
		var inputWidth = inst.input ? inst.input.outerWidth() : 0;
		var inputHeight = inst.input ? inst.input.outerHeight() : 0;
		var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
		var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();

		offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
		offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
		offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;

		// now check if datepicker is showing outside window viewport - move to a better place if so.
		offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
		offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;

		return offset;
	},

	/* Find an object's position on the screen. */
	_findPos: function(obj) {
        while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
            obj = obj.nextSibling;
        }
        var position = $(obj).offset();
	    return [position.left, position.top];
	},

	/* Hide the date picker from view.
	   @param  input  element - the input field attached to the date picker
	   @param  duration  string - the duration over which to close the date picker */
	_hideDatepicker: function(input, duration) {
		var inst = this._curInst;
		if (!inst || (input && inst != $.data(input, PROP_NAME)))
			return;
		if (inst.stayOpen)
			this._selectDate('#' + inst.id, this._formatDate(inst,
				inst.currentDay, inst.currentMonth, inst.currentYear));
		inst.stayOpen = false;
		if (this._datepickerShowing) {
			duration = (duration != null ? duration : this._get(inst, 'duration'));
			var showAnim = this._get(inst, 'showAnim');
			var postProcess = function() {
				$.datepicker._tidyDialog(inst);
			};
			if (duration != '' && $.effects && $.effects[showAnim])
				inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
					duration, postProcess);
			else
				inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
					(showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
			if (duration == '')
				this._tidyDialog(inst);
			var onClose = this._get(inst, 'onClose');
			if (onClose)
				onClose.apply((inst.input ? inst.input[0] : null),
					[(inst.input ? inst.input.val() : ''), inst]);  // trigger custom callback
			this._datepickerShowing = false;
			this._lastInput = null;
			if (this._inDialog) {
				this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
				if ($.blockUI) {
					$.unblockUI();
					$('body').append(this.dpDiv);
				}
			}
			this._inDialog = false;
		}
		this._curInst = null;
	},

	/* Tidy up after a dialog display. */
	_tidyDialog: function(inst) {
		inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
	},

	/* Close date picker if clicked elsewhere. */
	_checkExternalClick: function(event) {
		if (!$.datepicker._curInst)
			return;
		var $target = $(event.target);
		if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
				!$target.hasClass($.datepicker.markerClassName) &&
				!$target.hasClass($.datepicker._triggerClass) &&
				$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
			$.datepicker._hideDatepicker(null, '');
	},

	/* Adjust one of the date sub-fields. */
	_adjustDate: function(id, offset, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._isDisabledDatepicker(target[0])) {
			return;
		}
		this._adjustInstDate(inst, offset +
			(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
			period);
		this._updateDatepicker(inst);
	},

	/* Action for current link. */
	_gotoToday: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		}
		else {
		var date = new Date();
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		}
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Action for selecting a new month/year. */
	_selectMonthYear: function(id, select, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		inst._selectingMonthYear = false;
		inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
		inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
			parseInt(select.options[select.selectedIndex].value,10);
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Restore input focus after not changing month/year. */
	_clickMonthYear: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (inst.input && inst._selectingMonthYear && !$.browser.msie)
			inst.input[0].focus();
		inst._selectingMonthYear = !inst._selectingMonthYear;
	},

	/* Action for selecting a day. */
	_selectDay: function(id, month, year, td) {
		var target = $(id);
		if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
			return;
		}
		var inst = this._getInst(target[0]);
		inst.selectedDay = inst.currentDay = $('a', td).html();
		inst.selectedMonth = inst.currentMonth = month;
		inst.selectedYear = inst.currentYear = year;
		if (inst.stayOpen) {
			inst.endDay = inst.endMonth = inst.endYear = null;
		}
		this._selectDate(id, this._formatDate(inst,
			inst.currentDay, inst.currentMonth, inst.currentYear));
		if (inst.stayOpen) {
			inst.rangeStart = this._daylightSavingAdjust(
				new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
			this._updateDatepicker(inst);
		}
	},

	/* Erase the input field and hide the date picker. */
	_clearDate: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		inst.stayOpen = false;
		inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
		this._selectDate(target, '');
	},

	/* Update the input field with the selected date. */
	_selectDate: function(id, dateStr) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
		if (inst.input)
			inst.input.val(dateStr);
		this._updateAlternate(inst);
		var onSelect = this._get(inst, 'onSelect');
		if (onSelect)
			onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback
		else if (inst.input)
			inst.input.trigger('change'); // fire the change event
		if (inst.inline)
			this._updateDatepicker(inst);
		else if (!inst.stayOpen) {
			this._hideDatepicker(null, this._get(inst, 'duration'));
			this._lastInput = inst.input[0];
			if (typeof(inst.input[0]) != 'object')
				inst.input[0].focus(); // restore focus
			this._lastInput = null;
		}
	},

	/* Update any alternate field to synchronise with the main field. */
	_updateAlternate: function(inst) {
		var altField = this._get(inst, 'altField');
		if (altField) { // update alternate field too
			var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
			var date = this._getDate(inst);
			dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
			$(altField).each(function() { $(this).val(dateStr); });
		}
	},

	/* Set as beforeShowDay function to prevent selection of weekends.
	   @param  date  Date - the date to customise
	   @return [boolean, string] - is this date selectable?, what is its CSS class? */
	noWeekends: function(date) {
		var day = date.getDay();
		return [(day > 0 && day < 6), ''];
	},

	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
	   @param  date  Date - the date to get the week for
	   @return  number - the number of the week within the year that contains this date */
	iso8601Week: function(date) {
		var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
		var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
		var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
		firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
		if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
			checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
			return $.datepicker.iso8601Week(checkDate);
		} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
			firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
			if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
				return 1;
			}
		}
		return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
	},

	/* Parse a string value into a date object.
	   See formatDate below for the possible formats.

	   @param  format    string - the expected format of the date
	   @param  value     string - the date in the above format
	   @param  settings  Object - attributes include:
	                     shortYearCutoff  number - the cutoff year for determining the century (optional)
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  Date - the extracted date value or null if value is blank */
	parseDate: function (format, value, settings) {
		if (format == null || value == null)
			throw 'Invalid arguments';
		value = (typeof value == 'object' ? value.toString() : value + '');
		if (value == '')
			return null;
		var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
		var year = -1;
		var month = -1;
		var day = -1;
		var doy = -1;
		var literal = false;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;
		};
		// Extract a number from the string value
		var getNumber = function(match) {
			lookAhead(match);
			var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2)));
			var size = origSize;
			var num = 0;
			while (size > 0 && iValue < value.length &&
					value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
				num = num * 10 + parseInt(value.charAt(iValue++),10);
				size--;
			}
			if (size == origSize)
				throw 'Missing number at position ' + iValue;
			return num;
		};
		// Extract a name from the string value and convert to an index
		var getName = function(match, shortNames, longNames) {
			var names = (lookAhead(match) ? longNames : shortNames);
			var size = 0;
			for (var j = 0; j < names.length; j++)
				size = Math.max(size, names[j].length);
			var name = '';
			var iInit = iValue;
			while (size > 0 && iValue < value.length) {
				name += value.charAt(iValue++);
				for (var i = 0; i < names.length; i++)
					if (name == names[i])
						return i + 1;
				size--;
			}
			throw 'Unknown name at position ' + iInit;
		};
		// Confirm that a literal character matches the string value
		var checkLiteral = function() {
			if (value.charAt(iValue) != format.charAt(iFormat))
				throw 'Unexpected literal at position ' + iValue;
			iValue++;
		};
		var iValue = 0;
		for (var iFormat = 0; iFormat < format.length; iFormat++) {
			if (literal)
				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
					literal = false;
				else
					checkLiteral();
			else
				switch (format.charAt(iFormat)) {
					case 'd':
						day = getNumber('d');
						break;
					case 'D':
						getName('D', dayNamesShort, dayNames);
						break;
					case 'o':
						doy = getNumber('o');
						break;
					case 'm':
						month = getNumber('m');
						break;
					case 'M':
						month = getName('M', monthNamesShort, monthNames);
						break;
					case 'y':
						year = getNumber('y');
						break;
					case '@':
						var date = new Date(getNumber('@'));
						year = date.getFullYear();
						month = date.getMonth() + 1;
						day = date.getDate();
						break;
					case "'":
						if (lookAhead("'"))
							checkLiteral();
						else
							literal = true;
						break;
					default:
						checkLiteral();
				}
		}
		if (year == -1)
			year = new Date().getFullYear();
		else if (year < 100)
			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
				(year <= shortYearCutoff ? 0 : -100);
		if (doy > -1) {
			month = 1;
			day = doy;
			do {
				var dim = this._getDaysInMonth(year, month - 1);
				if (day <= dim)
					break;
				month++;
				day -= dim;
			} while (true);
		}
		var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
		if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
			throw 'Invalid date'; // E.g. 31/02/*
		return date;
	},

	/* Standard date formats. */
	ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
	COOKIE: 'D, dd M yy',
	ISO_8601: 'yy-mm-dd',
	RFC_822: 'D, d M y',
	RFC_850: 'DD, dd-M-y',
	RFC_1036: 'D, d M y',
	RFC_1123: 'D, d M yy',
	RFC_2822: 'D, d M yy',
	RSS: 'D, d M y', // RFC 822
	TIMESTAMP: '@',
	W3C: 'yy-mm-dd', // ISO 8601

	/* Format a date object into a string value.
	   The format can be combinations of the following:
	   d  - day of month (no leading zero)
	   dd - day of month (two digit)
	   o  - day of year (no leading zeros)
	   oo - day of year (three digit)
	   D  - day name short
	   DD - day name long
	   m  - month of year (no leading zero)
	   mm - month of year (two digit)
	   M  - month name short
	   MM - month name long
	   y  - year (two digit)
	   yy - year (four digit)
	   @ - Unix timestamp (ms since 01/01/1970)
	   '...' - literal text
	   '' - single quote

	   @param  format    string - the desired format of the date
	   @param  date      Date - the date value to format
	   @param  settings  Object - attributes include:
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  string - the date in the above format */
	formatDate: function (format, date, settings) {
		if (!date)
			return '';
		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;
		};
		// Format a number, with leading zero if necessary
		var formatNumber = function(match, value, len) {
			var num = '' + value;
			if (lookAhead(match))
				while (num.length < len)
					num = '0' + num;
			return num;
		};
		// Format a name, short or long as requested
		var formatName = function(match, value, shortNames, longNames) {
			return (lookAhead(match) ? longNames[value] : shortNames[value]);
		};
		var output = '';
		var literal = false;
		if (date)
			for (var iFormat = 0; iFormat < format.length; iFormat++) {
				if (literal)
					if (format.charAt(iFormat) == "'" && !lookAhead("'"))
						literal = false;
					else
						output += format.charAt(iFormat);
				else
					switch (format.charAt(iFormat)) {
						case 'd':
							output += formatNumber('d', date.getDate(), 2);
							break;
						case 'D':
							output += formatName('D', date.getDay(), dayNamesShort, dayNames);
							break;
						case 'o':
							var doy = date.getDate();
							for (var m = date.getMonth() - 1; m >= 0; m--)
								doy += this._getDaysInMonth(date.getFullYear(), m);
							output += formatNumber('o', doy, 3);
							break;
						case 'm':
							output += formatNumber('m', date.getMonth() + 1, 2);
							break;
						case 'M':
							output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
							break;
						case 'y':
							output += (lookAhead('y') ? date.getFullYear() :
								(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
							break;
						case '@':
							output += date.getTime();
							break;
						case "'":
							if (lookAhead("'"))
								output += "'";
							else
								literal = true;
							break;
						default:
							output += format.charAt(iFormat);
					}
			}
		return output;
	},

	/* Extract all possible characters from the date format. */
	_possibleChars: function (format) {
		var chars = '';
		var literal = false;
		for (var iFormat = 0; iFormat < format.length; iFormat++)
			if (literal)
				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
					literal = false;
				else
					chars += format.charAt(iFormat);
			else
				switch (format.charAt(iFormat)) {
					case 'd': case 'm': case 'y': case '@':
						chars += '0123456789';
						break;
					case 'D': case 'M':
						return null; // Accept anything
					case "'":
						if (lookAhead("'"))
							chars += "'";
						else
							literal = true;
						break;
					default:
						chars += format.charAt(iFormat);
				}
		return chars;
	},

	/* Get a setting value, defaulting if necessary. */
	_get: function(inst, name) {
		return inst.settings[name] !== undefined ?
			inst.settings[name] : this._defaults[name];
	},

	/* Parse existing date and initialise date picker. */
	_setDateFromField: function(inst) {
		var dateFormat = this._get(inst, 'dateFormat');
		var dates = inst.input ? inst.input.val() : null;
		inst.endDay = inst.endMonth = inst.endYear = null;
		var date = defaultDate = this._getDefaultDate(inst);
		var settings = this._getFormatConfig(inst);
		try {
			date = this.parseDate(dateFormat, dates, settings) || defaultDate;
		} catch (event) {
			this.log(event);
			date = defaultDate;
		}
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		inst.currentDay = (dates ? date.getDate() : 0);
		inst.currentMonth = (dates ? date.getMonth() : 0);
		inst.currentYear = (dates ? date.getFullYear() : 0);
		this._adjustInstDate(inst);
	},

	/* Retrieve the default date shown on opening. */
	_getDefaultDate: function(inst) {
		var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		date = (minDate && date < minDate ? minDate : date);
		date = (maxDate && date > maxDate ? maxDate : date);
		return date;
	},

	/* A date may be specified as an exact value or a relative one. */
	_determineDate: function(date, defaultDate) {
		var offsetNumeric = function(offset) {
			var date = new Date();
			date.setDate(date.getDate() + offset);
			return date;
		};
		var offsetString = function(offset, getDaysInMonth) {
			var date = new Date();
			var year = date.getFullYear();
			var month = date.getMonth();
			var day = date.getDate();
			var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
			var matches = pattern.exec(offset);
			while (matches) {
				switch (matches[2] || 'd') {
					case 'd' : case 'D' :
						day += parseInt(matches[1],10); break;
					case 'w' : case 'W' :
						day += parseInt(matches[1],10) * 7; break;
					case 'm' : case 'M' :
						month += parseInt(matches[1],10);
						day = Math.min(day, getDaysInMonth(year, month));
						break;
					case 'y': case 'Y' :
						year += parseInt(matches[1],10);
						day = Math.min(day, getDaysInMonth(year, month));
						break;
				}
				matches = pattern.exec(offset);
			}
			return new Date(year, month, day);
		};
		date = (date == null ? defaultDate :
			(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
			(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
		date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
		if (date) {
			date.setHours(0);
			date.setMinutes(0);
			date.setSeconds(0);
			date.setMilliseconds(0);
		}
		return this._daylightSavingAdjust(date);
	},

	/* Handle switch to/from daylight saving.
	   Hours may be non-zero on daylight saving cut-over:
	   > 12 when midnight changeover, but then cannot generate
	   midnight datetime, so jump to 1AM, otherwise reset.
	   @param  date  (Date) the date to check
	   @return  (Date) the corrected date */
	_daylightSavingAdjust: function(date) {
		if (!date) return null;
		date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
		return date;
	},

	/* Set the date(s) directly. */
	_setDate: function(inst, date, endDate) {
		var clear = !(date);
		var origMonth = inst.selectedMonth;
		var origYear = inst.selectedYear;
		date = this._determineDate(date, new Date());
		inst.selectedDay = inst.currentDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
		if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
			this._notifyChange(inst);
		this._adjustInstDate(inst);
		if (inst.input) {
			inst.input.val(clear ? '' : this._formatDate(inst));
		}
	},

	/* Retrieve the date(s) directly. */
	_getDate: function(inst) {
		var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
			this._daylightSavingAdjust(new Date(
			inst.currentYear, inst.currentMonth, inst.currentDay)));
			return startDate;
	},

	/* Generate the HTML for the current state of the date picker. */
	_generateHTML: function(inst) {
		var today = new Date();
		today = this._daylightSavingAdjust(
			new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
		var isRTL = this._get(inst, 'isRTL');
		var showButtonPanel = this._get(inst, 'showButtonPanel');
		var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
		var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
		var numMonths = this._getNumberOfMonths(inst);
		var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
		var stepMonths = this._get(inst, 'stepMonths');
		var stepBigMonths = this._get(inst, 'stepBigMonths');
		var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
		var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
			new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		var drawMonth = inst.drawMonth - showCurrentAtPos;
		var drawYear = inst.drawYear;
		if (drawMonth < 0) {
			drawMonth += 12;
			drawYear--;
		}
		if (maxDate) {
			var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),

				maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
			maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
			while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
				drawMonth--;
				if (drawMonth < 0) {
					drawMonth = 11;
					drawYear--;
				}
			}
		}
		inst.drawMonth = drawMonth;
		inst.drawYear = drawYear;
		var prevText = this._get(inst, 'prevText');
		prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
			this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
			this._getFormatConfig(inst)));
		var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
			'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
			' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
			(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
		var nextText = this._get(inst, 'nextText');
		nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
			this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
			this._getFormatConfig(inst)));
		var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
			'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
			' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
			(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
		var currentText = this._get(inst, 'currentText');
		var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
		currentText = (!navigationAsDateFormat ? currentText :
			this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
		var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
		var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
			(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
			'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
		var firstDay = parseInt(this._get(inst, 'firstDay'),10);
		firstDay = (isNaN(firstDay) ? 0 : firstDay);
		var dayNames = this._get(inst, 'dayNames');
		var dayNamesShort = this._get(inst, 'dayNamesShort');
		var dayNamesMin = this._get(inst, 'dayNamesMin');
		var monthNames = this._get(inst, 'monthNames');
		var monthNamesShort = this._get(inst, 'monthNamesShort');
		var beforeShowDay = this._get(inst, 'beforeShowDay');
		var showOtherMonths = this._get(inst, 'showOtherMonths');
		var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
		var endDate = inst.endDay ? this._daylightSavingAdjust(
			new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
		var defaultDate = this._getDefaultDate(inst);
		var html = '';
		for (var row = 0; row < numMonths[0]; row++) {
			var group = '';
			for (var col = 0; col < numMonths[1]; col++) {
				var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
				var cornerClass = ' ui-corner-all';
				var calender = '';
				if (isMultiMonth) {
					calender += '<div class="ui-datepicker-group ui-datepicker-group-';
					switch (col) {
						case 0: calender += 'first'; cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
						case numMonths[1]-1: calender += 'last'; cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
						default: calender += 'middle'; cornerClass = ''; break;
					}
					calender += '">';
				}
				calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
					(/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
					(/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
					this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
					selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
					'</div><table class="ui-datepicker-calendar"><thead>' +
					'<tr>';
				var thead = '';
				for (var dow = 0; dow < 7; dow++) { // days of the week
					var day = (dow + firstDay) % 7;
					thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
						'<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
				}
				calender += thead + '</tr></thead><tbody>';
				var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
				if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
					inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
				var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
				var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
				var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
				for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
					calender += '<tr>';
					var tbody = '';
					for (var dow = 0; dow < 7; dow++) { // create date picker days
						var daySettings = (beforeShowDay ?
							beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
						var otherMonth = (printDate.getMonth() != drawMonth);
						var unselectable = otherMonth || !daySettings[0] ||
							(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
						tbody += '<td class="' +
							((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
							(otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
							((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
							(defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
							// or defaultDate is current printedDate and defaultDate is selectedDate
							' ' + this._dayOverClass : '') + // highlight selected day
							(unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') +  // highlight unselectable days
							(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
							(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
							' ' + this._currentClass : '') + // highlight selected day
							(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
							((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
							(unselectable ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' +
							inst.id + '\',' + drawMonth + ',' + drawYear + ', this);return false;"') + '>' + // actions
							(otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
							(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
							(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
							(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
							' ui-state-active' : '') + // highlight selected day
							'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
						printDate.setDate(printDate.getDate() + 1);
						printDate = this._daylightSavingAdjust(printDate);
					}
					calender += tbody + '</tr>';
				}
				drawMonth++;
				if (drawMonth > 11) {
					drawMonth = 0;
					drawYear++;
				}
				calender += '</tbody></table>' + (isMultiMonth ? '</div>' + 
							((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
				group += calender;
			}
			html += group;
		}
		html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
			'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
		inst._keyEvent = false;
		return html;
	},

	/* Generate the month and year header. */
	_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
			selectedDate, secondary, monthNames, monthNamesShort) {
		minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
		var changeMonth = this._get(inst, 'changeMonth');
		var changeYear = this._get(inst, 'changeYear');
		var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
		var html = '<div class="ui-datepicker-title">';
		var monthHtml = '';
		// month selection
		if (secondary || !changeMonth)
			monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
		else {
			var inMinYear = (minDate && minDate.getFullYear() == drawYear);
			var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
			monthHtml += '<select class="ui-datepicker-month" ' +
				'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
				'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
			 	'>';
			for (var month = 0; month < 12; month++) {
				if ((!inMinYear || month >= minDate.getMonth()) &&
						(!inMaxYear || month <= maxDate.getMonth()))
					monthHtml += '<option value="' + month + '"' +
						(month == drawMonth ? ' selected="selected"' : '') +
						'>' + monthNamesShort[month] + '</option>';
			}
			monthHtml += '</select>';
		}
		if (!showMonthAfterYear)
			html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
		// year selection
		if (secondary || !changeYear)
			html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
		else {
			// determine range of years to display
			var years = this._get(inst, 'yearRange').split(':');
			var year = 0;
			var endYear = 0;
			if (years.length != 2) {
				year = drawYear - 10;
				endYear = drawYear + 10;
			} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
				year = drawYear + parseInt(years[0], 10);
				endYear = drawYear + parseInt(years[1], 10);
			} else {
				year = parseInt(years[0], 10);
				endYear = parseInt(years[1], 10);
			}
			year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
			endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
			html += '<select class="ui-datepicker-year" ' +
				'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
				'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
				'>';
			for (; year <= endYear; year++) {
				html += '<option value="' + year + '"' +
					(year == drawYear ? ' selected="selected"' : '') +
					'>' + year + '</option>';
			}
			html += '</select>';
		}
		if (showMonthAfterYear)
			html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
		html += '</div>'; // Close datepicker_header
		return html;
	},

	/* Adjust one of the date sub-fields. */
	_adjustInstDate: function(inst, offset, period) {
		var year = inst.drawYear + (period == 'Y' ? offset : 0);
		var month = inst.drawMonth + (period == 'M' ? offset : 0);
		var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
			(period == 'D' ? offset : 0);
		var date = this._daylightSavingAdjust(new Date(year, month, day));
		// ensure it is within the bounds set
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		date = (minDate && date < minDate ? minDate : date);
		date = (maxDate && date > maxDate ? maxDate : date);
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		if (period == 'M' || period == 'Y')
			this._notifyChange(inst);
	},

	/* Notify change of month/year. */
	_notifyChange: function(inst) {
		var onChange = this._get(inst, 'onChangeMonthYear');
		if (onChange)
			onChange.apply((inst.input ? inst.input[0] : null),
				[inst.selectedYear, inst.selectedMonth + 1, inst]);
	},

	/* Determine the number of months to show. */
	_getNumberOfMonths: function(inst) {
		var numMonths = this._get(inst, 'numberOfMonths');
		return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
	},

	/* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
	_getMinMaxDate: function(inst, minMax, checkRange) {
		var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
		return (!checkRange || !inst.rangeStart ? date :
			(!date || inst.rangeStart > date ? inst.rangeStart : date));
	},

	/* Find the number of days in a given month. */
	_getDaysInMonth: function(year, month) {
		return 32 - new Date(year, month, 32).getDate();
	},

	/* Find the day of the week of the first of a month. */
	_getFirstDayOfMonth: function(year, month) {
		return new Date(year, month, 1).getDay();
	},

	/* Determines if we should allow a "next/prev" month display change. */
	_canAdjustMonth: function(inst, offset, curYear, curMonth) {
		var numMonths = this._getNumberOfMonths(inst);
		var date = this._daylightSavingAdjust(new Date(
			curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
		if (offset < 0)
			date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
		return this._isInRange(inst, date);
	},

	/* Is the given date in the accepted range? */
	_isInRange: function(inst, date) {
		// during range selection, use minimum of selected date and range start
		var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
			new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
		newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
		var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
		var maxDate = this._getMinMaxDate(inst, 'max');
		return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
	},

	/* Provide the configuration settings for formatting/parsing. */
	_getFormatConfig: function(inst) {
		var shortYearCutoff = this._get(inst, 'shortYearCutoff');
		shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
		return {shortYearCutoff: shortYearCutoff,
			dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
			monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
	},

	/* Format the given date for display. */
	_formatDate: function(inst, day, month, year) {
		if (!day) {
			inst.currentDay = inst.selectedDay;
			inst.currentMonth = inst.selectedMonth;
			inst.currentYear = inst.selectedYear;
		}
		var date = (day ? (typeof day == 'object' ? day :
			this._daylightSavingAdjust(new Date(year, month, day))) :
			this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
		return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
	}
});

/* jQuery extend now ignores nulls! */
function extendRemove(target, props) {
	$.extend(target, props);
	for (var name in props)
		if (props[name] == null || props[name] == undefined)
			target[name] = props[name];
	return target;
};

/* Determine whether an object is an array. */
function isArray(a) {
	return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
		(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
};

/* Invoke the datepicker functionality.
   @param  options  string - a command, optionally followed by additional parameters or
                    Object - settings for attaching new datepicker functionality
   @return  jQuery object */
$.fn.datepicker = function(options){

	/* Initialise the date picker. */
	if (!$.datepicker.initialized) {
		$(document).mousedown($.datepicker._checkExternalClick).
			find('body').append($.datepicker.dpDiv);
		$.datepicker.initialized = true;
	}

	var otherArgs = Array.prototype.slice.call(arguments, 1);
	if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
		return $.datepicker['_' + options + 'Datepicker'].
			apply($.datepicker, [this[0]].concat(otherArgs));
	if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
		return $.datepicker['_' + options + 'Datepicker'].
			apply($.datepicker, [this[0]].concat(otherArgs));
	return this.each(function() {
		typeof options == 'string' ?
			$.datepicker['_' + options + 'Datepicker'].
				apply($.datepicker, [this].concat(otherArgs)) :
			$.datepicker._attachDatepicker(this, options);
	});
};

$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "1.7.2";

// Workaround for #4055
// Add another global to avoid noConflict issues with inline event handlers
window.DP_jQuery = $;

})(jQuery);
;/**
 * tools.tabs 1.0.4 - Tabs done right.
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/tabs.html
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : November 2008
 * Date: ${date}
 * Revision: ${revision} 
 */  
(function($) {
		
	// static constructs
	$.tools = $.tools || {};
	
	$.tools.tabs = {
		version: '1.0.4',
		
		conf: {
			tabs: 'a',
			current: 'current',
			onBeforeClick: null,
			onClick: null, 
			effect: 'default',
			initialIndex: 0,			
			event: 'click',
			api:false,
			rotate: false
		},
		
		addEffect: function(name, fn) {
			effects[name] = fn;
		}
	};		
	
	
	var effects = {
		
		// simple "toggle" effect
		'default': function(i, done) { 
			this.getPanes().hide().eq(i).show();
			done.call();
		}, 
		
		/*
			configuration:
				- fadeOutSpeed (positive value does "crossfading")
				- fadeInSpeed
		*/
		fade: function(i, done) {
			var conf = this.getConf(), 
				 speed = conf.fadeOutSpeed,
				 panes = this.getPanes();
			
			if (speed) {
				panes.fadeOut(speed);	
			} else {
				panes.hide();	
			}

			panes.eq(i).fadeIn(conf.fadeInSpeed, done);	
		},
		
		// for basic accordions
		slide: function(i, done) {			
			this.getPanes().slideUp(200);
			this.getPanes().eq(i).slideDown(400, done);			 
		}, 

		// simple AJAX effect
		ajax: function(i, done)  {			
			this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"), done);	
		}
		
	};   	
	
	var w;
	
	// this is how you add effects
	$.tools.tabs.addEffect("horizontal", function(i, done) {
	
		// store original width of a pane into memory
		if (!w) { w = this.getPanes().eq(0).width(); }
		
		// set current pane's width to zero
		this.getCurrentPane().animate({width: 0}, function() { $(this).hide(); });
		
		// grow opened pane to it's original width
		this.getPanes().eq(i).animate({width: w}, function() { 
			$(this).show();
			done.call();
		});
		
	});	
	 

	function Tabs(tabs, panes, conf) { 
		
		var self = this, $self = $(this), current;

		// bind all callbacks from configuration
		$.each(conf, function(name, fn) {
			if ($.isFunction(fn)) { $self.bind(name, fn); }
		});
		
		
		// public methods
		$.extend(this, {				
			click: function(i, e) {
				
				var pane = self.getCurrentPane();				
				var tab = tabs.eq(i);												 
				
				if (typeof i == 'string' && i.replace("#", "")) {
					tab = tabs.filter("[href*=" + i.replace("#", "") + "]");
					i = Math.max(tabs.index(tab), 0);
				}
								
				if (conf.rotate) {
					var last = tabs.length -1; 
					if (i < 0) { return self.click(last, e); }
					if (i > last) { return self.click(0, e); }						
				}
				
				if (!tab.length) { 
					if (current >= 0) { return self; }
					i = conf.initialIndex;
					tab = tabs.eq(i);
				}				
				
				// current tab is being clicked
				if (i === current) { return self; }
				
				// possibility to cancel click action				
				e = e || $.Event();
				e.type = "onBeforeClick";
				$self.trigger(e, [i]);				
				if (e.isDefaultPrevented()) { return; }
				
				// call the effect
				effects[conf.effect].call(self, i, function() {

					// onClick callback
					e.type = "onClick";
					$self.trigger(e, [i]);					
				});			
				
				// onStart
				e.type = "onStart";
				$self.trigger(e, [i]);				
				if (e.isDefaultPrevented()) { return; } 
				
				// default behaviour
				current = i;
				tabs.removeClass(conf.current);	
				tab.addClass(conf.current);				
				
				return self;
			},
			
			getConf: function() {
				return conf;	
			},

			getTabs: function() {
				return tabs;	
			},
			
			getPanes: function() {
				return panes;	
			},
			
			getCurrentPane: function() {
				return panes.eq(current);	
			},
			
			getCurrentTab: function() {
				return tabs.eq(current);	
			},
			
			getIndex: function() {
				return current;	
			}, 
			
			next: function() {
				return self.click(current + 1);
			},
			
			prev: function() {
				return self.click(current - 1);	
			}, 
			
			bind: function(name, fn) {
				$self.bind(name, fn);
				return self;	
			},	
			
			onBeforeClick: function(fn) {
				return this.bind("onBeforeClick", fn);
			},
			
			onClick: function(fn) {
				return this.bind("onClick", fn);
			},
			
			unbind: function(name) {
				$self.unbind(name);
				return self;	
			}			
		
		});
		
		
		// setup click actions for each tab
		tabs.each(function(i) { 
			$(this).bind(conf.event, function(e) {
				self.click(i, e);
				return false;
			});			
		});

		// if no pane is visible --> click on the first tab
		if (location.hash) {
			self.click(location.hash);
		} else {
			if (conf.initialIndex === 0 || conf.initialIndex > 0) {
				self.click(conf.initialIndex);
			}
		}		
		
		// cross tab anchor link
		panes.find("a[href^=#]").click(function(e) {
			self.click($(this).attr("href"), e);		
		}); 
	}
	
	
	// jQuery plugin implementation
	$.fn.tabs = function(query, conf) {
		
		// return existing instance
		var el = this.eq(typeof conf == 'number' ? conf : 0).data("tabs");
		if (el) { return el; }

		if ($.isFunction(conf)) {
			conf = {onBeforeClick: conf};
		}
		
		// setup options
		var globals = $.extend({}, $.tools.tabs.conf), len = this.length;
		conf = $.extend(globals, conf);		

		
		// install tabs for each items in jQuery		
		this.each(function(i) {				
			var root = $(this); 
			
			// find tabs
			var els = root.find(conf.tabs);
			
			if (!els.length) {
				els = root.children();	
			}
			
			// find panes
			var panes = query.jquery ? query : root.children(query);
			
			if (!panes.length) {
				panes = len == 1 ? $(query) : root.parent().find(query);
			}			
			
			el = new Tabs(els, panes, conf);
			root.data("tabs", el);
			
		});		
		
		return conf.api ? el: this;		
	};		
		
}) (jQuery); 


;/**
 * tools.tooltip 1.1.2 - Tooltips done right.
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/tooltip.html
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : November 2008
 * Date: ${date}
 * Revision: ${revision} 
 */
(function($) { 

	var instances = [];
	
	// static constructs
	$.tools = $.tools || {};
	
	$.tools.tooltip = {
		version: '1.1.2',
		
		conf: { 
			
			// default effect variables
			effect: 'toggle',			
			fadeOutSpeed: "fast",
			tip: null,
			
			predelay: 0,
			delay: 30,
			opacity: 1,			
			lazy: undefined,
			
			// 'top', 'bottom', 'right', 'left', 'center'
			position: ['top', 'center'], 
			offset: [0, 0],			
			cancelDefault: true,
			relative: false,
			oneInstance: true,
			
			
			// type to event mapping 
			events: {
				def: 			"mouseover,mouseout",
				input: 		"focus,blur",
				widget:		"focus mouseover,blur mouseout",
				tooltip:		"mouseover,mouseout"
			},			
			
			api: false
		},
		
		addEffect: function(name, loadFn, hideFn) {
			effects[name] = [loadFn, hideFn];	
		} 
	};
	
	
	var effects = { 
		toggle: [ 
			function(done) { 
				var conf = this.getConf(), tip = this.getTip(), o = conf.opacity;
				if (o < 1) { tip.css({opacity: o}); }
				tip.show();
				done.call();
			},
			
			function(done) { 
				this.getTip().hide();
				done.call();
			} 
		],
		
		fade: [
			function(done) { this.getTip().fadeIn(this.getConf().fadeInSpeed, done); },  
			function(done) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, done); } 
		]		
	};   

	function Tooltip(trigger, conf) {

		var self = this, $self = $(this);
		
		trigger.data("tooltip", self);
		
		// find the tip
		var tip = trigger.next();
		
		if (conf.tip) {
			
			tip = $(conf.tip);
			
			// multiple tip elements
			if (tip.length > 1) {
				
				// find sibling
				tip = trigger.nextAll(conf.tip).eq(0);	
				
				// find sibling from the parent element
				if (!tip.length) {
					tip = trigger.parent().nextAll(conf.tip).eq(0);
				}
			} 
		} 				
		
		/* calculate tip position relative to the trigger */  	
		function getPosition(e) {	
			
			// get origin top/left position 
			var top = conf.relative ? trigger.position().top : trigger.offset().top, 
				 left = conf.relative ? trigger.position().left : trigger.offset().left,
				 pos = conf.position[0];

			top  -= tip.outerHeight() - conf.offset[0];
			left += trigger.outerWidth() + conf.offset[1];
			
			// adjust Y		
			var height = tip.outerHeight() + trigger.outerHeight();
			if (pos == 'center') 	{ top += height / 2; }
			if (pos == 'bottom') 	{ top += height; }
			
			// adjust X
			pos = conf.position[1]; 	
			var width = tip.outerWidth() + trigger.outerWidth();
			if (pos == 'center') 	{ left -= width / 2; }
			if (pos == 'left')   	{ left -= width; }	 
			
			return {top: top, left: left};
		}		

		
		// event management
		var isInput = trigger.is(":input"), 
			 isWidget = isInput && trigger.is(":checkbox, :radio, select, :button"),			
			 type = trigger.attr("type"),
			 evt = conf.events[type] || conf.events[isInput ? (isWidget ? 'widget' : 'input') : 'def']; 
		
		evt = evt.split(/,\s*/); 
		if (evt.length != 2) { throw "Tooltip: bad events configuration for " + type; }
				
		trigger.bind(evt[0], function(e) {
			
			// close all instances
			if (conf.oneInstance) {
				$.each(instances, function()  {
					this.hide();		
				});
			}
				
			// see if the tip was launched by this trigger
			var t = tip.data("trigger");			
			if (t && t[0] != this) { tip.hide().stop(true, true); }			
			
			e.target = this;
			self.show(e); 
			
			// tooltip close events
			evt = conf.events.tooltip.split(/,\s*/);
			tip.bind(evt[0], function() { self.show(e); });
			if (evt[1]) { tip.bind(evt[1], function() { self.hide(e); }); }
			
		});
		
		trigger.bind(evt[1], function(e) {
			self.hide(e); 
		});
		
		// ensure that the tip really shows up. IE cannot catch up with this.
		if (!$.browser.msie && !isInput && !conf.predelay) {
			trigger.mousemove(function()  {					
				if (!self.isShown()) {
					trigger.triggerHandler("mouseover");	
				}
			});
		}

		// avoid "black box" bug in IE with PNG background images
		if (conf.opacity < 1) {
			tip.css("opacity", conf.opacity);		
		}
		
		var pretimer = 0, title = trigger.attr("title");
		
		if (title && conf.cancelDefault) { 
			trigger.removeAttr("title");
			trigger.data("title", title);			
		}						
		
		$.extend(self, {
				
			show: function(e) {
				
				if (e) { trigger = $(e.target); }				

				clearTimeout(tip.data("timer"));					

				if (tip.is(":animated") || tip.is(":visible")) { return self; }
				
				function show() {
					
					// remember the trigger element for this tip
					tip.data("trigger", trigger);
					
					// get position
					var pos = getPosition(e);					
					
					// title attribute					
					if (conf.tip && title) {
						tip.html(trigger.data("title"));
					} 				
					
					// onBeforeShow
					e = e || $.Event();
					e.type = "onBeforeShow";
					$self.trigger(e, [pos]);				
					if (e.isDefaultPrevented()) { return self; }
			
					
					// onBeforeShow may have altered the configuration
					pos = getPosition(e);
					
					// set position
					tip.css({position:'absolute', top: pos.top, left: pos.left});					
					
					// invoke effect
					var eff = effects[conf.effect];
					if (!eff) { throw "Nonexistent effect \"" + conf.effect + "\""; }
					
					eff[0].call(self, function() {
						e.type = "onShow";
						$self.trigger(e);			
					});					
					
				}
				
				if (conf.predelay) {
					clearTimeout(pretimer);
					pretimer = setTimeout(show, conf.predelay);	
					
				} else {
					show();	
				}
				
				return self;
			},
			
			hide: function(e) {

				clearTimeout(tip.data("timer"));
				clearTimeout(pretimer);
				
				if (!tip.is(":visible")) { return; }
				
				function hide() {
					
					// onBeforeHide
					e = e || $.Event();
					e.type = "onBeforeHide";
					$self.trigger(e);				
					if (e.isDefaultPrevented()) { return; }
					
					effects[conf.effect][1].call(self, function() {
						e.type = "onHide";
						$self.trigger(e);		
					});
				}
				 
				if (conf.delay && e) {
					tip.data("timer", setTimeout(hide, conf.delay));
					
				} else {
					hide();	
				}			
				
				return self;
			},
			
			isShown: function() {
				return tip.is(":visible, :animated");	
			},
				
			getConf: function() {
				return conf;	
			},
				
			getTip: function() {
				return tip;	
			},
			
			getTrigger: function() {
				return trigger;	
			},
			
			// callback functions			
			bind: function(name, fn) {
				$self.bind(name, fn);
				return self;	
			},
			
			onHide: function(fn) {
				return this.bind("onHide", fn);
			},

			onBeforeShow: function(fn) {
				return this.bind("onBeforeShow", fn);
			},
			
			onShow: function(fn) {
				return this.bind("onShow", fn);
			},
			
			onBeforeHide: function(fn) {
				return this.bind("onBeforeHide", fn);
			},

			unbind: function(name) {
				$self.unbind(name);
				return self;	
			}			

		});		

		// bind all callbacks from configuration
		$.each(conf, function(name, fn) {
			if ($.isFunction(fn)) { self.bind(name, fn); }
		}); 		
		
	}
		
	
	// jQuery plugin implementation
	$.prototype.tooltip = function(conf) {
		
		// return existing instance
		var api = this.eq(typeof conf == 'number' ? conf : 0).data("tooltip");
		if (api) { return api; }
		
		// setup options
		var globals = $.extend(true, {}, $.tools.tooltip.conf);		
		
		if ($.isFunction(conf)) {
			conf = {onBeforeShow: conf};
			
		} else if (typeof conf == 'string') {
			conf = {tip: conf};	
		}

		conf = $.extend(true, globals, conf);
		
		// can also be given as string
		if (typeof conf.position == 'string') {
			conf.position = conf.position.split(/,?\s/);	
		}
		
		// assign tip's only when apiement is being mouseovered		
		if (conf.lazy !== false && (conf.lazy === true || this.length > 20)) {	
				
			this.one("mouseover", function(e) {	
				api = new Tooltip($(this), conf);
				api.show(e);
				instances.push(api);
			}); 
			
		} else {
			
			// install tooltip for each entry in jQuery object
			this.each(function() {
				api = new Tooltip($(this), conf); 
				instances.push(api);
			});
		} 

		return conf.api ? api: this;		
		
	};
		
}) (jQuery);

		

;/**
 * jQuery TOOLS plugin :: tabs.slideshow 1.0.2
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/tabs.html#slideshow
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : September 2009
 * Date: ${date}
 * Revision: ${revision} 
 */
(function($) {
	
	var t = $.tools.tabs; 
	t.plugins = t.plugins || {}; 
	t.plugins.slideshow = { 
		version: '1.0.2',
		
		// CALLBACKS: onBeforePlay, onPlay, onBeforePause, onPause,  
		conf: {
			next: '.forward',
			prev: '.backward',
			disabledClass: 'disabled',
			autoplay: false,
			autopause: true,
			interval: 3000, 
			clickable: true,
			api: false
		}
	};


	// jQuery plugin implementation
	$.prototype.slideshow = function(conf) {
	
		var globals = $.extend({}, t.plugins.slideshow.conf),
			 len = this.length, 
			 ret;
			 
		conf = $.extend(globals, conf);	 
		
		this.each(function() {
			
			var tabs = $(this), api = tabs.tabs(), $api = $(api), ret = api; 
			
			// bind all callbacks from configuration
			$.each(conf, function(name, fn) {
				if ($.isFunction(fn)) { api.bind(name, fn); }
			});
		
			
			function find(query) {
				return len == 1 ? $(query) : tabs.parent().find(query);	
			}	
			
			var nextButton = find(conf.next).click(function() {
				api.next();		
			});
			
			var prevButton = find(conf.prev).click(function() {
				api.prev();		
			});
			
			// interval stuff
			var timer, hoverTimer, startTimer, stopped = false;
	

			// extend the Tabs API with slideshow methods			
			$.extend(api, {
					
				play: function() {
		
					// do not start additional timer if already exists
					if (timer) { return; }
					
					// onBeforePlay
					var e = $.Event("onBeforePlay");
					$api.trigger(e);
					
					if (e.isDefaultPrevented()) { return api; }				
					
					stopped = false;
					
					// construct new timer
					timer = setInterval(api.next, conf.interval);
	
					// onPlay
					$api.trigger("onPlay");				
					
					api.next();
				},
			
				pause: function() {
					
					if (!timer) { return api; }
					
					// onBeforePause
					var e = $.Event("onBeforePause");
					$api.trigger(e);					
					if (e.isDefaultPrevented()) { return api; }		
					
					timer = clearInterval(timer);
					startTimer = clearInterval(startTimer);
					
					// onPause
					$api.trigger("onPause");		
				},
				
				// when stopped - mouseover won't restart 
				stop: function() {					
					api.pause();
					stopped = true;	
				},
				
				onBeforePlay: function(fn) {
					return api.bind("onBeforePlay", fn);
				},
				
				onPlay: function(fn) {
					return api.bind("onPlay", fn);
				},

				onBeforePause: function(fn) {
					return api.bind("onBeforePause", fn);
				},
				
				onPause: function(fn) {
					return api.bind("onPause", fn);
				}
				
			});
	
			
		
			/* when mouse enters, slideshow stops */
			if (conf.autopause) {
				var els = api.getTabs().add(nextButton).add(prevButton).add(api.getPanes());
				
				els.hover(function() {					
					api.pause();					
					hoverTimer = clearInterval(hoverTimer);
					
				}, function() {
					if (!stopped) {						
						hoverTimer = setTimeout(api.play, conf.interval);						
					}
				});
			} 
			
			if (conf.autoplay) {
				startTimer = setTimeout(api.play, conf.interval);				
			} else {
				api.stop();	
			}
			
			if (conf.clickable) {
				api.getPanes().click(function()  {
					api.next();
				});
			} 
			
			// manage disabling of next/prev buttons
			if (!api.getConf().rotate) {
				
				var cls = conf.disabledClass;
				
				if (!api.getIndex()) {
					prevButton.addClass(cls);
				}
				api.onBeforeClick(function(e, i)  {
					if (!i) {
						prevButton.addClass(cls);
					} else {
						prevButton.removeClass(cls);	
					
						if (i == api.getTabs().length -1) {
							nextButton.addClass(cls);
						} else {
							nextButton.removeClass(cls);	
						}
					}
				});
			}
			
		});
		
		return conf.api ? ret : this;
	};
	
})(jQuery); 

;
(function($){$.toJSON=function(o)
{if(typeof(JSON)=='object'&&JSON.stringify)
return JSON.stringify(o);var type=typeof(o);if(o===null)
return"null";if(type=="undefined")
return undefined;if(type=="number"||type=="boolean")
return o+"";if(type=="string")
return $.quoteString(o);if(type=='object')
{if(typeof o.toJSON=="function")
return $.toJSON(o.toJSON());if(o.constructor===Date)
{var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+
hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
if(o.constructor===Array)
{var ret=[];for(var i=0;i<o.length;i++)
ret.push($.toJSON(o[i])||"null");return"["+ret.join(",")+"]";}
var pairs=[];for(var k in o){var name;var type=typeof k;if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;if(typeof o[k]=="function")
continue;var val=$.toJSON(o[k]);pairs.push(name+":"+val);}
return"{"+pairs.join(", ")+"}";}};$.evalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(src);return eval("("+src+")");};$.secureEvalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(src);var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");};$.quoteString=function(string)
{if(string.match(_escapeable))
{return'"'+string.replace(_escapeable,function(a)
{var c=_meta[a];if(typeof c==='string')return c;c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
return'"'+string+'"';};var _escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var _meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};})(jQuery);;/*
 * FancyBox - jQuery Plugin
 * simple and fancy lightbox alternative
 *
 * Copyright (c) 2009 Janis Skarnelis
 * Examples and documentation at: http://fancybox.net
 * 
 * Version: 1.2.5 (03/11/2009)
 * Requires: jQuery v1.3+
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

;(function($) {
	$.fn.fixPNG = function() {		
		return this.each(function () {
			var image = $(this).css('backgroundImage');

			if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
				image = RegExp.$1;
				$(this).css({
					'backgroundImage': 'none',
					'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
				}).each(function () {
					var position = $(this).css('position');
					if (position != 'absolute' && position != 'relative')
						$(this).css('position', 'relative');
				});
			}
		});
	};

	var elem, opts, busy = false, imagePreloader = new Image, loadingTimer, loadingFrame = 1, imageRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;
	var ieQuirks = null, IE6 = $.browser.msie && $.browser.version.substr(0,1) == 6 && !window.XMLHttpRequest, oldIE = IE6 || ($.browser.msie && $.browser.version.substr(0,1) == 7);

	$.fn.fancybox = function(o) {
		var settings		= $.extend({}, $.fn.fancybox.defaults, o);
		var matchedGroup	= this;

		function _initialize() {
			elem = this;
						
			opts = $.extend({}, settings);

			if(!opts.showTitle);
				$("#fancy_title").remove();
			
			if(opts.contentClass.length)
			{
				$("#fancy_content").addClass(opts.contentClass);	
			}

			_start();

			return false;
		};

		function _start() {
			if (busy) return;

			if ($.isFunction(opts.callbackOnStart)) {
				opts.callbackOnStart();
			}

			opts.itemArray		= [];
			opts.itemCurrent	= 0;

			if (settings.itemArray.length > 0) {
				opts.itemArray = settings.itemArray;

			} else {
				var item = {};

				if (!elem.rel || elem.rel == '') {
					var item = {href: elem.href, title: elem.title};

					if ($(elem).children("img:first").length) {
						item.orig = $(elem).children("img:first");
					} else {
						item.orig = $(elem);
					}

					if (item.title == '' || typeof item.title == 'undefined') {
						item.title = item.orig.attr('alt');
					}
					
					opts.itemArray.push( item );

				} else {
					var subGroup = $(matchedGroup).filter("a[rel=" + elem.rel + "]");
					var item = {};

					for (var i = 0; i < subGroup.length; i++) {
						item = {href: subGroup[i].href, title: subGroup[i].title};

						if ($(subGroup[i]).children("img:first").length) {
							item.orig = $(subGroup[i]).children("img:first");
						} else {
							item.orig = $(subGroup[i]);
						}

						if (item.title == '' || typeof item.title == 'undefined') {
							item.title = item.orig.attr('alt');
						}

						opts.itemArray.push( item );
					}
				}
			}

			while ( opts.itemArray[ opts.itemCurrent ].href != elem.href ) {
				opts.itemCurrent++;
			}

			if (opts.overlayShow) {
				if (IE6) {
					$('embed, object, select').css('visibility', 'hidden');
					$("#fancy_overlay").css('height', $(document).height());
				}
				
				$("#fancy_overlay").css({
					'background-color'	: opts.overlayColor,
					'opacity'			: opts.overlayOpacity
				}).show();			
			}
			
			$(window).bind("resize.fb scroll.fb", $.fn.fancybox.scrollBox);

			_change_item();
		};

		function _change_item() {
			$("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();

			var href = opts.itemArray[ opts.itemCurrent ].href;

			if (href.match("iframe") || elem.className.indexOf("iframe") >= 0) {
				$.fn.fancybox.showLoading();
				_set_content('<iframe id="fancy_frame" onload="jQuery.fn.fancybox.showIframe()" name="fancy_iframe' + Math.round(Math.random()*1000) + '" frameborder="0" hspace="0" src="' + href + '"></iframe>', opts.frameWidth, opts.frameHeight);

			} else if (href.match(/#/)) {
				var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#'));

				_set_content('<div id="fancy_div">' + $(target).html() + '</div>', opts.frameWidth, opts.frameHeight);

			} else if (href.match(imageRegExp)) {
				imagePreloader = new Image; imagePreloader.src = href;

				if (imagePreloader.complete) {
					_proceed_image();

				} else {
					$.fn.fancybox.showLoading();
					$(imagePreloader).unbind().bind('load', function() {
						$("#fancy_loading").hide();

						_proceed_image();
					});
				}
			} else {
				$.fn.fancybox.showLoading();
				$.get(href + "?ms="+new Date().getTime(), function(data) {
					$("#fancy_loading").hide();
					$("#fancy_outer").show();
					var $fancy_content = $("#fancy_content");
					$fancy_content.html(data);
					
					ajax_content_height = $("#overlay-wrapper").outerHeight();
					ajax_content_width = $("#overlay-wrapper").outerWidth();
					
					if($.browser.msie & $.browser.version.indexOf("8") > -1)
					{
						ajax_content_height += 3;
						ajax_content_width += 3;
					}
				
					$fancy_content.html("");
					$("#fancy_outer").hide();

					_set_content( '<div id="fancy_ajax">' + data + '</div>', ajax_content_width, ajax_content_height);
				});
			}
		};

		function _proceed_image() {
			var width	= imagePreloader.width;
			var height	= imagePreloader.height;

			var horizontal_space	= (opts.padding * 2) + 40;
			var vertical_space		= (opts.padding * 2) + 60;

			var w = $.fn.fancybox.getViewport();
			
			if (opts.imageScale && (width > (w[0] - horizontal_space) || height > (w[1] - vertical_space))) {
				var ratio = Math.min(Math.min(w[0] - horizontal_space, width) / width, Math.min(w[1] - vertical_space, height) / height);

				width	= Math.round(ratio * width);
				height	= Math.round(ratio * height);
			}

			_set_content('<img alt="" id="fancy_img" src="' + imagePreloader.src + '" />', width, height);
		};

		function _preload_neighbor_images() {
			if ((opts.itemArray.length -1) > opts.itemCurrent) {
				var href = opts.itemArray[opts.itemCurrent + 1].href;

				if (href.match(imageRegExp)) {
					objNext = new Image();
					objNext.src = href;
				}
			}

			if (opts.itemCurrent > 0) {
				var href = opts.itemArray[opts.itemCurrent -1].href;

				if (href.match(imageRegExp)) {
					objNext = new Image();
					objNext.src = href;
				}
			}
		};

		function _set_content(value, width, height) {
			busy = true;

			var pad = opts.padding;

			if (oldIE || ieQuirks) {
				$("#fancy_content")[0].style.removeExpression("height");
				$("#fancy_content")[0].style.removeExpression("width");
			}

			if (pad > 0) {
				width	+= pad * 2;
				height	+= pad * 2;

				$("#fancy_content").css({
					'top'		: pad + 'px',
					'right'		: pad + 'px',
					'bottom'	: pad + 'px',
					'left'		: pad + 'px',
					'width'		: 'auto',
					'height'	: 'auto'
				});

				if (oldIE || ieQuirks) {
					$("#fancy_content")[0].style.setExpression('height',	'(this.parentNode.clientHeight - '	+ pad * 2 + ')');
					$("#fancy_content")[0].style.setExpression('width',		'(this.parentNode.clientWidth - '	+ pad * 2 + ')');
				}
			} else {
				$("#fancy_content").css({
					'top'		: 0,
					'right'		: 0,
					'bottom'	: 0,
					'left'		: 0,
					'width'		: '100%',
					'height'	: '100%'
				});
			}

			if ($("#fancy_outer").is(":visible") && width == $("#fancy_outer").width() && height == $("#fancy_outer").height()) {
				$("#fancy_content").fadeOut('fast', function() {
					$("#fancy_content").empty().append(value).fadeIn("normal", function() {
						_finish();
					});
				});

				return;
			}

			var w = $.fn.fancybox.getViewport();

			var itemTop		= (height	+ 60) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height	- 60) * 0.5));
			var itemLeft	= (width	+ 40) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width	- 40) * 0.5));

			var itemOpts = {
				'left':		itemLeft,
				'top':		itemTop,
				'width':	width + 'px',
				'height':	height + 'px'
			};

			if ($("#fancy_outer").is(":visible")) {
				$("#fancy_content").fadeOut("normal", function() {
					$("#fancy_content").empty();
					$("#fancy_outer").animate(itemOpts, opts.zoomSpeedChange, opts.easingChange, function() {
						$("#fancy_content").append(value).fadeIn("normal", function() {
  						   _finish();
						});
					});
				});

			} else {

				if (opts.zoomSpeedIn > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) {
					//$("#fancy_content").empty().append(value);
					document.getElementById("fancy_content").innerHTML = value;
					
					
					var orig_item	= opts.itemArray[opts.itemCurrent].orig;
					if(opts.caller != null && (opts.caller).length) 
					{
						orig_item = opts.caller;	
					}
					
					var orig_pos	= $.fn.fancybox.getPosition(orig_item);

					$("#fancy_outer").css({
						'left':		(orig_pos.left	- 20 - opts.padding) + 'px',
						'top':		(orig_pos.top	- 20 - opts.padding) + 'px',
						'width':	$(orig_item).width() + (opts.padding * 2),
						'height':	$(orig_item).height() + (opts.padding * 2)
					});

					if (opts.zoomOpacity) {
						itemOpts.opacity = 'show';
					}

					$("#fancy_outer").animate(itemOpts, opts.zoomSpeedIn, opts.easingIn, function() {
						_finish();
					});

				} else {

					$("#fancy_content").hide().empty().append(value).show();
					$("#fancy_outer").css(itemOpts).fadeIn("normal", function() {
						_finish();
					});
				}
			}
		};

		function _set_navigation() {
			if (opts.itemCurrent != 0) {
				$("#fancy_left, #fancy_left_ico").unbind().bind("click", function(e) {
					e.stopPropagation();

					opts.itemCurrent--;
					_change_item();

					return false;
				});

				$("#fancy_left").show();
			}

			if (opts.itemCurrent != ( opts.itemArray.length -1)) {
				$("#fancy_right, #fancy_right_ico").unbind().bind("click", function(e) {
					e.stopPropagation();

					opts.itemCurrent++;
					_change_item();

					return false;
				});

				$("#fancy_right").show();
			}
		};

		function _finish() {
			if ($.browser.msie) {
				$("#fancy_content")[0].style.removeAttribute('filter');
				$("#fancy_outer")[0].style.removeAttribute('filter');
			}

			_set_navigation();

			_preload_neighbor_images();

			$(document).bind("keydown.fb", function(e) {
				if (e.keyCode == 27 && opts.enableEscapeButton) {
					$.fn.fancybox.close();

				} else if(e.keyCode == 37 && opts.itemCurrent != 0) {
					$(document).unbind("keydown.fb");
					opts.itemCurrent--;
					_change_item();
					

				} else if(e.keyCode == 39 && opts.itemCurrent != (opts.itemArray.length - 1)) {
					$(document).unbind("keydown.fb");
					opts.itemCurrent++;
					_change_item();
				}
			});

			if (opts.centerOnScroll) {
				$(window).bind("resize.fb scroll.fb", $.fn.fancybox.scrollBox);
			}

			if (opts.hideOnContentClick) {
				$("#fancy_content").click($.fn.fancybox.close);
			}

			if (opts.overlayShow && opts.hideOnOverlayClick) {
				$("#fancy_overlay").bind("click", $.fn.fancybox.close);
			}

			if (opts.showCloseButton) {
				$("#fancy_close").bind("click", $.fn.fancybox.close).show();
			}

			if (typeof opts.itemArray[ opts.itemCurrent ].title !== 'undefined' && opts.itemArray[ opts.itemCurrent ].title.length > 0) {
				var pos = $("#fancy_outer").position();

				$('#fancy_title div').text( opts.itemArray[ opts.itemCurrent ].title).html();

				$('#fancy_title').css({
					'top'	: pos.top + $("#fancy_outer").outerHeight() - 32,
					'left'	: pos.left + (($("#fancy_outer").outerWidth() * 0.5) - ($('#fancy_title').width() * 0.5))
				}).show();
			}

			if (opts.overlayShow && IE6) {
				$('embed, object, select', $('#fancy_content')).css('visibility', 'visible');
			}

			if ($.isFunction(opts.callbackOnShow)) {
				opts.callbackOnShow( opts.itemArray[ opts.itemCurrent ] );
			}

			if ($.browser.msie) {
				$("#fancy_outer")[0].style.removeAttribute('filter'); 
				$("#fancy_content")[0].style.removeAttribute('filter'); 
			}
			
			$("#fancy_content script").each( function() { eval($(this).html()); } );
			
			busy = false;
		};

		return this.unbind('click.fb').bind('click.fb', _initialize);
	};

	$.fn.fancybox.scrollBox = function() {
		if($(window).height() < $("#fancy_outer").outerHeight())
			return;
			
		var w = $.fn.fancybox.getViewport();
		
		if ($("#fancy_outer").is(':visible')) {
			var ow	= $("#fancy_outer").outerWidth();
			var oh	= $("#fancy_outer").outerHeight();

			var pos	= {
				'top'	: (oh > w[1] ? w[3] : w[3] + Math.round((w[1] - oh) * 0.5)),
				'left'	: (ow > w[0] ? w[2] : w[2] + Math.round((w[0] - ow) * 0.5))
			};

			$("#fancy_outer").css(pos);

			$('#fancy_title').css({
				'top'	: pos.top	+ oh - 32,
				'left'	: pos.left	+ ((ow * 0.5) - ($('#fancy_title').width() * 0.5))
			});
		}
		
		if (IE6 && $("#fancy_overlay").is(':visible')) {
			$("#fancy_overlay").css({
				'height' : $(document).height()
			});
		}
		
		if ($("#fancy_loading").is(':visible')) {
			$("#fancy_loading").css({'left': ((w[0] - 40) * 0.5 + w[2]), 'top': ((w[1] - 40) * 0.5 + w[3])});
		}
	};

	$.fn.fancybox.getNumeric = function(el, prop) {
		return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
	};

	$.fn.fancybox.getPosition = function(el) {
		var pos = el.offset();

		pos.top	+= $.fn.fancybox.getNumeric(el, 'paddingTop');
		pos.top	+= $.fn.fancybox.getNumeric(el, 'borderTopWidth');

		pos.left += $.fn.fancybox.getNumeric(el, 'paddingLeft');
		pos.left += $.fn.fancybox.getNumeric(el, 'borderLeftWidth');

		return pos;
	};

	$.fn.fancybox.showIframe = function() {
		$("#fancy_loading").hide();
		$("#fancy_frame").show();
	};

	$.fn.fancybox.getViewport = function() {
		return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ];
	};

	$.fn.fancybox.animateLoading = function() {
		if (!$("#fancy_loading").is(':visible')){
			clearInterval(loadingTimer);
			return;
		}

		$("#fancy_loading > div").css('top', (loadingFrame * -40) + 'px');

		loadingFrame = (loadingFrame + 1) % 12;
	};

	$.fn.fancybox.showLoading = function() {
		clearInterval(loadingTimer);

		var w = $.fn.fancybox.getViewport();

		$("#fancy_loading").css({'left': ((w[0] - 40) * 0.5 + w[2]), 'top': ((w[1] - 40) * 0.5 + w[3])}).show();
		$("#fancy_loading").bind('click', $.fn.fancybox.close);

		loadingTimer = setInterval($.fn.fancybox.animateLoading, 66);
	};

	$.fn.fancybox.close = function() {
		busy = true;

		$(imagePreloader).unbind();

		$(document).unbind("keydown.fb");
		$(window).unbind("resize.fb scroll.fb");

		$("#fancy_overlay, #fancy_content, #fancy_close").unbind();

		$("#fancy_close, #fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();

		__cleanup = function() {
			if ($("#fancy_overlay").is(':visible')) {
				$("#fancy_overlay").fadeOut("fast");
			}

			$("#fancy_content").empty();
			
			if (opts.centerOnScroll) {
				$(window).unbind("resize.fb scroll.fb");
			}

			if (IE6) {
				$('embed, object, select').css('visibility', 'visible');
			}

			if ($.isFunction(opts.callbackOnClose)) {
				opts.callbackOnClose();
			}

			busy = false;
		};

		if ($("#fancy_outer").is(":visible") !== false) {
			if (opts.zoomSpeedOut > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) {
				var orig_item	= opts.itemArray[opts.itemCurrent].orig;
				if(opts.caller != null && (opts.caller).length) 
				{
					orig_item = opts.caller;	
				}
				var orig_pos	= $.fn.fancybox.getPosition(orig_item);

				var itemOpts = {
					'left':		(orig_pos.left	- 20 - opts.padding) + 'px',
					'top': 		(orig_pos.top	- 20 - opts.padding) + 'px',
					'width':	$(orig_item).width() + (opts.padding * 2),
					'height':	$(orig_item).height() + (opts.padding * 2)
				};

				if (opts.zoomOpacity) {
					itemOpts.opacity = 'hide';
				}

				$("#fancy_outer").stop(false, true).animate(itemOpts, opts.zoomSpeedOut, opts.easingOut, __cleanup);

			} else {
				$("#fancy_outer").stop(false, true).fadeOut('fast', __cleanup);
			}

		} else {
			__cleanup();
		}

		return false;
	};

	$.fn.fancybox.build = function() {
		var html = '';

		html += '<div id="fancy_overlay"></div>';
		html += '<div id="fancy_loading"><div></div></div>';

		html += '<div id="fancy_outer">';
		html += '<div id="fancy_inner">';

		html += '<div id="fancy_close"></div>';

		html += '<div id="fancy_bg"><div class="fancy_bg" id="fancy_bg_n"></div><div class="fancy_bg" id="fancy_bg_ne"></div><div class="fancy_bg" id="fancy_bg_e"></div><div class="fancy_bg" id="fancy_bg_se"></div><div class="fancy_bg" id="fancy_bg_s"></div><div class="fancy_bg" id="fancy_bg_sw"></div><div class="fancy_bg" id="fancy_bg_w"></div><div class="fancy_bg" id="fancy_bg_nw"></div></div>';

		html += '<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';

		html += '<div id="fancy_content"></div>';

		html += '</div>';
		html += '</div>';
		
		html += '<div id="fancy_title"></div>';
		
		$(html).appendTo("body");

		$('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo('#fancy_title');

		if (IE6) {
			$(".fancy_bg").fixPNG();
		}

		if (IE6) {
			$("div#fancy_overlay").css("position", "absolute");
			$("#fancy_loading div, #fancy_close, .fancy_title, .fancy_ico").fixPNG();

			$("#fancy_inner").prepend('<iframe id="fancy_bigIframe" src="javascript:false;" scrolling="no" frameborder="0"></iframe>');

			// Get rid of the 'false' text introduced by the URL of the iframe
			var frameDoc = $('#fancy_bigIframe')[0].contentWindow.document;
			frameDoc.open();
			frameDoc.close();
			
		}
	};

	$.fn.fancybox.defaults = {
		padding				:	10,
		imageScale			:	true,
		zoomOpacity			:	true,
		zoomSpeedIn			:	0,
		zoomSpeedOut		:	0,
		zoomSpeedChange		:	300,
		easingIn			:	'swing',
		easingOut			:	'swing',
		easingChange		:	'swing',
		frameWidth			:	560,
		frameHeight			:	340,
		overlayShow			:	true,
		overlayOpacity		:	0.7,
		overlayColor		:	'#111',
		enableEscapeButton	:	true,
		showCloseButton		:	true,
		hideOnOverlayClick	:	true,
		hideOnContentClick	:	true,
		centerOnScroll		:	true,
		itemArray			:	[],
		callbackOnStart		:	null,
		callbackOnShow		:	null,
		callbackOnClose		:	null,
		showTitle			:	false,
		contentClass		:	"",
		caller				: 	null
	};

	$(document).ready(function() {
		ieQuirks = $.browser.msie && !$.boxModel;

		if ($("#fancy_outer").length < 1) {
			$.fn.fancybox.build();
		}
	});

})(jQuery);;/* pack : 1 */
;(function($){$.fn.carousel=function(params){var params=$.extend({direction:"horizontal",loop:false,dispItems:1,pagination:false,paginationPosition:"inside",nextBtn:"<span>Next</span>",prevBtn:"<span>Previous</span>",btnsPosition:"inside",nextBtnInsert:"appendTo",prevBtnInsert:"prependTo",autoSlide:false,autoSlideInterval:3000,delayAutoSlide:3000,combinedClasses:false,effect:"slide",slideEasing:"swing",animSpeed:"normal",equalWidths:"true",callback:function(){}},params);if(params.btnsPosition=="outside"){params.prevBtnInsert="insertBefore";params.nextBtnInsert="insertAfter";}
return this.each(function(){var env={$elts:{},params:params,launchOnLoad:[]};env.$elts.carousel=$(this).addClass("js");env.$elts.content=$(this).children().css({position:"absolute","top":0});env.$elts.wrap=env.$elts.content.wrap('<div class="carousel-wrap"></div>').parent().css({overflow:"hidden",position:"relative"});env.steps={first:0,count:env.$elts.content.find(">*").length};env.steps.last=env.steps.count-1;env.$elts.prevBtn=$(params.prevBtn)[params.prevBtnInsert](env.$elts.carousel).addClass("carousel-control previous carousel-previous").data("firstStep",-(env.params.dispItems));env.$elts.nextBtn=$(params.nextBtn)[params.nextBtnInsert](env.$elts.carousel).addClass("carousel-control next carousel-next").data("firstStep",env.params.dispItems);initButtonsEvents(env,function(e){slide(e,this,env);});if(env.params.pagination)initPagination(env);$(function(){var $firstItem=env.$elts.content.find(">*:eq(0)");env.itemWidth=$firstItem.outerWidth();if(params.direction=="vertical"){env.contentWidth=env.itemWidth;}else{if(params.equalWidths){env.contentWidth=env.itemWidth*env.steps.count;}else{env.contentWidth=(function(){var totalWidth=0;env.$elts.content.find(">*").each(function(){totalWidth+=$(this).outerWidth();});return totalWidth;})();}}
env.$elts.content.width(env.contentWidth);env.itemHeight=$firstItem.outerHeight();if(params.direction=="vertical"){env.$elts.content.css({height:env.itemHeight*env.steps.count+"px"});env.$elts.content.parent().css({height:env.itemHeight*env.params.dispItems+"px"});}else{env.$elts.content.parent().css({height:env.itemHeight});}
updateButtonsState(env);$.each(env.launchOnLoad,function(i,fn){fn();});if(env.params.autoSlide){window.setTimeout(function(){env.autoSlideInterval=window.setInterval(function(){env.$elts.nextBtn.click();},env.params.autoSlideInterval);},env.params.delayAutoSlide);}});});};function slide(e,btn,env){var $btn=$(btn);var newFirstStep=$btn.data("firstStep");env.params.callback(newFirstStep);switch(env.params.effect){case"no":if(env.params.direction=="vertical"){env.$elts.content.css("top",-(env.itemHeight*newFirstStep)+"px");}else{env.$elts.content.css("left",-(env.itemWidth*newFirstStep)+"px");}
break;case"fade":if(env.params.direction=="vertical"){env.$elts.content.hide().css("top",-(env.itemHeight*newFirstStep)+"px").fadeIn(env.params.animSpeed);}else{env.$elts.content.hide().css("left",-(env.itemWidth*newFirstStep)+"px").fadeIn(env.params.animSpeed);}
break;default:if(env.params.direction=="vertical"){env.$elts.content.stop().animate({top:-(env.itemHeight*newFirstStep)+"px"},env.params.animSpeed,env.params.slideEasing);}else{env.$elts.content.stop().animate({left:-(env.itemWidth*newFirstStep)+"px"},env.params.animSpeed,env.params.slideEasing);}}
env.steps.first=newFirstStep;updateButtonsState(env);if(!!e.clientX&&env.autoSlideInterval){window.clearInterval(env.autoSlideInterval);}};function updateButtonsState(env){env.$elts.prevBtn.data("firstStep",env.steps.first-env.params.dispItems);env.$elts.nextBtn.data("firstStep",env.steps.first+env.params.dispItems);if(env.$elts.prevBtn.data("firstStep")<0){if(env.params.loop&&env.steps.count>env.params.dispItems){env.$elts.prevBtn.data("firstStep",env.steps.count-env.params.dispItems);env.$elts.prevBtn.trigger("enable");}else{env.$elts.prevBtn.trigger("disable");}}else{env.$elts.prevBtn.trigger("enable");}
if(env.$elts.nextBtn.data("firstStep")>=env.steps.count){if(env.params.loop&&env.steps.count>env.params.dispItems){env.$elts.nextBtn.data("firstStep",0);env.$elts.nextBtn.trigger("enable");}else{env.$elts.nextBtn.trigger("disable");}}else{env.$elts.nextBtn.trigger("enable");}
if(env.params.pagination){env.$elts.paginationBtns.removeClass("active").filter(function(){return($(this).data("firstStep")==env.steps.first)}).addClass("active");}};function initButtonsEvents(env,slideEvent){env.$elts.nextBtn.add(env.$elts.prevBtn).bind("enable",function(){var $this=$(this).bind("click",slideEvent).removeClass("disabled");if(env.params.combinedClasses){$this.removeClass("next-disabled previous-disabled");}}).bind("disable",function(){var $this=$(this).unbind("click").addClass("disabled");if(env.params.combinedClasses){if($this.is(".next")){$this.addClass("next-disabled");}else if($this.is(".previous")){$this.addClass("previous-disabled");}}});env.$elts.nextBtn.add(env.$elts.prevBtn).hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});};function initPagination(env){env.$elts.pagination=$('<div class="center-wrap"><div class="carousel-pagination"><p></p></div></div>')[((env.params.paginationPosition=="outside")?"insertAfter":"appendTo")](env.$elts.carousel).find("p");env.$elts.paginationBtns=$([]);env.$elts.content.find("li").each(function(i){if(i%env.params.dispItems==0){env.$elts.paginationBtns=env.$elts.paginationBtns.add($('<a role="button"><span>'+(env.$elts.paginationBtns.length+1)+'</span></a>').data("firstStep",i));}});env.$elts.paginationBtns.appendTo(env.$elts.pagination);env.$elts.paginationBtns.slice(0,1).addClass("active");env.launchOnLoad.push(function(){env.$elts.paginationBtns.click(function(e){slide(e,this,env);});});};})(jQuery);
;/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
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}}}}}();;/**
 * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
 *
 * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
 *
 * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz�n and Mammon Media and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */


/* ******************* */
/* Constructor & Init  */
/* ******************* */
var SWFUpload;

if (SWFUpload == undefined) {
	SWFUpload = function (settings) {
		this.initSWFUpload(settings);
	};
}

SWFUpload.prototype.initSWFUpload = function (settings) {
	try {
		this.customSettings = {};	// A container where developers can place their own settings associated with this instance.
		this.settings = settings;
		this.eventQueue = [];
		this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
		this.movieElement = null;


		// Setup global control tracking
		SWFUpload.instances[this.movieName] = this;

		// Load the settings.  Load the Flash movie.
		this.initSettings();
		this.loadFlash();
		this.displayDebugInfo();
	} catch (ex) {
		delete SWFUpload.instances[this.movieName];
		throw ex;
	}
};

/* *************** */
/* Static Members  */
/* *************** */
SWFUpload.instances = {};
SWFUpload.movieCount = 0;
SWFUpload.version = "2.2.0 2009-03-25";
SWFUpload.QUEUE_ERROR = {
	QUEUE_LIMIT_EXCEEDED	  		: -100,
	FILE_EXCEEDS_SIZE_LIMIT  		: -110,
	ZERO_BYTE_FILE			  		: -120,
	INVALID_FILETYPE		  		: -130
};
SWFUpload.UPLOAD_ERROR = {
	HTTP_ERROR				  		: -200,
	MISSING_UPLOAD_URL	      		: -210,
	IO_ERROR				  		: -220,
	SECURITY_ERROR			  		: -230,
	UPLOAD_LIMIT_EXCEEDED	  		: -240,
	UPLOAD_FAILED			  		: -250,
	SPECIFIED_FILE_ID_NOT_FOUND		: -260,
	FILE_VALIDATION_FAILED	  		: -270,
	FILE_CANCELLED			  		: -280,
	UPLOAD_STOPPED					: -290
};
SWFUpload.FILE_STATUS = {
	QUEUED		 : -1,
	IN_PROGRESS	 : -2,
	ERROR		 : -3,
	COMPLETE	 : -4,
	CANCELLED	 : -5
};
SWFUpload.BUTTON_ACTION = {
	SELECT_FILE  : -100,
	SELECT_FILES : -110,
	START_UPLOAD : -120
};
SWFUpload.CURSOR = {
	ARROW : -1,
	HAND : -2
};
SWFUpload.WINDOW_MODE = {
	WINDOW : "window",
	TRANSPARENT : "transparent",
	OPAQUE : "opaque"
};

// Private: takes a URL, determines if it is relative and converts to an absolute URL
// using the current site. Only processes the URL if it can, otherwise returns the URL untouched
SWFUpload.completeURL = function(url) {
	if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//)) {
		return url;
	}
	
	var currentURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
	
	var indexSlash = window.location.pathname.lastIndexOf("/");
	if (indexSlash <= 0) {
		path = "/";
	} else {
		path = window.location.pathname.substr(0, indexSlash) + "/";
	}
	
	return /*currentURL +*/ path + url;
	
};


/* ******************** */
/* Instance Members  */
/* ******************** */

// Private: initSettings ensures that all the
// settings are set, getting a default value if one was not assigned.
SWFUpload.prototype.initSettings = function () {
	this.ensureDefault = function (settingName, defaultValue) {
		this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
	};
	
	// Upload backend settings
	this.ensureDefault("upload_url", "");
	this.ensureDefault("preserve_relative_urls", false);
	this.ensureDefault("file_post_name", "Filedata");
	this.ensureDefault("post_params", {});
	this.ensureDefault("use_query_string", false);
	this.ensureDefault("requeue_on_error", false);
	this.ensureDefault("http_success", []);
	this.ensureDefault("assume_success_timeout", 0);
	
	// File Settings
	this.ensureDefault("file_types", "*.*");
	this.ensureDefault("file_types_description", "All Files");
	this.ensureDefault("file_size_limit", 0);	// Default zero means "unlimited"
	this.ensureDefault("file_upload_limit", 0);
	this.ensureDefault("file_queue_limit", 0);

	// Flash Settings
	this.ensureDefault("flash_url", "swfupload.swf");
	this.ensureDefault("prevent_swf_caching", true);
	
	// Button Settings
	this.ensureDefault("button_image_url", "");
	this.ensureDefault("button_width", 1);
	this.ensureDefault("button_height", 1);
	this.ensureDefault("button_text", "");
	this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
	this.ensureDefault("button_text_top_padding", 0);
	this.ensureDefault("button_text_left_padding", 0);
	this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
	this.ensureDefault("button_disabled", false);
	this.ensureDefault("button_placeholder_id", "");
	this.ensureDefault("button_placeholder", null);
	this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
	this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
	
	// Debug Settings
	this.ensureDefault("debug", false);
	this.settings.debug_enabled = this.settings.debug;	// Here to maintain v2 API
	
	// Event Handlers
	this.settings.return_upload_start_handler = this.returnUploadStart;
	this.ensureDefault("swfupload_loaded_handler", null);
	this.ensureDefault("file_dialog_start_handler", null);
	this.ensureDefault("file_queued_handler", null);
	this.ensureDefault("file_queue_error_handler", null);
	this.ensureDefault("file_dialog_complete_handler", null);
	
	this.ensureDefault("upload_start_handler", null);
	this.ensureDefault("upload_progress_handler", null);
	this.ensureDefault("upload_error_handler", null);
	this.ensureDefault("upload_success_handler", null);
	this.ensureDefault("upload_complete_handler", null);
	
	this.ensureDefault("debug_handler", this.debugMessage);

	this.ensureDefault("custom_settings", {});

	// Other settings
	this.customSettings = this.settings.custom_settings;
	
	// Update the flash url if needed
	if (!!this.settings.prevent_swf_caching) {
		this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
	}
	
	if (!this.settings.preserve_relative_urls) {
		//this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url);	// Don't need to do this one since flash doesn't look at it
		this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
		this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
	}
	
	delete this.ensureDefault;
};

// Private: loadFlash replaces the button_placeholder element with the flash movie.
SWFUpload.prototype.loadFlash = function () {
	var targetElement, tempParent;

	// Make sure an element with the ID we are going to use doesn't already exist
	if (document.getElementById(this.movieName) !== null) {
		throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
	}

	// Get the element where we will be placing the flash movie
	targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;

	if (targetElement == undefined) {
		throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
	}

	// Append the container and load the flash
	tempParent = document.createElement("div");
	tempParent.innerHTML = this.getFlashHTML();	// Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
	targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);

	// Fix IE Flash/Form bug
	if (window[this.movieName] == undefined) {
		window[this.movieName] = this.getMovieElement();
	}
	
};

// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
SWFUpload.prototype.getFlashHTML = function () {
	// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
	return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
				'<param name="wmode" value="', this.settings.button_window_mode, '" />',
				'<param name="movie" value="', this.settings.flash_url, '" />',
				'<param name="quality" value="high" />',
				'<param name="menu" value="false" />',
				'<param name="allowScriptAccess" value="always" />',
				'<param name="flashvars" value="' + this.getFlashVars() + '" />',
				'</object>'].join("");
};

// Private: getFlashVars builds the parameter string that will be passed
// to flash in the flashvars param.
SWFUpload.prototype.getFlashVars = function () {
	// Build a string from the post param object
	var paramString = this.buildParamString();
	var httpSuccessString = this.settings.http_success.join(",");
	
	// Build the parameter string
	return ["movieName=", encodeURIComponent(this.movieName),
			"&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
			"&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
			"&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
			"&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
			"&amp;assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
			"&amp;params=", encodeURIComponent(paramString),
			"&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
			"&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
			"&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
			"&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
			"&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
			"&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
			"&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
			"&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
			"&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
			"&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
			"&amp;buttonText=", encodeURIComponent(this.settings.button_text),
			"&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
			"&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
			"&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
			"&amp;buttonAction=", encodeURIComponent(this.settings.button_action),
			"&amp;buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
			"&amp;buttonCursor=", encodeURIComponent(this.settings.button_cursor)
		].join("");
};

// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload
// The element is cached after the first lookup
SWFUpload.prototype.getMovieElement = function () {
	if (this.movieElement == undefined) {
		this.movieElement = document.getElementById(this.movieName);
	}

	if (this.movieElement === null) {
		throw "Could not find Flash element";
	}
	
	return this.movieElement;
};

// Private: buildParamString takes the name/value pairs in the post_params setting object
// and joins them up in to a string formatted "name=value&amp;name=value"
SWFUpload.prototype.buildParamString = function () {
	var postParams = this.settings.post_params; 
	var paramStringPairs = [];

	if (typeof(postParams) === "object") {
		for (var name in postParams) {
			if (postParams.hasOwnProperty(name)) {
				paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
			}
		}
	}

	return paramStringPairs.join("&amp;");
};

// Public: Used to remove a SWFUpload instance from the page. This method strives to remove
// all references to the SWF, and other objects so memory is properly freed.
// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
// Credits: Major improvements provided by steffen
SWFUpload.prototype.destroy = function () {
	try {
		// Make sure Flash is done before we try to remove it
		this.cancelUpload(null, false);
		

		// Remove the SWFUpload DOM nodes
		var movieElement = null;
		movieElement = this.getMovieElement();
		
		if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
			// Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround)
			for (var i in movieElement) {
				try {
					if (typeof(movieElement[i]) === "function") {
						movieElement[i] = null;
					}
				} catch (ex1) {}
			}

			// Remove the Movie Element from the page
			try {
				movieElement.parentNode.removeChild(movieElement);
			} catch (ex) {}
		}
		
		// Remove IE form fix reference
		window[this.movieName] = null;

		// Destroy other references
		SWFUpload.instances[this.movieName] = null;
		delete SWFUpload.instances[this.movieName];

		this.movieElement = null;
		this.settings = null;
		this.customSettings = null;
		this.eventQueue = null;
		this.movieName = null;
		
		
		return true;
	} catch (ex2) {
		return false;
	}
};


// Public: displayDebugInfo prints out settings and configuration
// information about this SWFUpload instance.
// This function (and any references to it) can be deleted when placing
// SWFUpload in production.
SWFUpload.prototype.displayDebugInfo = function () {
	this.debug(
		[
			"---SWFUpload Instance Info---\n",
			"Version: ", SWFUpload.version, "\n",
			"Movie Name: ", this.movieName, "\n",
			"Settings:\n",
			"\t", "upload_url:               ", this.settings.upload_url, "\n",
			"\t", "flash_url:                ", this.settings.flash_url, "\n",
			"\t", "use_query_string:         ", this.settings.use_query_string.toString(), "\n",
			"\t", "requeue_on_error:         ", this.settings.requeue_on_error.toString(), "\n",
			"\t", "http_success:             ", this.settings.http_success.join(", "), "\n",
			"\t", "assume_success_timeout:   ", this.settings.assume_success_timeout, "\n",
			"\t", "file_post_name:           ", this.settings.file_post_name, "\n",
			"\t", "post_params:              ", this.settings.post_params.toString(), "\n",
			"\t", "file_types:               ", this.settings.file_types, "\n",
			"\t", "file_types_description:   ", this.settings.file_types_description, "\n",
			"\t", "file_size_limit:          ", this.settings.file_size_limit, "\n",
			"\t", "file_upload_limit:        ", this.settings.file_upload_limit, "\n",
			"\t", "file_queue_limit:         ", this.settings.file_queue_limit, "\n",
			"\t", "debug:                    ", this.settings.debug.toString(), "\n",

			"\t", "prevent_swf_caching:      ", this.settings.prevent_swf_caching.toString(), "\n",

			"\t", "button_placeholder_id:    ", this.settings.button_placeholder_id.toString(), "\n",
			"\t", "button_placeholder:       ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
			"\t", "button_image_url:         ", this.settings.button_image_url.toString(), "\n",
			"\t", "button_width:             ", this.settings.button_width.toString(), "\n",
			"\t", "button_height:            ", this.settings.button_height.toString(), "\n",
			"\t", "button_text:              ", this.settings.button_text.toString(), "\n",
			"\t", "button_text_style:        ", this.settings.button_text_style.toString(), "\n",
			"\t", "button_text_top_padding:  ", this.settings.button_text_top_padding.toString(), "\n",
			"\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
			"\t", "button_action:            ", this.settings.button_action.toString(), "\n",
			"\t", "button_disabled:          ", this.settings.button_disabled.toString(), "\n",

			"\t", "custom_settings:          ", this.settings.custom_settings.toString(), "\n",
			"Event Handlers:\n",
			"\t", "swfupload_loaded_handler assigned:  ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
			"\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
			"\t", "file_queued_handler assigned:       ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
			"\t", "file_queue_error_handler assigned:  ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
			"\t", "upload_start_handler assigned:      ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
			"\t", "upload_progress_handler assigned:   ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
			"\t", "upload_error_handler assigned:      ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
			"\t", "upload_success_handler assigned:    ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
			"\t", "upload_complete_handler assigned:   ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
			"\t", "debug_handler assigned:             ", (typeof this.settings.debug_handler === "function").toString(), "\n"
		].join("")
	);
};

/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
	the maintain v2 API compatibility
*/
// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
SWFUpload.prototype.addSetting = function (name, value, default_value) {
    if (value == undefined) {
        return (this.settings[name] = default_value);
    } else {
        return (this.settings[name] = value);
	}
};

// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
SWFUpload.prototype.getSetting = function (name) {
    if (this.settings[name] != undefined) {
        return this.settings[name];
	}

    return "";
};



// Private: callFlash handles function calls made to the Flash element.
// Calls are made with a setTimeout for some functions to work around
// bugs in the ExternalInterface library.
SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
	argumentArray = argumentArray || [];
	
	var movieElement = this.getMovieElement();
	var returnValue, returnString;

	// Flash's method if calling ExternalInterface methods (code adapted from MooTools).
	try {
		returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
		returnValue = eval(returnString);
	} catch (ex) {
		throw "Call to " + functionName + " failed";
	}
	
	// Unescape file post param values
	if (returnValue != undefined && typeof returnValue.post === "object") {
		returnValue = this.unescapeFilePostParams(returnValue);
	}

	return returnValue;
};

/* *****************************
	-- Flash control methods --
	Your UI should use these
	to operate SWFUpload
   ***************************** */

// WARNING: this function does not work in Flash Player 10
// Public: selectFile causes a File Selection Dialog window to appear.  This
// dialog only allows 1 file to be selected.
SWFUpload.prototype.selectFile = function () {
	this.callFlash("SelectFile");
};

// WARNING: this function does not work in Flash Player 10
// Public: selectFiles causes a File Selection Dialog window to appear/ This
// dialog allows the user to select any number of files
// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
// If the selection name length is too long the dialog will fail in an unpredictable manner.  There is no work-around
// for this bug.
SWFUpload.prototype.selectFiles = function () {
	this.callFlash("SelectFiles");
};


// Public: startUpload starts uploading the first file in the queue unless
// the optional parameter 'fileID' specifies the ID 
SWFUpload.prototype.startUpload = function (fileID) {
	this.callFlash("StartUpload", [fileID]);
};

// Public: cancelUpload cancels any queued file.  The fileID parameter may be the file ID or index.
// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
	if (triggerErrorEvent !== false) {
		triggerErrorEvent = true;
	}
	this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
};

// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
// If nothing is currently uploading then nothing happens.
SWFUpload.prototype.stopUpload = function () {
	this.callFlash("StopUpload");
};

/* ************************
 * Settings methods
 *   These methods change the SWFUpload settings.
 *   SWFUpload settings should not be changed directly on the settings object
 *   since many of the settings need to be passed to Flash in order to take
 *   effect.
 * *********************** */

// Public: getStats gets the file statistics object.
SWFUpload.prototype.getStats = function () {
	return this.callFlash("GetStats");
};

// Public: setStats changes the SWFUpload statistics.  You shouldn't need to 
// change the statistics but you can.  Changing the statistics does not
// affect SWFUpload accept for the successful_uploads count which is used
// by the upload_limit setting to determine how many files the user may upload.
SWFUpload.prototype.setStats = function (statsObject) {
	this.callFlash("SetStats", [statsObject]);
};

// Public: getFile retrieves a File object by ID or Index.  If the file is
// not found then 'null' is returned.
SWFUpload.prototype.getFile = function (fileID) {
	if (typeof(fileID) === "number") {
		return this.callFlash("GetFileByIndex", [fileID]);
	} else {
		return this.callFlash("GetFile", [fileID]);
	}
};

// Public: addFileParam sets a name/value pair that will be posted with the
// file specified by the Files ID.  If the name already exists then the
// exiting value will be overwritten.
SWFUpload.prototype.addFileParam = function (fileID, name, value) {
	return this.callFlash("AddFileParam", [fileID, name, value]);
};

// Public: removeFileParam removes a previously set (by addFileParam) name/value
// pair from the specified file.
SWFUpload.prototype.removeFileParam = function (fileID, name) {
	this.callFlash("RemoveFileParam", [fileID, name]);
};

// Public: setUploadUrl changes the upload_url setting.
SWFUpload.prototype.setUploadURL = function (url) {
	this.settings.upload_url = url.toString();
	this.callFlash("SetUploadURL", [url]);
};

// Public: setPostParams changes the post_params setting
SWFUpload.prototype.setPostParams = function (paramsObject) {
	this.settings.post_params = paramsObject;
	this.callFlash("SetPostParams", [paramsObject]);
};

// Public: addPostParam adds post name/value pair.  Each name can have only one value.
SWFUpload.prototype.addPostParam = function (name, value) {
	this.settings.post_params[name] = value;
	this.callFlash("SetPostParams", [this.settings.post_params]);
};

// Public: removePostParam deletes post name/value pair.
SWFUpload.prototype.removePostParam = function (name) {
	delete this.settings.post_params[name];
	this.callFlash("SetPostParams", [this.settings.post_params]);
};

// Public: setFileTypes changes the file_types setting and the file_types_description setting
SWFUpload.prototype.setFileTypes = function (types, description) {
	this.settings.file_types = types;
	this.settings.file_types_description = description;
	this.callFlash("SetFileTypes", [types, description]);
};

// Public: setFileSizeLimit changes the file_size_limit setting
SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
	this.settings.file_size_limit = fileSizeLimit;
	this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
};

// Public: setFileUploadLimit changes the file_upload_limit setting
SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
	this.settings.file_upload_limit = fileUploadLimit;
	this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
};

// Public: setFileQueueLimit changes the file_queue_limit setting
SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
	this.settings.file_queue_limit = fileQueueLimit;
	this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
};

// Public: setFilePostName changes the file_post_name setting
SWFUpload.prototype.setFilePostName = function (filePostName) {
	this.settings.file_post_name = filePostName;
	this.callFlash("SetFilePostName", [filePostName]);
};

// Public: setUseQueryString changes the use_query_string setting
SWFUpload.prototype.setUseQueryString = function (useQueryString) {
	this.settings.use_query_string = useQueryString;
	this.callFlash("SetUseQueryString", [useQueryString]);
};

// Public: setRequeueOnError changes the requeue_on_error setting
SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
	this.settings.requeue_on_error = requeueOnError;
	this.callFlash("SetRequeueOnError", [requeueOnError]);
};

// Public: setHTTPSuccess changes the http_success setting
SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
	if (typeof http_status_codes === "string") {
		http_status_codes = http_status_codes.replace(" ", "").split(",");
	}
	
	this.settings.http_success = http_status_codes;
	this.callFlash("SetHTTPSuccess", [http_status_codes]);
};

// Public: setHTTPSuccess changes the http_success setting
SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) {
	this.settings.assume_success_timeout = timeout_seconds;
	this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]);
};

// Public: setDebugEnabled changes the debug_enabled setting
SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
	this.settings.debug_enabled = debugEnabled;
	this.callFlash("SetDebugEnabled", [debugEnabled]);
};

// Public: setButtonImageURL loads a button image sprite
SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
	if (buttonImageURL == undefined) {
		buttonImageURL = "";
	}
	
	this.settings.button_image_url = buttonImageURL;
	this.callFlash("SetButtonImageURL", [buttonImageURL]);
};

// Public: setButtonDimensions resizes the Flash Movie and button
SWFUpload.prototype.setButtonDimensions = function (width, height) {
	this.settings.button_width = width;
	this.settings.button_height = height;
	
	var movie = this.getMovieElement();
	if (movie != undefined) {
		movie.style.width = width + "px";
		movie.style.height = height + "px";
	}
	
	this.callFlash("SetButtonDimensions", [width, height]);
};
// Public: setButtonText Changes the text overlaid on the button
SWFUpload.prototype.setButtonText = function (html) {
	this.settings.button_text = html;
	this.callFlash("SetButtonText", [html]);
};
// Public: setButtonTextPadding changes the top and left padding of the text overlay
SWFUpload.prototype.setButtonTextPadding = function (left, top) {
	this.settings.button_text_top_padding = top;
	this.settings.button_text_left_padding = left;
	this.callFlash("SetButtonTextPadding", [left, top]);
};

// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
SWFUpload.prototype.setButtonTextStyle = function (css) {
	this.settings.button_text_style = css;
	this.callFlash("SetButtonTextStyle", [css]);
};
// Public: setButtonDisabled disables/enables the button
SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
	this.settings.button_disabled = isDisabled;
	this.callFlash("SetButtonDisabled", [isDisabled]);
};
// Public: setButtonAction sets the action that occurs when the button is clicked
SWFUpload.prototype.setButtonAction = function (buttonAction) {
	this.settings.button_action = buttonAction;
	this.callFlash("SetButtonAction", [buttonAction]);
};

// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
SWFUpload.prototype.setButtonCursor = function (cursor) {
	this.settings.button_cursor = cursor;
	this.callFlash("SetButtonCursor", [cursor]);
};

/* *******************************
	Flash Event Interfaces
	These functions are used by Flash to trigger the various
	events.
	
	All these functions a Private.
	
	Because the ExternalInterface library is buggy the event calls
	are added to a queue and the queue then executed by a setTimeout.
	This ensures that events are executed in a determinate order and that
	the ExternalInterface bugs are avoided.
******************************* */

SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
	// Warning: Don't call this.debug inside here or you'll create an infinite loop
	
	if (argumentArray == undefined) {
		argumentArray = [];
	} else if (!(argumentArray instanceof Array)) {
		argumentArray = [argumentArray];
	}
	
	var self = this;
	if (typeof this.settings[handlerName] === "function") {
		// Queue the event
		this.eventQueue.push(function () {
			this.settings[handlerName].apply(this, argumentArray);
		});
		
		// Execute the next queued event
		setTimeout(function () {
			self.executeNextEvent();
		}, 0);
		
	} else if (this.settings[handlerName] !== null) {
		throw "Event handler " + handlerName + " is unknown or is not a function";
	}
};

// Private: Causes the next event in the queue to be executed.  Since events are queued using a setTimeout
// we must queue them in order to garentee that they are executed in order.
SWFUpload.prototype.executeNextEvent = function () {
	// Warning: Don't call this.debug inside here or you'll create an infinite loop

	var  f = this.eventQueue ? this.eventQueue.shift() : null;
	if (typeof(f) === "function") {
		f.apply(this);
	}
};

// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
// properties that contain characters that are not valid for JavaScript identifiers. To work around this
// the Flash Component escapes the parameter names and we must unescape again before passing them along.
SWFUpload.prototype.unescapeFilePostParams = function (file) {
	var reg = /[$]([0-9a-f]{4})/i;
	var unescapedPost = {};
	var uk;

	if (file != undefined) {
		for (var k in file.post) {
			if (file.post.hasOwnProperty(k)) {
				uk = k;
				var match;
				while ((match = reg.exec(uk)) !== null) {
					uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
				}
				unescapedPost[uk] = file.post[k];
			}
		}

		file.post = unescapedPost;
	}

	return file;
};

// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
SWFUpload.prototype.testExternalInterface = function () {
	try {
		return this.callFlash("TestExternalInterface");
	} catch (ex) {
		return false;
	}
};

// Private: This event is called by Flash when it has finished loading. Don't modify this.
// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
SWFUpload.prototype.flashReady = function () {
	// Check that the movie element is loaded correctly with its ExternalInterface methods defined
	var movieElement = this.getMovieElement();

	if (!movieElement) {
		this.debug("Flash called back ready but the flash movie can't be found.");
		return;
	}

	this.cleanUp(movieElement);
	
	this.queueEvent("swfupload_loaded_handler");
};

// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
// This function is called by Flash each time the ExternalInterface functions are created.
SWFUpload.prototype.cleanUp = function (movieElement) {
	// Pro-actively unhook all the Flash functions
	try {
		if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
			this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
			for (var key in movieElement) {
				try {
					if (typeof(movieElement[key]) === "function") {
						movieElement[key] = null;
					}
				} catch (ex) {
				}
			}
		}
	} catch (ex1) {
	
	}

	// Fix Flashes own cleanup code so if the SWFMovie was removed from the page
	// it doesn't display errors.
	window["__flash__removeCallback"] = function (instance, name) {
		try {
			if (instance) {
				instance[name] = null;
			}
		} catch (flashEx) {
		
		}
	};

};


/* This is a chance to do something before the browse window opens */
SWFUpload.prototype.fileDialogStart = function () {
	this.queueEvent("file_dialog_start_handler");
};


/* Called when a file is successfully added to the queue. */
SWFUpload.prototype.fileQueued = function (file) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("file_queued_handler", file);
};


/* Handle errors that occur when an attempt to queue a file fails. */
SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
};

/* Called after the file dialog has closed and the selected files have been queued.
	You could call startUpload here if you want the queued files to begin uploading immediately. */
SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
	this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
};

SWFUpload.prototype.uploadStart = function (file) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("return_upload_start_handler", file);
};

SWFUpload.prototype.returnUploadStart = function (file) {
	var returnValue;
	if (typeof this.settings.upload_start_handler === "function") {
		file = this.unescapeFilePostParams(file);
		returnValue = this.settings.upload_start_handler.call(this, file);
	} else if (this.settings.upload_start_handler != undefined) {
		throw "upload_start_handler must be a function";
	}

	// Convert undefined to true so if nothing is returned from the upload_start_handler it is
	// interpretted as 'true'.
	if (returnValue === undefined) {
		returnValue = true;
	}
	
	returnValue = !!returnValue;
	
	this.callFlash("ReturnUploadStart", [returnValue]);
};



SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
};

SWFUpload.prototype.uploadError = function (file, errorCode, message) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_error_handler", [file, errorCode, message]);
};

SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
};

SWFUpload.prototype.uploadComplete = function (file) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_complete_handler", file);
};

/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
   internal debug console.  You can override this event and have messages written where you want. */
SWFUpload.prototype.debug = function (message) {
	this.queueEvent("debug_handler", message);
};


/* **********************************
	Debug Console
	The debug console is a self contained, in page location
	for debug message to be sent.  The Debug Console adds
	itself to the body if necessary.

	The console is automatically scrolled as messages appear.
	
	If you are using your own debug handler or when you deploy to production and
	have debug disabled you can remove these functions to reduce the file size
	and complexity.
********************************** */
   
// Private: debugMessage is the default debug_handler.  If you want to print debug messages
// call the debug() function.  When overriding the function your own function should
// check to see if the debug setting is true before outputting debug information.
SWFUpload.prototype.debugMessage = function (message) {
	if (this.settings.debug) {
		var exceptionMessage, exceptionValues = [];

		// Check for an exception object and print it nicely
		if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
			for (var key in message) {
				if (message.hasOwnProperty(key)) {
					exceptionValues.push(key + ": " + message[key]);
				}
			}
			exceptionMessage = exceptionValues.join("\n") || "";
			exceptionValues = exceptionMessage.split("\n");
			exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
			SWFUpload.Console.writeLine(exceptionMessage);
		} else {
			SWFUpload.Console.writeLine(message);
		}
	}
};

SWFUpload.Console = {};
SWFUpload.Console.writeLine = function (message) {
	var console, documentForm;

	try {
		console = document.getElementById("SWFUpload_Console");

		if (!console) {
			documentForm = document.createElement("form");
			document.getElementsByTagName("body")[0].appendChild(documentForm);

			console = document.createElement("textarea");
			console.id = "SWFUpload_Console";
			console.style.fontFamily = "monospace";
			console.setAttribute("wrap", "off");
			console.wrap = "off";
			console.style.overflow = "auto";
			console.style.width = "700px";
			console.style.height = "350px";
			console.style.margin = "5px";
			documentForm.appendChild(console);
		}

		console.value += message + "\n";

		console.scrollTop = console.scrollHeight - console.clientHeight;
	} catch (ex) {
		alert("Exception: " + ex.name + " Message: " + ex.message);
	}
};
;var fileDialogStart = function() {
	if (this.getFile(0))
		this.cancelUpload();
}

var fileQueued = function (file) {
	var filename = document.getElementById(this.getSetting("button_placeholder_id").replace("button", "") + "filename");
	if (filename) 
		filename.innerHTML = file.name;
}

function uploadProgress(file, bytesLoaded, bytesTotal) {

	try {

		var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
		var width = Math.round(-119 + percent * 1.2);
		var percentage = document.getElementById(this.getSetting("button_placeholder_id").replace("button", "") + "percentage");
		if (percentage)
			percentage.style.backgroundPosition = width + "px 0";
		
	} catch (e) {
	}
}

function uploadSuccess(file, serverData) {
	try {	

		var filename = document.getElementById(this.getSetting("button_placeholder_id").replace("button", "") + "filename");
		if (filename) 
			filename.innerHTML = file.name;
		var hidden = document.getElementById(this.getSetting("button_placeholder_id").replace("_button", ""));
		if (hidden)
			hidden.value = serverData;

		if(swfus && swfus.length) {
			swfus[currentswfu].done = true;
			uploadAllFilesAndCallFunction(swfufunction);
		}
		
					
	} catch (e) {
	}
}

function fileQueueError(file, errorCode, message)  {
	try {
		// Handle this error separately because we don't want to create a FileProgress element for it.
		switch (errorCode) {
		case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
			alert("Die Datei ist zu groß. (Maximum " + this.getSetting("file_size_limit") + ")");
			return;
		case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
			alert("Die Datei ist leer.");
			this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
			return;
		case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
			alert("Nur Bilder (" + this.getSetting("file_types") + ") sind erlaubt.");
			this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
			return;
		default:
			alert("Ein Fehler ist aufgetretten. Bitte versuchen Sie es später.");
			this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
			return;
		}
	} catch (e) {
	}
}

function uploadError(file, errorCode, message) {
	try {
		
		if (errorCode === SWFUpload.UPLOAD_ERROR.FILE_CANCELLED) {
			// Don't show cancelled error boxes
			return;
		}
		// Handle this error separately because we don't want to create a FileProgress element for it.
		switch (errorCode) {
		case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
			alert("There was a configuration error.  You will not be able to upload an image at this time.");
			return;
		case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
			alert("You may only upload 1 file.");
			return;
		case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
		case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
			break;
		default:
			alert("An error occurred in the upload. Try again later." + message + this.upload_url);
			return;
		}
	} catch (ex) {
	}
}

var uploadAllFilesAndCallFunction = function ( callfunction ) {
	swfufunction = callfunction;
	if(swfus && swfus.length) {
		for( var key in swfus ) {
			try {
				if (!swfus[key].done && swfus[key].getFile(0) ) {
					currentswfu = key;
					swfus[key].startUpload();
					return false;
				}
			} catch (ex) {
			}
		}
	}
	swfufunction();
}

var swfus = new Array();
var swfufunction = null;
var currentswfu = 0;
;/**
 * SWFAddress 2.4: Deep linking for Flash and Ajax <http://www.asual.com/swfaddress/>
 *
 * SWFAddress is (c) 2006-2009 Rostislav Hristov and contributors
 * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 *
 */
if(typeof asual=="undefined"){var asual={}}if(typeof asual.util=="undefined"){asual.util={}}asual.util.Browser=new function(){var b=navigator.userAgent.toLowerCase(),a=/webkit/.test(b),e=/opera/.test(b),c=/msie/.test(b)&&!/opera/.test(b),d=/mozilla/.test(b)&&!/(compatible|webkit)/.test(b),f=parseFloat(c?b.substr(b.indexOf("msie")+4):(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]);this.toString=function(){return"[class Browser]"};this.getVersion=function(){return f};this.isMSIE=function(){return c};this.isSafari=function(){return a};this.isOpera=function(){return e};this.isMozilla=function(){return d}};asual.util.Events=new function(){var c="DOMContentLoaded",j="onstop",k=window,h=document,b=[],a=asual.util,e=a.Browser,d=e.isMSIE(),g=e.isSafari();this.toString=function(){return"[class Events]"};this.addListener=function(n,l,m){b.push({o:n,t:l,l:m});if(!(l==c&&(d||g))){if(n.addEventListener){n.addEventListener(l,m,false)}else{if(n.attachEvent){n.attachEvent("on"+l,m)}}}};this.removeListener=function(p,m,n){for(var l=0,o;o=b[l];l++){if(o.o==p&&o.t==m&&o.l==n){b.splice(l,1);break}}if(!(m==c&&(d||g))){if(p.removeEventListener){p.removeEventListener(m,n,false)}else{if(p.detachEvent){p.detachEvent("on"+m,n)}}}};var i=function(){for(var m=0,l;l=b[m];m++){if(l.t!=c){a.Events.removeListener(l.o,l.t,l.l)}}};var f=function(){if(h.readyState=="interactive"){function l(){h.detachEvent(j,l);i()}h.attachEvent(j,l);k.setTimeout(function(){h.detachEvent(j,l)},0)}};if(d||g){(function(){try{if((d&&h.body)||!/loaded|complete/.test(h.readyState)){h.documentElement.doScroll("left")}}catch(m){return setTimeout(arguments.callee,0)}for(var l=0,m;m=b[l];l++){if(m.t==c){m.l.call(null)}}})()}if(d){k.attachEvent("onbeforeunload",f)}this.addListener(k,"unload",i)};asual.util.Functions=new function(){this.toString=function(){return"[class Functions]"};this.bind=function(f,b,e){for(var c=2,d,a=[];d=arguments[c];c++){a.push(d)}return function(){return f.apply(b,a)}}};var SWFAddressEvent=function(d){this.toString=function(){return"[object SWFAddressEvent]"};this.type=d;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.pathNames=SWFAddress.getPathNames();this.parameters={};var c=SWFAddress.getParameterNames();for(var b=0,a=c.length;b<a;b++){this.parameters[c[b]]=SWFAddress.getParameter(c[b])}this.parameterNames=c};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddressEvent.INTERNAL_CHANGE="internalChange";SWFAddressEvent.EXTERNAL_CHANGE="externalChange";var SWFAddress=new function(){var _getHash=function(){var index=_l.href.indexOf("#");return index!=-1?_ec(_dc(_l.href.substr(index+1))):""};var _getWindow=function(){try{top.document;return top}catch(e){return window}};var _strictCheck=function(value,force){if(_opts.strict){value=force?(value.substr(0,1)!="/"?"/"+value:value):(value==""?"/":value)}return value};var _ieLocal=function(value,direction){return(_msie&&_l.protocol=="file:")?(direction?_value.replace(/\?/,"%3F"):_value.replace(/%253F/,"?")):value};var _searchScript=function(el){if(el.childNodes){for(var i=0,l=el.childNodes.length,s;i<l;i++){if(el.childNodes[i].src){_url=String(el.childNodes[i].src)}if(s=_searchScript(el.childNodes[i])){return s}}}};var _titleCheck=function(){if(_d.title!=_title&&_d.title.indexOf("#")!=-1){_d.title=_title}};var _listen=function(){if(!_silent){var hash=_getHash();var diff=!(_value==hash);if(_safari&&_version<523){if(_length!=_h.length){_length=_h.length;if(typeof _stack[_length-1]!=UNDEFINED){_value=_stack[_length-1]}_update.call(this,false)}}else{if(_msie&&diff){if(_version<7){_l.reload()}else{this.setValue(hash)}}else{if(diff){_value=hash;_update.call(this,false)}}}if(_msie){_titleCheck.call(this)}}};var _bodyClick=function(e){if(_popup.length>0){var popup=window.open(_popup[0],_popup[1],eval(_popup[2]));if(typeof _popup[3]!=UNDEFINED){eval(_popup[3])}}_popup=[]};var _swfChange=function(){for(var i=0,id,obj,value=SWFAddress.getValue(),setter="setSWFAddressValue";id=_ids[i];i++){obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=UNDEFINED){obj.parentNode.so.call(setter,value)}else{if(!(obj&&typeof obj[setter]!=UNDEFINED)){var objects=obj.getElementsByTagName("object");var embeds=obj.getElementsByTagName("embed");obj=((objects[0]&&typeof objects[0][setter]!=UNDEFINED)?objects[0]:((embeds[0]&&typeof embeds[0][setter]!=UNDEFINED)?embeds[0]:null))}if(obj){obj[setter](value)}}}else{if(obj=document[id]){if(typeof obj[setter]!=UNDEFINED){obj[setter](value)}}}}};var _jsDispatch=function(type){this.dispatchEvent(new SWFAddressEvent(type));type=type.substr(0,1).toUpperCase()+type.substr(1);if(typeof this["on"+type]==FUNCTION){this["on"+type]()}};var _jsInit=function(){if(_util.Browser.isSafari()){_d.body.addEventListener("click",_bodyClick)}_jsDispatch.call(this,"init")};var _jsChange=function(){_swfChange();_jsDispatch.call(this,"change")};var _update=function(internal){_jsChange.call(this);if(internal){_jsDispatch.call(this,"internalChange")}else{_jsDispatch.call(this,"externalChange")}_st(_functions.bind(_track,this),10)};var _track=function(){;var value=(_l.pathname+(this.getValue().length > 1 ? '#' + this.getValue() : '')).replace(/\/\//,"/").replace(/^\/$/,"");var fn=_t[_opts.tracker];if(typeof fn==FUNCTION){fn(value)}else{if(typeof _t.pageTracker!=UNDEFINED&&typeof _t.pageTracker._trackPageview==FUNCTION){_t.pageTracker._trackPageview(value)}else{if(typeof _t.urchinTracker==FUNCTION){_t.urchinTracker(value)}}}};var _htmlWrite=function(){var doc=_frame.contentWindow.document;doc.open();doc.write("<html><head><title>"+_d.title+"</title><script>var "+ID+' = "'+_getHash()+'";<\/script></head></html>');doc.close()};var _htmlLoad=function(){var win=_frame.contentWindow;var src=win.location.href;_value=(typeof win[ID]!=UNDEFINED?win[ID]:"");if(_value!=_getHash()){_update.call(SWFAddress,false);_l.hash=_ieLocal(_value,TRUE)}};var _load=function(){if(!_loaded){_loaded=TRUE;if(_msie&&_version<8){var frameset=_d.getElementsByTagName("frameset")[0];_frame=_d.createElement((frameset?"":"i")+"frame");if(frameset){frameset.insertAdjacentElement("beforeEnd",_frame);frameset[frameset.cols?"cols":"rows"]+=",0";_frame.src="javascript:false";_frame.noResize=true;_frame.frameBorder=_frame.frameSpacing=0}else{_frame.src="javascript:false";_frame.style.display="none";_d.body.insertAdjacentElement("afterBegin",_frame)}_st(function(){_events.addListener(_frame,"load",_htmlLoad);if(typeof _frame.contentWindow[ID]==UNDEFINED){_htmlWrite()}},50)}else{if(_safari){if(_version<418){_d.body.innerHTML+='<form id="'+ID+'" style="position:absolute;top:-9999px;" method="get"></form>';_form=_d.getElementById(ID)}if(typeof _l[ID]==UNDEFINED){_l[ID]={}}if(typeof _l[ID][_l.pathname]!=UNDEFINED){_stack=_l[ID][_l.pathname].split(",")}}}_st(_functions.bind(function(){_jsInit.call(this);_jsChange.call(this);_track.call(this)},this),1);if(_msie&&_version>=8){_d.body.onhashchange=_functions.bind(_listen,this);_si(_functions.bind(_titleCheck,this),50)}else{_si(_functions.bind(_listen,this),50)}}};var ID="swfaddress",FUNCTION="function",UNDEFINED="undefined",TRUE=true,FALSE=false,_util=asual.util,_browser=_util.Browser,_events=_util.Events,_functions=_util.Functions,_version=_browser.getVersion(),_msie=_browser.isMSIE(),_mozilla=_browser.isMozilla(),_opera=_browser.isOpera(),_safari=_browser.isSafari(),_supported=FALSE,_t=_getWindow(),_d=_t.document,_h=_t.history,_l=_t.location,_si=setInterval,_st=setTimeout,_dc=decodeURI,_ec=encodeURI,_frame,_form,_url,_title=_d.title,_length=_h.length,_silent=FALSE,_loaded=FALSE,_justset=TRUE,_juststart=TRUE,_ref=this,_stack=[],_ids=[],_popup=[],_listeners={},_value=_getHash(),_opts={history:TRUE,strict:TRUE};if(_msie&&_d.documentMode&&_d.documentMode!=_version){_version=_d.documentMode!=8?7:8}_supported=(_mozilla&&_version>=1)||(_msie&&_version>=6)||(_opera&&_version>=9.5)||(_safari&&_version>=312);if(_supported){if(_opera){history.navigationMode="compatible"}for(var i=1;i<_length;i++){_stack.push("")}_stack.push(_getHash());if(_msie&&_l.hash!=_getHash()){_l.hash="#"+_ieLocal(_getHash(),TRUE)}_searchScript(document);var _qi=_url?_url.indexOf("?"):-1;if(_qi!=-1){var param,params=_url.substr(_qi+1).split("&");for(var i=0,p;p=params[i];i++){param=p.split("=");if(/^(history|strict)$/.test(param[0])){_opts[param[0]]=(isNaN(param[1])?/^(true|yes)$/i.test(param[1]):(parseInt(param[1])!=0))}if(/^tracker$/.test(param[0])){_opts[param[0]]=param[1]}}}if(_msie){_titleCheck.call(this)}if(window==_t){_events.addListener(document,"DOMContentLoaded",_functions.bind(_load,this))}_events.addListener(_t,"load",_functions.bind(_load,this))}else{if((!_supported&&_l.href.indexOf("#")!=-1)||(_safari&&_version<418&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}else{_track()}}this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.up=function(){var path=this.getPath();this.setValue(path.substr(0,path.lastIndexOf("/",path.length-2)+(path.substr(path.length-1)=="/"?1:0)))};this.go=function(delta){_h.go(delta)};this.href=function(url,target){target=typeof target!=UNDEFINED?target:"_self";if(target=="_self"){self.location.href=url}else{if(target=="_top"){_l.href=url}else{if(target=="_blank"){window.open(url)}else{_t.frames[target].location.href=url}}}};this.popup=function(url,name,options,handler){try{var popup=window.open(url,name,eval(options));if(typeof handler!=UNDEFINED){eval(handler)}}catch(ex){}_popup=arguments};this.getIds=function(){return _ids};this.getId=function(index){return _ids[0]};this.setId=function(id){_ids[0]=id};this.addId=function(id){this.removeId(id);_ids.push(id)};this.removeId=function(id){for(var i=0;i<_ids.length;i++){if(id==_ids[i]){_ids.splice(i,1);break}}};this.addEventListener=function(type,listener){if(typeof _listeners[type]==UNDEFINED){_listeners[type]=[]}_listeners[type].push(listener)};this.removeEventListener=function(type,listener){if(typeof _listeners[type]!=UNDEFINED){for(var i=0,l;l=_listeners[type][i];i++){if(l==listener){break}}_listeners[type].splice(i,1)}};this.dispatchEvent=function(event){if(this.hasEventListener(event.type)){event.target=this;for(var i=0,l;l=_listeners[event.type][i];i++){l(event)}return TRUE}return FALSE};this.hasEventListener=function(type){return(typeof _listeners[type]!=UNDEFINED&&_listeners[type].length>0)};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"))}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1)}return url};this.getStrict=function(){return _opts.strict};this.setStrict=function(strict){_opts.strict=strict};this.getHistory=function(){return _opts.history};this.setHistory=function(history){_opts.history=history};this.getTracker=function(){return _opts.tracker};this.setTracker=function(tracker){_opts.tracker=tracker};this.getTitle=function(){return _d.title};this.setTitle=function(title){if(!_supported){return null}if(typeof title==UNDEFINED){return}if(title=="null"){title=""}title=_dc(title);_st(function(){_title=_d.title=title;if(_juststart&&_frame&&_frame.contentWindow&&_frame.contentWindow.document){_frame.contentWindow.document.title=title;_juststart=FALSE}if(!_justset&&_mozilla){_l.replace(_l.href.indexOf("#")!=-1?_l.href:_l.href+"#")}_justset=FALSE},10)};this.getStatus=function(){return _t.status};this.setStatus=function(status){if(!_supported){return null}if(typeof status==UNDEFINED){return}if(status=="null"){status=""}status=_dc(status);if(!_safari){status=_strictCheck((status!="null")?status:"",TRUE);if(status=="/"){status=""}if(!(/http(s)?:\/\//.test(status))){var index=_l.href.indexOf("#");status=(index==-1?_l.href:_l.href.substr(0,index))+"#"+status}_t.status=status}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_supported){return null}return _dc(_strictCheck(_ieLocal(_value,FALSE),FALSE))};this.setValue=function(value){if(!_supported){return null}if(typeof value==UNDEFINED){return}if(value=="null"){value=""}value=_ec(_dc(_strictCheck(value,TRUE)));if(value=="/"){value=""}if(_value==value){return}_justset=TRUE;_value=value;_silent=TRUE;_update.call(SWFAddress,true);_stack[_h.length]=_value;if(_safari){if(_opts.history){_l[ID][_l.pathname]=_stack.toString();_length=_h.length+1;if(_version<418){if(_l.search==""){_form.action="#"+_value;_form.submit()}}else{if(_version<523||_value==""){var evt=_d.createEvent("MouseEvents");evt.initEvent("click",TRUE,TRUE);var anchor=_d.createElement("a");anchor.href="#"+_value;anchor.dispatchEvent(evt)}else{_l.hash="#"+_value}}}else{_l.replace("#"+_value)}}else{if(_value!=_getHash()){if(_opts.history){_l.hash="#"+_dc(_ieLocal(_value,TRUE))}else{_l.replace("#"+_dc(_value))}}}if((_msie&&_version<8)&&_opts.history){_st(_htmlWrite,50)}if(_safari){_st(function(){_silent=FALSE},1)}else{_silent=FALSE}};this.getPath=function(){var value=this.getValue();if(value.indexOf("?")!=-1){return value.split("?")[0]}else{if(value.indexOf("#")!=-1){return value.split("#")[0]}else{return value}}};this.getPathNames=function(){var path=this.getPath(),names=path.split("/");if(path.substr(0,1)=="/"||path.length==0){names.splice(0,1)}if(path.substr(path.length-1,1)=="/"){names.splice(names.length-1,1)}return names};this.getQueryString=function(){var value=this.getValue(),index=value.indexOf("?");if(index!=-1&&index<value.length){return value.substr(index+1)}};this.getParameter=function(param){var value=this.getValue();var index=value.indexOf("?");if(index!=-1){value=value.substr(index+1);var p,params=value.split("&"),i=params.length,r=[];while(i--){p=params[i].split("=");if(p[0]==param){r.push(p[1])}}if(r.length!=0){return r.length!=1?r:r[0]}}};this.getParameterNames=function(){var value=this.getValue();var index=value.indexOf("?");var names=[];if(index!=-1){value=value.substr(index+1);if(value!=""&&value.indexOf("=")!=-1){var params=value.split("&"),i=0;while(i<params.length){names.push(params[i].split("=")[0]);i++}}}return names};this.onInit=null;this.onChange=null;this.onInternalChange=null;this.onExternalChange=null;(function(){var _args;if(typeof FlashObject!=UNDEFINED){SWFObject=FlashObject}if(typeof SWFObject!=UNDEFINED&&SWFObject.prototype&&SWFObject.prototype.write){var _s1=SWFObject.prototype.write;SWFObject.prototype.write=function(){_args=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _args[0]=="string")?document.getElementById(_args[0]):_args[0]).so=this}var success;if(success=_s1.apply(this,_args)){_ref.addId(this.getAttribute("id"))}return success}}if(typeof swfobject!=UNDEFINED){var _s2r=swfobject.registerObject;swfobject.registerObject=function(){_args=arguments;_s2r.apply(this,_args);_ref.addId(_args[0])};var _s2c=swfobject.createSWF;swfobject.createSWF=function(){_args=arguments;var swf=_s2c.apply(this,_args);if(swf){_ref.addId(_args[0].id)}return swf};var _s2e=swfobject.embedSWF;swfobject.embedSWF=function(){_args=arguments;if(typeof _args[8]==UNDEFINED){_args[8]={}}if(typeof _args[8].id==UNDEFINED){_args[8].id=_args[1]}_s2e.apply(this,_args);_ref.addId(_args[8].id)}}if(typeof UFO!=UNDEFINED){var _u=UFO.create;UFO.create=function(){_args=arguments;_u.apply(this,_args);_ref.addId(_args[0].id)}}if(typeof AC_FL_RunContent!=UNDEFINED){var _a=AC_FL_RunContent;AC_FL_RunContent=function(){_args=arguments;_a.apply(this,_args);for(var i=0,l=_args.length;i<l;i++){if(_args[i]=="id"){_ref.addId(_args[i+1])}}}}})()};;// SpryValidationTextarea.js - version 0.17 - Spry Pre-Release 1.6.1
// SpryValidationCheckbox.js - version 0.10 - Spry Pre-Release 1.6.1
// SpryValidationTextField.js - version 0.37 - Spry Pre-Release 1.6.1
// SpryValidationSelect.js - version 0.10 - Spry Pre-Release 1.6.1
// SpryValidationConfirm.js - version 0.10 - Spry Pre-Release 1.6.1
//
// Copyright (c) 2007. Adobe Systems Incorporated.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   * Redistributions of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//   * Neither the name of Adobe Systems Incorporated nor the names of its
//     contributors may be used to endorse or promote products derived from this
//     software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('h 6;a(!6)6={};a(!6.7)6.7={};6.7.4o=c(){h b=3P.5y.3N();h 52=3P.5U.3N();h 1h=3P.5F.3N();3.28=3.X=3.2Y=3.1i=t;h 41=/5R.([0-9\\.]*)/i;h 3T=/5J.([0-9\\.]*)/i;h 43=/5C/i;h 3V=/(5E|1i)\\/([\\d\\.]*)/i;h r=t;a((r=1h.1k(41))){3.2Y=n;3.24=2v(r[1])}A a((r=1h.1k(3T))){3.X=n;3.24=2v(r[1])}A a((r=1h.1k(3V))){3.1i=n;3.24=2v(r[2])}A a(1h.1k(43)){h 47=/5T:\\s*([0-9\\.]+)/i;r=1h.1k(47);3.28=n;3.24=2v(r[1])}3.1E=3.2w=3.3w=t;3.4v=1h.1k(/1E/i)?"1E":(1h.1k(/3w/i)?"3w":(1h.1k(/2w/i)?"2w":1h.1k(/3S/i)?"3S":"64"));3[3.4v]=n;3.v=3.24;a(3.1i&&3.2w&&3.28){3.28=t}};6.F=1e 6.7.4o();6.7.j=c(p,m){m=6.7.u.1g(m,{});3.E={1Q:t};3.m={};3.p=p;3.4b(p);a(!3.4g()){f}m.1U=6.7.u.1g(m.1U,n);m.K=6.7.u.1g(m.K,\'\');m.2V=6.7.u.1g(m.2V,n);m.1L=6.7.u.1g(m.1L,t);6.7.u.3K(3,m);6.7.u.3K(3.m,m);a(m.1L)3.1L=3.3I(m.1L);h Q=[\'48\'].5e(6.7.u.1g(3.m.Q,[]));Q=Q.55(",");3.Q=0;3.Q=3.Q|(Q.2T(\'48\')!=-1?6.7.j.3s:0);3.Q=3.Q|(Q.2T(\'4i\')!=-1?6.7.j.3m:0);3.Q=3.Q|(Q.2T(\'5q\')!=-1?6.7.j.2u:0);a(6.7.j.3M){3.3v()}A{6.7.j.3O.B(3)}};6.7.j.2u=1;6.7.j.3m=2;6.7.j.3s=4;6.7.j.3o=\'6a\';6.7.j.4l=\'5m\';6.7.j.5n=\'5o 5l\';6.7.j.4m=\'5k 4p 4s 4c 5g 5h\';6.7.j.4w=\'5i 4p 4s 4c 5w\';6.7.j.2d=\'5x\';6.7.j.z.4b=c(p){3.p=3.3I(p);3.w=[];3.2z="5v";3.2B="5u";3.2F="5r";3.1z="5f";3.2s="5t";3.3j="5z";3.3k="5a";3.2l=t;3.1C=t;3.1H=t;3.1Y=t;3.3f=6.7.j.3o};6.7.j.z.14=c(){a(3.w)V(h i=0;i<3.w.C;i++){6.7.u.2I(3.w[i][0],3.w[i][1],3.w[i][2],t)}M{1n 3.p}L(R){}M{1n 3.l}L(R){}M{1n 3.1t}L(R){}M{1n 3.T}L(R){}M{1n 3.w}L(R){}M{3.19.14()}L(R){}M{1n 3.19}L(R){}M{3.1m.14()}L(R){}M{1n 3.1m}L(R){}h q=6.7.D.12;h 1w=q.C;V(h i=0;i<1w;i++){a(q[i]==3){q.54(i,1);4L}}};6.7.j.z.3E=c(){f 3.l&&(3.l.3q||3.l.3t)||!3.l};6.7.j.z.3I=c(J){a(J&&W J=="3e")f 1B.2R(J);f J};6.7.j.3H=c(1a){a(W 2b.1f!=\'1I\'){2b.1f(\'4e\',1a,t)}A a(W 1B.1f!=\'1I\'){1B.1f(\'4e\',1a,t)}A a(W 2b.2N!=\'1I\'){2b.2N(\'50\',1a)}};6.7.j.4f=c(1a){6.7.j.3M=n;h q=6.7.j.3O;h 1w=q.C;V(h i=0;i<1w;i++){q[i].3v()}};6.7.j.3M=t;6.7.j.3O=[];6.7.j.3H(6.7.j.4f);6.7.j.3H(c(){6.7.u.1f(2b,"58",6.7.D.3R,t)});6.7.j.z.4g=c(){f 6.F.X&&6.F.v>=5&&6.F.1E||6.F.28&&6.F.v>=1.4||6.F.1i||6.F.2Y&&6.F.v>=9};6.7.j.z.3v=c(){a(3.p){a(3.p.S=="2p"){3.l=3.p}A{3.l=6.7.u.3X(3.p,"2p")}}a(3.m&&3.m.1A&&(3.m.1A==\'4n\'||3.m.1A==\'3p\')){3.1t=1B.2R(3.m.4Z);3.1c()}a(3.l){3.l.53("5s","68");3.1X();3.19=1e 6.7.2h(3.l);h o=3;3.w=[];a(3.1U){a(6.F.X){3.w.B([3.l,"2j",c(e){f o.31(e||1b)}]);3.w.B([3.l,"1J",c(e){f o.4X(e||1b)}]);3.w.B([3.l,"2t",c(e){f o.3W(e||1b)}])}A{3.w.B([3.l,"32",c(e){f o.1r(e)}]);3.w.B([3.l,"2t",c(e){f o.4E(e)}]);3.w.B([3.l,"3b",c(e){f o.2f(e)}]);a(6.F.1i){3.w.B([3.l,"2X",c(e){f o.4D(e)}]);3.w.B([3.l,"3c",c(e){f o.3r(e)}])}A{3.w.B([3.l,"3d",c(e){f o.31(e)}]);3.w.B([3.l,"4d",c(e){o.1K();f o.1r(e)}]);3.w.B([3.l,"49",c(e){f o.1X()}])}}3.w.B([3.l,"32",c(e){f o.1r(e||1b)}])}3.w.B([3.l,"60",c(e){f o.4U(e||1b)}]);3.w.B([3.l,"3c",c(e){f o.4Y(e||1b)}]);3.w.B([3.l,"4i",c(e){f o.4W(e||1b)}]);a(3.Q&6.7.j.2u){a(6.F.X){3.w.B([3.l,"2j",c(e){f o.21(e||1b)}]);3.w.B([3.l,"1J",c(e){f o.21(e||1b)}])}A{3.w.B([3.l,"32",c(e){f o.1r(e)}]);3.w.B([3.l,"2t",c(e){f o.4A(e)}]);3.w.B([3.l,"3b",c(e){f o.2g(e)}]);a(6.F.1i){3.w.B([3.l,"2X",c(e){f o.4C(e)}]);3.w.B([3.l,"3c",c(e){f o.3r(e)}])}A{3.w.B([3.l,"3d",c(e){f o.21(e)}]);3.w.B([3.l,"4d",c(e){o.1K();f o.1r(e)}]);3.w.B([3.l,"49",c(e){f o.1X()}])}}}a(!(3.Q&6.7.j.2u)&&!3.1U){a(6.F.X){3.w.B([3.l,"2j",c(e){f o.1c()}]);3.w.B([3.l,"1J",c(e){f o.1c()}])}A{3.w.B([3.l,"2t",c(e){f o.1c()}]);3.w.B([3.l,"3b",c(e){f o.1c()}]);a(6.F.1i){3.w.B([3.l,"2X",c(e){f o.1c()}])}A{3.w.B([3.l,"3d",c(e){f o.1c()}])}}}V(h i=0;i<3.w.C;i++){6.7.u.1f(3.w[i][0],3.w[i][1],3.w[i][2],t)}3.T=6.7.u.3Z(3.l,"6b");a(3.T){a(!3.T.4k&&!3.T.4j){3.T.4j=c(e){e=e||1b;f 6.7.D.3F(e,e.4t||e.4u)};3.T.4k=n}a(!3.T.4q){6.7.u.1f(3.T,"2J",c(e){e=e||1b;f 6.7.D.3z(e,e.4t||e.4u)},t);3.T.4q=n}6.7.D.12.B(3)}}3.1T()};6.7.j.z.3u=c(e){a(3.l.3q==n||3.l.3t==n){f}a(!3.1m){3.1m=3.19}a(3.E.1Q){f n}h N=3.l.U;h Z=n;a(3.E.Y){f n}a(e&&3.l&&3.m&&3.m.P>0&&Z){a(N.C>3.m.P&&((!6.7.u.2o(e)&&3.19.G==3.19.I)||(6.7.u.2o(e)&&N!=3.2C)||3.19.G!=3.19.I)){3.E.1Q=n;h 1s=3.2C;h G=3.1m.G;h I=3.1m.I;a(1s.C&&3.1m.I<1s.C){h 1N=I-G+3.m.P-1s.C;h 2r=1s.23(0,G)+N.23(G,G+1N)+1s.23(I,1s.C<3.m.P?1s.C:3.m.P);I=G+1N}A{h 2r=N.23(0,3.m.P);I=G=3.m.P}a(6.F.X){3.l.5H=2r}A{3.l.U=2r}3.44();3.19.4G(I,I);3.E.1Q=t;Z=t}A{3.1q(6.7.j.2d);3.2l=t}}3.1c();f Z};6.7.j.z.42=c(N){h 2U=t;a(W 3.1V==\'1I\'){3.1V=t}A{2U=n;3.1V=n}a(3.3n){3.1V=n}A a(!3.3l){3.1V=n}a(3.l&&3.m&&3.m.2V){a(N.C>0&&3.1H&&(!3.K||(3.K&&!3.E.Y)||(3.K&&N!=3.K))){3.1v(3.1z);3.1q(6.7.j.2d);3.1H=t}A a((N.C==0||!(!3.K||(3.K&&!3.E.Y)||(3.K&&N!=3.K)))&&(!3.1H||2U)){a(3.1V||6.F.X){3.1v(3.2z);3.1q(6.7.j.4l)}3.1H=n;3.1C=t}}a(3.l&&3.m&&3.m.3a>0&&!3.1H){a(N.C>=3.m.3a&&(!3.K||(3.K&&!3.E.Y)||(3.K&&N!=3.K))&&3.1C){3.1v(3.1z);3.1q(6.7.j.2d);3.1C=t}A a((N.C<3.m.3a||(3.K&&N==3.K&&3.E.Y))&&!3.1C){3.1v(3.2F);3.1q(6.7.j.4m);3.1C=n}}};6.7.j.z.1c=c(){a(!3.1t||!3.m||!3.m.1A||(3.m.1A!=\'3p\'&&3.m.1A!=\'4n\')){f}a(3.m.1A==\'3p\'){a(3.m.P>0){a(3.E.Y){3.1D(3.m.P)}A{a(3.m.P>3.l.U.C){3.1D(3.m.P-3.l.U.C)}A{3.1D(0)}}}}A{a(3.E.Y){3.1D(0)}A{a(3.1U&&W 3.m.P!=\'1I\'&&3.m.P<3.l.U.C){3.1D(3.m.P)}A{3.1D(3.l.U.C)}}}};6.7.j.z.1D=c(N){a(3.1t.S.1x()!=\'l\'&&3.1t.S.1x()!=\'5K\'&&3.1t.S.1x()!=\'3C\'&&3.1t.S.1x()!=\'5Q\'){3.1t.5S=N}};6.7.j.z.2J=c(){3.1K();3.1j(3.2z);3.1j(3.2F);3.1j(3.2B);3.1j(3.1z);3.1q(6.7.j.3o);h o=3;1Z(c(){o.1X();o.1c()},10)};6.7.j.z.1F=c(){a(3.l.3q==n||3.l.3t==n){f n}a(3.Q&6.7.j.3s){3.1K()}h N=3.l.U;3.42(N);h Z=!3.1C&&!3.1H;a(Z&&3.m.P>0&&!3.1U){a(N.C<=3.m.P||(3.K&&3.K==N&&3.E.Y)){3.1v(3.1z);3.1q(6.7.j.2d);3.2l=t}A{3.1v(3.2B);3.1q(6.7.j.4w);3.2l=n}}Z=Z&&!3.2l;a(Z){3.1v(3.1z)}3.1c();f Z};6.7.j.z.1q=c(3U){3.3f=3U};6.7.j.z.5I=c(){f 3.3f};6.7.j.z.1K=c(){a(3.E.Y){3.E.1Q=n;3.l.U="";3.E.1Q=t;3.E.Y=t;3.1j(3.3j)}};6.7.j.z.1X=c(){a(3.K&&3.l.U==""){3.E.Y=n;3.l.U=3.K;3.1P(3.3j)}};6.7.j.z.44=c(){h o=3;3.1P(3.3k);1Z(c(){o.1j(o.3k)},5d)};6.7.j.z.3W=c(e){a(6.F.X&&6.F.1E&&e.1d==13){a((3.1m.C+3.m.P-3.l.U.C)<2){6.7.u.2Z(e);f t}}};6.7.j.z.1r=c(e){3.1T();3.1d=e.1d;f n};6.7.j.z.31=c(e){a(e.3J==\'2j\'&&e.4S!=\'U\'){f n}h 4O=3.3u(e);a(!4O){6.7.u.2Z(e)}};6.7.j.z.21=c(e){a(6.F.X&&e&&e.3J==\'2j\'&&e.4S!=\'U\'){f n}a(3.E.1J){h o=3;1Z(c(){o.E.1J=t;o.21(2H)},0);f n}a(3.E.Y){f n}3.3l=n;h 22=3.1F();3.3l=t;f 22};6.7.j.z.4Y=c(e){a(3.E.2q){3.1T()}};6.7.j.z.4X=c(e){3.E.1J=n;3.1K();a(6.F.X){h 3g=1B.3B.2a();3g.67(e.x,e.y);3g.3C()}3.1T();3.E.2q=n;3.1P(3.2s)};6.7.j.z.4U=c(e){a(3.E.1J){f}3.1K();3.1T();3.E.2q=n;3.1P(3.2s)};6.7.j.z.4W=c(e){3.1j(3.2s);a(3.Q&6.7.j.3m){3.3n=n;3.1F();3.3n=t}3.E.2q=t;h o=3;1Z(c(){o.1X()},10)};6.7.j.z.3r=c(e){3.1Y=n};6.7.j.z.4C=c(e){a(!3.1Y){3.1r(e);f 3.2g(e,t)}A{3.1Y=t;f n}};6.7.j.z.4D=c(e){a(!3.1Y){3.1r(e);f 3.2f(e,t)}A{3.1Y=t;f n}};6.7.j.z.4E=c(e){3.4B=1e 2i();f 3.2f(e,n)};6.7.j.z.2f=c(e,2y){a(e.1d&&6.7.u.2o(e)&&e.1d!=8&&e.1d!=46){f n}h 22=3.3u(e);a(1e 2i()-3.4B<2D&&2y){h o=3;1Z(c(){o.2f(e,t)},2D)}f 22};6.7.j.z.4A=c(e){3.2W=1e 2i();f 3.2g(e,n)};6.7.j.z.2g=c(e,2y){a(e.1d&&6.7.u.2o(e)&&e.1d!=8&&e.1d!=46){f n}h 22=3.21(e);a(1e 2i()-3.2W<2D&&2y){h o=3;1Z(c(){o.2g(e,t)},2D-1e 2i()+3.2W)}f 22};6.7.j.z.1T=c(e){a(3.m.P>0&&3.l.U.C>3.m.P){f}3.19.2M();a(!3.E.Y){3.2C=3.l.U}A{3.2C=\'\'}3.1m=3.19;f n};6.7.j.z.2n=c(J,O){a(!J||!O){f t}a(W J==\'3e\'){J=1B.2R(J);a(!J){f t}}a(!J.O){J.O=\' \'}f J};6.7.j.z.1v=c(O){h 2A=[3.2B,3.1z,3.2z,3.2F];V(h k=0;k<2A.C;k++){a(2A[k]!=O){3.1j(2A[k])}}3.1P(O)};6.7.j.z.1P=c(1O){h J=3.2n(3.p,1O);h 1G=3.2n(3.1L,1O);a(!J||J.O.5b(1e 3Q("\\\\b"+1O+"\\\\b"))!=-1){f}3.p.O+=\' \'+1O;a(1G)1G.O+=\' \'+1O};6.7.j.z.1j=c(O){h J=3.2n(3.p,O);h 1G=3.2n(3.1L,O);a(!J){f}J.O=J.O.4I(1e 3Q("\\\\s*\\\\b"+O+"\\\\b","g"),\'\');a(1G){1G.O=1G.O.4I(1e 3Q("\\\\s*\\\\b"+O+"\\\\b","g"),\'\')}};6.7.2h=c(p){3.p=p;3.2M()};6.7.2h.z.2M=c(){a(6.F.X&&6.F.1E){h 2E=3.p.2S.4z;a(3.p.S=="2p"){a(2E.3J!=\'5p\'){M{h H=2E.3A()}L(R){f}a(H.5j()==3.p){h 1u=3.p.2S.3B.2a();1u.4J(3.p);V(h 3x=0;1u.2x(\'3L\',H)<0;3x++){1u.2e(\'1o\',1)}3.G=3x;1u=3.p.2S.3B.2a();1u.4J(3.p);V(h 3D=0;1u.2x(\'57\',H)<0;3D++){1u.2e(\'1o\',1)}3.I=3D;3.C=3.I-3.G;3.1M=H.1M}}}A a(3.p.S=="4y"){M{3.H=2E.3A()}L(R){f}3.C=3.H.1M.C;h 2c=3.H.4N();3.G=-2c.2e("1o",-3y);2c=3.H.4N();2c.63(t);3.I=-2c.2e("1o",-3y);3.1M=3.H.1M}}A{h 1N=3.p;h 1l=0;h 1p=0;M{1l=1N.1l}L(R){}M{1p=1N.1p}L(R){}a(6.F.1i){a(1l==4Q){1l=0}a(1p==4Q){1p=0}}3.G=1l;3.I=1p;3.C=1p-1l;3.1M=3.p.U.23(1l,1p)}};6.7.2h.z.14=c(){M{1n 3.H}L(R){}M{1n 3.p}L(R){}};6.7.2h.z.4G=c(G,I){a(6.F.X&&6.F.1E){a(3.p.S=="2p"){h 25=3.p.2a();3.H=3.p.2a();3.H.4F("1o",G);3.H.4M("1o",I-G);h 4x=3.H.2x("3L",25);a(4x<0){3.H.3Y("3L",25)}h 4V=3.H.2x("4P",25);a(4V>0){3.H.3Y("4P",25)}}A a(3.p.S=="4y"){3.H=3.p.2S.4z.3A();3.H.4F("1o",-3y);3.G=3.H.2e("1o",G);3.I=3.G+3.H.4M("1o",I-G)}3.H.3C()}A{3.G=G;M{3.p.1l=G}L(R){}3.I=I;M{3.p.1p=I}L(R){}}3.66=n;3.2M()};a(!6.7.D)6.7.D={};a(!6.7.D.12)6.7.D.12=[];a(!6.7.D.1F){6.7.D.1F=c(2P){h 2L=n;h 3G=n;h q=6.7.D.12;h 1w=q.C;V(h i=0;i<1w;i++){a(!q[i].3E()&&q[i].T==2P){3G=q[i].1F();2L=3G&&2L}}f 2L}};a(!6.7.D.3F){6.7.D.3F=c(e,T){a(6.7.D.1F(T)==t){f t}f n}};a(!6.7.D.3z){6.7.D.3z=c(e,2P){h q=6.7.D.12;h 1w=q.C;V(h i=0;i<1w;i++){a(!q[i].3E()&&q[i].T==2P&&W(q[i].2J)==\'c\'){q[i].2J()}}f n}};a(!6.7.D.14){6.7.D.14=c(T){h q=6.7.D.12;V(h i=0;i<6.7.D.12.C;i++){a(q[i].T==T&&W(q[i].14)==\'c\'){q[i].14();i--}}}};a(!6.7.D.3R){6.7.D.3R=c(){h q=6.7.D.12;V(h i=0;i<6.7.D.12.C;i++){a(W(q[i].14)==\'c\'){q[i].14();i--}}}};a(!6.7.u)6.7.u={};6.7.u.3K=c(4K,2k,4H){a(!2k)f;V(h 2O 51 2k){a(4H&&2k[2O]==1I)5c;4K[2O]=2k[2O]}};6.7.u.1g=c(){h Z=2H;V(h i=0;i<6.7.u.1g.30.C;i++){a(W(6.7.u.1g.30[i])!=\'1I\'){Z=6.7.u.1g.30[i];4L}}f Z};6.7.u.4R=",4T,59,56,5A,62,5Z,5Y,5V,5W,5X,";6.7.u.3i=",8,9,16,17,18,20,27,33,34,35,36,37,38,39,40,45,46,5L,5M,61,5P,5D,4T,";6.7.u.3i+=6.7.u.4R;6.7.u.2o=c(11){f 6.7.u.3i.2T(","+11.1d+",")!=-1};6.7.u.3X=c(15,S){h 3h=15.5B(S);a(3h){f 3h[0]}f 2H};6.7.u.3Z=c(15,S){4r(15.1y&&15.1y.S.1x()!=S.1x()&&15.1y.S!=\'5O\'){15=15.1y}a(15.1y&&15.1y.S.1x()==S.1x()){f 15.1y}A{f 2H}};6.7.u.5N=c(2m){a(W 2m==\'3e\'){2m=1B.2R(2m)}h q=6.7.D.12;V(h i=0;i<6.7.D.12.C;i++){a(W(q[i].14)==\'c\'&&6.7.u.2G(2m,q[i].p)){q[i].14();i--}}};6.7.u.2G=c(1W,29){a(W 1W.2G==\'5G\'){f 29&&1W&&(1W==29||1W.2G(29))}A{h 26=29;4r(26){a(26==1W){f n}26=26.1y}f t}};6.7.u.1f=c(p,1R,1a,1S){M{a(p.1f)p.1f(1R,1a,1S);A a(p.2N)p.2N("4h"+1R,1a,1S)}L(e){}};6.7.u.2I=c(p,1R,1a,1S){M{a(p.2I)p.2I(1R,1a,1S);A a(p.4a)p.4a("4h"+1R,1a,1S)}L(e){}};6.7.u.2Z=c(11){M{3.2Q(11);3.2K(11)}L(e){}};6.7.u.2Q=c(11){a(11.2Q){11.2Q()}A{11.69=n}};6.7.u.2K=c(11){a(11.2K){11.2K()}A{11.65=t}};',62,384,'|||this|||Spry|Widget|||if||function|||return||var||ValidationTextarea||input|options|true|self|element||||false|Utils||event_handlers|||prototype|else|push|length|Form|flags|is|start|range|end|ele|hint|catch|try|val|className|maxChars|validateOn|err|nodeName|form|value|for|typeof|ie|hintOn|ret||ev|onSubmitWidgetQueue||destroy|node||||cursorPosition|handler|event|counterChar|keyCode|new|addEventListener|firstValid|ua|safari|removeClassName|match|selectionStart|initialCursor|delete|character|selectionEnd|setState|onKeyDown|initial|counterEl|range_all|switchClassName|qlen|toLowerCase|parentNode|validClass|counterType|document|isMinInvalid|setCounterElementValue|windows|validate|add|isRequireInvalid|undefined|drop|removeHint|additionalError|text|tmp|clssName|addClassName|locked|eventType|capture|saveState|useCharacterMasking|notFireMinYet|who|putHint|safariClicked|setTimeout||onChange|answer|substring|version|ta_range|el||mozilla|what|createTextRange|window|clone|VALID|moveStart|safariValidate|safariChangeValidate|SelectionDescriptor|Date|propertychange|optionsObj|isMaxInvalid|container|checkClassName|isSpecialKey|TEXTAREA|active|newValue|focusClass|keypress|ONCHANGE|parseFloat|mac|compareEndPoints|recall|requiredClass|classes|invalidCharsMaxClass|initialValue|1000|sel|invalidCharsMinClass|contains|null|removeEventListener|reset|preventDefault|isValid|update|attachEvent|optionName|vform|stopPropagation|getElementById|ownerDocument|indexOf|oldInvalid|isRequired|safariChangeFlag|mouseup|opera|stopEvent|arguments|onKeyEvent|keydown||||||||minChars|keyup|mousedown|dragdrop|string|state|rng|elements|specialCharacters|hintClass|textareaFlashClass|onKeyEventOn|ONBLUR|onBlurOn|INITIAL|chars_remaining|disabled|safariMouseDown|ONSUBMIT|readOnly|onTyping|attachBehaviors|linux|sel_start|10000|onReset|createRange|body|select|sel_end|isDisabled|onSubmit|isElementValid|addLoadListener|getElement|type|setOptions|StartToStart|onloadDidFire|toString|loadQueue|navigator|RegExp|destroyAll|unix|re_msie|newstate|re_safari|onKeyPress|getFirstChildWithNodeNameAtAnyLevel|setEndPoint|getFirstParentWithNodeName||re_opera|validateMinRequired|re_gecko|redTextFlash|||re_gecko_version|submit|dragexit|detachEvent|init|Chars|dragenter|load|processLoadQueue|isBrowserSupported|on|blur|onsubmit|attachedSubmitHandler|REQUIRED|MINIMUM|chars_count|BrowserSniff|Number|attachedResetHandler|while|of|srcElement|currentTarget|Platform|MAXIMUM|c1|INPUT|selection|safariChangeKeyPress|safariFlag|safariChangeMouseUp|safariMouseUp|safariKeyPress|move|moveTo|ignoreUndefinedProps|replace|moveToElementText|obj|break|moveEnd|duplicate|allow|EndToEnd|2147483647|specialSafariNavKeys|propertyName|63232|onFocus|c2|onBlur|onDrop|onMouseDown|counterId|onload|in|up|setAttribute|splice|join|63234|StartToEnd|unload|63233|textareaFlashState|search|continue|200|concat|textareaValidState|Not|Met|Maximum|parentElement|Minimum|Format|Required|INVALID|Invalid|None|change|textareaMinCharsState|AutoComplete|textareaFocusState|textareaMaxCharsState|textareaRequiredState|Exceeded|Valid|appName|textareaHintState|63235|getElementsByTagName|gecko|192|applewebkit|userAgent|object|innerText|getState|MSIE|textarea|91|92|destroyWidgets|BODY|144|img|Opera|innerHTML|rv|platform|63276|63277|63289|63275|63273|focus|93|63272|collapse|unknown|returnValue|ignore|moveToPoint|off|cancelBubble|Initial|FORM'.split('|'),0,{}))

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('H u;o(!u)u={};o(!u.G)u.G={};u.G.7w=J(){H b=5E.87.2z();H 8W=5E.8V.2z();H 2x=5E.8z.2z();l.2F=l.24=l.2v=l.2a=K;H 7I=/8J.([0-9\\.]*)/i;H 7K=/8Q.([0-9\\.]*)/i;H 7y=/8P/i;H 7s=/(8Z|2a)\\/([\\d\\.]*)/i;H r=K;o((r=2x.1J(7I))){l.2v=1b;l.41=3i(r[1])}1a o((r=2x.1J(7K))){l.24=1b;l.41=3i(r[1])}1a o((r=2x.1J(7s))){l.2a=1b;l.41=3i(r[2])}1a o(2x.1J(7y)){H 7z=/9N:\\s*([0-9\\.]+)/i;r=2x.1J(7z);l.2F=1b;l.41=3i(r[1])}l.2M=l.3V=l.5Q=K;l.7x=2x.1J(/2M/i)?"2M":(2x.1J(/5Q/i)?"5Q":(2x.1J(/3V/i)?"3V":2x.1J(/7A/i)?"7A":"9O"));l[l.7x]=1b;l.v=l.41;o(l.2a&&l.3V&&l.2F){l.2F=K}};u.1e=2n u.G.7w();u.G.M=J(1c,1G,O){1G=u.G.U.1x(1G,"79");o(1X 1G!=\'3B\'){l.67(\'9J 7D 6j 7C 4j 9D 9C 9E 4j 1y 1G, 4j O 9F 4j 9H 6j.\');I}o(1X u.G.M.3y[1G]==\'3A\'){l.67(\'9G 1y 1G 9S 9R 4j 7D 6j.\');I}O=u.G.U.1x(O,{});l.1G=1G;o(!l.6D()){O.2m=K}l.6E(1c,O);H 1I=[\'77\'].6d(u.G.U.1x(l.O.1I,[]));1I=1I.6M(",");l.1I=0;l.1I=l.1I|(1I.2K(\'77\')!=-1?u.G.M.6m:0);l.1I=l.1I|(1I.2K(\'73\')!=-1?u.G.M.5D:0);l.1I=l.1I|(1I.2K(\'6r\')!=-1?u.G.M.4C:0);o(u.G.M.6k)l.66();1a u.G.M.69.2e(l)};u.G.M.4C=1;u.G.M.5D=2;u.G.M.6m=4;u.G.M.6e=1;u.G.M.3n=2;u.G.M.6b=4;u.G.M.68=8;u.G.M.5I=16;u.G.M.6g=32;u.G.M.3y={\'79\':{},\'9e\':{},\'9g\':{1Q:/[\\-\\+\\d]/,2I:/^[\\-\\+]?\\d*$/,1y:J(L,O){o(L==\'\'||L==\'-\'||L==\'+\'){I K}H 1U=/^[\\-\\+]?\\d*$/;o(!1U.1v(L)){I K}O=O||{3W:K};H 1d=2i(L,10);o(!3z(1d)){H 3W=1b;o(1X O.3W!=\'3A\'&&O.3W==K){3W=K}o(!3W&&L<0){1d=K}}1a{1d=K}I 1d}},\'98\':{1Q:/[\\d\\.,\\-\\+e]/i,2I:/^[\\-\\+]?\\d(?:|\\.,\\d{0,2})|(?:|e{0,1}[\\-\\+]?\\d{0,})$/i,1y:J(L,O){H 1U=/^[\\+\\-]?[0-9]+([\\.,][0-9]+)?([9j]{0,1}[\\-\\+]?[0-9]+)?$/;o(!1U.1v(L)){I K}H 1d=3i(L);o(3z(1d)){1d=K}I 1d}},\'6O\':{3J:{\'9v\':{1Q:/[\\d\\.\\,\\-\\+\\$]/,2I:/^[\\-\\+]?(?:[\\d\\.]*)+(|\\,\\d{0,2})$/,1y:J(L,O){H 1d=K;o(/^(\\-|\\+)?\\d{1,3}(?:\\.\\d{3})*(?:\\,\\d{2}|)$/.1v(L)||/^(\\-|\\+)?\\d+(?:\\,\\d{2}|)$/.1v(L)){L=L.2z().2u(/\\./2S,\'\').2u(/\\,/,\'.\');1d=3i(L)}I 1d}},\'6X\':{1Q:/[\\d\\.\\,\\-\\+\\$]/,2I:/^[\\-\\+]?(?:[\\d\\,]*)+(|\\.\\d{0,2})$/,1y:J(L,O){H 1d=K;o(/^(\\-|\\+)?\\d{1,3}(?:\\,\\d{3})*(?:\\.\\d{2}|)$/.1v(L)||/^(\\-|\\+)?\\d+(?:\\.\\d{2}|)$/.1v(L)){L=L.2z().2u(/\\,/2S,\'\');1d=3i(L)}I 1d}}}},\'9w\':{1Q:/[^\\s]/,1y:J(L,O){H 7U=/^[\\w\\.-]+@[\\w\\.-]+\\.\\w+$/i;I 7U.1v(L)}},\'3F\':{1y:J(L,O){H 3R=/^([3U]+)[\\.\\-\\/\\\\\\s]+([3U]+)[\\.\\-\\/\\\\\\s]+([3U]+)$/i;H 4A=l.6H;H 1H=O.1p.1J(3R);H 2f=L.1J(4A);o(1H!==1u&&2f!==1u){H 4K=-1;H 4H=-1;H 4N=-1;1m(H i=1;i<1H.R;i++){3u(1H[i].2D()){19"5p":4K=i;1g;19"4m":4H=i;1g;19"5H":19"6N":4N=i;1g}}o(4K!=-1&&4H!=-1&&4N!=-1){H 3E=-1;H 4D=2i(2f[4K],10);H 3Y=2i(2f[4H],10);H 3P=2i(2f[4N],10);o(3Y<1||3Y>12){I K}3u(3Y){19 1:19 3:19 5:19 7:19 8:19 10:19 12:3E=31;1g;19 4:19 6:19 9:19 11:3E=30;1g;19 2:o((2i(3P/4,10)*4==3P)&&(3P%6S!=0||3P%9y==0)){3E=29}1a{3E=28}1g}o(4D<1||4D>3E){I K}I(2n 6t(3P,3Y-1,4D))}}1a{I K}}},\'6W\':{1y:J(L,O){H 3R=/([9x]+)/2S;H 4A=/(\\d+|5U?|9s?)/2S;H 1H=O.1p.1J(3R);H 2f=L.1J(4A);o(1H!==1u&&2f!==1u){o(1H.R!=2f.R){I K}H 4r=-1;H 5b=-1;H 58=-1;H 3G=-1;H 4i=0,4t=0,4w=0,4l=\'5U\';1m(H i=0;i<1H.R;i++){3u(1H[i].2D()){19"9r":4r=i;1g;19"4m":5b=i;1g;19"9m":58=i;1g;19"t":19"9l":3G=i;1g}}o(4r!=-1){H 4i=2i(2f[4r],10);o(3z(4i)||4i>(1H[4r]==\'6V\'?23:12)){I K}}o(5b!=-1){H 4t=2i(2f[5b],10);o(3z(4t)||4t>59){I K}}o(58!=-1){H 4w=2i(2f[58],10);o(3z(4w)||4w>59){I K}}o(3G!=-1){H 4l=2f[3G].4q();o(1H[3G].4q()==\'6R\'&&!/^a|8y$/i.1v(4l)||1H[3G].4q()==\'T\'&&!/^a|p$/i.1v(4l)){I K}}H 3F=2n 6t(8u,0,1,4i+(4l.2O(0)==\'P\'?12:0),4t,4w);I 3F}1a{I K}}},\'8i\':{1Q:/\\d/,1y:J(L,O){H 1U=1u;O.1p=O.1p||\'6s\';3u(O.1p.4q()){19\'6s\':1U=/^[3-6]{1}[0-9]{12,18}$/;1g;19\'8b\':1U=/^4(?:[0-9]{12}|[0-9]{15})$/;1g;19\'8O\':1U=/^5[1-5]{1}[0-9]{14}$/;1g;19\'8L\':1U=/^3(4|7){1}[0-9]{13}$/;1g;19\'8M\':1U=/^8R[0-9]{12}$/;1g;19\'8S\':1U=/^3(?:(0[0-5]{1}[0-9]{11})|(6[0-9]{12})|(8[0-9]{12}))$/;1g}o(!1U.1v(L)){I K}H 2H=[];H j=1,3w=\'\';1m(H i=L.R-1;i>=0;i--){o((j%2)==0){3w=2i(L.2O(i),10)*2;2H[2H.R]=3w.2z().2O(0);o(3w.2z().R==2){2H[2H.R]=3w.2z().2O(1)}}1a{3w=L.2O(i);2H[2H.R]=3w}j++}H 5B=0;1m(i=0;i<2H.R;i++){5B+=2i(2H[i],10)}o((5B%10)==0){I 1b}I K}},\'6Z\':{3J:{\'8U\':{1L:\'71-5v\'},\'70\':{1L:\'71\'},\'8w\':{1Q:/[\\5w-Z\\s]/,1y:J(L,O){I/^[A-Z]{1,2}\\d[\\5w-Z]?\\s?\\d[A-Z]{2}$/.1v(L)}},\'8B\':{1Q:/[\\5w-Z\\s]/,1L:\'8H 8G\'},\'8F\':{}}},\'6G\':{3J:{\'6F\':{1L:\'(5C) 5C-5v\'},\'8E\':{}}},\'8N\':{1L:\'5C-8D-5v\'},\'6T\':{6U:{\'2G\':/[\\d\\.]/i,\'4O\':/[\\d\\.\\:A-F\\/]/i,\'6J\':/[\\d\\.\\:A-F\\/]/i},1y:J(L,O){I u.G.M.4B(L,O.1p)}},\'8v\':{1Q:/[^\\s]/,1y:J(L,O){H 5r=/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;H 4M=L.1J(5r);o(4M&&4M[4]){H 2Q=4M[4].6a(".");H 42=\'\';1m(H i=0;i<2Q.R;i++){42=u.G.U.7d(2Q[i],64);o(!42){I K}1a{o(42!=(2Q[i]+"-")){2Q[i]=\'8A--\'+42}}}2Q=2Q.6M(".");L=L.2u(5r,"$1//"+2Q+"$5$6$8")}H 1U=/^(?:8T?|8Y)\\:\\/\\/(?:(?:[a-2B-9\\-\\.4z~\\!\\$\\&\\\'\\(\\)\\*\\+\\,\\;\\=:]|%[0-9a-f]{2,2})*\\@)?(?:((?:(?:[a-2B-9][a-2B-9\\-]*[a-2B-9]|[a-2B-9])\\.)*(?:[a-z][a-2B-9\\-]*[a-2B-9]|[a-z])|(?:\\[[^\\]]*\\]))(?:\\:[0-9]*)?)(?:\\/(?:[a-2B-9\\-\\.4z~\\!\\$\\&\\\'\\(\\)\\*\\+\\,\\;\\=\\:\\@]|%[0-9a-f]{2,2})*)*(?:\\?(?:[a-2B-9\\-\\.4z~\\!\\$\\&\\\'\\(\\)\\*\\+\\,\\;\\=\\:\\@\\/\\?]|%[0-9a-f]{2,2})*)?(?:\\#(?:[a-2B-9\\-\\.4z~\\!\\$\\&\\\'\\(\\)\\*\\+\\,\\;\\=\\:\\@\\/\\?]|%[0-9a-f]{2,2})*)?$/i;H 61=L.1J(1U);o(61){H 2J=61[1];o(2J){o(2J==\'[]\'){I K}o(2J.2O(0)==\'[\'){2J=2J.2u(/^\\[|\\]$/2S,\'\');I u.G.M.4B(2J,\'4O\')}1a{o(/[^0-9\\.]/.1v(2J)){I 1b}1a{I u.G.M.4B(2J,\'2G\')}}}1a{I 1b}}1a{I K}}}};u.G.M.4B=J(L,1p){H 6L=[/^(?:[a-1q-9]{1,4}:){7}[a-1q-9]{1,4}(?:\\/\\d{1,3})?$/i,/^[a-1q-9]{0,4}::(?:\\/\\d{1,3})?$/i,/^:(?::[a-1q-9]{1,4}){1,6}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){1,6}:(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:)(?::[a-1q-9]{1,4}){1,6}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){2}(?::[a-1q-9]{1,4}){1,5}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){3}(?::[a-1q-9]{1,4}){1,4}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){4}(?::[a-1q-9]{1,4}){1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){5}(?::[a-1q-9]{1,4}){1,2}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){6}(?::[a-1q-9]{1,4})(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){6}(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^:(?::[a-1q-9]{1,4}){0,4}:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){1,5}:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:)(?::[a-1q-9]{1,4}){1,4}:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){2}(?::[a-1q-9]{1,4}){1,3}:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){3}(?::[a-1q-9]{1,4}){1,2}:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i,/^(?:[a-1q-9]{1,4}:){4}(?::[a-1q-9]{1,4}):(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/\\d{1,3})?$/i];H 6I=[/^(\\d{1,3}\\.){3}\\d{1,3}$/i];H 3x=[];o(1p==\'6J\'||1p==\'4O\'){3x=3x.6d(6L)}o(1p==\'2G\'||1p==\'4O\'){3x=3x.6d(6I)}H 1d=K;1m(H i=0;i<3x.R;i++){o(3x[i].1v(L)){1d=1b;1g}}o(1d&&L.2K(".")!=-1){H 2G=L.1J(/:?(?:\\d{1,3}\\.){3}\\d{1,3}/i);o(!2G){I K}2G=2G[0].2u(/^:/,\'\');H 3a=2G.6a(\'.\');o(3a.R!=4){I K}H 1U=/^[\\-\\+]?\\d*$/;1m(H i=0;i<3a.R;i++){o(3a[i]==\'\'){I K}H 6h=2i(3a[i],10);o(3z(6h)||6h>8a||!1U.1v(3a[i])||3a[i].R>3||/^0{2,3}$/.1v(3a[i])){I K}}}o(1d&&L.2K("/")!=-1){H 6n=L.1J(/\\/\\d{1,3}$/);o(!6n)I K;H 4Q=2i(6n[0].2u(/^\\//,\'\'),10);o(3z(4Q)||4Q>7G||4Q<1){I K}}I 1d};u.G.M.6k=K;u.G.M.69=[];u.G.M.1f.6D=J(){I u.1e.24&&u.1e.v>=5&&u.1e.2M||u.1e.2F&&u.1e.v>=1.4||u.1e.2a||u.1e.2v&&u.1e.v>=9};u.G.M.1f.6E=J(1c,O){l.1c=l.6l(1c);l.1n=0;l.1i={3L:K,51:1b};l.O={};l.1D=[];l.4E="8m";l.3j="8s";l.4L="8r";l.4n="8t";l.4F="89";l.4I="88";l.4J="8x";l.4G="9d";l.4P="9L";l.5W="9K";o(u.1e.2a){l.1i.9M=0}3u(l.1G){19\'6G\':O.1p=u.G.U.1x(O.1p,\'6F\');1g;19\'6O\':O.1p=u.G.U.1x(O.1p,\'6X\');1g;19\'6Z\':O.1p=u.G.U.1x(O.1p,\'70\');1g;19\'3F\':O.1p=u.G.U.1x(O.1p,\'4m/5p/5H\');1g;19\'6W\':O.1p=u.G.U.1x(O.1p,\'6V:4m\');O.1L=O.1p.2u(/[9I]/2S,"0").2u(/6R/2S,\'5U\').2u(/T/2S,\'A\');1g;19\'6T\':O.1p=u.G.U.1x(O.1p,\'2G\');O.1Q=u.G.M.3y[l.1G].6U[O.1p];1g}H 2r={};o(O.1p&&u.G.M.3y[l.1G].3J){o(u.G.M.3y[l.1G].3J[O.1p]){u.G.U.3Z(2r,u.G.M.3y[l.1G].3J[O.1p])}}1a{u.G.U.3Z(2r,u.G.M.3y[l.1G])}O.2m=u.G.U.1x(O.2m,K);O.4V=u.G.U.1x(O.4V,\'\');O.4o=u.G.U.1x(O.4o,1b);O.1M=u.G.U.1x(O.1M,K);o(O.1M)O.1M=l.6l(O.1M);O.1Q=u.G.U.1x(O.1Q,2r.1Q);O.2I=u.G.U.1x(O.2I,2r.2I);O.1L=u.G.U.1x(O.1L,2r.1L);O.1y=u.G.U.1x(O.1y,2r.1y);o(1X O.1y==\'3B\'){O.1y=9Q(O.1y)}O.2Y=u.G.U.1x(O.2Y,2r.2Y);O.3g=u.G.U.1x(O.3g,2r.3g);O.44=u.G.U.1x(O.44,2r.44);O.3Q=u.G.U.1x(O.3Q,2r.3Q);u.G.U.3Z(l,O);u.G.U.3Z(l.O,O)};u.G.M.1f.2t=J(){o(l.1D)1m(H i=0;i<l.1D.R;i++){u.G.U.54(l.1D[i][0],l.1D[i][1],l.1D[i][2],K)}1E{3s l.1c}1F(1K){}1E{3s l.V}1F(1K){}1E{3s l.1P}1F(1K){}1E{3s l.1D}1F(1K){}1E{l.N.2t()}1F(1K){}1E{3s l.N}1F(1K){}H q=u.G.1r.2g;H 3e=q.R;1m(H i=0;i<3e;i++){o(q[i]==l){q.90(i,1);1g}}};u.G.M.1f.66=J(){o(l.1c){o(l.1c.1Z=="4U"){l.V=l.1c}1a{l.V=u.G.U.7N(l.1c,"4U")}}o(l.V){o(l.3Q){l.V.86("9P")}l.4e();l.7Z();o(l.1G==\'3F\'){l.6K()}l.V.9Z("a4","a1");l.N=2n u.G.2U(l.V);l.1j=l.V.L;H 1k=l;l.1D=[];l.1D.2e([l.V,"78",J(e){o(1k.25())I 1b;I 1k.7J(e||2s)}]);l.1D.2e([l.V,"a2",J(e){o(1k.25())I 1b;I 1k.6A(e||2s)}]);o(u.1e.2v){l.1D.2e([l.V,"a3",J(e){o(1k.25())I 1b;I 1k.6B(e||2s)}])}l.1D.2e([l.V,"6x",J(e){o(1k.25())I 1b;I 1k.7R(e||2s)}]);l.1D.2e([l.V,"73",J(e){o(1k.25())I 1b;I 1k.7P(e||2s)}]);l.1D.2e([l.V,"a0",J(e){o(1k.25())I 1b;I 1k.80(e||2s)}]);H 6p=u.1e.2F||u.1e.2v||u.1e.2a?"V":u.1e.24?"9T":"6r";l.1D.2e([l.V,6p,J(e){o(1k.25())I 1b;I 1k.3C(e||2s)}]);o(u.1e.2F||u.1e.2a){l.1D.2e([l.V,"9U",J(e){o(1k.25())I 1b;1k.3M();I 1k.3C(e||2s)}])}1a o(u.1e.24){l.1D.2e([l.V,"4k",J(e){o(1k.25())I 1b;I 1k.7S(e||2s)}])}1m(H i=0;i<l.1D.R;i++){u.G.U.2A(l.1D[i][0],l.1D[i][1],l.1D[i][2],K)}l.1P=u.G.U.7k(l.V,"9V");o(l.1P){o(!l.1P.6o&&!l.1P.6C){l.1P.6C=J(e){e=e||2s;I u.G.1r.60(e,e.6q||e.6z)};l.1P.6o=1b}o(!l.1P.6w){u.G.U.2A(l.1P,"50",J(e){e=e||2s;I u.G.1r.65(e,e.6q||e.6z)},K);l.1P.6w=1b}u.G.1r.2g.2e(l)}}};u.G.M.1f.25=J(){I l.V&&(l.V.9X||l.V.5K)||!l.V};u.G.M.1f.6l=J(1R){o(1R&&1X 1R=="3B")I 5h.7T(1R);I 1R};u.G.M.5R=J(2q){o(1X 3f.2A!=\'3A\')3f.2A(\'6v\',2q,K);1a o(1X 5h.2A!=\'3A\')5h.2A(\'6v\',2q,K);1a o(1X 3f.5a!=\'3A\')3f.5a(\'9W\',2q)};u.G.M.6u=J(2q){u.G.M.6k=1b;H q=u.G.M.69;H 3e=q.R;1m(H i=0;i<3e;i++)q[i].66()};u.G.M.5R(u.G.M.6u);u.G.M.5R(J(){u.G.U.2A(3f,"9z",u.G.1r.5M,K)});u.G.M.1f.1W=J(5N){l.1i.3L=1b;l.V.L=5N;l.1i.3L=K;l.1j=5N;o(!u.1e.24){l.3C()}};u.G.M.1f.4p=J(){l.1j=l.V.L;l.N.3v()};u.G.M.1f.6Y=J(3I){o(3I!=l.V.L){l.V.5K=1b;l.V.L=3I;l.V.5K=K;o(u.1e.2a&&l.1i.3N){l.V.6x()}}o(l.1i.51){l.N.1V(l.N.Q,l.N.1N)}l.2V()};u.G.M.1f.3M=J(){o(l.1i.4y){l.V.L="";l.1i.4y=K;l.2X(l.1c,l.4n);l.2X(l.1M,l.4n)}};u.G.M.1f.4e=J(){o(l.4V&&l.V&&l.V.1G=="3p"&&l.V.L==""){l.1i.4y=1b;l.V.L=l.4V;l.1C(l.1c,l.4n);l.1C(l.1M,l.4n)}};u.G.M.1f.2V=J(){H 1k=l;l.1C(l.1c,l.5W);3r(J(){1k.2X(1k.1c,1k.5W)},6S)};u.G.M.1f.2E=J(2c,3I){o(l.25())I K;o(l.1i.3L){I K}o(2c.R==0&&!l.4o){l.1n=0;I K}l.1i.3L=1b;H 1z=K;H 2d=1b;o(!l.O.4o&&2c.R==0){2d=K}H 1n=0;H 2l=2c;o(l.2m&&l.1Q){1m(H i=0;i<2c.R;i++){o(!l.1Q.1v(2c.2O(i))){1n=1n|u.G.M.3n;2l=3I;1z=1b;1g}}}o(!1z&&l.2m&&l.2I){o(!l.2I.1v(2l)){1n=1n|u.G.M.3n;1z=1b}}o(!1z&&l.1L){H 6Q=l.81(2c.R);o(!6Q.1v(2c)){1n=1n|u.G.M.3n;1z=1b}1a o(l.5F!=2c.R){1n=1n|u.G.M.3n}}o(2l==\'\'){1n=1n|u.G.M.6e}o(!1z&&l.1L&&l.2m){H n=l.3m(2c.R);o(n){2l+=n}}o(!1z&&l.44!==1u&&2d){o(2c.R<l.44){1n=1n|u.G.M.5I;2d=K}}o(!1z&&l.3Q!==1u&&2d){o(2c.R>l.3Q){1n=1n|u.G.M.6g;2d=K}}o(!1z&&l.1y&&2d){H L=l.1y(2l,l.O);o(K===L){1n=1n|u.G.M.3n;2d=K}1a{l.5O=L}}o(!1z&&l.1y&&l.2Y!==1u&&2d){H 2Y=l.1y(l.2Y.2z(),l.O);o(2Y!==K){o(l.5O<2Y){1n=1n|u.G.M.6b;2d=K}}}o(!1z&&l.1y&&l.3g!==1u&&2d){H 3g=l.1y(l.3g.2z(),l.O);o(3g!==K){o(l.5O>3g){1n=1n|u.G.M.68;2d=K}}}o(l.2m&&1z){l.6Y(3I)}l.1n=1n;l.2l=2l;l.1i.3L=K;I 1z};u.G.M.1f.3C=J(e){o(u.1e.2v&&l.1i.3T){I 1b}o(u.1e.24&&e&&e.97!=\'L\'){I 1b}o(l.1i.4k){H 1k=l;3r(J(){1k.1i.4k=K;1k.3C(1u)},0);I}o(l.1i.4y){I 1b}o(l.1S==8||l.1S==46){H 1z=l.2E(l.V.L,l.V.L);l.1j=l.V.L;o((1z||l.1n)&&l.1I&u.G.M.4C){H 1k=l;3r(J(){1k.3d()},0);I 1b}}H 1z=l.2E(l.V.L,l.1j);o((!1z||l.1n)&&l.1I&u.G.M.4C){H 1k=l;3r(J(){1k.3d()},0)}I 1b};u.G.M.1f.6B=J(e){o(l.1i.3T){l.1W(l.1j);u.G.U.2h(e);l.N.1V(l.N.Q,l.N.Q);l.1i.3T=K;I K}o(l.1i.3t){3f.83(l.1i.3t);l.1i.3t=1u}};u.G.M.1f.84=J(){o(l.V.L!=l.1j){H 1z=l.2E(l.V.L,l.V.L);o(1z){l.1W(l.1j);l.N.1V(l.N.Q,l.N.Q)}1a{l.3C()}}};u.G.M.1f.6K=J(){H 3k="";H 2C=[];H 3l=[];H 3h=[];H 3R=/^([3U]+)([\\.\\-\\/\\\\\\s]+)([3U]+)([\\.\\-\\/\\\\\\s]+)([3U]+)$/i;H 1H=l.O.1p.1J(3R);o(1H!==1u){1m(H i=1;i<1H.R;i++){3u(1H[i].2D()){19"5p":2C[i-1]="\\\\d{1,2}";3l[i-1]="\\\\d\\\\d";3k+="("+2C[i-1]+")";3h[i-1]=1u;1g;19"4m":2C[i-1]="\\\\d{1,2}";3l[i-1]="\\\\d\\\\d";3k+="("+2C[i-1]+")";3h[i-1]=1u;1g;19"5H":2C[i-1]="\\\\d{1,2}";3l[i-1]="\\\\d\\\\d";3k+="(\\\\d\\\\d)";3h[i-1]=1u;1g;19"6N":2C[i-1]="\\\\d{1,4}";3l[i-1]="\\\\d\\\\d\\\\d\\\\d";3k+="(\\\\d\\\\d\\\\d\\\\d)";3h[i-1]=1u;1g;7O:2C[i-1]=3l[i-1]=u.G.M.5l(1H[i]);3k+="["+2C[i-1]+"]";3h[i-1]=1H[i]}}}l.6H=2n 3o("^"+3k+"$","");l.2y=3h;l.5u=2C;l.6P=3l;l.4u=1H.R-2};u.G.M.1f.5x=J(1h){H 1d=\'^\';1m(H j=0;j<=1h;j++)1d+=l.5u[j];1d+=\'$\';I 2n 3o(1d,"")};u.G.M.1f.5z=J(1h){H 1d=\'^\';1m(H j=0;j<1h;j++)1d+=l.5u[j];1d+=l.6P[1h];I 2n 3o(1d,"")};u.G.M.1f.6y=J(L,2w){o(2w==0)I 0;H 3c=L.1s(0,2w);1m(H i=0;i<=l.4u;i++)o(l.5x(i).1v(3c))I i;I-1};u.G.M.1f.5s=J(L,1h){I l.5z(1h).1v(L)};u.G.M.1f.3S=J(L,2w,1h){H 3c=L.1s(0,2w);I l.5x(1h).1v(3c)};u.G.M.1f.5c=J(L,2w,1h){H 3c=L.1s(0,2w);I l.5z(1h).1v(3c)};u.G.M.1f.4v=J(L,2w,1h){H 1l=l.2y[1h+1];o(L.R<2w+1l.R)I K;1a{H 3c=L.1s(2w,2w+1l.R);o(3c==1l)I 1b}I K};u.G.M.1f.6A=J(e){o(l.1i.5i){l.1i.5i=K;u.G.U.2h(e);I K}o(e.5k||e.9n||!l.2m){I 1b}o(u.1e.2v&&l.1i.3T){u.G.U.2h(e);I K}o(l.1S==8||l.1S==46){H 5g=l.2E(l.V.L,l.V.L);o(5g){I 1b}}H 1A=u.G.U.5q(e);o(1A&&l.1Q){o(!l.1Q.1v(1A)){u.G.U.2h(e);l.2V();I K}}o(1A&&l.1L){H 4T=l.2W[l.N.Q];o(/[9o]/i.1v(4T)){o(4T.2D()==4T){1A=1A.2D()}1a{1A=1A.4q()}}H 1l=l.3m(l.N.Q);o(l.N.Q==l.1j.R){o(l.1j.R<l.5F){o(1l){u.G.U.2h(e);H 1t=l.1j.1s(0,l.N.Q)+1l+1A;H 1z=l.2E(1t,l.1j);o(!1z){l.1W(l.2l);l.N.1V(l.2l.R,l.2l.R)}1a{l.1W(l.1j.1s(0,l.N.Q)+1l);l.N.1V(l.N.Q+1l.R,l.N.Q+1l.R)}I K}}1a{u.G.U.2h(e);l.1W(l.V.L);I K}}1a o(1l){u.G.U.2h(e);l.N.1V(l.N.Q+1l.R,l.N.Q+1l.R);I K}u.G.U.2h(e);H 1t=l.1j.1s(0,l.N.Q)+1A+l.1j.1s(l.N.Q+1);H 1z=l.2E(1t,l.1j);o(!1z){1l=l.3m(l.N.Q+1);l.1W(l.2l);l.N.1V(l.N.Q+1+1l.R,l.N.Q+1+1l.R)}1a{l.N.1V(l.N.Q,l.N.Q)}I K}o(1A&&l.1G==\'3F\'&&l.2m){H 1h=l.6y(l.1j,l.N.Q);o(1h!=-1){u.G.U.2h(e);o((1h%2)!=0)1h++;o(l.5s(l.1j,1h)){o(l.5c(l.1j,l.N.Q,1h)){o(1h==l.4u){l.2V();I K}1a{H 1l=l.2y[1h+1];o(l.4v(l.1j,l.N.Q,1h)){H 1l=l.2y[1h+1];l.N.1V(l.N.Q+1l.R,l.N.Q+1l.R);o(1A==1l)I K;o(l.5s(l.1j,1h+2))1t=l.1j.1s(0,l.N.Q)+1A+l.1j.1s(l.N.Q+1);1a 1t=l.1j.1s(0,l.N.Q)+1A+l.1j.1s(l.N.Q);o(!l.3S(1t,l.N.Q+1,1h+2)){l.2V();I K}1a{l.1W(1t);l.N.1V(l.N.Q+1,l.N.Q+1)}I K}1a{H 1l=l.2y[1h+1];H 2N=1l+1A;1t=l.1j.1s(0,l.N.Q)+2N+l.1j.1s(l.N.Q);o(!l.3S(1t,l.N.Q+2N.R,1h+2)){2N=1l;1t=l.1j.1s(0,l.N.Q)+2N+l.1j.1s(l.N.Q);l.1W(1t);l.N.1V(l.N.Q+2N.R,l.N.Q+2N.R);l.2V();I K}1a{l.1W(1t);l.N.1V(l.N.Q+2N.R,l.N.Q+2N.R);I K}}}}1a{H 2p=1;1t=l.1j.1s(0,l.N.Q)+1A+l.1j.1s(l.N.Q+1);o(!l.3S(1t,l.N.Q+1,1h)){l.2V();I K}1a{o(l.5c(1t,l.N.Q+1,1h)){o(1h!=l.4u){o(l.4v(1t,l.N.Q+1,1h)){H 1l=l.2y[1h+1];2p=1+1l.R}1a{H 1l=l.2y[1h+1];1t=l.1j.1s(0,l.N.Q)+1A+1l+l.1j.1s(l.N.Q+1);2p=1+1l.R}}}l.1W(1t);l.N.1V(l.N.Q+2p,l.N.Q+2p);I K}}}1a{1t=l.1j.1s(0,l.N.Q)+1A+l.1j.1s(l.N.Q);H 2p=1;o(!l.3S(1t,l.N.Q+1,1h)&&!l.3S(1t,l.N.Q+1,1h+1)){l.2V();I K}1a{H 1l=l.2y[1h+1];o(1A==1l){o(l.4v(l.1j,l.N.Q,1h)){1t=l.1j;2p=1}}1a{o(l.5c(1t,l.N.Q+1,1h)){o(1h!=l.4u){o(l.4v(1t,l.N.Q+1,1h)){H 1l=l.2y[1h+1];2p=1+1l.R}1a{H 1l=l.2y[1h+1];1t=l.1j.1s(0,l.N.Q)+1A+1l+l.1j.1s(l.N.Q+1);2p=1+1l.R}}}}l.1W(1t);l.N.1V(l.N.Q+2p,l.N.Q+2p);I K}}}I K}};u.G.M.1f.7J=J(e){l.4p();l.1S=e.1S;o(u.1e.2v){o(l.1i.3t){3f.83(l.1i.3t);l.1i.3t=1u}o(e.5k){H 1A=u.G.U.5q(e);o(1A&&\'9p\'.2K(1A.2D())!=-1){H 1k=l;l.1i.3t=3f.9q(J(){1k.84()},1);I 1b}}}o(l.1S!=8&&l.1S!=46&&u.G.U.7c(e)){I 1b}o(l.1S==8||l.1S==46){H 5g=l.2E(l.V.L,l.V.L);o(5g){I 1b}}o(l.2m&&l.1L&&l.1S==46){o(e.5k){l.1W(l.V.L.1s(0,l.N.Q))}1a o(l.N.1N==l.V.L.R||l.N.Q==l.V.L.R-1){I 1b}1a{l.1i.3T=1b}o(u.1e.2F&&u.1e.3V){l.1i.5i=1b}u.G.U.2h(e);I K}o(l.2m&&l.1L&&!e.5k&&l.1S==8){o(l.N.Q==l.V.L.R){H n=l.3m(l.N.Q,-1);l.1W(l.V.L.1s(0,l.V.L.R-(u.1e.2v?0:1)-n.R));o(u.1e.2v){l.N.Q=l.N.Q-1-n.R;l.N.1N=l.N.1N-1-n.R}}1a o(l.N.1N==l.V.L.R){I 1b}1a{l.1i.3T=1b}o(u.1e.2F&&u.1e.3V){l.1i.5i=1b}u.G.U.2h(e);I K}I 1b};u.G.M.1f.80=J(e){o(l.1i.3N){l.4p()}};u.G.M.1f.7S=J(e){l.1i.4k=1b;l.3M();l.4p();l.1i.3N=1b;l.1C(l.1c,l.3j);l.1C(l.1M,l.3j)};u.G.M.1f.7R=J(e){o(l.1i.4k){I}l.3M();o(l.1L&&l.2m){H 1l=l.3m(l.N.Q);l.1W(l.V.L+1l);l.N.1V(l.V.L.R,l.V.L.R)}l.4p();l.1i.3N=1b;l.1C(l.1c,l.3j);l.1C(l.1M,l.3j)};u.G.M.1f.7P=J(e){l.1i.3N=K;l.2X(l.1c,l.3j);l.2X(l.1M,l.3j);l.1i.51=K;H 1z=l.2E(l.V.L,l.V.L);l.1i.51=1b;o(l.1I&u.G.M.5D){l.3d()}H 1k=l;3r(J(){1k.4e()},10);I 1b};u.G.M.1f.7Z=J(){o(!l.1L){I}H 3q=[];H 49=[];H 2W=[];H 1Y=0;H c=\'\',p=\'\';1m(H i=0;i<l.1L.R;i++){c=l.1L.2O(i);o(p==\'\\\\\'){o(/[7Y\\?]/i.1v(c)){49[1Y-1]=c}1a{49[1Y-1]=u.G.M.5l(c)}3q[1Y-1]=c;2W[1Y-1]=1u;p=\'\';7v}49[1Y]=u.G.M.5l(c);o(/[7Y\\?]/i.1v(c)){3q[1Y]=1u;2W[1Y]=c}1a o(c==\'\\\\\'){3q[1Y]=c;2W[1Y]=\'\\\\\'}1a{3q[1Y]=c;2W[1Y]=1u}1Y++;p=c}l.5A=3q;l.5G=49;l.2W=2W;l.5F=3q.R};u.G.M.1f.3m=J(5j,7Q){o(7Q==-1){H n=\'\',m=\'\';5n(5j&&(n=l.3m(--5j))){m=n}I m}H 1d=\'\',c=\'\';1m(H i=5j;i<l.5A.R;i++){c=l.5A[i];o(c){1d+=c}1a{1g}}I 1d};u.G.M.5l=J(3B){H 1d=\'\',1w=\'\';1m(H i=0;i<3B.R;i++){1w=3B.2O(i);3u(1w){19\'0\':1d+=\'\\\\d\';1g;19\'A\':1d+=\'[A-Z]\';1g;19\'a\':1d+=\'[a-z]\';1g;19\'B\':19\'b\':1d+=\'[a-7V-Z]\';1g;19\'x\':1d+=\'[0-9a-z]\';1g;19\'X\':1d+=\'[0-9A-Z]\';1g;19\'Y\':19\'y\':1d+=\'[0-9a-7V-Z]\';1g;19\'?\':1d+=\'.\';1g;19\'1\':19\'2\':19\'3\':19\'4\':19\'5\':19\'6\':19\'7\':19\'8\':19\'9\':1d+=1w;1g;19\'c\':19\'C\':19\'e\':19\'E\':19\'f\':19\'F\':19\'r\':19\'d\':19\'D\':19\'n\':19\'s\':19\'S\':19\'w\':19\'W\':19\'t\':19\'v\':1d+=1w;1g;7O:1d+=\'\\\\\'+1w}}I 1d};u.G.M.1f.81=J(85){H 1d=\'^\';H 1N=9t.9u(l.5G.R,85);1m(H i=0;i<1N;i++){1d+=l.5G[i]}1d+=\'$\';1d=2n 3o(1d,"");I 1d};u.G.M.1f.6i=J(){H 4x=[l.4L,l.4F,l.4I,l.4J,l.4G,l.4P,l.4E];1m(H i=0;i<4x.R;i++){l.2X(l.1c,4x[i]);l.2X(l.1M,4x[i])}};u.G.M.1f.50=J(){l.3M();l.1j=l.V.9k;l.6i();o(u.1e.24){l.V.74=1b;l.V.86("74")}H 1k=l;3r(J(){1k.4e()},10)};u.G.M.1f.3d=J(){l.6i();o(l.1I&u.G.M.6m){l.3M();l.2E(l.V.L,l.V.L);o(!l.1i.3N){H 1k=l;3r(J(){1k.4e()},10)}}o(l.4o&&l.1n&u.G.M.6e){l.1C(l.1c,l.4L);l.1C(l.1M,l.4L);I K}o(l.1n&u.G.M.3n){l.1C(l.1c,l.4F);l.1C(l.1M,l.4F);I K}o(l.1n&u.G.M.6b){l.1C(l.1c,l.4I);l.1C(l.1M,l.4I);I K}o(l.1n&u.G.M.68){l.1C(l.1c,l.4J);l.1C(l.1M,l.4J);I K}o(l.1n&u.G.M.5I){l.1C(l.1c,l.4G);l.1C(l.1M,l.4G);I K}o(l.1n&u.G.M.6g){l.1C(l.1c,l.4P);l.1C(l.1M,l.4P);I K}l.1C(l.1c,l.4E);l.1C(l.1M,l.4E);I 1b};u.G.M.1f.1C=J(1R,1T){o(!1R||!1T||(1R.1T&&1R.1T.82(2n 3o("\\\\b"+1T+"\\\\b"))!=-1))I;1R.1T+=(1R.1T?" ":"")+1T};u.G.M.1f.2X=J(1R,1T){o(!1R||!1T||(1R.1T&&1R.1T.82(2n 3o("\\\\b"+1T+"\\\\b"))==-1))I;1R.1T=1R.1T.2u(2n 3o("\\\\s*\\\\b"+1T+"\\\\b","g"),"")};u.G.M.1f.67=J(7M){99(\'u.G.96 94: \'+7M)};u.G.2U=J(1c){l.1c=1c;l.3v()};u.G.2U.1f.3v=J(){o(u.1e.24&&u.1e.2M){H 5f=l.1c.47.N;o(l.1c.1Z=="7m"){o(5f.1G!=\'95\'){1E{H 1o=5f.53()}1F(1K){I}o(1o.9b()==l.1c){H 2Z=l.1c.47.7j.56();2Z.7i(l.1c);1m(H 5S=0;2Z.4X(\'63\',1o)<0;5S++){2Z.4c(\'1w\',1)}l.Q=5S;2Z=l.1c.47.7j.56();2Z.7i(l.1c);1m(H 5J=0;2Z.4X(\'9c\',1o)<0;5J++){2Z.4c(\'1w\',1)}l.1N=5J;l.R=l.1N-l.Q;l.3p=1o.3p}}}1a o(l.1c.1Z=="4U"){1E{l.1o=5f.53()}1F(1K){I}l.R=l.1o.3p.R;H 43=l.1o.7h();l.Q=-43.4c("1w",-5Z);43=l.1o.7h();43.5X(K);l.1N=-43.4c("1w",-5Z);l.3p=l.1o.3p}}1a{H 5L=l.1c;H 2k=0;H 2j=0;1E{2k=5L.2k}1F(1K){}1E{2j=5L.2j}1F(1K){}o(u.1e.2a){o(2k==7l){2k=0}o(2j==7l){2j=0}}l.Q=2k;l.1N=2j;l.R=2j-2k;l.3p=l.1c.L.1s(2k,2j)}};u.G.2U.1f.2t=J(){1E{3s l.1o}1F(1K){}1E{3s l.1c}1F(1K){}};u.G.2U.1f.4S=J(4Z){o(u.1e.24&&u.1e.2M){l.1o.4S("1w",4Z);l.1o.52()}1a{1E{l.1c.2k++}1F(1K){}}l.3v()};u.G.2U.1f.1V=J(Q,1N){o(u.1e.24&&u.1e.2M){o(l.1c.1Z=="7m"){H 4b=l.1c.56();l.1o=l.1c.56();l.1o.4S("1w",Q);l.1o.4Y("1w",1N-Q);H 7p=l.1o.4X("63",4b);o(7p<0){l.1o.7n("63",4b)}H 7o=l.1o.4X("7g",4b);o(7o>0){l.1o.7n("7g",4b)}}1a o(l.1c.1Z=="4U"){l.1o=l.1c.47.N.53();l.1o.4S("1w",-5Z);l.Q=l.1o.4c("1w",Q);l.1N=l.Q+l.1o.4Y("1w",1N-Q)}l.1o.52()}1a{l.Q=Q;1E{l.1c.2k=Q}1F(1K){}l.1N=1N;1E{l.1c.2j=1N}1F(1K){}}l.9h=1b;l.3v()};u.G.2U.1f.4Y=J(4Z){o(u.1e.24&&u.1e.2M){l.1o.4Y("1w",4Z);l.1o.52()}1a{1E{l.1c.2j++}1F(1K){}}l.3v()};u.G.2U.1f.5X=J(5Y){o(u.1e.24&&u.1e.2M){l.1o=l.1c.47.N.53();l.1o.5X(5Y);l.1o.52()}1a{o(5Y){1E{l.1c.2j=l.1c.2k}1F(1K){}}1a{1E{l.1c.2k=l.1c.2j}1F(1K){}}}l.3v()};o(!u.G.1r)u.G.1r={};o(!u.G.1r.2g)u.G.1r.2g=[];o(!u.G.1r.3d){u.G.1r.3d=J(4W){H 57=1b;H 5V=1b;H q=u.G.1r.2g;H 3e=q.R;1m(H i=0;i<3e;i++){o(!q[i].25()&&q[i].1P==4W){5V=q[i].3d();57=5V&&57}}I 57}};o(!u.G.1r.60){u.G.1r.60=J(e,1P){o(u.G.1r.3d(1P)==K){I K}I 1b}};o(!u.G.1r.65){u.G.1r.65=J(e,4W){H q=u.G.1r.2g;H 3e=q.R;1m(H i=0;i<3e;i++){o(!q[i].25()&&q[i].1P==4W&&1X(q[i].50)==\'J\'){q[i].50()}}I 1b}};o(!u.G.1r.2t){u.G.1r.2t=J(1P){H q=u.G.1r.2g;1m(H i=0;i<u.G.1r.2g.R;i++){o(q[i].1P==1P&&1X(q[i].2t)==\'J\'){q[i].2t();i--}}}};o(!u.G.1r.5M){u.G.1r.5M=J(){H q=u.G.1r.2g;1m(H i=0;i<u.G.1r.2g.R;i++){o(1X(q[i].2t)==\'J\'){q[i].2t();i--}}}};o(!u.G.U)u.G.U={};u.G.U.1B={2L:36,4f:1,5m:26,7e:38,7a:9i,7r:72,7q:9f,7F:9B,6f:2<<26-1};u.G.U.5P=J(d){I 2R.2T(d+22+75*(d<26))};u.G.U.7L=J(1O,7b,76){1O=76?1O/l.1B.7a:1O>>1;1O+=1O/7b;1m(H k=0;1O>((l.1B.2L-l.1B.4f)*l.1B.5m)/2;k+=l.1B.2L){1O/=l.1B.2L-l.1B.4f}I k+(l.1B.2L-l.1B.4f+1)*1O/(1O+l.1B.7e)};u.G.U.7d=J(V,5T){H 6c=V.6a("");V=[];1m(H i=0;i<6c.R;i++){V.2e(6c[i].9Y(0))}H 3K=\'\';H h,b,j,m,q,k,t;H 4h=V.R;H n=l.1B.7q;H 1O=0;H 4d=l.1B.7r;H 2P=0;1m(j=0;j<4h;j++){o(V[j]<7G){o(5T-2P<2){I K}3K+=2R.2T(V[j]);2P++}}h=b=2P;o(b>0){3K+=2R.2T(l.1B.7F);2P++}5n(h<4h){1m(m=l.1B.6f,j=0;j<4h;j++){o(V[j]>=n&&V[j]<m){m=V[j]}}o(m-n>(l.1B.6f-1O)/(h+1)){I K}1O+=(m-n)*(h+1);n=m;1m(j=0;j<4h;j++){o(V[j]<n){o(++1O==0){I K}}o(V[j]==n){1m(q=1O,k=l.1B.2L;1b;k+=l.1B.2L){o(2P>=5T){I K}t=k<=4d?l.1B.4f:k>=4d+l.1B.5m?l.1B.5m:k-4d;o(q<t){1g}3K+=l.5P(t+(q-t)%(l.1B.2L-t));2P++;q=(q-t)/(l.1B.2L-t)}3K+=l.5P(q);2P++;4d=l.7L(1O,h+1,h==b);1O=0;h++}}1O++,n++}I 3K};u.G.U.3Z=J(7u,48,7B){o(!48)I;1m(H 4R 7C 48){o(7B&&48[4R]==3A)7v;7u[4R]=48[4R]}};u.G.U.1x=J(){H 1d=1u;1m(H i=0;i<u.G.U.1x.62.R;i++){o(1X(u.G.U.1x.62[i])!=\'3A\'){1d=u.G.U.1x.62[i];1g}}I 1d};u.G.U.3H=",8,9,16,17,18,20,27,33,34,35,36,37,38,40,45,8l,8k,7t,";u.G.U.7H="7t,8j,8q,8p,8e,8c,8f,8d,8h,8g,";u.G.U.7E="39,46,91,92,93,";u.G.U.3H+=u.G.U.7H;o(!u.1e.2a){u.G.U.3H+=u.G.U.7E}u.G.U.7c=J(21){I u.G.U.3H.2K(","+21.1S+",")!=-1};u.G.U.5q=J(e){H 5o=e.1G=="78";H 2b=1u;H 1w=1u;o(u.1e.2F&&!5o){o(e.7f){1w=2R.2T(e.7f)}1a{2b=e.1S}}1a{2b=e.1S||e.5t;o(2b!=13){1w=2R.2T(2b)}}o(u.1e.2a){o(5o){2b=e.1S||e.5t;1w=2R.2T(2b)}1a{2b=e.1S||e.5t;o(u.G.U.3H.2K(","+2b+",")!=-1){1w=1u}1a{1w=2R.2T(2b)}}}o(u.1e.2v){o(u.G.U.3H.2K(","+2b+",")!=-1){1w=1u}1a{1w=2R.2T(2b)}}I 1w};u.G.U.7N=J(2o,1Z){H 5y=2o.8I(1Z);o(5y){I 5y[0]}I 1u};u.G.U.7k=J(2o,1Z){5n(2o.3b&&2o.3b.1Z.2D()!=1Z.2D()&&2o.3b.1Z!=\'8C\'){2o=2o.3b}o(2o.3b&&2o.3b.1Z.2D()==1Z.2D()){I 2o.3b}1a{I 1u}};u.G.U.8K=J(4a){o(1X 4a==\'3B\'){4a=5h.7T(4a)}H q=u.G.1r.2g;1m(H i=0;i<u.G.1r.2g.R;i++){o(1X(q[i].2t)==\'J\'&&u.G.U.55(4a,q[i].1c)){q[i].2t();i--}}};u.G.U.55=J(3D,4s){o(1X 3D.55==\'8X\'){I 4s&&3D&&(3D==4s||3D.55(4s))}1a{H 4g=4s;5n(4g){o(4g==3D){I 1b}4g=4g.3b}I K}};u.G.U.2A=J(1c,3O,2q,3X){1E{o(1c.2A)1c.2A(3O,2q,3X);1a o(1c.5a)1c.5a("7W"+3O,2q,3X)}1F(e){}};u.G.U.54=J(1c,3O,2q,3X){1E{o(1c.54)1c.54(3O,2q,3X);1a o(1c.7X)1c.7X("7W"+3O,2q,3X)}1F(e){}};u.G.U.2h=J(21){1E{l.5e(21);l.5d(21)}1F(e){}};u.G.U.5e=J(21){o(21.5e){21.5e()}1a{21.8n=1b}};u.G.U.5d=J(21){o(21.5d){21.5d()}1a{21.8o=K}};',62,625,'|||||||||||||||||||||this|||if||||||Spry||||||||||||Widget|var|return|function|false|value|ValidationTextField|selection|options||start|length|||Utils|input||||||||||||||case|else|true|element|ret|is|prototype|break|group|flags|oldValue|self|autocomplete|for|errors|range|format|f0|Form|substring|futureValue|null|test|character|firstValid|validation|mustRevert|pressed|punycode_constants|addClassName|event_handlers|try|catch|type|formatGroups|validateOn|match|err|pattern|additionalError|end|delta|form|characterMasking|ele|keyCode|className|regExp|moveTo|setValue|typeof|idx|nodeName||ev|||ie|isDisabled|||||safari|code|testValue|continueValidations|push|valueGroups|onSubmitWidgetQueue|stopEvent|parseInt|selectionEnd|selectionStart|fixedValue|useCharacterMasking|new|node|movePosition|handler|validationDescriptor|event|destroy|replace|opera|pos|ua|dateAutocompleteCharacters|toString|addEventListener|z0|groupPatterns|toLowerCase|doValidations|mozilla|ipv4|digits|regExpFilter|address|indexOf|base|windows|insertedValue|charAt|out|host|String|gi|fromCharCode|SelectionDescriptor|redTextFlash|patternCharacters|removeClassName|minValue|range_all|||||||||||pieces|parentNode|test_value|validate|qlen|window|maxValue|autocompleteCharacters|parseFloat|focusClass|dateValidationPatternString|fullGroupPatterns|getAutoComplete|ERROR_FORMAT|RegExp|text|compiled|setTimeout|delete|operaPasteOperation|switch|update|digit|validAddresses|ValidationDescriptors|isNaN|undefined|string|onChange|who|maxDay|date|tIndex|specialCharacters|revertValue|formats|output|locked|removeHint|active|eventType|theYear|maxChars|formatRegExp|isValueValid|operaRevertOnKeyUp|mdy|mac|allowNegative|capture|theMonth|setOptions||version|punyencoded|clone|minChars|||ownerDocument|optionsObj|regexps|container|ta_range|moveStart|bias|putHint|tmin|el|input_len|theHour|the|drop|theT|mm|hintClass|isRequired|saveState|toUpperCase|hourIndex|what|theMinute|lastDateGroup|nextDateDelimiterExists|theSecond|classes|hintOn|_|valueRegExp|validateIP|ONCHANGE|theDay|validClass|invalidFormatClass|invalidCharsMinClass|monthIndex|invalidRangeMinClass|invalidRangeMaxClass|dayIndex|requiredClass|parts|yearIndex|ipv6_ipv4|invalidCharsMaxClass|prefLenVal|optionName|move|currentPatternChar|INPUT|hint|vform|compareEndPoints|moveEnd|amount|reset|restoreSelection|select|createRange|removeEventListener|contains|createTextRange|isValid|secondIndex||attachEvent|minuteIndex|isPositionAtEndOfGroup|preventDefault|stopPropagation|sel|mr|document|skp|from|ctrlKey|regExpFromChars|tmax|while|keyDown|dd|getCharacterFromEvent|URI_spliter|isDateGroupFull|which|dateGroupPatterns|0000|dA|getRegExpForGroup|elements|getRegExpForFullGroup|autoCompleteCharacters|sum|000|ONBLUR|navigator|patternLength|compiledPattern|yy|ERROR_CHARS_MIN|sel_end|readOnly|tmp|destroyAll|newValue|typedValue|punycode_encode_digit|linux|addLoadListener|sel_start|max_out|AM|isElementValid|textfieldFlashTextClass|collapse|begin|10000|onSubmit|valid|arguments|StartToStart||onReset|attachBehaviors|showError|ERROR_RANGE_MAX|loadQueue|split|ERROR_RANGE_MIN|inputc|concat|ERROR_REQUIRED|maxint|ERROR_CHARS_MAX|piece|resetClasses|parameter|onloadDidFire|getElement|ONSUBMIT|prefLen|attachedSubmitHandler|changeEvent|srcElement|change|ALL|Date|processLoadQueue|load|attachedResetHandler|focus|getDateGroup|currentTarget|onKeyPress|onKeyUp|onsubmit|isBrowserSupported|init|phone_us|phone_number|dateValidationPattern|validIPv4Addresses|ipv6|compileDatePattern|validIPv6Addresses|join|yyyy|currency|dateFullGroupPatterns|currentRegExp|TT|100|ip|characterMaskingFormats|HH|time|comma_dot|revertState|zip_code|zip_us5|00000||blur|forceFireFirstOnPropertyChange||firsttime|submit|keydown|none|damp|numpoints|isSpecialKey|punycode_encode|skew|charCode|EndToEnd|duplicate|moveToElementText|body|getFirstParentWithNodeName|2147483647|TEXTAREA|setEndPoint|c2|c1|initial_n|initial_bias|re_safari|63232|obj|continue|BrowserSniff|Platform|re_gecko|re_gecko_version|unix|ignoreUndefinedProps|in|second|specialNotSafariCharacters|delimiter|128|specialSafariNavKeys|re_opera|onKeyDown|re_msie|punycode_adapt|msg|getFirstChildWithNodeNameAtAnyLevel|default|onBlur|direction|onFocus|onDrop|getElementById|rx|zA|on|detachEvent|0ABXY|compilePattern|onMouseDown|patternToRegExp|search|clearInterval|operaPasteMonitor|len|removeAttribute|appName|textfieldMinValueState|textfieldInvalidFormatState|255|VISA|63273|63276|63272|63275|63289|63277|credit_card|63233|192|144|textfieldValidState|cancelBubble|returnValue|63235|63234|textfieldRequiredState|textfieldFocusState|textfieldHintState|2000|url|zip_uk|textfieldMaxValueState|pm|userAgent|xn|zip_canada|BODY|00|phone_custom|zip_custom|0A0|A0A|getElementsByTagName|Opera|destroyWidgets|AMEX|DISCOVER|social_security_number|MASTERCARD|gecko|MSIE|6011|DINERSCLUB|https|zip_us9|platform|up|object|ftp|applewebkit|splice||||ERR|None|TextField|propertyName|real|alert||parentElement|StartToEnd|textfieldMinCharsState|custom|0x80|integer|ignore|700|eE|defaultValue|tt|ss|metaKey|ax|vx|setInterval|hh|PM|Math|min|dot_comma|email|hmst|400|unload||0x2D|should|constructor|be|are|Unknown|third|hms|The|textfieldFlashText|textfieldMaxCharsState|lastKeyPressedTimeStamp|rv|unknown|maxLength|eval|as|received|propertychange|dragdrop|FORM|onload|disabled|charCodeAt|setAttribute|mousedown|off|keypress|keyup|AutoComplete'.split('|'),0,{}))

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8 5;7(!5)5={};7(!5.6)5.6={};5.6.a=9(c,1J){3.1P(c);5.6.t.1X(3,1J);8 r=[\'1A\'].2s(3.r||[]);r=r.2y(",");3.r=0|(r.1F(\'1A\')!=-1?5.6.a.1V:0);3.r=3.r|(r.1F(\'1W\')!=-1?5.6.a.1o:0);3.r=3.r|(r.1F(\'2w\')!=-1?5.6.a.1y:0);7(!1I(3.K)){3.K=(3.K>0)?1M(3.K,10):z}7(!1I(3.P)){3.P=(3.P>0)?1M(3.P,10):z}7(3.v)3.v=3.1D(3.v);7(5.6.a.1G)3.1r();I 5.6.a.1B.R(3)};5.6.a.1y=1;5.6.a.1o=2;5.6.a.1V=4;5.6.a.w.1P=9(c){3.c=3.1D(c);3.h=z;3.v=k;3.j=z;3.u=[];3.1n=k;3.13="2e";3.15="2d";3.14="2b";3.Y="2k";3.16="2i";3.20=x;3.K=z;3.P=z;3.r=["1A"]};5.6.a.w.F=9(){7(3.u)o(8 i=0;i<3.u.p;i++){5.6.t.1e(3.u[i][0],3.u[i][1],3.u[i][2],k)}N{X 3.c}O(12){}7(3.h)o(8 i=0;i<3.h.p;i++){N{X 3.h[i]}O(12){}}N{X 3.h}O(12){}N{X 3.j}O(12){}N{X 3.u}O(12){}8 q=5.6.f.y;8 m=q.p;o(8 i=0;i<m;i++){7(q[i]==3){q.2h(i,1);25}}};5.6.a.1G=k;5.6.a.1B=[];5.6.a.w.1D=9(l){7(l&&E l=="27")d 1f.26(l);d l};5.6.a.1R=9(C){5.6.a.1G=x;8 q=5.6.a.1B;8 m=q.p;o(8 i=0;i<m;i++)q[i].1r()};5.6.a.1z=9(C){7(E Z.D!=\'1h\')Z.D(\'1S\',C,k);I 7(E 1f.D!=\'1h\')1f.D(\'1S\',C,k);I 7(E Z.1j!=\'1h\')Z.1j(\'2f\',C)};5.6.a.1z(5.6.a.1R);5.6.a.1z(9(){5.6.t.D(Z,"2l",5.6.f.1t,k)});5.6.a.w.1r=9(){7(!3.c)d;7(3.c.M=="1Q"){3.h=[3.c]}I{3.h=3.1Y()}7(3.h){8 1g=3;3.u=[];8 m=3.h.p;o(8 i=0;i<m;i++){3.u.R([3.h[i],"2t",9(e){d 1g.1Z(e)}]);3.u.R([3.h[i],"1W",9(e){d 1g.22(e)}]);7(3.r&5.6.a.1y){3.u.R([3.h[i],"2x",9(e){d 1g.24(e)}])}}o(8 i=0;i<3.u.p;i++){5.6.t.D(3.u[i][0],3.u[i][1],3.u[i][2],k)}3.j=5.6.t.23(3.c,"2r");7(3.j){7(!3.j.1O&&!3.j.1H){3.j.1H=9(e){e=e||1N;d 5.6.f.1x(e,e.J||e.1L)};3.j.1O=x}7(!3.j.1K){5.6.t.D(3.j,"W",9(e){e=e||1N;d 5.6.f.1u(e,e.J||e.1L)},k);3.j.1K=x}5.6.f.y.R(3)}}};5.6.a.w.1Y=9(){8 1k;8 11=3.c.2p("1Q");7(11.p){1k=[];8 m=11.p;o(8 i=0;i<m;i++){7(11[i].2c=="2q"){1k.R(11[i])}}d 1k}d z};5.6.a.w.B=9(l,n){7(!l||!n||(l.n&&l.n.2a(1v 1w("\\\\b"+n+"\\\\b"))!=-1))d;l.n+=(l.n?" ":"")+n};5.6.a.w.A=9(l,n){7(!l||!n||(l.n&&l.n.2a(1v 1w("\\\\b"+n+"\\\\b"))==-1))d;l.n=l.n.2n(1v 1w("\\\\s*\\\\b"+n+"\\\\b","g"),"")};5.6.a.w.1Z=9(e){8 Q=(e.J!=z)?e.J:e.1p;7(Q.V)d;3.1n=x;3.B(3.c,3.Y);3.B(3.v,3.Y)};5.6.a.w.22=9(e){8 Q=(e.J!=z)?e.J:e.1p;7(Q.V)d;3.1n=k;8 1q=k;7(3.r&5.6.a.1o)1q=x;7(1q)3.L();3.A(3.c,3.Y);3.A(3.v,3.Y)};5.6.a.w.24=9(e){8 Q=(e.J!=z)?e.J:e.1p;7(Q.V)d;3.L()};5.6.a.w.W=9(){3.A(3.c,3.16);3.A(3.c,3.13);3.A(3.c,3.15);3.A(3.c,3.14);3.A(3.v,3.16);3.A(3.v,3.13);3.A(3.v,3.15);3.A(3.v,3.14)};5.6.a.w.L=9(){3.W();8 17=0;7(3.h){8 m=3.h.p;o(8 i=0;i<m;i++){7(!3.h[i].V&&3.h[i].2g){17++}}}7(3.20){7(17==0){3.B(3.c,3.13);3.B(3.v,3.13);d k}}7(3.K){7(3.K>17){3.B(3.c,3.15);3.B(3.v,3.15);d k}}7(3.P){7(3.P<17){3.B(3.c,3.14);3.B(3.v,3.14);d k}}3.B(3.c,3.16);3.B(3.v,3.16);d x};5.6.a.w.1s=9(){8 1C=x;7(3.h){8 m=3.h.p;o(8 i=0;i<m;i++){7(!3.h[i].V){1C=k;25}}}d 1C};7(!5.6.f)5.6.f={};7(!5.6.f.y)5.6.f.y=[];7(!5.6.f.L){5.6.f.L=9(1l){8 1m=x;8 1E=x;8 q=5.6.f.y;8 m=q.p;o(8 i=0;i<m;i++){7(!q[i].1s()&&q[i].j==1l){1E=q[i].L();1m=1E&&1m}}d 1m}};7(!5.6.f.1x){5.6.f.1x=9(e,j){7(5.6.f.L(j)==k){d k}d x}};7(!5.6.f.1u){5.6.f.1u=9(e,1l){8 q=5.6.f.y;8 m=q.p;o(8 i=0;i<m;i++){7(!q[i].1s()&&q[i].j==1l&&E(q[i].W)==\'9\'){q[i].W()}}d x}};7(!5.6.f.F){5.6.f.F=9(j){8 q=5.6.f.y;o(8 i=0;i<5.6.f.y.p;i++){7(q[i].j==j&&E(q[i].F)==\'9\'){q[i].F();i--}}}};7(!5.6.f.1t){5.6.f.1t=9(){8 q=5.6.f.y;o(8 i=0;i<5.6.f.y.p;i++){7(E(q[i].F)==\'9\'){q[i].F();i--}}}};7(!5.6.t)5.6.t={};5.6.t.1X=9(29,19,21){7(!19)d;o(8 1d 2m 19){7(21&&19[1d]==1h)2o;29[1d]=19[1d]}};5.6.t.23=9(G,M){28(G.H&&G.H.M.1c()!=M.1c()&&G.H.M!=\'2u\'){G=G.H}7(G.H&&G.H.M.1c()==M.1c()){d G.H}I{d z}};5.6.t.2j=9(18){7(E 18==\'27\'){18=1f.26(18)}8 q=5.6.f.y;o(8 i=0;i<5.6.f.y.p;i++){7(E(q[i].F)==\'9\'&&5.6.t.1i(18,q[i].c)){q[i].F();i--}}};5.6.t.1i=9(S,1b){7(E S.1i==\'2v\'){d 1b&&S&&(S==1b||S.1i(1b))}I{8 1a=1b;28(1a){7(1a==S){d x}1a=1a.H}d k}};5.6.t.D=9(c,T,C,U){N{7(c.D)c.D(T,C,U);I 7(c.1j)c.1j("1U"+T,C,U)}O(e){}};5.6.t.1e=9(c,T,C,U){N{7(c.1e)c.1e(T,C,U);I 7(c.1T)c.1T("1U"+T,C,U)}O(e){}};',62,159,'|||this||Spry|Widget|if|var|function|ValidationCheckbox||element|return||Form||checkboxElements||form|false|ele|qlen|className|for|length||validateOn||Utils|event_handlers|additionalError|prototype|true|onSubmitWidgetQueue|null|removeClassName|addClassName|handler|addEventListener|typeof|destroy|node|parentNode|else|srcElement|minSelections|validate|nodeName|try|catch|maxSelections|eventCheckbox|push|who|eventType|capture|disabled|reset|delete|focusClass|window||elements|err|requiredClass|maxSelectionsClass|minSelectionsClass|validClass|nochecked|container|optionsObj|el|what|toLowerCase|optionName|removeEventListener|document|self|undefined|contains|attachEvent|arrCheckboxes|vform|isValid|hasFocus|ONBLUR|target|doValidation|attachBehaviors|isDisabled|destroyAll|onReset|new|RegExp|onSubmit|ONCHANGE|addLoadListener|submit|loadQueue|ret|getElement|isElementValid|indexOf|onloadDidFire|onsubmit|isNaN|opts|attachedResetHandler|currentTarget|parseInt|event|attachedSubmitHandler|init|INPUT|processLoadQueue|load|detachEvent|on|ONSUBMIT|blur|setOptions|getCheckboxes|onFocus|isRequired|ignoreUndefinedProps|onBlur|getFirstParentWithNodeName|onClick|break|getElementById|string|while|obj|search|checkboxMaxSelectionsState|type|checkboxMinSelectionsState|checkboxRequiredState|onload|checked|splice|checkboxValidState|destroyWidgets|checkboxFocusState|unload|in|replace|continue|getElementsByTagName|checkbox|FORM|concat|focus|BODY|object|change|click|join'.split('|'),0,{}))

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('h 5;8(!5)5={};8(!5.7)5.7={};5.7.c=9(f,1T){3.1U(f);5.7.o.25(3,1T);h u=[\'1q\'].2l(3.u||[]);u=u.2m(",");3.u=0|(u.1r(\'1q\')!=-1?5.7.c.1R:0);3.u=3.u|(u.1r(\'1H\')!=-1?5.7.c.1u:0);3.u=3.u|(u.1r(\'1M\')!=-1?5.7.c.1y:0);8(3.w)3.w=3.1p(3.w);8(5.7.c.1n)3.1m();L 5.7.c.1o.Q(3)};5.7.c.1y=1;5.7.c.1u=2;5.7.c.1R=4;5.7.c.x.1U=9(f){3.f=3.1p(f);3.w=l;3.k=W;3.m=W;3.r=[];3.z="2i";3.Z="2h";3.14="2j";3.11="2k";3.1I="";3.1A=W;3.26=p;3.u=["1q"];3.1f=l};5.7.c.x.J=9(){8(3.r)E(h i=0;i<3.r.A;i++){5.7.o.1c(3.r[i][0],3.r[i][1],3.r[i][2],l)}T{1a 3.f}V(1d){}T{1a 3.k}V(1d){}T{1a 3.m}V(1d){}T{1a 3.r}V(1d){}h q=5.7.j.y;h K=q.A;E(h i=0;i<K;i++){8(q[i]==3){q.2b(i,1);2c}}};5.7.c.1n=l;5.7.c.1o=[];5.7.c.x.1p=9(n){8(n&&F n=="1N")a 1e.1Z(n);a n};5.7.c.1W=9(C){5.7.c.1n=p;h q=5.7.c.1o;h K=q.A;E(h i=0;i<K;i++)q[i].1m()};5.7.c.1s=9(C){8(F 16.D!=\'1g\')16.D(\'1Q\',C,l);L 8(F 1e.D!=\'1g\')1e.D(\'1Q\',C,l);L 8(F 16.1j!=\'1g\')16.1j(\'2e\',C)};5.7.c.1s(5.7.c.1W);5.7.c.1s(9(){5.7.o.D(16,"2d",5.7.j.1C,l)});5.7.c.x.1m=9(){8(3.f.I=="1J"){3.k=3.f}L{3.k=5.7.o.1O(3.f,"1J")}8(3.k){h G=3;3.r=[];h 1t="2z";h 15=2y.2x.2A(/2w (\\d+)\\./i);8(15){15=2o(15[1],10);8(15>=6){1t="2t"}}3.r.Q([3.k,1t,9(e){8(G.O())a p;a G.24(e)}]);3.r.Q([3.k,"1H",9(e){8(G.O())a p;a G.23(e)}]);8(3.u&5.7.c.1y){3.r.Q([3.k,"1M",9(e){8(G.O())a p;a G.1z(e)}]);3.r.Q([3.k,"2p",9(e){8(G.O())a p;a G.1z(e)}])}E(h i=0;i<3.r.A;i++){5.7.o.D(3.r[i][0],3.r[i][1],3.r[i][2],l)}3.m=5.7.o.20(3.k,"2B");8(3.m){8(!3.m.1P&&!3.m.1L){3.m.1L=9(e){e=e||1K;a 5.7.j.1E(e,e.1X||e.22)};3.m.1P=p}8(!3.m.29){5.7.o.D(3.m,"12",9(e){e=e||1K;a 5.7.j.1B(e,e.1X||e.22)},l);3.m.29=p}5.7.j.y.Q(3)}}};5.7.c.x.v=9(n,t){8(!n||!t||(n.t&&n.t.2a(1x 1w("\\\\b"+t+"\\\\b"))!=-1))a;n.t+=(n.t?" ":"")+t};5.7.c.x.H=9(n,t){8(!n||!t||(n.t&&n.t.2a(1x 1w("\\\\b"+t+"\\\\b"))==-1))a;n.t=n.t.2u(1x 1w("\\\\s*\\\\b"+t+"\\\\b","g"),"")};5.7.c.x.24=9(e){3.1l=p;3.1f=l;3.v(3.f,3.14);3.v(3.w,3.14)};5.7.c.x.23=9(e){3.1l=l;h 1v=l;8(3.u&5.7.c.1u)1v=p;8(1v&&!3.1f)3.N();3.H(3.f,3.14);3.H(3.w,3.14)};5.7.c.x.1z=9(e){3.1l=l;3.N();3.1f=p};5.7.c.x.12=9(){3.H(3.f,3.z);3.H(3.f,3.Z);3.H(3.f,3.11);3.H(3.w,3.z);3.H(3.w,3.Z);3.H(3.w,3.11)};5.7.c.x.N=9(){3.12();8(3.26){8(3.k.R.A==0||3.k.X==-1){3.v(3.f,3.z);3.v(3.w,3.z);a l}8(3.k.R[3.k.X].2g("1G")==W){3.v(3.f,3.z);3.v(3.w,3.z);a l}8(3.k.R[3.k.X].1G==3.1I){3.v(3.f,3.z);3.v(3.w,3.z);a l}8(3.k.R[3.k.X].21){3.v(3.f,3.z);3.v(3.w,3.z);a l}}8(3.1A){8(3.k.R.A>0&&3.k.X!=-1&&3.k.R[3.k.X].1G==3.1A){3.v(3.f,3.Z);3.v(3.w,3.Z);a l}}3.v(3.f,3.11);3.v(3.w,3.11);a p};5.7.c.x.O=9(){a 3.k.21};8(!5.7.j)5.7.j={};8(!5.7.j.y)5.7.j.y=[];8(!5.7.j.N){5.7.j.N=9(19){h 1b=p;h 1F=p;h q=5.7.j.y;h K=q.A;E(h i=0;i<K;i++){8(!q[i].O()&&q[i].m==19){1F=q[i].N();1b=1F&&1b}}a 1b}};8(!5.7.j.1E){5.7.j.1E=9(e,m){8(5.7.j.N(m)==l){a l}a p}};8(!5.7.j.1B){5.7.j.1B=9(e,19){h q=5.7.j.y;h K=q.A;E(h i=0;i<K;i++){8(!q[i].O()&&q[i].m==19&&F(q[i].12)==\'9\'){q[i].12()}}a p}};8(!5.7.j.J){5.7.j.J=9(m){h q=5.7.j.y;E(h i=0;i<5.7.j.y.A;i++){8(q[i].m==m&&F(q[i].J)==\'9\'){q[i].J();i--}}}};8(!5.7.j.1C){5.7.j.1C=9(){h q=5.7.j.y;E(h i=0;i<5.7.j.y.A;i++){8(F(q[i].J)==\'9\'){q[i].J();i--}}}};8(!5.7.o)5.7.o={};5.7.o.25=9(28,Y,27){8(!Y)a;E(h 1i 2s Y){8(27&&Y[1i]==1g)2r;28[1i]=Y[1i]}};5.7.o.1O=9(B,I){h 1D=B.2v(I);8(1D){a 1D[0]}a W};5.7.o.20=9(B,I){1Y(B.M&&B.M.I.1k()!=I.1k()&&B.M.I!=\'2q\'){B=B.M}8(B.M&&B.M.I.1k()==I.1k()){a B.M}L{a W}};5.7.o.2n=9(13){8(F 13==\'1N\'){13=1e.1Z(13)}h q=5.7.j.y;E(h i=0;i<5.7.j.y.A;i++){8(F(q[i].J)==\'9\'&&5.7.o.1h(13,q[i].f)){q[i].J();i--}}};5.7.o.1h=9(U,18){8(F U.1h==\'2f\'){a 18&&U&&(U==18||U.1h(18))}L{h 17=18;1Y(17){8(17==U){a p}17=17.M}a l}};5.7.o.D=9(f,P,C,S){T{8(f.D)f.D(P,C,S);L 8(f.1j)f.1j("1S"+P,C,S)}V(e){}};5.7.o.1c=9(f,P,C,S){T{8(f.1c)f.1c(P,C,S);L 8(f.1V)f.1V("1S"+P,C,S)}V(e){}};',62,162,'|||this||Spry||Widget|if|function|return||ValidationSelect|||element||var||Form|selectElement|false|form|ele|Utils|true||event_handlers||className|validateOn|addClassName|additionalError|prototype|onSubmitWidgetQueue|requiredClass|length|node|handler|addEventListener|for|typeof|self|removeClassName|nodeName|destroy|qlen|else|parentNode|validate|isDisabled|eventType|push|options|capture|try|who|catch|null|selectedIndex|optionsObj|invalidClass||validClass|reset|container|focusClass|ua|window|el|what|vform|delete|isValid|removeEventListener|err|document|validatedByOnChangeEvent|undefined|contains|optionName|attachEvent|toLowerCase|hasFocus|attachBehaviors|onloadDidFire|loadQueue|getElement|submit|indexOf|addLoadListener|focusEventName|ONBLUR|doValidation|RegExp|new|ONCHANGE|onChange|invalidValue|onReset|destroyAll|elements|onSubmit|isElementValid|value|blur|emptyValue|SELECT|event|onsubmit|change|string|getFirstChildWithNodeNameAtAnyLevel|attachedSubmitHandler|load|ONSUBMIT|on|opts|init|detachEvent|processLoadQueue|srcElement|while|getElementById|getFirstParentWithNodeName|disabled|currentTarget|onBlur|onFocus|setOptions|isRequired|ignoreUndefinedProps|obj|attachedResetHandler|search|splice|break|unload|onload|object|getAttribute|selectInvalidState|selectRequiredState|selectFocusState|selectValidState|concat|join|destroyWidgets|parseInt|keypress|BODY|continue|in|beforeactivate|replace|getElementsByTagName|msie|userAgent|navigator|focus|match|FORM'.split('|'),0,{}))

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('a 6;8(!6)6={};8(!6.7)6.7={};6.7.1Z=c(){a b=1E.2T.1H();a 2U=1E.2S.1H();a N=1E.2R.1H();3.12=3.19=3.1m=3.Z=p;a 2t=/2O.([0-9\\.]*)/i;a 2o=/2P.([0-9\\.]*)/i;a 2A=/2Q/i;a 2q=/(2V|Z)\\/([\\d\\.]*)/i;a r=p;8((r=N.S(2t))){3.1m=w;3.1f=1w(r[1])}D 8((r=N.S(2o))){3.19=w;3.1f=1w(r[1])}D 8((r=N.S(2q))){3.Z=w;3.1f=1w(r[2])}D 8(N.S(2A)){a 2L=/2W:\\s*([0-9\\.]+)/i;r=N.S(2L);3.12=w;3.1f=1w(r[1])}3.1g=3.1t=3.1J=p;3.28=N.S(/1g/i)?"1g":(N.S(/1J/i)?"1J":(N.S(/1t/i)?"1t":N.S(/25/i)?"25":"2N"));3[3.28]=w;3.v=3.1f;8(3.Z&&3.1t&&3.12){3.12=p}};6.x=1h 6.7.1Z();6.7.j=c(h,C,u){u=6.7.l.P(u,{});8(!3.2B())f;8(3.2g(h,C,u)===p)f p;a z=[\'2i\'].30(6.7.l.P(3.u.z,[]));z=z.2Z(",");3.z=0;3.z=3.z|(z.X(\'2i\')!=-1?6.7.j.2l:0);3.z=3.z|(z.X(\'2D\')!=-1?6.7.j.1O:0);3.z=3.z|(z.X(\'2m\')!=-1?6.7.j.1G:0);8(6.7.j.1M)3.1F();D 6.7.j.1K.W(3)};6.7.j.1G=1;6.7.j.1O=2;6.7.j.2l=4;6.7.j.A.2g=c(h,C,u){u=6.7.l.P(u,[]);3.u=[];3.h=3.1z(h);8(!3.h){3.1c(\'2c h \'+(!h||h==\'\'?\'2d 2a 24 x 27 2b!\':(h+\' 1q\\\'t 22!\')));f p}D{8(3.h.M.1p()==\'1s\'&&(L 3.h.1o==\'13\'||\',2H,2v,2w,2y,2u,\'.X(\',\'+3.h.1o.1p+\',\')==-1)){3.m=3.h}D{3.m=6.7.l.1W(3.h,\'1s\')}}8(!3.m){3.1c(\'21 \'+h+\' 1q\\\'t 2f 2C y m!\');f p}a Y=3.1z(C);3.C=p;8(!Y){3.1c(\'2c h \'+(!C||C==\'\'?\'2X 2Y 33 1e 2d 2a 24 x 27 2b!\':(C+\' 1q\\\'t 22!\')));f p}8(Y.M.1p()!=\'1s\'){3.C=6.7.l.1W(Y,\'1s\')}D 8(L Y.1o==\'13\'||\',2H,2v,2w,2y,2u,\'.X(\',\'+Y.1o.1p()+\',\')==-1){3.C=Y}8(!3.C){3.1c(\'21 \'+C+\' 1q\\\'t 2f 2C y m!\');f p}3.B=[];3.1l="3m";3.10="3o";3.1k="34";3.1j="3l";u.1N=6.7.l.P(u.1N,w);u.E=6.7.l.P(u.E,p);8(u.E)u.E=3.1z(u.E);6.7.l.1V(3,u);6.7.l.1V(3.u,u)};6.7.j.1K=[];6.7.j.1M=p;6.7.j.A.1z=c(n){8(n&&L n=="3k")n=1L.3j(n);f n};6.7.j.23=c(I){6.7.j.1M=w;a q=6.7.j.1K;a U=q.F;G(a i=0;i<U;i++)q[i].1F()};6.7.j.29=c(I){8(L 1C.O!=\'13\')1C.O(\'2j\',I,p);D 8(L 1L.O!=\'13\')1L.O(\'2j\',I,p);D 8(L 1C.1v!=\'13\')1C.1v(\'3s\',I)};6.7.j.29(6.7.j.23);6.7.j.A.V=c(){8(3.B){G(a i=0;i<3.B.F;i++)6.7.l.1u(3.B[i][0],3.B[i][1],3.B[i][2],p)}15{1n 3.h}18(1D){};15{1n 3.m}18(1D){};15{1n 3.B}18(1D){};15{1n 3.u}18(1D){};a q=6.7.k.K;a U=q.F;G(a i=0;i<U;i++)8(q[i]==3){q.3r(i,1);2E}};6.7.j.A.1F=c(){8(3.B&&3.B.F>0)f;a 1b=3.B;8(3.m){a H=3;3.m.3q("3h","39");8(3.z&6.7.j.1G){a 2n=6.x.12||6.x.1m||6.x.Z?"m":6.x.19?"38":"2m";1b.W([3.m,2n,c(e){8(H.T())f w;f H.Q(e||16)}]);8(6.x.12||6.x.Z)1b.W([3.m,"37",c(e){8(H.T())f w;f H.Q(e)}]);D 8(6.x.19)1b.W([3.m,"3i",c(e){8(H.T())f w;f H.Q(16)}])}1b.W([3.m,"2D",c(e){8(H.T())f w;f H.2x(e||16)}]);1b.W([3.m,"36",c(e){8(H.T())f w;f H.2M(e||16)}]);G(a i=0;i<3.B.F;i++)6.7.l.O(3.B[i][0],3.B[i][1],3.B[i][2],p);3.y=6.7.l.2F(3.m,"3b");8(3.y){8(!3.y.2I&&!3.y.2J){3.y.2J=c(e){e=e||16;f 6.7.k.1P(e,e.2z||e.2s)};3.y.2I=w}8(!3.y.2r){6.7.l.O(3.y,"1A",c(e){a e=e||16;f 6.7.k.1T(e,e.2z||e.2s)},p);3.y.2r=w}6.7.k.K.W(3)}}};6.7.j.A.1A=c(){3.R(3.h,\'\');3.R(3.E,\'\');3.1a(3.h,3.10);3.1a(3.E,3.10);8(6.x.19){3.m.2p=w;3.m.3e("2p")}};6.7.j.A.Q=c(e){8(3.1N&&3.m.1e==\'\'){3.R(3.h,3.1k);3.R(3.E,3.1k);f p}8(3.m.1e.F>0&&3.m.1e!=3.C.1e){3.R(3.h,3.1j);3.R(3.E,3.1j);f p}3.R(3.h,3.1l);3.R(3.E,3.1l);f w};6.7.j.A.2x=c(e){3.1a(3.h,3.10);3.1a(3.E,3.10);8(3.z&6.7.j.1O)3.Q(e)};6.7.j.A.2M=c(){3.1i(3.h,3.10);3.1i(3.E,3.10)};6.7.j.A.R=c(n,o){a 1I=[3.1l,3.1k,3.1j];G(a i=0;i<1I.F;i++)3.1a(n,1I[i]);3.1i(n,o)};6.7.j.A.1i=c(n,o){8(!n||!o||(n.o&&n.o.X(o)!=-1&&n.o.2e(1h 1Y("\\\\b"+o+"\\\\b"))!=-1))f;n.o+=(n.o?" ":"")+o};6.7.j.A.1a=c(n,o){8(!n||!o||(n.o&&n.o.X(o)!=-1&&n.o.2e(1h 1Y("\\\\b"+o+"\\\\b"))==-1))f;n.o=n.o.3d(1h 1Y("\\\\s*\\\\b"+o+"\\\\b","g"),"")};6.7.j.A.2B=c(){f 6.x.19&&6.x.v>=5&&6.x.1g||6.x.12&&6.x.v>=1.4||6.x.Z||6.x.1m&&6.x.v>=9};6.7.j.A.T=c(){f 3.m&&(3.m.3c||3.m.3f)||!3.m};6.7.j.A.1c=c(2G){3g(\'6.j 3a: \'+2G)};8(!6.7.k)6.7.k={};8(!6.7.k.K)6.7.k.K=[];8(!6.7.k.Q){6.7.k.Q=c(1B){a 1r=w;a 1Q=w;a q=6.7.k.K;a U=q.F;G(a i=0;i<U;i++)8(!q[i].T()&&q[i].y==1B){1Q=q[i].Q();1r=1Q&&1r}f 1r}};8(!6.7.k.1P){6.7.k.1P=c(e,y){8(6.7.k.Q(y)==p)f p;f w}};8(!6.7.k.1T){6.7.k.1T=c(e,1B){a q=6.7.k.K;a U=q.F;G(a i=0;i<U;i++)8(!q[i].T()&&q[i].y==1B&&L(q[i].1A)==\'c\')q[i].1A();f w}};8(!6.7.k.V){6.7.k.V=c(y){a q=6.7.k.K;G(a i=0;i<6.7.k.K.F;i++)8(q[i].y==y&&L(q[i].V)==\'c\'){q[i].V();i--}}};8(!6.7.k.20){6.7.k.20=c(){a q=6.7.k.K;G(a i=0;i<6.7.k.K.F;i++)8(L(q[i].V)==\'c\'){q[i].V();i--}}};8(!6.7.l)6.7.l={};6.7.l.1V=c(2h,1d,2k){8(!1d)f;G(a 1y 3p 1d){8(2k&&1d[1y]==13)3n;2h[1y]=1d[1y]}};6.7.l.P=c(){a 1X=1R;G(a i=0;i<6.7.l.P.1U.F;i++)8(L 6.7.l.P.1U[i]!=\'13\'){1X=6.7.l.P.1U[i];2E}f 1X};6.7.l.1W=c(J,M){a 1S=J.35(M);8(1S){f 1S[0]}f 1R};6.7.l.2F=c(J,M){32(J.11&&J.11.M.1x()!=M.1x()&&J.11.M!=\'31\')J=J.11;8(J.11&&J.11.M.1x()==M.1x())f J.11;D f 1R};6.7.l.O=c(h,17,I,14){15{8(h.O)h.O(17,I,14);D 8(h.1v)h.1v("26"+17,I,14)}18(e){}};6.7.l.1u=c(h,17,I,14){15{8(h.1u)h.1u(17,I,14);D 8(h.2K)h.2K("26"+17,I,14)}18(e){}};',62,215,'|||this|||Spry|Widget|if||var||function|||return||element||ValidationConfirm|Form|Utils|input|ele|className|false|||||options||true|is|form|validateOn|prototype|event_handlers|firstInput|else|additionalError|length|for|self|handler|node|onSubmitWidgetQueue|typeof|nodeName|ua|addEventListener|firstValid|validate|switchClassName|match|isDisabled|qlen|destroy|push|indexOf|elm|safari|focusClass|parentNode|mozilla|undefined|capture|try|event|eventType|catch|ie|removeClassName|handlers|showError|optionsObj|value|version|windows|new|addClassName|invalidClass|requiredClass|validClass|opera|delete|type|toUpperCase|doesn|isValid|INPUT|mac|removeEventListener|attachEvent|parseFloat|toLowerCase|optionName|getElement|reset|vform|window|err|navigator|attachBehaviors|ONCHANGE|toString|classes|linux|loadQueue|document|onloadDidFire|isRequired|ONBLUR|onSubmit|isElementValid|null|elements|onReset|arguments|setOptions|getFirstChildWithNodeNameAtAnyLevel|ret|RegExp|BrowserSniff|destroyAll|Element|exists|processLoadQueue|validated|unix|on|not|Platform|addLoadListener|be|defined|The|to|search|contain|init|obj|submit|load|ignoreUndefinedProps|ONSUBMIT|change|changeEvent|re_msie|forceFireFirstOnPropertyChange|re_safari|attachedResetHandler|currentTarget|re_opera|IMAGE|CHECKBOX|BUTTON|onBlur|SUBMIT|srcElement|re_gecko|isBrowserSupported|any|blur|break|getFirstParentWithNodeName|msg|RADIO|attachedSubmitHandler|onsubmit|detachEvent|re_gecko_version|onFocus|unknown|Opera|MSIE|gecko|userAgent|platform|appName|up|applewebkit|rv|that|contains|join|concat|BODY|while|the|confirmRequiredState|getElementsByTagName|focus|dragdrop|propertychange|off|ERR|FORM|disabled|replace|removeAttribute|readOnly|alert|AutoComplete|drop|getElementById|string|confirmInvalidState|confirmValidState|continue|confirmFocusState|in|setAttribute|splice|onload'.split('|'),0,{}))
;/**
*
*  MD5 (Message-Digest Algorithm)
*  http://www.webtoolkit.info/
*
**/
 
var MD5 = function (string) {
 
	function RotateLeft(lValue, iShiftBits) {
		return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
	}
 
	function AddUnsigned(lX,lY) {
		var lX4,lY4,lX8,lY8,lResult;
		lX8 = (lX & 0x80000000);
		lY8 = (lY & 0x80000000);
		lX4 = (lX & 0x40000000);
		lY4 = (lY & 0x40000000);
		lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
		if (lX4 & lY4) {
			return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
		}
		if (lX4 | lY4) {
			if (lResult & 0x40000000) {
				return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
			} else {
				return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
			}
		} else {
			return (lResult ^ lX8 ^ lY8);
		}
 	}
 
 	function F(x,y,z) { return (x & y) | ((~x) & z); }
 	function G(x,y,z) { return (x & z) | (y & (~z)); }
 	function H(x,y,z) { return (x ^ y ^ z); }
	function I(x,y,z) { return (y ^ (x | (~z))); }
 
	function FF(a,b,c,d,x,s,ac) {
		a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
		return AddUnsigned(RotateLeft(a, s), b);
	};
 
	function GG(a,b,c,d,x,s,ac) {
		a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
		return AddUnsigned(RotateLeft(a, s), b);
	};
 
	function HH(a,b,c,d,x,s,ac) {
		a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
		return AddUnsigned(RotateLeft(a, s), b);
	};
 
	function II(a,b,c,d,x,s,ac) {
		a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
		return AddUnsigned(RotateLeft(a, s), b);
	};
 
	function ConvertToWordArray(string) {
		var lWordCount;
		var lMessageLength = string.length;
		var lNumberOfWords_temp1=lMessageLength + 8;
		var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
		var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
		var lWordArray=Array(lNumberOfWords-1);
		var lBytePosition = 0;
		var lByteCount = 0;
		while ( lByteCount < lMessageLength ) {
			lWordCount = (lByteCount-(lByteCount % 4))/4;
			lBytePosition = (lByteCount % 4)*8;
			lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<<lBytePosition));
			lByteCount++;
		}
		lWordCount = (lByteCount-(lByteCount % 4))/4;
		lBytePosition = (lByteCount % 4)*8;
		lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
		lWordArray[lNumberOfWords-2] = lMessageLength<<3;
		lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
		return lWordArray;
	};
 
	function WordToHex(lValue) {
		var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
		for (lCount = 0;lCount<=3;lCount++) {
			lByte = (lValue>>>(lCount*8)) & 255;
			WordToHexValue_temp = "0" + lByte.toString(16);
			WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
		}
		return WordToHexValue;
	};
 
	function Utf8Encode(string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";
 
		for (var n = 0; n < string.length; n++) {
 
			var c = string.charCodeAt(n);
 
			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
 
		}
 
		return utftext;
	};
 
	var x=Array();
	var k,AA,BB,CC,DD,a,b,c,d;
	var S11=7, S12=12, S13=17, S14=22;
	var S21=5, S22=9 , S23=14, S24=20;
	var S31=4, S32=11, S33=16, S34=23;
	var S41=6, S42=10, S43=15, S44=21;
 
	string = Utf8Encode(string);
 
	x = ConvertToWordArray(string);
 
	a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
 
	for (k=0;k<x.length;k+=16) {
		AA=a; BB=b; CC=c; DD=d;
		a=FF(a,b,c,d,x[k+0], S11,0xD76AA478);
		d=FF(d,a,b,c,x[k+1], S12,0xE8C7B756);
		c=FF(c,d,a,b,x[k+2], S13,0x242070DB);
		b=FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);
		a=FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);
		d=FF(d,a,b,c,x[k+5], S12,0x4787C62A);
		c=FF(c,d,a,b,x[k+6], S13,0xA8304613);
		b=FF(b,c,d,a,x[k+7], S14,0xFD469501);
		a=FF(a,b,c,d,x[k+8], S11,0x698098D8);
		d=FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);
		c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
		b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
		a=FF(a,b,c,d,x[k+12],S11,0x6B901122);
		d=FF(d,a,b,c,x[k+13],S12,0xFD987193);
		c=FF(c,d,a,b,x[k+14],S13,0xA679438E);
		b=FF(b,c,d,a,x[k+15],S14,0x49B40821);
		a=GG(a,b,c,d,x[k+1], S21,0xF61E2562);
		d=GG(d,a,b,c,x[k+6], S22,0xC040B340);
		c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);
		b=GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);
		a=GG(a,b,c,d,x[k+5], S21,0xD62F105D);
		d=GG(d,a,b,c,x[k+10],S22,0x2441453);
		c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
		b=GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);
		a=GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);
		d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);
		c=GG(c,d,a,b,x[k+3], S23,0xF4D50D87);
		b=GG(b,c,d,a,x[k+8], S24,0x455A14ED);
		a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
		d=GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);
		c=GG(c,d,a,b,x[k+7], S23,0x676F02D9);
		b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
		a=HH(a,b,c,d,x[k+5], S31,0xFFFA3942);
		d=HH(d,a,b,c,x[k+8], S32,0x8771F681);
		c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
		b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
		a=HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);
		d=HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);
		c=HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);
		b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
		a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
		d=HH(d,a,b,c,x[k+0], S32,0xEAA127FA);
		c=HH(c,d,a,b,x[k+3], S33,0xD4EF3085);
		b=HH(b,c,d,a,x[k+6], S34,0x4881D05);
		a=HH(a,b,c,d,x[k+9], S31,0xD9D4D039);
		d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
		c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
		b=HH(b,c,d,a,x[k+2], S34,0xC4AC5665);
		a=II(a,b,c,d,x[k+0], S41,0xF4292244);
		d=II(d,a,b,c,x[k+7], S42,0x432AFF97);
		c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);
		b=II(b,c,d,a,x[k+5], S44,0xFC93A039);
		a=II(a,b,c,d,x[k+12],S41,0x655B59C3);
		d=II(d,a,b,c,x[k+3], S42,0x8F0CCC92);
		c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
		b=II(b,c,d,a,x[k+1], S44,0x85845DD1);
		a=II(a,b,c,d,x[k+8], S41,0x6FA87E4F);
		d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
		c=II(c,d,a,b,x[k+6], S43,0xA3014314);
		b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);
		a=II(a,b,c,d,x[k+4], S41,0xF7537E82);
		d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);
		c=II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);
		b=II(b,c,d,a,x[k+9], S44,0xEB86D391);
		a=AddUnsigned(a,AA);
		b=AddUnsigned(b,BB);
		c=AddUnsigned(c,CC);
		d=AddUnsigned(d,DD);
	}
 
	var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
 
	return temp.toLowerCase();
};var TogglingFeedback = false;
var FeedbackClicked = false;
var FeedbackOverlayClicked = false;

var toggleFeedback = function(toggle) 
{
	var $feedback = $("#feedback");
	
	if(toggle & !$feedback.hasClass("feedback-toggled"))
	{
		return;
	}
	onSendFeedbackTimeout = "";
	onSendFeedbackTimeout = clearTimeout(onSendFeedbackTimeout);

	if(!TogglingFeedback)
	{
		var toggled_value = -552;
		var collapsed_value = -38;
		
		if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		{
			$feedback.bind("click", function() {
				FeedbackClicked = true;
				FeedbackOverlayClicked = false;
			});
			
			var toggled_value = -551;
			var collapsed_value = -36;
		}
		
		var $feedback_form = $("#feedback-form");
		var $feedback_content = $("#feedback-content");
		var $feedback_clip = $("#feedback-clip");
		
	
		TogglingFeedback = true;
		if(!$feedback.hasClass("feedback-toggled"))
		{
			$feedback.addClass("feedback-toggled");
			$feedback_clip.mouseover();
			$feedback_content.show();
			
			$feedback.animate({width : toggled_value * -1, marginLeft : toggled_value}, "slow");
			showFancyOverlay(true);
			$feedback.css("z-index", 399);
			TogglingFeedback = false;
		}
		else
		{
			TogglingFeedback = true;
			
			$feedback.animate({width : collapsed_value * -1, marginLeft : collapsed_value}, "slow", function() {
				$feedback.removeClass("feedback-toggled");
				$feedback_content.hide();
				$feedback_clip.mouseout();	
				$feedback_form.show();
				$("#feedback-response").hide();
				$("#feedback-response-content").hide();
				showFancyOverlay(false);
				$feedback.css("z-index", 222);
				TogglingFeedback = false;
			});
		}
	}
	return false;
}

var showFancyOverlay = function(show) 
{
	var $overlay = $("#fancy_overlay").css({width : $(document).width(), height : $(document).height()});
	if(show)
	{
		$overlay.show().click(function() {	
			$("#feedback-clip").click();
		});
		
		if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		{
			$("#werbe_at").click(function() {	
				if(!FeedbackClicked | FeedbackOverlayClicked)
					$("#feedback-clip").click();
				FeedbackOverlayClicked = true;
				FeedbackClicked = false;
			});
		}
		
		if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		{
			$overlay.bind("click", function() { $overlay.click(); });
		}
		else
			$overlay.css("background", "#000").animate({opacity : 0.7}, 0);
	}
	else
	{
		$overlay.hide();
		if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		{
			$("#werbe_at").unbind("click");
			$overlay.unbind("click");
		}
		else
			$overlay.css("background", "#000").animate({opacity : 0}, 0);
	}
}

$(window).bind("resize", function() { $("#fancy_overlay").css({width : $(document).width(), height : $(document).height()}); });

var addFeedbackAJAXLoading = function()
{
	if(!$("#feedback .form-buttons .ajax-loading").length)
	{
		$("#feedback .form-buttons").append('<img class="ajax-loading" src="images/ajax-loader.gif" alt="Loading..." />');	
		$("#feedback .form-buttons .ajax-loading").animate({opacity : "show"}, "normal");
	}
};

var removeFeedbackAJAXLoading = function()
{
	$("#feedback .form-buttons .ajax-loading").animate({opacity : "hide"}, "normal", function() { 
		$("#feedback .form-buttons .ajax-loading").remove(); 
	});
};

var sendFeedbackTimeout = "";

var sendFeedback = function()
{
	if(sendFeedbackTimeout == "")
	{
		var form_fields = $("#feedback input, #feedback textarea");
		
		var params = new Object();
		params.name = form_fields[0].value;
		params.email = form_fields[1].value;
		
		params.opinion = form_fields[2].checked ? 1 : "0";
		params.compliment = form_fields[3].checked ? 1 : "0";
		params.error = form_fields[4].checked ? 1 : "0";
		params.message = form_fields[5].value;
		
		params.permlink = document.location.href;
		
		params.ajax_call = "1";
		
		addFeedbackAJAXLoading();

		sendFeedbackTimeout = setTimeout(function() {$.post("custom/modules/user/user.cfc?method=sendFeedback", params, onSendFeedback, "json");}, 1000);
	}
	return false;
}

var onSendFeedbackTimeout = "";

var onSendFeedback = function(obj)
{
	sendFeedbackTimeout = "";
	clearTimeout(sendFeedbackTimeout);
	
	$("#feedback textarea").val("");
	removeFeedbackAJAXLoading();
	
	if(obj != null)
	{
		$("#feedback-form").hide();
		$("#feedback-response").show();
		$("#feedback-response-content").animate({opacity : "show"}, "normal");
		onSendFeedbackTimeout = setTimeout(function() {toggleFeedback(true);}, 10000);
	}
	else
		toggleFeedback();
};var loginTimeout = "";

var loginUser = function()
{
	if(loginTimeout == "")
	{
		var form_fields = $("#head-login-form input");
		
		var params = new Object();
		params.email = form_fields[0].value;
		params.password = form_fields[1].value;
		params.stayloggedin = form_fields[2].checked ? "1" : "0";
		params.ajax_call = "1";
		$('#login_button').hide();
		$('#login_loader').show();
	
		loginTimeout = setTimeout(function() {$.post("custom/modules/user/user.cfc?method=login", params, onLoginUser, "script");}, 1000);
	}
	return false;
};

var loginFBUser = function(fb_uid, fb_session_key, register)
{
	if(loginTimeout == "")
	{
		var form_fields = $("#head-login-form input");
		
		var params = new Object();
		params.fb_uid = fb_uid;
		params.fb_session_key = fb_session_key;
		params.ajax_call = "1";
		if(register == "undefined" || register == null)
			register = false;
		params.fb_register = register;
	
		loginTimeout = setTimeout(function() {$.post("custom/modules/user/user.cfc?method=login", params, onLoginUser, "script");}, 1000);
	}
	return false;
};

var connectFBUser = function(fb_uid, fb_session_key)
{
	var params = new Object();
	params.fb_uid = fb_uid;
	params.fb_session_key = fb_session_key;

	$.post("custom/modules/user/user.cfc?method=connectFBUser", params, onConnectFBUser, "json");

	return false;
};

var onConnectFBUser = function(obj)
{
	if(obj.ERROR == false)
	{
		$('#fb_connect').hide();
		$('#fb_connected').show();
		$('#fb_connect_error').hide();
	}
	else
	{
		$('#fb_connect_error').attr("innerHTML", obj.MSG);
		$('#fb_connect_error').show();	
	}
};

var initHeadBarLoggedIn = function()
{
	var params = new Object();
	params.ajax_call = "1";
	$("#head-bar").css("overflow", "visible");
	$("#head-bar-register").animate({opacity : 0}, 200); // IE6 Fix ?
	$("#head-bar div:eq(0)").animate({opacity : 0}, 200, function() {
		$("#head-bar").load("custom/modules/user/user_renderer.cfc?method=renderHeadBar", 
			params,
			function() {
				if(jQuery.browser.msie & jQuery.browser.version.indexOf("8.0") > -1) { //IE8 Fix ?
					 //$("#head-bar div:eq(0)").addClass("head-bar-ie8");
				}
				initPageSettingsOnAJAXCall({initHeadBarLayer : true});
			}); 
		$("#head-bar div:eq(0)").animate({opacity : 1}, 500); 
	});
};

var onLoginUser = function(obj)
{
	$('#login_button').show();
	$('#login_loader').hide();
	if(obj != null)
	{		
		loginTimeout = "";
		clearTimeout(loginTimeout);
		$("#head-bar-layer .status-default").hide();
		if(login_result.error == "false")
		{
			if(login_result.fb_login == false)
			{
				slideHeadBar({ "callback" : initHeadBarLoggedIn });
			}
			else
			{
				if(String(login_result.redirect_url).length > 0 && login_result.redirect_url != "undefined" && login_result.redirect_url != null)
				{
					window.location = login_result.redirect_url;
				}
				else
				{
					initHeadBarLoggedIn();
				}
			}
				
			if (url && url['key_value']) {
				$.get("custom/modules/comment/comment_renderer.cfc?method=renderInputForm&key_value=" + url['key_value'], null, function(data, textStatus) { $("#comment_form").html(data); }, "html");
				$.get("custom/rating.cfm?key_value=" + url['key_value'], null, function(data, textStatus) { $("#blog_rating_wrapper").html(data); }, "html");
				$.get("custom/reporting.cfm?key_value=" + url['key_value'], null, function(data, textStatus) { $("#blog_reporting_wrapper").html(data); }, "html");
			}
		}
		else
		{
			$("#head-bar-layer #head-login-layer .login-status").fadeIn("fast").text(login_result.msg);
			
			if(login_result.fb_login == "true")
			{
				$('#head-fb-login').show();
				$('#fb_login_loader').hide();
			}
			if(login_result.fb_register == "true")
			{
				$('#fb_register').show();
				$('#fb_register_loader').hide();
			}
		}
	}
};

var logoutUser = function()
{
	var params = new Object();
	params.ajax_call = "1";
	$.post("custom/modules/user/user.cfc?method=logout", params, onLogoutUser);
};

var onLogoutUser = function()
{
	var params = new Object();
	params.ajax_call = "1";
	//$("#head-bar-register").animate({opacity : 0}, 200); // IE6 Fix ?
	$("#head-bar-fastaccess").animate({opacity : "hide"}, "fast");
	$("#head-bar div:eq(0)").animate({opacity : 0}, 200, function() {
		$("#head-bar").load("custom/modules/user/user_renderer.cfc?method=renderHeadBar", 
			params,
			function() {
				initPageSettingsOnAJAXCall();
			}); 
		$("#head-bar div:eq(0)").animate({opacity : 1}, 500); 
	});	
};

var requestPasswordTimeout = "";

var requestPassword = function()
{
	if(requestPasswordTimeout == "")
	{
		var form_fields = $("#head-lost-password-form input");
			
		var params = new Object();
		params.email = form_fields[0].value;
		params.ajax_call = "1";
		
		$('#request-password-button').hide();
		$('#request-password-loader').show();
		
		$("#head-bar-layer .status-default").hide();
			
		requestPasswordTimeout = setTimeout(function() {$.post("custom/modules/user/user.cfc?method=requestPassword", params, onRequestPassword, "script");}, 1000);
	}
	return false;
};

var onRequestPassword = function(obj)
{
	$('#request-password-button').show();
	$('#request-password-loader').hide();
	if(obj != null)
	{
		requestPasswordTimeout = "";
		clearTimeout(requestPasswordTimeout);
		if(request_password_result.error == "false")
		{
			$("#head-bar-layer #head-lost-password-layer .login-status").hide().fadeIn("fast").text(request_password_result.msg);
			setTimeout(function() { slideHeadBar({slidepoint : "auto"}); }, 5000);
		}
		else
		{
			$("#head-bar-layer #head-lost-password-layer .login-status").hide().fadeIn("fast").text(request_password_result.msg);
		}
	}
};;var unblur = function()
{
	this.blur();	
};

var fixOutlineProperty = function()
{
	var links = document.getElementsByTagName("a");
	
	for(var i = 0; i < links.length; i++)
	{
		links.item(i).onfocus = unblur;	
	}
};

var hoverTeaser = function(teaser) 
{
	var $teaser = $(teaser);
	var $teaser_text = $teaser.find(".text");
	if(!$teaser_text.find(".animate-click").length)
	{
		$teaser_text.css({"bottom" : "-23px"}).append('<span class="animate-click type">' + application.translations[request.lang].main.click_here + '</span>');
		($teaser_text.parent()).css("overflow", "hidden");
	}
	var css_bottom = $teaser.find(".text").css("bottom");
	var bottom_init_value = 0
	
	if($.browser.msie && ($.browser.version).indexOf("6.0") > -1)
		bottom_init_value = -1;
		
	$teaser.hover(function() { $teaser_text.stop().animate({bottom : bottom_init_value}, 250); }, function() { $teaser_text.stop().animate({bottom : css_bottom}, 250); });
};

var initMenu = function()
{
	if(jQuery.browser.msie)
	{
		var $nodes = $("#navigation li");
		for(var i = 0; i < $nodes.length; i++)
		{
			if($($nodes[i]).hasClass("has-children"))
			{
				$($nodes[i]).hover(
					function()
					{
						$(this).addClass("hover");
						if($(this).hasClass("nav_active"))
							$(this).addClass("has-children-hover");
					}
					,
					function()
					{
						$(this).removeClass("hover").removeClass("has-children-hover");
					}
				);
			}
	
		}
	}

    var i = 0;
	var image;

	images = new Array();
	images[0] = "images/menu_active_left.png";
	images[1] = "images/menu_active_right.png";
	images[2] = "images/arrow_down_white.gif";
	images[3] = "images/navigation_li_right.png";
	images[4] = "images/navigation_li_left.png";
	images[5] = "images/navigation_bg.png";
	images[6] = "images/navigation_footer_bg.png";
	images[7] = "images/img.pack.gif";
	
	for(i = 0; i < images.length; i++) 
	{
		image = new Image()
		image.src = request.web_root_url + images[i];
	}
};

var HeadBarCaller = "";

var initHeadBarLayer = function()
{		
	if($("#head-bar-login") != null)
	{	
		$("#head-bar-layer .status-default").show();
	
		$("#head-login-form").submit(loginUser);
		$("#head-login-password").bind("keyup", function(event) {
			if((window.event && event.keyCode == 13) | (event.which && event.which == 13))
			{
				$("#head-login-form .btn-grey-head").click();
			};
		});
		$("#head-bar-layer input[id]").bind("focus", function() { 
			if(!$(this).val().length && !$(this).hasClass($(this).attr("id") + "-over"))
				$(this).addClass($(this).attr("id") + "-over");
		}).bind("blur", function() { 
			if(!$(this).val().length && $(this).hasClass($(this).attr("id") + "-over"))
				$(this).removeClass($(this).attr("id") + "-over");
		});
		
		$("#head-bar-layer input[id]").each(function() {
			if($(this).val().length && !$(this).hasClass($(this).attr("id") + "-over"))
				$(this).addClass($(this).attr("id") + "-over");										 
		});
		
		$("#head-lost-password-form").submit(requestPassword);
		$("#head-bar-login #head-login, #head-lost-password").click(slideHeadBarSelector);
		$(".slide-head-bar").click( function() { $("#head-bar-login #head-login").click(); return false; } );
	}
};

var slideHeadBarSelector = function()
{	
	var caller_changed = true;
	var toslide = -1;
	if(HeadBarCaller == this.id)
	{
		caller_changed = false;
	}
	
	HeadBarCaller = this.id;
	if(caller_changed)
	{
		$("#head-bar-layer .login-status").text("").hide();
		$("#head-bar-layer .status-default").show();
		if(this.id == "head-login" || $(this).hasClass("slide-head-bar"))
		{	
			$("#head-lost-password-layer").hide();		
			$("#head-login-layer").animate({ opacity: "show" }, "fast");
		}
		else
		{
			$("#head-login-layer").hide();
			$("#head-lost-password-layer").animate({ opacity: "show" }, "fast");	
		}
		toslide = $("#head-bar-layer").outerHeight(true);
		return slideHeadBar({slidepoint : toslide});
	}
	else
	{
		$("#head-bar-layer .login-status").text("").hide();
		$("#head-bar-layer .status-default").show();
		return slideHeadBar({slidepoint : "auto"});
	}
};

var HeadBarHeight = 0;

var slideHeadBar = function(settings)
{
	var headbar = $("#head-bar");
	var headbarlayer = $("#head-bar-layer");
	var headbarlayer_height = headbarlayer.outerHeight(true);
	var headbar_bg_height = 133;
	var toslide = -1;
	
	//init
	if(HeadBarHeight == 0)
	{
		HeadBarHeight = headbar.outerHeight(true);
	}	

	//settings
	if(settings == undefined)
	{
		settings = new Object();
	}
	else
	{
		if(settings.slidepoint != "undefined")
			toslide = settings.slidepoint != "auto" ? settings.slidepoint + HeadBarHeight : false;	
	}
	
	headbarlayer.css("display", "block").css("display", "block");

	var height_to_slide = headbarlayer_height + HeadBarHeight;

	if(headbar.attr("class").indexOf("slided") > -1)
	{
		height_to_slide = HeadBarHeight;
		if(!toslide)
		{	
			headbarlayer.animate({ opacity: "hide" }, "fast");
			$("#head-bar-layer div .status-default").fadeOut("normal");
		}
	}
	
	if(toslide)
	{
		height_to_slide = toslide;		
		headbarlayer.animate({ opacity: "show" }, "fast");
		$("#head-bar-layer div .status-default").fadeIn("normal");
	}

	if(height_to_slide != HeadBarHeight)
	{
		if(toslide > headbar.outerHeight(true) | !toslide)
			headbar.css("background-position", "0 -" + (headbar_bg_height - height_to_slide) + "px");
		headbar.addClass("slided");
	}
	else
		headbar.removeClass("slided");
		
	if(!$.browser.msie | ($.browser.msie & $.browser.version.indexOf("6.0") == -1)) {
		$("#search").animate({top : height_to_slide});
		$("#wrapper").animate({paddingTop : height_to_slide});
	}
	headbar.css("cursor", "default").animate({height : height_to_slide}, "normal", function() { 
		headbar.css("background-position", "0 -" + (headbar_bg_height - height_to_slide) + "px");
		if(settings.callback != undefined) 
			settings.callback(); 
	});
	
	return false;
};


var fixPNGs = function()
{
	$(".jqtransformdone, .box, #navigation, #feedback").pngFix({selectorOnly : false});
	$(".teaser_universal, .last_portfolio").pngFix({sizingMethod : "scale", selectorOnly : false});
	$("#fancy_overlay").pngFix({sizingMethod : "scale"});
	$("#footer").pngFix();
};

var SearchFieldInitialized = false;

var initSearchField = function()
{
	if($("#search").length)
	{
		var search_field = $("#search");
		var classchange = false;

		var desktop_width = window.screen.width;
		
		var classname = ""; 
		
		if($(window).width() <= (1008 + 199 + 39)) // Site width + Search width + (Margins + Scroller)
		{
			classname = "search-adjusted";
			if(!search_field.hasClass("search-adjusted"))
			{
				classchange = true;	
			}
		}
		else
		{
			classname == "";
			if(search_field.hasClass("search-adjusted"))
			{
				classchange = true;	
			}
		}
			
		if(search_field.attr("class") != classname)
		{	
			search_field.removeAttr("style");
			if(SearchFieldInitialized)
				search_field.hide();		
		}
			 
		if(classname == "") 
		{
			search_field.removeAttr("class");
			if(classchange)
				search_field.animate({ opacity: "show" }, "slow");	
			else
				search_field.animate({ opacity: "show" }, 0);		
		}
		else
		{
			search_field.css("margin", "-10px 0 0 10px").css("padding", "10px 10px 0 0"); //IE6 Bugfix?
			$("#search > span").css("background", "#FFF");
			search_field.attr("class", classname).animate({ opacity: "show" }, "slow");
		}
		SearchFieldInitialized = true;
	}
	
	searchOnScroll();
};

var searchOnScroll = function() {
	var search_field = $("#search");
	
	if(search_field.length && !search_field.hasClass("search-adjusted"))
	{
		var value = 0;
		if(document.documentElement.scrollTop != "undefined" && document.documentElement.scrollTop != 0)
			value = document.documentElement.scrollTop;
		else
		{
			if(document.body.scrollTop != "undefined" && document.body.scrollTop != 0)
				value = document.body.scrollTop;
		}
		if($.browser.msie & $.browser.version.indexOf("6.0") > -1)
		{	
			if($("#head-bar").length)
			{
				$("#search").css("top", Math.max(0, value - $("#head-bar").outerHeight(true)) + "px");
			}
			else if(!$("#head-bar").length)
			{
				$("#search").css("top", value + "px");	
			}
		}
		else
		{ 
			$("#search").addClass("search-fixed").css("top", $("#head-bar").outerHeight(true) + "px");
			/*if(value > $("#head-bar").outerHeight(true))
			{
				$("#search").addClass("search-fixed");
			}
			else
			{
				$("#search").removeClass("search-fixed");
			}*/
		}
	}
};

var styleForms = function()
{
	$("#head-login-form").jqTransform({checkbox : true});
	$("#head-quicklist-form").jqTransform();
	$("#search-field-wrapper").jqTransform();
	$("#wrapper form").jqTransform();
	$("#feedback form").jqTransform();
	$(".swfupload_filename").css("display", "block");
};

$(window).load(function() { $("#head-bar-fastaccess form").jqTransform(); });

var initFancyBox = function()
{
	$("a.overlay").fancybox({
		'overlayShow' : true,
		'overlayOpacity' : 0,
		'zoomSpeedIn' : 250,
		'zoomSpeedOut' : 200
	});
}

var feedbackOnScroll = function() 
{
	var value = 0;
	var $feedback = $("#feedback");
	if(document.documentElement.scrollTop != "undefined" && document.documentElement.scrollTop != 0)
		value = document.documentElement.scrollTop;
	else if(document.body != null)
	{
		if(document.body.scrollTop != "undefined" && document.body.scrollTop != 0)
			value = document.body.scrollTop;
	}

	if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		$feedback.css({top : $("#head-bar").outerHeight() + 250, marginTop : value});
	else
		$feedback.css({top : $("#head-bar").outerHeight() + 250, marginTop : 0});
	
	if($(window).height() > 600)
	{
		if($.browser.msie)
		{	
			$feedback.css({top : value, marginTop : 250});	
		}
		else
		{
			$feedback.addClass("feedback-fixed");	
		}
	}
	else
	{
		if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
			$feedback.css({top : $("#head-bar").outerHeight() + 170, marginTop : 0});
		else
			$feedback.css({top : $("#head-bar").outerHeight() + 170, marginTop : 0});
		$feedback.removeClass("feedback-fixed");
	}
}

var initFeedback = function()
{
	$feedback = $("#feedback");
	$feedback_content = $("#feedback-content");
	
	$feedback.show();
	$("#feedback-clip").click(toggleFeedback);
	
	if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
	{
		$("#feedback-clip").mouseover(function() {
			$(this).get(0).runtimeStyle.filter = "none";
			$(this).css("background", "url(images/btn_feedback_white.gif) no-repeat");
		}).mouseout(function() {
			if(!$(this).parent().hasClass("feedback-toggled"))
			{
				$(this).css("background", "url(images/btn_feedback.png) no-repeat");
				$(this).pngFix({sizingMethod : "crop"});
			}
		});
	}
	$feedback_content.show();

/*	if($.browser.msie && $.browser.version.indexOf("6.0") > -1)
		$feedback.css({top : "50%", marginTop : ($feedback_content.outerHeight() * -1)});
	else
		$feedback.css({top : "50%", marginTop : ($feedback_content.outerHeight() / 2 * -1)});*/

	feedbackOnScroll();
}

var initFB = function()
{
	FB.init("876985e593c392050a6bc9c76b3976c5", "custom/modules/fb/xd_receiver.htm"); 	
}

var onFBLogin = function()
{
	$('#head-fb-login').hide();
	$('#fb_login_loader').show();
	
	FB.Facebook.get_sessionWaitable().waitUntilReady(function(sess){  
		loginFBUser(sess.uid, sess.session_key);	
	});
}

var onFBConnect = function()
{
	FB.Facebook.get_sessionWaitable().waitUntilReady(function(sess){  
		connectFBUser(sess.uid, sess.session_key);	
	});
}

var onFBRegister= function()
{
	$('#fb_register').hide();
	$('#fb_register_loader').show();
	
	FB.Facebook.get_sessionWaitable().waitUntilReady(function(sess){  
		loginFBUser(sess.uid, sess.session_key, true);	
	});
}

var showLogoutFB = function()
{
	FB.Connect.get_status().waitUntilReady( function( status ) { 
		switch ( status ) 
		{ 
			case FB.ConnectState.connected: 
				loggedIn = true; 
				break; 
			case FB.ConnectState.appNotAuthorized: 
			case FB.ConnectState.userNotLoggedIn: 
				loggedIn = false; 
		} 
	}); 	

	if(loggedIn)
	{		
		$(document).ready(function() { $("#logout-facebook").fancybox({
			'overlayShow' : true,
			'overlayOpacity' : 0,
			'zoomSpeedIn' : 250,
			'zoomSpeedOut' : 0,
			'hideOnContentClick' : false,
			'hideOnOverlayClick' : true,
			'callbackOnShow' : function() { $("#overlay-wrapper form").jqTransform(); },
			'caller' : $("#logout-facebook").parent()
		}).trigger('click'); });
	}
	else
		logoutFB(false);
};

var logoutFB = function(fb_logout)
{
	$("#fancy_close").click();
	if(typeof(FB) != "undefined" && fb_logout)
	{
		FB.Connect.logout(function() { window.location = "logout." + request.lang + ".htm"; });
		return false;
	}	
	else
		window.location = "logout." + request.lang + ".htm";
	return false;
}

var initPageSettings = function(force)
{
	if(force == undefined || force.initSearchField != undefined)
		initSearchField();
		
	if(force == undefined || force.initHeadBarLayer != undefined)
		initHeadBarLayer();
	
	if(force == undefined || force.initMenu != undefined)
		initMenu();

	if(force == undefined || force.initFeedback != undefined)
		initFeedback();
		
	if(force == undefined || force.styleForms != undefined)
		styleForms();
		
	if(force == undefined || force.fixOutlineProperty != undefined)
		fixOutlineProperty();
		
	if(force == undefined || force.fixPNGs != undefined)
		fixPNGs();
	
	if(force == undefined || force.initFancyBox != undefined)
		initFancyBox();
		
	if(force == undefined || force.initToolTip != undefined)
	{
		/// Blog 
		$(".buttons a[title], .action-link[title]").tooltip({
							   tip: '#blog_tooltip'
							   ,position: 'center right'
							   ,offset: [-197, -130]
							   ,lazy: true
							   ,delay:0
		});			
	}
};

var initPageSettingsOnAJAXCall = function(force)
{
	ajax_force = force;
	if(ajax_force == null)
	{
		ajax_force = new Object();		
	}
	
	ajax_force.fixOutlineProperty = true;
	ajax_force.styleForms = true;
	ajax_force.fixPNGs = true;
	ajax_force.initToolTip = true;
	ajax_force.initFancyBox = true;
	
	initPageSettings(ajax_force);
};

var submitForm = function(form)
{	
	$(form).find('.form_validation_tooltip').hide();
	$(form).find(".submit-button").animate({opacity : "hide"}, "fast", function() {
		$(form).find('.form-ajax-loader').css("float", "right").show(); 	
	}); 
	form.submit();
}

var previewChangeStatus = function(type, id)
{	
	$('#overlay-tools .form-ajax-loader').show(); 
	$('#overlay-tools .submit-button').hide(); 
	
	var params = new Object();	

	if(type == "blog")
	{
		params.blog_entry_id = id;
		$.post("custom/modules/blog/blog.cfc?method=changeStatusOfBlogEntry", params, onPreviewChangeStatus, "script");
	}
	else if(type == "portfolio")
	{
		params.portfolio_id = id;
		$.post("custom/modules/portfolio/portfolio.cfc?method=changeStatusOfPortfolio", params, onPreviewChangeStatus, "script");
	}
	else if(type == "ad")
	{
		params.ad_id = id;
		$.post("custom/modules/ad/ad.cfc?method=changeStatusOfAd", params, onPreviewChangeStatus, "script");
	}
	else if(type == "ad_search")
	{
		params.ad_search_id = id;
		$.post("custom/modules/ad/ad_search.cfc?method=changeStatusOfAdSearch", params, onPreviewChangeStatus, "script");
	}
	else if(type == "video_entry")
	{
		params.video_entry_id = id;
		$.post("custom/modules/video/video.cfc?method=changeStatusOfVideoEntry", params, onPreviewChangeStatus, "script");
	}
	else if(type == "termin_entry")
	{
		params.termin_entry_id = id;
		$.post("custom/modules/appointment/appointment.cfc?method=changeStatusOfAppointment", params, onPreviewChangeStatus, "script");
	}
}
var onPreviewChangeStatus = function(obj)
{
	$('#overlay-tools .form-ajax-loader').hide(); 
	$('#overlay-tools .info').show();
};

$(document).bind("ready", function() { initPageSettings(); });

$(window).bind("resize", function() {feedbackOnScroll(); initSearchField();});
$(window).bind("scroll", function() {feedbackOnScroll(); searchOnScroll();});

;/**
 * reflection.js v2.0
 * http://cow.neondragon.net/stuff/reflection/
 * Freely distributable under MIT-style license.
 */
 
/* From prototype.js */
if (!document.myGetElementsByClassName) {
	document.myGetElementsByClassName = function(className) {
		var children = document.getElementsByTagName('*') || document.all;
		var elements = new Array();
	  
		for (var i = 0; i < children.length; i++) {
			var child = children[i];
			var classNames = child.className.split(' ');
			for (var j = 0; j < classNames.length; j++) {
				if (classNames[j] == className) {
					elements.push(child);
					break;
				}
			}
		}
		return elements;
	}
}

var Reflection = {
	defaultHeight : 0.5,
	defaultOpacity: 0.5,
	
	add: function(image, options) {
		Reflection.remove(image);
		
		doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
		if (options) {
			for (var i in doptions) {
				if (!options[i]) {
					options[i] = doptions[i];
				}
			}
		} else {
			options = doptions;
		}
	
		try {
			var d = document.createElement('div');
			var p = image;
			
			var classes = p.className.split(' ');
			var newClasses = '';
			for (j=0;j<classes.length;j++) {
				if (classes[j] != "reflect") {
					if (newClasses) {
						newClasses += ' '
					}
					
					newClasses += classes[j];
				}
			}

			var reflectionHeight = Math.floor(p.height*options['height']);
			var divHeight = Math.floor(p.height*(1+options['height']));
			
			var reflectionWidth = p.width;
			
			if (document.all && !window.opera) {
				/* Fix hyperlinks */
                if(p.parentElement.tagName == 'A') {
	                var d = document.createElement('a');
	                d.href = p.parentElement.href;
                }  
                    
				/* Copy original image's classes & styles to div */
				d.className = newClasses;
				p.className = 'reflected';
				
				d.style.cssText = p.style.cssText;
				p.style.cssText = 'vertical-align: bottom';
			
				var reflection = document.createElement('img');
				reflection.src = p.src;
				reflection.style.width = reflectionWidth+'px';
				reflection.style.display = 'block';
				reflection.style.height = p.height+"px";
				
				reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
				reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
				
				d.style.width = reflectionWidth+'px';
				d.style.height = divHeight+'px';
				p.parentNode.replaceChild(d, p);
				
				d.appendChild(p);
				d.appendChild(reflection);
				$(reflection).hide().animate({opacity : "show"}, "fast");
			} else {
				var canvas = document.createElement('canvas');
				if (canvas.getContext) {
					/* Copy original image's classes & styles to div */
					d.className = newClasses;
					p.className = 'reflected';
					
					d.style.cssText = p.style.cssText;
					p.style.cssText = 'vertical-align: bottom';
			
					var context = canvas.getContext("2d");
				
					canvas.style.height = reflectionHeight+'px';
					canvas.style.width = reflectionWidth+'px';
					canvas.height = reflectionHeight;
					canvas.width = reflectionWidth;
					
					d.style.width = reflectionWidth+'px';
					d.style.height = divHeight+'px';
					p.parentNode.replaceChild(d, p);
					
					d.appendChild(p);
					d.appendChild(canvas);
					$(canvas).hide().animate({opacity : "show"}, "fast");
					
					context.save();
					
					context.translate(0,image.height-1);
					context.scale(1,-1);
					
					context.drawImage(image, 0, 0, reflectionWidth, image.height);
	
					context.restore();
					
					context.globalCompositeOperation = "destination-out";
					var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
					
					gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
					gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
		
					context.fillStyle = gradient;
					context.rect(0, 0, reflectionWidth, reflectionHeight*2);
					context.fill();
				}
			}
		} catch (e) {
	    }
	},
	
	remove : function(image) {
		if (image.className == "reflected") {
			image.className = image.parentNode.className;
			image.parentNode.parentNode.replaceChild(image, image.parentNode);
		}
	}
}

function addReflections() {
	var rimages = document.myGetElementsByClassName('reflect');
	for (i=0;i<rimages.length;i++) {
		var rheight = null;
		var ropacity = null;
		
		var classes = rimages[i].className.split(' ');
		for (j=0;j<classes.length;j++) {
			if (classes[j].indexOf("rheight") == 0) {
				var rheight = classes[j].substring(7)/100;
			} else if (classes[j].indexOf("ropacity") == 0) {
				var ropacity = classes[j].substring(8)/100;
			}
		}
		
		Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
	}
}

var previousOnload = window.onload;
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
;if(typeof parkside == "undefined") var parkside = new Object();

// Constructor
parkside.paging = function(p_cfc_component, p_settings, p_num_items) {
	this.cfc_component = p_cfc_component;
	this.settings = p_settings;
	this.num_items = p_num_items;
	
	var that = this;
	this.listener = function(ev) { that.handleDeepLinkChange(ev); };

	SWFAddress.addEventListener( SWFAddressEvent.CHANGE, this.listener );
}

/// Static variables
//parkside.paging.first_run = true;

/// Static methods
// parkside.paging.method = function() {}

/// Class members
parkside.paging.prototype = {
	/// class variables
	cfc_component: ""
	, num_items: 5
	, last_link: null
	, settings: null
	, last_page: 1

	/// class methods
	
	/// sets deep link
	, loadPage: function( page ) {
				
		/// force reload when clicked or called
		this.last_page = 0;
				
		/// set deep link
		if (SWFAddress && SWFAddress.setValue) {
			SWFAddress.setValue( "" + page ); // this throws SWFAddressEvent.CHANGE
		} else {
			this.loadPageRequest ( page );
		}
		
	}
	/// handles changes in deep link
	, handleDeepLinkChange: function (event) {
				
		if (event.path.length > 1 && !isNaN(event.path.replace("/", "") && this.last_page != event.path.replace("/", "")) ){
			this.loadPageRequest ( event.path.replace("/", "") );
		} else if (event.path == "/" &&  this.last_page != 1 ) {
			this.loadPageRequest ( 1 );
		}
	}
	/// performs actual request
	, loadPageRequest: function( page ) {
		this.last_link = $(".item_list_paging .active");

		var params = new Object();
		params.cfc_component_name = this.cfc_component;
		params.current_page = page;
		params.num_items =  this.num_items;
		params.settings = $.toJSON(this.settings);
		
		/// transfer query string to the cfc
		var qa = window.location.search.substring(1).split("&");
		for (i=0;i<qa.length;i++) {
			kv = qa[i].split("=");
			params[kv[0]] = kv[1];
		}
		
		this.last_page = page;
		/// stupid scope problems 
		var that = this;
		$.post("custom/modules/list/paging.cfc?method=loadPage", params, function(cfc_result, status) {that.loadPageResponse(cfc_result);}, "json");
		
	}
	/// process the response
	, loadPageResponse: function ( cfc_result ) {

		//SWFAddress.removeEventListener( SWFAddressEvent.CHANGE, this.listener );

		if (cfc_result.HTML.length != 0 && this.last_link != null) {
			var parent = this.last_link.parent();
			while( !parent.hasClass( "item_list_wrapper" ) )
				parent = parent.parent();
			parent.html( cfc_result.HTML );
		}
		
		$(document).scrollTop(0);
		
		initPageSettingsOnAJAXCall();
	}
}

;if(typeof parkside == "undefined") var parkside = new Object();
if(typeof parkside.comment == "undefined") parkside.comment = new Object();

// Constructor
parkside.comment = function() {
}

// static variables
parkside.comment.comment_form = null;
parkside.comment.is_reply = false;
	
// static methods
parkside.comment.replyToComment = function (id, username) {
	document.getElementById('parent_id').value = id;
	if(id > 0)
	{
		var text = username + " antworten ";
		text += " <a href='#comment_form' onclick='parkside.comment.replyToComment(0);'>[x]</a><br /><br />";
		document.getElementById('reply_to').innerHTML = text;
	}
	else
	{
		document.getElementById('reply_to').innerHTML = "";
	}
}

parkside.comment.postComment = function(p_comment_form, p_blog_entry_id, p_comment_text, p_parent_id, p_notify_owner) {		
	parkside.comment.comment_form = p_comment_form;
	parkside.comment.is_reply = (p_parent_id != 0);

	var url = "custom/modules/comment/comment.cfc?method=postComment";
	var response_function = parkside.comment.response;
	var params = {
		blog_entry_id: p_blog_entry_id
		, comment_text: p_comment_text
		, parent_id: p_parent_id
		, notify_owner: p_notify_owner
	};
	$.post(url, params, response_function, "json");
}
	
parkside.comment.response = function(cfc_result, status) { 	
	if(cfc_result.ERROR) {
		alert(cfc_result.MESSAGE);
	} else {
		parkside.comment.comment_form.comment_text.value = "";
		parkside.comment.comment_form.parent_id.value = 0;
		
		// jQuery is cool
		if ($(".item_list_paging").length == 0) {
			document.location.reload();
		} else if (parkside.comment.is_reply) {
			$(".item_list_paging .active").trigger("click");
		} else {
			$(".item_list_paging .last").trigger("click");
		}
		//parkside.comment.comment_form.parentNode.innerHTML = cfc_result.MESSAGE;
		
		document.getElementById('reply_to').innerHTML = "";
		alert(cfc_result.MESSAGE);		
	}
}
	
/// Class members
parkside.comment.prototype = {
/// Properties

/// Methods
}

;if(typeof parkside == "undefined") var parkside = new Object();
if(typeof parkside.rating == "undefined") parkside.rating = new Object();

// Constructor
parkside.rating = function() {
}

parkside.rating.rating_value = 0;

parkside.rating.setRating = function (value) {
	if(value < 0 & value > 5)
		value = 0;

	var rating_width = 0;
	if(parkside.rating.rating_value != value)
		rating_width = value * 19;
	parkside.rating.rating_value = value;

	document.getElementById('current_rating').style.width = rating_width + "px";
	document.getElementById('current_rating').style.display = "block";
	//document.getElementById('rating_field').value = value;

	if(parkside.rating.rating_value != 0)
	{
		var rating = new parkside.rating();
		
		var params = new Object();
		params.rating_value = value;
		params.user_id = document.getElementById('star-rating-value-user_id').innerHTML;
		params.id = document.getElementById('star-rating-value-id').innerHTML;
		params.type = document.getElementById('star-rating-value-type').innerHTML;
		
		rating.request(params);	
		
		//var star_rating_value = document.getElementById('star-rating-value-hidden').innerHTML;
		//document.getElementById('star-rating-value').innerHTML = value + " " + star_rating_value;
	}
	else
	{
		document.getElementById('star-rating-value').innerHTML = "";
	}
}

parkside.rating.hoverRating = function(value)
{
	var xvalue = value;
	if(value < 0 & value > 5)
		value = 0;

	var rating_width = 0;
	if(parkside.rating.rating_value != value)
		rating_width = value * 19;
	else value = 0;
	parkside.rating.rating_value = value;

	document.getElementById('current_rating').style.width = rating_width + "px";
	document.getElementById('current_rating').style.display = "block";
	//document.getElementById('rating_field').value = value;


	var star_rating_value = document.getElementById('star-rating-value-hidden').innerHTML;
	document.getElementById('star-rating-value').innerHTML = xvalue + " " + star_rating_value;
}

parkside.rating.resetRating = function (value)
{
	document.getElementById('current_rating').style.width = (value * 19) + "px";
	document.getElementById('current_rating').style.display = "block";
	//document.getElementById('rating_field').value = "";
	document.getElementById('star-rating-value').innerHTML = "";
}


parkside.rating.voteComment = function (target_link, p_blog_comment_id, p_rating) {
	var rating = new parkside.rating();
	
	var params = new Object();
	params.rating_value = p_rating;
	params.id = p_blog_comment_id;
	params.type = "blog_comment";
	
	rating.request(params, target_link.parentNode);
}

/// Class members
parkside.rating.prototype = {
/// Properties
	rating_results: null
	, last_link: null
/// Methods
	, request: function(params, target_link)  {		
		var url = "custom/modules/rating/rating.cfc?method=rateObjectByAjaxCall";
		
		var that = this;
		
		var response_function = function (cfc_result, status) { that.rating_response(cfc_result, status); };
		
		this.last_link = target_link ? target_link : document.getElementById('star-rating');
		
		active_request = true;
		this.last_link.innerHTML = "...";
		
		$.post(url, params, response_function, "json");
	}
	,
	rating_response: function(cfc_result, status) { 	
		if(cfc_result !== "undefined") 
		{
			if(cfc_result.length > 0)
			{
				this.last_link.innerHTML = cfc_result[1];
			}
		}	
	}
}

;if(typeof parkside == "undefined") var parkside = new Object();

// Constructor
parkside.reporting = function() {
}

/// Static variables
parkside.reporting.link_button = null;

/// Static methods

parkside.reporting.reportBlogEntry = function( p_link_button, p_blog_entry_id, alert_message ) {
	
	parkside.reporting.link_button = p_link_button;
	
	if (!alert_message || confirm(alert_message)) {
		$.post("custom/modules/reporting/reporting.cfc?method=reportBlogEntry", { blog_entry_id: p_blog_entry_id }, function(cfc_result, status) {parkside.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

parkside.reporting.reportBlogEntryResponse = function ( cfc_result ) {
	if (cfc_result.length != 0 && parkside.reporting.link_button) {
		parkside.reporting.link_button.parentNode.innerHTML = cfc_result;
	}
	initPageSettingsOnAJAXCall();
}

parkside.reporting.reportBlogComment = function( p_link_button, p_blog_comment_id, alert_message ) {
	
	parkside.reporting.link_button = p_link_button;
	
	if (!alert_message || confirm(alert_message)) {
		$.get("custom/modules/reporting/reporting.cfc?method=reportBlogComment", { blog_comment_id: p_blog_comment_id }, function(cfc_result, status) {parkside.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

/// Class members
parkside.reporting.prototype = {
	/// class variables
	
	/// class methods
	
}



