(function(c,e){function f(c,f,h){if(h===e&&c.nodeType===1)if(h=c.getAttribute("data-"+f),typeof h==="string"){try{h=h==="true"?!0:h==="false"?!1:h==="null"?null:!l.isNaN(h)?parseFloat(h):B.test(h)?l.parseJSON(h):h}catch(g){}l.data(c,f,h)}else h=e;return h}function g(){return!1}function i(){return!0}function h(c,e,f){f[0].type=c;return l.event.handle.apply(e,f)}function j(c){var e,f,h,g,i,j,k,m,o,n,r,u=[];g=[];i=l.data(this,this.nodeType?"events":"__events__");if(typeof i==="function")i=i.events;if(!(c.liveFired===
this||!i||!i.live||c.button&&c.type==="click")){c.namespace&&(r=RegExp("(^|\\.)"+c.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));c.liveFired=this;var q=i.live.slice(0);for(k=0;k<q.length;k++)i=q[k],i.origType.replace(F,"")===c.type?g.push(i.selector):q.splice(k--,1);g=l(c.target).closest(g,c.currentTarget);m=0;for(o=g.length;m<o;m++){n=g[m];for(k=0;k<q.length;k++)if(i=q[k],n.selector===i.selector&&(!r||r.test(i.namespace))){j=n.elem;h=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")c.type=
i.preType,h=l(c.relatedTarget).closest(i.selector)[0];(!h||h!==j)&&u.push({elem:j,handleObj:i,level:n.level})}}m=0;for(o=u.length;m<o;m++){g=u[m];if(f&&g.level>f)break;c.currentTarget=g.elem;c.data=g.handleObj.data;c.handleObj=g.handleObj;r=g.handleObj.origHandler.apply(g.elem,arguments);if(r===!1||c.isPropagationStopped())if(f=g.level,r===!1&&(e=!1),c.isImmediatePropagationStopped())break}return e}}function k(c,e){return(c&&c!=="*"?c+".":"")+e.replace(aa,"`").replace(T,"&")}function n(c,e,f){if(l.isFunction(e))return l.grep(c,
function(c,h){return!!e.call(c,h,c)===f});else if(e.nodeType)return l.grep(c,function(c){return c===e===f});else if(typeof e==="string"){var h=l.grep(c,function(c){return c.nodeType===1});if(va.test(e))return l.filter(e,h,!f);else e=l.filter(e,h)}return l.grep(c,function(c){return l.inArray(c,e)>=0===f})}function m(c,e){var f=0;e.each(function(){if(this.nodeName===(c[f]&&c[f].nodeName)){var e=l.data(c[f++]),h=l.data(this,e);if(e=e&&e.events){delete h.handle;h.events={};for(var g in e)for(var i in e[g])l.event.add(this,
g,e[g][i],e[g][i].data)}}})}function p(c,e){e.src?l.ajax({url:e.src,async:!1,dataType:"script"}):l.globalEval(e.text||e.textContent||e.innerHTML||"");e.parentNode&&e.parentNode.removeChild(e)}function r(c,e,f){var h=e==="width"?c.offsetWidth:c.offsetHeight;if(f==="border")return h;l.each(e==="width"?wa:xa,function(){f||(h-=parseFloat(l.css(c,"padding"+this))||0);f==="margin"?h+=parseFloat(l.css(c,"margin"+this))||0:h-=parseFloat(l.css(c,"border"+this+"Width"))||0});return h}function o(c,e,f,h){l.isArray(e)&&
e.length?l.each(e,function(e,g){f||ya.test(c)?h(c,g):o(c+"["+(typeof g==="object"||l.isArray(g)?e:"")+"]",g,f,h)}):!f&&e!=null&&typeof e==="object"?l.isEmptyObject(e)?h(c,""):l.each(e,function(e,g){o(c+"["+e+"]",g,f,h)}):h(c,e)}function u(c,e){var f={};l.each(ia.concat.apply([],ia.slice(0,e)),function(){f[this]=c});return f}function s(c){if(!ga[c]){var e=l("<"+c+">").appendTo("body"),f=e.css("display");e.remove();if(f==="none"||f==="")f="block";ga[c]=f}return ga[c]}function v(c){return l.isWindow(c)?
c:c.nodeType===9?c.defaultView||c.parentWindow:!1}var q=c.document,l=function(){function f(){if(!h.isReady){try{q.documentElement.doScroll("left")}catch(c){setTimeout(f,1);return}h.ready()}}var h=function(c,e){return new h.fn.init(c,e)},g=c.jQuery,i=c.$,j,k=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,m=/^\s+/,o=/\s+$/,n=/\W/,r=/\d/,u=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,s=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,v=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,w=/(?:^|:|,)(?:\s*\[)+/g,
K=/(webkit)[ \/]([\w.]+)/,za=/(opera)(?:.*version)?[ \/]([\w.]+)/,Aa=/(msie) ([\w.]+)/,Ba=/(mozilla)(?:.*? rv:([\w.]+))?/,V=navigator.userAgent,ja=!1,W=[],H,I=Object.prototype.toString,z=Object.prototype.hasOwnProperty,x=Array.prototype.push,B=Array.prototype.slice,F=String.prototype.trim,A=Array.prototype.indexOf,D={};h.fn=h.prototype={init:function(c,f){var g,i,y;if(!c)return this;if(c.nodeType)return this.context=this[0]=c,this.length=1,this;if(c==="body"&&!f&&q.body)return this.context=q,this[0]=
q.body,this.selector="body",this.length=1,this;if(typeof c==="string")if((g=k.exec(c))&&(g[1]||!f))if(g[1])return y=f?f.ownerDocument||f:q,(i=u.exec(c))?h.isPlainObject(f)?(c=[q.createElement(i[1])],h.fn.attr.call(c,f,!0)):c=[y.createElement(i[1])]:(i=h.buildFragment([g[1]],[y]),c=(i.cacheable?i.fragment.cloneNode(!0):i.fragment).childNodes),h.merge(this,c);else{if((i=q.getElementById(g[2]))&&i.parentNode){if(i.id!==g[2])return j.find(c);this.length=1;this[0]=i}this.context=q;this.selector=c;return this}else return!f&&
!n.test(c)?(this.selector=c,this.context=q,c=q.getElementsByTagName(c),h.merge(this,c)):!f||f.jquery?(f||j).find(c):h(f).find(c);else if(h.isFunction(c))return j.ready(c);if(c.selector!==e)this.selector=c.selector,this.context=c.context;return h.makeArray(c,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},toArray:function(){return B.call(this,0)},get:function(c){return c==null?this.toArray():c<0?this.slice(c)[0]:this[c]},pushStack:function(c,e,f){var g=h();h.isArray(c)?
x.apply(g,c):h.merge(g,c);g.prevObject=this;g.context=this.context;if(e==="find")g.selector=this.selector+(this.selector?" ":"")+f;else if(e)g.selector=this.selector+"."+e+"("+f+")";return g},each:function(c,e){return h.each(this,c,e)},ready:function(c){h.bindReady();h.isReady?c.call(q,h):W&&W.push(c);return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(B.apply(this,
arguments),"slice",B.call(arguments).join(","))},map:function(c){return this.pushStack(h.map(this,function(e,f){return c.call(e,f,e)}))},end:function(){return this.prevObject||h(null)},push:x,sort:[].sort,splice:[].splice};h.fn.init.prototype=h.fn;h.extend=h.fn.extend=function(){var c,f,g,i,j,y=arguments[0]||{},k=1,l=arguments.length,fa=!1;typeof y==="boolean"&&(fa=y,y=arguments[1]||{},k=2);typeof y!=="object"&&!h.isFunction(y)&&(y={});l===k&&(y=this,--k);for(;k<l;k++)if((c=arguments[k])!=null)for(f in c)g=
y[f],i=c[f],y!==i&&(fa&&i&&(h.isPlainObject(i)||(j=h.isArray(i)))?(j?(j=!1,g=g&&h.isArray(g)?g:[]):g=g&&h.isPlainObject(g)?g:{},y[f]=h.extend(fa,g,i)):i!==e&&(y[f]=i));return y};h.extend({noConflict:function(e){c.$=i;if(e)c.jQuery=g;return h},isReady:!1,readyWait:1,ready:function(c){c===!0&&h.readyWait--;if(!h.readyWait||c!==!0&&!h.isReady){if(!q.body)return setTimeout(h.ready,1);h.isReady=!0;if(!(c!==!0&&--h.readyWait>0)&&W){var e=0,f=W;for(W=null;c=f[e++];)c.call(q,h);h.fn.trigger&&h(q).trigger("ready").unbind("ready")}}},
bindReady:function(){if(!ja){ja=!0;if(q.readyState==="complete")return setTimeout(h.ready,1);if(q.addEventListener)q.addEventListener("DOMContentLoaded",H,!1),c.addEventListener("load",h.ready,!1);else if(q.attachEvent){q.attachEvent("onreadystatechange",H);c.attachEvent("onload",h.ready);var e=!1;try{e=c.frameElement==null}catch(g){}q.documentElement.doScroll&&e&&f()}}},isFunction:function(c){return h.type(c)==="function"},isArray:Array.isArray||function(c){return h.type(c)==="array"},isWindow:function(c){return c&&
typeof c==="object"&&"setInterval"in c},isNaN:function(c){return c==null||!r.test(c)||isNaN(c)},type:function(c){return c==null?String(c):D[I.call(c)]||"object"},isPlainObject:function(c){if(!c||h.type(c)!=="object"||c.nodeType||h.isWindow(c))return!1;if(c.constructor&&!z.call(c,"constructor")&&!z.call(c.constructor.prototype,"isPrototypeOf"))return!1;for(var f in c);return f===e||z.call(c,f)},isEmptyObject:function(c){for(var e in c)return!1;return!0},error:function(c){throw c;},parseJSON:function(e){if(typeof e!==
"string"||!e)return null;e=h.trim(e);if(p.test(e.replace(s,"@").replace(v,"]").replace(w,"")))return c.JSON&&c.JSON.parse?c.JSON.parse(e):(new Function("return "+e))();else h.error("Invalid JSON: "+e)},noop:function(){},globalEval:function(c){if(c&&l.test(c)){var e=q.getElementsByTagName("head")[0]||q.documentElement,f=q.createElement("script");f.type="text/javascript";h.support.scriptEval?f.appendChild(q.createTextNode(c)):f.text=c;e.insertBefore(f,e.firstChild);e.removeChild(f)}},nodeName:function(c,
e){return c.nodeName&&c.nodeName.toUpperCase()===e.toUpperCase()},each:function(c,f,g){var i,j=0,y=c.length,k=y===e||h.isFunction(c);if(g)if(k)for(i in c){if(f.apply(c[i],g)===!1)break}else for(;j<y;){if(f.apply(c[j++],g)===!1)break}else if(k)for(i in c){if(f.call(c[i],i,c[i])===!1)break}else for(g=c[0];j<y&&f.call(g,j,g)!==!1;g=c[++j]);return c},trim:F?function(c){return c==null?"":F.call(c)}:function(c){return c==null?"":c.toString().replace(m,"").replace(o,"")},makeArray:function(c,e){var f=e||
[];if(c!=null){var g=h.type(c);c.length==null||g==="string"||g==="function"||g==="regexp"||h.isWindow(c)?x.call(f,c):h.merge(f,c)}return f},inArray:function(c,e){if(e.indexOf)return e.indexOf(c);for(var f=0,h=e.length;f<h;f++)if(e[f]===c)return f;return-1},merge:function(c,f){var h=c.length,g=0;if(typeof f.length==="number")for(var i=f.length;g<i;g++)c[h++]=f[g];else for(;f[g]!==e;)c[h++]=f[g++];c.length=h;return c},grep:function(c,e,f){for(var h=[],g,f=!!f,i=0,j=c.length;i<j;i++)g=!!e(c[i],i),f!==
g&&h.push(c[i]);return h},map:function(c,e,f){for(var h=[],g,i=0,j=c.length;i<j;i++)g=e(c[i],i,f),g!=null&&(h[h.length]=g);return h.concat.apply([],h)},guid:1,proxy:function(c,f,g){arguments.length===2&&(typeof f==="string"?(g=c,c=g[f],f=e):f&&!h.isFunction(f)&&(g=f,f=e));!f&&c&&(f=function(){return c.apply(g||this,arguments)});if(c)f.guid=c.guid=c.guid||f.guid||h.guid++;return f},access:function(c,f,g,i,j,y){var k=c.length;if(typeof f==="object"){for(var l in f)h.access(c,l,f[l],i,j,g);return c}if(g!==
e){i=!y&&i&&h.isFunction(g);for(l=0;l<k;l++)j(c[l],f,i?g.call(c[l],l,j(c[l],f)):g,y);return c}return k?j(c[0],f):e},now:function(){return(new Date).getTime()},uaMatch:function(c){c=c.toLowerCase();c=K.exec(c)||za.exec(c)||Aa.exec(c)||c.indexOf("compatible")<0&&Ba.exec(c)||[];return{browser:c[1]||"",version:c[2]||"0"}},browser:{}});h.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(c,e){D["[object "+e+"]"]=e.toLowerCase()});V=h.uaMatch(V);if(V.browser)h.browser[V.browser]=
!0,h.browser.version=V.version;if(h.browser.webkit)h.browser.safari=!0;if(A)h.inArray=function(c,e){return A.call(e,c)};/\s/.test("\u00a0")||(m=/^[\s\xA0]+/,o=/[\s\xA0]+$/);j=h(q);q.addEventListener?H=function(){q.removeEventListener("DOMContentLoaded",H,!1);h.ready()}:q.attachEvent&&(H=function(){q.readyState==="complete"&&(q.detachEvent("onreadystatechange",H),h.ready())});return c.jQuery=c.$=h}();(function(){l.support={};var e=q.documentElement,f=q.createElement("script"),h=q.createElement("div"),
g="script"+l.now();h.style.display="none";h.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var i=h.getElementsByTagName("*"),j=h.getElementsByTagName("a")[0],k=q.createElement("select"),m=k.appendChild(q.createElement("option"));if(i&&i.length&&j){l.support={leadingWhitespace:h.firstChild.nodeType===3,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),
hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:h.getElementsByTagName("input")[0].value==="on",optSelected:m.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,scriptEval:!1,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0};k.disabled=!0;l.support.optDisabled=!m.disabled;f.type="text/javascript";try{f.appendChild(q.createTextNode("window."+g+"=1;"))}catch(o){}e.insertBefore(f,
e.firstChild);if(c[g])l.support.scriptEval=!0,delete c[g];try{delete f.test}catch(n){l.support.deleteExpando=!1}e.removeChild(f);h.attachEvent&&h.fireEvent&&(h.attachEvent("onclick",function ua(){l.support.noCloneEvent=!1;h.detachEvent("onclick",ua)}),h.cloneNode(!0).fireEvent("onclick"));h=q.createElement("div");h.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";e=q.createDocumentFragment();e.appendChild(h.firstChild);l.support.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked;
l(function(){var c=q.createElement("div");c.style.width=c.style.paddingLeft="1px";q.body.appendChild(c);l.boxModel=l.support.boxModel=c.offsetWidth===2;if("zoom"in c.style)c.style.display="inline",c.style.zoom=1,l.support.inlineBlockNeedsLayout=c.offsetWidth===2,c.style.display="",c.innerHTML="<div style='width:4px;'></div>",l.support.shrinkWrapBlocks=c.offsetWidth!==2;c.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var e=c.getElementsByTagName("td");l.support.reliableHiddenOffsets=
e[0].offsetHeight===0;e[0].style.display="";e[1].style.display="none";l.support.reliableHiddenOffsets=l.support.reliableHiddenOffsets&&e[0].offsetHeight===0;c.innerHTML="";q.body.removeChild(c).style.display="none"});e=function(c){var e=q.createElement("div"),c="on"+c,f=c in e;f||(e.setAttribute(c,"return;"),f=typeof e[c]==="function");return f};l.support.submitBubbles=e("submit");l.support.changeBubbles=e("change");e=f=h=i=j=null}})();var z={},B=/^(?:\{.*\}|\[.*\])$/;l.extend({cache:{},uuid:0,expando:"jQuery"+
l.now(),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},data:function(f,h,g){if(l.acceptData(f)){var f=f==c?z:f,i=f.nodeType,j=i?f[l.expando]:null,k=l.cache;if(!i||j||!(typeof h==="string"&&g===e))return i?j||(f[l.expando]=j=++l.uuid):k=f,typeof h==="object"?i?k[j]=l.extend(k[j],h):l.extend(k,h):i&&!k[j]&&(k[j]={}),f=i?k[j]:k,g!==e&&(f[h]=g),typeof h==="string"?f[h]:f}},removeData:function(e,f){if(l.acceptData(e)){var e=e==c?z:e,h=e.nodeType,g=h?e[l.expando]:e,i=l.cache,
j=h?i[g]:g;if(f)j&&(delete j[f],h&&l.isEmptyObject(j)&&l.removeData(e));else if(h&&l.support.deleteExpando)delete e[l.expando];else if(e.removeAttribute)e.removeAttribute(l.expando);else if(h)delete i[g];else for(var k in e)delete e[k]}},acceptData:function(c){if(c.nodeName){var e=l.noData[c.nodeName.toLowerCase()];if(e)return!(e===!0||c.getAttribute("classid")!==e)}return!0}});l.fn.extend({data:function(c,h){var g=null;if(typeof c==="undefined"){if(this.length)for(var i=this[0].attributes,j,g=l.data(this[0]),
k=0,m=i.length;k<m;k++)j=i[k].name,j.indexOf("data-")===0&&(j=j.substr(5),f(this[0],j,g[j]));return g}else if(typeof c==="object")return this.each(function(){l.data(this,c)});var o=c.split(".");o[1]=o[1]?"."+o[1]:"";return h===e?(g=this.triggerHandler("getData"+o[1]+"!",[o[0]]),g===e&&this.length&&(g=l.data(this[0],c),g=f(this[0],c,g)),g===e&&o[1]?this.data(o[0]):g):this.each(function(){var e=l(this),f=[o[0],h];e.triggerHandler("setData"+o[1]+"!",f);l.data(this,c,h);e.triggerHandler("changeData"+
o[1]+"!",f)})},removeData:function(c){return this.each(function(){l.removeData(this,c)})}});l.extend({queue:function(c,e,f){if(c){var e=(e||"fx")+"queue",h=l.data(c,e);if(!f)return h||[];!h||l.isArray(f)?h=l.data(c,e,l.makeArray(f)):h.push(f);return h}},dequeue:function(c,e){var e=e||"fx",f=l.queue(c,e),h=f.shift();h==="inprogress"&&(h=f.shift());h&&(e==="fx"&&f.unshift("inprogress"),h.call(c,function(){l.dequeue(c,e)}))}});l.fn.extend({queue:function(c,f){typeof c!=="string"&&(f=c,c="fx");if(f===
e)return l.queue(this[0],c);return this.each(function(){var e=l.queue(this,c,f);c==="fx"&&e[0]!=="inprogress"&&l.dequeue(this,c)})},dequeue:function(c){return this.each(function(){l.dequeue(this,c)})},delay:function(c,e){c=l.fx?l.fx.speeds[c]||c:c;e=e||"fx";return this.queue(e,function(){var f=this;setTimeout(function(){l.dequeue(f,e)},c)})},clearQueue:function(c){return this.queue(c||"fx",[])}});var A=/[\n\t]/g,x=/\s+/,C=/\r/g,w=/^(?:href|src|style)$/,K=/^(?:button|input)$/i,I=/^(?:button|input|object|select|textarea)$/i,
H=/^a(?:rea)?$/i,R=/^(?:radio|checkbox)$/i;l.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};l.fn.extend({attr:function(c,e){return l.access(this,c,e,!0,l.attr)},removeAttr:function(c){return this.each(function(){l.attr(this,c,"");this.nodeType===1&&this.removeAttribute(c)})},addClass:function(c){if(l.isFunction(c))return this.each(function(e){var f=
l(this);f.addClass(c.call(this,e,f.attr("class")))});if(c&&typeof c==="string")for(var e=(c||"").split(x),f=0,h=this.length;f<h;f++){var g=this[f];if(g.nodeType===1)if(g.className){for(var i=" "+g.className+" ",j=g.className,k=0,m=e.length;k<m;k++)i.indexOf(" "+e[k]+" ")<0&&(j+=" "+e[k]);g.className=l.trim(j)}else g.className=c}return this},removeClass:function(c){if(l.isFunction(c))return this.each(function(e){var f=l(this);f.removeClass(c.call(this,e,f.attr("class")))});if(c&&typeof c==="string"||
c===e)for(var f=(c||"").split(x),h=0,g=this.length;h<g;h++){var i=this[h];if(i.nodeType===1&&i.className)if(c){for(var j=(" "+i.className+" ").replace(A," "),k=0,m=f.length;k<m;k++)j=j.replace(" "+f[k]+" "," ");i.className=l.trim(j)}else i.className=""}return this},toggleClass:function(c,e){var f=typeof c,h=typeof e==="boolean";if(l.isFunction(c))return this.each(function(f){var h=l(this);h.toggleClass(c.call(this,f,h.attr("class"),e),e)});return this.each(function(){if(f==="string")for(var g,i=0,
j=l(this),k=e,m=c.split(x);g=m[i++];)k=h?k:!j.hasClass(g),j[k?"addClass":"removeClass"](g);else if(f==="undefined"||f==="boolean")this.className&&l.data(this,"__className__",this.className),this.className=this.className||c===!1?"":l.data(this,"__className__")||""})},hasClass:function(c){for(var c=" "+c+" ",e=0,f=this.length;e<f;e++)if((" "+this[e].className+" ").replace(A," ").indexOf(c)>-1)return!0;return!1},val:function(c){if(!arguments.length){var f=this[0];if(f){if(l.nodeName(f,"option")){var h=
f.attributes.value;return!h||h.specified?f.value:f.text}if(l.nodeName(f,"select")){var g=f.selectedIndex,h=[],i=f.options,f=f.type==="select-one";if(g<0)return null;for(var j=f?g:0,g=f?g+1:i.length;j<g;j++){var k=i[j];if(k.selected&&(l.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!l.nodeName(k.parentNode,"optgroup"))){c=l(k).val();if(f)return c;h.push(c)}}return h}if(R.test(f.type)&&!l.support.checkOn)return f.getAttribute("value")===null?"on":f.value;
return(f.value||"").replace(C,"")}return e}var m=l.isFunction(c);return this.each(function(e){var f=l(this),h=c;if(this.nodeType===1)if(m&&(h=c.call(this,e,f.val())),h==null?h="":typeof h==="number"?h+="":l.isArray(h)&&(h=l.map(h,function(c){return c==null?"":c+""})),l.isArray(h)&&R.test(this.type))this.checked=l.inArray(f.val(),h)>=0;else if(l.nodeName(this,"select")){var g=l.makeArray(h);l("option",this).each(function(){this.selected=l.inArray(l(this).val(),g)>=0});if(!g.length)this.selectedIndex=
-1}else this.value=h})}});l.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(c,f,h,g){if(!c||c.nodeType===3||c.nodeType===8)return e;if(g&&f in l.attrFn)return l(c)[f](h);var g=c.nodeType!==1||!l.isXMLDoc(c),i=h!==e,f=g&&l.props[f]||f,j=w.test(f);if((f in c||c[f]!==e)&&g&&!j){i&&(f==="type"&&K.test(c.nodeName)&&c.parentNode&&l.error("type property can't be changed"),h===null?c.nodeType===1&&c.removeAttribute(f):c[f]=h);if(l.nodeName(c,"form")&&c.getAttributeNode(f))return c.getAttributeNode(f).nodeValue;
if(f==="tabIndex")return(f=c.getAttributeNode("tabIndex"))&&f.specified?f.value:I.test(c.nodeName)||H.test(c.nodeName)&&c.href?0:e;return c[f]}if(!l.support.style&&g&&f==="style"){if(i)c.style.cssText=""+h;return c.style.cssText}i&&c.setAttribute(f,""+h);if(!c.attributes[f]&&c.hasAttribute&&!c.hasAttribute(f))return e;c=!l.support.hrefNormalized&&g&&j?c.getAttribute(f,2):c.getAttribute(f);return c===null?e:c}});var F=/\.(.*)$/,M=/^(?:textarea|input|select)$/i,aa=/\./g,T=/ /g,ba=/[^\w\s.|`]/g,G=function(c){return c.replace(ba,
"\\$&")},J={focusin:0,focusout:0};l.event={add:function(f,h,i,j){if(!(f.nodeType===3||f.nodeType===8)){l.isWindow(f)&&f!==c&&!f.frameElement&&(f=c);if(i===!1)i=g;else if(!i)return;var k,m;if(i.handler)k=i,i=k.handler;if(!i.guid)i.guid=l.guid++;if(m=l.data(f)){var o=f.nodeType?"events":"__events__",n=m[o],r=m.handle;if(typeof n==="function")r=n.handle,n=n.events;else if(!n)f.nodeType||(m[o]=m=function(){}),m.events=n={};if(!r)m.handle=r=function(){return typeof l!=="undefined"&&!l.event.triggered?
l.event.handle.apply(r.elem,arguments):e};r.elem=f;for(var h=h.split(" "),u=0,q;o=h[u++];){m=k?l.extend({},k):{handler:i,data:j};o.indexOf(".")>-1?(q=o.split("."),o=q.shift(),m.namespace=q.slice(0).sort().join(".")):(q=[],m.namespace="");m.type=o;if(!m.guid)m.guid=i.guid;var p=n[o],s=l.event.special[o]||{};if(!p&&(p=n[o]=[],!s.setup||s.setup.call(f,j,q,r)===!1))f.addEventListener?f.addEventListener(o,r,!1):f.attachEvent&&f.attachEvent("on"+o,r);if(s.add&&(s.add.call(f,m),!m.handler.guid))m.handler.guid=
i.guid;p.push(m);l.event.global[o]=!0}f=null}}},global:{},remove:function(c,e,f,h){if(!(c.nodeType===3||c.nodeType===8)){f===!1&&(f=g);var i,j,k=0,m,o,n,r,u,q,p=c.nodeType?"events":"__events__",s=l.data(c),v=s&&s[p];if(s&&v){if(typeof v==="function")s=v,v=v.events;if(e&&e.type)f=e.handler,e=e.type;if(!e||typeof e==="string"&&e.charAt(0)===".")for(i in e=e||"",v)l.event.remove(c,i+e);else{for(e=e.split(" ");i=e[k++];)if(r=i,m=i.indexOf(".")<0,o=[],m||(o=i.split("."),i=o.shift(),n=RegExp("(^|\\.)"+
l.map(o.slice(0).sort(),G).join("\\.(?:.*\\.)?")+"(\\.|$)")),u=v[i])if(f){r=l.event.special[i]||{};for(j=h||0;j<u.length;j++)if(q=u[j],f.guid===q.guid){if(m||n.test(q.namespace))h==null&&u.splice(j--,1),r.remove&&r.remove.call(c,q);if(h!=null)break}if(u.length===0||h!=null&&u.length===1)(!r.teardown||r.teardown.call(c,o)===!1)&&l.removeEvent(c,i,s.handle),delete v[i]}else for(j=0;j<u.length;j++)if(q=u[j],m||n.test(q.namespace))l.event.remove(c,r,q.handler,j),u.splice(j--,1);if(l.isEmptyObject(v)){if(e=
s.handle)e.elem=null;delete s.events;delete s.handle;typeof s==="function"?l.removeData(c,p):l.isEmptyObject(s)&&l.removeData(c)}}}}},trigger:function(c,f,h,g){var i=c.type||c;if(!g){c=typeof c==="object"?c[l.expando]?c:l.extend(l.Event(i),c):l.Event(i);if(i.indexOf("!")>=0)c.type=i=i.slice(0,-1),c.exclusive=!0;h||(c.stopPropagation(),l.event.global[i]&&l.each(l.cache,function(){this.events&&this.events[i]&&l.event.trigger(c,f,this.handle.elem)}));if(!h||h.nodeType===3||h.nodeType===8)return e;c.result=
e;c.target=h;f=l.makeArray(f);f.unshift(c)}c.currentTarget=h;(g=h.nodeType?l.data(h,"handle"):(l.data(h,"__events__")||{}).handle)&&g.apply(h,f);g=h.parentNode||h.ownerDocument;try{if((!h||!h.nodeName||!l.noData[h.nodeName.toLowerCase()])&&h["on"+i]&&h["on"+i].apply(h,f)===!1)c.result=!1,c.preventDefault()}catch(j){}if(!c.isPropagationStopped()&&g)l.event.trigger(c,f,g,!0);else if(!c.isDefaultPrevented()){var k,g=c.target,m=i.replace(F,""),o=l.nodeName(g,"a")&&m==="click",n=l.event.special[m]||{};
if((!n._default||n._default.call(h,c)===!1)&&!o&&(!g||!g.nodeName||!l.noData[g.nodeName.toLowerCase()])){try{if(g[m]){if(k=g["on"+m])g["on"+m]=null;l.event.triggered=!0;g[m]()}}catch(r){}k&&(g["on"+m]=k);l.event.triggered=!1}}},handle:function(f){var h,g,i,j;g=[];var k=l.makeArray(arguments),f=k[0]=l.event.fix(f||c.event);f.currentTarget=this;h=f.type.indexOf(".")<0&&!f.exclusive;if(!h)i=f.type.split("."),f.type=i.shift(),g=i.slice(0).sort(),i=RegExp("(^|\\.)"+g.join("\\.(?:.*\\.)?")+"(\\.|$)");f.namespace=
f.namespace||g.join(".");j=l.data(this,this.nodeType?"events":"__events__");if(typeof j==="function")j=j.events;g=(j||{})[f.type];if(j&&g){g=g.slice(0);j=0;for(var m=g.length;j<m;j++){var o=g[j];if(h||i.test(o.namespace)){f.handler=o.handler;f.data=o.data;f.handleObj=o;o=o.handler.apply(this,k);if(o!==e)f.result=o,o===!1&&(f.preventDefault(),f.stopPropagation());if(f.isImmediatePropagationStopped())break}}}return f.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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(c){if(c[l.expando])return c;for(var f=c,c=l.Event(f),h=this.props.length,g;h;)g=this.props[--h],c[g]=f[g];if(!c.target)c.target=c.srcElement||q;if(c.target.nodeType===3)c.target=c.target.parentNode;if(!c.relatedTarget&&c.fromElement)c.relatedTarget=c.fromElement===c.target?c.toElement:c.fromElement;if(c.pageX==null&&c.clientX!=null)f=q.documentElement,h=q.body,c.pageX=c.clientX+(f&&f.scrollLeft||h&&h.scrollLeft||0)-(f&&f.clientLeft||h&&h.clientLeft||0),c.pageY=c.clientY+(f&&f.scrollTop||
h&&h.scrollTop||0)-(f&&f.clientTop||h&&h.clientTop||0);if(c.which==null&&(c.charCode!=null||c.keyCode!=null))c.which=c.charCode!=null?c.charCode:c.keyCode;if(!c.metaKey&&c.ctrlKey)c.metaKey=c.ctrlKey;if(!c.which&&c.button!==e)c.which=c.button&1?1:c.button&2?3:c.button&4?2:0;return c},guid:1E8,proxy:l.proxy,special:{ready:{setup:l.bindReady,teardown:l.noop},live:{add:function(c){l.event.add(this,k(c.origType,c.selector),l.extend({},c,{handler:j,guid:c.handler.guid}))},remove:function(c){l.event.remove(this,
k(c.origType,c.selector),c)}},beforeunload:{setup:function(c,e,f){if(l.isWindow(this))this.onbeforeunload=f},teardown:function(c,e){if(this.onbeforeunload===e)this.onbeforeunload=null}}}};l.removeEvent=q.removeEventListener?function(c,e,f){c.removeEventListener&&c.removeEventListener(e,f,!1)}:function(c,e,f){c.detachEvent&&c.detachEvent("on"+e,f)};l.Event=function(c){if(!this.preventDefault)return new l.Event(c);c&&c.type?(this.originalEvent=c,this.type=c.type):this.type=c;this.timeStamp=l.now();
this[l.expando]=!0};l.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var c=this.originalEvent;if(c)c.preventDefault?c.preventDefault():c.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=i;var c=this.originalEvent;if(c)c.stopPropagation&&c.stopPropagation(),c.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g};var N=function(c){var e=
c.relatedTarget;try{for(;e&&e!==this;)e=e.parentNode;if(e!==this)c.type=c.data,l.event.handle.apply(this,arguments)}catch(f){}},D=function(c){c.type=c.data;l.event.handle.apply(this,arguments)};l.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(c,e){l.event.special[c]={setup:function(f){l.event.add(this,e,f&&f.selector?D:N,c)},teardown:function(c){l.event.remove(this,e,c&&c.selector?D:N)}}});if(!l.support.submitBubbles)l.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form")l.event.add(this,"click.specialSubmit",function(c){var f=c.target,g=f.type;if((g==="submit"||g==="image")&&l(f).closest("form").length)return c.liveFired=e,h("submit",this,arguments)}),l.event.add(this,"keypress.specialSubmit",function(c){var f=c.target,g=f.type;if((g==="text"||g==="password")&&l(f).closest("form").length&&c.keyCode===13)return c.liveFired=e,h("submit",this,arguments)});else return!1},teardown:function(){l.event.remove(this,".specialSubmit")}};if(!l.support.changeBubbles){var S,
X=function(c){var e=c.type,f=c.value;if(e==="radio"||e==="checkbox")f=c.checked;else if(e==="select-multiple")f=c.selectedIndex>-1?l.map(c.options,function(c){return c.selected}).join("-"):"";else if(c.nodeName.toLowerCase()==="select")f=c.selectedIndex;return f},P=function(c,f){var h=c.target,g,i;if(M.test(h.nodeName)&&!h.readOnly&&(g=l.data(h,"_change_data"),i=X(h),(c.type!=="focusout"||h.type!=="radio")&&l.data(h,"_change_data",i),!(g===e||i===g)))if(g!=null||i)return c.type="change",c.liveFired=
e,l.event.trigger(c,f,h)};l.event.special.change={filters:{focusout:P,beforedeactivate:P,click:function(c){var e=c.target,f=e.type;if(f==="radio"||f==="checkbox"||e.nodeName.toLowerCase()==="select")return P.call(this,c)},keydown:function(c){var e=c.target,f=e.type;if(c.keyCode===13&&e.nodeName.toLowerCase()!=="textarea"||c.keyCode===32&&(f==="checkbox"||f==="radio")||f==="select-multiple")return P.call(this,c)},beforeactivate:function(c){c=c.target;l.data(c,"_change_data",X(c))}},setup:function(){if(this.type===
"file")return!1;for(var c in S)l.event.add(this,c+".specialChange",S[c]);return M.test(this.nodeName)},teardown:function(){l.event.remove(this,".specialChange");return M.test(this.nodeName)}};S=l.event.special.change.filters;S.focus=S.beforeactivate}q.addEventListener&&l.each({focus:"focusin",blur:"focusout"},function(c,e){function f(c){c=l.event.fix(c);c.type=e;return l.event.trigger(c,null,c.target)}l.event.special[e]={setup:function(){J[e]++===0&&q.addEventListener(c,f,!0)},teardown:function(){--J[e]===
0&&q.removeEventListener(c,f,!0)}}});l.each(["bind","one"],function(c,f){l.fn[f]=function(c,h,g){if(typeof c==="object"){for(var i in c)this[f](i,h,c[i],g);return this}if(l.isFunction(h)||h===!1)g=h,h=e;var j=f==="one"?l.proxy(g,function(c){l(this).unbind(c,j);return g.apply(this,arguments)}):g;if(c==="unload"&&f!=="one")this.one(c,h,g);else{i=0;for(var k=this.length;i<k;i++)l.event.add(this[i],c,j,h)}return this}});l.fn.extend({unbind:function(c,e){if(typeof c==="object"&&!c.preventDefault)for(var f in c)this.unbind(f,
c[f]);else{f=0;for(var h=this.length;f<h;f++)l.event.remove(this[f],c,e)}return this},delegate:function(c,e,f,h){return this.live(e,f,h,c)},undelegate:function(c,e,f){return arguments.length===0?this.unbind("live"):this.die(e,null,f,c)},trigger:function(c,e){return this.each(function(){l.event.trigger(c,e,this)})},triggerHandler:function(c,e){if(this[0]){var f=l.Event(c);f.preventDefault();f.stopPropagation();l.event.trigger(f,e,this[0]);return f.result}},toggle:function(c){for(var e=arguments,f=
1;f<e.length;)l.proxy(c,e[f++]);return this.click(l.proxy(c,function(h){var g=(l.data(this,"lastToggle"+c.guid)||0)%f;l.data(this,"lastToggle"+c.guid,g+1);h.preventDefault();return e[g].apply(this,arguments)||!1}))},hover:function(c,e){return this.mouseenter(c).mouseleave(e||c)}});var Q={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};l.each(["live","die"],function(c,f){l.fn[f]=function(c,h,g,i){var j,m=0,y,o,n=i||this.selector,i=i?this:l(this.context);if(typeof c===
"object"&&!c.preventDefault){for(j in c)i[f](j,h,c[j],n);return this}l.isFunction(h)&&(g=h,h=e);for(c=(c||"").split(" ");(j=c[m++])!=null;)if(y=F.exec(j),o="",y&&(o=y[0],j=j.replace(F,"")),j==="hover")c.push("mouseenter"+o,"mouseleave"+o);else if(y=j,j==="focus"||j==="blur"?(c.push(Q[j]+o),j+=o):j=(Q[j]||j)+o,f==="live"){o=0;for(var r=i.length;o<r;o++)l.event.add(i[o],"live."+k(j,n),{data:h,selector:n,handler:g,origType:j,origHandler:g,preType:y})}else i.unbind("live."+k(j,n),g);return this}});l.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(c,e){l.fn[e]=function(c,f){f==null&&(f=c,c=null);return arguments.length>0?this.bind(e,c,f):this.trigger(e)};l.attrFn&&(l.attrFn[e]=!0)});c.attachEvent&&!c.addEventListener&&l(c).bind("unload",function(){for(var c in l.cache)if(l.cache[c].handle)try{l.event.remove(l.cache[c].handle.elem)}catch(e){}});(function(){function c(e,f,h,g,i,j){for(var i=0,k=g.length;i<k;i++){var l=g[i];if(l){for(var m=!1,l=l[e];l;){if(l.sizcache===h){m=g[l.sizset];break}if(l.nodeType===1&&!j)l.sizcache=h,l.sizset=
i;if(l.nodeName.toLowerCase()===f){m=l;break}l=l[e]}g[i]=m}}}function f(c,e,h,g,i,j){for(var i=0,k=g.length;i<k;i++){var l=g[i];if(l){for(var o=!1,l=l[c];l;){if(l.sizcache===h){o=g[l.sizset];break}if(l.nodeType===1){if(!j)l.sizcache=h,l.sizset=i;if(typeof e!=="string"){if(l===e){o=!0;break}}else if(m.filter(e,[l]).length>0){o=l;break}}l=l[c]}g[i]=o}}}var h=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,g=0,i=Object.prototype.toString,
j=!1,k=!0;[0,0].sort(function(){k=!1;return 0});var m=function(c,e,f,g){var f=f||[],j=e=e||q;if(e.nodeType!==1&&e.nodeType!==9)return[];if(!c||typeof c!=="string")return f;var k,l,y,O,r,u=!0,p=m.isXML(e),E=[],v=c;do if(h.exec(""),k=h.exec(v))if(v=k[3],E.push(k[1]),k[2]){O=k[3];break}while(k);if(E.length>1&&n.exec(c))if(E.length===2&&o.relative[E[0]])l=K(E[0]+E[1],e);else for(l=o.relative[E[0]]?[e]:m(E.shift(),e);E.length;)c=E.shift(),o.relative[c]&&(c+=E.shift()),l=K(c,l);else if(!g&&E.length>1&&
e.nodeType===9&&!p&&o.match.ID.test(E[0])&&!o.match.ID.test(E[E.length-1])&&(k=m.find(E.shift(),e,p),e=k.expr?m.filter(k.expr,k.set)[0]:k.set[0]),e){k=g?{expr:E.pop(),set:s(g)}:m.find(E.pop(),E.length===1&&(E[0]==="~"||E[0]==="+")&&e.parentNode?e.parentNode:e,p);l=k.expr?m.filter(k.expr,k.set):k.set;for(E.length>0?y=s(l):u=!1;E.length;)k=r=E.pop(),o.relative[r]?k=E.pop():r="",k==null&&(k=e),o.relative[r](y,k,p)}else y=[];y||(y=l);y||m.error(r||c);if(i.call(y)==="[object Array]")if(u)if(e&&e.nodeType===
1)for(c=0;y[c]!=null;c++)y[c]&&(y[c]===!0||y[c].nodeType===1&&m.contains(e,y[c]))&&f.push(l[c]);else for(c=0;y[c]!=null;c++)y[c]&&y[c].nodeType===1&&f.push(l[c]);else f.push.apply(f,y);else s(y,f);O&&(m(O,j,f,g),m.uniqueSort(f));return f};m.uniqueSort=function(c){if(v&&(j=k,c.sort(v),j))for(var e=1;e<c.length;e++)c[e]===c[e-1]&&c.splice(e--,1);return c};m.matches=function(c,e){return m(c,null,null,e)};m.matchesSelector=function(c,e){return m(e,null,null,[c]).length>0};m.find=function(c,e,f){var h;
if(!c)return[];for(var g=0,i=o.order.length;g<i;g++){var j,k=o.order[g];if(j=o.leftMatch[k].exec(c)){var l=j[1];j.splice(1,1);if(l.substr(l.length-1)!=="\\"&&(j[1]=(j[1]||"").replace(/\\/g,""),h=o.find[k](j,e,f),h!=null)){c=c.replace(o.match[k],"");break}}}h||(h=e.getElementsByTagName("*"));return{set:h,expr:c}};m.filter=function(c,f,h,g){for(var i,j,k=c,l=[],y=f,n=f&&f[0]&&m.isXML(f[0]);c&&f.length;){for(var O in o.filter)if((i=o.leftMatch[O].exec(c))!=null&&i[2]){var r,u,q=o.filter[O];u=i[1];j=
!1;i.splice(1,1);if(u.substr(u.length-1)!=="\\"){y===l&&(l=[]);if(o.preFilter[O])if(i=o.preFilter[O](i,y,h,l,g,n)){if(i===!0)continue}else j=r=!0;if(i)for(var s=0;(u=y[s])!=null;s++)if(u){r=q(u,i,s,y);var p=g^!!r;h&&r!=null?p?j=!0:y[s]=!1:p&&(l.push(u),j=!0)}if(r!==e){h||(y=l);c=c.replace(o.match[O],"");if(!j)return[];break}}}if(c===k)if(j==null)m.error(c);else break;k=c}return y};m.error=function(c){throw"Syntax error, unrecognized expression: "+c;};var o=m.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(c){return c.getAttribute("href")}},
relative:{"+":function(c,e){var f=typeof e==="string",h=f&&!/\W/.test(e),f=f&&!h;h&&(e=e.toLowerCase());for(var h=0,g=c.length,i;h<g;h++)if(i=c[h]){for(;(i=i.previousSibling)&&i.nodeType!==1;);c[h]=f||i&&i.nodeName.toLowerCase()===e?i||!1:i===e}f&&m.filter(e,c,!0)},">":function(c,e){var f,h=typeof e==="string",g=0,i=c.length;if(h&&!/\W/.test(e))for(e=e.toLowerCase();g<i;g++){if(f=c[g])f=f.parentNode,c[g]=f.nodeName.toLowerCase()===e?f:!1}else{for(;g<i;g++)if(f=c[g])c[g]=h?f.parentNode:f.parentNode===
e;h&&m.filter(e,c,!0)}},"":function(e,h,i){var j,k=g++,l=f;typeof h==="string"&&!/\W/.test(h)&&(j=h=h.toLowerCase(),l=c);l("parentNode",h,k,e,j,i)},"~":function(e,h,i){var j,k=g++,l=f;typeof h==="string"&&!/\W/.test(h)&&(j=h=h.toLowerCase(),l=c);l("previousSibling",h,k,e,j,i)}},find:{ID:function(c,e,f){if(typeof e.getElementById!=="undefined"&&!f)return(c=e.getElementById(c[1]))&&c.parentNode?[c]:[]},NAME:function(c,e){if(typeof e.getElementsByName!=="undefined"){for(var f=[],h=e.getElementsByName(c[1]),
g=0,i=h.length;g<i;g++)h[g].getAttribute("name")===c[1]&&f.push(h[g]);return f.length===0?null:f}},TAG:function(c,e){return e.getElementsByTagName(c[1])}},preFilter:{CLASS:function(c,e,f,h,g,i){c=" "+c[1].replace(/\\/g,"")+" ";if(i)return c;for(var i=0,j;(j=e[i])!=null;i++)j&&(g^(j.className&&(" "+j.className+" ").replace(/[\t\n]/g," ").indexOf(c)>=0)?f||h.push(j):f&&(e[i]=!1));return!1},ID:function(c){return c[1].replace(/\\/g,"")},TAG:function(c){return c[1].toLowerCase()},CHILD:function(c){if(c[1]===
"nth"){var e=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(c[2]==="even"&&"2n"||c[2]==="odd"&&"2n+1"||!/\D/.test(c[2])&&"0n+"+c[2]||c[2]);c[2]=e[1]+(e[2]||1)-0;c[3]=e[3]-0}c[0]=g++;return c},ATTR:function(c,e,f,h,g,i){e=c[1].replace(/\\/g,"");!i&&o.attrMap[e]&&(c[1]=o.attrMap[e]);c[2]==="~="&&(c[4]=" "+c[4]+" ");return c},PSEUDO:function(c,e,f,g,i){if(c[1]==="not")if((h.exec(c[3])||"").length>1||/^\w/.test(c[3]))c[3]=m(c[3],null,null,e);else return c=m.filter(c[3],e,f,1^i),f||g.push.apply(g,c),!1;else if(o.match.POS.test(c[0])||
o.match.CHILD.test(c[0]))return!0;return c},POS:function(c){c.unshift(!0);return c}},filters:{enabled:function(c){return c.disabled===!1&&c.type!=="hidden"},disabled:function(c){return c.disabled===!0},checked:function(c){return c.checked===!0},selected:function(c){return c.selected===!0},parent:function(c){return!!c.firstChild},empty:function(c){return!c.firstChild},has:function(c,e,f){return!!m(f[3],c).length},header:function(c){return/h\d/i.test(c.nodeName)},text:function(c){return"text"===c.type},
radio:function(c){return"radio"===c.type},checkbox:function(c){return"checkbox"===c.type},file:function(c){return"file"===c.type},password:function(c){return"password"===c.type},submit:function(c){return"submit"===c.type},image:function(c){return"image"===c.type},reset:function(c){return"reset"===c.type},button:function(c){return"button"===c.type||c.nodeName.toLowerCase()==="button"},input:function(c){return/input|select|textarea|button/i.test(c.nodeName)}},setFilters:{first:function(c,e){return e===
0},last:function(c,e,f,h){return e===h.length-1},even:function(c,e){return e%2===0},odd:function(c,e){return e%2===1},lt:function(c,e,f){return e<f[3]-0},gt:function(c,e,f){return e>f[3]-0},nth:function(c,e,f){return f[3]-0===e},eq:function(c,e,f){return f[3]-0===e}},filter:{PSEUDO:function(c,e,f,h){var g=e[1],i=o.filters[g];if(i)return i(c,f,e,h);else if(g==="contains")return(c.textContent||c.innerText||m.getText([c])||"").indexOf(e[3])>=0;else if(g==="not"){e=e[3];f=0;for(h=e.length;f<h;f++)if(e[f]===
c)return!1;return!0}else m.error("Syntax error, unrecognized expression: "+g)},CHILD:function(c,e){var f=e[1],h=c;switch(f){case "only":case "first":for(;h=h.previousSibling;)if(h.nodeType===1)return!1;if(f==="first")return!0;h=c;case "last":for(;h=h.nextSibling;)if(h.nodeType===1)return!1;return!0;case "nth":var f=e[2],g=e[3];if(f===1&&g===0)return!0;var i=e[0],j=c.parentNode;if(j&&(j.sizcache!==i||!c.nodeIndex)){for(var k=0,h=j.firstChild;h;h=h.nextSibling)if(h.nodeType===1)h.nodeIndex=++k;j.sizcache=
i}h=c.nodeIndex-g;return f===0?h===0:h%f===0&&h/f>=0}},ID:function(c,e){return c.nodeType===1&&c.getAttribute("id")===e},TAG:function(c,e){return e==="*"&&c.nodeType===1||c.nodeName.toLowerCase()===e},CLASS:function(c,e){return(" "+(c.className||c.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(c,e){var f=e[1],f=o.attrHandle[f]?o.attrHandle[f](c):c[f]!=null?c[f]:c.getAttribute(f),h=f+"",g=e[2],i=e[4];return f==null?g==="!=":g==="="?h===i:g==="*="?h.indexOf(i)>=0:g==="~="?(" "+h+" ").indexOf(i)>=
0:!i?h&&f!==!1:g==="!="?h!==i:g==="^="?h.indexOf(i)===0:g==="$="?h.substr(h.length-i.length)===i:g==="|="?h===i||h.substr(0,i.length+1)===i+"-":!1},POS:function(c,e,f,h){var g=o.setFilters[e[2]];if(g)return g(c,f,e,h)}}},n=o.match.POS,r=function(c,e){return"\\"+(e-0+1)},u;for(u in o.match)o.match[u]=RegExp(o.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[u]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[u].source.replace(/\\(\d+)/g,r));var s=function(c,e){c=Array.prototype.slice.call(c,
0);if(e)return e.push.apply(e,c),e;return c};try{Array.prototype.slice.call(q.documentElement.childNodes,0)}catch(p){s=function(c,e){var f=0,h=e||[];if(i.call(c)==="[object Array]")Array.prototype.push.apply(h,c);else if(typeof c.length==="number")for(var g=c.length;f<g;f++)h.push(c[f]);else for(;c[f];f++)h.push(c[f]);return h}}var v,w;q.documentElement.compareDocumentPosition?v=function(c,e){if(c===e)return j=!0,0;if(!c.compareDocumentPosition||!e.compareDocumentPosition)return c.compareDocumentPosition?
-1:1;return c.compareDocumentPosition(e)&4?-1:1}:(v=function(c,e){var f,h,g=[],i=[];f=c.parentNode;h=e.parentNode;var k=f;if(c===e)return j=!0,0;else if(f===h)return w(c,e);else if(f){if(!h)return 1}else return-1;for(;k;)g.unshift(k),k=k.parentNode;for(k=h;k;)i.unshift(k),k=k.parentNode;f=g.length;h=i.length;for(k=0;k<f&&k<h;k++)if(g[k]!==i[k])return w(g[k],i[k]);return k===f?w(c,i[k],-1):w(g[k],e,1)},w=function(c,e,f){if(c===e)return f;for(c=c.nextSibling;c;){if(c===e)return-1;c=c.nextSibling}return 1});
m.getText=function(c){for(var e="",f,h=0;c[h];h++)f=c[h],f.nodeType===3||f.nodeType===4?e+=f.nodeValue:f.nodeType!==8&&(e+=m.getText(f.childNodes));return e};(function(){var c=q.createElement("div"),f="script"+(new Date).getTime(),h=q.documentElement;c.innerHTML="<a name='"+f+"'/>";h.insertBefore(c,h.firstChild);if(q.getElementById(f))o.find.ID=function(c,f,h){if(typeof f.getElementById!=="undefined"&&!h)return(f=f.getElementById(c[1]))?f.id===c[1]||typeof f.getAttributeNode!=="undefined"&&f.getAttributeNode("id").nodeValue===
c[1]?[f]:e:[]},o.filter.ID=function(c,e){var f=typeof c.getAttributeNode!=="undefined"&&c.getAttributeNode("id");return c.nodeType===1&&f&&f.nodeValue===e};h.removeChild(c);h=c=null})();(function(){var c=q.createElement("div");c.appendChild(q.createComment(""));if(c.getElementsByTagName("*").length>0)o.find.TAG=function(c,e){var f=e.getElementsByTagName(c[1]);if(c[1]==="*"){for(var h=[],g=0;f[g];g++)f[g].nodeType===1&&h.push(f[g]);f=h}return f};c.innerHTML="<a href='#'></a>";if(c.firstChild&&typeof c.firstChild.getAttribute!==
"undefined"&&c.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(c){return c.getAttribute("href",2)};c=null})();q.querySelectorAll&&function(){var c=m,e=q.createElement("div");e.innerHTML="<p class='TEST'></p>";if(!(e.querySelectorAll&&e.querySelectorAll(".TEST").length===0)){m=function(e,f,h,g){f=f||q;e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!g&&!m.isXML(f))if(f.nodeType===9)try{return s(f.querySelectorAll(e),h)}catch(i){}else if(f.nodeType===1&&f.nodeName.toLowerCase()!==
"object"){var j=f.getAttribute("id"),k=j||"__sizzle__";j||f.setAttribute("id",k);try{return s(f.querySelectorAll("#"+k+" "+e),h)}catch(l){}finally{j||f.removeAttribute("id")}}return c(e,f,h,g)};for(var f in c)m[f]=c[f];e=null}}();(function(){var c=q.documentElement,e=c.matchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.msMatchesSelector,f=!1;try{e.call(q.documentElement,"[test!='']:sizzle")}catch(h){f=!0}if(e)m.matchesSelector=function(c,h){h=h.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!m.isXML(c))try{if(f||!o.match.PSEUDO.test(h)&&!/!=/.test(h))return e.call(c,h)}catch(g){}return m(h,null,null,[c]).length>0}})();(function(){var c=q.createElement("div");c.innerHTML="<div class='test e'></div><div class='test'></div>";if(c.getElementsByClassName&&c.getElementsByClassName("e").length!==0&&(c.lastChild.className="e",c.getElementsByClassName("e").length!==1))o.order.splice(1,0,"CLASS"),o.find.CLASS=function(c,e,f){if(typeof e.getElementsByClassName!=="undefined"&&!f)return e.getElementsByClassName(c[1])},
c=null})();m.contains=q.documentElement.contains?function(c,e){return c!==e&&(c.contains?c.contains(e):!0)}:q.documentElement.compareDocumentPosition?function(c,e){return!!(c.compareDocumentPosition(e)&16)}:function(){return!1};m.isXML=function(c){return(c=(c?c.ownerDocument||c:0).documentElement)?c.nodeName!=="HTML":!1};var K=function(c,e){for(var f,h=[],g="",i=e.nodeType?[e]:e;f=o.match.PSEUDO.exec(c);)g+=f[0],c=c.replace(o.match.PSEUDO,"");c=o.relative[c]?c+"*":c;f=0;for(var j=i.length;f<j;f++)m(c,
i[f],h);return m.filter(g,h)};l.find=m;l.expr=m.selectors;l.expr[":"]=l.expr.filters;l.unique=m.uniqueSort;l.text=m.getText;l.isXMLDoc=m.isXML;l.contains=m.contains})();var Y=/Until$/,Ca=/^(?:parents|prevUntil|prevAll)/,Da=/,/,va=/^.[^:#\[\.,]*$/,Ea=Array.prototype.slice,Fa=l.expr.match.POS;l.fn.extend({find:function(c){for(var e=this.pushStack("","find",c),f=0,h=0,g=this.length;h<g;h++)if(f=e.length,l.find(c,this[h],e),h>0)for(var i=f;i<e.length;i++)for(var j=0;j<f;j++)if(e[j]===e[i]){e.splice(i--,
1);break}return e},has:function(c){var e=l(c);return this.filter(function(){for(var c=0,f=e.length;c<f;c++)if(l.contains(this,e[c]))return!0})},not:function(c){return this.pushStack(n(this,c,!1),"not",c)},filter:function(c){return this.pushStack(n(this,c,!0),"filter",c)},is:function(c){return!!c&&l.filter(c,this).length>0},closest:function(c,e){var f=[],h,g,i=this[0];if(l.isArray(c)){var j,k={},m=1;if(i&&c.length){h=0;for(g=c.length;h<g;h++)j=c[h],k[j]||(k[j]=l.expr.match.POS.test(j)?l(j,e||this.context):
j);for(;i&&i.ownerDocument&&i!==e;){for(j in k)h=k[j],(h.jquery?h.index(i)>-1:l(i).is(h))&&f.push({selector:j,elem:i,level:m});i=i.parentNode;m++}}return f}j=Fa.test(c)?l(c,e||this.context):null;h=0;for(g=this.length;h<g;h++)for(i=this[h];i;)if(j?j.index(i)>-1:l.find.matchesSelector(i,c)){f.push(i);break}else if(i=i.parentNode,!i||!i.ownerDocument||i===e)break;f=f.length>1?l.unique(f):f;return this.pushStack(f,"closest",c)},index:function(c){if(!c||typeof c==="string")return l.inArray(this[0],c?l(c):
this.parent().children());return l.inArray(c.jquery?c[0]:c,this)},add:function(c,e){var f=typeof c==="string"?l(c,e||this.context):l.makeArray(c),h=l.merge(this.get(),f);return this.pushStack(!f[0]||!f[0].parentNode||f[0].parentNode.nodeType===11||!h[0]||!h[0].parentNode||h[0].parentNode.nodeType===11?h:l.unique(h))},andSelf:function(){return this.add(this.prevObject)}});l.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return l.dir(c,"parentNode")},parentsUntil:function(c,
e,f){return l.dir(c,"parentNode",f)},next:function(c){return l.nth(c,2,"nextSibling")},prev:function(c){return l.nth(c,2,"previousSibling")},nextAll:function(c){return l.dir(c,"nextSibling")},prevAll:function(c){return l.dir(c,"previousSibling")},nextUntil:function(c,e,f){return l.dir(c,"nextSibling",f)},prevUntil:function(c,e,f){return l.dir(c,"previousSibling",f)},siblings:function(c){return l.sibling(c.parentNode.firstChild,c)},children:function(c){return l.sibling(c.firstChild)},contents:function(c){return l.nodeName(c,
"iframe")?c.contentDocument||c.contentWindow.document:l.makeArray(c.childNodes)}},function(c,e){l.fn[c]=function(f,h){var g=l.map(this,e,f);Y.test(c)||(h=f);h&&typeof h==="string"&&(g=l.filter(h,g));g=this.length>1?l.unique(g):g;if((this.length>1||Da.test(h))&&Ca.test(c))g=g.reverse();return this.pushStack(g,c,Ea.call(arguments).join(","))}});l.extend({filter:function(c,e,f){f&&(c=":not("+c+")");return e.length===1?l.find.matchesSelector(e[0],c)?[e[0]]:[]:l.find.matches(c,e)},dir:function(c,f,h){for(var g=
[],c=c[f];c&&c.nodeType!==9&&(h===e||c.nodeType!==1||!l(c).is(h));)c.nodeType===1&&g.push(c),c=c[f];return g},nth:function(c,e,f){for(var e=e||1,h=0;c;c=c[f])if(c.nodeType===1&&++h===e)break;return c},sibling:function(c,e){for(var f=[];c;c=c.nextSibling)c.nodeType===1&&c!==e&&f.push(c);return f}});var ka=/ jQuery\d+="(?:\d+|null)"/g,ca=/^\s+/,la=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ma=/<([\w:]+)/,Ga=/<tbody/i,Ha=/<|&#?\w+;/,na=/<(?:script|object|embed|option|style)/i,
oa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=/\=([^="'>\s]+\/)>/g,L={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,"",""]};L.optgroup=L.option;L.tbody=L.tfoot=L.colgroup=L.caption=L.thead;L.th=L.td;if(!l.support.htmlSerialize)L._default=
[1,"div<div>","</div>"];l.fn.extend({text:function(c){if(l.isFunction(c))return this.each(function(e){var f=l(this);f.text(c.call(this,e,f.text()))});if(typeof c!=="object"&&c!==e)return this.empty().append((this[0]&&this[0].ownerDocument||q).createTextNode(c));return l.text(this)},wrapAll:function(c){if(l.isFunction(c))return this.each(function(e){l(this).wrapAll(c.call(this,e))});if(this[0]){var e=l(c,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]);e.map(function(){for(var c=
this;c.firstChild&&c.firstChild.nodeType===1;)c=c.firstChild;return c}).append(this)}return this},wrapInner:function(c){if(l.isFunction(c))return this.each(function(e){l(this).wrapInner(c.call(this,e))});return this.each(function(){var e=l(this),f=e.contents();f.length?f.wrapAll(c):e.append(c)})},wrap:function(c){return this.each(function(){l(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){l.nodeName(this,"body")||l(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
!0,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,!0,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this)});else if(arguments.length){var c=l(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
!1,function(c){this.parentNode.insertBefore(c,this.nextSibling)});else if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,l(arguments[0]).toArray());return c}},remove:function(c,e){for(var f=0,h;(h=this[f])!=null;f++)if(!c||l.filter(c,[h]).length)!e&&h.nodeType===1&&(l.cleanData(h.getElementsByTagName("*")),l.cleanData([h])),h.parentNode&&h.parentNode.removeChild(h);return this},empty:function(){for(var c=0,e;(e=this[c])!=null;c++)for(e.nodeType===1&&l.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);
return this},clone:function(c){var e=this.map(function(){if(!l.support.noCloneEvent&&!l.isXMLDoc(this)){var c=this.outerHTML,e=this.ownerDocument;if(!c)c=e.createElement("div"),c.appendChild(this.cloneNode(!0)),c=c.innerHTML;return l.clean([c.replace(ka,"").replace(Ia,'="$1">').replace(ca,"")],e)[0]}else return this.cloneNode(!0)});c===!0&&(m(this,e),m(this.find("*"),e.find("*")));return e},html:function(c){if(c===e)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ka,""):null;else if(typeof c===
"string"&&!na.test(c)&&(l.support.leadingWhitespace||!ca.test(c))&&!L[(ma.exec(c)||["",""])[1].toLowerCase()]){c=c.replace(la,"<$1></$2>");try{for(var f=0,h=this.length;f<h;f++)if(this[f].nodeType===1)l.cleanData(this[f].getElementsByTagName("*")),this[f].innerHTML=c}catch(g){this.empty().append(c)}}else l.isFunction(c)?this.each(function(e){var f=l(this);f.html(c.call(this,e,f.html()))}):this.empty().append(c);return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(l.isFunction(c))return this.each(function(e){var f=
l(this),h=f.html();f.replaceWith(c.call(this,e,h))});typeof c!=="string"&&(c=l(c).detach());return this.each(function(){var e=this.nextSibling,f=this.parentNode;l(this).remove();e?l(e).before(c):l(f).append(c)})}else return this.pushStack(l(l.isFunction(c)?c():c),"replaceWith",c)},detach:function(c){return this.remove(c,!0)},domManip:function(c,f,h){var g,i,j,k=c[0],m=[];if(!l.support.checkClone&&arguments.length===3&&typeof k==="string"&&oa.test(k))return this.each(function(){l(this).domManip(c,
f,h,!0)});if(l.isFunction(k))return this.each(function(g){var i=l(this);c[0]=k.call(this,g,f?i.html():e);i.domManip(c,f,h)});if(this[0]){g=k&&k.parentNode;g=l.support.parentNode&&g&&g.nodeType===11&&g.childNodes.length===this.length?{fragment:g}:l.buildFragment(c,this,m);j=g.fragment;if(i=j.childNodes.length===1?j=j.firstChild:j.firstChild){f=f&&l.nodeName(i,"tr");i=0;for(var o=this.length;i<o;i++)h.call(f?l.nodeName(this[i],"table")?this[i].getElementsByTagName("tbody")[0]||this[i].appendChild(this[i].ownerDocument.createElement("tbody")):
this[i]:this[i],i>0||g.cacheable||this.length>1?j.cloneNode(!0):j)}m.length&&l.each(m,p)}return this}});l.buildFragment=function(c,e,f){var h,g,i,e=e&&e[0]?e[0].ownerDocument||e[0]:q;if(c.length===1&&typeof c[0]==="string"&&c[0].length<512&&e===q&&!na.test(c[0])&&(l.support.checkClone||!oa.test(c[0])))if(g=!0,i=l.fragments[c[0]])i!==1&&(h=i);h||(h=e.createDocumentFragment(),l.clean(c,e,h,f));g&&(l.fragments[c[0]]=i?h:1);return{fragment:h,cacheable:g}};l.fragments={};l.each({appendTo:"append",prependTo:"prepend",
insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,e){l.fn[c]=function(f){var h=[],f=l(f),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1)return f[e](this[0]),this;else{for(var g=0,i=f.length;g<i;g++){var j=(g>0?this.clone(!0):this).get();l(f[g])[e](j);h=h.concat(j)}return this.pushStack(h,c,f.selector)}}});l.extend({clean:function(c,e,f,h){e=e||q;typeof e.createElement==="undefined"&&(e=e.ownerDocument||e[0]&&e[0].ownerDocument||
q);for(var g=[],i=0,j;(j=c[i])!=null;i++)if(typeof j==="number"&&(j+=""),j){if(typeof j==="string"&&!Ha.test(j))j=e.createTextNode(j);else if(typeof j==="string"){j=j.replace(la,"<$1></$2>");var k=(ma.exec(j)||["",""])[1].toLowerCase(),m=L[k]||L._default,o=m[0],n=e.createElement("div");for(n.innerHTML=m[1]+j+m[2];o--;)n=n.lastChild;if(!l.support.tbody){o=Ga.test(j);k=k==="table"&&!o?n.firstChild&&n.firstChild.childNodes:m[1]==="<table>"&&!o?n.childNodes:[];for(m=k.length-1;m>=0;--m)l.nodeName(k[m],
"tbody")&&!k[m].childNodes.length&&k[m].parentNode.removeChild(k[m])}!l.support.leadingWhitespace&&ca.test(j)&&n.insertBefore(e.createTextNode(ca.exec(j)[0]),n.firstChild);j=n.childNodes}j.nodeType?g.push(j):g=l.merge(g,j)}if(f)for(i=0;g[i];i++)h&&l.nodeName(g[i],"script")&&(!g[i].type||g[i].type.toLowerCase()==="text/javascript")?h.push(g[i].parentNode?g[i].parentNode.removeChild(g[i]):g[i]):(g[i].nodeType===1&&g.splice.apply(g,[i+1,0].concat(l.makeArray(g[i].getElementsByTagName("script")))),f.appendChild(g[i]));
return g},cleanData:function(c){for(var e,f,h=l.cache,g=l.event.special,i=l.support.deleteExpando,j=0,k;(k=c[j])!=null;j++)if(!k.nodeName||!l.noData[k.nodeName.toLowerCase()])if(f=k[l.expando]){if((e=h[f])&&e.events)for(var m in e.events)g[m]?l.event.remove(k,m):l.removeEvent(k,m,e.handle);i?delete k[l.expando]:k.removeAttribute&&k.removeAttribute(l.expando);delete h[f]}}});var pa=/alpha\([^)]*\)/i,Ja=/opacity=([^)]*)/,Ka=/-([a-z])/ig,La=/([A-Z])/g,qa=/^-?\d+(?:px)?$/i,Ma=/^-?\d/,Na={position:"absolute",
visibility:"hidden",display:"block"},wa=["Left","Right"],xa=["Top","Bottom"],Z,ra,da,Oa=function(c,e){return e.toUpperCase()};l.fn.css=function(c,f){if(arguments.length===2&&f===e)return this;return l.access(this,c,f,!0,function(c,f,h){return h!==e?l.style(c,f,h):l.css(c,f)})};l.extend({cssHooks:{opacity:{get:function(c,e){if(e){var f=Z(c,"opacity","opacity");return f===""?"1":f}else return c.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":l.support.cssFloat?
"cssFloat":"styleFloat"},style:function(c,f,h,g){if(c&&!(c.nodeType===3||c.nodeType===8||!c.style)){var i,j=l.camelCase(f),k=c.style,m=l.cssHooks[j],f=l.cssProps[j]||j;if(h!==e){if(!(typeof h==="number"&&isNaN(h)||h==null))if(typeof h==="number"&&!l.cssNumber[j]&&(h+="px"),!m||!("set"in m)||(h=m.set(c,h))!==e)try{k[f]=h}catch(o){}}else{if(m&&"get"in m&&(i=m.get(c,!1,g))!==e)return i;return k[f]}}},css:function(c,f,h){var g,i=l.camelCase(f),j=l.cssHooks[i],f=l.cssProps[i]||i;if(j&&"get"in j&&(g=j.get(c,
!0,h))!==e)return g;else if(Z)return Z(c,f,i)},swap:function(c,e,f){var h={},g;for(g in e)h[g]=c.style[g],c.style[g]=e[g];f.call(c);for(g in e)c.style[g]=h[g]},camelCase:function(c){return c.replace(Ka,Oa)}});l.curCSS=l.css;l.each(["height","width"],function(c,e){l.cssHooks[e]={get:function(c,f,h){var g;if(f){c.offsetWidth!==0?g=r(c,e,h):l.swap(c,Na,function(){g=r(c,e,h)});if(g<=0&&(g=Z(c,e,e),g==="0px"&&da&&(g=da(c,e,e)),g!=null))return g===""||g==="auto"?"0px":g;if(g<0||g==null)return g=c.style[e],
g===""||g==="auto"?"0px":g;return typeof g==="string"?g:g+"px"}},set:function(c,e){if(qa.test(e)){if(e=parseFloat(e),e>=0)return e+"px"}else return e}}});if(!l.support.opacity)l.cssHooks.opacity={get:function(c,e){return Ja.test((e&&c.currentStyle?c.currentStyle.filter:c.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(c,e){var f=c.style;f.zoom=1;var h=l.isNaN(e)?"":"alpha(opacity="+e*100+")",g=f.filter||"";f.filter=pa.test(g)?g.replace(pa,h):f.filter+" "+h}};q.defaultView&&
q.defaultView.getComputedStyle&&(ra=function(c,f,h){var g,h=h.replace(La,"-$1").toLowerCase();if(!(f=c.ownerDocument.defaultView))return e;if(f=f.getComputedStyle(c,null))g=f.getPropertyValue(h),g===""&&!l.contains(c.ownerDocument.documentElement,c)&&(g=l.style(c,h));return g});q.documentElement.currentStyle&&(da=function(c,e){var f,h,g=c.currentStyle&&c.currentStyle[e],i=c.style;if(!qa.test(g)&&Ma.test(g))f=i.left,h=c.runtimeStyle.left,c.runtimeStyle.left=c.currentStyle.left,i.left=e==="fontSize"?
"1em":g||0,g=i.pixelLeft+"px",i.left=f,c.runtimeStyle.left=h;return g===""?"auto":g});Z=ra||da;if(l.expr&&l.expr.filters)l.expr.filters.hidden=function(c){var e=c.offsetHeight;return c.offsetWidth===0&&e===0||!l.support.reliableHiddenOffsets&&(c.style.display||l.css(c,"display"))==="none"},l.expr.filters.visible=function(c){return!l.expr.filters.hidden(c)};var Pa=l.now(),Qa=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Ra=/^(?:select|textarea)/i,Sa=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
Ta=/^(?:GET|HEAD)$/,ya=/\[\]$/,U=/\=\?(&|$)/,ha=/\?/,Ua=/([?&])_=[^&]*/,Va=/^(\w+:)?\/\/([^\/?#]+)/,Wa=/%20/g,Xa=/#.*$/,sa=l.fn.load;l.fn.extend({load:function(c,e,f){if(typeof c!=="string"&&sa)return sa.apply(this,arguments);else if(!this.length)return this;var h=c.indexOf(" ");if(h>=0)var g=c.slice(h,c.length),c=c.slice(0,h);h="GET";e&&(l.isFunction(e)?(f=e,e=null):typeof e==="object"&&(e=l.param(e,l.ajaxSettings.traditional),h="POST"));var i=this;l.ajax({url:c,type:h,dataType:"html",data:e,complete:function(c,
e){if(e==="success"||e==="notmodified")i.html(g?l("<div>").append(c.responseText.replace(Qa,"")).find(g):c.responseText);f&&i.each(f,[c.responseText,e,c])}});return this},serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?l.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Ra.test(this.nodeName)||Sa.test(this.type))}).map(function(c,e){var f=l(this).val();return f==null?
null:l.isArray(f)?l.map(f,function(c){return{name:e.name,value:c}}):{name:e.name,value:f}}).get()}});l.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(c,e){l.fn[e]=function(c){return this.bind(e,c)}});l.extend({get:function(c,e,f,h){l.isFunction(e)&&(h=h||f,f=e,e=null);return l.ajax({type:"GET",url:c,data:e,success:f,dataType:h})},getScript:function(c,e){return l.get(c,null,e,"script")},getJSON:function(c,e,f){return l.get(c,e,f,"json")},post:function(c,e,
f,h){l.isFunction(e)&&(h=h||f,f=e,e={});return l.ajax({type:"POST",url:c,data:e,success:f,dataType:h})},ajaxSetup:function(c){l.extend(l.ajaxSettings,c)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,xhr:function(){return new c.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},
ajax:function(f){var h=l.extend(!0,{},l.ajaxSettings,f),g,i,j,k=h.type.toUpperCase(),m=Ta.test(k);h.url=h.url.replace(Xa,"");h.context=f&&f.context!=null?f.context:h;if(h.data&&h.processData&&typeof h.data!=="string")h.data=l.param(h.data,h.traditional);if(h.dataType==="jsonp"){if(k==="GET")U.test(h.url)||(h.url+=(ha.test(h.url)?"&":"?")+(h.jsonp||"callback")+"=?");else if(!h.data||!U.test(h.data))h.data=(h.data?h.data+"&":"")+(h.jsonp||"callback")+"=?";h.dataType="json"}if(h.dataType==="json"&&(h.data&&
U.test(h.data)||U.test(h.url))){g=h.jsonpCallback||"jsonp"+Pa++;if(h.data)h.data=(h.data+"").replace(U,"="+g+"$1");h.url=h.url.replace(U,"="+g+"$1");h.dataType="script";var o=c[g];c[g]=function(f){if(l.isFunction(o))o(f);else{c[g]=e;try{delete c[g]}catch(k){}}j=f;l.handleSuccess(h,w,i,j);l.handleComplete(h,w,i,j);u&&u.removeChild(s)}}if(h.dataType==="script"&&h.cache===null)h.cache=!1;if(h.cache===!1&&m){var n=l.now(),r=h.url.replace(Ua,"$1_="+n);h.url=r+(r===h.url?(ha.test(h.url)?"&":"?")+"_="+n:
"")}h.data&&m&&(h.url+=(ha.test(h.url)?"&":"?")+h.data);h.global&&l.active++===0&&l.event.trigger("ajaxStart");n=(n=Va.exec(h.url))&&(n[1]&&n[1].toLowerCase()!==location.protocol||n[2].toLowerCase()!==location.host);if(h.dataType==="script"&&k==="GET"&&n){var u=q.getElementsByTagName("head")[0]||q.documentElement,s=q.createElement("script");if(h.scriptCharset)s.charset=h.scriptCharset;s.src=h.url;if(!g){var p=!1;s.onload=s.onreadystatechange=function(){if(!p&&(!this.readyState||this.readyState===
"loaded"||this.readyState==="complete"))p=!0,l.handleSuccess(h,w,i,j),l.handleComplete(h,w,i,j),s.onload=s.onreadystatechange=null,u&&s.parentNode&&u.removeChild(s)}}u.insertBefore(s,u.firstChild);return e}var v=!1,w=h.xhr();if(w){h.username?w.open(k,h.url,h.async,h.username,h.password):w.open(k,h.url,h.async);try{(h.data!=null&&!m||f&&f.contentType)&&w.setRequestHeader("Content-Type",h.contentType),h.ifModified&&(l.lastModified[h.url]&&w.setRequestHeader("If-Modified-Since",l.lastModified[h.url]),
l.etag[h.url]&&w.setRequestHeader("If-None-Match",l.etag[h.url])),n||w.setRequestHeader("X-Requested-With","XMLHttpRequest"),w.setRequestHeader("Accept",h.dataType&&h.accepts[h.dataType]?h.accepts[h.dataType]+", */*; q=0.01":h.accepts._default)}catch(K){}if(h.beforeSend&&h.beforeSend.call(h.context,w,h)===!1)return h.global&&l.active--===1&&l.event.trigger("ajaxStop"),w.abort(),!1;h.global&&l.triggerGlobal(h,"ajaxSend",[w,h]);var H=w.onreadystatechange=function(c){if(!w||w.readyState===0||c==="abort"){if(v||
l.handleComplete(h,w,i,j),v=!0,w)w.onreadystatechange=l.noop}else if(!v&&w&&(w.readyState===4||c==="timeout")){v=!0;w.onreadystatechange=l.noop;i=c==="timeout"?"timeout":!l.httpSuccess(w)?"error":h.ifModified&&l.httpNotModified(w,h.url)?"notmodified":"success";var e;if(i==="success")try{j=l.httpData(w,h.dataType,h)}catch(f){i="parsererror",e=f}i==="success"||i==="notmodified"?g||l.handleSuccess(h,w,i,j):l.handleError(h,w,i,e);g||l.handleComplete(h,w,i,j);c==="timeout"&&w.abort();h.async&&(w=null)}};
try{var z=w.abort;w.abort=function(){w&&Function.prototype.call.call(z,w);H("abort")}}catch(x){}h.async&&h.timeout>0&&setTimeout(function(){w&&!v&&H("timeout")},h.timeout);try{w.send(m||h.data==null?null:h.data)}catch(I){l.handleError(h,w,null,I),l.handleComplete(h,w,i,j)}h.async||H();return w}},param:function(c,f){var h=[],g=function(c,e){e=l.isFunction(e)?e():e;h[h.length]=encodeURIComponent(c)+"="+encodeURIComponent(e)};if(f===e)f=l.ajaxSettings.traditional;if(l.isArray(c)||c.jquery)l.each(c,function(){g(this.name,
this.value)});else for(var i in c)o(i,c[i],f,g);return h.join("&").replace(Wa,"+")}});l.extend({active:0,lastModified:{},etag:{},handleError:function(c,e,f,h){c.error&&c.error.call(c.context,e,f,h);c.global&&l.triggerGlobal(c,"ajaxError",[e,c,h])},handleSuccess:function(c,e,f,h){c.success&&c.success.call(c.context,h,f,e);c.global&&l.triggerGlobal(c,"ajaxSuccess",[e,c])},handleComplete:function(c,e,f){c.complete&&c.complete.call(c.context,e,f);c.global&&l.triggerGlobal(c,"ajaxComplete",[e,c]);c.global&&
l.active--===1&&l.event.trigger("ajaxStop")},triggerGlobal:function(c,e,f){(c.context&&c.context.url==null?l(c.context):l.event).trigger(e,f)},httpSuccess:function(c){try{return!c.status&&location.protocol==="file:"||c.status>=200&&c.status<300||c.status===304||c.status===1223}catch(e){}return!1},httpNotModified:function(c,e){var f=c.getResponseHeader("Last-Modified"),h=c.getResponseHeader("Etag");f&&(l.lastModified[e]=f);h&&(l.etag[e]=h);return c.status===304},httpData:function(c,e,f){var h=c.getResponseHeader("content-type")||
"",g=e==="xml"||!e&&h.indexOf("xml")>=0,c=g?c.responseXML:c.responseText;g&&c.documentElement.nodeName==="parsererror"&&l.error("parsererror");f&&f.dataFilter&&(c=f.dataFilter(c,e));typeof c==="string"&&(e==="json"||!e&&h.indexOf("json")>=0?c=l.parseJSON(c):(e==="script"||!e&&h.indexOf("javascript")>=0)&&l.globalEval(c));return c}});if(c.ActiveXObject)l.ajaxSettings.xhr=function(){if(c.location.protocol!=="file:")try{return new c.XMLHttpRequest}catch(e){}try{return new c.ActiveXObject("Microsoft.XMLHTTP")}catch(f){}};
l.support.ajax=!!l.ajaxSettings.xhr();var ga={},Ya=/^(?:toggle|show|hide)$/,Za=/^([+\-]=)?([\d+.\-]+)(.*)$/,ea,ia=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];l.fn.extend({show:function(c,e,f){if(c||c===0)return this.animate(u("show",3),c,e,f);else{for(var f=0,h=this.length;f<h;f++){c=this[f];e=c.style.display;if(!l.data(c,"olddisplay")&&e==="none")e=c.style.display="";e===""&&l.css(c,"display")===
"none"&&l.data(c,"olddisplay",s(c.nodeName))}for(f=0;f<h;f++)if(c=this[f],e=c.style.display,e===""||e==="none")c.style.display=l.data(c,"olddisplay")||"";return this}},hide:function(c,e,f){if(c||c===0)return this.animate(u("hide",3),c,e,f);else{c=0;for(e=this.length;c<e;c++)f=l.css(this[c],"display"),f!=="none"&&l.data(this[c],"olddisplay",f);for(c=0;c<e;c++)this[c].style.display="none";return this}},_toggle:l.fn.toggle,toggle:function(c,e,f){var h=typeof c==="boolean";l.isFunction(c)&&l.isFunction(e)?
this._toggle.apply(this,arguments):c==null||h?this.each(function(){var e=h?c:l(this).is(":hidden");l(this)[e?"show":"hide"]()}):this.animate(u("toggle",3),c,e,f);return this},fadeTo:function(c,e,f,h){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},c,f,h)},animate:function(c,e,f,h){var g=l.speed(e,f,h);if(l.isEmptyObject(c))return this.each(g.complete);return this[g.queue===!1?"each":"queue"](function(){var e=l.extend({},g),f,h=this.nodeType===1,i=h&&l(this).is(":hidden"),
j=this;for(f in c){var k=l.camelCase(f);f!==k&&(c[k]=c[f],delete c[f],f=k);if(c[f]==="hide"&&i||c[f]==="show"&&!i)return e.complete.call(this);if(h&&(f==="height"||f==="width"))if(e.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],l.css(this,"display")==="inline"&&l.css(this,"float")==="none")l.support.inlineBlockNeedsLayout?s(this.nodeName)==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1):this.style.display="inline-block";if(l.isArray(c[f]))(e.specialEasing=
e.specialEasing||{})[f]=c[f][1],c[f]=c[f][0]}if(e.overflow!=null)this.style.overflow="hidden";e.curAnim=l.extend({},c);l.each(c,function(f,h){var g=new l.fx(j,e,f);if(Ya.test(h))g[h==="toggle"?i?"show":"hide":h](c);else{var k=Za.exec(h),m=g.cur()||0;if(k){var o=parseFloat(k[2]),n=k[3]||"px";n!=="px"&&(l.style(j,f,(o||1)+n),m*=(o||1)/g.cur(),l.style(j,f,m+n));k[1]&&(o=(k[1]==="-="?-1:1)*o+m);g.custom(m,o,n)}else g.custom(m,h,"")}});return!0})},stop:function(c,e){var f=l.timers;c&&this.queue([]);this.each(function(){for(var c=
f.length-1;c>=0;c--)f[c].elem===this&&(e&&f[c](!0),f.splice(c,1))});e||this.dequeue();return this}});l.each({slideDown:u("show",1),slideUp:u("hide",1),slideToggle:u("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,e){l.fn[c]=function(c,f,h){return this.animate(e,c,f,h)}});l.extend({speed:function(c,e,f){var h=c&&typeof c==="object"?l.extend({},c):{complete:f||!f&&e||l.isFunction(c)&&c,duration:c,easing:f&&e||e&&!l.isFunction(e)&&e};h.duration=
l.fx.off?0:typeof h.duration==="number"?h.duration:h.duration in l.fx.speeds?l.fx.speeds[h.duration]:l.fx.speeds._default;h.old=h.complete;h.complete=function(){h.queue!==!1&&l(this).dequeue();l.isFunction(h.old)&&h.old.call(this)};return h},easing:{linear:function(c,e,f,h){return f+h*c},swing:function(c,e,f,h){return(-Math.cos(c*Math.PI)/2+0.5)*h+f}},timers:[],fx:function(c,e,f){this.options=e;this.elem=c;this.prop=f;if(!e.orig)e.orig={}}});l.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,
this.now,this);(l.fx.step[this.prop]||l.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var c=parseFloat(l.css(this.elem,this.prop));return c&&c>-1E4?c:0},custom:function(c,e,f){function h(c){return g.step(c)}var g=this,i=l.fx;this.startTime=l.now();this.start=c;this.end=e;this.unit=f||this.unit||"px";this.now=this.start;this.pos=this.state=0;h.elem=this.elem;h()&&l.timers.push(h)&&!ea&&(ea=setInterval(i.tick,
i.interval))},show:function(){this.options.orig[this.prop]=l.style(this.elem,this.prop);this.options.show=!0;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());l(this.elem).show()},hide:function(){this.options.orig[this.prop]=l.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(c){var e=l.now(),f=!0;if(c||e>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=!0;for(var h in this.options.curAnim)this.options.curAnim[h]!==
!0&&(f=!1);if(f){if(this.options.overflow!=null&&!l.support.shrinkWrapBlocks){var g=this.elem,i=this.options;l.each(["","X","Y"],function(c,e){g.style["overflow"+e]=i.overflow[c]})}this.options.hide&&l(this.elem).hide();if(this.options.hide||this.options.show)for(var j in this.options.curAnim)l.style(this.elem,j,this.options.orig[j]);this.options.complete.call(this.elem)}return!1}else c=e-this.startTime,this.state=c/this.options.duration,e=this.options.easing||(l.easing.swing?"swing":"linear"),this.pos=
l.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||e](this.state,c,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}};l.extend(l.fx,{tick:function(){for(var c=l.timers,e=0;e<c.length;e++)c[e]()||c.splice(e--,1);c.length||l.fx.stop()},interval:13,stop:function(){clearInterval(ea);ea=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){l.style(c.elem,"opacity",c.now)},_default:function(c){c.elem.style&&c.elem.style[c.prop]!=
null?c.elem.style[c.prop]=(c.prop==="width"||c.prop==="height"?Math.max(0,c.now):c.now)+c.unit:c.elem[c.prop]=c.now}}});if(l.expr&&l.expr.filters)l.expr.filters.animated=function(c){return l.grep(l.timers,function(e){return c===e.elem}).length};var $a=/^t(?:able|d|h)$/i,ta=/^(?:body|html)$/i;l.fn.offset="getBoundingClientRect"in q.documentElement?function(c){var e=this[0],f;if(c)return this.each(function(e){l.offset.setOffset(this,c,e)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return l.offset.bodyOffset(e);
try{f=e.getBoundingClientRect()}catch(h){}var g=e.ownerDocument,i=g.documentElement;if(!f||!l.contains(i,e))return f||{top:0,left:0};e=g.body;g=v(g);return{top:f.top+(g.pageYOffset||l.support.boxModel&&i.scrollTop||e.scrollTop)-(i.clientTop||e.clientTop||0),left:f.left+(g.pageXOffset||l.support.boxModel&&i.scrollLeft||e.scrollLeft)-(i.clientLeft||e.clientLeft||0)}}:function(c){var e=this[0];if(c)return this.each(function(e){l.offset.setOffset(this,c,e)});if(!e||!e.ownerDocument)return null;if(e===
e.ownerDocument.body)return l.offset.bodyOffset(e);l.offset.initialize();var f,h=e.offsetParent,g=e.ownerDocument,i=g.documentElement,j=g.body;f=(g=g.defaultView)?g.getComputedStyle(e,null):e.currentStyle;for(var k=e.offsetTop,m=e.offsetLeft;(e=e.parentNode)&&e!==j&&e!==i;){if(l.offset.supportsFixedPosition&&f.position==="fixed")break;f=g?g.getComputedStyle(e,null):e.currentStyle;k-=e.scrollTop;m-=e.scrollLeft;if(e===h){k+=e.offsetTop;m+=e.offsetLeft;if(l.offset.doesNotAddBorder&&(!l.offset.doesAddBorderForTableAndCells||
!$a.test(e.nodeName)))k+=parseFloat(f.borderTopWidth)||0,m+=parseFloat(f.borderLeftWidth)||0;h=e.offsetParent}l.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"&&(k+=parseFloat(f.borderTopWidth)||0,m+=parseFloat(f.borderLeftWidth)||0)}if(f.position==="relative"||f.position==="static")k+=j.offsetTop,m+=j.offsetLeft;l.offset.supportsFixedPosition&&f.position==="fixed"&&(k+=Math.max(i.scrollTop,j.scrollTop),m+=Math.max(i.scrollLeft,j.scrollLeft));return{top:k,left:m}};l.offset={initialize:function(){var c=
q.body,e=q.createElement("div"),f,h,g,i=parseFloat(l.css(c,"marginTop"))||0;l.extend(e.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});e.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>";c.insertBefore(e,
c.firstChild);f=e.firstChild;h=f.firstChild;g=f.nextSibling.firstChild.firstChild;this.doesNotAddBorder=h.offsetTop!==5;this.doesAddBorderForTableAndCells=g.offsetTop===5;h.style.position="fixed";h.style.top="20px";this.supportsFixedPosition=h.offsetTop===20||h.offsetTop===15;h.style.position=h.style.top="";f.style.overflow="hidden";f.style.position="relative";this.subtractsBorderForOverflowNotVisible=h.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=c.offsetTop!==i;c.removeChild(e);l.offset.initialize=
l.noop},bodyOffset:function(c){var e=c.offsetTop,f=c.offsetLeft;l.offset.initialize();l.offset.doesNotIncludeMarginInBodyOffset&&(e+=parseFloat(l.css(c,"marginTop"))||0,f+=parseFloat(l.css(c,"marginLeft"))||0);return{top:e,left:f}},setOffset:function(c,e,f){var h=l.css(c,"position");if(h==="static")c.style.position="relative";var g=l(c),i=g.offset(),j=l.css(c,"top"),k=l.css(c,"left"),m=h==="absolute"&&l.inArray("auto",[j,k])>-1,h={},o={};m&&(o=g.position());j=m?o.top:parseInt(j,10)||0;k=m?o.left:
parseInt(k,10)||0;l.isFunction(e)&&(e=e.call(c,f,i));if(e.top!=null)h.top=e.top-i.top+j;if(e.left!=null)h.left=e.left-i.left+k;"using"in e?e.using.call(c,h):g.css(h)}};l.fn.extend({position:function(){if(!this[0])return null;var c=this[0],e=this.offsetParent(),f=this.offset(),h=ta.test(e[0].nodeName)?{top:0,left:0}:e.offset();f.top-=parseFloat(l.css(c,"marginTop"))||0;f.left-=parseFloat(l.css(c,"marginLeft"))||0;h.top+=parseFloat(l.css(e[0],"borderTopWidth"))||0;h.left+=parseFloat(l.css(e[0],"borderLeftWidth"))||
0;return{top:f.top-h.top,left:f.left-h.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||q.body;c&&!ta.test(c.nodeName)&&l.css(c,"position")==="static";)c=c.offsetParent;return c})}});l.each(["Left","Top"],function(c,f){var h="scroll"+f;l.fn[h]=function(f){var g=this[0],i;if(!g)return null;return f!==e?this.each(function(){(i=v(this))?i.scrollTo(!c?f:l(i).scrollLeft(),c?f:l(i).scrollTop()):this[h]=f}):(i=v(g))?"pageXOffset"in i?i[c?"pageYOffset":"pageXOffset"]:
l.support.boxModel&&i.document.documentElement[h]||i.document.body[h]:g[h]}});l.each(["Height","Width"],function(c,f){var h=f.toLowerCase();l.fn["inner"+f]=function(){return this[0]?parseFloat(l.css(this[0],h,"padding")):null};l.fn["outer"+f]=function(c){return this[0]?parseFloat(l.css(this[0],h,c?"margin":"border")):null};l.fn[h]=function(c){var g=this[0];if(!g)return c==null?null:this;if(l.isFunction(c))return this.each(function(e){var f=l(this);f[h](c.call(this,e,f[h]()))});if(l.isWindow(g))return g.document.compatMode===
"CSS1Compat"&&g.document.documentElement["client"+f]||g.document.body["client"+f];else if(g.nodeType===9)return Math.max(g.documentElement["client"+f],g.body["scroll"+f],g.documentElement["scroll"+f],g.body["offset"+f],g.documentElement["offset"+f]);else if(c===e){var g=l.css(g,h),i=parseFloat(g);return l.isNaN(i)?g:i}else return this.css(h,typeof c==="string"?c:c+"px")}})})(window);jQuery(document).ready(function(){$("a.feedback").click(function(){show_feedback();return!1})});
function show_feedback(){$("#feedback_div").dialog({buttons:{Send:function(){$("#feedback_textarea").val().length>0?ajaxSendFeedback("POST","/feedback/",$("#feedback_form").serialize()):alert("Please type your feedback.")},Close:function(){$("#feedback_div").dialog("close")}},modal:!0,draggable:!1,resizable:!1,autoOpen:!1,title:"Send us your Feedback"});$("#feedback_div").dialog("enable");$("#feedback_div").dialog("open");$("#feedback_textarea").focus()}
function ajaxSendFeedback(c,e,f){$("#feedback_loader").show();$.ajax({type:c,url:e,data:f,dataType:"json",success:function(c){c=c.result;$("#feedback_response").html(c);c=="Message Sent"&&($("#feedback_loader").hide(),alert("Your feedback was successfully sent.  Thank you."),$("#feedback_div").dialog("close"))},error:function(){$("#feedback_loader").hide();alert("An error has occurred in sending your feedback.  Please try again.");$("#feedback_div").dialog("enable")}});$("#feedback_div").dialog("disable")}
;(function(c,e){function f(e){return!c(e).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};c.ui.version||(c.extend(c.ui,{version:"1.8.9",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}}),c.fn.extend({_focus:c.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var h=this;setTimeout(function(){c(h).focus();f&&f.call(h)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;e=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!e.length?c(document):e},zIndex:function(f){if(f!==e)return this.css("zIndex",f);if(this.length)for(var f=c(this[0]),i;f.length&&f[0]!==document;){i=f.css("position");if(i===
"absolute"||i==="relative"||i==="fixed")if(i=parseInt(f.css("zIndex"),10),!isNaN(i)&&i!==0)return i;f=f.parent()}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),c.each(["Width","Height"],function(f,i){function h(e,f,h,g){c.each(j,function(){f-=parseFloat(c.curCSS(e,"padding"+this,!0))||0;h&&(f-=parseFloat(c.curCSS(e,
"border"+this+"Width",!0))||0);g&&(f-=parseFloat(c.curCSS(e,"margin"+this,!0))||0)});return f}var j=i==="Width"?["Left","Right"]:["Top","Bottom"],k=i.toLowerCase(),n={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+i]=function(f){if(f===e)return n["inner"+i].call(this);return this.each(function(){c(this).css(k,h(this,f)+"px")})};c.fn["outer"+i]=function(e,f){if(typeof e!=="number")return n["outer"+i].call(this,e);return this.each(function(){c(this).css(k,
h(this,e,!0,f)+"px")})}}),c.extend(c.expr[":"],{data:function(e,f,h){return!!c.data(e,h[3])},focusable:function(e){var i=e.nodeName.toLowerCase(),h=c.attr(e,"tabindex");if("area"===i){i=e.parentNode;h=i.name;if(!e.href||!h||i.nodeName.toLowerCase()!=="map")return!1;e=c("img[usemap=#"+h+"]")[0];return!!e&&f(e)}return(/input|select|textarea|button|object/.test(i)?!e.disabled:"a"==i?e.href||!isNaN(h):!isNaN(h))&&f(e)},tabbable:function(e){var f=c.attr(e,"tabindex");return(isNaN(f)||f>=0)&&c(e).is(":focusable")}}),
c(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));c.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=f.offsetHeight===100;c.support.selectstart="onselectstart"in f;e.removeChild(f).style.display="none"}),c.extend(c.ui,{plugin:{add:function(e,f,h){var e=c.ui[e].prototype,j;for(j in h)e.plugins[j]=e.plugins[j]||[],e.plugins[j].push([f,h[j]])},call:function(c,e,f){if((e=c.plugins[e])&&c.element[0].parentNode)for(var j=0;j<e.length;j++)c.options[e[j][0]]&&
e[j][1].apply(c.element,f)}},contains:function(c,e){return document.compareDocumentPosition?c.compareDocumentPosition(e)&16:c!==e&&c.contains(e)},hasScroll:function(e,f){if(c(e).css("overflow")==="hidden")return!1;var f=f&&f==="left"?"scrollLeft":"scrollTop",h=!1;if(e[f]>0)return!0;e[f]=1;h=e[f]>0;e[f]=0;return h},isOverAxis:function(c,e,f){return c>e&&c<e+f},isOver:function(e,f,h,j,k,n){return c.ui.isOverAxis(e,h,k)&&c.ui.isOverAxis(f,j,n)}}))})(jQuery);
(function(c,e){if(c.cleanData){var f=c.cleanData;c.cleanData=function(e){for(var h=0,g;(g=e[h])!=null;h++)c(g).triggerHandler("remove");f(e)}}else{var g=c.fn.remove;c.fn.remove=function(e,f){return this.each(function(){f||(!e||c.filter(e,[this]).length)&&c("*",this).add([this]).each(function(){c(this).triggerHandler("remove")});return g.call(c(this),e,f)})}}c.widget=function(e,f,g){var k=e.split(".")[0],n,e=e.split(".")[1];n=k+"-"+e;if(!g)g=f,f=c.Widget;c.expr[":"][n]=function(f){return!!c.data(f,
e)};c[k]=c[k]||{};c[k][e]=function(c,e){arguments.length&&this._createWidget(c,e)};f=new f;f.options=c.extend(!0,{},f.options);c[k][e].prototype=c.extend(!0,f,{namespace:k,widgetName:e,widgetEventPrefix:c[k][e].prototype.widgetEventPrefix||e,widgetBaseClass:n},g);c.widget.bridge(e,c[k][e])};c.widget.bridge=function(f,h){c.fn[f]=function(g){var k=typeof g==="string",n=Array.prototype.slice.call(arguments,1),m=this,g=!k&&n.length?c.extend.apply(null,[!0,g].concat(n)):g;if(k&&g.charAt(0)==="_")return m;
k?this.each(function(){var h=c.data(this,f),k=h&&c.isFunction(h[g])?h[g].apply(h,n):h;if(k!==h&&k!==e)return m=k,!1}):this.each(function(){var e=c.data(this,f);e?e.option(g||{})._init():c.data(this,f,new h(g,this))});return m}};c.Widget=function(c,e){arguments.length&&this._createWidget(c,e)};c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(e,f){c.data(f,this.widgetName,this);this.element=c(f);this.options=c.extend(!0,{},this.options,this._getCreateOptions(),
e);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return c.metadata&&c.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},
option:function(f,h){var g=f;if(arguments.length===0)return c.extend({},this.options);if(typeof f==="string"){if(h===e)return this.options[f];g={};g[f]=h}this._setOptions(g);return this},_setOptions:function(e){var f=this;c.each(e,function(c,e){f._setOption(c,e)});return this},_setOption:function(c,e){this.options[c]=e;c==="disabled"&&this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e);return this},enable:function(){return this._setOption("disabled",
!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(e,f,g){var k=this.options[e],f=c.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();g=g||{};if(f.originalEvent)for(var e=c.event.props.length,n;e;)n=c.event.props[--e],f[n]=f.originalEvent[n];this.element.trigger(f,g);return!(c.isFunction(k)&&k.call(this.element[0],f,g)===!1||f.isDefaultPrevented())}}})(jQuery);
(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(c){return e._mouseDown(c)}).bind("click."+this.widgetName,function(f){if(!0===c.data(f.target,e.widgetName+".preventClickEvent"))return c.removeData(f.target,e.widgetName+".preventClickEvent"),f.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(e){e.originalEvent=
e.originalEvent||{};if(!e.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(e);this._mouseDownEvent=e;var f=this,g=e.which==1,i=typeof this.options.cancel=="string"?c(e.target).parents().add(e.target).filter(this.options.cancel).length:!1;if(!g||i||!this._mouseCapture(e))return!0;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=!0},this.options.delay);if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=
this._mouseStart(e)!==!1,!this._mouseStarted))return e.preventDefault(),!0;this._mouseMoveDelegate=function(c){return f._mouseMove(c)};this._mouseUpDelegate=function(c){return f._mouseUp(c)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);e.preventDefault();return e.originalEvent.mouseHandled=!0}},_mouseMove:function(e){if(c.browser.msie&&!(document.documentMode>=9)&&!e.button)return this._mouseUp(e);if(this._mouseStarted)return this._mouseDrag(e),
e.preventDefault();if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1)?this._mouseDrag(e):this._mouseUp(e);return!this._mouseStarted},_mouseUp:function(e){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted)this._mouseStarted=!1,e.target==this._mouseDownEvent.target&&c.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e);
return!1},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
(function(c){c.ui=c.ui||{};var e=/left|center|right/,f=/top|center|bottom/,g=c.fn.position,i=c.fn.offset;c.fn.position=function(h){if(!h||!h.of)return g.apply(this,arguments);var h=c.extend({},h),i=c(h.of),k=i[0],n=(h.collision||"flip").split(" "),m=h.offset?h.offset.split(" "):[0,0],p,r,o;k.nodeType===9?(p=i.width(),r=i.height(),o={top:0,left:0}):k.setTimeout?(p=i.width(),r=i.height(),o={top:i.scrollTop(),left:i.scrollLeft()}):k.preventDefault?(h.at="left top",p=r=0,o={top:h.of.pageY,left:h.of.pageX}):
(p=i.outerWidth(),r=i.outerHeight(),o=i.offset());c.each(["my","at"],function(){var c=(h[this]||"").split(" ");c.length===1&&(c=e.test(c[0])?c.concat(["center"]):f.test(c[0])?["center"].concat(c):["center","center"]);c[0]=e.test(c[0])?c[0]:"center";c[1]=f.test(c[1])?c[1]:"center";h[this]=c});n.length===1&&(n[1]=n[0]);m[0]=parseInt(m[0],10)||0;m.length===1&&(m[1]=m[0]);m[1]=parseInt(m[1],10)||0;h.at[0]==="right"?o.left+=p:h.at[0]==="center"&&(o.left+=p/2);h.at[1]==="bottom"?o.top+=r:h.at[1]==="center"&&
(o.top+=r/2);o.left+=m[0];o.top+=m[1];return this.each(function(){var e=c(this),f=e.outerWidth(),g=e.outerHeight(),i=parseInt(c.curCSS(this,"marginLeft",!0))||0,j=parseInt(c.curCSS(this,"marginTop",!0))||0,k=f+i+(parseInt(c.curCSS(this,"marginRight",!0))||0),B=g+j+(parseInt(c.curCSS(this,"marginBottom",!0))||0),A=c.extend({},o),x;h.my[0]==="right"?A.left-=f:h.my[0]==="center"&&(A.left-=f/2);h.my[1]==="bottom"?A.top-=g:h.my[1]==="center"&&(A.top-=g/2);A.left=Math.round(A.left);A.top=Math.round(A.top);
x={left:A.left-i,top:A.top-j};c.each(["left","top"],function(e,i){c.ui.position[n[e]]&&c.ui.position[n[e]][i](A,{targetWidth:p,targetHeight:r,elemWidth:f,elemHeight:g,collisionPosition:x,collisionWidth:k,collisionHeight:B,offset:m,my:h.my,at:h.at})});c.fn.bgiframe&&e.bgiframe();e.offset(c.extend(A,{using:h.using}))})};c.ui.position={fit:{left:function(e,f){var g=c(window),g=f.collisionPosition.left+f.collisionWidth-g.width()-g.scrollLeft();e.left=g>0?e.left-g:Math.max(e.left-f.collisionPosition.left,
e.left)},top:function(e,f){var g=c(window),g=f.collisionPosition.top+f.collisionHeight-g.height()-g.scrollTop();e.top=g>0?e.top-g:Math.max(e.top-f.collisionPosition.top,e.top)}},flip:{left:function(e,f){if(f.at[0]!=="center"){var g=c(window),g=f.collisionPosition.left+f.collisionWidth-g.width()-g.scrollLeft(),i=f.my[0]==="left"?-f.elemWidth:f.my[0]==="right"?f.elemWidth:0,m=f.at[0]==="left"?f.targetWidth:-f.targetWidth,p=-2*f.offset[0];e.left+=f.collisionPosition.left<0?i+m+p:g>0?i+m+p:0}},top:function(e,
f){if(f.at[1]!=="center"){var g=c(window),g=f.collisionPosition.top+f.collisionHeight-g.height()-g.scrollTop(),i=f.my[1]==="top"?-f.elemHeight:f.my[1]==="bottom"?f.elemHeight:0,m=f.at[1]==="top"?f.targetHeight:-f.targetHeight,p=-2*f.offset[1];e.top+=f.collisionPosition.top<0?i+m+p:g>0?i+m+p:0}}}};if(!c.offset.setOffset)c.offset.setOffset=function(e,f){if(/static/.test(c.curCSS(e,"position")))e.style.position="relative";var g=c(e),i=g.offset(),m=parseInt(c.curCSS(e,"top",!0),10)||0,p=parseInt(c.curCSS(e,
"left",!0),10)||0,i={top:f.top-i.top+m,left:f.left-i.left+p};"using"in f?f.using.call(e,i):g.css(i)},c.fn.offset=function(e){var f=this[0];if(!f||!f.ownerDocument)return null;if(e)return this.each(function(){c.offset.setOffset(this,e)});return i.call(this)}})(jQuery);
(function(c){c.widget("ui.draggable",c.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position=
"relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(e){var f=this.options;if(this.helper||f.disabled||c(e.target).is(".ui-resizable-handle"))return!1;
this.handle=this._getHandle(e);if(!this.handle)return!1;return!0},_mouseStart:function(e){var f=this.options;this.helper=this._createHelper(e);this._cacheHelperProportions();if(c.ui.ddmanager)c.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};c.extend(this.offset,{click:{left:e.pageX-
this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);f.containment&&this._setContainment();if(this._trigger("start",e)===!1)return this._clear(),!1;this._cacheHelperProportions();c.ui.ddmanager&&!f.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,e);this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(e,!0);return!0},_mouseDrag:function(e,f){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");if(!f){f=this._uiHash();if(this._trigger("drag",e,f)===!1)return this._mouseUp({}),!1;this.position=f.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";c.ui.ddmanager&&c.ui.ddmanager.drag(this,e);return!1},
_mouseStop:function(e){var f=!1;c.ui.ddmanager&&!this.options.dropBehaviour&&(f=c.ui.ddmanager.drop(this,e));if(this.dropped)f=this.dropped,this.dropped=!1;if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!f||this.options.revert=="valid"&&f||this.options.revert===!0||c.isFunction(this.options.revert)&&this.options.revert.call(this.element,f)){var g=this;c(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
10),function(){g._trigger("stop",e)!==!1&&g._clear()})}else this._trigger("stop",e)!==!1&&this._clear();return!1},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(e){var f=!this.options.handle||!c(this.options.handle,this.element).length?!0:!1;c(this.options.handle,this.element).find("*").andSelf().each(function(){this==e.target&&(f=!0)});return f},_createHelper:function(e){var f=this.options,e=c.isFunction(f.helper)?c(f.helper.apply(this.element[0],
[e])):f.helper=="clone"?this.element.clone():this.element;e.parents("body").length||e.appendTo(f.appendTo=="parent"?this.element[0].parentNode:f.appendTo);e[0]!=this.element[0]&&!/(fixed|absolute)/.test(e.css("position"))&&e.css("position","absolute");return e},_adjustOffsetFromHelper:function(e){typeof e=="string"&&(e=e.split(" "));c.isArray(e)&&(e={left:+e[0],top:+e[1]||0});if("left"in e)this.offset.click.left=e.left+this.margins.left;if("right"in e)this.offset.click.left=this.helperProportions.width-
e.right+this.margins.left;if("top"in e)this.offset.click.top=e.top+this.margins.top;if("bottom"in e)this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==
document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&c.browser.msie)e={top:0,left:0};return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),
10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent")e.containment=this.helper[0].parentNode;if(e.containment=="document"||e.containment=="window")this.containment=
[(e.containment=="document"?0:c(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(e.containment=="document"?0:c(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(e.containment=="document"?0:c(window).scrollLeft())+c(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e.containment=="document"?0:c(window).scrollTop())+(c(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-
this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var f=c(e.containment)[0];if(f){var e=c(e.containment).offset(),g=c(f).css("overflow")!="hidden";this.containment=[e.left+(parseInt(c(f).css("borderLeftWidth"),10)||0)+(parseInt(c(f).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(c(f).css("borderTopWidth"),10)||0)+(parseInt(c(f).css("paddingTop"),10)||0)-this.margins.top,e.left+(g?Math.max(f.scrollWidth,
f.offsetWidth):f.offsetWidth)-(parseInt(c(f).css("borderLeftWidth"),10)||0)-(parseInt(c(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(c(f).css("borderTopWidth"),10)||0)-(parseInt(c(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(e.containment.constructor==Array)this.containment=e.containment},_convertPositionTo:function(e,f){if(!f)f=this.position;var e=
e=="absolute"?1:-1,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*e+this.offset.parent.top*e-(c.browser.safari&&c.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:g.scrollTop())*e),left:f.left+this.offset.relative.left*e+this.offset.parent.left*e-(c.browser.safari&&
c.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:g.scrollLeft())*e)}},_generatePosition:function(e){var f=this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=/(html|body)/i.test(g[0].tagName),h=e.pageX,j=e.pageY;this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(h=this.containment[0]+
this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(j=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(h=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(j=this.containment[3]+this.offset.click.top)),f.grid&&(j=this.originalPageY+Math.round((j-this.originalPageY)/f.grid[1])*f.grid[1],j=this.containment?!(j-this.offset.click.top<this.containment[1]||j-this.offset.click.top>this.containment[3])?
j:!(j-this.offset.click.top<this.containment[1])?j-f.grid[1]:j+f.grid[1]:j,h=this.originalPageX+Math.round((h-this.originalPageX)/f.grid[0])*f.grid[0],h=this.containment?!(h-this.offset.click.left<this.containment[0]||h-this.offset.click.left>this.containment[2])?h:!(h-this.offset.click.left<this.containment[0])?h-f.grid[0]:h+f.grid[0]:h));return{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(c.browser.safari&&c.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition==
"fixed"?-this.scrollParent.scrollTop():i?0:g.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(c.browser.safari&&c.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:g.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(e,
f,g){g=g||this._uiHash();c.ui.plugin.call(this,e,[f,g]);if(e=="drag")this.positionAbs=this._convertPositionTo("absolute");return c.Widget.prototype._trigger.call(this,e,f,g)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});c.extend(c.ui.draggable,{version:"1.8.9"});c.ui.plugin.add("draggable","connectToSortable",{start:function(e,f){var g=c(this).data("draggable"),i=g.options,h=c.extend({},f,{item:g.element});
g.sortables=[];c(i.connectToSortable).each(function(){var f=c.data(this,"sortable");f&&!f.options.disabled&&(g.sortables.push({instance:f,shouldRevert:f.options.revert}),f._refreshItems(),f._trigger("activate",e,h))})},stop:function(e,f){var g=c(this).data("draggable"),i=c.extend({},f,{item:g.element});c.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=!0;this.instance.cancelHelperRemoval=!1;if(this.shouldRevert)this.instance.options.revert=!0;this.instance._mouseStop(e);
this.instance.options.helper=this.instance.options._helper;g.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,i)})},drag:function(e,f){var g=c(this).data("draggable"),i=this;c.each(g.sortables,function(){this.instance.positionAbs=g.positionAbs;this.instance.helperProportions=g.helperProportions;this.instance.offset.click=g.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver)this.instance.isOver=
1,this.instance.currentItem=c(i).clone().appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return f.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=g.offset.click.top,this.instance.offset.click.left=g.offset.click.left,this.instance.offset.parent.left-=g.offset.parent.left-this.instance.offset.parent.left,
this.instance.offset.parent.top-=g.offset.parent.top-this.instance.offset.parent.top,g._trigger("toSortable",e),g.dropped=this.instance.element,g.currentItem=g.element,this.instance.fromOutside=g;this.instance.currentItem&&this.instance._mouseDrag(e)}else if(this.instance.isOver)this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=
this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),g._trigger("fromSortable",e),g.dropped=!1})}});c.ui.plugin.add("draggable","cursor",{start:function(){var e=c("body"),f=c(this).data("draggable").options;if(e.css("cursor"))f._cursor=e.css("cursor");e.css("cursor",f.cursor)},stop:function(){var e=c(this).data("draggable").options;e._cursor&&c("body").css("cursor",e._cursor)}});c.ui.plugin.add("draggable","iframeFix",{start:function(){var e=
c(this).data("draggable").options;c(e.iframeFix===!0?"iframe":e.iframeFix).each(function(){c('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(c(this).offset()).appendTo("body")})},stop:function(){c("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});c.ui.plugin.add("draggable","opacity",{start:function(e,f){e=c(f.helper);f=c(this).data("draggable").options;
if(e.css("opacity"))f._opacity=e.css("opacity");e.css("opacity",f.opacity)},stop:function(e,f){e=c(this).data("draggable").options;e._opacity&&c(f.helper).css("opacity",e._opacity)}});c.ui.plugin.add("draggable","scroll",{start:function(){var e=c(this).data("draggable");if(e.scrollParent[0]!=document&&e.scrollParent[0].tagName!="HTML")e.overflowOffset=e.scrollParent.offset()},drag:function(e){var f=c(this).data("draggable"),g=f.options,i=!1;if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!=
"HTML"){if(!g.axis||g.axis!="x")if(f.overflowOffset.top+f.scrollParent[0].offsetHeight-e.pageY<g.scrollSensitivity)f.scrollParent[0].scrollTop=i=f.scrollParent[0].scrollTop+g.scrollSpeed;else if(e.pageY-f.overflowOffset.top<g.scrollSensitivity)f.scrollParent[0].scrollTop=i=f.scrollParent[0].scrollTop-g.scrollSpeed;if(!g.axis||g.axis!="y")if(f.overflowOffset.left+f.scrollParent[0].offsetWidth-e.pageX<g.scrollSensitivity)f.scrollParent[0].scrollLeft=i=f.scrollParent[0].scrollLeft+g.scrollSpeed;else if(e.pageX-
f.overflowOffset.left<g.scrollSensitivity)f.scrollParent[0].scrollLeft=i=f.scrollParent[0].scrollLeft-g.scrollSpeed}else{if(!g.axis||g.axis!="x")e.pageY-c(document).scrollTop()<g.scrollSensitivity?i=c(document).scrollTop(c(document).scrollTop()-g.scrollSpeed):c(window).height()-(e.pageY-c(document).scrollTop())<g.scrollSensitivity&&(i=c(document).scrollTop(c(document).scrollTop()+g.scrollSpeed));if(!g.axis||g.axis!="y")e.pageX-c(document).scrollLeft()<g.scrollSensitivity?i=c(document).scrollLeft(c(document).scrollLeft()-
g.scrollSpeed):c(window).width()-(e.pageX-c(document).scrollLeft())<g.scrollSensitivity&&(i=c(document).scrollLeft(c(document).scrollLeft()+g.scrollSpeed))}i!==!1&&c.ui.ddmanager&&!g.dropBehaviour&&c.ui.ddmanager.prepareOffsets(f,e)}});c.ui.plugin.add("draggable","snap",{start:function(){var e=c(this).data("draggable"),f=e.options;e.snapElements=[];c(f.snap.constructor!=String?f.snap.items||":data(draggable)":f.snap).each(function(){var f=c(this),i=f.offset();this!=e.element[0]&&e.snapElements.push({item:this,
width:f.outerWidth(),height:f.outerHeight(),top:i.top,left:i.left})})},drag:function(e,f){for(var g=c(this).data("draggable"),i=g.options,h=i.snapTolerance,j=f.offset.left,k=j+g.helperProportions.width,n=f.offset.top,m=n+g.helperProportions.height,p=g.snapElements.length-1;p>=0;p--){var r=g.snapElements[p].left,o=r+g.snapElements[p].width,u=g.snapElements[p].top,s=u+g.snapElements[p].height;if(r-h<j&&j<o+h&&u-h<n&&n<s+h||r-h<j&&j<o+h&&u-h<m&&m<s+h||r-h<k&&k<o+h&&u-h<n&&n<s+h||r-h<k&&k<o+h&&u-h<m&&
m<s+h){if(i.snapMode!="inner"){var v=Math.abs(u-m)<=h,q=Math.abs(s-n)<=h,l=Math.abs(r-k)<=h,z=Math.abs(o-j)<=h;if(v)f.position.top=g._convertPositionTo("relative",{top:u-g.helperProportions.height,left:0}).top-g.margins.top;if(q)f.position.top=g._convertPositionTo("relative",{top:s,left:0}).top-g.margins.top;if(l)f.position.left=g._convertPositionTo("relative",{top:0,left:r-g.helperProportions.width}).left-g.margins.left;if(z)f.position.left=g._convertPositionTo("relative",{top:0,left:o}).left-g.margins.left}var B=
v||q||l||z;if(i.snapMode!="outer"){v=Math.abs(u-n)<=h;q=Math.abs(s-m)<=h;l=Math.abs(r-j)<=h;z=Math.abs(o-k)<=h;if(v)f.position.top=g._convertPositionTo("relative",{top:u,left:0}).top-g.margins.top;if(q)f.position.top=g._convertPositionTo("relative",{top:s-g.helperProportions.height,left:0}).top-g.margins.top;if(l)f.position.left=g._convertPositionTo("relative",{top:0,left:r}).left-g.margins.left;if(z)f.position.left=g._convertPositionTo("relative",{top:0,left:o-g.helperProportions.width}).left-g.margins.left}!g.snapElements[p].snapping&&
(v||q||l||z||B)&&g.options.snap.snap&&g.options.snap.snap.call(g.element,e,c.extend(g._uiHash(),{snapItem:g.snapElements[p].item}));g.snapElements[p].snapping=v||q||l||z||B}else g.snapElements[p].snapping&&g.options.snap.release&&g.options.snap.release.call(g.element,e,c.extend(g._uiHash(),{snapItem:g.snapElements[p].item})),g.snapElements[p].snapping=!1}}});c.ui.plugin.add("draggable","stack",{start:function(){var e=c(this).data("draggable").options,e=c.makeArray(c(e.stack)).sort(function(e,f){return(parseInt(c(e).css("zIndex"),
10)||0)-(parseInt(c(f).css("zIndex"),10)||0)});if(e.length){var f=parseInt(e[0].style.zIndex)||0;c(e).each(function(c){this.style.zIndex=f+c});this[0].style.zIndex=f+e.length}}});c.ui.plugin.add("draggable","zIndex",{start:function(e,f){e=c(f.helper);f=c(this).data("draggable").options;if(e.css("zIndex"))f._zIndex=e.css("zIndex");e.css("zIndex",f.zIndex)},stop:function(e,f){e=c(this).data("draggable").options;e._zIndex&&c(f.helper).css("zIndex",e._zIndex)}})})(jQuery);
(function(c){c.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var e=this.options,f=e.accept;this.isover=0;this.isout=1;this.accept=c.isFunction(f)?f:function(c){return c.is(f)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};c.ui.ddmanager.droppables[e.scope]=c.ui.ddmanager.droppables[e.scope]||[];c.ui.ddmanager.droppables[e.scope].push(this);
e.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var e=c.ui.ddmanager.droppables[this.options.scope],f=0;f<e.length;f++)e[f]==this&&e.splice(f,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(e,f){if(e=="accept")this.accept=c.isFunction(f)?f:function(c){return c.is(f)};c.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var f=c.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);f&&this._trigger("activate",e,this.ui(f))},_deactivate:function(e){var f=c.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);f&&this._trigger("deactivate",e,this.ui(f))},_over:function(e){var f=c.ui.ddmanager.current;if(f&&(f.currentItem||f.element)[0]!=this.element[0])if(this.accept.call(this.element[0],f.currentItem||f.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",
e,this.ui(f))},_out:function(e){var f=c.ui.ddmanager.current;if(f&&(f.currentItem||f.element)[0]!=this.element[0])if(this.accept.call(this.element[0],f.currentItem||f.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(f))},_drop:function(e,f){var g=f||c.ui.ddmanager.current;if(!g||(g.currentItem||g.element)[0]==this.element[0])return!1;var i=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var e=c.data(this,
"droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope==g.options.scope&&e.accept.call(e.element[0],g.currentItem||g.element)&&c.ui.intersect(g,c.extend(e,{offset:e.element.offset()}),e.options.tolerance))return i=!0,!1});if(i)return!1;if(this.accept.call(this.element[0],g.currentItem||g.element))return this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(g)),
this.element;return!1},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});c.extend(c.ui.droppable,{version:"1.8.9"});c.ui.intersect=function(e,f,g){if(!f.offset)return!1;var i=(e.positionAbs||e.position.absolute).left,h=i+e.helperProportions.width,j=(e.positionAbs||e.position.absolute).top,k=j+e.helperProportions.height,n=f.offset.left,m=n+f.proportions.width,p=f.offset.top,r=p+f.proportions.height;switch(g){case "fit":return n<=i&&
h<=m&&p<=j&&k<=r;case "intersect":return n<i+e.helperProportions.width/2&&h-e.helperProportions.width/2<m&&p<j+e.helperProportions.height/2&&k-e.helperProportions.height/2<r;case "pointer":return c.ui.isOver((e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,p,n,f.proportions.height,f.proportions.width);case "touch":return(j>=p&&j<=r||k>=p&&k<=r||j<p&&k>r)&&(i>=n&&i<=m||h>=n&&h<=m||i<n&&h>m);default:return!1}};
c.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,f){var g=c.ui.ddmanager.droppables[e.options.scope]||[],i=f?f.type:null,h=(e.currentItem||e.element).find(":data(droppable)").andSelf(),j=0;a:for(;j<g.length;j++)if(!(g[j].options.disabled||e&&!g[j].accept.call(g[j].element[0],e.currentItem||e.element))){for(var k=0;k<h.length;k++)if(h[k]==g[j].element[0]){g[j].proportions.height=0;continue a}g[j].visible=g[j].element.css("display")!="none";if(g[j].visible)g[j].offset=
g[j].element.offset(),g[j].proportions={width:g[j].element[0].offsetWidth,height:g[j].element[0].offsetHeight},i=="mousedown"&&g[j]._activate.call(g[j],f)}},drop:function(e,f){var g=!1;c.each(c.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&c.ui.intersect(e,this,this.options.tolerance)&&(g=g||this._drop.call(this,f)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)))this.isout=1,this.isover=
0,this._deactivate.call(this,f)});return g},drag:function(e,f){e.options.refreshPositions&&c.ui.ddmanager.prepareOffsets(e,f);c.each(c.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var g=c.ui.intersect(e,this,this.options.tolerance);if(g=!g&&this.isover==1?"isout":g&&this.isover==0?"isover":null){var i;if(this.options.greedy){var h=this.element.parents(":data(droppable):eq(0)");if(h.length)i=c.data(h[0],"droppable"),i.greedyChild=
g=="isover"?1:0}if(i&&g=="isover")i.isover=0,i.isout=1,i._out.call(i,f);this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,f);if(i&&g=="isout")i.isout=0,i.isover=1,i._over.call(i,f)}}})}}})(jQuery);
(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var e=this,f=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!f.aspectRatio,aspectRatio:f.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],
_helper:f.helper||f.ghost||f.animate?f.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i))/relative/.test(this.element.css("position"))&&c.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"}),this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),
this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize",
"none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize();this.handles=f.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles==
"all")this.handles="n,e,s,w,se,sw,ne,nw";var h=this.handles.split(",");this.handles={};for(var j=0;j<h.length;j++){var k=c.trim(h[j]),n=c('<div class="ui-resizable-handle ui-resizable-'+k+'"></div>');/sw|se|ne|nw/.test(k)&&n.css({zIndex:++f.zIndex});"se"==k&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[k]=".ui-resizable-"+k;this.element.append(n)}}this._renderAxis=function(e){var e=e||this.element,f;for(f in this.handles){this.handles[f].constructor==String&&(this.handles[f]=c(this.handles[f],
this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var h=c(this.handles[f],this.element),g=0,g=/sw|ne|nw|se|n|s/.test(f)?h.outerHeight():h.outerWidth(),h=["padding",/ne|nw|n/.test(f)?"Top":/se|sw|s/.test(f)?"Bottom":/^e$/.test(f)?"Right":"Left"].join("");e.css(h,g);this._proportionallyResize()}c(this.handles[f])}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className)var c=
this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);e.axis=c&&c[1]?c[1]:"se"}});f.autoHide&&(this._handles.hide(),c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){e.resizing||(c(this).addClass("ui-resizable-autohide"),e._handles.hide())}));this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(e){c(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(e){var f=!1,h;for(h in this.handles)c(this.handles[h])[0]==e.target&&(f=!0);return!this.options.disabled&&f},_mouseStart:function(f){var i=this.options,h=this.element.position(),
j=this.element;this.resizing=!0;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};(j.is(".ui-draggable")||/absolute/.test(j.css("position")))&&j.css({position:"absolute",top:h.top,left:h.left});c.browser.opera&&/relative/.test(j.css("position"))&&j.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();var h=e(this.helper.css("left")),k=e(this.helper.css("top"));i.containment&&(h+=c(i.containment).scrollLeft()||0,k+=c(i.containment).scrollTop()||0);this.offset=
this.helper.offset();this.position={left:h,top:k};this.size=this._helper?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalSize=this._helper?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalPosition={left:h,top:k};this.sizeDiff={width:j.outerWidth()-j.width(),height:j.outerHeight()-j.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=typeof i.aspectRatio=="number"?i.aspectRatio:
this.originalSize.width/this.originalSize.height||1;i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);j.addClass("ui-resizable-resizing");this._propagate("start",f);return!0},_mouseDrag:function(c){var e=this.helper,f=this.originalMousePosition,j=this._change[this.axis];if(!j)return!1;f=j.apply(this,[c,c.pageX-f.left||0,c.pageY-f.top||0]);if(this._aspectRatio||c.shiftKey)f=this._updateRatio(f,c);f=this._respectSize(f,c);this._propagate("resize",
c);e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(f);this._trigger("resize",c,this.ui());return!1},_mouseStop:function(e){this.resizing=!1;var f=this.options;if(this._helper){var h=this._proportionallyResizeElements,j=h.length&&/textarea/i.test(h[0].nodeName),h=j&&c.ui.hasScroll(h[0],"left")?0:this.sizeDiff.height,j={width:this.size.width-
(j?0:this.sizeDiff.width),height:this.size.height-h},h=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,k=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;f.animate||this.element.css(c.extend(j,{top:k,left:h}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!f.animate&&this._proportionallyResize()}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",e);this._helper&&this.helper.remove();return!1},_updateCache:function(c){this.offset=this.helper.offset();if(f(c.left))this.position.left=c.left;if(f(c.top))this.position.top=c.top;if(f(c.height))this.size.height=c.height;if(f(c.width))this.size.width=c.width},_updateRatio:function(c){var e=this.position,f=this.size,j=this.axis;if(c.height)c.width=f.height*this.aspectRatio;else if(c.width)c.height=f.width/this.aspectRatio;if(j=="sw")c.left=e.left+(f.width-c.width),c.top=null;
if(j=="nw")c.top=e.top+(f.height-c.height),c.left=e.left+(f.width-c.width);return c},_respectSize:function(c){var e=this.options,h=this.axis,j=f(c.width)&&e.maxWidth&&e.maxWidth<c.width,k=f(c.height)&&e.maxHeight&&e.maxHeight<c.height,n=f(c.width)&&e.minWidth&&e.minWidth>c.width,m=f(c.height)&&e.minHeight&&e.minHeight>c.height;if(n)c.width=e.minWidth;if(m)c.height=e.minHeight;if(j)c.width=e.maxWidth;if(k)c.height=e.maxHeight;var p=this.originalPosition.left+this.originalSize.width,r=this.position.top+
this.size.height,o=/sw|nw|w/.test(h),h=/nw|ne|n/.test(h);if(n&&o)c.left=p-e.minWidth;if(j&&o)c.left=p-e.maxWidth;if(m&&h)c.top=r-e.minHeight;if(k&&h)c.top=r-e.maxHeight;if((e=!c.width&&!c.height)&&!c.left&&c.top)c.top=null;else if(e&&!c.top&&c.left)c.left=null;return c},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e=this.helper||this.element,f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var j=
[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],k=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(j,function(c,e){c=parseInt(c,10)||0;e=parseInt(k[e],10)||0;return c+e})}c.browser.msie&&(c(e).is(":hidden")||c(e).parents(":hidden").length)||h.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var e=
this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var f=c.browser.msie&&c.browser.version<7,h=f?1:0,f=f?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-h+"px",top:this.elementOffset.top-h+"px",zIndex:++e.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(c,
e){return{width:this.originalSize.width+e}},w:function(c,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(c,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(c,e,f){return{height:this.originalSize.height+f}},se:function(e,f,h){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,f,h]))},sw:function(e,f,h){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,f,
h]))},ne:function(e,f,h){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,f,h]))},nw:function(e,f,h){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,f,h]))}},_propagate:function(e,f){c.ui.plugin.call(this,e,[f,this.ui()]);e!="resize"&&this._trigger(e,f,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.9"});c.ui.plugin.add("resizable","alsoResize",{start:function(){var e=c(this).data("resizable").options,f=function(e){c(e).each(function(){var e=c(this);e.data("resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10),position:e.css("position")})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=
e.alsoResize[0],f(e.alsoResize)):c.each(e.alsoResize,function(c){f(c)}):f(e.alsoResize)},resize:function(e,f){var h=c(this).data("resizable"),e=h.options,j=h.originalSize,k=h.originalPosition,n={height:h.size.height-j.height||0,width:h.size.width-j.width||0,top:h.position.top-k.top||0,left:h.position.left-k.left||0},m=function(e,g){c(e).each(function(){var e=c(this),j=c(this).data("resizable-alsoresize"),k={},m=g&&g.length?g:e.parents(f.originalElement[0]).length?["width","height"]:["width","height",
"top","left"];c.each(m,function(c,e){if((c=(j[e]||0)+(n[e]||0))&&c>=0)k[e]=c||null});if(c.browser.opera&&/relative/.test(e.css("position")))h._revertToRelativePosition=!0,e.css({position:"absolute",top:"auto",left:"auto"});e.css(k)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(c,e){m(c,e)}):m(e.alsoResize)},stop:function(){var e=c(this).data("resizable"),f=e.options,h=function(e){c(e).each(function(){var e=c(this);e.css({position:e.data("resizable-alsoresize").position})})};
if(e._revertToRelativePosition)e._revertToRelativePosition=!1,typeof f.alsoResize=="object"&&!f.alsoResize.nodeType?c.each(f.alsoResize,function(c){h(c)}):h(f.alsoResize);c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(e){var f=c(this).data("resizable"),h=f.options,j=f._proportionallyResizeElements,k=j.length&&/textarea/i.test(j[0].nodeName),n=k&&c.ui.hasScroll(j[0],"left")?0:f.sizeDiff.height,k={width:f.size.width-(k?0:f.sizeDiff.width),height:f.size.height-
n},n=parseInt(f.element.css("left"),10)+(f.position.left-f.originalPosition.left)||null,m=parseInt(f.element.css("top"),10)+(f.position.top-f.originalPosition.top)||null;f.element.animate(c.extend(k,m&&n?{top:m,left:n}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var h={width:parseInt(f.element.css("width"),10),height:parseInt(f.element.css("height"),10),top:parseInt(f.element.css("top"),10),left:parseInt(f.element.css("left"),10)};j&&j.length&&c(j[0]).css({width:h.width,
height:h.height});f._updateCache(h);f._propagate("resize",e)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var f=c(this).data("resizable"),i=f.element,h=f.options.containment;if(i=h instanceof c?h.get(0):/parent/.test(h)?i.parent().get(0):h)if(f.containerElement=c(i),/document/.test(h)||h==document)f.containerOffset={left:0,top:0},f.containerPosition={left:0,top:0},f.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight};
else{var j=c(i),k=[];c(["Top","Right","Left","Bottom"]).each(function(c,f){k[c]=e(j.css("padding"+f))});f.containerOffset=j.offset();f.containerPosition=j.position();f.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var h=f.containerOffset,n=f.containerSize.height,m=f.containerSize.width,m=c.ui.hasScroll(i,"left")?i.scrollWidth:m,n=c.ui.hasScroll(i)?i.scrollHeight:n;f.parentData={element:i,left:h.left,top:h.top,width:m,height:n}}},resize:function(e){var f=c(this).data("resizable"),
h=f.options,j=f.containerOffset,k=f.position,e=f._aspectRatio||e.shiftKey,n={top:0,left:0},m=f.containerElement;m[0]!=document&&/static/.test(m.css("position"))&&(n=j);if(k.left<(f._helper?j.left:0)){f.size.width+=f._helper?f.position.left-j.left:f.position.left-n.left;if(e)f.size.height=f.size.width/h.aspectRatio;f.position.left=h.helper?j.left:0}if(k.top<(f._helper?j.top:0)){f.size.height+=f._helper?f.position.top-j.top:f.position.top;if(e)f.size.width=f.size.height*h.aspectRatio;f.position.top=
f._helper?j.top:0}f.offset.left=f.parentData.left+f.position.left;f.offset.top=f.parentData.top+f.position.top;h=Math.abs((f._helper?f.offset.left-n.left:f.offset.left-n.left)+f.sizeDiff.width);j=Math.abs((f._helper?f.offset.top-n.top:f.offset.top-j.top)+f.sizeDiff.height);k=f.containerElement.get(0)==f.element.parent().get(0);n=/relative|absolute/.test(f.containerElement.css("position"));k&&n&&(h-=f.parentData.left);if(h+f.size.width>=f.parentData.width&&(f.size.width=f.parentData.width-h,e))f.size.height=
f.size.width/f.aspectRatio;if(j+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-j,e))f.size.width=f.size.height*f.aspectRatio},stop:function(){var e=c(this).data("resizable"),f=e.options,h=e.containerOffset,j=e.containerPosition,k=e.containerElement,n=c(e.helper),m=n.offset(),p=n.outerWidth()-e.sizeDiff.width,n=n.outerHeight()-e.sizeDiff.height;e._helper&&!f.animate&&/relative/.test(k.css("position"))&&c(this).css({left:m.left-j.left-h.left,width:p,height:n});e._helper&&!f.animate&&
/static/.test(k.css("position"))&&c(this).css({left:m.left-j.left-h.left,width:p,height:n})}});c.ui.plugin.add("resizable","ghost",{start:function(){var e=c(this).data("resizable"),f=e.options,h=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof f.ghost=="string"?f.ghost:"");e.ghost.appendTo(e.helper)},resize:function(){var e=c(this).data("resizable");
e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=c(this).data("resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var e=c(this).data("resizable"),f=e.options,h=e.size,j=e.originalSize,k=e.originalPosition,n=e.axis;f.grid=typeof f.grid=="number"?[f.grid,f.grid]:f.grid;var m=Math.round((h.width-j.width)/(f.grid[0]||1))*(f.grid[0]||1),f=Math.round((h.height-j.height)/
(f.grid[1]||1))*(f.grid[1]||1);/^(se|s|e)$/.test(n)?(e.size.width=j.width+m,e.size.height=j.height+f):/^(ne)$/.test(n)?(e.size.width=j.width+m,e.size.height=j.height+f,e.position.top=k.top-f):(/^(sw)$/.test(n)?(e.size.width=j.width+m,e.size.height=j.height+f):(e.size.width=j.width+m,e.size.height=j.height+f,e.position.top=k.top-f),e.position.left=k.left-m)}});var e=function(c){return parseInt(c,10)||0},f=function(c){return!isNaN(parseInt(c,10))}})(jQuery);
(function(c){c.widget("ui.selectable",c.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var e=this;this.element.addClass("ui-selectable");this.dragged=!1;var f;this.refresh=function(){f=c(e.options.filter,e.element[0]);f.each(function(){var e=c(this),f=e.offset();c.data(this,"selectable-item",{element:this,$element:e,left:f.left,top:f.top,right:f.left+e.outerWidth(),bottom:f.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),
selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=c("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(e){var f=this;this.opos=[e.pageX,
e.pageY];if(!this.options.disabled){var g=this.options;this.selectees=c(g.filter,this.element[0]);this._trigger("start",e);c(g.appendTo).append(this.helper);this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0});g.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var g=c.data(this,"selectable-item");g.startselected=!0;if(!e.metaKey)g.$element.removeClass("ui-selected"),g.selected=!1,g.$element.addClass("ui-unselecting"),g.unselecting=!0,f._trigger("unselecting",
e,{unselecting:g.element})});c(e.target).parents().andSelf().each(function(){var g=c.data(this,"selectable-item");if(g){var h=!e.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(h?"ui-unselecting":"ui-selected").addClass(h?"ui-selecting":"ui-unselecting");g.unselecting=!h;g.selecting=h;(g.selected=h)?f._trigger("selecting",e,{selecting:g.element}):f._trigger("unselecting",e,{unselecting:g.element});return!1}})}},_mouseDrag:function(e){var f=this;this.dragged=!0;if(!this.options.disabled){var g=
this.options,i=this.opos[0],h=this.opos[1],j=e.pageX,k=e.pageY;if(i>j)var n=j,j=i,i=n;h>k&&(n=k,k=h,h=n);this.helper.css({left:i,top:h,width:j-i,height:k-h});this.selectees.each(function(){var m=c.data(this,"selectable-item");if(m&&m.element!=f.element[0]){var n=!1;g.tolerance=="touch"?n=!(m.left>j||m.right<i||m.top>k||m.bottom<h):g.tolerance=="fit"&&(n=m.left>i&&m.right<j&&m.top>h&&m.bottom<k);if(n){if(m.selected)m.$element.removeClass("ui-selected"),m.selected=!1;if(m.unselecting)m.$element.removeClass("ui-unselecting"),
m.unselecting=!1;if(!m.selecting)m.$element.addClass("ui-selecting"),m.selecting=!0,f._trigger("selecting",e,{selecting:m.element})}else{if(m.selecting)if(e.metaKey&&m.startselected)m.$element.removeClass("ui-selecting"),m.selecting=!1,m.$element.addClass("ui-selected"),m.selected=!0;else{m.$element.removeClass("ui-selecting");m.selecting=!1;if(m.startselected)m.$element.addClass("ui-unselecting"),m.unselecting=!0;f._trigger("unselecting",e,{unselecting:m.element})}if(m.selected&&!e.metaKey&&!m.startselected)m.$element.removeClass("ui-selected"),
m.selected=!1,m.$element.addClass("ui-unselecting"),m.unselecting=!0,f._trigger("unselecting",e,{unselecting:m.element})}}});return!1}},_mouseStop:function(e){var f=this;this.dragged=!1;c(".ui-unselecting",this.element[0]).each(function(){var g=c.data(this,"selectable-item");g.$element.removeClass("ui-unselecting");g.unselecting=!1;g.startselected=!1;f._trigger("unselected",e,{unselected:g.element})});c(".ui-selecting",this.element[0]).each(function(){var g=c.data(this,"selectable-item");g.$element.removeClass("ui-selecting").addClass("ui-selected");
g.selecting=!1;g.selected=!0;g.startselected=!0;f._trigger("selected",e,{selected:g.element})});this._trigger("stop",e);this.helper.remove();return!1}});c.extend(c.ui.selectable,{version:"1.8.9"})})(jQuery);
(function(c){c.widget("ui.sortable",c.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=
this.items.length?/left|right/.test(this.items[0].item.css("float")):!1;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(e,f){e==="disabled"?(this.options[e]=f,this.widget()[f?"addClass":"removeClass"]("ui-sortable-disabled")):c.Widget.prototype._setOption.apply(this,
arguments)},_mouseCapture:function(e,f){if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(e);var g=null,i=this;c(e.target).parents().each(function(){if(c.data(this,"sortable-item")==i)return g=c(this),!1});c.data(e.target,"sortable-item")==i&&(g=c(e.target));if(!g)return!1;if(this.options.handle&&!f){var h=!1;c(this.options.handle,g).find("*").andSelf().each(function(){this==e.target&&(h=!0)});if(!h)return!1}this.currentItem=g;this._removeCurrentsFromItems();
return!0},_mouseStart:function(e,f,g){f=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");c.extend(this.offset,{click:{left:e.pageX-this.offset.left,
top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();f.containment&&this._setContainment();if(f.cursor){if(c("body").css("cursor"))this._storedCursor=
c("body").css("cursor");c("body").css("cursor",f.cursor)}if(f.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",f.opacity)}if(f.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",f.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",e,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();
if(!g)for(g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",e,this._uiHash(this));if(c.ui.ddmanager)c.ui.ddmanager.current=this;c.ui.ddmanager&&!f.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,e);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return!0},_mouseDrag:function(e){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var f=
this.options,g=!1;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop+f.scrollSpeed;else if(e.pageY-this.overflowOffset.top<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop-f.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<f.scrollSensitivity)this.scrollParent[0].scrollLeft=
g=this.scrollParent[0].scrollLeft+f.scrollSpeed;else if(e.pageX-this.overflowOffset.left<f.scrollSensitivity)this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft-f.scrollSpeed}else e.pageY-c(document).scrollTop()<f.scrollSensitivity?g=c(document).scrollTop(c(document).scrollTop()-f.scrollSpeed):c(window).height()-(e.pageY-c(document).scrollTop())<f.scrollSensitivity&&(g=c(document).scrollTop(c(document).scrollTop()+f.scrollSpeed)),e.pageX-c(document).scrollLeft()<f.scrollSensitivity?
g=c(document).scrollLeft(c(document).scrollLeft()-f.scrollSpeed):c(window).width()-(e.pageX-c(document).scrollLeft())<f.scrollSensitivity&&(g=c(document).scrollLeft(c(document).scrollLeft()+f.scrollSpeed));g!==!1&&c.ui.ddmanager&&!f.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,e)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=
this.position.top+"px";for(f=this.items.length-1;f>=0;f--){var g=this.items[f],i=g.item[0],h=this._intersectsWithPointer(g);if(h&&i!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=i&&!c.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!c.ui.contains(this.element[0],i):1)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(g))this._rearrange(e,g);else break;this._trigger("change",e,this._uiHash());break}}this._contactContainers(e);
c.ui.ddmanager&&c.ui.ddmanager.drag(this,e);this._trigger("sort",e,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(e,f){if(e){c.ui.ddmanager&&!this.options.dropBehaviour&&c.ui.ddmanager.drop(this,e);if(this.options.revert){var g=this,f=g.placeholder.offset();g.reverting=!0;c(this.helper).animate({left:f.left-this.offset.parent.left-g.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-g.margins.top+
(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){g._clear(e)})}else this._clear(e,f);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)if(this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over)this.containers[e]._trigger("out",
null,this._uiHash(this)),this.containers[e].containerCache.over=0}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),c.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?c(this.domPosition.prev).after(this.currentItem):c(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(e){var f=
this._getItemsAsjQuery(e&&e.connected),g=[],e=e||{};c(f).each(function(){var f=(c(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);f&&g.push((e.key||f[1]+"[]")+"="+(e.key&&e.expression?f[1]:f[2]))});!g.length&&e.key&&g.push(e.key+"=");return g.join("&")},toArray:function(e){var f=this._getItemsAsjQuery(e&&e.connected),g=[],e=e||{};f.each(function(){g.push(c(e.item||this).attr(e.attribute||"id")||"")});return g},_intersectsWith:function(c){var f=this.positionAbs.left,
g=f+this.helperProportions.width,i=this.positionAbs.top,h=i+this.helperProportions.height,j=c.left,k=j+c.width,n=c.top,m=n+c.height,p=this.offset.click.top,r=this.offset.click.left;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?i+p>n&&i+p<m&&f+r>j&&f+r<k:j<f+this.helperProportions.width/2&&g-this.helperProportions.width/2<k&&n<i+this.helperProportions.height/
2&&h-this.helperProportions.height/2<m},_intersectsWithPointer:function(e){var f=c.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),e=c.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),f=f&&e,e=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!f)return!1;return this.floating?g&&g=="right"||e=="down"?2:1:e&&(e=="down"?2:1)},_intersectsWithSides:function(e){var f=c.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+
e.height/2,e.height),e=c.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),g=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?i=="right"&&e||i=="left"&&!e:g&&(g=="down"&&f||g=="up"&&!f)},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":
"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(e){var f=[],g=[],i=this._connectWith();if(i&&e)for(e=i.length-1;e>=0;e--)for(var h=c(i[e]),j=h.length-1;j>=0;j--){var k=c.data(h[j],"sortable");k&&k!=this&&!k.options.disabled&&g.push([c.isFunction(k.options.items)?k.options.items.call(k.element):c(k.options.items,k.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
k])}g.push([c.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):c(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(e=g.length-1;e>=0;e--)g[e][0].each(function(){f.push(this)});return c(f)},_removeCurrentsFromItems:function(){for(var c=this.currentItem.find(":data(sortable-item)"),f=0;f<this.items.length;f++)for(var g=0;g<c.length;g++)c[g]==this.items[f].item[0]&&this.items.splice(f,
1)},_refreshItems:function(e){this.items=[];this.containers=[this];var f=this.items,g=[[c.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):c(this.options.items,this.element),this]],i=this._connectWith();if(i)for(var h=i.length-1;h>=0;h--)for(var j=c(i[h]),k=j.length-1;k>=0;k--){var n=c.data(j[k],"sortable");n&&n!=this&&!n.options.disabled&&(g.push([c.isFunction(n.options.items)?n.options.items.call(n.element[0],e,{item:this.currentItem}):c(n.options.items,
n.element),n]),this.containers.push(n))}for(h=g.length-1;h>=0;h--){e=g[h][1];i=g[h][0];k=0;for(j=i.length;k<j;k++)n=c(i[k]),n.data("sortable-item",e),f.push({item:n,instance:e,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var f=this.items.length-1;f>=0;f--){var g=this.items[f],i=this.options.toleranceElement?c(this.options.toleranceElement,g.item):g.item;if(!e)g.width=i.outerWidth(),g.height=i.outerHeight();
i=i.offset();g.left=i.left;g.top=i.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(f=this.containers.length-1;f>=0;f--)i=this.containers[f].element.offset(),this.containers[f].containerCache.left=i.left,this.containers[f].containerCache.top=i.top,this.containers[f].containerCache.width=this.containers[f].element.outerWidth(),this.containers[f].containerCache.height=this.containers[f].element.outerHeight();return this},_createPlaceholder:function(e){var f=
e||this,g=f.options;if(!g.placeholder||g.placeholder.constructor==String){var i=g.placeholder;g.placeholder={element:function(){var e=c(document.createElement(f.currentItem[0].nodeName)).addClass(i||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!i)e.style.visibility="hidden";return e},update:function(c,e){if(!i||g.forcePlaceholderSize)e.height()||e.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||
0,10)),e.width()||e.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}f.placeholder=c(g.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);g.placeholder.update(f,f.placeholder)},_contactContainers:function(e){for(var f=null,g=null,i=this.containers.length-1;i>=0;i--)if(!c.ui.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(!f||
!c.ui.contains(this.containers[i].element[0],f.element[0]))f=this.containers[i],g=i}else if(this.containers[i].containerCache.over)this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0;if(f)if(this.containers.length===1)this.containers[g]._trigger("over",e,this._uiHash(this)),this.containers[g].containerCache.over=1;else if(this.currentContainer!=this.containers[g]){for(var f=1E4,i=null,h=this.positionAbs[this.containers[g].floating?"left":"top"],j=this.items.length-
1;j>=0;j--)if(c.ui.contains(this.containers[g].element[0],this.items[j].item[0])){var k=this.items[j][this.containers[g].floating?"left":"top"];Math.abs(k-h)<f&&(f=Math.abs(k-h),i=this.items[j])}if(i||this.options.dropOnEmpty)this.currentContainer=this.containers[g],i?this._rearrange(e,i,null,!0):this._rearrange(e,null,this.containers[g].element,!0),this._trigger("change",e,this._uiHash()),this.containers[g]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,
this.placeholder),this.containers[g]._trigger("over",e,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var f=this.options,e=c.isFunction(f.helper)?c(f.helper.apply(this.element[0],[e,this.currentItem])):f.helper=="clone"?this.currentItem.clone():this.currentItem;e.parents("body").length||c(f.appendTo!="parent"?f.appendTo:this.currentItem[0].parentNode)[0].appendChild(e[0]);if(e[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,
height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};(e[0].style.width==""||f.forceHelperSize)&&e.width(this.currentItem.width());(e[0].style.height==""||f.forceHelperSize)&&e.height(this.currentItem.height());return e},_adjustOffsetFromHelper:function(e){typeof e=="string"&&(e=e.split(" "));c.isArray(e)&&(e={left:+e[0],top:+e[1]||0});if("left"in e)this.offset.click.left=e.left+this.margins.left;if("right"in
e)this.offset.click.left=this.helperProportions.width-e.right+this.margins.left;if("top"in e)this.offset.click.top=e.top+this.margins.top;if("bottom"in e)this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=
this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&c.browser.msie)e={top:0,left:0};return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),
left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent")e.containment=this.helper[0].parentNode;
if(e.containment=="document"||e.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,c(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(e.containment)){var f=c(e.containment)[0],e=c(e.containment).offset(),
g=c(f).css("overflow")!="hidden";this.containment=[e.left+(parseInt(c(f).css("borderLeftWidth"),10)||0)+(parseInt(c(f).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(c(f).css("borderTopWidth"),10)||0)+(parseInt(c(f).css("paddingTop"),10)||0)-this.margins.top,e.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(c(f).css("borderLeftWidth"),10)||0)-(parseInt(c(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(g?Math.max(f.scrollHeight,
f.offsetHeight):f.offsetHeight)-(parseInt(c(f).css("borderTopWidth"),10)||0)-(parseInt(c(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,f){if(!f)f=this.position;var e=e=="absolute"?1:-1,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*e+this.offset.parent.top*
e-(c.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:g.scrollTop())*e),left:f.left+this.offset.relative.left*e+this.offset.parent.left*e-(c.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:g.scrollLeft())*e)}},_generatePosition:function(e){var f=this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:
this.scrollParent,i=/(html|body)/i.test(g[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var h=e.pageX,j=e.pageY;this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(h=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(j=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>
this.containment[2]&&(h=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(j=this.containment[3]+this.offset.click.top)),f.grid&&(j=this.originalPageY+Math.round((j-this.originalPageY)/f.grid[1])*f.grid[1],j=this.containment?!(j-this.offset.click.top<this.containment[1]||j-this.offset.click.top>this.containment[3])?j:!(j-this.offset.click.top<this.containment[1])?j-f.grid[1]:j+f.grid[1]:j,h=this.originalPageX+Math.round((h-this.originalPageX)/f.grid[0])*
f.grid[0],h=this.containment?!(h-this.offset.click.left<this.containment[0]||h-this.offset.click.left>this.containment[2])?h:!(h-this.offset.click.left<this.containment[0])?h-f.grid[0]:h+f.grid[0]:h));return{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(c.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:g.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(c.browser.safari&&
this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:g.scrollLeft())}},_rearrange:function(c,f,g,i){g?g[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?f.item[0]:f.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var h=this,j=this.counter;window.setTimeout(function(){j==h.counter&&h.refreshPositions(!i)},0)},_clear:function(e,f){this.reverting=!1;var g=[];!this._noFinalSort&&this.currentItem[0].parentNode&&
this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static")this._storedCSS[i]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!f&&g.push(function(c){this._trigger("receive",c,this._uiHash(this.fromOutside))});(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||
this.domPosition.parent!=this.currentItem.parent()[0])&&!f&&g.push(function(c){this._trigger("update",c,this._uiHash())});if(!c.ui.contains(this.element[0],this.currentItem[0])){f||g.push(function(c){this._trigger("remove",c,this._uiHash())});for(i=this.containers.length-1;i>=0;i--)c.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!f&&(g.push(function(c){return function(e){c._trigger("receive",e,this._uiHash(this))}}.call(this,this.containers[i])),g.push(function(c){return function(e){c._trigger("update",
e,this._uiHash(this))}}.call(this,this.containers[i])))}for(i=this.containers.length-1;i>=0;i--)if(f||g.push(function(c){return function(e){c._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over)g.push(function(c){return function(e){c._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0;this._storedCursor&&c("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",
this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",e,this._uiHash());for(i=0;i<g.length;i++)g[i].call(this,e);this._trigger("stop",e,this._uiHash())}return!1}f||this._trigger("beforeStop",e,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!f){for(i=
0;i<g.length;i++)g[i].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){c.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var f=e||this;return{helper:f.helper,placeholder:f.placeholder||c([]),position:f.position,originalPosition:f.originalPosition,offset:f.positionAbs,item:f.currentItem,sender:e?e.element:null}}});c.extend(c.ui.sortable,{version:"1.8.9"})})(jQuery);
(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var e=this,f=e.options;e.running=0;e.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
e.headers=e.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){f.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){f.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){f.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){f.disabled||c(this).removeClass("ui-state-focus")});e.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(f.navigation){var g=e.element.find("a").filter(f.navigationFilter).eq(0);if(g.length){var i=g.closest(".ui-accordion-header");e.active=i.length?i:g.closest(".ui-accordion-content").prev()}}e.active=e._findActive(e.active||f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");e.active.next().addClass("ui-accordion-content-active");e._createIcons();e.resize();e.element.attr("role","tablist");e.headers.attr("role","tab").bind("keydown.accordion",
function(c){return e._keydown(c)}).next().attr("role","tabpanel");e.headers.not(e.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();e.active.length?e.active.attr({"aria-expanded":"true",tabIndex:0}):e.headers.eq(0).attr("tabIndex",0);c.browser.safari||e.headers.find("a").attr("tabIndex",-1);f.event&&e.headers.bind(f.event.split(" ").join(".accordion ")+".accordion",function(c){e._clickHandler.call(e,c,this);c.preventDefault()})},_createIcons:function(){var e=this.options;e.icons&&
(c("<span></span>").addClass("ui-icon "+e.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(e.icons.header).toggleClass(e.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var e=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var f=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");(e.autoHeight||e.fillHeight)&&f.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(e,f){c.Widget.prototype._setOption.apply(this,arguments);e=="active"&&this.activate(f);e=="icons"&&(this._destroyIcons(),
f&&this._createIcons());if(e=="disabled")this.headers.add(this.headers.next())[f?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(e){if(!this.options.disabled&&!e.altKey&&!e.ctrlKey){var f=c.ui.keyCode,g=this.headers.length,i=this.headers.index(e.target),h=!1;switch(e.keyCode){case f.RIGHT:case f.DOWN:h=this.headers[(i+1)%g];break;case f.LEFT:case f.UP:h=this.headers[(i-1+g)%g];break;case f.SPACE:case f.ENTER:this._clickHandler({target:e.target},e.target),e.preventDefault()}if(h)return c(e.target).attr("tabIndex",
-1),c(h).attr("tabIndex",0),h.focus(),!1;return!0}},resize:function(){var e=this.options,f;if(e.fillSpace){if(c.browser.msie){var g=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",g);this.headers.each(function(){f-=c(this).outerHeight(!0)});this.headers.next().each(function(){c(this).height(Math.max(0,f-c(this).innerHeight()+c(this).height()))}).css("overflow","auto")}else e.autoHeight&&
(f=0,this.headers.next().each(function(){f=Math.max(f,c(this).height("").height())}).height(f));return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(e){return e?typeof e==="number"?this.headers.filter(":eq("+e+")"):this.headers.not(this.headers.not(e)):e===!1?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(e,f){var g=this.options;if(!g.disabled)if(e.target){if(e=c(e.currentTarget||f),f=e[0]===
this.active[0],g.active=g.collapsible&&f?!1:this.headers.index(e),!(this.running||!g.collapsible&&f)){var i=this.active,h=e.next(),j=this.active.next(),k={options:g,newHeader:f&&g.collapsible?c([]):e,oldHeader:this.active,newContent:f&&g.collapsible?c([]):h,oldContent:j},n=this.headers.index(this.active[0])>this.headers.index(e[0]);this.active=f?c([]):e;this._toggle(h,j,k,f,n);i.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
f||(e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected),e.next().addClass("ui-accordion-content-active"))}}else if(g.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);this.active.next().addClass("ui-accordion-content-active");var j=this.active.next(),
k={options:g,newHeader:c([]),oldHeader:g.active,newContent:c([]),oldContent:j},h=this.active=c([]);this._toggle(h,j,k)}},_toggle:function(e,f,g,i,h){var j=this,k=j.options;j.toShow=e;j.toHide=f;j.data=g;var n=function(){if(j)return j._completed.apply(j,arguments)};j._trigger("changestart",null,j.data);j.running=f.size()===0?e.size():f.size();if(k.animated){g={};g=k.collapsible&&i?{toShow:c([]),toHide:f,complete:n,down:h,autoHeight:k.autoHeight||k.fillSpace}:{toShow:e,toHide:f,complete:n,down:h,autoHeight:k.autoHeight||
k.fillSpace};if(!k.proxied)k.proxied=k.animated;if(!k.proxiedDuration)k.proxiedDuration=k.duration;k.animated=c.isFunction(k.proxied)?k.proxied(g):k.proxied;k.duration=c.isFunction(k.proxiedDuration)?k.proxiedDuration(g):k.proxiedDuration;var i=c.ui.accordion.animations,m=k.duration,p=k.animated;p&&!i[p]&&!c.easing[p]&&(p="slide");i[p]||(i[p]=function(c){this.slide(c,{easing:p,duration:m||700})});i[p](g)}else k.collapsible&&i?e.toggle():(f.hide(),e.show()),n(!0);f.prev().attr({"aria-expanded":"false",
tabIndex:-1}).blur();e.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.9",animations:{slide:function(e,f){e=c.extend({easing:"swing",
duration:300},e,f);if(e.toHide.size())if(e.toShow.size()){var g=e.toShow.css("overflow"),i=0,h={},j={},k,f=e.toShow;k=f[0].style.width;f.width(parseInt(f.parent().width(),10)-parseInt(f.css("paddingLeft"),10)-parseInt(f.css("paddingRight"),10)-(parseInt(f.css("borderLeftWidth"),10)||0)-(parseInt(f.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(f,g){j[g]="hide";f=(""+c.css(e.toShow[0],g)).match(/^([\d+-.]+)(.*)$/);h[g]={value:f[1],unit:f[2]||"px"}});e.toShow.css({height:0,
overflow:"hidden"}).show();e.toHide.filter(":hidden").each(e.complete).end().filter(":visible").animate(j,{step:function(c,f){f.prop=="height"&&(i=f.end-f.start===0?0:(f.now-f.start)/(f.end-f.start));e.toShow[0].style[f.prop]=i*h[f.prop].value+h[f.prop].unit},duration:e.duration,easing:e.easing,complete:function(){e.autoHeight||e.toShow.css("height","");e.toShow.css({width:k,overflow:g});e.complete()}})}else e.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},e);else e.toShow.animate({height:"show",
paddingTop:"show",paddingBottom:"show"},e)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery);
(function(c){c.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var e=this,f=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(f){if(!e.options.disabled&&!e.element.attr("readonly")){g=!1;var h=c.ui.keyCode;switch(f.keyCode){case h.PAGE_UP:e._move("previousPage",
f);break;case h.PAGE_DOWN:e._move("nextPage",f);break;case h.UP:e._move("previous",f);f.preventDefault();break;case h.DOWN:e._move("next",f);f.preventDefault();break;case h.ENTER:case h.NUMPAD_ENTER:e.menu.active&&(g=!0,f.preventDefault());case h.TAB:if(!e.menu.active)break;e.menu.select(f);break;case h.ESCAPE:e.element.val(e.term);e.close(f);break;default:clearTimeout(e.searching),e.searching=setTimeout(function(){if(e.term!=e.element.val())e.selectedItem=null,e.search(null,f)},e.options.delay)}}}).bind("keypress.autocomplete",
function(c){g&&(g=!1,c.preventDefault())}).bind("focus.autocomplete",function(){if(!e.options.disabled)e.selectedItem=null,e.previous=e.element.val()}).bind("blur.autocomplete",function(c){if(!e.options.disabled)clearTimeout(e.searching),e.closing=setTimeout(function(){e.close(c);e._change(c)},150)});this._initSource();this.response=function(){return e._response.apply(e,arguments)};this.menu=c("<ul></ul>").addClass("ui-autocomplete").appendTo(c(this.options.appendTo||"body",f)[0]).mousedown(function(f){var h=
e.menu.element[0];c(f.target).closest(".ui-menu-item").length||setTimeout(function(){c(document).one("mousedown",function(f){f.target!==e.element[0]&&f.target!==h&&!c.ui.contains(h,f.target)&&e.close()})},1);setTimeout(function(){clearTimeout(e.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");!1!==e._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&e.element.val(f.value)},selected:function(c,h){var g=h.item.data("item.autocomplete"),k=e.previous;if(e.element[0]!==
f.activeElement)e.element.focus(),e.previous=k,setTimeout(function(){e.previous=k;e.selectedItem=g},1);!1!==e._trigger("select",c,{item:g})&&e.element.val(g.value);e.term=e.element.val();e.close(c);e.selectedItem=g},blur:function(){e.menu.element.is(":visible")&&e.element.val()!==e.term&&e.element.val(e.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");c.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
this.menu.element.remove();c.Widget.prototype.destroy.call(this)},_setOption:function(e,f){c.Widget.prototype._setOption.apply(this,arguments);e==="source"&&this._initSource();e==="appendTo"&&this.menu.element.appendTo(c(f||"body",this.element[0].ownerDocument)[0]);e==="disabled"&&f&&this.xhr&&this.xhr.abort()},_initSource:function(){var e=this,f,g;c.isArray(this.options.source)?(f=this.options.source,this.source=function(e,h){h(c.ui.autocomplete.filter(f,e.term))}):typeof this.options.source==="string"?
(g=this.options.source,this.source=function(f,h){e.xhr&&e.xhr.abort();e.xhr=c.ajax({url:g,data:f,dataType:"json",success:function(c,f,g){g===e.xhr&&h(c);e.xhr=null},error:function(c){c===e.xhr&&h([]);e.xhr=null}})}):this.source=this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length<this.options.minLength)return this.close(f);clearTimeout(this.closing);if(this._trigger("search",f)!==!1)return this._search(c)},_search:function(c){this.pending++;
this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)},_response:function(c){!this.options.disabled&&c&&c.length?(c=this._normalize(c),this._suggest(c),this._trigger("open")):this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",c))},_change:function(c){this.previous!==this.element.val()&&
this._trigger("change",c,{item:this.selectedItem})},_normalize:function(e){if(e.length&&e[0].label&&e[0].value)return e;return c.map(e,function(e){if(typeof e==="string")return{label:e,value:e};return c.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var f=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(f,e);this.menu.deactivate();this.menu.refresh();f.show();this._resizeMenu();f.position(c.extend({of:this.element},this.options.position))},
_resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(e,f){var g=this;c.each(f,function(c,f){g._renderItem(e,f)})},_renderItem:function(e,f){return c("<li></li>").data("item.autocomplete",f).append(c("<a></a>").text(f.label)).appendTo(e)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c))this.element.val(this.term),this.menu.deactivate();
else this.menu[c](f);else this.search(null,f)},widget:function(){return this.menu.element}});c.extend(c.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,f){var g=RegExp(c.ui.autocomplete.escapeRegex(f),"i");return c.grep(e,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
(function(c){c.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(f){c(f.target).closest(".ui-menu-item a").length&&(f.preventDefault(),e.select(f))});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(f){e.activate(f,c(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var g=f.offset().top-this.element.offset().top,i=this.element.attr("scrollTop"),h=this.element.height();g<0?this.element.attr("scrollTop",i+g):g>=h&&this.element.attr("scrollTop",i+g-h+f.height())}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})},deactivate:function(){if(this.active)this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),
this._trigger("blur"),this.active=null},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,f,g){this.active?(c=this.active[c+"All"](".ui-menu-item").eq(0),c.length?this.activate(g,c):this.activate(g,this.element.children(f))):this.activate(g,this.element.children(f))},
nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var f=this.active.offset().top,g=this.element.height(),i=this.element.children(".ui-menu-item").filter(function(){var e=c(this).offset().top-f-g+c(this).height();return e<10&&e>-10});i.length||(i=this.element.children(".ui-menu-item:last"));this.activate(e,i)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},
previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var f=this.active.offset().top,g=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=c(this).offset().top-f+g-c(this).height();return e<10&&e>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||
this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(c){this._trigger("selected",c,{item:this.active})}})})(jQuery);
(function(c){var e,f=function(e){c(":ui-button",e.target.form).each(function(){var e=c(this).data("button");setTimeout(function(){e.refresh()},1)})},g=function(e){var f=e.name,g=e.form,k=c([]);f&&(k=g?c(g).find("[name='"+f+"']"):c("[name='"+f+"']",e.ownerDocument).filter(function(){return!this.form}));return k};c.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
f);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var i=this,h=this.options,j=this.type==="checkbox"||this.type==="radio",k="ui-state-hover"+(!j?" ui-state-active":"");if(h.label===null)h.label=this.buttonElement.html();if(this.element.is(":disabled"))h.disabled=!0;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
function(){h.disabled||(c(this).addClass("ui-state-hover"),this===e&&c(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){h.disabled||c(this).removeClass(k)}).bind("focus.button",function(){c(this).addClass("ui-state-focus")}).bind("blur.button",function(){c(this).removeClass("ui-state-focus")});j&&this.element.bind("change.button",function(){i.refresh()});this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled)return!1;c(this).toggleClass("ui-state-active");
i.buttonElement.attr("aria-pressed",i.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled)return!1;c(this).addClass("ui-state-active");i.buttonElement.attr("aria-pressed",!0);var e=i.element[0];g(e).not(e).map(function(){return c(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",!1)}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;c(this).addClass("ui-state-active");e=this;c(document).one("mouseup",
function(){e=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;c(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(h.disabled)return!1;(e.keyCode==c.ui.keyCode.SPACE||e.keyCode==c.ui.keyCode.ENTER)&&c(this).addClass("ui-state-active")}).bind("keyup.button",function(){c(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===c.ui.keyCode.SPACE&&c(this).click()}));this._setOption("disabled",h.disabled)},
_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=
this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||
this.buttonElement.removeAttr("title");c.Widget.prototype.destroy.call(this)},_setOption:function(e,f){c.Widget.prototype._setOption.apply(this,arguments);e==="disabled"&&(f?this.element.attr("disabled",!0):this.element.removeAttr("disabled"));this._resetButton()},refresh:function(){var e=this.element.is(":disabled");e!==this.options.disabled&&this._setOption("disabled",e);this.type==="radio"?g(this.element[0]).each(function(){c(this).is(":checked")?c(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
!0):c(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",!1)}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",!0):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",!1))},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var e=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
f=c("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),g=this.options.icons,k=g.primary&&g.secondary;g.primary||g.secondary?(e.addClass("ui-button-text-icon"+(k?"s":g.primary?"-primary":"-secondary")),g.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>"),g.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>"),this.options.text||(e.addClass(k?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary"),
this.hasTitle||e.attr("title",f))):e.addClass("ui-button-text-only")}}});c.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,f){e==="disabled"&&this.buttons.button("option",e,f);c.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");c.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(c,e){var f={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},g={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};c.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(e){var f=c(this).css(e).offset().top;f<0&&c(this).css("top",e.top-f)}},resizable:!0,
show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,f=e.options,g=f.title||"&#160;",k=c.ui.dialog.getTitleId(e.element),n=(e.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+f.dialogClass).css({zIndex:f.zIndex}).attr("tabIndex",-1).css("outline",
0).keydown(function(g){f.closeOnEscape&&g.keyCode&&g.keyCode===c.ui.keyCode.ESCAPE&&(e.close(g),g.preventDefault())}).attr({role:"dialog","aria-labelledby":k}).mousedown(function(c){e.moveToTop(!1,c)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(n);var m=(e.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(n),p=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
"button").hover(function(){p.addClass("ui-state-hover")},function(){p.removeClass("ui-state-hover")}).focus(function(){p.addClass("ui-state-focus")}).blur(function(){p.removeClass("ui-state-focus")}).click(function(c){e.close(c);return!1}).appendTo(m);(e.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(f.closeText).appendTo(p);c("<span></span>").addClass("ui-dialog-title").attr("id",k).html(g).prependTo(m);if(c.isFunction(f.beforeclose)&&!c.isFunction(f.beforeClose))f.beforeClose=
f.beforeclose;m.find("*").add(m).disableSelection();f.draggable&&c.fn.draggable&&e._makeDraggable();f.resizable&&c.fn.resizable&&e._makeResizable();e._createButtons(f.buttons);e._isOpen=!1;c.fn.bgiframe&&n.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();this.originalTitle&&
this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(e){var f=this,g,k;if(!1!==f._trigger("beforeClose",e)){f.overlay&&f.overlay.destroy();f.uiDialog.unbind("keypress.ui-dialog");f._isOpen=!1;f.options.hide?f.uiDialog.hide(f.options.hide,function(){f._trigger("close",e)}):(f.uiDialog.hide(),f._trigger("close",e));c.ui.dialog.overlay.resize();if(f.options.modal)g=0,c(".ui-dialog").each(function(){this!==f.uiDialog[0]&&(k=c(this).css("z-index"),
isNaN(k)||(g=Math.max(g,k)))}),c.ui.dialog.maxZ=g;return f}},isOpen:function(){return this._isOpen},moveToTop:function(e,f){var g=this.options;if(g.modal&&!e||!g.stack&&!g.modal)return this._trigger("focus",f);if(g.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=g.zIndex;if(this.overlay)c.ui.dialog.maxZ+=1,this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ);e={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",
c.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",f);return this},open:function(){if(!this._isOpen){var e=this.options,f=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;this._size();this._position(e.position);f.show(e.show);this.moveToTop(!0);e.modal&&f.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var f=c(":tabbable",this),h=f.filter(":first"),f=f.filter(":last");if(e.target===f[0]&&!e.shiftKey)return h.focus(1),!1;else if(e.target===h[0]&&
e.shiftKey)return f.focus(1),!1}});c(this.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();this._isOpen=!0;this._trigger("open");return this}},_createButtons:function(e){var f=this,g=!1,k=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),n=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(k);f.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&c.each(e,function(){return!(g=
!0)});g&&(c.each(e,function(e,g){g=c.isFunction(g)?{click:g,text:e}:g;e=c('<button type="button"></button>').attr(g,!0).unbind("click").click(function(){g.click.apply(f.element[0],arguments)}).appendTo(n);c.fn.button&&e.button()}),k.appendTo(f.uiDialog))},_makeDraggable:function(){function e(c){return{position:c.position,offset:c.offset}}var f=this,g=f.options,k=c(document),n;f.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",
start:function(k,p){n=g.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");f._trigger("dragStart",k,e(p))},drag:function(c,g){f._trigger("drag",c,e(g))},stop:function(m,p){g.position=[p.position.left-k.scrollLeft(),p.position.top-k.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(n);f._trigger("dragStop",m,e(p));c.ui.dialog.overlay.resize()}})},_makeResizable:function(f){function h(c){return{originalPosition:c.originalPosition,originalSize:c.originalSize,
position:c.position,size:c.size}}var f=f===e?this.options.resizable:f,g=this,k=g.options,n=g.uiDialog.css("position"),f=typeof f==="string"?f:"n,e,s,w,se,sw,ne,nw";g.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:g.element,maxWidth:k.maxWidth,maxHeight:k.maxHeight,minWidth:k.minWidth,minHeight:g._minHeight(),handles:f,start:function(e,f){c(this).addClass("ui-dialog-resizing");g._trigger("resizeStart",e,h(f))},resize:function(c,e){g._trigger("resize",c,h(e))},stop:function(e,
f){c(this).removeClass("ui-dialog-resizing");k.height=c(this).height();k.width=c(this).width();g._trigger("resizeStop",e,h(f));c.ui.dialog.overlay.resize()}}).css("position",n).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(e){var f=[],g=[0,0],k;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e)f=e.split?e.split(" "):[e[0],e[1]],f.length===
1&&(f[1]=f[0]),c.each(["left","top"],function(c,e){+f[c]===f[c]&&(g[c]=f[c],f[c]=e)}),e={my:f.join(" "),at:f.join(" "),offset:g.join(" ")};e=c.extend({},c.ui.dialog.prototype.options.position,e)}else e=c.ui.dialog.prototype.options.position;(k=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},e));k||this.uiDialog.hide()},_setOptions:function(e){var h=this,j={},k=!1;c.each(e,function(c,e){h._setOption(c,e);c in f&&(k=!0);c in g&&(j[c]=
e)});k&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",j)},_setOption:function(e,f){var g=this.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":this._createButtons(f);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+f);break;case "dialogClass":g.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+f);break;case "disabled":f?g.addClass("ui-dialog-disabled"):g.removeClass("ui-dialog-disabled");
break;case "draggable":var k=g.is(":data(draggable)");k&&!f&&g.draggable("destroy");!k&&f&&this._makeDraggable();break;case "position":this._position(f);break;case "resizable":(k=g.is(":data(resizable)"))&&!f&&g.resizable("destroy");k&&typeof f==="string"&&g.resizable("option","handles",f);!k&&f!==!1&&this._makeResizable(f);break;case "title":c(".ui-dialog-title",this.uiDialogTitlebar).html(""+(f||"&#160;"))}c.Widget.prototype._setOption.apply(this,arguments)},_size:function(){var e=this.options,
f,g,k=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;f=this.uiDialog.css({height:"auto",width:e.width}).height();g=Math.max(0,e.minHeight-f);e.height==="auto"?c.support.minHeight?this.element.css({minHeight:g,height:"auto"}):(this.uiDialog.show(),e=this.element.css("height","auto").height(),k||this.uiDialog.hide(),this.element.height(Math.max(e,g))):this.element.height(Math.max(e.height-f,0));this.uiDialog.is(":data(resizable)")&&
this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.9",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c)this.uuid+=1,c=this.uuid;return"ui-dialog-title-"+c},overlay:function(e){this.$el=c.ui.dialog.overlay.create(e)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(e){this.instances.length===
0&&(setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(e){if(c(e.target).zIndex()<c.ui.dialog.overlay.maxZ)return!1})},1),c(document).bind("keydown.dialog-overlay",function(f){e.options.closeOnEscape&&f.keyCode&&f.keyCode===c.ui.keyCode.ESCAPE&&(e.close(f),f.preventDefault())}),c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize));var f=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});c.fn.bgiframe&&f.bgiframe();this.instances.push(f);return f},destroy:function(e){var f=c.inArray(e,this.instances);f!=-1&&this.oldInstances.push(this.instances.splice(f,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");e.remove();var g=0;c.each(this.instances,function(){g=Math.max(g,this.css("z-index"))});this.maxZ=g},height:function(){var e,f;return c.browser.msie&&c.browser.version<7?(e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),
f=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),e<f?c(window).height()+"px":e+"px"):c(document).height()+"px"},width:function(){var e,f;return c.browser.msie&&c.browser.version<7?(e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),f=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),e<f?c(window).width()+"px":e+"px"):c(document).width()+"px"},resize:function(){var e=c([]);c.each(c.ui.dialog.overlay.instances,function(){e=e.add(this)});
e.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(c){c.widget("ui.slider",c.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var e=this,f=this.options;this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");f.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=c([]);if(f.range){if(f.range===!0){this.range=c("<div></div>");if(!f.values)f.values=[this._valueMin(),this._valueMin()];if(f.values.length&&f.values.length!==2)f.values=[f.values[0],f.values[0]]}else this.range=c("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");(f.range==="min"||f.range==="max")&&this.range.addClass("ui-slider-range-"+f.range);this.range.addClass("ui-widget-header")}c(".ui-slider-handle",this.element).length===0&&c("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(f.values&&f.values.length)for(;c(".ui-slider-handle",this.element).length<f.values.length;)c("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=c(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){f.disabled||c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){f.disabled?
c(this).blur():(c(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),c(this).addClass("ui-state-focus"))}).blur(function(){c(this).removeClass("ui-state-focus")});this.handles.each(function(e){c(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(f){var i=!0,h=c(this).data("index.ui-slider-handle"),j,k,n;if(!e.options.disabled){switch(f.keyCode){case c.ui.keyCode.HOME:case c.ui.keyCode.END:case c.ui.keyCode.PAGE_UP:case c.ui.keyCode.PAGE_DOWN:case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(i=
!1,!e._keySliding&&(e._keySliding=!0,c(this).addClass("ui-state-active"),j=e._start(f,h),j===!1))return}n=e.options.step;j=e.options.values&&e.options.values.length?k=e.values(h):k=e.value();switch(f.keyCode){case c.ui.keyCode.HOME:k=e._valueMin();break;case c.ui.keyCode.END:k=e._valueMax();break;case c.ui.keyCode.PAGE_UP:k=e._trimAlignValue(j+(e._valueMax()-e._valueMin())/5);break;case c.ui.keyCode.PAGE_DOWN:k=e._trimAlignValue(j-(e._valueMax()-e._valueMin())/5);break;case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:if(j===
e._valueMax())return;k=e._trimAlignValue(j+n);break;case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(j===e._valueMin())return;k=e._trimAlignValue(j-n)}e._slide(f,h,k);return i}}).keyup(function(f){var i=c(this).data("index.ui-slider-handle");if(e._keySliding)e._keySliding=!1,e._stop(f,i),e._change(f,i),c(this).removeClass("ui-state-active")});this._refreshValue();this._animateOff=!1},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options,g,i,h,j,k;if(f.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:e.pageX,y:e.pageY});i=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(e){var f=Math.abs(g-j.values(e));i>f&&(i=f,h=c(this),k=e)});f.range===!0&&this.values(1)===f.min&&(k+=1,h=c(this.handles[k]));if(this._start(e,
k)===!1)return!1;this._mouseSliding=!0;j._handleIndex=k;h.addClass("ui-state-active").focus();f=h.offset();this._clickOffset=!c(e.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:e.pageX-f.left-h.width()/2,top:e.pageY-f.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(e,k,g);return this._animateOff=!0},_mouseStart:function(){return!0},
_mouseDrag:function(c){var f=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,f);return!1},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var f;this.orientation===
"horizontal"?(f=this.elementSize.width,c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(f=this.elementSize.height,c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));f=c/f;f>1&&(f=1);f<0&&(f=0);this.orientation==="vertical"&&(f=1-f);c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+f*c)},_start:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length)g.value=this.values(f),
g.values=this.values();return this._trigger("start",c,g)},_slide:function(c,f,g){var i;if(this.options.values&&this.options.values.length){i=this.values(f?0:1);if(this.options.values.length===2&&this.options.range===!0&&(f===0&&g>i||f===1&&g<i))g=i;g!==this.values(f)&&(i=this.values(),i[f]=g,c=this._trigger("slide",c,{handle:this.handles[f],value:g,values:i}),this.values(f?0:1),c!==!1&&this.values(f,g,!0))}else g!==this.value()&&(c=this._trigger("slide",c,{handle:this.handles[f],value:g}),c!==!1&&
this.value(g))},_stop:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length)g.value=this.values(f),g.values=this.values();this._trigger("stop",c,g)},_change:function(c,f){if(!this._keySliding&&!this._mouseSliding){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length)g.value=this.values(f),g.values=this.values();this._trigger("change",c,g)}},value:function(c){if(arguments.length)this.options.value=
this._trimAlignValue(c),this._refreshValue(),this._change(null,0);return this._value()},values:function(e,f){var g,i,h;arguments.length>1&&(this.options.values[e]=this._trimAlignValue(f),this._refreshValue(),this._change(null,e));if(arguments.length)if(c.isArray(arguments[0])){g=this.options.values;i=arguments[0];for(h=0;h<g.length;h+=1)g[h]=this._trimAlignValue(i[h]),this._change(null,h);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(e):this.value();
else return this._values()},_setOption:function(e,f){var g,i=0;if(c.isArray(this.options.values))i=this.options.values.length;c.Widget.prototype._setOption.apply(this,arguments);switch(e){case "disabled":f?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.attr("disabled","disabled"),this.element.addClass("ui-disabled")):(this.handles.removeAttr("disabled"),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(g=0;g<i;g+=1)this._change(null,g);this._animateOff=!1}},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(c){var f,g;if(arguments.length)return f=this.options.values[c],this._trimAlignValue(f);
else{f=this.options.values.slice();for(g=0;g<f.length;g+=1)f[g]=this._trimAlignValue(f[g]);return f}},_trimAlignValue:function(c){if(c<=this._valueMin())return this._valueMin();if(c>=this._valueMax())return this._valueMax();var f=this.options.step>0?this.options.step:1,g=(c-this._valueMin())%f;alignValue=c-g;Math.abs(g)*2>=f&&(alignValue+=g>0?f:-f);return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e=
this.options.range,f=this.options,g=this,i=!this._animateOff?f.animate:!1,h,j={},k,n,m,p;if(this.options.values&&this.options.values.length)this.handles.each(function(e){h=(g.values(e)-g._valueMin())/(g._valueMax()-g._valueMin())*100;j[g.orientation==="horizontal"?"left":"bottom"]=h+"%";c(this).stop(1,1)[i?"animate":"css"](j,f.animate);if(g.options.range===!0)if(g.orientation==="horizontal"){if(e===0)g.range.stop(1,1)[i?"animate":"css"]({left:h+"%"},f.animate);if(e===1)g.range[i?"animate":"css"]({width:h-
k+"%"},{queue:!1,duration:f.animate})}else{if(e===0)g.range.stop(1,1)[i?"animate":"css"]({bottom:h+"%"},f.animate);if(e===1)g.range[i?"animate":"css"]({height:h-k+"%"},{queue:!1,duration:f.animate})}k=h});else{n=this.value();m=this._valueMin();p=this._valueMax();h=p!==m?(n-m)/(p-m)*100:0;j[g.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[i?"animate":"css"](j,f.animate);if(e==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[i?"animate":"css"]({width:h+"%"},f.animate);
if(e==="max"&&this.orientation==="horizontal")this.range[i?"animate":"css"]({width:100-h+"%"},{queue:!1,duration:f.animate});if(e==="min"&&this.orientation==="vertical")this.range.stop(1,1)[i?"animate":"css"]({height:h+"%"},f.animate);if(e==="max"&&this.orientation==="vertical")this.range[i?"animate":"css"]({height:100-h+"%"},{queue:!1,duration:f.animate})}}});c.extend(c.ui.slider,{version:"1.8.9"})})(jQuery);
(function(c,e){var f=0,g=0;c.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(c,e){c=="selected"?this.options.collapsible&&e==this.options.selected||this.select(e):
(this.options[c]=e,this._tabify())},_tabId:function(c){return c.title&&c.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++f},_sanitizeSelector:function(c){return c.replace(/:/g,"\\:")},_cookie:function(){var e=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++g);return c.cookie.apply(null,[e].concat(c.makeArray(arguments)))},_ui:function(c,e){return{tab:c,panel:e,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var e=
c(this);e.html(e.data("label.tabs")).removeData("label.tabs")})},_tabify:function(f){function h(e,f){e.css("display","");!c.support.opacity&&f.opacity&&e[0].style.removeAttribute("filter")}var g=this,k=this.options,n=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=c(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);this.anchors.each(function(e,f){var h=c(f).attr("href"),i=h.split("#")[0],o;if(i&&(i===location.toString().split("#")[0]||
(o=c("base")[0])&&i===o.href))h=f.hash,f.href=h;n.test(h)?g.panels=g.panels.add(g.element.find(g._sanitizeSelector(h))):h&&h!=="#"?(c.data(f,"href.tabs",h),c.data(f,"load.tabs",h.replace(/#.*$/,"")),h=g._tabId(f),f.href="#"+h,f=g.element.find("#"+h),f.length||(f=c(k.panelTemplate).attr("id",h).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(g.panels[e-1]||g.list),f.data("destroy.tabs",!0)),g.panels=g.panels.add(f)):k.disabled.push(e)});if(f){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(k.selected===e){location.hash&&this.anchors.each(function(c,e){if(e.hash==location.hash)return k.selected=c,!1});if(typeof k.selected!=="number"&&k.cookie)k.selected=parseInt(g._cookie(),10);if(typeof k.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)k.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));k.selected=k.selected||(this.lis.length?0:-1)}else if(k.selected===null)k.selected=-1;k.selected=k.selected>=0&&this.anchors[k.selected]||k.selected<0?k.selected:0;k.disabled=c.unique(k.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(c){return g.lis.index(c)}))).sort();c.inArray(k.selected,k.disabled)!=-1&&k.disabled.splice(c.inArray(k.selected,k.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
k.selected>=0&&this.anchors.length&&(g.element.find(g._sanitizeSelector(g.anchors[k.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(k.selected).addClass("ui-tabs-selected ui-state-active"),g.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[k.selected],g.element.find(g._sanitizeSelector(g.anchors[k.selected].hash))[0]))}),this.load(k.selected));c(window).bind("unload",function(){g.lis.add(g.anchors).unbind(".tabs");g.lis=g.anchors=g.panels=null})}else k.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
this.element[k.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");k.cookie&&this._cookie(k.selected,k.cookie);for(var f=0,m;m=this.lis[f];f++)c(m)[c.inArray(f,k.disabled)!=-1&&!c(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");k.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(k.event!=="mouseover"){var p=function(c,e){e.is(":not(.ui-state-disabled)")&&e.addClass("ui-state-"+c)};this.lis.bind("mouseover.tabs",
function(){p("hover",c(this))});this.lis.bind("mouseout.tabs",function(){c(this).removeClass("ui-state-hover")});this.anchors.bind("focus.tabs",function(){p("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){c(this).closest("li").removeClass("ui-state-focus")})}var r,o;if(k.fx)c.isArray(k.fx)?(r=k.fx[0],o=k.fx[1]):r=o=k.fx;var u=o?function(e,f){c(e).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
function(){h(f,o);g._trigger("show",null,g._ui(e,f[0]))})}:function(e,f){c(e).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");g._trigger("show",null,g._ui(e,f[0]))},s=r?function(c,e){e.animate(r,r.duration||"normal",function(){g.lis.removeClass("ui-tabs-selected ui-state-active");e.addClass("ui-tabs-hide");h(e,r);g.element.dequeue("tabs")})}:function(c,e){g.lis.removeClass("ui-tabs-selected ui-state-active");e.addClass("ui-tabs-hide");g.element.dequeue("tabs")};
this.anchors.bind(k.event+".tabs",function(){var e=this,f=c(e).closest("li"),h=g.panels.filter(":not(.ui-tabs-hide)"),i=g.element.find(g._sanitizeSelector(e.hash));if(f.hasClass("ui-tabs-selected")&&!k.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||g.panels.filter(":animated").length||g._trigger("select",null,g._ui(this,i[0]))===!1)return this.blur(),!1;k.selected=g.anchors.index(this);g.abort();if(k.collapsible)if(f.hasClass("ui-tabs-selected"))return k.selected=
-1,k.cookie&&g._cookie(k.selected,k.cookie),g.element.queue("tabs",function(){s(e,h)}).dequeue("tabs"),this.blur(),!1;else if(!h.length)return k.cookie&&g._cookie(k.selected,k.cookie),g.element.queue("tabs",function(){u(e,i)}),g.load(g.anchors.index(this)),this.blur(),!1;k.cookie&&g._cookie(k.selected,k.cookie);if(i.length)h.length&&g.element.queue("tabs",function(){s(e,h)}),g.element.queue("tabs",function(){u(e,i)}),g.load(g.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";
c.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(c){typeof c=="string"&&(c=this.anchors.index(this.anchors.filter("[href$="+c+"]")));return c},destroy:function(){var e=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
c.data(this,"href.tabs");if(e)this.href=e;var f=c(this).unbind(".tabs");c.each(["href","load","cache"],function(c,e){f.removeData(e+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){c.data(this,"destroy.tabs")?c(this).remove():c(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});e.cookie&&this._cookie(null,e.cookie);return this},add:function(f,
h,g){if(g===e)g=this.anchors.length;var k=this,n=this.options,h=c(n.tabTemplate.replace(/#\{href\}/g,f).replace(/#\{label\}/g,h)),f=!f.indexOf("#")?f.replace("#",""):this._tabId(c("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var m=k.element.find("#"+f);m.length||(m=c(n.panelTemplate).attr("id",f).data("destroy.tabs",!0));m.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");g>=this.lis.length?(h.appendTo(this.list),m.appendTo(this.list[0].parentNode)):
(h.insertBefore(this.lis[g]),m.insertBefore(this.panels[g]));n.disabled=c.map(n.disabled,function(c){return c>=g?++c:c});this._tabify();if(this.anchors.length==1)n.selected=0,h.addClass("ui-tabs-selected ui-state-active"),m.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){k._trigger("show",null,k._ui(k.anchors[0],k.panels[0]))}),this.load(0);this._trigger("add",null,this._ui(this.anchors[g],this.panels[g]));return this},remove:function(e){var e=this._getIndex(e),f=this.options,g=this.lis.eq(e).remove(),
k=this.panels.eq(e).remove();g.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(e+(e+1<this.anchors.length?1:-1));f.disabled=c.map(c.grep(f.disabled,function(c){return c!=e}),function(c){return c>=e?--c:c});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],k[0]));return this},enable:function(e){var e=this._getIndex(e),f=this.options;if(c.inArray(e,f.disabled)!=-1)return this.lis.eq(e).removeClass("ui-state-disabled"),f.disabled=c.grep(f.disabled,function(c){return c!=
e}),this._trigger("enable",null,this._ui(this.anchors[e],this.panels[e])),this},disable:function(c){var c=this._getIndex(c),e=this.options;c!=e.selected&&(this.lis.eq(c).addClass("ui-state-disabled"),e.disabled.push(c),e.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c])));return this},select:function(c){c=this._getIndex(c);if(c==-1)if(this.options.collapsible&&this.options.selected!=-1)c=this.options.selected;else return this;this.anchors.eq(c).trigger(this.options.event+
".tabs");return this},load:function(e){var e=this._getIndex(e),f=this,g=this.options,k=this.anchors.eq(e)[0],n=c.data(k,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&c.data(k,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var m=c("span",k);m.data("label.tabs",m.html()).html(g.spinner)}this.xhr=c.ajax(c.extend({},g.ajaxOptions,{url:n,success:function(m,n){f.element.find(f._sanitizeSelector(k.hash)).html(m);f._cleanup();
g.cache&&c.data(k,"cache.tabs",!0);f._trigger("load",null,f._ui(f.anchors[e],f.panels[e]));try{g.ajaxOptions.success(m,n)}catch(o){}},error:function(c,m){f._cleanup();f._trigger("load",null,f._ui(f.anchors[e],f.panels[e]));try{g.ajaxOptions.error(c,m,e,k)}catch(o){}}}));f.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));this.xhr&&(this.xhr.abort(),delete this.xhr);this._cleanup();
return this},url:function(c,e){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.8.9"});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(c,e){var f=this,g=this.options,n=f._rotate||(f._rotate=function(e){clearTimeout(f.rotation);f.rotation=setTimeout(function(){var c=g.selected;f.select(++c<f.anchors.length?c:0)},c);e&&e.stopPropagation()}),e=f._unrotate||(f._unrotate=!e?function(c){c.clientX&&
f.rotate(null)}:function(){t=g.selected;n()});c?(this.element.bind("tabsshow",n),this.anchors.bind(g.event+".tabs",e),n()):(clearTimeout(f.rotation),this.element.unbind("tabsshow",n),this.anchors.unbind(g.event+".tabs",e),delete this._rotate,delete this._unrotate);return this}})})(jQuery);
(function(c,e){function f(){this.debug=!1;this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,
maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1};c.extend(this._defaults,this.regional[""]);this.dpDiv=c('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function g(f,g){c.extend(f,g);for(var i in g)if(g[i]==null||g[i]==e)f[i]=
g[i];return f}c.extend(c.ui,{datepicker:{version:"1.8.9"}});var i=(new Date).getTime();c.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(c){g(this._defaults,c||{});return this},_attachDatepicker:function(e,f){var g=null,i;for(i in this._defaults){var m=e.getAttribute("date:"+i);if(m){g=g||{};try{g[i]=eval(m)}catch(p){g[i]=m}}}i=e.nodeName.toLowerCase();m=i=="div"||i==
"span";if(!e.id)this.uuid+=1,e.id="dp"+this.uuid;var r=this._newInst(c(e),m);r.settings=c.extend({},f||{},g||{});i=="input"?this._connectDatepicker(e,r):m&&this._inlineDatepicker(e,r)},_newInst:function(e,f){return{id:e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:f,dpDiv:!f?this.dpDiv:c('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(e,
f){var g=c(e);f.append=c([]);f.trigger=c([]);g.hasClass(this.markerClassName)||(this._attachments(g,f),g.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(c,e,h){f.settings[e]=h}).bind("getData.datepicker",function(c,e){return this._get(f,e)}),this._autoSize(f),c.data(e,"datepicker",f))},_attachments:function(e,f){var g=this._get(f,"appendText"),i=this._get(f,"isRTL");f.append&&f.append.remove();if(g)f.append=
c('<span class="'+this._appendClass+'">'+g+"</span>"),e[i?"before":"after"](f.append);e.unbind("focus",this._showDatepicker);f.trigger&&f.trigger.remove();g=this._get(f,"showOn");(g=="focus"||g=="both")&&e.focus(this._showDatepicker);if(g=="button"||g=="both"){var g=this._get(f,"buttonText"),m=this._get(f,"buttonImage");f.trigger=c(this._get(f,"buttonImageOnly")?c("<img/>").addClass(this._triggerClass).attr({src:m,alt:g,title:g}):c('<button type="button"></button>').addClass(this._triggerClass).html(m==
""?g:c("<img/>").attr({src:m,alt:g,title:g})));e[i?"before":"after"](f.trigger);f.trigger.click(function(){c.datepicker._datepickerShowing&&c.datepicker._lastInput==e[0]?c.datepicker._hideDatepicker():c.datepicker._showDatepicker(e[0]);return!1})}},_autoSize:function(c){if(this._get(c,"autoSize")&&!c.inline){var e=new Date(2009,11,20),f=this._get(c,"dateFormat");if(f.match(/[DM]/)){var g=function(c){for(var e=0,f=0,h=0;h<c.length;h++)if(c[h].length>e)e=c[h].length,f=h;return f};e.setMonth(g(this._get(c,
f.match(/MM/)?"monthNames":"monthNamesShort")));e.setDate(g(this._get(c,f.match(/DD/)?"dayNames":"dayNamesShort"))+20-e.getDay())}c.input.attr("size",this._formatDate(c,e).length)}},_inlineDatepicker:function(e,f){var g=c(e);g.hasClass(this.markerClassName)||(g.addClass(this.markerClassName).append(f.dpDiv).bind("setData.datepicker",function(c,e,h){f.settings[e]=h}).bind("getData.datepicker",function(c,e){return this._get(f,e)}),c.data(e,"datepicker",f),this._setDate(f,this._getDefaultDate(f),!0),
this._updateDatepicker(f),this._updateAlternate(f),f.dpDiv.show())},_dialogDatepicker:function(e,f,i,n,m){e=this._dialogInst;if(!e)this.uuid+=1,this._dialogInput=c('<input type="text" id="dp'+this.uuid+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),c("body").append(this._dialogInput),e=this._dialogInst=this._newInst(this._dialogInput,!1),e.settings={},c.data(this._dialogInput[0],"datepicker",e);g(e.settings,n||{});f=f&&f.constructor==
Date?this._formatDate(e,f):f;this._dialogInput.val(f);this._pos=m?m.length?m:[m.pageX,m.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");e.settings.onSelect=i;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);
c.blockUI&&c.blockUI(this.dpDiv);c.data(this._dialogInput[0],"datepicker",e);return this},_destroyDatepicker:function(e){var f=c(e),g=c.data(e,"datepicker");if(f.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();c.removeData(e,"datepicker");i=="input"?(g.append.remove(),g.trigger.remove(),f.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(i=="div"||i=="span")&&f.removeClass(this.markerClassName).empty()}},
_enableDatepicker:function(e){var f=c(e),g=c.data(e,"datepicker");if(f.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();i=="input"?(e.disabled=!1,g.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):(i=="div"||i=="span")&&f.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=c.map(this._disabledInputs,function(c){return c==e?null:c})}},_disableDatepicker:function(e){var f=c(e),g=
c.data(e,"datepicker");if(f.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();i=="input"?(e.disabled=!0,g.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):(i=="div"||i=="span")&&f.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=c.map(this._disabledInputs,function(c){return c==e?null:c});this._disabledInputs[this._disabledInputs.length]=e}},_isDisabledDatepicker:function(c){if(!c)return!1;
for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]==c)return!0;return!1},_getInst:function(e){try{return c.data(e,"datepicker")}catch(f){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(e,f,i){var n=this._getInst(e);if(arguments.length==2&&typeof f=="string")return f=="defaults"?c.extend({},c.datepicker._defaults):n?f=="all"?c.extend({},n.settings):this._get(n,f):null;var m=f||{};typeof f=="string"&&(m={},m[f]=i);if(n){this._curInst==n&&this._hideDatepicker();
var p=this._getDateDatepicker(e,!0);g(n.settings,m);this._attachments(c(e),n);this._autoSize(n);this._setDateDatepicker(e,p);this._updateDatepicker(n)}},_changeDatepicker:function(c,e,f){this._optionDatepicker(c,e,f)},_refreshDatepicker:function(c){(c=this._getInst(c))&&this._updateDatepicker(c)},_setDateDatepicker:function(c,e){if(c=this._getInst(c))this._setDate(c,e),this._updateDatepicker(c),this._updateAlternate(c)},_getDateDatepicker:function(c,e){(c=this._getInst(c))&&!c.inline&&this._setDateFromField(c,
e);return c?this._getDate(c):null},_doKeyDown:function(e){var f=c.datepicker._getInst(e.target),g=!0,i=f.dpDiv.is(".ui-datepicker-rtl");f._keyEvent=!0;if(c.datepicker._datepickerShowing)switch(e.keyCode){case 9:c.datepicker._hideDatepicker();g=!1;break;case 13:return g=c("td."+c.datepicker._dayOverClass+":not(."+c.datepicker._currentClass+")",f.dpDiv),g[0]?c.datepicker._selectDay(e.target,f.selectedMonth,f.selectedYear,g[0]):c.datepicker._hideDatepicker(),!1;case 27:c.datepicker._hideDatepicker();
break;case 33:c.datepicker._adjustDate(e.target,e.ctrlKey?-c.datepicker._get(f,"stepBigMonths"):-c.datepicker._get(f,"stepMonths"),"M");break;case 34:c.datepicker._adjustDate(e.target,e.ctrlKey?+c.datepicker._get(f,"stepBigMonths"):+c.datepicker._get(f,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&c.datepicker._clearDate(e.target);g=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&c.datepicker._gotoToday(e.target);g=e.ctrlKey||e.metaKey;break;case 37:if(e.ctrlKey||e.metaKey)c.datepicker._adjustDate(e.target,
i?1:-1,"D");g=e.ctrlKey||e.metaKey;e.originalEvent.altKey&&c.datepicker._adjustDate(e.target,e.ctrlKey?-c.datepicker._get(f,"stepBigMonths"):-c.datepicker._get(f,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&c.datepicker._adjustDate(e.target,-7,"D");g=e.ctrlKey||e.metaKey;break;case 39:if(e.ctrlKey||e.metaKey)c.datepicker._adjustDate(e.target,i?-1:1,"D");g=e.ctrlKey||e.metaKey;e.originalEvent.altKey&&c.datepicker._adjustDate(e.target,e.ctrlKey?+c.datepicker._get(f,"stepBigMonths"):+c.datepicker._get(f,
"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&c.datepicker._adjustDate(e.target,7,"D");g=e.ctrlKey||e.metaKey;break;default:g=!1}else e.keyCode==36&&e.ctrlKey?c.datepicker._showDatepicker(this):g=!1;g&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(f){var g=c.datepicker._getInst(f.target);if(c.datepicker._get(g,"constrainInput")){var g=c.datepicker._possibleChars(c.datepicker._get(g,"dateFormat")),i=String.fromCharCode(f.charCode==e?f.keyCode:f.charCode);return f.ctrlKey||
f.metaKey||i<" "||!g||g.indexOf(i)>-1}},_doKeyUp:function(e){e=c.datepicker._getInst(e.target);if(e.input.val()!=e.lastVal)try{if(c.datepicker.parseDate(c.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,c.datepicker._getFormatConfig(e)))c.datepicker._setDateFromField(e),c.datepicker._updateAlternate(e),c.datepicker._updateDatepicker(e)}catch(f){c.datepicker.log(f)}return!0},_showDatepicker:function(e){e=e.target||e;e.nodeName.toLowerCase()!="input"&&(e=c("input",e.parentNode)[0]);if(!(c.datepicker._isDisabledDatepicker(e)||
c.datepicker._lastInput==e)){var f=c.datepicker._getInst(e);c.datepicker._curInst&&c.datepicker._curInst!=f&&c.datepicker._curInst.dpDiv.stop(!0,!0);var i=c.datepicker._get(f,"beforeShow");g(f.settings,i?i.apply(e,[e,f]):{});f.lastVal=null;c.datepicker._lastInput=e;c.datepicker._setDateFromField(f);if(c.datepicker._inDialog)e.value="";if(!c.datepicker._pos)c.datepicker._pos=c.datepicker._findPos(e),c.datepicker._pos[1]+=e.offsetHeight;var n=!1;c(e).parents().each(function(){n|=c(this).css("position")==
"fixed";return!n});n&&c.browser.opera&&(c.datepicker._pos[0]-=document.documentElement.scrollLeft,c.datepicker._pos[1]-=document.documentElement.scrollTop);i={left:c.datepicker._pos[0],top:c.datepicker._pos[1]};c.datepicker._pos=null;f.dpDiv.empty();f.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});c.datepicker._updateDatepicker(f);i=c.datepicker._checkOffset(f,i,n);f.dpDiv.css({position:c.datepicker._inDialog&&c.blockUI?"static":n?"fixed":"absolute",display:"none",left:i.left+"px",
top:i.top+"px"});if(!f.inline){var i=c.datepicker._get(f,"showAnim"),m=c.datepicker._get(f,"duration"),p=function(){c.datepicker._datepickerShowing=!0;var e=f.dpDiv.find("iframe.ui-datepicker-cover");if(e.length){var g=c.datepicker._getBorders(f.dpDiv);e.css({left:-g[0],top:-g[1],width:f.dpDiv.outerWidth(),height:f.dpDiv.outerHeight()})}};f.dpDiv.zIndex(c(e).zIndex()+1);c.effects&&c.effects[i]?f.dpDiv.show(i,c.datepicker._get(f,"showOptions"),m,p):f.dpDiv[i||"show"](i?m:null,p);(!i||!m)&&p();f.input.is(":visible")&&
!f.input.is(":disabled")&&f.input.focus();c.datepicker._curInst=f}}},_updateDatepicker:function(e){var f=this,g=c.datepicker._getBorders(e.dpDiv);e.dpDiv.empty().append(this._generateHTML(e));var i=e.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-g[0],top:-g[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()});e.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){c(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=
-1&&c(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&c(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!f._isDisabledDatepicker(e.inline?e.dpDiv.parent()[0]:e.input[0]))c(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),c(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&c(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=
-1&&c(this).addClass("ui-datepicker-next-hover")}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();g=this._getNumberOfMonths(e);i=g[1];i>1?e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"):e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");e.dpDiv[(g[0]!=1||g[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");e==c.datepicker._curInst&&c.datepicker._datepickerShowing&&
e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input.focus();if(e.yearshtml){var m=e.yearshtml;setTimeout(function(){m===e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml);m=e.yearshtml=null},0)}},_getBorders:function(c){var e=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(e(c.css("border-left-width"))),parseFloat(e(c.css("border-top-width")))]},_checkOffset:function(e,f,g){var i=e.dpDiv.outerWidth(),m=e.dpDiv.outerHeight(),p=
e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,o=document.documentElement.clientWidth+c(document).scrollLeft(),u=document.documentElement.clientHeight+c(document).scrollTop();f.left-=this._get(e,"isRTL")?i-p:0;f.left-=g&&f.left==e.input.offset().left?c(document).scrollLeft():0;f.top-=g&&f.top==e.input.offset().top+r?c(document).scrollTop():0;f.left-=Math.min(f.left,f.left+i>o&&o>i?Math.abs(f.left+i-o):0);f.top-=Math.min(f.top,f.top+m>u&&u>m?Math.abs(m+r):0);return f},_findPos:function(e){for(var f=
this._get(this._getInst(e),"isRTL");e&&(e.type=="hidden"||e.nodeType!=1);)e=e[f?"previousSibling":"nextSibling"];e=c(e).offset();return[e.left,e.top]},_hideDatepicker:function(e){var f=this._curInst;if(f&&!(e&&f!=c.data(e,"datepicker"))&&this._datepickerShowing){var e=this._get(f,"showAnim"),g=this._get(f,"duration"),i=function(){c.datepicker._tidyDialog(f);this._curInst=null};c.effects&&c.effects[e]?f.dpDiv.hide(e,c.datepicker._get(f,"showOptions"),g,i):f.dpDiv[e=="slideDown"?"slideUp":e=="fadeIn"?
"fadeOut":"hide"](e?g:null,i);e||i();if(e=this._get(f,"onClose"))e.apply(f.input?f.input[0]:null,[f.input?f.input.val():"",f]);this._datepickerShowing=!1;this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),c.blockUI&&(c.unblockUI(),c("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(c){c.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){c.datepicker._curInst&&(e=c(e.target),
e[0].id!=c.datepicker._mainDivId&&e.parents("#"+c.datepicker._mainDivId).length==0&&!e.hasClass(c.datepicker.markerClassName)&&!e.hasClass(c.datepicker._triggerClass)&&c.datepicker._datepickerShowing&&(!c.datepicker._inDialog||!c.blockUI)&&c.datepicker._hideDatepicker())},_adjustDate:function(e,f,g){var e=c(e),i=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(i,f+(g=="M"?this._get(i,"showCurrentAtPos"):0),g),this._updateDatepicker(i))},_gotoToday:function(e){var e=c(e),
f=this._getInst(e[0]);if(this._get(f,"gotoCurrent")&&f.currentDay)f.selectedDay=f.currentDay,f.drawMonth=f.selectedMonth=f.currentMonth,f.drawYear=f.selectedYear=f.currentYear;else{var g=new Date;f.selectedDay=g.getDate();f.drawMonth=f.selectedMonth=g.getMonth();f.drawYear=f.selectedYear=g.getFullYear()}this._notifyChange(f);this._adjustDate(e)},_selectMonthYear:function(e,f,g){var e=c(e),i=this._getInst(e[0]);i._selectingMonthYear=!1;i["selected"+(g=="M"?"Month":"Year")]=i["draw"+(g=="M"?"Month":
"Year")]=parseInt(f.options[f.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(e)},_clickMonthYear:function(e){var f=this._getInst(c(e)[0]);f.input&&f._selectingMonthYear&&setTimeout(function(){f.input.focus()},0);f._selectingMonthYear=!f._selectingMonthYear},_selectDay:function(e,f,g,i){var m=c(e);if(!c(i).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(m[0]))m=this._getInst(m[0]),m.selectedDay=m.currentDay=c("a",i).html(),m.selectedMonth=m.currentMonth=f,m.selectedYear=
m.currentYear=g,this._selectDate(e,this._formatDate(m,m.currentDay,m.currentMonth,m.currentYear))},_clearDate:function(e){e=c(e);this._getInst(e[0]);this._selectDate(e,"")},_selectDate:function(e,f){e=this._getInst(c(e)[0]);f=f!=null?f:this._formatDate(e);e.input&&e.input.val(f);this._updateAlternate(e);var g=this._get(e,"onSelect");g?g.apply(e.input?e.input[0]:null,[f,e]):e.input&&e.input.trigger("change");e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],typeof e.input[0]!=
"object"&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var f=this._get(e,"altField");if(f){var g=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),m=this.formatDate(g,i,this._getFormatConfig(e));c(f).each(function(){c(this).val(m)})}},noWeekends:function(c){c=c.getDay();return[c>0&&c<6,""]},iso8601Week:function(c){c=new Date(c.getTime());c.setDate(c.getDate()+4-(c.getDay()||7));var e=c.getTime();c.setMonth(0);c.setDate(1);return Math.floor(Math.round((e-
c)/864E5)/7)+1},parseDate:function(c,e,f){if(c==null||e==null)throw"Invalid arguments";e=typeof e=="object"?e.toString():e+"";if(e=="")return null;for(var g=(f?f.shortYearCutoff:null)||this._defaults.shortYearCutoff,g=typeof g!="string"?g:(new Date).getFullYear()%100+parseInt(g,10),i=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort,p=(f?f.dayNames:null)||this._defaults.dayNames,r=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort,o=(f?f.monthNames:null)||this._defaults.monthNames,u=
f=-1,s=-1,v=-1,q=!1,l=function(e){(e=C+1<c.length&&c.charAt(C+1)==e)&&C++;return e},z=function(c){var f=l(c),c=e.substring(x).match(RegExp("^\\d{1,"+(c=="@"?14:c=="!"?20:c=="y"&&f?4:c=="o"?3:2)+"}"));if(!c)throw"Missing number at position "+x;x+=c[0].length;return parseInt(c[0],10)},B=function(c,f,g){c=l(c)?g:f;for(f=0;f<c.length;f++)if(e.substr(x,c[f].length).toLowerCase()==c[f].toLowerCase())return x+=c[f].length,f+1;throw"Unknown name at position "+x;},A=function(){if(e.charAt(x)!=c.charAt(C))throw"Unexpected literal at position "+
x;x++},x=0,C=0;C<c.length;C++)if(q)c.charAt(C)=="'"&&!l("'")?q=!1:A();else switch(c.charAt(C)){case "d":s=z("d");break;case "D":B("D",i,p);break;case "o":v=z("o");break;case "m":u=z("m");break;case "M":u=B("M",r,o);break;case "y":f=z("y");break;case "@":var w=new Date(z("@")),f=w.getFullYear(),u=w.getMonth()+1,s=w.getDate();break;case "!":w=new Date((z("!")-this._ticksTo1970)/1E4);f=w.getFullYear();u=w.getMonth()+1;s=w.getDate();break;case "'":l("'")?A():q=!0;break;default:A()}f==-1?f=(new Date).getFullYear():
f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=g?0:-100));if(v>-1){u=1;s=v;do{g=this._getDaysInMonth(f,u-1);if(s<=g)break;u++;s-=g}while(1)}w=this._daylightSavingAdjust(new Date(f,u-1,s));if(w.getFullYear()!=f||w.getMonth()+1!=u||w.getDate()!=s)throw"Invalid date";return w},ATOM:"yy-mm-dd",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",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",
_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(c,e,f){if(!e)return"";var g=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort,i=(f?f.dayNames:null)||this._defaults.dayNames,p=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort,f=(f?f.monthNames:null)||this._defaults.monthNames,r=function(e){(e=q+1<c.length&&c.charAt(q+1)==e)&&q++;return e},o=function(c,e,f){e=""+e;if(r(c))for(;e.length<f;)e="0"+e;return e},u=function(c,e,f,g){return r(c)?
g[e]:f[e]},s="",v=!1;if(e)for(var q=0;q<c.length;q++)if(v)c.charAt(q)=="'"&&!r("'")?v=!1:s+=c.charAt(q);else switch(c.charAt(q)){case "d":s+=o("d",e.getDate(),2);break;case "D":s+=u("D",e.getDay(),g,i);break;case "o":s+=o("o",(e.getTime()-(new Date(e.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":s+=o("m",e.getMonth()+1,2);break;case "M":s+=u("M",e.getMonth(),p,f);break;case "y":s+=r("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case "@":s+=e.getTime();break;case "!":s+=
e.getTime()*1E4+this._ticksTo1970;break;case "'":r("'")?s+="'":v=!0;break;default:s+=c.charAt(q)}return s},_possibleChars:function(c){for(var e="",f=!1,g=function(e){(e=i+1<c.length&&c.charAt(i+1)==e)&&i++;return e},i=0;i<c.length;i++)if(f)c.charAt(i)=="'"&&!g("'")?f=!1:e+=c.charAt(i);else switch(c.charAt(i)){case "d":case "m":case "y":case "@":e+="0123456789";break;case "D":case "M":return null;case "'":g("'")?e+="'":f=!0;break;default:e+=c.charAt(i)}return e},_get:function(c,f){return c.settings[f]!==
e?c.settings[f]:this._defaults[f]},_setDateFromField:function(c,e){if(c.input.val()!=c.lastVal){var f=this._get(c,"dateFormat"),g=c.lastVal=c.input?c.input.val():null,i,p;i=p=this._getDefaultDate(c);var r=this._getFormatConfig(c);try{i=this.parseDate(f,g,r)||p}catch(o){this.log(o),g=e?"":g}c.selectedDay=i.getDate();c.drawMonth=c.selectedMonth=i.getMonth();c.drawYear=c.selectedYear=i.getFullYear();c.currentDay=g?i.getDate():0;c.currentMonth=g?i.getMonth():0;c.currentYear=g?i.getFullYear():0;this._adjustInstDate(c)}},
_getDefaultDate:function(c){return this._restrictMinMax(c,this._determineDate(c,this._get(c,"defaultDate"),new Date))},_determineDate:function(e,f,g){var h;var i=function(c){var e=new Date;e.setDate(e.getDate()+c);return e};if(h=(f=f==null||f===""?g:typeof f=="string"?function(f){try{return c.datepicker.parseDate(c.datepicker._get(e,"dateFormat"),f,c.datepicker._getFormatConfig(e))}catch(g){}for(var i=(f.toLowerCase().match(/^c/)?c.datepicker._getDate(e):null)||new Date,j=i.getFullYear(),k=i.getMonth(),
i=i.getDate(),n=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,v=n.exec(f);v;){switch(v[2]||"d"){case "d":case "D":i+=parseInt(v[1],10);break;case "w":case "W":i+=parseInt(v[1],10)*7;break;case "m":case "M":k+=parseInt(v[1],10);i=Math.min(i,c.datepicker._getDaysInMonth(j,k));break;case "y":case "Y":j+=parseInt(v[1],10),i=Math.min(i,c.datepicker._getDaysInMonth(j,k))}v=n.exec(f)}return new Date(j,k,i)}(f):typeof f=="number"?isNaN(f)?g:i(f):new Date(f.getTime()))&&f.toString()=="Invalid Date"?g:f,f=h)f.setHours(0),
f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0);return this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(c){if(!c)return null;c.setHours(c.getHours()>12?c.getHours()+2:0);return c},_setDate:function(c,e,f){var g=!e,i=c.selectedMonth,p=c.selectedYear,e=this._restrictMinMax(c,this._determineDate(c,e,new Date));c.selectedDay=c.currentDay=e.getDate();c.drawMonth=c.selectedMonth=c.currentMonth=e.getMonth();c.drawYear=c.selectedYear=c.currentYear=e.getFullYear();(i!=c.selectedMonth||p!=
c.selectedYear)&&!f&&this._notifyChange(c);this._adjustInstDate(c);c.input&&c.input.val(g?"":this._formatDate(c))},_getDate:function(c){return!c.currentYear||c.input&&c.input.val()==""?null:this._daylightSavingAdjust(new Date(c.currentYear,c.currentMonth,c.currentDay))},_generateHTML:function(e){var f=new Date,f=this._daylightSavingAdjust(new Date(f.getFullYear(),f.getMonth(),f.getDate())),g=this._get(e,"isRTL"),n=this._get(e,"showButtonPanel"),m=this._get(e,"hideIfNoPrevNext"),p=this._get(e,"navigationAsDateFormat"),
r=this._getNumberOfMonths(e),o=this._get(e,"showCurrentAtPos"),u=this._get(e,"stepMonths"),s=r[0]!=1||r[1]!=1,v=this._daylightSavingAdjust(!e.currentDay?new Date(9999,9,9):new Date(e.currentYear,e.currentMonth,e.currentDay)),q=this._getMinMaxDate(e,"min"),l=this._getMinMaxDate(e,"max"),o=e.drawMonth-o,z=e.drawYear;o<0&&(o+=12,z--);if(l)for(var B=this._daylightSavingAdjust(new Date(l.getFullYear(),l.getMonth()-r[0]*r[1]+1,l.getDate())),B=q&&B<q?q:B;this._daylightSavingAdjust(new Date(z,o,1))>B;)o--,
o<0&&(o=11,z--);e.drawMonth=o;e.drawYear=z;var B=this._get(e,"prevText"),B=!p?B:this.formatDate(B,this._daylightSavingAdjust(new Date(z,o-u,1)),this._getFormatConfig(e)),B=this._canAdjustMonth(e,-1,z,o)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+i+".datepicker._adjustDate('#"+e.id+"', -"+u+", 'M');\" title=\""+B+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"e":"w")+'">'+B+"</span></a>":m?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+B+'"><span class="ui-icon ui-icon-circle-triangle-'+
(g?"e":"w")+'">'+B+"</span></a>",A=this._get(e,"nextText"),A=!p?A:this.formatDate(A,this._daylightSavingAdjust(new Date(z,o+u,1)),this._getFormatConfig(e)),m=this._canAdjustMonth(e,1,z,o)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+i+".datepicker._adjustDate('#"+e.id+"', +"+u+", 'M');\" title=\""+A+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"w":"e")+'">'+A+"</span></a>":m?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+A+'"><span class="ui-icon ui-icon-circle-triangle-'+
(g?"w":"e")+'">'+A+"</span></a>",u=this._get(e,"currentText"),A=this._get(e,"gotoCurrent")&&e.currentDay?v:f,u=!p?u:this.formatDate(u,A,this._getFormatConfig(e)),p=!e.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+i+'.datepicker._hideDatepicker();">'+this._get(e,"closeText")+"</button>":"",n=n?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(g?p:"")+(this._isInRange(e,A)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
i+".datepicker._gotoToday('#"+e.id+"');\">"+u+"</button>":"")+(g?"":p)+"</div>":"",p=parseInt(this._get(e,"firstDay"),10),p=isNaN(p)?0:p,u=this._get(e,"showWeek"),A=this._get(e,"dayNames");this._get(e,"dayNamesShort");var x=this._get(e,"dayNamesMin"),C=this._get(e,"monthNames"),w=this._get(e,"monthNamesShort"),K=this._get(e,"beforeShowDay"),I=this._get(e,"showOtherMonths"),H=this._get(e,"selectOtherMonths");this._get(e,"calculateWeek");for(var R=this._getDefaultDate(e),F="",M=0;M<r[0];M++){for(var aa=
"",T=0;T<r[1];T++){var ba=this._daylightSavingAdjust(new Date(z,o,e.selectedDay)),G=" ui-corner-all",J="";if(s){J+='<div class="ui-datepicker-group';if(r[1]>1)switch(T){case 0:J+=" ui-datepicker-group-first";G=" ui-corner-"+(g?"right":"left");break;case r[1]-1:J+=" ui-datepicker-group-last";G=" ui-corner-"+(g?"left":"right");break;default:J+=" ui-datepicker-group-middle",G=""}J+='">'}J+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+G+'">'+(/all|left/.test(G)&&M==0?g?m:B:"")+
(/all|right/.test(G)&&M==0?g?B:m:"")+this._generateMonthYearHeader(e,o,z,q,l,M>0||T>0,C,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var N=u?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",G=0;G<7;G++){var D=(G+p)%7;N+="<th"+((G+p+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+A[D]+'">'+x[D]+"</span></th>"}J+=N+"</tr></thead><tbody>";N=this._getDaysInMonth(z,o);if(z==e.selectedYear&&o==e.selectedMonth)e.selectedDay=Math.min(e.selectedDay,
N);for(var G=(this._getFirstDayOfMonth(z,o)-p+7)%7,N=s?6:Math.ceil((G+N)/7),D=this._daylightSavingAdjust(new Date(z,o,1-G)),S=0;S<N;S++){J+="<tr>";for(var X=!u?"":'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(D)+"</td>",G=0;G<7;G++){var P=K?K.apply(e.input?e.input[0]:null,[D]):[!0,""],Q=D.getMonth()!=o,Y=Q&&!H||!P[0]||q&&D<q||l&&D>l;X+='<td class="'+((G+p+6)%7>=5?" ui-datepicker-week-end":"")+(Q?" ui-datepicker-other-month":"")+(D.getTime()==ba.getTime()&&o==e.selectedMonth&&
e._keyEvent||R.getTime()==D.getTime()&&R.getTime()==ba.getTime()?" "+this._dayOverClass:"")+(Y?" "+this._unselectableClass+" ui-state-disabled":"")+(Q&&!I?"":" "+P[1]+(D.getTime()==v.getTime()?" "+this._currentClass:"")+(D.getTime()==f.getTime()?" ui-datepicker-today":""))+'"'+((!Q||I)&&P[2]?' title="'+P[2]+'"':"")+(Y?"":' onclick="DP_jQuery_'+i+".datepicker._selectDay('#"+e.id+"',"+D.getMonth()+","+D.getFullYear()+', this);return false;"')+">"+(Q&&!I?"&#xa0;":Y?'<span class="ui-state-default">'+
D.getDate()+"</span>":'<a class="ui-state-default'+(D.getTime()==f.getTime()?" ui-state-highlight":"")+(D.getTime()==v.getTime()?" ui-state-active":"")+(Q?" ui-priority-secondary":"")+'" href="#">'+D.getDate()+"</a>")+"</td>";D.setDate(D.getDate()+1);D=this._daylightSavingAdjust(D)}J+=X+"</tr>"}o++;o>11&&(o=0,z++);J+="</tbody></table>"+(s?"</div>"+(r[0]>0&&T==r[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");aa+=J}F+=aa}F+=n+(c.browser.msie&&parseInt(c.browser.version,10)<7&&!e.inline?
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");e._keyEvent=!1;return F},_generateMonthYearHeader:function(e,f,g,n,m,p,r,o){var u=this._get(e,"changeMonth"),s=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),q='<div class="ui-datepicker-title">',l="";if(p||!u)l+='<span class="ui-datepicker-month">'+r[f]+"</span>";else{var r=n&&n.getFullYear()==g,z=m&&m.getFullYear()==g;l+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+i+".datepicker._selectMonthYear('#"+
e.id+"', this, 'M');\" onclick=\"DP_jQuery_"+i+".datepicker._clickMonthYear('#"+e.id+"');\">";for(var B=0;B<12;B++)if((!r||B>=n.getMonth())&&(!z||B<=m.getMonth()))l+='<option value="'+B+'"'+(B==f?' selected="selected"':"")+">"+o[B]+"</option>";l+="</select>"}v||(q+=l+(p||!u||!s?"&#xa0;":""));e.yearshtml="";if(p||!s)q+='<span class="ui-datepicker-year">'+g+"</span>";else{var o=this._get(e,"yearRange").split(":"),A=(new Date).getFullYear(),r=function(c){c=c.match(/c[+-].*/)?g+parseInt(c.substring(1),
10):c.match(/[+-].*/)?A+parseInt(c,10):parseInt(c,10);return isNaN(c)?A:c},f=r(o[0]),o=Math.max(f,r(o[1]||"")),f=n?Math.max(f,n.getFullYear()):f,o=m?Math.min(o,m.getFullYear()):o;for(e.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+i+".datepicker._selectMonthYear('#"+e.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+i+".datepicker._clickMonthYear('#"+e.id+"');\">";f<=o;f++)e.yearshtml+='<option value="'+f+'"'+(f==g?' selected="selected"':"")+">"+f+"</option>";e.yearshtml+="</select>";
c.browser.mozilla?q+='<select class="ui-datepicker-year"><option value="'+g+'" selected="selected">'+g+"</option></select>":(q+=e.yearshtml,e.yearshtml=null)}q+=this._get(e,"yearSuffix");v&&(q+=(p||!u||!s?"&#xa0;":"")+l);q+="</div>";return q},_adjustInstDate:function(c,e,f){var g=c.drawYear+(f=="Y"?e:0),i=c.drawMonth+(f=="M"?e:0),e=Math.min(c.selectedDay,this._getDaysInMonth(g,i))+(f=="D"?e:0),g=this._restrictMinMax(c,this._daylightSavingAdjust(new Date(g,i,e)));c.selectedDay=g.getDate();c.drawMonth=
c.selectedMonth=g.getMonth();c.drawYear=c.selectedYear=g.getFullYear();(f=="M"||f=="Y")&&this._notifyChange(c)},_restrictMinMax:function(c,e){var f=this._getMinMaxDate(c,"min"),c=this._getMinMaxDate(c,"max"),e=f&&e<f?f:e;return c&&e>c?c:e},_notifyChange:function(c){var e=this._get(c,"onChangeMonthYear");e&&e.apply(c.input?c.input[0]:null,[c.selectedYear,c.selectedMonth+1,c])},_getNumberOfMonths:function(c){c=this._get(c,"numberOfMonths");return c==null?[1,1]:typeof c=="number"?[1,c]:c},_getMinMaxDate:function(c,
e){return this._determineDate(c,this._get(c,e+"Date"),null)},_getDaysInMonth:function(c,e){return 32-(new Date(c,e,32)).getDate()},_getFirstDayOfMonth:function(c,e){return(new Date(c,e,1)).getDay()},_canAdjustMonth:function(c,e,f,g){var i=this._getNumberOfMonths(c),f=this._daylightSavingAdjust(new Date(f,g+(e<0?e:i[0]*i[1]),1));e<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(c,f)},_isInRange:function(c,e){var f=this._getMinMaxDate(c,"min"),c=this._getMinMaxDate(c,
"max");return(!f||e.getTime()>=f.getTime())&&(!c||e.getTime()<=c.getTime())},_getFormatConfig:function(c){var e=this._get(c,"shortYearCutoff"),e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);return{shortYearCutoff:e,dayNamesShort:this._get(c,"dayNamesShort"),dayNames:this._get(c,"dayNames"),monthNamesShort:this._get(c,"monthNamesShort"),monthNames:this._get(c,"monthNames")}},_formatDate:function(c,e,f,g){if(!e)c.currentDay=c.selectedDay,c.currentMonth=c.selectedMonth,c.currentYear=
c.selectedYear;e=e?typeof e=="object"?e:this._daylightSavingAdjust(new Date(g,f,e)):this._daylightSavingAdjust(new Date(c.currentYear,c.currentMonth,c.currentDay));return this.formatDate(this._get(c,"dateFormat"),e,this._getFormatConfig(c))}});c.fn.datepicker=function(e){if(!c.datepicker.initialized)c(document).mousedown(c.datepicker._checkExternalClick).find("body").append(c.datepicker.dpDiv),c.datepicker.initialized=!0;var f=Array.prototype.slice.call(arguments,1);if(typeof e=="string"&&(e=="isDisabled"||
e=="getDate"||e=="widget"))return c.datepicker["_"+e+"Datepicker"].apply(c.datepicker,[this[0]].concat(f));if(e=="option"&&arguments.length==2&&typeof arguments[1]=="string")return c.datepicker["_"+e+"Datepicker"].apply(c.datepicker,[this[0]].concat(f));return this.each(function(){typeof e=="string"?c.datepicker["_"+e+"Datepicker"].apply(c.datepicker,[this].concat(f)):c.datepicker._attachDatepicker(this,e)})};c.datepicker=new f;c.datepicker.initialized=!1;c.datepicker.uuid=(new Date).getTime();c.datepicker.version=
"1.8.9";window["DP_jQuery_"+i]=c})(jQuery);
(function(c,e){c.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=c("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();
c.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===e)return this._value();this._setOption("value",c);return this},_setOption:function(e,g){if(e==="value")this.options.value=g,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete");c.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;typeof c!=="number"&&(c=0);return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*this._value()/
this.options.max},_refreshValue:function(){var c=this.value(),e=this._percentage();if(this.oldValue!==c)this.oldValue=c,this._trigger("change");this.valueDiv.toggleClass("ui-corner-right",c===this.options.max).width(e.toFixed(0)+"%");this.element.attr("aria-valuenow",c)}});c.extend(c.ui.progressbar,{version:"1.8.9"})})(jQuery);
jQuery.effects||function(c,e){function f(e){var f;if(e&&e.constructor==Array&&e.length==3)return e;if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)];if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55];if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return[parseInt(f[1],
16),parseInt(f[2],16),parseInt(f[3],16)];if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(e))return n.transparent;return n[c.trim(e).toLowerCase()]}function g(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,e={},f,g;if(c&&c.length&&c[0]&&c[c[0]])for(var h=c.length;h--;)f=c[h],typeof c[f]=="string"&&(g=f.replace(/\-(\w)/g,function(c,e){return e.toUpperCase()}),
e[g]=c[f]);else for(f in c)typeof c[f]==="string"&&(e[f]=c[f]);return e}function i(e){var f,g;for(f in e)g=e[f],(g==null||c.isFunction(g)||f in p||/scrollbar/.test(f)||!/color/i.test(f)&&isNaN(parseFloat(g)))&&delete e[f];return e}function h(c,e){var f={_:0},g;for(g in e)c[g]!=e[g]&&(f[g]=e[g]);return f}function j(e,f,g,h){if(typeof e=="object")h=f,g=null,f=e,e=f.effect;c.isFunction(f)&&(h=f,g=null,f={});if(typeof f=="number"||c.fx.speeds[f])h=g,g=f,f={};c.isFunction(g)&&(h=g,g=null);f=f||{};g=g||
f.duration;g=c.fx.off?0:typeof g=="number"?g:g in c.fx.speeds?c.fx.speeds[g]:c.fx.speeds._default;h=h||f.complete;return[e,f,g,h]}function k(e){if(!e||typeof e==="number"||c.fx.speeds[e])return!0;if(typeof e==="string"&&!c.effects[e])return!0;return!1}c.effects={};c.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(e,g){c.fx.step[g]=function(e){if(!e.colorInit){var h;h=e.elem;var i=g,j;do{j=c.curCSS(h,i);
if(j!=""&&j!="transparent"||c.nodeName(h,"body"))break;i="backgroundColor"}while(h=h.parentNode);h=f(j);e.start=h;e.end=f(e.end);e.colorInit=!0}e.elem.style[g]="rgb("+Math.max(Math.min(parseInt(e.pos*(e.end[0]-e.start[0])+e.start[0],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[1]-e.start[1])+e.start[1],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[2]-e.start[2])+e.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,
0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],
lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},m=["add","remove","toggle"],p={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};c.effects.animateClass=function(e,f,j,k){c.isFunction(j)&&
(k=j,j=null);return this.queue("fx",function(){var n=c(this),q=n.attr("style")||" ",l=i(g.call(this)),p,B=n.attr("className");c.each(m,function(c,f){e[f]&&n[f+"Class"](e[f])});p=i(g.call(this));n.attr("className",B);n.animate(h(l,p),f,j,function(){c.each(m,function(c,f){e[f]&&n[f+"Class"](e[f])});typeof n.attr("style")=="object"?(n.attr("style").cssText="",n.attr("style").cssText=q):n.attr("style",q);k&&k.apply(this,arguments)});l=c.queue(this);p=l.splice(l.length-1,1)[0];l.splice(1,0,p);c.dequeue(this)})};
c.fn.extend({_addClass:c.fn.addClass,addClass:function(e,f,g,h){return f?c.effects.animateClass.apply(this,[{add:e},f,g,h]):this._addClass(e)},_removeClass:c.fn.removeClass,removeClass:function(e,f,g,h){return f?c.effects.animateClass.apply(this,[{remove:e},f,g,h]):this._removeClass(e)},_toggleClass:c.fn.toggleClass,toggleClass:function(f,g,h,i,j){return typeof g=="boolean"||g===e?h?c.effects.animateClass.apply(this,[g?{add:f}:{remove:f},h,i,j]):this._toggleClass(f,g):c.effects.animateClass.apply(this,
[{toggle:f},g,h,i])},switchClass:function(e,f,g,h,i){return c.effects.animateClass.apply(this,[{add:f,remove:e},g,h,i])}});c.extend(c.effects,{version:"1.8.9",save:function(c,e){for(var f=0;f<e.length;f++)e[f]!==null&&c.data("ec.storage."+e[f],c[0].style[e[f]])},restore:function(c,e){for(var f=0;f<e.length;f++)e[f]!==null&&c.css(e[f],c.data("ec.storage."+e[f]))},setMode:function(c,e){e=="toggle"&&(e=c.is(":hidden")?"show":"hide");return e},getBaseline:function(c,e){var f;switch(c[0]){case "top":f=
0;break;case "middle":f=0.5;break;case "bottom":f=1;break;default:f=c[0]/e.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/e.width}return{x:c,y:f}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var f={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},g=c("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});e.wrap(g);
g=e.parent();e.css("position")=="static"?(g.css({position:"relative"}),e.css({position:"relative"})):(c.extend(f,{position:e.css("position"),zIndex:e.css("z-index")}),c.each(["top","left","bottom","right"],function(c,g){f[g]=e.css(g);isNaN(parseInt(f[g],10))&&(f[g]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return g.css(f).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(e,
f,g,h){h=h||{};c.each(f,function(c,f){unit=e.cssUnit(f);unit[0]>0&&(h[f]=unit[0]*g+unit[1])});return h}});c.fn.extend({effect:function(e){var f=j.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},f=g.options.mode,h=c.effects[e];if(c.fx.off||!h)return f?this[f](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)});return h.call(this,g)},_show:c.fn.show,show:function(c){if(k(c))return this._show.apply(this,arguments);else{var e=j.apply(this,arguments);e[1].mode=
"show";return this.effect.apply(this,e)}},_hide:c.fn.hide,hide:function(c){if(k(c))return this._hide.apply(this,arguments);else{var e=j.apply(this,arguments);e[1].mode="hide";return this.effect.apply(this,e)}},__toggle:c.fn.toggle,toggle:function(e){if(k(e)||typeof e==="boolean"||c.isFunction(e))return this.__toggle.apply(this,arguments);else{var f=j.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(e){var f=this.css(e),g=[];c.each(["em","px","%","pt"],function(c,
e){f.indexOf(e)>0&&(g=[parseFloat(f),e])});return g}});c.easing.jswing=c.easing.swing;c.extend(c.easing,{def:"easeOutQuad",swing:function(e,f,g,h,i){return c.easing[c.easing.def](e,f,g,h,i)},easeInQuad:function(c,e,f,g,h){return g*(e/=h)*e+f},easeOutQuad:function(c,e,f,g,h){return-g*(e/=h)*(e-2)+f},easeInOutQuad:function(c,e,f,g,h){if((e/=h/2)<1)return g/2*e*e+f;return-g/2*(--e*(e-2)-1)+f},easeInCubic:function(c,e,f,g,h){return g*(e/=h)*e*e+f},easeOutCubic:function(c,e,f,g,h){return g*((e=e/h-1)*
e*e+1)+f},easeInOutCubic:function(c,e,f,g,h){if((e/=h/2)<1)return g/2*e*e*e+f;return g/2*((e-=2)*e*e+2)+f},easeInQuart:function(c,e,f,g,h){return g*(e/=h)*e*e*e+f},easeOutQuart:function(c,e,f,g,h){return-g*((e=e/h-1)*e*e*e-1)+f},easeInOutQuart:function(c,e,f,g,h){if((e/=h/2)<1)return g/2*e*e*e*e+f;return-g/2*((e-=2)*e*e*e-2)+f},easeInQuint:function(c,e,f,g,h){return g*(e/=h)*e*e*e*e+f},easeOutQuint:function(c,e,f,g,h){return g*((e=e/h-1)*e*e*e*e+1)+f},easeInOutQuint:function(c,e,f,g,h){if((e/=h/2)<
1)return g/2*e*e*e*e*e+f;return g/2*((e-=2)*e*e*e*e+2)+f},easeInSine:function(c,e,f,g,h){return-g*Math.cos(e/h*(Math.PI/2))+g+f},easeOutSine:function(c,e,f,g,h){return g*Math.sin(e/h*(Math.PI/2))+f},easeInOutSine:function(c,e,f,g,h){return-g/2*(Math.cos(Math.PI*e/h)-1)+f},easeInExpo:function(c,e,f,g,h){return e==0?f:g*Math.pow(2,10*(e/h-1))+f},easeOutExpo:function(c,e,f,g,h){return e==h?f+g:g*(-Math.pow(2,-10*e/h)+1)+f},easeInOutExpo:function(c,e,f,g,h){if(e==0)return f;if(e==h)return f+g;if((e/=
h/2)<1)return g/2*Math.pow(2,10*(e-1))+f;return g/2*(-Math.pow(2,-10*--e)+2)+f},easeInCirc:function(c,e,f,g,h){return-g*(Math.sqrt(1-(e/=h)*e)-1)+f},easeOutCirc:function(c,e,f,g,h){return g*Math.sqrt(1-(e=e/h-1)*e)+f},easeInOutCirc:function(c,e,f,g,h){if((e/=h/2)<1)return-g/2*(Math.sqrt(1-e*e)-1)+f;return g/2*(Math.sqrt(1-(e-=2)*e)+1)+f},easeInElastic:function(c,e,f,g,h){var i=0,j=g;if(e==0)return f;if((e/=h)==1)return f+g;i||(i=h*0.3);j<Math.abs(g)?(j=g,c=i/4):c=i/(2*Math.PI)*Math.asin(g/j);return-(j*
Math.pow(2,10*(e-=1))*Math.sin((e*h-c)*2*Math.PI/i))+f},easeOutElastic:function(c,e,f,g,h){var i=0,j=g;if(e==0)return f;if((e/=h)==1)return f+g;i||(i=h*0.3);j<Math.abs(g)?(j=g,c=i/4):c=i/(2*Math.PI)*Math.asin(g/j);return j*Math.pow(2,-10*e)*Math.sin((e*h-c)*2*Math.PI/i)+g+f},easeInOutElastic:function(c,e,f,g,h){var i=0,j=g;if(e==0)return f;if((e/=h/2)==2)return f+g;i||(i=h*0.3*1.5);j<Math.abs(g)?(j=g,c=i/4):c=i/(2*Math.PI)*Math.asin(g/j);if(e<1)return-0.5*j*Math.pow(2,10*(e-=1))*Math.sin((e*h-c)*
2*Math.PI/i)+f;return j*Math.pow(2,-10*(e-=1))*Math.sin((e*h-c)*2*Math.PI/i)*0.5+g+f},easeInBack:function(c,f,g,h,i,j){j==e&&(j=1.70158);return h*(f/=i)*f*((j+1)*f-j)+g},easeOutBack:function(c,f,g,h,i,j){j==e&&(j=1.70158);return h*((f=f/i-1)*f*((j+1)*f+j)+1)+g},easeInOutBack:function(c,f,g,h,i,j){j==e&&(j=1.70158);if((f/=i/2)<1)return h/2*f*f*(((j*=1.525)+1)*f-j)+g;return h/2*((f-=2)*f*(((j*=1.525)+1)*f+j)+2)+g},easeInBounce:function(e,f,g,h,i){return h-c.easing.easeOutBounce(e,i-f,0,h,i)+g},easeOutBounce:function(c,
e,f,g,h){return(e/=h)<1/2.75?g*7.5625*e*e+f:e<2/2.75?g*(7.5625*(e-=1.5/2.75)*e+0.75)+f:e<2.5/2.75?g*(7.5625*(e-=2.25/2.75)*e+0.9375)+f:g*(7.5625*(e-=2.625/2.75)*e+0.984375)+f},easeInOutBounce:function(e,f,g,h,i){if(f<i/2)return c.easing.easeInBounce(e,f*2,0,h,i)*0.5+g;return c.easing.easeOutBounce(e,f*2-i,0,h,i)*0.5+h*0.5+g}})}(jQuery);
(function(c){c.effects.blind=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right"],i=c.effects.setMode(f,e.options.mode||"hide"),h=e.options.direction||"vertical";c.effects.save(f,g);f.show();var j=c.effects.createWrapper(f).css({overflow:"hidden"}),k=h=="vertical"?"height":"width",h=h=="vertical"?j.height():j.width();i=="show"&&j.css(k,0);var n={};n[k]=i=="show"?h:0;j.animate(n,e.duration,e.options.easing,function(){i=="hide"&&f.hide();c.effects.restore(f,
g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
(function(c){c.effects.bounce=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right"],i=c.effects.setMode(f,e.options.mode||"effect"),h=e.options.direction||"up",j=e.options.distance||20,k=e.options.times||5,n=e.duration||250;/show|hide/.test(i)&&g.push("opacity");c.effects.save(f,g);f.show();c.effects.createWrapper(f);var m=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",j=e.options.distance||(m=="top"?f.outerHeight({margin:!0})/3:f.outerWidth({margin:!0})/
3);i=="show"&&f.css("opacity",0).css(m,h=="pos"?-j:j);i=="hide"&&(j/=k*2);i!="hide"&&k--;if(i=="show"){var p={opacity:1};p[m]=(h=="pos"?"+=":"-=")+j;f.animate(p,n/2,e.options.easing);j/=2;k--}for(p=0;p<k;p++){var r={},o={};r[m]=(h=="pos"?"-=":"+=")+j;o[m]=(h=="pos"?"+=":"-=")+j;f.animate(r,n/2,e.options.easing).animate(o,n/2,e.options.easing);j=i=="hide"?j*2:j/2}i=="hide"?(p={opacity:0},p[m]=(h=="pos"?"-=":"+=")+j,f.animate(p,n/2,e.options.easing,function(){f.hide();c.effects.restore(f,g);c.effects.removeWrapper(f);
e.callback&&e.callback.apply(this,arguments)})):(r={},o={},r[m]=(h=="pos"?"-=":"+=")+j,o[m]=(h=="pos"?"+=":"-=")+j,f.animate(r,n/2,e.options.easing).animate(o,n/2,e.options.easing,function(){c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(this,arguments)}));f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
(function(c){c.effects.clip=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right","height","width"],i=c.effects.setMode(f,e.options.mode||"hide"),h=e.options.direction||"vertical";c.effects.save(f,g);f.show();var j=c.effects.createWrapper(f).css({overflow:"hidden"}),j=f[0].tagName=="IMG"?j:f,k={size:h=="vertical"?"height":"width",position:h=="vertical"?"top":"left"},h=h=="vertical"?j.height():j.width();i=="show"&&(j.css(k.size,0),j.css(k.position,h/2));
var n={};n[k.size]=i=="show"?h:0;n[k.position]=i=="show"?0:h/2;j.animate(n,{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){i=="hide"&&f.hide();c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(f[0],arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.drop=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right","opacity"],i=c.effects.setMode(f,e.options.mode||"hide"),h=e.options.direction||"left";c.effects.save(f,g);f.show();c.effects.createWrapper(f);var j=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",k=e.options.distance||(j=="top"?f.outerHeight({margin:!0})/2:f.outerWidth({margin:!0})/2);i=="show"&&f.css("opacity",0).css(j,h=="pos"?-k:k);var n={opacity:i=="show"?
1:0};n[j]=(i=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+k;f.animate(n,{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){i=="hide"&&f.hide();c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.explode=function(e){return this.queue(function(){var f=e.options.pieces?Math.round(Math.sqrt(e.options.pieces)):3,g=e.options.pieces?Math.round(Math.sqrt(e.options.pieces)):3;e.options.mode=e.options.mode=="toggle"?c(this).is(":visible")?"hide":"show":e.options.mode;var i=c(this).show().css("visibility","hidden"),h=i.offset();h.top-=parseInt(i.css("marginTop"),10)||0;h.left-=parseInt(i.css("marginLeft"),10)||0;for(var j=i.outerWidth(!0),k=i.outerHeight(!0),n=0;n<f;n++)for(var m=
0;m<g;m++)i.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-m*(j/g),top:-n*(k/f)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j/g,height:k/f,left:h.left+m*(j/g)+(e.options.mode=="show"?(m-Math.floor(g/2))*(j/g):0),top:h.top+n*(k/f)+(e.options.mode=="show"?(n-Math.floor(f/2))*(k/f):0),opacity:e.options.mode=="show"?0:1}).animate({left:h.left+m*(j/g)+(e.options.mode=="show"?0:(m-Math.floor(g/2))*(j/g)),top:h.top+
n*(k/f)+(e.options.mode=="show"?0:(n-Math.floor(f/2))*(k/f)),opacity:e.options.mode=="show"?1:0},e.duration||500);setTimeout(function(){e.options.mode=="show"?i.css({visibility:"visible"}):i.css({visibility:"visible"}).hide();e.callback&&e.callback.apply(i[0]);i.dequeue();c("div.ui-effects-explode").remove()},e.duration||500)})}})(jQuery);
(function(c){c.effects.fade=function(e){return this.queue(function(){var f=c(this),g=c.effects.setMode(f,e.options.mode||"hide");f.animate({opacity:g},{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){e.callback&&e.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.fold=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right"],i=c.effects.setMode(f,e.options.mode||"hide"),h=e.options.size||15,j=!!e.options.horizFirst,k=e.duration?e.duration/2:c.fx.speeds._default/2;c.effects.save(f,g);f.show();var n=c.effects.createWrapper(f).css({overflow:"hidden"}),m=i=="show"!=j,p=m?["width","height"]:["height","width"],m=m?[n.width(),n.height()]:[n.height(),n.width()],r=/([0-9]+)%/.exec(h);r&&(h=parseInt(r[1],
10)/100*m[i=="hide"?0:1]);i=="show"&&n.css(j?{height:0,width:h}:{height:h,width:0});j={};r={};j[p[0]]=i=="show"?m[0]:h;r[p[1]]=i=="show"?m[1]:0;n.animate(j,k,e.options.easing).animate(r,k,e.options.easing,function(){i=="hide"&&f.hide();c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
(function(c){c.effects.highlight=function(e){return this.queue(function(){var f=c(this),g=["backgroundImage","backgroundColor","opacity"],i=c.effects.setMode(f,e.options.mode||"show"),h={backgroundColor:f.css("backgroundColor")};if(i=="hide")h.opacity=0;c.effects.save(f,g);f.show().css({backgroundImage:"none",backgroundColor:e.options.color||"#ffff99"}).animate(h,{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){i=="hide"&&f.hide();c.effects.restore(f,g);i=="show"&&!c.support.opacity&&
this.style.removeAttribute("filter");e.callback&&e.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.pulsate=function(e){return this.queue(function(){var f=c(this),g=c.effects.setMode(f,e.options.mode||"show");times=(e.options.times||5)*2-1;duration=e.duration?e.duration/2:c.fx.speeds._default/2;isVisible=f.is(":visible");animateTo=0;isVisible||(f.css("opacity",0).show(),animateTo=1);(g=="hide"&&isVisible||g=="show"&&!isVisible)&&times--;for(g=0;g<times;g++)f.animate({opacity:animateTo},duration,e.options.easing),animateTo=(animateTo+1)%2;f.animate({opacity:animateTo},duration,
e.options.easing,function(){animateTo==0&&f.hide();e.callback&&e.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()}).dequeue()})}})(jQuery);
(function(c){c.effects.puff=function(e){return this.queue(function(){var f=c(this),g=c.effects.setMode(f,e.options.mode||"hide"),i=parseInt(e.options.percent,10)||150,h=i/100,j={height:f.height(),width:f.width()};c.extend(e.options,{fade:!0,mode:g,percent:g=="hide"?i:100,from:g=="hide"?j:{height:j.height*h,width:j.width*h}});f.effect("scale",e.options,e.duration,e.callback);f.dequeue()})};c.effects.scale=function(e){return this.queue(function(){var f=c(this),g=c.extend(!0,{},e.options),i=c.effects.setMode(f,
e.options.mode||"effect"),h=parseInt(e.options.percent,10)||(parseInt(e.options.percent,10)==0?0:i=="hide"?0:100),j=e.options.direction||"both",k=e.options.origin;if(i!="effect")g.origin=k||["middle","center"],g.restore=!0;k={height:f.height(),width:f.width()};f.from=e.options.from||(i=="show"?{height:0,width:0}:k);h={y:j!="horizontal"?h/100:1,x:j!="vertical"?h/100:1};f.to={height:k.height*h.y,width:k.width*h.x};if(e.options.fade){if(i=="show")f.from.opacity=0,f.to.opacity=1;if(i=="hide")f.from.opacity=
1,f.to.opacity=0}g.from=f.from;g.to=f.to;g.mode=i;f.effect("size",g,e.duration,e.callback);f.dequeue()})};c.effects.size=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],j=["fontSize"],k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
m=c.effects.setMode(f,e.options.mode||"effect"),p=e.options.restore||!1,r=e.options.scale||"both",o=e.options.origin,u={height:f.height(),width:f.width()};f.from=e.options.from||u;f.to=e.options.to||u;if(o)o=c.effects.getBaseline(o,u),f.from.top=(u.height-f.from.height)*o.y,f.from.left=(u.width-f.from.width)*o.x,f.to.top=(u.height-f.to.height)*o.y,f.to.left=(u.width-f.to.width)*o.x;var s={from:{y:f.from.height/u.height,x:f.from.width/u.width},to:{y:f.to.height/u.height,x:f.to.width/u.width}};if(r==
"box"||r=="both"){if(s.from.y!=s.to.y)g=g.concat(k),f.from=c.effects.setTransition(f,k,s.from.y,f.from),f.to=c.effects.setTransition(f,k,s.to.y,f.to);if(s.from.x!=s.to.x)g=g.concat(n),f.from=c.effects.setTransition(f,n,s.from.x,f.from),f.to=c.effects.setTransition(f,n,s.to.x,f.to)}if((r=="content"||r=="both")&&s.from.y!=s.to.y)g=g.concat(j),f.from=c.effects.setTransition(f,j,s.from.y,f.from),f.to=c.effects.setTransition(f,j,s.to.y,f.to);c.effects.save(f,p?g:i);f.show();c.effects.createWrapper(f);
f.css("overflow","hidden").css(f.from);if(r=="content"||r=="both")k=k.concat(["marginTop","marginBottom"]).concat(j),n=n.concat(["marginLeft","marginRight"]),h=g.concat(k).concat(n),f.find("*[width]").each(function(){child=c(this);p&&c.effects.save(child,h);var f={height:child.height(),width:child.width()};child.from={height:f.height*s.from.y,width:f.width*s.from.x};child.to={height:f.height*s.to.y,width:f.width*s.to.x};if(s.from.y!=s.to.y)child.from=c.effects.setTransition(child,k,s.from.y,child.from),
child.to=c.effects.setTransition(child,k,s.to.y,child.to);if(s.from.x!=s.to.x)child.from=c.effects.setTransition(child,n,s.from.x,child.from),child.to=c.effects.setTransition(child,n,s.to.x,child.to);child.css(child.from);child.animate(child.to,e.duration,e.options.easing,function(){p&&c.effects.restore(child,h)})});f.animate(f.to,{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){f.to.opacity===0&&f.css("opacity",f.from.opacity);m=="hide"&&f.hide();c.effects.restore(f,p?g:
i);c.effects.removeWrapper(f);e.callback&&e.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.shake=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right"];c.effects.setMode(f,e.options.mode||"effect");var i=e.options.direction||"left",h=e.options.distance||20,j=e.options.times||3,k=e.duration||e.options.duration||140;c.effects.save(f,g);f.show();c.effects.createWrapper(f);var n=i=="up"||i=="down"?"top":"left",m=i=="up"||i=="left"?"pos":"neg",i={},p={},r={};i[n]=(m=="pos"?"-=":"+=")+h;p[n]=(m=="pos"?"+=":"-=")+h*2;r[n]=(m==
"pos"?"-=":"+=")+h*2;f.animate(i,k,e.options.easing);for(h=1;h<j;h++)f.animate(p,k,e.options.easing).animate(r,k,e.options.easing);f.animate(p,k,e.options.easing).animate(i,k/2,e.options.easing,function(){c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
(function(c){c.effects.slide=function(e){return this.queue(function(){var f=c(this),g=["position","top","bottom","left","right"],i=c.effects.setMode(f,e.options.mode||"show"),h=e.options.direction||"left";c.effects.save(f,g);f.show();c.effects.createWrapper(f).css({overflow:"hidden"});var j=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",k=e.options.distance||(j=="top"?f.outerHeight({margin:!0}):f.outerWidth({margin:!0}));i=="show"&&f.css(j,h=="pos"?isNaN(k)?"-"+k:-k:k);var n={};
n[j]=(i=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+k;f.animate(n,{queue:!1,duration:e.duration,easing:e.options.easing,complete:function(){i=="hide"&&f.hide();c.effects.restore(f,g);c.effects.removeWrapper(f);e.callback&&e.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
(function(c){c.effects.transfer=function(e){return this.queue(function(){var f=c(this),g=c(e.options.to),i=g.offset(),g={top:i.top,left:i.left,height:g.innerHeight(),width:g.innerWidth()},i=f.offset(),h=c('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(e.options.className).css({top:i.top,left:i.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,e.duration,e.options.easing,function(){h.remove();e.callback&&e.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);(function(c){function e(){if(c.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}c.fn.ajaxSubmit=function(f){function g(){function g(){var e=m.attr("target"),f=m.attr("action");j.setAttribute("target",l);j.getAttribute("method")!="POST"&&j.setAttribute("method","POST");j.getAttribute("action")!=k.url&&j.setAttribute("action",k.url);k.skipEncodingOverride||
m.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});k.timeout&&setTimeout(function(){K=!0;h()},k.timeout);var i=[];try{if(k.extraData)for(var n in k.extraData)i.push(c('<input type="hidden" name="'+n+'" value="'+k.extraData[n]+'" />').appendTo(j)[0]);p.appendTo("body");p.data("form-plugin-onload",h);j.submit()}finally{j.setAttribute("action",f),e?j.setAttribute("target",e):m.removeAttr("target"),c(i).remove()}}function h(){if(!w){p.removeData("form-plugin-onload");var f=!0;try{if(K)throw"timeout";
F=r.contentWindow?r.contentWindow.document:r.contentDocument?r.contentDocument:r.document;var g=k.dataType=="xml"||F.XMLDocument||c.isXMLDoc(F);e("isXml="+g);if(!g&&window.opera&&(F.body==null||F.body.innerHTML=="")&&--M){e("requeing onLoad callback, DOM not available");setTimeout(h,250);return}w=!0;x.responseText=F.documentElement?F.documentElement.innerHTML:null;x.responseXML=F.XMLDocument?F.XMLDocument:F;x.getResponseHeader=function(c){return{"content-type":k.dataType}[c]};var j=/(json|script)/.test(k.dataType);
if(j||k.textarea){var l=F.getElementsByTagName("textarea")[0];if(l)x.responseText=l.value;else if(j){var m=F.getElementsByTagName("pre")[0],n=F.getElementsByTagName("body")[0];if(m)x.responseText=m.innerHTML;else if(n)x.responseText=n.innerHTML}}else if(k.dataType=="xml"&&!x.responseXML&&x.responseText!=null)x.responseXML=i(x.responseText);R=c.httpData(x,k.dataType)}catch(o){e("error caught:",o),f=!1,x.error=o,c.handleError(k,x,"error",o)}f&&(k.success.call(k.context,R,"success",x),C&&c.event.trigger("ajaxSuccess",
[x,k]));C&&c.event.trigger("ajaxComplete",[x,k]);C&&!--c.active&&c.event.trigger("ajaxStop");k.complete&&k.complete.call(k.context,x,f?"success":"error");setTimeout(function(){p.removeData("form-plugin-onload");p.remove();x.responseXML=null},100)}}function i(c,e){window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(c)):e=(new DOMParser).parseFromString(c,"text/xml");return e&&e.documentElement&&e.documentElement.tagName!="parsererror"?e:null}var j=m[0];if(c(":input[name=submit],:input[id=submit]",
j).length)alert('Error: Form elements must not have name or id of "submit".');else{var k=c.extend(!0,{},c.ajaxSettings,f);k.context=k.context||k;var l="jqFormIO"+(new Date).getTime(),n="_"+l;window[n]=function(){var c=p.data("form-plugin-onload");if(c){c();window[n]=void 0;try{delete window[n]}catch(e){}}};var p=c('<iframe id="'+l+'" name="'+l+'" src="'+k.iframeSrc+'" onload="window[\'_\'+this.id]()" />'),r=p[0];p.css({position:"absolute",top:"-1000px",left:"-1000px"});var x={aborted:0,responseText:null,
responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;p.attr("src",k.iframeSrc)}},C=k.global;C&&!c.active++&&c.event.trigger("ajaxStart");C&&c.event.trigger("ajaxSend",[x,k]);if(k.beforeSend&&k.beforeSend.call(k.context,x,k)===!1)k.global&&c.active--;else if(!x.aborted){var w=!1,K=0,I=j.clk;if(I){var H=I.name;if(H&&!I.disabled&&(k.extraData=k.extraData||{},k.extraData[H]=I.value,I.type==
"image"))k.extraData[H+".x"]=j.clk_x,k.extraData[H+".y"]=j.clk_y}k.forceSync?g():setTimeout(g,10);var R,F,M=50}}}if(!this.length)return e("ajaxSubmit: skipping submit process - no element selected"),this;typeof f=="function"&&(f={success:f});var i=c.trim(this.attr("action"));i&&(i=(i.match(/^([^#]+)/)||[])[1]);i=i||window.location.href||"";f=c.extend(!0,{url:i,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},f);i={};this.trigger("form-pre-serialize",
[this,f,i]);if(i.veto)return e("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(f.beforeSerialize&&f.beforeSerialize(this,f)===!1)return e("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h,j,k=this.formToArray(f.semantic);if(f.data)for(h in f.extraData=f.data,f.data)if(f.data[h]instanceof Array)for(var n in f.data[h])k.push({name:h,value:f.data[h][n]});else j=f.data[h],j=c.isFunction(j)?j():j,k.push({name:h,value:j});if(f.beforeSubmit&&f.beforeSubmit(k,this,
f)===!1)return e("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[k,this,f,i]);if(i.veto)return e("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;h=c.param(k);f.type.toUpperCase()=="GET"?(f.url+=(f.url.indexOf("?")>=0?"&":"?")+h,f.data=null):f.data=h;var m=this,p=[];f.resetForm&&p.push(function(){m.resetForm()});f.clearForm&&p.push(function(){m.clearForm()});if(!f.dataType&&f.target){var r=f.success||function(){};p.push(function(e){var g=
f.replaceTarget?"replaceWith":"html";c(f.target)[g](e).each(r,arguments)})}else f.success&&p.push(f.success);f.success=function(c,e,g){for(var h=f.context||f,i=0,j=p.length;i<j;i++)p[i].apply(h,[c,e,g||m,m])};h=c("input:file",this).length>0;n=m.attr("enctype")=="multipart/form-data"||m.attr("encoding")=="multipart/form-data";f.iframe!==!1&&(h||f.iframe||n)?f.closeKeepAlive?c.get(f.closeKeepAlive,g):g():c.ajax(f);this.trigger("form-submit-notify",[this,f]);return this};c.fn.ajaxForm=function(f){if(this.length===
0){var g={s:this.selector,c:this.context};if(!c.isReady&&g.s)return e("DOM not ready, queuing ajaxForm"),c(function(){c(g.s,g.c).ajaxForm(f)}),this;e("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){e.isDefaultPrevented()||(e.preventDefault(),c(this).ajaxSubmit(f))}).bind("click.form-plugin",function(e){var f=e.target,g=c(f);if(!g.is(":submit,input:image")){f=g.closest(":submit");if(f.length==
0)return;f=f[0]}var k=this;k.clk=f;if(f.type=="image")e.offsetX!=void 0?(k.clk_x=e.offsetX,k.clk_y=e.offsetY):typeof c.fn.offset=="function"?(g=g.offset(),k.clk_x=e.pageX-g.left,k.clk_y=e.pageY-g.top):(k.clk_x=e.pageX-f.offsetLeft,k.clk_y=e.pageY-f.offsetTop);setTimeout(function(){k.clk=k.clk_x=k.clk_y=null},100)})};c.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};c.fn.formToArray=function(e){var g=[];if(this.length===0)return g;var i=this[0],h=e?i.getElementsByTagName("*"):
i.elements;if(!h)return g;var j,k,n,m,p,r;j=0;for(p=h.length;j<p;j++)if(k=h[j],n=k.name)if(e&&i.clk&&k.type=="image")!k.disabled&&i.clk==k&&(g.push({name:n,value:c(k).val()}),g.push({name:n+".x",value:i.clk_x},{name:n+".y",value:i.clk_y}));else if((m=c.fieldValue(k,!0))&&m.constructor==Array){k=0;for(r=m.length;k<r;k++)g.push({name:n,value:m[k]})}else m!==null&&typeof m!="undefined"&&g.push({name:n,value:m});if(!e&&i.clk&&(e=c(i.clk),h=e[0],(n=h.name)&&!h.disabled&&h.type=="image"))g.push({name:n,
value:e.val()}),g.push({name:n+".x",value:i.clk_x},{name:n+".y",value:i.clk_y});return g};c.fn.formSerialize=function(e){return c.param(this.formToArray(e))};c.fn.fieldSerialize=function(e){var g=[];this.each(function(){var i=this.name;if(i){var h=c.fieldValue(this,e);if(h&&h.constructor==Array)for(var j=0,k=h.length;j<k;j++)g.push({name:i,value:h[j]});else h!==null&&typeof h!="undefined"&&g.push({name:this.name,value:h})}});return c.param(g)};c.fn.fieldValue=function(e){for(var g=[],i=0,h=this.length;i<
h;i++){var j=c.fieldValue(this[i],e);j===null||typeof j=="undefined"||j.constructor==Array&&!j.length||(j.constructor==Array?c.merge(g,j):g.push(j))}return g};c.fieldValue=function(e,g){var i=e.name,h=e.type,j=e.tagName.toLowerCase();g===void 0&&(g=!0);if(g&&(!i||e.disabled||h=="reset"||h=="button"||(h=="checkbox"||h=="radio")&&!e.checked||(h=="submit"||h=="image")&&e.form&&e.form.clk!=e||j=="select"&&e.selectedIndex==-1))return null;if(j=="select"){var k=e.selectedIndex;if(k<0)return null;for(var i=
[],j=e.options,n=(h=h=="select-one")?k+1:j.length,k=h?k:0;k<n;k++){var m=j[k];if(m.selected){var p=m.value;p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(h)return p;i.push(p)}}return i}return c(e).val()};c.fn.clearForm=function(){return this.each(function(){c("input,select,textarea",this).clearFields()})};c.fn.clearFields=c.fn.clearInputs=function(){return this.each(function(){var c=this.type,e=this.tagName.toLowerCase();if(c=="text"||c=="password"||e=="textarea")this.value=
"";else if(c=="checkbox"||c=="radio")this.checked=!1;else if(e=="select")this.selectedIndex=-1})};c.fn.resetForm=function(){return this.each(function(){(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)&&this.reset()})};c.fn.enable=function(c){c===void 0&&(c=!0);return this.each(function(){this.disabled=!c})};c.fn.selected=function(e){e===void 0&&(e=!0);return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio")this.checked=e;else if(this.tagName.toLowerCase()==
"option")g=c(this).parent("select"),e&&g[0]&&g[0].type=="select-one"&&g.find("option").selected(!1),this.selected=e})}})(jQuery);(function(c){c.extend(c.fn,{validate:function(e){if(this.length){var f=c.data(this[0],"validator");if(f)return f;f=new c.validator(e,this[0]);c.data(this[0],"validator",f);f.settings.onsubmit&&(this.find("input, button").filter(".cancel").click(function(){f.cancelSubmit=!0}),f.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){f.submitButton=this}),this.submit(function(e){function i(){if(f.settings.submitHandler){if(f.submitButton)var e=c("<input type='hidden'/>").attr("name",
f.submitButton.name).val(f.submitButton.value).appendTo(f.currentForm);f.settings.submitHandler.call(f,f.currentForm);f.submitButton&&e.remove();return!1}return!0}f.settings.debug&&e.preventDefault();if(f.cancelSubmit)return f.cancelSubmit=!1,i();if(f.form()){if(f.pendingRequest)return f.formSubmitted=!0,!1;return i()}else return f.focusInvalid(),!1}));return f}else e&&e.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var e=!0,f=c(this[0].form).validate();this.each(function(){e&=f.element(this)});return e}},removeAttrs:function(e){var f={},g=this;c.each(e.split(/\s/),function(c,e){f[e]=g.attr(e);g.removeAttr(e)});return f},rules:function(e,f){var g=this[0];if(e){var i=c.data(g.form,"validator").settings,h=i.rules,j=c.validator.staticRules(g);switch(e){case "add":c.extend(j,c.validator.normalizeRule(f));h[g.name]=j;f.messages&&(i.messages[g.name]=c.extend(i.messages[g.name],f.messages));break;case "remove":if(!f)return delete h[g.name],
j;var k={};c.each(f.split(/\s/),function(c,e){k[e]=j[e];delete j[e]});return k}}g=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(g),c.validator.classRules(g),c.validator.attributeRules(g),c.validator.staticRules(g)),g);if(g.required)i=g.required,delete g.required,g=c.extend({required:i},g);return g}});c.extend(c.expr[":"],{blank:function(e){return!c.trim(""+e.value)},filled:function(e){return!!c.trim(""+e.value)},unchecked:function(c){return!c.checked}});c.validator=function(e,f){this.settings=
c.extend(!0,{},c.validator.defaults,e);this.currentForm=f;this.init()};c.validator.format=function(e,f){if(arguments.length==1)return function(){var f=c.makeArray(arguments);f.unshift(e);return c.validator.format.apply(this,f)};arguments.length>2&&f.constructor!=Array&&(f=c.makeArray(arguments).slice(1));f.constructor!=Array&&(f=[f]);c.each(f,function(c,f){e=e.replace(RegExp("\\{"+c+"\\}","g"),f)});return e};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",
errorElement:"label",focusInvalid:!0,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:!0,ignore:[],ignoreTitle:!1,onfocusin:function(c){this.lastActive=c;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,c,this.settings.errorClass,this.settings.validClass),this.errorsFor(c).hide())},onfocusout:function(c){!this.checkable(c)&&(c.name in this.submitted||!this.optional(c))&&this.element(c)},onkeyup:function(c){(c.name in this.submitted||
c==this.lastElement)&&this.element(c)},onclick:function(c){c.name in this.submitted?this.element(c):c.parentNode.name in this.submitted&&this.element(c.parentNode)},highlight:function(e,f,g){c(e).addClass(f).removeClass(g)},unhighlight:function(e,f,g){c(e).removeClass(f).addClass(g)}},setDefaults:function(e){c.extend(c.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",
dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),
range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var f=c.data(this[0].form,"validator"),e="on"+e.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var f=this.groups={};c.each(this.settings.groups,function(e,g){c.each(g.split(/\s/),function(c,g){f[g]=e})});var g=this.settings.rules;c.each(g,function(e,f){g[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
"focusin focusout keyup",e).validateDelegate(":radio, :checkbox, select, option","click",e);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var c=0,f=this.currentElements=this.elements();f[c];c++)this.check(f[c]);
return this.valid()},element:function(e){this.lastElement=e=this.clean(e);this.prepareElement(e);this.currentElements=c(e);var f=this.check(e);f?delete this.invalid[e.name]:this.invalid[e.name]=!0;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return f},showErrors:function(e){if(e){c.extend(this.errorMap,e);this.errorList=[];for(var f in e)this.errorList.push({message:e[f],element:this.findByName(f)[0]});this.successList=c.grep(this.successList,function(c){return!(c.name in
e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(c){var f=0,g;for(g in c)f++;return f},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==
0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&c.grep(this.errorList,function(c){return c.element.name==e.name}).length==1&&e},elements:function(){var e=this,f={};return c([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
e.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in f||!e.objectLength(c(this).rules()))return!1;return f[this.name]=!0})},clean:function(e){return c(e)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(c){this.reset();this.toHide=this.errorsFor(c)},check:function(e){e=this.clean(e);this.checkable(e)&&(e=this.findByName(e.name)[0]);var f=c(e).rules(),g=!1;for(method in f){var i={method:method,parameters:f[method]};try{var h=c.validator.methods[method].call(this,e.value.replace(/\r/g,""),e,i.parameters);if(h=="dependency-mismatch")g=!0;else{g=!1;if(h=="pending"){this.toHide=this.toHide.not(this.errorsFor(e));return}if(!h)return this.formatAndAdd(e,i),!1}}catch(j){throw this.settings.debug&&
window.console&&console.log("exception occured when checking element "+e.id+", check the '"+i.method+"' method",j),j;}}if(!g)return this.objectLength(f)&&this.successList.push(e),!0},customMetaMessage:function(e,f){if(c.metadata){var g=this.settings.meta?c(e).metadata()[this.settings.meta]:c(e).metadata();return g&&g.messages&&g.messages[f]}},customMessage:function(c,f){var g=this.settings.messages[c];return g&&(g.constructor==String?g:g[f])},findDefined:function(){for(var c=0;c<arguments.length;c++)if(arguments[c]!==
void 0)return arguments[c]},defaultMessage:function(e,f){return this.findDefined(this.customMessage(e.name,f),this.customMetaMessage(e,f),!this.settings.ignoreTitle&&e.title||void 0,c.validator.messages[f],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(c,f){var g=this.defaultMessage(c,f.method),i=/\$?\{(\d+)\}/g;typeof g=="function"?g=g.call(this,f.parameters,c):i.test(g)&&(g=jQuery.format(g.replace(i,"{$1}"),f.parameters));this.errorList.push({message:g,element:c});
this.errorMap[c.name]=g;this.submitted[c.name]=g},addWrapper:function(c){this.settings.wrapper&&(c=c.add(c.parent(this.settings.wrapper)));return c},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var f=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,f.element,this.settings.errorClass,this.settings.validClass);this.showLabel(f.element,f.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(c=0;this.successList[c];c++)this.showLabel(this.successList[c]);
if(this.settings.unhighlight){c=0;for(f=this.validElements();f[c];c++)this.settings.unhighlight.call(this,f[c],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(e,f){var g=this.errorsFor(e);g.length?(g.removeClass().addClass(this.settings.errorClass),
g.attr("generated")&&g.html(f)):(g=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(e),generated:!0}).addClass(this.settings.errorClass).html(f||""),this.settings.wrapper&&(g=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(g).length||(this.settings.errorPlacement?this.settings.errorPlacement(g,c(e)):g.insertAfter(e)));!f&&this.settings.success&&(g.text(""),typeof this.settings.success=="string"?g.addClass(this.settings.success):this.settings.success(g));
this.toShow=this.toShow.add(g)},errorsFor:function(e){var f=this.idOrName(e);return this.errors().filter(function(){return c(this).attr("for")==f})},idOrName:function(c){return this.groups[c.name]||(this.checkable(c)?c.name:c.id||c.name)},checkable:function(c){return/radio|checkbox/i.test(c.type)},findByName:function(e){var f=this.currentForm;return c(document.getElementsByName(e)).map(function(c,i){return i.form==f&&i.name==e&&i||null})},getLength:function(e,f){switch(f.nodeName.toLowerCase()){case "select":return c("option:selected",
f).length;case "input":if(this.checkable(f))return this.findByName(f.name).filter(":checked").length}return e.length},depend:function(c,f){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,f):!0},dependTypes:{"boolean":function(c){return c},string:function(e,f){return!!c(e,f.form).length},"function":function(c,f){return c(f)}},optional:function(e){return!c.validator.methods.required.call(this,c.trim(e.value),e)&&"dependency-mismatch"},startRequest:function(c){this.pending[c.name]||(this.pendingRequest++,
this.pending[c.name]=!0)},stopRequest:function(e,f){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[e.name];if(f&&this.pendingRequest==0&&this.formSubmitted&&this.form())c(this.currentForm).submit(),this.formSubmitted=!1;else if(!f&&this.pendingRequest==0&&this.formSubmitted)c(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1},previousValue:function(e){return c.data(e,"previousValue")||c.data(e,"previousValue",{old:null,valid:!0,
message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},dateDE:{dateDE:!0},number:{number:!0},numberDE:{numberDE:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,f){e.constructor==String?this.classRuleSettings[e]=f:c.extend(this.classRuleSettings,e)},classRules:function(e){var f={};(e=c(e).attr("class"))&&c.each(e.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(f,
c.validator.classRuleSettings[this])});return f},attributeRules:function(e){var f={},e=c(e);for(method in c.validator.methods){var g=e.attr(method);g&&(f[method]=g)}f.maxlength&&/-1|2147483647|524288/.test(f.maxlength)&&delete f.maxlength;return f},metadataRules:function(e){if(!c.metadata)return{};var f=c.data(e.form,"validator").settings.meta;return f?c(e).metadata()[f]:c(e).metadata()},staticRules:function(e){var f={},g=c.data(e.form,"validator");g.settings.rules&&(f=c.validator.normalizeRule(g.settings.rules[e.name])||
{});return f},normalizeRules:function(e,f){c.each(e,function(g,i){if(i===!1)delete e[g];else if(i.param||i.depends){var h=!0;switch(typeof i.depends){case "string":h=!!c(i.depends,f.form).length;break;case "function":h=i.depends.call(f,f)}h?e[g]=i.param!==void 0?i.param:!0:delete e[g]}});c.each(e,function(g,i){e[g]=c.isFunction(i)?i(f):i});c.each(["minlength","maxlength","min","max"],function(){e[this]&&(e[this]=Number(e[this]))});c.each(["rangelength","range"],function(){e[this]&&(e[this]=[Number(e[this][0]),
Number(e[this][1])])});if(c.validator.autoCreateRanges){if(e.min&&e.max)e.range=[e.min,e.max],delete e.min,delete e.max;if(e.minlength&&e.maxlength)e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength}e.messages&&delete e.messages;return e},normalizeRule:function(e){if(typeof e=="string"){var f={};c.each(e.split(/\s/),function(){f[this]=!0});e=f}return e},addMethod:function(e,f,g){c.validator.methods[e]=f;c.validator.messages[e]=g!=void 0?g:c.validator.messages[e];f.length<
3&&c.validator.addClassRules(e,c.validator.normalizeRule(e))},methods:{required:function(e,f,g){if(!this.depend(g,f))return"dependency-mismatch";switch(f.nodeName.toLowerCase()){case "select":return(e=c(f).val())&&e.length>0;case "input":if(this.checkable(f))return this.getLength(e,f)>0;default:return c.trim(e).length>0}},remote:function(e,f,g){if(this.optional(f))return"dependency-mismatch";var i=this.previousValue(f);this.settings.messages[f.name]||(this.settings.messages[f.name]={});i.originalMessage=
this.settings.messages[f.name].remote;this.settings.messages[f.name].remote=i.message;g=typeof g=="string"&&{url:g}||g;if(i.old!==e){i.old=e;var h=this;this.startRequest(f);var j={};j[f.name]=e;c.ajax(c.extend(!0,{url:g,mode:"abort",port:"validate"+f.name,dataType:"json",data:j,success:function(g){h.settings.messages[f.name].remote=i.originalMessage;var j=g===!0;if(j){var m=h.formSubmitted;h.prepareElement(f);h.formSubmitted=m;h.successList.push(f);h.showErrors()}else m={},g=i.message=g||h.defaultMessage(f,
"remote"),m[f.name]=c.isFunction(g)?g(e):g,h.showErrors(m);i.valid=j;h.stopRequest(f,j)}},g));return"pending"}else if(this.pending[f.name])return"pending";return i.valid},minlength:function(e,f,g){return this.optional(f)||this.getLength(c.trim(e),f)>=g},maxlength:function(e,f,g){return this.optional(f)||this.getLength(c.trim(e),f)<=g},rangelength:function(e,f,g){e=this.getLength(c.trim(e),f);return this.optional(f)||e>=g[0]&&e<=g[1]},min:function(c,f,g){return this.optional(f)||c>=g},max:function(c,
f,g){return this.optional(f)||c<=g},range:function(c,f,g){return this.optional(f)||c>=g[0]&&c<=g[1]},email:function(c,f){return this.optional(f)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},
url:function(c,f){return this.optional(f)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},
date:function(c,f){return this.optional(f)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,f){return this.optional(f)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,f){return this.optional(f)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,f){return this.optional(f)||/^\d+$/.test(c)},creditcard:function(c,f){if(this.optional(f))return"dependency-mismatch";if(/[^0-9-]+/.test(c))return!1;for(var g=0,i=0,h=!1,c=c.replace(/\D/g,""),j=c.length-1;j>=0;j--){i=
c.charAt(j);i=parseInt(i,10);if(h&&(i*=2)>9)i-=9;g+=i;h=!h}return g%10==0},accept:function(c,f,g){g=typeof g=="string"?g.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(f)||c.match(RegExp(".("+g+")$","i"))},equalTo:function(e,f,g){g=c(g).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(f).valid()});return e==g.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var e=c.ajax,f={};c.ajax=function(g){var g=c.extend(g,c.extend({},c.ajaxSettings,g)),i=g.port;if(g.mode=="abort")return f[i]&&f[i].abort(),f[i]=e.apply(this,arguments);return e.apply(this,arguments)}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(e,f){function g(e){e=c.event.fix(e);e.type=f;return c.event.handle.call(this,e)}c.event.special[f]={setup:function(){this.addEventListener(e,g,!0)},teardown:function(){this.removeEventListener(e,g,!0)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=f;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(e,
f,g){return this.bind(f,function(f){var h=c(f.target);if(h.is(e))return g.apply(h,arguments)})}})})(jQuery);var checkboxHeight="30",radioHeight="30",selectWidth="185";document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: '+selectWidth+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");
var Custom={init:function(){var c=document.getElementsByTagName("input"),e=[],f,g;for(a=0;a<c.length;a++)if((c[a].type=="checkbox"||c[a].type=="radio")&&c[a].className=="styled"){e[a]=document.createElement("span");e[a].className=c[a].type;if(c[a].checked==!0)position=c[a].type=="checkbox"?"0 -"+checkboxHeight*2+"px":"0 -"+radioHeight*2+"px",e[a].style.backgroundPosition=position;c[a].parentNode.insertBefore(e[a],c[a]);c[a].onchange=Custom.clear;c[a].getAttribute("disabled")?e[a].className=e[a].className+=
" disabled":(e[a].onmousedown=Custom.pushed,e[a].onmouseup=Custom.check)}c=document.getElementsByTagName("select");for(a=0;a<c.length;a++)if(c[a].className=="styled"){g=c[a].getElementsByTagName("option");f=g[0].childNodes[0].nodeValue;f=document.createTextNode(f);for(b=0;b<g.length;b++)g[b].selected==!0&&(f=document.createTextNode(g[b].childNodes[0].nodeValue));e[a]=document.createElement("span");e[a].className="select";e[a].id="select"+c[a].name;e[a].appendChild(f);c[a].parentNode.insertBefore(e[a],
c[a]);c[a].getAttribute("disabled")?c[a].previousSibling.className=c[a].previousSibling.className+=" disabled":c[a].onchange=Custom.choose}document.onmouseup=Custom.clear},pushed:function(){element=this.nextSibling;this.style.backgroundPosition=element.checked==!0&&element.type=="checkbox"?"0 -"+checkboxHeight*3+"px":element.checked==!0&&element.type=="radio"?"0 -"+radioHeight*3+"px":element.checked!=!0&&element.type=="checkbox"?"0 -"+checkboxHeight+"px":"0 -"+radioHeight+"px"},check:function(){element=
this.nextSibling;if(element.checked==!0&&element.type=="checkbox")this.style.backgroundPosition="0 0",element.checked=!1;else{if(element.type=="checkbox")this.style.backgroundPosition="0 -"+checkboxHeight*2+"px";else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(a=0;a<inputs.length;a++)if(inputs[a].name==group&&inputs[a]!=this.nextSibling)inputs[a].previousSibling.style.backgroundPosition="0 0"}element.checked=
!0}},clear:function(){inputs=document.getElementsByTagName("input");for(var c=0;c<inputs.length;c++)if(inputs[c].type=="checkbox"&&inputs[c].checked==!0&&inputs[c].className=="styled")inputs[c].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px";else if(inputs[c].type=="checkbox"&&inputs[c].className=="styled")inputs[c].previousSibling.style.backgroundPosition="0 0";else if(inputs[c].type=="radio"&&inputs[c].checked==!0&&inputs[c].className=="styled")inputs[c].previousSibling.style.backgroundPosition=
"0 -"+radioHeight*2+"px";else if(inputs[c].type=="radio"&&inputs[c].className=="styled")inputs[c].previousSibling.style.backgroundPosition="0 0"},choose:function(){option=this.getElementsByTagName("option");for(d=0;d<option.length;d++)if(option[d].selected==!0)document.getElementById("select"+this.name).childNodes[0].nodeValue=option[d].childNodes[0].nodeValue}};$(function(){$(".img-swap").live("click",function(){if($(this).attr("class")=="img-swap"){var c=$(this).siblings("input[type=checkbox]"),e=$("input[name="+c.attr("name")+"]"),f=e.siblings(".img-swap");e.each(function(){$(this).attr("checked",!1)});f.each(function(){this.src=this.src.replace("On","Off");$(this).removeClass("On")});this.src=this.src.replace("Off","On");c.attr("checked",!0)}$(this).toggleClass("On")}).each(function(){$(this).click(function(){if($(this).attr("class")=="img-swap"){var c=
$(this).siblings("input[type=checkbox]"),e=$("input[name="+c.attr("name")+"]"),f=e.siblings(".img-swap");e.each(function(){$(this).attr("checked",!1)});f.each(function(){this.src=this.src.replace("On","Off");$(this).removeClass("On")});this.src=this.src.replace("Off","On");c.attr("checked",!0)}$(this).toggleClass("On")});$(this).siblings("input[type=checkbox]").attr("checked")&&$(this).click()})});if(!window.SI)var SI={};
SI.Files={htmlClass:"SI-FILES-STYLIZED",fileClass:"file",wrapClass:"cabinet",fini:!1,able:!1,init:function(){this.fini=!0;if(!window.opera&&document.getElementsByTagName){this.able=!0;var c=document.getElementsByTagName("html")[0];c.className+=(c.className!=""?" ":"")+this.htmlClass}},stylize:function(c){this.fini||this.init();if(this.able)c.parentNode.file=c,c.parentNode.onmousemove=function(c){if(typeof c=="undefined")c=window.event;if(typeof c.pageY=="undefined"&&typeof c.clientX=="number"&&document.documentElement)c.pageX=
c.clientX+document.documentElement.scrollLeft,c.pageY=c.clientY+document.documentElement.scrollTop;var f=oy=0,g=this;if(g.offsetParent){f=g.offsetLeft;for(oy=g.offsetTop;g=g.offsetParent;)f+=g.offsetLeft,oy+=g.offsetTop}f=c.pageX-f;g=this.file.offsetWidth;this.file.style.top=c.pageY-oy-this.file.offsetHeight/2+"px";this.file.style.left=f-(g-30)+"px"}},stylizeById:function(c){this.stylize(document.getElementById(c))},stylizeAll:function(){this.fini||this.init();if(this.able)for(var c=document.getElementsByTagName("input"),
e=0;e<c.length;e++){var f=c[e];f.type=="file"&&f.className.indexOf(this.fileClass)!=-1&&f.parentNode.className.indexOf(this.wrapClass)!=-1&&this.stylize(f)}}};(function(c){c.widget("ui.stars",{options:{inputType:"radio",split:0,disabled:!1,cancelTitle:"Cancel Rating",cancelValue:0,cancelShow:!0,disableValue:!0,oneVoteOnly:!1,showTitles:!1,captionEl:null,callback:null,starWidth:16,cancelClass:"ui-stars-cancel",starClass:"ui-stars-star",starOnClass:"ui-stars-star-on",starHoverClass:"ui-stars-star-hover",starDisabledClass:"ui-stars-star-disabled",cancelHoverClass:"ui-stars-cancel-hover",cancelDisabledClass:"ui-stars-cancel-disabled"},_create:function(){function e(c,
e){if(c!=-1){var h=e?i.starHoverClass:i.starOnClass,m=e?i.starOnClass:i.starHoverClass;g.$stars.eq(c).prevAll("."+i.starClass).andSelf().removeClass(m).addClass(h);g.$stars.eq(c).nextAll("."+i.starClass).removeClass(i.starHoverClass+" "+i.starOnClass);g._showCap(i.id2title[c])}else f()}function f(){g.$stars.removeClass(i.starOnClass+" "+i.starHoverClass);g._showCap("")}var g=this,i=this.options,h=0;this.element.data("former.stars",this.element.html());i.isSelect=i.inputType=="select";this.$form=c(this.element).closest("form");
this.$selec=i.isSelect?c("select",this.element):null;this.$rboxs=i.isSelect?c("option",this.$selec):c(":radio",this.element);this.$stars=this.$rboxs.map(function(e){var f={value:this.value,title:(i.isSelect?this.text:this.title)||this.value,isDefault:i.isSelect&&this.defaultSelected||this.defaultChecked};if(e==0)i.split=typeof i.split!="number"?0:i.split,i.val2id=[],i.id2val=[],i.id2title=[],i.name=i.isSelect?g.$selec.get(0).name:this.name,i.disabled=i.disabled||(i.isSelect?c(g.$selec).attr("disabled"):
c(this).attr("disabled"));if(f.value==i.cancelValue)return i.cancelTitle=f.title,null;i.val2id[f.value]=h;i.id2val[h]=f.value;i.id2title[h]=f.title;if(f.isDefault)i.checked=h,i.value=i.defaultValue=f.value,i.title=f.title;e=c("<div/>").addClass(i.starClass);f=c("<a/>").attr("title",i.showTitles?f.title:"").text(f.value);if(i.split){var n=h%i.split,m=Math.floor(i.starWidth/i.split);e.width(m);f.css("margin-left","-"+n*m+"px")}h++;return e.append(f).get(0)});i.items=h;i.isSelect?this.$selec.remove():
this.$rboxs.remove();this.$cancel=c("<div/>").addClass(i.cancelClass).append(c("<a/>").attr("title",i.showTitles?i.cancelTitle:"").text(i.cancelValue));i.cancelShow&=!i.disabled&&!i.oneVoteOnly;i.cancelShow&&this.element.append(this.$cancel);this.element.append(this.$stars);if(i.checked===void 0)i.checked=-1,i.value=i.defaultValue=i.cancelValue,i.title="";this.$value=c("<input type='hidden' name='"+i.name+"' value='"+i.value+"' />");this.element.append(this.$value);this.$stars.bind("click.stars",
function(c){if(!i.forceSelect&&i.disabled)return!1;var f=g.$stars.index(this);i.checked=f;i.value=i.id2val[f];i.title=i.id2title[f];g.$value.attr({disabled:i.disabled?"disabled":"",value:i.value});e(f,!1);g._disableCancel();!i.forceSelect&&g.callback(c,"star")}).bind("mouseover.stars",function(){if(i.disabled)return!1;var c=g.$stars.index(this);e(c,!0)}).bind("mouseout.stars",function(){if(i.disabled)return!1;e(g.options.checked,!1)});this.$cancel.bind("click.stars",function(c){if(!i.forceSelect&&
(i.disabled||i.value==i.cancelValue))return!1;i.checked=-1;i.value=i.cancelValue;i.title="";g.$value.val(i.value);i.disableValue&&g.$value.attr({disabled:"disabled"});f();g._disableCancel();!i.forceSelect&&g.callback(c,"cancel")}).bind("mouseover.stars",function(){if(g._disableCancel())return!1;g.$cancel.addClass(i.cancelHoverClass);f();g._showCap(i.cancelTitle)}).bind("mouseout.stars",function(){if(g._disableCancel())return!1;g.$cancel.removeClass(i.cancelHoverClass);g.$stars.triggerHandler("mouseout.stars")});
this.$form.bind("reset.stars",function(){!i.disabled&&g.select(i.defaultValue)});c(window).unload(function(){g.$cancel.unbind(".stars");g.$stars.unbind(".stars");g.$form.unbind(".stars");g.$selec=g.$rboxs=g.$stars=g.$value=g.$cancel=g.$form=null});this.select(i.value);i.disabled&&this.disable()},_disableCancel:function(){var c=this.options,f=c.disabled||c.oneVoteOnly||c.value==c.cancelValue;f?this.$cancel.removeClass(c.cancelHoverClass).addClass(c.cancelDisabledClass):this.$cancel.removeClass(c.cancelDisabledClass);
this.$cancel.css("opacity",f?0.5:1);return f},_disableAll:function(){var c=this.options;this._disableCancel();c.disabled?this.$stars.filter("div").addClass(c.starDisabledClass):this.$stars.filter("div").removeClass(c.starDisabledClass)},_showCap:function(c){var f=this.options;f.captionEl&&f.captionEl.text(c)},value:function(){return this.options.value},select:function(c){var f=this.options,c=c==f.cancelValue?this.$cancel:this.$stars.eq(f.val2id[c]);f.forceSelect=!0;c.triggerHandler("click.stars");
f.forceSelect=!1},selectID:function(c){var f=this.options,c=c==-1?this.$cancel:this.$stars.eq(c);f.forceSelect=!0;c.triggerHandler("click.stars");f.forceSelect=!1},enable:function(){this.options.disabled=!1;this._disableAll()},disable:function(){this.options.disabled=!0;this._disableAll()},destroy:function(){this.$form.unbind(".stars");this.$cancel.unbind(".stars").remove();this.$stars.unbind(".stars").remove();this.$value.remove();this.element.unbind(".stars").html(this.element.data("former.stars")).removeData("stars");
return this},callback:function(c,f){var g=this.options;g.callback&&g.callback(this,f,g.value,c);g.oneVoteOnly&&!g.disabled&&this.disable()}});c.extend(c.ui.stars,{version:"3.0.1"})})(jQuery);(function(c){function e(e,f,g,h){h={data:h||(f?f.data:{}),_wrap:f?f._wrap:null,tmpl:null,parent:f||null,nodes:[],calls:n,nest:m,wrap:p,html:r,update:o};e&&c.extend(h,e,{nodes:[],parent:f});if(g)h.tmpl=g,h._ctnt=h._ctnt||h.tmpl(c,h),h.key=++A,(C.length?l:q)[A]=h;return h}function f(e,h,i){var j,i=i?c.map(i,function(c){return typeof c==="string"?e.key?c.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+s+'="'+e.key+'" $2'):c:f(c,e,c._ctnt)}):e;if(h)return i;i=i.join("");i.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(e,f,h,i){j=c(h).get();k(j);f&&(j=g(f).concat(j));i&&(j=j.concat(g(i)))});return j?j:g(i)}function g(e){var f=document.createElement("div");f.innerHTML=e;return c.makeArray(f.childNodes)}function i(e){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+c.trim(e).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(e,f,g,h,i,k,l){e=c.tmpl.tag[g];if(!e)throw"Template command not found: "+g;g=e._default||[];k&&!/\w$/.test(i)&&(i+=k,k="");i?(i=j(i),l=l?","+j(l)+")":k?")":"",l=k?i.indexOf(".")>-1?i+k:"("+i+").call($item"+l:i,k=k?l:"(typeof("+i+")==='function'?("+i+").call($item):("+i+"))"):k=l=g.$1||"null";h=j(h);return"');"+e[f?"close":"open"].split("$notnull_1").join(i?"typeof("+i+")!=='undefined' && ("+i+")!=null":"true").split("$1a").join(k).split("$1").join(l).split("$2").join(h?h.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,
function(c,e,f,g){return(g=g?","+g+")":f?")":"")?"("+e+").call($item"+g:c}):g.$2||"")+"_.push('"})+"');}return _;")}function h(e,g){e._wrap=f(e,!0,c.isArray(g)?g:[v.test(g)?g:c(g).html()]).join("")}function j(c){return c?c.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function k(f){function g(f){function i(c){var w;c+=h;w=k[c]=k[c]||e(n,q[n.parent.key+h]||n.parent,null,!0),n=w}var j,m=f,n,o;if(o=f.getAttribute(s)){for(;m.parentNode&&(m=m.parentNode).nodeType===1&&!(j=m.getAttribute(s)););if(j!==
o){m=m.parentNode?m.nodeType===11?0:m.getAttribute(s)||0:0;if(!(n=q[o]))n=l[o],n=e(n,q[m]||l[m],null,!0),n.key=++A,q[A]=n;x&&i(o)}f.removeAttribute(s)}else if(x&&(n=c.data(f,"tmplItem")))i(n.key),q[n.key]=n,m=(m=c.data(f.parentNode,"tmplItem"))?m.key:0;if(n){for(j=n;j&&j.key!=m;)j.nodes.push(f),j=j.parent;delete n._ctnt;delete n._wrap;c.data(f,"tmplItem",n)}}var h="_"+x,i,j,k={},m,n,o;m=0;for(n=f.length;m<n;m++)if((i=f[m]).nodeType===1){j=i.getElementsByTagName("*");for(o=j.length-1;o>=0;o--)g(j[o]);
g(i)}}function n(c,e,f,g){if(!c)return C.pop();C.push({_:c,tmpl:e,item:this,data:f,options:g})}function m(e,f,g){return c.tmpl(c.template(e),f,g,this)}function p(e,f){var g=e.options||{};g.wrapped=f;return c.tmpl(c.template(e.tmpl),e.data,g,e.item)}function r(e,f){var g=this._wrap;return c.map(c(c.isArray(g)?g.join(""):g).filter(e||"*"),function(c){if(f)c=c.innerText||c.textContent;else{var e;if(!(e=c.outerHTML))e=document.createElement("div"),e.appendChild(c.cloneNode(!0)),e=e.innerHTML;c=e}return c})}
function o(){var e=this.nodes;c.tmpl(null,null,null,this).insertBefore(e[0]);c(e).remove()}var u=c.fn.domManip,s="_tmplitem",v=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,q={},l={},z,B={key:0,data:{}},A=0,x=0,C=[];c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,f){c.fn[e]=function(g){var h=[],g=c(g),i,j,k;i=this.length===1&&this[0].parentNode;z=q||{};if(i&&i.nodeType===11&&i.childNodes.length===1&&g.length===1)g[f](this[0]),h=this;
else{j=0;for(k=g.length;j<k;j++)x=j,i=(j>0?this.clone(!0):this).get(),c.fn[f].apply(c(g[j]),i),h=h.concat(i);x=0;h=this.pushStack(h,e,g.selector)}g=z;z=null;c.tmpl.complete(g);return h}});c.fn.extend({tmpl:function(e,f,g){return c.tmpl(this[0],e,f,g)},tmplItem:function(){return c.tmplItem(this[0])},template:function(e){return c.template(e,this[0])},domManip:function(e,f,g){if(e[0]&&e[0].nodeType){for(var h=c.makeArray(arguments),i=e.length,j=0,k;j<i&&!(k=c.data(e[j++],"tmplItem")););i>1&&(h[0]=[c.makeArray(e)]);
k&&x&&(h[2]=function(e){c.tmpl.afterManip(this,e,g)});u.apply(this,h)}else u.apply(this,arguments);x=0;z||c.tmpl.complete(q);return this}});c.extend({tmpl:function(g,i,j,k){var m=!k;if(m)k=B,g=c.template[g]||c.template(null,g),l={};else if(!g)return g=k.tmpl,q[k.key]=k,k.nodes=[],k.wrapped&&h(k,k.wrapped),c(f(k,null,k.tmpl(c,k)));if(!g)return[];typeof i==="function"&&(i=i.call(k||{}));j&&j.wrapped&&h(j,j.wrapped);i=c.isArray(i)?c.map(i,function(c){return c?e(j,k,g,c):null}):[e(j,k,g,i)];return m?
c(f(k,null,i)):i},tmplItem:function(e){var f;for(e instanceof c&&(e=e[0]);e&&e.nodeType===1&&!(f=c.data(e,"tmplItem"))&&(e=e.parentNode););return f||B},template:function(e,f){if(f)return typeof f==="string"?f=i(f):f instanceof c&&(f=f[0]||{}),f.nodeType&&(f=c.data(f,"tmpl")||c.data(f,"tmpl",i(f.innerHTML))),typeof e==="string"?c.template[e]=f:f;return e?typeof e!=="string"?c.template(null,e):c.template[e]||c.template(null,v.test(e)?e:c(e)):null},encode:function(c){return(""+c).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});
c.extend(c.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},
open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){q={}},afterManip:function(e,f,g){var h=f.nodeType===11?c.makeArray(f.childNodes):f.nodeType===1?[f]:[];g.call(e,f);k(h);x++}})})(jQuery);(function(c){function e(c,e){var c=c.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),i=RegExp("[\\?&]"+c+"=([^&#]*)").exec(e);return i==null?"":i[1]}c.prettyPhoto={version:"3.0.2"};c.fn.prettyPhoto=function(f){function g(){c(".pp_loaderIcon").hide();$ppt.fadeTo(settings.animation_speed,1);projectedTop=scroll_pos.scrollTop+(A/2-s.containerHeight/2);projectedTop<0&&(projectedTop=0);$pp_pic_holder.find(".pp_content").animate({height:s.contentHeight,width:s.contentWidth},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,
left:x/2-s.containerWidth/2,width:s.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(s.height).width(s.width);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);isSet&&n(pp_images[set_position])=="image"?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide();s.resized?c("a.pp_expand,a.pp_contract").show():c("a.pp_expand,a.pp_contract").hide();settings.autoplay_slideshow&&!C&&
!v&&c.prettyPhoto.startSlideshow();settings.changepicturecallback();v=!0});isSet&&settings.overlay_gallery&&n(pp_images[set_position])=="image"?(itemWidth=57,navWidth=settings.theme=="facebook"?58:38,itemsPerPage=Math.floor((s.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,totalPage==0?(navWidth=0,$pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").hide()):
$pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth+navWidth,$pp_pic_holder.find(".pp_gallery").width(galleryWidth).css("margin-left",-(galleryWidth/2)),$pp_pic_holder.find(".pp_gallery ul").width(itemsPerPage*itemWidth).find("li.selected").removeClass("selected"),goToPage=Math.ceil((set_position+1)/itemsPerPage)<totalPage?Math.ceil((set_position+1)/itemsPerPage):totalPage,c.prettyPhoto.changeGalleryPage(goToPage),$pp_pic_holder.find(".pp_gallery ul li:eq("+
set_position+")").addClass("selected")):($pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave"),$pp_pic_holder.find(".pp_gallery").hide())}function i(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){c(".pp_loaderIcon").show();e()})}function h(e){e>1?c(".pp_nav").show():c(".pp_nav").hide()}function j(c,e){resized=!1;k(c,e);imageWidth=c;imageHeight=e;if((B>x||z>A)&&doresize&&
settings.allow_resize&&!u){resized=!0;for(fitting=!1;!fitting;)B>x?(imageWidth=x-200,imageHeight=e/c*imageWidth):z>A?(imageHeight=A-200,imageWidth=c/e*imageHeight):fitting=!0,z=imageHeight,B=imageWidth;k(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(z),containerWidth:Math.floor(B)+40,contentHeight:Math.floor(q),contentWidth:Math.floor(l),resized:resized}}function k(e,f){e=parseFloat(e);f=parseFloat(f);$pp_details=$pp_pic_holder.find(".pp_details");
$pp_details.width(e);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().appendTo(c("body")).css({position:"absolute",top:-1E4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;c.browser.msie&&c.browser.version==7&&(detailsHeight+=8);$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(e);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));
$pp_title=$pp_title.clone().appendTo(c("body")).css({position:"absolute",top:-1E4});titleHeight+=$pp_title.height();$pp_title.remove();q=f+detailsHeight;l=e;z=q+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();B=e}function n(c){return c.match(/youtube\.com\/watch/i)?"youtube":c.match(/vimeo\.com/i)?"vimeo":c.match(/\b.mov\b/i)?"quicktime":c.match(/\b.swf\b/i)?"flash":c.match(/\biframe=true\b/i)?"iframe":c.match(/\bcustom=true\b/i)?"custom":c.substr(0,
1)=="#"?"inline":"image"}function m(){doresize&&typeof $pp_pic_holder!="undefined"&&(scroll_pos=p(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=A/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),$pp_pic_holder.css({top:projectedTop,left:x/2+scroll_pos.scrollLeft-contentwidth/2}))}function p(){if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};else if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,
scrollLeft:document.documentElement.scrollLeft};else if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}function r(){c("body").append(settings.markup);$pp_pic_holder=c(".pp_pic_holder");$ppt=c(".ppt");$pp_overlay=c("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var e=0;e<pp_images.length;e++)classname=pp_images[e].match(/\b(jpg|jpeg|png|gif)\b/gi)?"":"default",toInject+="<li class='"+classname+"'><a href='#'><img src='"+
pp_images[e]+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_pic_holder.find(".pp_gallery .pp_arrow_next").click(function(){c.prettyPhoto.changeGalleryPage("next");c.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_gallery .pp_arrow_previous").click(function(){c.prettyPhoto.changeGalleryPage("previous");c.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},
function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=57;$pp_pic_holder.find(".pp_gallery ul li").each(function(e){c(this).css({position:"absolute",left:e*itemWidth});c(this).find("a").unbind("click").click(function(){c.prettyPhoto.changePage(e);c.prettyPhoto.stopSlideshow();return!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){c.prettyPhoto.startSlideshow();
return!1}));$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:c(document).height(),width:c(window).width()}).bind("click",function(){settings.modal||c.prettyPhoto.close()});c("a.pp_close").bind("click",function(){c.prettyPhoto.close();return!1});c("a.pp_expand").bind("click",function(){c(this).hasClass("pp_expand")?(c(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(c(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0);
i(function(){c.prettyPhoto.open()});return!1});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){c.prettyPhoto.changePage("previous");c.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){c.prettyPhoto.changePage("next");c.prettyPhoto.stopSlideshow();return!1});m()}var f=jQuery.extend({animation_speed:"fast",slideshow:!1,autoplay_slideshow:!1,opacity:0.8,show_title:!0,allow_resize:!0,default_width:500,
default_height:344,counter_separator_label:"/",theme:"facebook",hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,overlay_gallery:!0,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder">       <div class="ppt">&nbsp;</div>       <div class="pp_top">        <div class="pp_left"></div>        <div class="pp_middle"></div>        <div class="pp_right"></div>       </div>       <div class="pp_content_container">        <div class="pp_left">        <div class="pp_right">         <div class="pp_content">          <div class="pp_loaderIcon"></div>          <div class="pp_fade">           <a href="#" class="pp_expand" title="Expand the image">Expand</a>           <div class="pp_hoverContainer">            <a class="pp_next" href="#">next</a>            <a class="pp_previous" href="#">previous</a>           </div>           <div id="pp_full_res"></div>           <div class="pp_details clearfix">            <p class="pp_description"></p>            <a class="pp_close" href="#">Close</a>            <div class="pp_nav">             <a href="#" class="pp_arrow_previous">Previous</a>             <p class="currentTextHolder">0/0</p>             <a href="#" class="pp_arrow_next">Next</a>            </div>           </div>          </div>         </div>        </div>        </div>       </div>       <div class="pp_bottom">        <div class="pp_left"></div>        <div class="pp_middle"></div>        <div class="pp_right"></div>       </div>      </div>      <div class="pp_overlay"></div>',
gallery_markup:'<div class="pp_gallery">         <a href="#" class="pp_arrow_previous">Previous</a>         <ul>          {gallery}         </ul>         <a href="#" class="pp_arrow_next">Next</a>        </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
inline_markup:'<div class="pp_inline clearfix">{content}</div>',custom_markup:""},f),o=this,u=!1,s,v,q,l,z,B,A=c(window).height(),x=c(window).width(),C;doresize=!0;scroll_pos=p();c(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){m();A=c(window).height();x=c(window).width();typeof $pp_overlay!="undefined"&&$pp_overlay.height(c(document).height()).width(x)});f.keyboard_shortcuts&&c(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if(typeof $pp_pic_holder!=
"undefined"&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:c.prettyPhoto.changePage("previous");e.preventDefault();break;case 39:c.prettyPhoto.changePage("next");e.preventDefault();break;case 27:settings.modal||c.prettyPhoto.close(),e.preventDefault()}});c.prettyPhoto.initialize=function(){settings=f;if(c.browser.msie&&parseInt(c.browser.version)==6)settings.theme="light_square";theRel=c(this).attr("rel");galleryRegExp=/\[(?:.*)\]/;pp_images=(isSet=galleryRegExp.exec(theRel)?!0:!1)?jQuery.map(o,
function(e){if(c(e).attr("rel").indexOf(theRel)!=-1)return c(e).attr("href")}):c.makeArray(c(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(e){if(c(e).attr("rel").indexOf(theRel)!=-1)return c(e).find("img").attr("alt")?c(e).find("img").attr("alt"):""}):c.makeArray(c(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(e){if(c(e).attr("rel").indexOf(theRel)!=-1)return c(e).attr("title")?c(e).attr("title"):""}):c.makeArray(c(this).attr("title"));r(this);settings.allow_resize&&
c(window).bind("scroll.prettyphoto",function(){m()});set_position=jQuery.inArray(c(this).attr("href"),pp_images);c.prettyPhoto.open();return!1};c.prettyPhoto.open=function(i,k,l){if(typeof settings=="undefined"){settings=f;if(c.browser.msie&&c.browser.version==6)settings.theme="light_square";r(i.target);pp_images=c.makeArray(i);pp_titles=k?c.makeArray(k):c.makeArray("");pp_descriptions=l?c.makeArray(l):c.makeArray("");isSet=pp_images.length>1?!0:!1;set_position=0}c.browser.msie&&c.browser.version==
6&&c("select").css("visibility","hidden");settings.hideflash&&c("object,embed").css("visibility","hidden");h(c(pp_images).size());c(".pp_loaderIcon").show();$ppt.is(":hidden")&&$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+c(pp_images).size());$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]));settings.show_title&&
pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;");movie_width=parseFloat(e("width",pp_images[set_position]))?e("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(e("height",pp_images[set_position]))?e("height",pp_images[set_position]):settings.default_height.toString();movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(c(window).height()*parseFloat(movie_height)/100-
150),u=!0);movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(c(window).width()*parseFloat(movie_width)/100-150),u=!0);$pp_pic_holder.fadeIn(function(){imgPreloader="";switch(n(pp_images[set_position])){case "image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<c(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,
pp_images[set_position]);imgPreloader.onload=function(){s=j(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");c.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case "youtube":s=j(movie_width,movie_height);movie="http://www.youtube.com/v/"+e("v",pp_images[set_position]);settings.autoplay&&(movie+="&autoplay=1");toInject=settings.flash_markup.replace(/{width}/g,s.width).replace(/{height}/g,
s.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case "vimeo":s=j(movie_width,movie_height);movie_id=pp_images[set_position];movie="http://player.vimeo.com/video/"+movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/)[2]+"?title=0&amp;byline=0&amp;portrait=0";settings.autoplay&&(movie+="&autoplay=1;");vimeo_width=s.width+"/embed/?moog_width="+s.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,s.height).replace(/{path}/g,movie);break;
case "quicktime":s=j(movie_width,movie_height);s.height+=15;s.contentHeight+=15;s.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,s.width).replace(/{height}/g,s.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case "flash":s=j(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);
filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,s.width).replace(/{height}/g,s.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case "iframe":s=j(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,s.width).replace(/{height}/g,s.height).replace(/{path}/g,
frame_url);break;case "custom":s=j(movie_width,movie_height);toInject=settings.custom_markup;break;case "inline":myClone=c(pp_images[set_position]).clone().css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(c("body")).show(),doresize=!1,s=j(c(myClone).width(),c(myClone).height()),doresize=!0,c(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,c(pp_images[set_position]).html())}if(!imgPreloader)$pp_pic_holder.find("#pp_full_res")[0].innerHTML=
toInject,g()});return!1};c.prettyPhoto.changePage=function(e){currentGalleryPage=0;if(e=="previous"){if(set_position--,set_position<0){set_position=0;return}}else e=="next"?(set_position++,set_position>c(pp_images).size()-1&&(set_position=0)):set_position=e;doresize||(doresize=!0);c(".pp_contract").removeClass("pp_contract").addClass("pp_expand");i(function(){c.prettyPhoto.open()})};c.prettyPhoto.changeGalleryPage=function(e){e=="next"?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=
0)):e=="previous"?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=e;itemsToSlide=currentGalleryPage==totalPage?pp_images.length-totalPage*itemsPerPage:itemsPerPage;$pp_pic_holder.find(".pp_gallery li").each(function(e){c(this).animate({left:e*itemWidth-itemsToSlide*itemWidth*currentGalleryPage})})};c.prettyPhoto.startSlideshow=function(){typeof C=="undefined"?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){c.prettyPhoto.stopSlideshow();
return!1}),C=setInterval(c.prettyPhoto.startSlideshow,settings.slideshow)):c.prettyPhoto.changePage("next")};c.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){c.prettyPhoto.startSlideshow();return!1});clearInterval(C);C=void 0};c.prettyPhoto.close=function(){c.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");c("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,
function(){c(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){c.browser.msie&&c.browser.version==6&&c("select").css("visibility","visible");settings.hideflash&&c("object,embed").css("visibility","visible");c(this).remove();c(window).unbind("scroll");settings.callback();doresize=!0;v=!1;delete settings})};return this.unbind("click.prettyphoto").bind("click.prettyphoto",c.prettyPhoto.initialize)}})(jQuery);jQuery.fn.supersleight=function(c){c=jQuery.extend({imgs:!0,backgrounds:!0,shim:"x.gif",apply_positioning:!0},c);return this.each(function(){jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7&&parseInt(jQuery.browser.version,10)>4&&jQuery(this).find("*").andSelf().each(function(e,f){var g=jQuery(f);if(c.backgrounds&&g.css("background-image").match(/\.png/i)!==null){var i=g.css("background-image"),i=i.substring(5,i.length-2),h=g.css("background-repeat")=="no-repeat"?"crop":"scale",i={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
i+"', sizingMethod='"+h+"')","background-image":"url("+c.shim+")"};g.css(i)}c.imgs&&g.is("img[src$=png]")&&(i={width:g.width()+"px",height:g.height()+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g.attr("src")+"', sizingMethod='scale')"},g.css(i).attr("src",c.shim));c.apply_positioning&&g.is("a, input")&&(g.css("position")===""||g.css("position")=="static")&&g.css("position","relative")})})};var signin_window,pageTracker=_gat._getTracker("UA-20210380-2");function show_lightbox(c){$("#lightbox_content").load(c,function(){$("#lightbox_loading").hide();$("#lightbox_content").hide();$("#lightbox_content").removeClass("hidden");$("#lightbox_content").css("top",20);$("#lightbox_content").css("left",0);$("#lightbox_content").css("bottom",0);$("#lightbox_content").css("right",0);$("#lightbox_content").css("margin","auto");wizard_init();$("#lightbox_content").fadeIn(2E3)})}
function hide_lightbox(){$("#lightbox_overlay").fadeOut();$("#lightbox_content").fadeOut()}function check_login(){signin_window.closed?window.location=window.location:setTimeout("check_login()",500)}
function wizard_init(){$("#id_hair_texture").addClass("styled");$("#id_hair_length").addClass("styled");$("#id_hair_style").addClass("styled");$("#id_hair_goal").addClass("styled");$("a.fbsignin").click(facebook_login);Custom.init();pageTracker._trackPageview("/funnel_G1/step1.html");$("#closebutton").click(function(){hide_lightbox()});$("input[name=ethnicity]").parent().find("span.checkbox").click(function(){var c=$(this.nextSibling).val();$("input[name=ethnicity][value=8]").attr("checked")||($("input[name=ethnicity]").each(function(){$(this).val()!=
c&&$(this).attr("checked",!1)}),Custom.clear())});$(".step_1").click(function(){$("#page_1").show();$("#page_2").hide();$("#page_3").hide();return!1});$(".step_2").click(function(){if(!$("#wizard_form").valid())return!1;$("#page_2").show();$("#page_1").hide();$("#page_3").hide();return!1});$(".step_3").click(function(){if(!$("#wizard_form").valid())return!1;$("#page_3").show();$("#page_1").hide();$("#page_2").hide();return!1});$("#wizard_form").validate({errorLabelContainer:"#messageBox",wrapper:"li",
rules:{first_name:{required:!0},last_name:{required:!0},password1:{required:!0,minlength:5},password2:{required:!0,minlength:5,equalTo:"#password1"},email:{required:!0,email:!0,remote:"/email_validation_handler/"}},messages:{first_name:{required:"First name required."},last_name:{required:"Last name required."},password1:{required:"Password cannot be empty",minlength:"Password length should be more than 5 characters"},password2:{required:"You have to confirm the password...",minlength:"Password length should be more than 5 characters",
equalTo:"Passwords didn't match"},email:{required:"An email is required",email:"Please enter a valid email",remote:"A user with such email is already registerd"}},highlight:function(c){$(c).parent().parent().addClass("error")},unhighlight:function(c){$(c).parent().parent().removeClass("error")}});$("#id_profile_picture").change(function(){path=$(this).val().split("\\");$("#id_profile_picture_value").html(path[path.length-1])});$("#page_1 input.next").click(function(){if(!$("#wizard_form").valid())return!1;
$("#page_2").show();$("#page_1").hide();pageTracker._trackPageview("/funnel_G1/step2.html");return!1});$("#page_2 input.next").click(function(){$("#page_3").show();$("#page_2").hide();pageTracker._trackPageview("/funnel_G1/step3.html");return!1});$("#page_3 input.next").click(function(){return!0});$("input.quickregister").click(function(){if(!$("#wizard_form").valid())return!1;$("#wizard_form").submit();return!1})}
function facebook_login(){$("#lightbox_tmpl").tmpl({}).appendTo("body");$("#lightbox_overlay").show();var c=Math.max(0,($(window).width()-800)/2),e=Math.max(0,($(window).height()-500)/2),c="width=780,height=410,toolbar=0,scrollbars=0,status=0,resizable=0,location=0,menuBar=0,left="+c+",top="+e;console.log(facebook_auth_url);signin_window=window.open(facebook_auth_url,"House_of_Mikko",c);window.focus&&signin_window.focus();setTimeout("check_login()",500);return!1}
function prepare_search(){$("input.search-input").each(function(){var c=$(this).attr("initial");$(this).attr("value")||$(this).attr("value",c);$(this).focus(function(){var c=$(this).attr("initial");$(this).attr("value")==c&&$(this).attr("value","")});$(this).focusout(function(){var c=$(this).attr("initial");$(this).attr("value")||$(this).attr("value",c)})})}
$(document).ready(function(){$("a.fbsignin").click(facebook_login);$("a.register").click(function(){$("#lightbox_tmpl").tmpl({}).appendTo("body");$("#lightbox_overlay").fadeIn(500);show_lightbox("/registration/");return!1});$('a[href="#"]').click(function(){return!1});prepare_search()});navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)?document.write('<style type="text/css"><\!--#swf{display:none;}--\></style>'):document.write('<style type="text/css"><\!--#no-swf{display:none;}--\></style><script src="/static/scripts/swfobject_modified.js" type="text/javascript"><\/script>');if(!window.FB)window.FB={_apiKey:null,_session:null,_userStatus:"unknown",_logging:!0,_inCanvas:window.location.search.indexOf("fb_sig_in_iframe=1")>-1||window.location.search.indexOf("session=")>-1||window.location.search.indexOf("signed_request=")>-1||window.name.indexOf("iframe_canvas")>-1||window.name.indexOf("app_runner")>-1,_https:window.name.indexOf("_fb_https")>-1,_domain:{api:"https://api.facebook.com/",api_read:"https://api-read.facebook.com/",cdn:"http://static.ak.fbcdn.net/",https_cdn:"https://s-static.ak.fbcdn.net/",
graph:"https://graph.facebook.com/",staticfb:"http://static.ak.facebook.com/",https_staticfb:"https://s-static.ak.facebook.com/",www:"http://www.facebook.com/",https_www:"https://www.facebook.com/",m:"http://m.facebook.com/",https_m:"https://m.facebook.com/"},_locale:null,_localeIsRtl:!1,getDomain:function(c){switch(c){case "api":return FB._domain.api;case "api_read":return FB._domain.api_read;case "cdn":return window.location.protocol=="https:"||FB._https?FB._domain.https_cdn:FB._domain.cdn;case "cdn_foreign":return FB._domain.cdn_foreign;
case "https_cdn":return FB._domain.https_cdn;case "graph":return FB._domain.graph;case "staticfb":return document.referrer.indexOf("https:")==0||FB._https?FB._domain.https_staticfb:FB._domain.staticfb;case "https_staticfb":return FB._domain.https_staticfb;case "www":return window.location.protocol=="https:"||FB._https?FB._domain.https_www:FB._domain.www;case "https_www":return FB._domain.https_www;case "m":return window.location.protocol=="https:"||FB._https?FB._domain.https_m:FB._domain.m;case "https_m":return FB._domain.https_m}},
copy:function(c,e,f,g){for(var i in e)if(f||typeof c[i]==="undefined")c[i]=g?g(e[i]):e[i];return c},create:function(c,e){for(var f=window.FB,g=c?c.split("."):[],i=g.length,h=0;h<i;h++){var j=g[h],k=f[j];k||(k=e&&h+1==i?e:{},f[j]=k);f=k}return f},provide:function(c,e,f){return FB.copy(typeof c=="string"?FB.create(c):c,e,f)},guid:function(){return"f"+(Math.random()*1073741824).toString(16).replace(".","")},log:function(c){FB._logging&&(window.Debug&&window.Debug.writeln?window.Debug.writeln(c):window.console&&
window.console.log(c));FB.Event&&FB.Event.fire("fb.log",c)},$:function(c){return document.getElementById(c)}};
FB.provide("Array",{indexOf:function(c,e){if(c.indexOf)return c.indexOf(e);var f=c.length;if(f)for(var g=0;g<f;g++)if(c[g]===e)return g;return-1},merge:function(c,e){for(var f=0;f<e.length;f++)FB.Array.indexOf(c,e[f])<0&&c.push(e[f]);return c},filter:function(c,e){for(var f=[],g=0;g<c.length;g++)e(c[g])&&f.push(c[g]);return f},keys:function(c,e){var f=[],g;for(g in c)(e||c.hasOwnProperty(g))&&f.push(g);return f},map:function(c,e){for(var f=[],g=0;g<c.length;g++)f.push(e(c[g]));return f},forEach:function(c,
e,f){if(c)if(Object.prototype.toString.apply(c)==="[object Array]"||!(c instanceof Function)&&typeof c.length=="number")if(c.forEach)c.forEach(e);else for(var f=0,g=c.length;f<g;f++)e(c[f],f,c);else for(g in c)(f||c.hasOwnProperty(g))&&e(c[g],g,c)}});
FB.provide("QS",{encode:function(c,e,f){var e=e===void 0?"&":e,f=f===!1?function(c){return c}:encodeURIComponent,g=[];FB.Array.forEach(c,function(c,e){c!==null&&typeof c!="undefined"&&g.push(f(e)+"="+f(c))});g.sort();return g.join(e)},decode:function(c){var e=decodeURIComponent,f={},c=c.split("&"),g,i;for(g=0;g<c.length;g++)(i=c[g].split("=",2))&&i[0]&&(f[e(i[0])]=e(i[1]||""));return f}});
FB.provide("Content",{_root:null,_hiddenRoot:null,_callbacks:{},append:function(c,e){if(!e)if(FB.Content._root)e=FB.Content._root;else if(FB.Content._root=e=FB.$("fb-root"))e.className+=" fb_reset";else{FB.log('The "fb-root" div has not been created.');return}if(typeof c=="string"){var f=document.createElement("div");e.appendChild(f).innerHTML=c;return f}else return e.appendChild(c)},appendHidden:function(c){if(!FB.Content._hiddenRoot){var e=document.createElement("div"),f=e.style;f.position="absolute";
f.top="-10000px";f.width=f.height=0;FB.Content._hiddenRoot=FB.Content.append(e)}return FB.Content.append(c,FB.Content._hiddenRoot)},insertIframe:function(c){c.id=c.id||FB.guid();c.name=c.name||FB.guid();var e=FB.guid(),f=!1,g=!1;FB.Content._callbacks[e]=function(){f&&!g&&(g=!0,c.onload&&c.onload(c.root.firstChild))};if(document.attachEvent){var i='<iframe id="'+c.id+'" name="'+c.name+'"'+(c.title?' title="'+c.title+'"':"")+(c.className?' class="'+c.className+'"':"")+' style="border:none;'+(c.width?
"width:"+c.width+"px;":"")+(c.height?"height:"+c.height+"px;":"")+'" src="'+c.url+'" frameborder="0" scrolling="no" allowtransparency="true" onload="FB.Content._callbacks.'+e+'()"></iframe>';c.root.innerHTML='<iframe src="javascript:false" frameborder="0" scrolling="no" style="height:1px"></iframe>';f=!0;window.setTimeout(function(){c.root.innerHTML=i;c.onInsert&&c.onInsert(c.root.firstChild)},0)}else{var h=document.createElement("iframe");h.id=c.id;h.name=c.name;h.onload=FB.Content._callbacks[e];
h.scrolling="no";h.style.border="none";h.style.overflow="hidden";if(c.title)h.title=c.title;if(c.className)h.className=c.className;if(c.height)h.style.height=c.height+"px";if(c.width)h.style.width=c.width+"px";c.root.appendChild(h);f=!0;h.src=c.url;c.onInsert&&c.onInsert(h)}},submitToTarget:function(c,e){var f=document.createElement("form");f.action=c.url;f.target=c.target;f.method=e?"GET":"POST";FB.Content.appendHidden(f);FB.Array.forEach(c.params,function(c,e){if(c!==null&&c!==void 0){var h=document.createElement("input");
h.name=e;h.value=c;f.appendChild(h)}});f.submit();f.parentNode.removeChild(f)}});
FB.provide("Flash",{_minVersions:[[9,0,159,0],[10,0,22,87]],_swfPath:"swf/XdComm.swf",_callbacks:[],_names:{},_unloadRegistered:!1,init:function(){if(!FB.Flash._init)FB.Flash._init=!0,window.FB_OnFlashXdCommReady=function(){FB.Flash._ready=!0;for(var c=0,e=FB.Flash._callbacks.length;c<e;c++)FB.Flash._callbacks[c]();FB.Flash._callbacks=[]},FB.Flash.embedSWF("XdComm",FB.getDomain("cdn_foreign")+FB.Flash._swfPath)},embedSWF:function(c,e,f){var g=!!document.attachEvent;FB.Content.appendHidden('<object type="application/x-shockwave-flash" id="'+
c+'" '+(f?'flashvars="'+f+'" ':"")+(g?'name="'+c+'" ':"")+(g?"":'data="'+e+'" ')+(g?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ':"")+'allowscriptaccess="always"><param name="movie" value="'+e+'"></param><param name="allowscriptaccess" value="always"></param></object>');if(FB.UA.ie()>=9){if(!FB.Flash._unloadRegistered)window.attachEvent("onunload",function(){FB.Array.forEach(FB.Flash._names,function(c,e){var f=document.getElementById(e);f&&f.removeNode(!0)})}),FB.Flash._unloadRegistered=
!0;FB.Flash._names[c]=!0}},hasMinVersion:function(){if(typeof FB.Flash._hasMinVersion==="undefined"){var c,e,f=[];try{c=(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(g){if(navigator.mimeTypes.length>0&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)c=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description}if(c){var i=c.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].split(",");c=0;for(e=i.length;c<e;c++)f.push(parseInt(i[c],
10))}FB.Flash._hasMinVersion=!1;c=0;e=FB.Flash._minVersions.length;a:for(;c<e;c++)if(i=FB.Flash._minVersions[c],i[0]==f[0])for(var h=1,j=i.length,k=f.length;h<j&&h<k;h++)if(f[h]<i[h]){FB.Flash._hasMinVersion=!1;continue a}else if(FB.Flash._hasMinVersion=!0,f[h]>i[h])break a}return FB.Flash._hasMinVersion},onReady:function(c){FB.Flash.init();FB.Flash._ready?window.setTimeout(c,0):FB.Flash._callbacks.push(c)}});if(!this.JSON)this.JSON={};
(function(){function c(c){return c<10?"0"+c:c}function e(c){i.lastIndex=0;return i.test(c)?'"'+c.replace(i,function(c){var e=k[c];return typeof e==="string"?e:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function f(c,g){var i,k,u,s,v=h,q,l=g[c];l&&typeof l==="object"&&typeof l.toJSON==="function"&&(l=l.toJSON(c));typeof n==="function"&&(l=n.call(g,c,l));switch(typeof l){case "string":return e(l);case "number":return isFinite(l)?String(l):"null";case "boolean":case "null":return String(l);
case "object":if(!l)return"null";h+=j;q=[];if(Object.prototype.toString.apply(l)==="[object Array]"){s=l.length;for(i=0;i<s;i+=1)q[i]=f(i,l)||"null";u=q.length===0?"[]":h?"[\n"+h+q.join(",\n"+h)+"\n"+v+"]":"["+q.join(",")+"]";h=v;return u}if(n&&typeof n==="object"){s=n.length;for(i=0;i<s;i+=1)k=n[i],typeof k==="string"&&(u=f(k,l))&&q.push(e(k)+(h?": ":":")+u)}else for(k in l)Object.hasOwnProperty.call(l,k)&&(u=f(k,l))&&q.push(e(k)+(h?": ":":")+u);u=q.length===0?"{}":h?"{\n"+h+q.join(",\n"+h)+"\n"+
v+"}":"{"+q.join(",")+"}";h=v;return u}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+c(this.getUTCMonth()+1)+"-"+c(this.getUTCDate())+"T"+c(this.getUTCHours())+":"+c(this.getUTCMinutes())+":"+c(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var g=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,j,k={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;if(typeof JSON.stringify!=="function")JSON.stringify=function(c,e,g){var i;j=h="";if(typeof g==="number")for(i=0;i<g;i+=1)j+=" ";else typeof g==="string"&&(j=g);if((n=e)&&typeof e!=="function"&&(typeof e!=="object"||typeof e.length!=="number"))throw Error("JSON.stringify");return f("",
{"":c})};if(typeof JSON.parse!=="function")JSON.parse=function(c,e){function f(c,g){var h,i,j=c[g];if(j&&typeof j==="object")for(h in j)Object.hasOwnProperty.call(j,h)&&(i=f(j,h),i!==void 0?j[h]=i:delete j[h]);return e.call(c,g,j)}var h;g.lastIndex=0;g.test(c)&&(c=c.replace(g,function(c){return"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return h=eval("("+c+")"),typeof e==="function"?f({"":h},""):h;throw new SyntaxError("JSON.parse");}})();FB.provide("JSON",{stringify:function(c){return window.Prototype&&Object.toJSON?Object.toJSON(c):JSON.stringify(c)},parse:function(c){return JSON.parse(c)},flatten:function(c){var e={},f;for(f in c)if(c.hasOwnProperty(f)){var g=c[f];null===g||void 0===g||(e[f]=typeof g=="string"?g:FB.JSON.stringify(g))}return e}});
FB.provide("",{api:function(){typeof arguments[0]==="string"?FB.ApiServer.graph.apply(FB.ApiServer,arguments):FB.ApiServer.rest.apply(FB.ApiServer,arguments)}});
FB.provide("ApiServer",{METHODS:["get","post","delete","put"],_callbacks:{},_readOnlyCalls:{fql_query:!0,fql_multiquery:!0,friends_get:!0,notifications_get:!0,stream_get:!0,users_getinfo:!0},graph:function(){for(var c=Array.prototype.slice.call(arguments),e=c.shift(),f=c.shift(),g,i,h;f;){var j=typeof f;if(j==="string"&&!g)g=f.toLowerCase();else if(j==="function"&&!h)h=f;else if(j==="object"&&!i)i=f;else{FB.log("Invalid argument passed to FB.api(): "+f);return}f=c.shift()}g=g||"get";i=i||{};e[0]===
"/"&&(e=e.substr(1));FB.Array.indexOf(FB.ApiServer.METHODS,g)<0?FB.log("Invalid method passed to FB.api(): "+g):FB.ApiServer.oauthRequest("graph",e,g,i,h)},rest:function(c,e){var f=c.method.toLowerCase().replace(".","_");if(FB.Auth&&f==="auth_revokeauthorization")var g=e,e=function(c){c===!0&&(FB._oauth?FB.Auth.setAuthResponse(null,"not_authorized"):FB.Auth.setSession(null,"notConnected"));g&&g(c)};c.format="json-strings";c.api_key=FB._apiKey;FB.ApiServer.oauthRequest(FB.ApiServer._readOnlyCalls[f]?
"api_read":"api","restserver.php","get",c,e)},oauthRequest:function(c,e,f,g,i){if(FB.getAccessToken())g.access_token=FB.getAccessToken();g.sdk="joey";g.pretty=0;var h=i,i=function(c){FB.Auth&&c&&FB._session&&FB._session.access_token==g.access_token&&(c.error_code==="190"||c.error&&(c.error==="invalid_token"||c.error.type==="OAuthException"))&&FB.getLoginStatus(null,!0);h&&h(c)};try{FB.ApiServer.jsonp(c,e,f,FB.JSON.flatten(g),i)}catch(j){if(FB.Flash.hasMinVersion())FB.ApiServer.flash(c,e,f,FB.JSON.flatten(g),
i);else throw Error("Flash is required for this API call.");}},jsonp:function(c,e,f,g,i){var h=FB.guid(),j=document.createElement("script");if(c==="graph"&&f!=="get")g.method=f;g.callback="FB.ApiServer._callbacks."+h;c=FB.getDomain(c)+e+(e.indexOf("?")>-1?"&":"?")+FB.QS.encode(g);if(c.length>2E3)throw Error("JSONP only support a maximum of 2000 bytes of input.");FB.ApiServer._callbacks[h]=function(c){i&&i(c);delete FB.ApiServer._callbacks[h];j.parentNode.removeChild(j)};j.src=c;document.getElementsByTagName("head")[0].appendChild(j)},
flash:function(c,e,f,g,i){if(!window.FB_OnXdHttpResult)window.FB_OnXdHttpResult=function(c,e){FB.ApiServer._callbacks[c](decodeURIComponent(e))};FB.Flash.onReady(function(){var h=FB.getDomain(c)+e,j=FB.QS.encode(g);if(f==="get")if(h.length+j.length>2E3){if(c==="graph")g.method="get";f="post";j=FB.QS.encode(g)}else h+=(h.indexOf("?")>-1?"&":"?")+j,j="";else if(f!=="post"){if(c==="graph")g.method=f;f="post";j=FB.QS.encode(g)}var k=document.XdComm.sendXdHttpRequest(f.toUpperCase(),h,j,null);FB.ApiServer._callbacks[k]=
function(c){i&&i(FB.JSON.parse(c));delete FB.ApiServer._callbacks[k]}})}});
FB.provide("EventProvider",{subscribers:function(){if(!this._subscribersMap)this._subscribersMap={};return this._subscribersMap},subscribe:function(c,e){var f=this.subscribers();f[c]?f[c].push(e):f[c]=[e]},unsubscribe:function(c,e){var f=this.subscribers()[c];FB.Array.forEach(f,function(c,i){c==e&&(f[i]=null)})},monitor:function(c,e){if(!e()){var f=this,g=function(){e.apply(e,arguments)&&f.unsubscribe(c,g)};this.subscribe(c,g)}},clear:function(c){delete this.subscribers()[c]},fire:function(){var c=
Array.prototype.slice.call(arguments),e=c.shift();FB.Array.forEach(this.subscribers()[e],function(e){e&&e.apply(this,c)})},listen:function(c,e,f){c.addEventListener?c.addEventListener(e,f,!1):c.attachEvent&&c.attachEvent(e,f)},unlisten:function(c,e,f){c.removeEventListener?c.removeEventListener(e,f,!1):c.detachEvent&&c.detachEvent(e,f)}});FB.provide("Event",FB.EventProvider);
FB.provide("XD",{_origin:null,_transport:null,_callbacks:{},_forever:{},_xdProxyUrl:"connect/xd_proxy.php",_openerTransport:null,_openerOrigin:null,_nonOpenerOrigin:null,init:function(c){if(!FB.XD._origin){var e=window.location.protocol+"//"+window.location.host+"/"+FB.guid();if(window.addEventListener&&!window.attachEvent&&window.postMessage)FB.XD._origin=e,FB.XD.PostMessage.init(),FB.XD._transport="postmessage";else if(!c&&FB.Flash.hasMinVersion())if(document.getElementById("fb-root")){c=document.domain;
if(c=="facebook.com")c=window.location.host;FB.XD._origin=window.location.protocol+"//"+c+"/"+FB.guid();FB.XD.Flash.init();FB.XD._transport="flash"}else FB.log&&FB.log("missing fb-root, defaulting to fragment-based xdcomm"),FB.XD._transport="fragment",FB.XD.Fragment._channelUrl=c||window.location.toString();else FB.XD._transport="fragment",FB.XD.Fragment._channelUrl=c||window.location.toString();c=!!window.attachEvent;if(FB.XD._transport!="postmessage"&&c&&window.postMessage)FB.XD._openerTransport=
FB.XD._transport,FB.XD._openerOrigin=FB.XD._origin,FB.XD._nonOpenerOrigin=e}},resolveRelation:function(c){for(var e,f,g=c.split("."),i=window,h=0,j=g.length;h<j;h++)if(e=g[h],e==="opener"||e==="parent"||e==="top")i=i[e];else if(f=/^frames\[['"]?([a-zA-Z0-9-_]+)['"]?\]$/.exec(e))i=i.frames[f[1]];else throw new SyntaxError("Malformed id to resolve: "+c+", pt: "+e);return i},handler:function(c,e,f,g,i){if(window.location.toString().indexOf(FB.XD.Fragment._magic)>0)return"javascript:false;//";i=FB.getDomain((i?
"https_":"")+"cdn")+FB.XD._xdProxyUrl+"#";g=g||FB.guid();e=e||"opener";if(FB.XD._openerTransport)e=="opener"?(FB.XD._transport=FB.XD._openerTransport,FB.XD._origin=FB.XD._openerOrigin):(FB.XD.PostMessage.init(),FB.XD._transport="postmessage",FB.XD._origin=FB.XD._nonOpenerOrigin);if(FB.XD._transport=="fragment"){var i=FB.XD.Fragment._channelUrl,h=i.indexOf("#");h>0&&(i=i.substr(0,h));i+=(i.indexOf("?")<0?"?":"&")+FB.XD.Fragment._magic+"#?=&"}f&&(FB.XD._forever[g]=!0);FB.XD._callbacks[g]=c;return i+
FB.QS.encode({cb:g,origin:FB.XD._origin,relation:e,transport:FB.XD._transport})},recv:function(c){if(typeof c=="string")try{c=FB.JSON.parse(c)}catch(e){c=FB.QS.decode(c)}var f=FB.XD._callbacks[c.cb];FB.XD._forever[c.cb]||delete FB.XD._callbacks[c.cb];f&&f(c)},PostMessage:{_isInitialized:!1,init:function(){if(!FB.XD.PostMessage._isInitialized){var c=FB.XD.PostMessage.onMessage;window.addEventListener?window.addEventListener("message",c,!1):window.attachEvent("onmessage",c);FB.XD.PostMessage._isInitialized=
!0}},onMessage:function(c){FB.XD.recv(c.data)}},WebView:{onMessage:function(c,e,f){FB.XD.recv(f)}},Flash:{init:function(){FB.Flash.onReady(function(){document.XdComm.postMessage_init("FB.XD.Flash.onMessage",FB.XD._openerOrigin?FB.XD._openerOrigin:FB.XD._origin)})},onMessage:function(c){FB.XD.recv(decodeURIComponent(c))}},Fragment:{_magic:"fb_xd_fragment",checkAndDispatch:function(){var c=window.location.toString(),e=c.substr(c.indexOf("#")+1);if(c.indexOf(FB.XD.Fragment._magic)>0)FB.init=FB.getLoginStatus=
FB.api=function(){},document.documentElement.style.display="none",FB.XD.resolveRelation(FB.QS.decode(e).relation).FB.XD.recv(e)}}});FB.XD.Fragment.checkAndDispatch();
FB.provide("UA",{ie:function(){return FB.UA._populate()||this._ie},firefox:function(){return FB.UA._populate()||this._firefox},opera:function(){return FB.UA._populate()||this._opera},safari:function(){return FB.UA._populate()||this._safari},chrome:function(){return FB.UA._populate()||this._chrome},windows:function(){return FB.UA._populate()||this._windows},osx:function(){return FB.UA._populate()||this._osx},linux:function(){return FB.UA._populate()||this._linux},ios:function(){return FB.UA._populate()||
this._ios},mobile:function(){return!1},android:function(){return FB.UA._populate()||this._android},nativeApp:function(){return!1},_populated:!1,_populate:function(){if(!FB.UA._populated){FB.UA._populated=!0;var c=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(navigator.userAgent),e=/(Mac OS X)|(Windows)|(Linux)/.exec(navigator.userAgent),f=/\b(iPhone|iP[ao]d)/.exec(navigator.userAgent);FB.UA._android=
navigator.userAgent.match(/Android/i);FB.UA._mobile=f||FB.UA._android||navigator.userAgent.match(/Mobile/i);if(c){FB.UA._ie=c[1]?parseFloat(c[1]):NaN;if(FB.UA._ie>=8&&!window.HTMLCollection)FB.UA._ie=7;FB.UA._firefox=c[2]?parseFloat(c[2]):NaN;FB.UA._opera=c[3]?parseFloat(c[3]):NaN;FB.UA._safari=c[4]?parseFloat(c[4]):NaN;FB.UA._safari?(c=/(?:Chrome\/(\d+\.\d+))/.exec(navigator.userAgent),FB.UA._chrome=c&&c[1]?parseFloat(c[1]):NaN):FB.UA._chrome=NaN}else FB.UA._ie=FB.UA._firefox=FB.UA._opera=FB.UA._chrome=
FB.UA._safari=NaN;e?(FB.UA._osx=!!e[1],FB.UA._windows=!!e[2],FB.UA._linux=!!e[3]):FB.UA._osx=FB.UA._windows=FB.UA._linux=!1;FB.UA._ios=f}}});
FB.provide("Arbiter",{_canvasProxyUrl:"connect/canvas_proxy.php",inform:function(c,e,f,g){if(FB.Canvas.isTabIframe()||!FB._inCanvas&&FB.UA.mobile()&&window.postMessage){var i=FB.JSON.stringify({method:c,params:e});if(window.postMessage){FB.XD.resolveRelation(f||"parent").postMessage(i,"*");return}else try{window.opener.postMessage(i);return}catch(h){}}var c=FB.getDomain((g?"https_":"")+"staticfb")+FB.Arbiter._canvasProxyUrl+"#"+FB.QS.encode({method:c,params:FB.JSON.stringify(e||{}),relation:f}),j=
FB.Content.appendHidden("");FB.Content.insertIframe({url:c,root:j,width:1,height:1,onload:function(){setTimeout(function(){j.parentNode.removeChild(j)},10)}})}});
FB.provide("Canvas",{_timer:null,_lastSize:{},_pageInfo:{clientWidth:0,clientHeight:0,scrollLeft:0,scrollTop:0,offsetLeft:0,offsetTop:0},_pageInfoPollInterval:200,init:function(){var c=FB.Dom.getViewportInfo();FB.Canvas._pageInfo.clientWidth=c.width;FB.Canvas._pageInfo.clientHeight=c.height;window.name&&(c={channelUrl:FB.XD.handler(function(c){if(c.type=="pageInfo.update")FB.Canvas._pageInfo.clientWidth=c.clientWidth,FB.Canvas._pageInfo.clientHeight=c.clientHeight,FB.Canvas._pageInfo.scrollLeft=c.scrollLeft,
FB.Canvas._pageInfo.scrollTop=c.scrollTop,FB.Canvas._pageInfo.offsetLeft=c.offsetLeft,FB.Canvas._pageInfo.offsetTop=c.offsetTop,FB.Event.fire("canvas.pageInfoChange",FB.Canvas._pageInfo)},"top.frames["+window.name+"]",!0),frame:window.name,updateInterval:FB.Canvas._pageInfoPollInterval},FB.Arbiter.inform("pollPageInfo",c,"top"))},setSize:function(c){typeof c!="object"&&(c={});c=c||{};if(c.width==null||c.height==null)c=FB.copy(c,FB.Canvas._computeContentSize());c=FB.copy(c,{frame:window.name||"iframe_canvas"});
if(FB.Canvas._lastSize[c.frame]){var e=FB.Canvas._lastSize[c.frame].height;if(FB.Canvas._lastSize[c.frame].width==c.width&&c.height<=e&&Math.abs(e-c.height)<=16)return!1}FB.Canvas._lastSize[c.frame]=c;FB.Arbiter.inform("setSize",c);return!0},scrollTo:function(c,e){FB.Arbiter.inform("scrollTo",{frame:window.name||"iframe_canvas",x:c,y:e})},setAutoResize:function(c,e){e===void 0&&typeof c=="number"&&(e=c,c=!0);if(c===void 0||c){if(FB.Canvas._timer===null)FB.Canvas._timer=window.setInterval(FB.Canvas.setSize,
e||100);FB.Canvas.setSize()}else if(FB.Canvas._timer!==null)window.clearInterval(FB.Canvas._timer),FB.Canvas._timer=null},isTabIframe:function(){return window.name.indexOf("app_runner_")===0},getPageInfo:function(){return FB.Canvas._pageInfo},setDoneLoading:function(c){FB.Canvas._passAppTtiMessage(c,"RecordIframeAppTti")},stopTimer:function(c){FB.Canvas._passAppTtiMessage(c,"StopIframeAppTtiTimer")},startTimer:function(){FB.Canvas._passAppTtiMessage(null,"StartIframeAppTtiTimer")},_passAppTtiMessage:function(c,
e){var f=null;c&&(f=FB.XD.handler(c,"top.frames["+window.name+"]",!1));FB.Arbiter.inform(e,{frame:window.name||"iframe_canvas",time:(new Date).getTime(),appId:parseInt(FB._apiKey,10),channelUrl:f})},_computeContentSize:function(){var c=document.body,e=document.documentElement,f=0,g=Math.max(Math.max(c.offsetHeight,c.scrollHeight)+c.offsetTop,Math.max(e.offsetHeight,e.scrollHeight)+e.offsetTop);c.offsetWidth<c.scrollWidth?f=c.scrollWidth+c.offsetLeft:FB.Array.forEach(c.childNodes,function(c){c=c.offsetWidth+
c.offsetLeft;c>f&&(f=c)});e.clientLeft>0&&(f+=e.clientLeft*2);e.clientTop>0&&(g+=e.clientTop*2);return{height:g,width:f}}});
FB.provide("Intl",{_punctCharClass:"[.!?\u3002\uff01\uff1f\u0964\u2026\u0eaf\u1801\u0e2f\uff0e]",_endsInPunct:function(c){if(typeof c!="string")return!1;return c.match(RegExp(FB.Intl._punctCharClass+"[)\"'\u00bb\u0f3b\u0f3d\u2019\u201d\u203a\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e\u301f\ufd3f\uff07\uff09\uff3ds]*$"))},_tx:function(c,e){if(e!==void 0)if(typeof e!="object")FB.log("The second arg to FB.Intl._tx() must be an Object for tx("+c+", ...)");else{var f,g;for(g in e)e.hasOwnProperty(g)&&
(f=FB.Intl._endsInPunct(e[g])?RegExp("{"+g+"}"+FB.Intl._punctCharClass+"*","g"):RegExp("{"+g+"}","g"),c=c.replace(f,e[g]))}return c},tx:function(c,e){if(!FB.Intl._stringTable)return null;return FBIntern.Intl._tx(FB.Intl._stringTable[c],e)}});
FB.provide("String",{trim:function(c){return c.replace(/^\s*|\s*$/g,"")},format:function(c){if(!FB.String.format._formatRE)FB.String.format._formatRE=/(\{[^\}^\{]+\})/g;var e=arguments;return c.replace(FB.String.format._formatRE,function(c,g){var i=parseInt(g.substr(1),10),i=e[i+1];if(i===null||i===void 0)return"";return i.toString()})},escapeHTML:function(c){var e=document.createElement("div");e.appendChild(document.createTextNode(c));return e.innerHTML.replace(/"/g,"&quot;").replace(/'/g,"&#39;")},
quote:function(c){var e=/["\\\x00-\x1f\x7f-\x9f]/g,f={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.test(c)?'"'+c.replace(e,function(c){var e=f[c];if(e)return e;e=c.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"':'"'+c+'"'}});
FB.provide("Dom",{containsCss:function(c,e){return(" "+c.className+" ").indexOf(" "+e+" ")>=0},addCss:function(c,e){if(!FB.Dom.containsCss(c,e))c.className=c.className+" "+e},removeCss:function(c,e){if(FB.Dom.containsCss(c,e))c.className=c.className.replace(e,""),FB.Dom.removeCss(c,e)},getStyle:function(c,e){var f=!1;if(c.currentStyle)FB.Array.forEach(e.match(/\-([a-z])/g),function(c){e=e.replace(c,c.substr(1,1).toUpperCase())}),f=c.currentStyle[e];else if(FB.Array.forEach(e.match(/[A-Z]/g),function(c){e=
e.replace(c,"-"+c.toLowerCase())}),window.getComputedStyle&&(f=document.defaultView.getComputedStyle(c,null).getPropertyValue(e),e=="background-position-y"||e=="background-position-x"))if(f=="top"||f=="left")f="0px";if(e=="opacity"){if(c.filters&&c.filters.alpha)return f;return f*100}return f},setStyle:function(c,e,f){var g=c.style;if(e=="opacity"){if(f>=100&&(f=99.999),f<0&&(f=0),g.opacity=f/100,g.MozOpacity=f/100,g.KhtmlOpacity=f/100,c.filters)c.filters.alpha==void 0?c.filter="alpha(opacity="+f+
")":c.filters.alpha.opacity=f}else g[e]=f},addScript:function(c){var e=document.createElement("script");e.type="text/javascript";e.src=c;return document.getElementsByTagName("head")[0].appendChild(e)},addCssRules:function(c,e){if(!FB.Dom._cssRules)FB.Dom._cssRules={};var f=!0;FB.Array.forEach(e,function(c){c in FB.Dom._cssRules||(f=!1,FB.Dom._cssRules[c]=!0)});if(!f)if(FB.UA.ie())try{document.createStyleSheet().cssText=c}catch(g){document.styleSheets[0]&&(document.styleSheets[0].cssText+=c)}else{var i=
document.createElement("style");i.type="text/css";i.textContent=c;document.getElementsByTagName("head")[0].appendChild(i)}},getViewportInfo:function(){var c=document.documentElement&&document.compatMode=="CSS1Compat"?document.documentElement:document.body;return{scrollTop:c.scrollTop,scrollLeft:c.scrollLeft,width:self.innerWidth?self.innerWidth:c.clientWidth,height:self.innerHeight?self.innerHeight:c.clientHeight}},ready:function(c){FB.Dom._isReady?c&&c():FB.Event.subscribe("dom.ready",c)}});
(function(){function c(){FB.Dom._isReady=!0;FB.Event.fire("dom.ready");FB.Event.clear("dom.ready")}if(FB.Dom._isReady||document.readyState=="complete")return c();document.addEventListener?document.addEventListener("DOMContentLoaded",c,!1):document.attachEvent&&document.attachEvent("onreadystatechange",c);FB.UA.ie()&&window===top&&function(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(arguments.callee,0);return}c()}();var e=window.onload;window.onload=function(){c();e&&(typeof e==
"string"?eval(e):e())}})();
FB.provide("",{bind:function(){var c=Array.prototype.slice.call(arguments),e=c.shift(),f=c.shift();return function(){return e.apply(f,c.concat(Array.prototype.slice.call(arguments)))}},Class:function(c,e,f){if(FB.CLASSES[c])return FB.CLASSES[c];e=e||function(){};e.prototype=f;e.prototype.bind=function(c){return FB.bind(c,this)};e.prototype.constructor=e;FB.create(c,e);return FB.CLASSES[c]=e},subclass:function(c,e,f,g){if(FB.CLASSES[c])return FB.CLASSES[c];var i=FB.create(e);FB.copy(g,i.prototype);
g._base=i;g._callBase=function(c){var e=Array.prototype.slice.call(arguments,1);return i.prototype[c].apply(this,e)};return FB.Class(c,f?f:function(){i.apply&&i.apply(this,arguments)},g)},CLASSES:{}});FB.provide("Type",{isType:function(c,e){for(;c;)if(c.constructor===e||c===e)return!0;else c=c._base;return!1}});FB.Class("Obj",null,FB.copy({setProperty:function(c,e){FB.JSON.stringify(e)!=FB.JSON.stringify(this[c])&&(this[c]=e,this.fire(c,e))}},FB.EventProvider));
FB.subclass("Dialog","Obj",function(c){this.id=c;FB.Dialog._dialogs[c]=this},{});
FB.provide("Dialog",{_dialogs:{},_loaderEl:null,_stack:[],_active:null,get:function(c){return FB.Dialog._dialogs[c]},_findRoot:function(c){for(;c;){if(FB.Dom.containsCss(c,"fb_dialog"))return c;c=c.parentNode}},_showLoader:function(c,e){if(!FB.Dialog._loaderEl)e=parseInt(e,10),FB.Dialog._loaderEl=FB.Dialog._findRoot(FB.Dialog.create({content:'<div class="dialog_title">  <a id="fb_dialog_loader_close">    <div class="fb_dialog_close_icon"></div>  </a>  <span>Facebook</span>  <div style="clear:both;"></div></div><div class="dialog_content"></div><div class="dialog_footer"></div>',width:e?
e:460}));c||(c=function(){});var f=FB.$("fb_dialog_loader_close");FB.Dom.removeCss(f,"fb_hidden");f.onclick=function(){FB.Dialog._hideLoader();c()};FB.Dialog._makeActive(FB.Dialog._loaderEl)},_hideLoader:function(){if(FB.Dialog._loaderEl&&FB.Dialog._loaderEl==FB.Dialog._active)FB.Dialog._loaderEl.style.top="-10000px"},_makeActive:function(c){FB.Dialog._lowerActive();FB.Dialog._active=c;FB.Dialog._centerActive(FB.Canvas.getPageInfo())},_lowerActive:function(){if(FB.Dialog._active)FB.Dialog._active.style.top=
"-10000px",FB.Dialog._active=null},_removeStacked:function(c){FB.Dialog._stack=FB.Array.filter(FB.Dialog._stack,function(e){return e!=c})},_centerActive:function(c){var e=FB.Dialog._active;if(e){var f=FB.Dom.getViewportInfo(),g=parseInt(e.offsetWidth,10),i=parseInt(e.offsetHeight,10),g=f.scrollLeft+(f.width-g)/2,h=(f.height-i)/2.5;g<h&&(h=g);var j=f.height-i-h,c=c.scrollTop-c.offsetTop+(c.clientHeight-i)/2;c<h?c=h:c>j&&(c=j);c+=f.scrollTop;e.style.left=(g>0?g:0)+"px";e.style.top=(c>0?c:0)+"px"}},
create:function(c){c=c||{};c.loader&&FB.Dialog._showLoader(c.onClose,c.loaderWidth);var e=document.createElement("div"),f=document.createElement("div"),g="fb_dialog";if(c.closeIcon&&c.onClose){var i=document.createElement("a");i.className="fb_dialog_close_icon";i.onclick=c.onClose;e.appendChild(i)}FB.UA.ie()?(g+=" fb_dialog_legacy",FB.Array.forEach(["vert_left","vert_right","horiz_top","horiz_bottom","top_left","top_right","bottom_left","bottom_right"],function(c){var f=document.createElement("span");
f.className="fb_dialog_"+c;e.appendChild(f)})):g+=FB.UA.mobile()?" fb_dialog_mobile":" fb_dialog_advanced";c.content&&FB.Content.append(c.content,f);e.className=g;g=parseInt(c.width,10);if(!isNaN(g))e.style.width=g+"px";f.className="fb_dialog_content";e.appendChild(f);FB.Content.append(e);c.visible&&FB.Dialog.show(e);return f},show:function(c){var e=FB.Dialog._findRoot(c);e&&(FB.Dialog._removeStacked(e),FB.Dialog._hideLoader(),FB.Dialog._makeActive(e),FB.Dialog._stack.push(e),"fbCallID"in c&&FB.Dialog.get(c.fbCallID).fire("iframe_show"))},
hide:function(c){FB.Dialog._findRoot(c)==FB.Dialog._active&&(FB.Dialog._lowerActive(),"fbCallID"in c&&FB.Dialog.get(c.fbCallID).fire("iframe_hide"))},remove:function(c){if(c=FB.Dialog._findRoot(c)){var e=FB.Dialog._active==c;FB.Dialog._removeStacked(c);FB.Dialog._hideLoader();e&&(FB.Dialog._stack.length>0?FB.Dialog.show(FB.Dialog._stack.pop()):FB.Dialog._lowerActive());window.setTimeout(function(){c.parentNode.removeChild(c)},3E3)}}});
FB.provide("",{ui:function(c,e){if(!c.method)return FB.log('"method" is a required parameter for FB.ui().'),null;if((c.method=="permissions.request"||c.method=="permissions.oauth")&&(c.display=="iframe"||c.display=="dialog")){var f;FB._oauth?(f=c.scope,f=f.split(/\s|,/g)):(f=c.perms,f=f.split(","));for(var g=0;g<f.length;g++){var i=FB.String.trim(f[g]);if(i&&!FB.initSitevars.iframePermissions[i]){c.display="popup";break}}}f=FB.UIServer.prepareCall(c,e);if(!f)return null;g=f.params.display;g==="dialog"?
g="iframe":g==="none"&&(g="hidden");g=FB.UIServer[g];if(!g)return FB.log('"display" must be one of "popup", "dialog", "iframe", "touch", "async", "hidden", or "none"'),null;g(f);return f.dialog}});
FB.provide("UIServer",{Methods:{},_active:{},_defaultCb:{},_resultToken:'"xxRESULTTOKENxx"',_forceHTTPS:!1,_resizeInitialized:!1,genericTransform:function(c){if(c.params.display=="dialog"||c.params.display=="iframe")c.params.display="iframe",c.params.channel=FB.UIServer._xdChannelHandler(c.id,"parent.parent");return c},prepareCall:function(c,e){var f=c.method.toLowerCase(),g=FB.copy({},FB.UIServer.Methods[f]),i=FB.guid(),h=g.noHttps!==!0&&(FB._https||f!=="auth.status"&&f!="login.status");FB.UIServer._forceHTTPS=
h;FB.copy(c,{api_key:FB._apiKey,app_id:FB._apiKey,locale:FB._locale,sdk:"joey",access_token:h&&FB.getAccessToken()||void 0});c.display=FB.UIServer.getDisplayMode(g,c);if(!g.url)g.url="dialog/"+f;f={cb:e,id:i,size:g.size||FB.UIServer.getDefaultSize(),url:FB.getDomain(h?"https_www":"www")+g.url,forceHTTPS:h,params:c,name:f,dialog:new FB.Dialog(i)};if(h=g.transform?g.transform:FB.UIServer.genericTransform)if(f=h(f),!f)return;g=(g.getXdRelation||FB.UIServer.getXdRelation)(f.params.display);if(!(f.id in
FB.UIServer._defaultCb)&&!("next"in f.params))f.params.next=FB.UIServer._xdResult(f.cb,f.id,g,!0);if(g==="parent")f.params.channel_url=FB.UIServer._xdChannelHandler(i,"parent.parent");return f=FB.UIServer.prepareParams(f)},prepareParams:function(c){var e=c.params.method;FB.Canvas.isTabIframe()||delete c.params.method;FB.TemplateUI&&FB.TemplateUI.supportsTemplate(e,c)?(FB.reportTemplates&&console.log("Using template for "+e+"."),FB.TemplateUI.useCachedUI(e,c)):(c.params=FB.JSON.flatten(c.params),e=
FB.QS.encode(c.params),FB.UIServer.urlTooLongForIE(c.url+e)?c.post=!0:e&&(c.url+="?"+e));return c},urlTooLongForIE:function(c){return c.length>2E3},getDisplayMode:function(c,e){if(e.display==="hidden"||e.display==="none")return e.display;if(FB.Canvas.isTabIframe()&&e.display!=="popup")return"async";if(FB.UA.mobile()||e.display==="touch")return"touch";if(!FB._session&&e.display=="dialog"&&!c.loggedOutIframe)return FB.log('"dialog" mode can only be used when the user is connected.'),"popup";if(c.connectDisplay&&
!FB._inCanvas)return c.connectDisplay;return e.display||(FB._session?"dialog":"popup")},getXdRelation:function(c){if(c==="popup"||c==="touch")return"opener";if(c==="dialog"||c==="iframe"||c==="hidden"||c==="none")return"parent";if(c==="async")return"parent.frames["+window.name+"]"},popup:function(c){var e=typeof window.screenX!="undefined"?window.screenX:window.screenLeft,f=typeof window.screenY!="undefined"?window.screenY:window.screenTop,g=typeof window.outerHeight!="undefined"?window.outerHeight:
document.documentElement.clientHeight-22,i=c.size.width,h=c.size.height,e=parseInt((e<0?window.screen.width+e:e)+((typeof window.outerWidth!="undefined"?window.outerWidth:document.documentElement.clientWidth)-i)/2,10),f=parseInt(f+(g-h)/2.5,10),i="width="+i+",height="+h+",left="+e+",top="+f+",scrollbars=1";if(c.name&&(c.name=="permissions.request"||c.name=="permissions.oauth"))i+=",location=1,toolbar=0";c.post?(FB.UIServer.setActiveNode(c,window.open("about:blank",c.id,i)),FB.Content.submitToTarget({url:c.url,
target:c.id,params:c.params})):FB.UIServer.setActiveNode(c,window.open(c.url,c.id,i));c.id in FB.UIServer._defaultCb&&FB.UIServer._popupMonitor()},setActiveNode:function(c,e){FB.UIServer._active[c.id]=e;if(c.params&&c.params.display=="iframe")e.fbCallID=c.id},hidden:function(c){c.className="FB_UI_Hidden";c.root=FB.Content.appendHidden("");FB.UIServer._insertIframe(c)},iframe:function(c){if(!c.root){c.className="FB_UI_Dialog";c.root=FB.Dialog.create({onClose:function(){FB.UIServer._triggerDefault(c.id)},
loader:!c.hideLoader,loaderWidth:c.size.width,closeIcon:!0});FB.Dom.addCss(c.root,"fb_dialog_iframe");var e=FB.Dialog._findRoot(c.root);FB.Dom.addCss(e,"loading");FB.UIServer._insertIframe(c)}},async:function(c){c.frame=window.name;delete c.url;delete c.size;FB.Arbiter.inform("showDialog",c)},getDefaultSize:function(){if(FB.UA.mobile())return{width:window.innerWidth,height:Math.max(window.innerHeight,window.innerWidth/window.innerHeight>1.2?screen.width:screen.height)};return{width:575,height:240}},
_insertIframe:function(c){FB.UIServer._active[c.id]=!1;var e=function(e){c.id in FB.UIServer._active&&FB.UIServer.setActiveNode(c,e)};c.post?FB.Content.insertIframe({url:"about:blank",root:c.root,className:c.className,width:c.size.width,height:c.size.height,onInsert:e,onload:function(e){FB.Content.submitToTarget({url:c.url,target:e.name,params:c.params})}}):FB.Content.insertIframe({url:c.url,root:c.root,className:c.className,width:c.size.width,height:c.size.height,name:c.frameName,onInsert:e})},_adaptToOrientation:function(c){if(FB.UA.mobile()&&
FB.UIServer._active[c])FB.UIServer._active[c].style.width=FB.UIServer.getDefaultSize().width+"px"},_handleFirstResizeMessage:function(c){FB.UA.mobile()&&window.addEventListener("onorientationchange"in window?"orientationchange":"resize",function(){FB.UIServer._adaptToOrientation(c)})},_handleResizeMessage:function(c,e){var f=FB.UIServer._active[c];if(e.height)f.style.height=e.height+"px";if(e.width)f.style.width=e.width+"px";if(!FB.UIServer._resizeInitialized)FB.UIServer._handleFirstResizeMessage(c),
FB.UIServer._resizeInitialized=!0;FB.Arbiter.inform("resize.ack",e||{},"parent.frames["+f.name+"]",!0);FB.Dialog.show(f)},_triggerDefault:function(c){FB.UIServer._xdRecv({frame:c},FB.UIServer._defaultCb[c]||function(){})},_popupMonitor:function(){var c,e;for(e in FB.UIServer._active)if(FB.UIServer._active.hasOwnProperty(e)&&e in FB.UIServer._defaultCb){var f=FB.UIServer._active[e];try{if(f.tagName)continue}catch(g){}try{f.closed?FB.UIServer._triggerDefault(e):c=!0}catch(i){}}if(c&&!FB.UIServer._popupInterval)FB.UIServer._popupInterval=
window.setInterval(FB.UIServer._popupMonitor,100);else if(!c&&FB.UIServer._popupInterval)window.clearInterval(FB.UIServer._popupInterval),FB.UIServer._popupInterval=null},_xdChannelHandler:function(c,e){var f=FB.UIServer._forceHTTPS&&FB.UA.ie()!==7;return FB.XD.handler(function(e){var f=FB.UIServer._active[c];f&&(e.type=="resize"?FB.UIServer._handleResizeMessage(c,e):e.type=="hide"?FB.Dialog.hide(f):e.type=="rendered"?(e=FB.Dialog._findRoot(f),FB.Dialog.show(e),FB.Dom.removeCss(e,"loading")):e.type==
"fireevent"&&FB.Event.fire(e.event))},e,!0,null,f)},_xdNextHandler:function(c,e,f,g){g&&(FB.UIServer._defaultCb[e]=c);return FB.XD.handler(function(e){FB.UIServer._xdRecv(e,c)},f)+"&frame="+e},_xdRecv:function(c,e){var f=FB.UIServer._active[c.frame];try{FB.Dom.containsCss(f,"FB_UI_Hidden")?window.setTimeout(function(){f.parentNode.parentNode.removeChild(f.parentNode)},3E3):FB.Dom.containsCss(f,"FB_UI_Dialog")&&(FB.Dialog.remove(f),FB.TemplateUI&&FB.UA.mobile()&&FB.TemplateUI.populateCache())}catch(g){}try{f.close&&
(f.close(),FB.UIServer._popupCount--)}catch(i){}delete FB.UIServer._active[c.frame];delete FB.UIServer._defaultCb[c.frame];e(c)},_xdResult:function(c,e,f,g){return FB.UIServer._xdNextHandler(function(e){c&&c(e.result&&e.result!=FB.UIServer._resultToken&&FB.JSON.parse(e.result))},e,f,g)+"&result="+encodeURIComponent(FB.UIServer._resultToken)}});
FB.provide("",{getLoginStatus:function(c,e){if(FB._apiKey){if(c)if(!e&&FB.Auth._loadState=="loaded"){FB._oauth?c({status:FB._userStatus,authResponse:FB._authResponse}):c({status:FB._userStatus,session:FB._session});return}else FB.Event.subscribe("FB.loginStatus",c);if(e||FB.Auth._loadState!="loading"){FB.Auth._loadState="loading";var f=function(c){FB.Auth._loadState="loaded";FB.Event.fire("FB.loginStatus",c);FB.Event.clear("FB.loginStatus")};FB.UA.mobile()&&window.postMessage&&window.localStorage?
FB.Auth.staticAuthCheck(f):FB._oauth?FB.ui({method:"login.status",display:"none"},f):FB.ui({method:"auth.status",display:"hidden"},f)}}else FB.log("FB.getLoginStatus() called before calling FB.init().")},getSession:function(){if(FB._oauth)throw Error("FB.getSession incompatible with OAuth2.");return FB._session},getAuthResponse:function(){if(!FB._oauth)throw Error("getAuthResponse called when OAuth2 support is disabled.  Please fix.");return FB._authResponse},getAccessToken:function(){return FB._oauth?
FB._authResponse&&FB._authResponse.accessToken||null:FB._session&&FB._session.access_token||null},getUserID:function(){return FB._oauth?FB._userID:FB._session&&FB._session.uid||0},login:function(c,e){if(FB._oauth){if(e&&e.perms)throw Error("OAuth2 specification states that 'perms' should now be called 'scope'.  Please update.");FB.ui(FB.copy({method:"permissions.oauth",display:"popup"},e||{}),c)}else FB.ui(FB.copy({method:"permissions.request",display:"popup"},e||{}),c)},logout:function(c){FB.ui({method:"auth.logout",
display:"hidden"},c)}});
FB.provide("Auth",{_callbacks:[],_xdStorePath:"xd_localstorage/",staticAuthCheck:function(c){var e=FB.getDomain("https_staticfb");FB.Content.insertIframe({root:FB.Content.appendHidden(""),className:"FB_UI_Hidden",url:e+FB.Auth._xdStorePath,onload:function(f){var f=frames[f.name],g=FB.guid(),i=!1,h=function(e){i||(i=!0,FB.Auth._staticAuthHandler(c,e))};FB.XD.handler(h,"parent",!0,g);setTimeout(h,500);f.postMessage(FB.JSON.stringify({method:"getItem",params:["LoginInfo_"+FB._apiKey,!0],returnCb:g}),
e)}})},_staticAuthHandler:function(c,e){if(e&&e.data&&e.data.status&&e.data.status=="connected"){var f;f=e.data.status;f=FB._oauth?FB.Auth.setAuthResponse(e.data.authResponse||null,f):FB.Auth.setSession(e.data.session||null,f);c&&c(f)}else FB._oauth?FB.ui({method:"login.status",display:"none"},c):FB.ui({method:"auth.status",display:"hidden"},c)},setSession:function(c,e){if(FB._oauth)throw Error("FB.Auth.setSession incompatible with OAuth2.");var f=!FB._session&&c,g=FB._session&&!c,i=FB._session&&
c&&FB._session.uid!=c.uid,h=f||g||FB._session&&c&&FB._session.access_token!=c.access_token,j=e!=FB._userStatus,k={session:c,status:e};FB._session=c;FB._userStatus=e;h&&FB.Cookie&&FB.Cookie.getEnabled()&&FB.Cookie.set(c);j&&FB.Event.fire("auth.statusChange",k);(g||i)&&FB.Event.fire("auth.logout",k);(f||i)&&FB.Event.fire("auth.login",k);h&&FB.Event.fire("auth.sessionChange",k);FB.Auth._refreshTimer&&(window.clearTimeout(FB.Auth._refreshTimer),delete FB.Auth._refreshTimer);if(FB.Auth._loadState&&c&&
c.expires)FB.Auth._refreshTimer=window.setTimeout(function(){FB.getLoginStatus(null,!0)},12E5);return k},setAuthResponse:function(c,e){if(!FB._oauth)throw Error("FB.Auth.setAuthResponse only compatible with OAuth2.");var f=!FB._authResponse&&c,g=FB._authResponse&&!c,i=FB._authResponse&&c&&FB._authResponse.userID!=c.userID,h=f||g||i,j=e!=FB._userStatus,k={authResponse:c,status:e};FB._authResponse=c;FB._userID=c&&c.userID||0;FB._userStatus=e;(g||i)&&FB.Event.fire("auth.logout",k);(f||i)&&FB.Event.fire("auth.login",
k);h&&FB.Event.fire("auth.authResponseChange",k);j&&FB.Event.fire("auth.statusChange",k);FB.Auth._refreshTimer&&(window.clearTimeout(FB.Auth._refreshTimer),delete FB.Auth._refreshTimer);if(FB.Auth._loadState&&c)FB.Auth._refreshTimer=window.setTimeout(function(){FB.getLoginStatus(null,!0)},12E5);return k},xdHandler:function(c,e,f,g,i,h){return FB.UIServer._xdNextHandler(FB.Auth.xdResponseWrapper(c,i,h),e,f,g)},xdResponseWrapper:function(c,e,f){return function(g){try{f=FB.JSON.parse(g.session)}catch(i){}f&&
(e="connected");if(g&&g.fb_https&&!FB._https)FB._https=!0;var h=FB.Auth.setSession(f||null,e);h.perms=g&&g.perms||null;if(g&&g.required_perms&&FB.UA.nativeApp()){var g=JSON.parse(g.required_perms),j=[];FB.Array.forEach(g,function(c){j=j.concat(c)});g=j.join(",");FB.login(c,{perms:g})}else c&&c(h)}},_getSessionOrigin:function(){return 1},xdNewHandler:function(c,e,f,g){if(!FB._oauth)throw Error("xdNewHandler should not be invoked unless OAuth2 is being used.");return FB.UIServer._xdNextHandler(FB.Auth.xdNewResponseWrapper(c,
g),e,f,!0)},xdNewResponseWrapper:function(c,e){if(!FB._oauth)throw Error("xdNewResponseWrapper should not be invoked unless OAuth2 is being used.");return function(f){if(f.access_token){var g=FB.Auth.parseSignedRequest(f.signed_request);e={accessToken:f.access_token,userID:g.user_id,expiresIn:parseInt(f.expires_in,10),signedRequest:f.signed_request};FB.Auth.setAuthResponse(e,"connected");FB.Cookie.getEnabled()&&(g=(new Date).getTime()+1E3*e.expiresIn,FB.Cookie.setSignedRequestCookie(f.signed_request,
g))}else!FB._authResponse&&e?FB.Auth.setAuthResponse(e,"connected"):(FB.Auth.setAuthResponse(null,f.error&&f.error==="not_authorized"?"not_authorized":"unknown"),FB.Cookie.getEnabled()&&FB.Cookie.clearSignedRequestCookie());if(f&&f.fb_https&&!FB._https)FB._https=!0;response={authResponse:FB._authResponse,status:FB._userStatus};c&&c(response)}},getOrigin:function(){return FB.UA.nativeApp()?3:FB._inMobileCanvas?2:1},parseSignedRequest:function(c){if(!c)return null;c=c.split(".",2)[1];c=FB.Auth.base64URLDecode(c);
return FB.JSON.parse(c)},base64URLDecode:function(c){c=c.replace(/\-/g,"+").replace(/\_/g,"/");if(c.length%4!==0)for(var e=4-c.length%4,f=0;f<e;f++)c+="=";for(var e="",g,i,h="",j="",k=0;k<c.length;k+=4)g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(k)),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(k+1)),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(k+2)),j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(k+
3)),g=g<<2|i>>4,i=(i&15)<<4|f>>2,h=(f&3)<<6|j,e+=String.fromCharCode(g),f!=64&&(e+=String.fromCharCode(i)),j!=64&&(e+=String.fromCharCode(h));return unescape(e)}});
FB.provide("UIServer.Methods",{"permissions.request":{size:{width:627,height:326},transform:function(c){if(FB._apiKey)if(FB._session&&!c.params.perms&&!c.params.auth_type)FB.log("FB.login() called when user is already connected."),c.cb&&c.cb({status:FB._userStatus,session:FB._session});else return c=FB.UIServer.genericTransform(c),c.cb=FB.Auth.xdResponseWrapper(c.cb,FB._userStatus,FB._session),c.params.method="permissions.request",FB.copy(c.params,{fbconnect:FB._inCanvas?0:1,return_session:1,session_version:3}),
c;else FB.log("FB.login() called before calling FB.init().")}},"permissions.oauth":{url:"dialog/oauth",size:{width:627,height:326},transform:function(c){if(FB._apiKey)if(FB._authResponse&&!c.params.scope)FB.log("FB.login() called when user is already connected."),c.cb&&c.cb({status:FB._userStatus,authResponse:FB._authResponse});else{var e=c.cb,f=c.id;delete c.cb;FB.copy(c.params,{client_id:FB._apiKey,redirect_uri:FB.Auth.xdNewHandler(e,f,"opener"),origin:FB.Auth.getOrigin(),response_type:"token,signed_request"});
return c}else FB.log("FB.login() called before FB.init().")}},"auth.logout":{url:"logout.php",transform:function(c){if(FB._apiKey)if(FB._oauth&&!FB._authResponse)FB.log("FB.logout() called without an access token.");else if(!FB._oauth&&!FB._session)FB.log("FB.logout() called without a session.");else return c.params.next=FB._oauth?FB.Auth.xdNewHandler(c.cb,c.id,"parent"):FB.Auth.xdHandler(c.cb,c.id,"parent",!1,"unknown"),c;else FB.log("FB.logout() called before calling FB.init().")}},"auth.status":{url:"extern/login_status.php",
transform:function(c){var e=c.cb,f=c.id,g=FB.Auth.xdHandler;delete c.cb;FB.copy(c.params,{no_session:g(e,f,"parent",!1,"notConnected"),no_user:g(e,f,"parent",!1,"unknown"),ok_session:g(e,f,"parent",!1,"connected"),session_version:3,extern:FB._inCanvas?0:2,session_origin:FB.Auth._getSessionOrigin()});return c}},"login.status":{url:"dialog/oauth",transform:function(c){var e=c.cb,f=c.id;delete c.cb;FB.copy(c.params,{client_id:FB._apiKey,redirect_uri:FB.Auth.xdNewHandler(e,f,"parent"),origin:FB.Auth.getOrigin(),
response_type:"token,signed_request,code"});return c}}});
FB.provide("Cookie",{_domain:null,_enabled:!1,setEnabled:function(c){FB.Cookie._enabled=c},getEnabled:function(){return FB.Cookie._enabled},load:function(){var c=document.cookie.match("\\bfbs_"+FB._apiKey+'="([^;]*)\\b'),e;if(c)e=FB.QS.decode(c[1]),e.expires=parseInt(e.expires,10),FB.Cookie._domain=e.base_domain;return e},loadSignedRequest:function(){var c=document.cookie.match("\\bfbsr_"+FB._apiKey+"=([^;]*)\\b");if(!c)return null;return c[1]},setSignedRequestCookie:function(c,e){if(!FB._oauth)throw Error("FB.Cookie.setSignedRequestCookie should only be used with OAuth2.");
if(!c)throw Error("Value passed to FB.Cookie.setSignedRequestCookie was empty.");FB.Cookie.getEnabled()&&FB.Cookie.setRaw("fbsr_",c,e)},clearSignedRequestCookie:function(){if(!FB._oauth)throw Error("FB.Cookie.setSignedRequestCookie should only be used with OAuth2.");FB.Cookie.getEnabled()&&FB.Cookie.setRaw("fbsr_","",0)},setRaw:function(c,e,f,g){var i=(new Date(f*1E3)).toGMTString();document.cookie=c+FB._apiKey+"="+e+(e&&f===0?"":"; expires="+i)+"; path=/"+(g?"; domain=."+g:"")},set:function(c){c?
(FB.Cookie.setRaw("fbs_",'"'+FB.QS.encode(c)+'"',c.expires,c.base_domain),FB.Cookie._domain=c.base_domain):FB.Cookie.clear()},clear:function(){FB.Cookie.setRaw("fbs_","",0,FB.Cookie._domain)}});
FB.provide("Frictionless",{_allowedRecipients:{},_useFrictionless:!1,_updateRecipients:function(){FB.Frictionless._allowedRecipients={};FB.api("/me/apprequestformerrecipients",function(c){c&&!c.error&&FB.Array.forEach(c.data,function(c){FB.Frictionless._allowedRecipients[c.recipient_id]=!0},!1)})},init:function(){FB.Frictionless._useFrictionless=!0;FB.Event.subscribe("auth.login",function(c){c.session&&FB.Frictionless._updateRecipients()})},_processRequestResponse:function(c){return function(e){var f=
e&&typeof e.frictionless_value!=="undefined",g=e&&e.updated_frictionless;if(FB.Frictionless._useFrictionless&&(g||f))if(FB.Frictionless._updateRecipients(),f){var i=[];FB.Array.forEach(e.request_ids,function(c){i.push(c)},!1);e.request_ids=i}c&&c(e)}},isAllowed:function(c){if(!c)return!1;if(typeof c==="number"||typeof c==="string")return FB.Frictionless._allowedRecipients[c];var e=!0,f=!1;FB.Array.forEach(c,function(c){e=e&&FB.Frictionless._allowedRecipients[c];f=!0},!1);return e&&f}});
FB.provide("",{initSitevars:{},init:function(c){c=FB.copy(c||{},{logging:!0,status:!0});FB._userID=0;FB._apiKey=c.appId||c.apiKey;FB._oauth=c.oauth;if(!c.logging&&window.location.toString().indexOf("fb_debug=1")<0)FB._logging=!1;FB.XD.init(c.channelUrl);FB.UA.mobile()&&FB.TemplateUI&&c.useCachedDialogs!==!1&&(FB.TemplateUI.init(),FB.Event.subscribe("auth.sessionChange",FB.TemplateData.update));if(c.reportTemplates)FB.reportTemplates=!0;c.frictionlessRequests&&FB.Frictionless.init();if(FB._apiKey){FB.Cookie.setEnabled(c.cookie);
if(FB._oauth)if(c.authResponse)FB.Auth.setAuthResponse(c.authResponse,"connected");else{var e=FB.Cookie.loadSignedRequest(),e=FB.Auth.parseSignedRequest(e);FB._userID=e&&e.user_id||0}else c.session=c.session||FB.Cookie.load(),FB.Auth.setSession(c.session,c.session?"connected":"unknown");c.status&&FB.getLoginStatus()}FB._inCanvas&&FB.Canvas.init();FB.Event.subscribe("xfbml.parse",function(){FB.XFBML.IframeWidget.batchWidgetPipeRequests()});c.xfbml&&window.setTimeout(function(){if(FB.XFBML)if(FB.initSitevars.parseXFBMLBeforeDomReady){FB.XFBML.parse();
var c=window.setInterval(function(){FB.XFBML.parse()},100);FB.Dom.ready(function(){window.clearInterval(c);FB.XFBML.parse()})}else FB.Dom.ready(FB.XFBML.parse)},0);FB.Canvas&&FB.Canvas.EarlyFlush&&FB.Canvas.EarlyFlush._maybeSample()}});
FB.provide("Canvas.EarlyFlush",{_sampleRate:0,_appIdsBlacklist:[],_links:[],COLLECT_AUTOMATIC:0,COLLECT_MANUAL:1,_collectionMode:0,addResource:function(c){FB._inCanvas&&FB._apiKey&&FB.Canvas.EarlyFlush._links.push(c)},setCollectionMode:function(c){if(!FB._inCanvas||!FB._apiKey)return!1;if(c!=FB.Canvas.EarlyFlush.COLLECT_AUTOMATIC&&c!=FB.Canvas.EarlyFlush.COLLECT_MANUAL)return!1;FB.Canvas.EarlyFlush._collectionMode=c},_maybeSample:function(){FB._inCanvas&&FB._apiKey&&FB.Canvas.EarlyFlush._sampleRate&&
(window.name.indexOf("_fb_https")>-1||Math.random()>1/FB.Canvas.EarlyFlush._sampleRate||FB.Canvas.EarlyFlush._appIdsBlacklist!="*"&&FB.Array.indexOf(FB.Canvas.EarlyFlush._appIdsBlacklist,parseInt(FB._apiKey,10))==-1&&window.setTimeout(FB.Canvas.EarlyFlush._sample,3E4))},_sample:function(){var c={object:"data",link:"href",script:"src"};FB.Canvas.EarlyFlush._collectionMode==FB.Canvas.EarlyFlush.COLLECT_AUTOMATIC&&FB.Array.forEach(c,function(c,f){FB.Array.forEach(window.document.getElementsByTagName(f),
function(f){f[c]&&FB.Canvas.EarlyFlush._links.push(f[c])})});c=FB.JSON.stringify(FB.Canvas.EarlyFlush._links);FB.api(FB._apiKey+"/staticresources","post",{urls:c});FB.Canvas.EarlyFlush._links=[]}});FB.provide("CanvasInsights",{setDoneLoading:function(c){FB.Canvas.setDoneLoading(c)}});
FB.provide("UIServer.MobileIframableMethod",{transform:function(c){return c.params.display==="touch"&&c.params.access_token&&window.postMessage?(c.params.channel=FB.UIServer._xdChannelHandler(c.id,"parent"),c.params.in_iframe=1,c):FB.UIServer.genericTransform(c)},getXdRelation:function(c){if(c==="touch"&&window.postMessage)return"parent";return FB.UIServer.getXdRelation(c)}});
FB.provide("UIServer.Methods",{"stream.share":{size:{width:575,height:380},url:"sharer.php",transform:function(c){if(!c.params.u)c.params.u=window.location.toString();return c}},"fbml.dialog":{size:{width:575,height:300},url:"render_fbml.php",loggedOutIframe:!0,transform:function(c){return c}},"auth.logintofacebook":{size:{width:530,height:287},url:"login.php",transform:function(c){c.params.skip_api_login=1;var e=FB.UIServer.getXdRelation(c.params.display),e=FB.UIServer._xdResult(c.cb,c.id,e,!0);
c.params.next=FB.getDomain(FB._https?"https_www":"www")+"login.php?"+FB.QS.encode({api_key:FB._apiKey,next:e,skip_api_login:1});return c}},apprequests:{transform:function(c){c=FB.UIServer.MobileIframableMethod.transform(c);if(FB.Frictionless&&FB.Frictionless._useFrictionless)c.cb=FB.Frictionless._processRequestResponse(c.cb),c.hideLoader=FB.Frictionless.isAllowed(c.params.to);return c},getXdRelation:function(c){return FB.UIServer.MobileIframableMethod.getXdRelation(c)}},feed:FB.UIServer.MobileIframableMethod});
FB.provide("",{share:function(c){FB.log("FB.share() has been deprecated. Please use FB.ui() instead.");FB.ui({display:"popup",method:"stream.share",u:c})},publish:function(c,e){FB.log("FB.publish() has been deprecated. Please use FB.ui() instead.");c=c||{};FB.ui(FB.copy({display:"popup",method:"stream.publish",preview:1},c||{}),e)},addFriend:function(c,e){FB.log("FB.addFriend() has been deprecated. Please use FB.ui() instead.");FB.ui({display:"popup",id:c,method:"friend.add"},e)}});
FB.UIServer.Methods["auth.login"]=FB.UIServer.Methods["permissions.request"];
FB.provide("XFBML",{_renderTimeout:3E4,parse:function(c,e){var c=c||document.body,f=1,g=function(){f--;f===0&&(e&&e(),FB.Event.fire("xfbml.render"))},i={};FB.XFBML._widgetPipeIsEnabled()&&FB.Array.forEach(FB.XFBML._tagInfos,function(e){if(e.supportsWidgetPipe){var f=FB.XFBML._getDomElements(c,e.xmlns?e.xmlns:"fb",e.localName);i[e.localName]=f;FB.XFBML._widgetPipeEnabledTagCount+=f.length}});FB.Array.forEach(FB.XFBML._tagInfos,function(e){if(!e.xmlns)e.xmlns="fb";var j;j=i[e.localName]!==void 0?i[e.localName]:
FB.XFBML._getDomElements(c,e.xmlns,e.localName);for(var k=0;k<j.length;k++)f++,FB.XFBML._processElement(j[k],e,g)});FB.Event.fire("xfbml.parse");window.setTimeout(function(){f>0&&FB.log(f+" XFBML tags failed to render in "+FB.XFBML._renderTimeout+"ms.")},FB.XFBML._renderTimeout);g()},registerTag:function(c){FB.XFBML._tagInfos.push(c)},shouldUseWidgetPipe:function(){if(!FB.XFBML._widgetPipeIsEnabled())return!1;return FB.XFBML._widgetPipeEnabledTagCount>1},_processElement:function(c,e,f){var g=c._element;
if(g)g.subscribe("render",f),g.process();else{var i=function(){var h=eval(e.className),i=function(e){return(e=c.getAttribute(e))&&FB.Array.indexOf(["true","1","yes","on"],e.toLowerCase())>-1},k=!1,n=!0,m=!1;if(e.className==="FB.XFBML.LoginButton"&&(addToProfile=e.localName=="add-to-profile",m=i("render-in-iframe"),n=addToProfile||i("show-faces")||i("show_faces"),k=addToProfile||m||n||i("oneclick")))h=FB.XFBML.Login;g=c._element=new h(c);if(k){h={show_faces:n,add_to_profile:addToProfile};if(addToProfile)h.width=
300;if(i=c.getAttribute("perms"))h.perms=i;g.setExtraParams(h)}g.subscribe("render",f);g.process()};FB.CLASSES[e.className.substr(3)]?i():FB.log("Tag "+e.className+" was not found.")}},_getDomElements:function(c,e,f){var g=e+":"+f;if(FB.UA.firefox())return c.getElementsByTagNameNS(document.body.namespaceURI,g);else{if(FB.UA.ie()<9)try{var i=document.namespaces;if(i&&i[e]){var h=c.getElementsByTagName(f);if(!document.addEventListener||h.length>0)return h}}catch(j){}return c.getElementsByTagName(g)}},
_tagInfos:[{localName:"activity",className:"FB.XFBML.Activity"},{localName:"add-profile-tab",className:"FB.XFBML.AddProfileTab"},{localName:"add-to-profile",className:"FB.XFBML.LoginButton"},{localName:"bookmark",className:"FB.XFBML.Bookmark"},{localName:"comments",className:"FB.XFBML.Comments"},{localName:"comments-count",className:"FB.XFBML.CommentsCount"},{localName:"connect-bar",className:"FB.XFBML.ConnectBar"},{localName:"fan",className:"FB.XFBML.Fan"},{localName:"like",className:"FB.XFBML.Like",
supportsWidgetPipe:!0},{localName:"like-box",className:"FB.XFBML.LikeBox"},{localName:"live-stream",className:"FB.XFBML.LiveStream"},{localName:"login",className:"FB.XFBML.Login"},{localName:"login-button",className:"FB.XFBML.LoginButton"},{localName:"facepile",className:"FB.XFBML.Facepile"},{localName:"friendpile",className:"FB.XFBML.Friendpile"},{localName:"name",className:"FB.XFBML.Name"},{localName:"profile-pic",className:"FB.XFBML.ProfilePic"},{localName:"question",className:"FB.XFBML.Question"},
{localName:"read",className:"FB.XFBML.Read"},{localName:"recommendations",className:"FB.XFBML.Recommendations"},{localName:"registration",className:"FB.XFBML.Registration"},{localName:"send",className:"FB.XFBML.Send"},{localName:"serverfbml",className:"FB.XFBML.ServerFbml"},{localName:"share-button",className:"FB.XFBML.ShareButton"},{localName:"social-bar",className:"FB.XFBML.SocialBar"}],_widgetPipeEnabledTagCount:0,_widgetPipeIsEnabled:function(){return FB.widgetPipeEnabledApps&&FB.widgetPipeEnabledApps[FB._apiKey]!==
void 0}});(function(){try{document.namespaces&&!document.namespaces.item.fb&&document.namespaces.add("fb")}catch(c){}})();FB.provide("XFBML",{set:function(c,e,f){FB.log("FB.XFBML.set() has been deprecated.");c.innerHTML=e;FB.XFBML.parse(c,f)}});
FB.subclass("Waitable","Obj",function(){},{set:function(c){this.setProperty("value",c)},error:function(c){this.fire("error",c)},wait:function(c,e){e&&this.subscribe("error",e);this.monitor("value",this.bind(function(){if(this.value!==void 0)return c(this.value),!0}))}});
FB.subclass("Data.Query","Waitable",function(){if(!FB.Data.Query._c)FB.Data.Query._c=1;this.name="v_"+FB.Data.Query._c++},{parse:function(c){var e=/^select (.*?) from (\w+)\s+where (.*)$/i.exec(FB.String.format.apply(null,c));this.fields=this._toFields(e[1]);this.table=e[2];this.where=this._parseWhere(e[3]);for(e=1;e<c.length;e++)if(FB.Type.isType(c[e],FB.Data.Query))c[e].hasDependency=!0;return this},toFql:function(){var c="select "+this.fields.join(",")+" from "+this.table+" where ";switch(this.where.type){case "unknown":c+=
this.where.value;break;case "index":c+=this.where.key+"="+this._encode(this.where.value);break;case "in":c+=this.where.value.length==1?this.where.key+"="+this._encode(this.where.value[0]):this.where.key+" in ("+FB.Array.map(this.where.value,this._encode).join(",")+")"}return c},_encode:function(c){return typeof c=="string"?FB.String.quote(c):c},toString:function(){return"#"+this.name},_toFields:function(c){return FB.Array.map(c.split(","),FB.String.trim)},_parseWhere:function(c){var e=/^\s*(\w+)\s*=\s*(.*)\s*$/i.exec(c),
f,g="unknown";e&&(f=e[2],/^(["'])(?:\\?.)*?\1$/.test(f)?(f=eval(f),g="index"):/^\d+\.?\d*$/.test(f)&&(g="index"));return g=="index"?{type:"index",key:e[1],value:f}:{type:"unknown",value:c}}});
FB.provide("Data",{query:function(){var c=(new FB.Data.Query).parse(arguments);FB.Data.queue.push(c);FB.Data._waitToProcess();return c},waitOn:function(c,e){var f=new FB.Waitable,g=c.length;if(typeof e=="string")var i=e,e=function(){return eval(i)};FB.Array.forEach(c,function(h){h.monitor("value",function(){var i=!1;FB.Data._getValue(h)!==void 0&&(g--,i=!0);if(g===0){var k=e(FB.Array.map(c,FB.Data._getValue));f.set(k!==void 0?k:!0)}return i})});return f},_getValue:function(c){return FB.Type.isType(c,
FB.Waitable)?c.value:c},_selectByIndex:function(c,e,f,g){var i=new FB.Data.Query;i.fields=c;i.table=e;i.where={type:"index",key:f,value:g};FB.Data.queue.push(i);FB.Data._waitToProcess();return i},_waitToProcess:function(){if(FB.Data.timer<0)FB.Data.timer=setTimeout(FB.Data._process,10)},_process:function(){FB.Data.timer=-1;var c={},e=FB.Data.queue;FB.Data.queue=[];for(var f=0;f<e.length;f++){var g=e[f];g.where.type=="index"&&!g.hasDependency?FB.Data._mergeIndexQuery(g,c):c[g.name]=g}e={method:"fql.multiquery",
queries:{}};FB.copy(e.queries,c,!0,function(c){return c.toFql()});e.queries=FB.JSON.stringify(e.queries);FB.api(e,function(e){e.error_msg?FB.Array.forEach(c,function(c){c.error(Error(e.error_msg))}):FB.Array.forEach(e,function(e){c[e.name].set(e.fql_result_set)})})},_mergeIndexQuery:function(c,e){var f=c.where.key,g=c.where.value,i="index_"+c.table+"_"+f,h=e[i];if(!h)h=e[i]=new FB.Data.Query,h.fields=[f],h.table=c.table,h.where={type:"in",key:f,value:[]};FB.Array.merge(h.fields,c.fields);FB.Array.merge(h.where.value,
[g]);h.wait(function(e){c.set(FB.Array.filter(e,function(c){return c[f]==g}))})},timer:-1,queue:[]});window.setTimeout(function(){var c=/(connect.facebook.net|facebook.com\/assets.php).*?#(.*)/;FB.Array.forEach(document.getElementsByTagName("script"),function(e){if(e.src&&(e=c.exec(e.src))){var f=FB.QS.decode(e[2]);FB.Array.forEach(f,function(c,e){c=="0"&&(f[e]=0)});FB.init(f)}});if(window.fbAsyncInit&&!window.fbAsyncInit.hasRun)window.fbAsyncInit.hasRun=!0,fbAsyncInit()},0);
FB.provide("UIServer.Methods",{"pay.prompt":{transform:function(c){var e=FB.XD.handler(function(e){c.cb(FB.JSON.parse(e.response))},"parent.frames["+(window.name||"iframe_canvas")+"]");c.params.channel=e;FB.Arbiter.inform("Pay.Prompt",c.params);return!1}}});
FB.provide("UIServer.Methods",{pay:{size:{width:555,height:120},noHttps:!0,connectDisplay:"popup",transform:function(c){if(!FB._inCanvas)return c.params.order_info=FB.JSON.stringify(c.params.order_info),c;var e=FB.XD.handler(function(e){c.cb(FB.JSON.parse(e.response))},"parent.frames["+(window.name||"iframe_canvas")+"]");c.params.channel=e;c.params.uiserver=!0;FB.Arbiter.inform("Pay.Prompt",c.params);return!1}}});
FB.Class("XFBML.Element",function(c){this.dom=c},FB.copy({getAttribute:function(c,e,f){return(c=this.dom.getAttribute(c)||this.dom.getAttribute(c.replace(/-/g,"_"))||this.dom.getAttribute(c.replace(/-/g,"")))?f?f(c):c:e},_getBoolAttribute:function(c,e){return this.getAttribute(c,e,function(c){c=c.toLowerCase();return c=="true"||c=="1"||c=="yes"||c=="on"})},_getPxAttribute:function(c,e){return this.getAttribute(c,e,function(c){c=parseInt(c.replace("px",""),10);return isNaN(c)?e:c})},_getAttributeFromList:function(c,
e,f){return this.getAttribute(c,e,function(c){c=c.toLowerCase();return FB.Array.indexOf(f,c)>-1?c:e})},isValid:function(){for(var c=this.dom;c;c=c.parentNode)if(c==document.body)return!0},clear:function(){this.dom.innerHTML=""}},FB.EventProvider));
FB.subclass("XFBML.IframeWidget","XFBML.Element",null,{_iframeName:null,_showLoader:!0,_refreshOnAuthChange:!1,_allowReProcess:!1,_fetchPreCachedLoader:!1,_visibleAfter:"load",_widgetPipeEnabled:!1,getUrlBits:function(){throw Error("Inheriting class needs to implement getUrlBits().");},setupAndValidate:function(){return!0},oneTimeSetup:function(){},getSize:function(){},getIframeName:function(){if(!this._iframeName&&this._widgetPipeEnabled&&FB.XFBML.shouldUseWidgetPipe()&&(this._iframeName=this.generateWidgetPipeIframeName(),
FB.XFBML.IframeWidget.allWidgetPipeIframes[this._iframeName]=this,FB.XFBML.IframeWidget.masterWidgetPipeIframe===null))FB.XFBML.IframeWidget.masterWidgetPipeIframe=this;return this._iframeName},getIframeTitle:function(){},getChannelUrl:function(){if(!this._channelUrl){var c=this;this._channelUrl=FB.XD.handler(function(e){c.fire("xd."+e.type,e)},"parent.parent",!0)}return this._channelUrl},getIframeNode:function(){return this.dom.getElementsByTagName("iframe")[0]},arbiterInform:function(c,e){if(this.getIframeNode()){var f=
'parent.frames["'+this.getIframeNode().name+'"]';FB.Arbiter.inform(c,e,f,window.location.protocol=="https:")}else this.subscribe("iframe.onload",FB.bind(this.arbiterInform,this,c,e))},process:function(c){if(this._done){if(!this._allowReProcess&&!c)return;this.clear()}else this._oneTimeSetup();this._done=!0;if(this.setupAndValidate()){this._showLoader&&this._addLoader();FB.Dom.addCss(this.dom,"fb_iframe_widget");this._visibleAfter!="immediate"?FB.Dom.addCss(this.dom,"fb_hide_iframes"):this.subscribe("iframe.onload",
FB.bind(this.fire,this,"render"));var c=this.getSize()||{},e=this.getFullyQualifiedURL();FB.Content.insertIframe({url:e,root:this.dom.appendChild(document.createElement("span")),name:this.getIframeName(),title:this.getIframeTitle(),className:FB._localeIsRtl?"fb_rtl":"fb_ltr",height:c.height,width:c.width,onload:FB.bind(this.fire,this,"iframe.onload")})}else this.fire("render")},generateWidgetPipeIframeName:function(){FB.XFBML.IframeWidget.widgetPipeIframeCount++;return"fb_iframe_"+FB.XFBML.IframeWidget.widgetPipeIframeCount},
getFullyQualifiedURL:function(){if(FB.XFBML.shouldUseWidgetPipe()&&this._widgetPipeEnabled)return this._getWidgetPipeShell();var c=this._getURL();this._fetchPreCachedLoader||(c+="?"+FB.QS.encode(this._getQS()));if(c.length>2E3){var c="about:blank",e=FB.bind(function(){this._postRequest();this.unsubscribe("iframe.onload",e)},this);this.subscribe("iframe.onload",e)}return c},_getWidgetPipeShell:function(){return FB.getDomain("www")+"common/widget_pipe_shell.php"},_oneTimeSetup:function(){this.subscribe("xd.resize",
FB.bind(this._handleResizeMsg,this));FB.getLoginStatus&&(this.subscribe("xd.refreshLoginStatus",FB.bind(FB.getLoginStatus,FB,function(){},!0)),this.subscribe("xd.logout",FB.bind(FB.logout,FB,function(){})));this._refreshOnAuthChange&&this._setupAuthRefresh();this._visibleAfter=="load"&&this.subscribe("iframe.onload",FB.bind(this._makeVisible,this));this.oneTimeSetup()},_makeVisible:function(){this._removeLoader();FB.Dom.removeCss(this.dom,"fb_hide_iframes");this.fire("render")},_setupAuthRefresh:function(){FB.getLoginStatus(FB.bind(function(c){var e=
c.status;FB.Event.subscribe("auth.statusChange",FB.bind(function(c){if(this.isValid())(e=="unknown"||c.status=="unknown")&&this.process(!0),e=c.status},this))},this))},_handleResizeMsg:function(c){if(this.isValid()){var e=this.getIframeNode();e.style.height=c.height+"px";if(c.width)e.style.width=c.width+"px";e.style.border="none";this._makeVisible()}},_addLoader:function(){if(!this._loaderDiv)FB.Dom.addCss(this.dom,"fb_iframe_widget_loader"),this._loaderDiv=document.createElement("div"),this._loaderDiv.className=
"FB_Loader",this.dom.appendChild(this._loaderDiv)},_removeLoader:function(){if(this._loaderDiv)FB.Dom.removeCss(this.dom,"fb_iframe_widget_loader"),this._loaderDiv.parentNode&&this._loaderDiv.parentNode.removeChild(this._loaderDiv),this._loaderDiv=null},_getQS:function(){return FB.copy({api_key:FB._apiKey,locale:FB._locale,sdk:"joey",session_key:FB._session&&FB._session.session_key,ref:this.getAttribute("ref")},this.getUrlBits().params)},_getURL:function(){var c="www",e="";this._fetchPreCachedLoader&&
(c="cdn",e="static/");return FB.getDomain(c)+"plugins/"+e+this.getUrlBits().name+".php"},_postRequest:function(){FB.Content.submitToTarget({url:this._getURL(),target:this.getIframeNode().name,params:this._getQS()})}});
FB.provide("XFBML.IframeWidget",{widgetPipeIframeCount:0,masterWidgetPipeIframe:null,allWidgetPipeIframes:{},batchWidgetPipeRequests:function(){if(FB.XFBML.IframeWidget.masterWidgetPipeIframe){var c=FB.XFBML.IframeWidget._groupWidgetPipeDescriptions(),e={widget_pipe:FB.JSON.stringify(c),href:window.location,site:location.hostname,channel:FB.XFBML.IframeWidget.masterWidgetPipeIframe.getChannelUrl(),api_key:FB._apiKey,locale:FB._locale,sdk:"joey",session_key:FB._session&&FB._session.session_key},f=
FB.guid();FB.Content.insertIframe({url:"about:blank",root:document.getElementById("fb-root")||document.body,name:f,className:"fb_hidden",onload:function(){FB.Content.submitToTarget({url:FB._domain.www+"widget_pipe.php",target:f,params:e},!0)}})}},_groupWidgetPipeDescriptions:function(){var c={},e;for(e in FB.XFBML.IframeWidget.allWidgetPipeIframes){var f=FB.XFBML.IframeWidget.allWidgetPipeIframes[e].getUrlBits(),g={widget:f.name};FB.copy(g,f.params);c[e]=g}return c}});
FB.subclass("XFBML.Activity","XFBML.IframeWidget",null,{_visibleAfter:"load",_refreshOnAuthChange:!0,setupAndValidate:function(){this._attr={border_color:this.getAttribute("border-color"),colorscheme:this.getAttribute("color-scheme"),filter:this.getAttribute("filter"),action:this.getAttribute("action"),font:this.getAttribute("font"),header:this._getBoolAttribute("header"),height:this._getPxAttribute("height",300),recommendations:this._getBoolAttribute("recommendations"),site:this.getAttribute("site",
location.hostname),width:this._getPxAttribute("width",300)};return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},getUrlBits:function(){return{name:"activity",params:this._attr}}});
FB.subclass("XFBML.ButtonElement","XFBML.Element",null,{_allowedSizes:["icon","small","medium","large","xlarge"],onClick:function(){throw Error("Inheriting class needs to implement onClick().");},setupAndValidate:function(){return!0},getButtonMarkup:function(){return this.getOriginalHTML()},getOriginalHTML:function(){return this._originalHTML},process:function(){if(!("_originalHTML"in this))this._originalHTML=FB.String.trim(this.dom.innerHTML);if(this.setupAndValidate()){var c=this._getAttributeFromList("size",
"medium",this._allowedSizes),e="",f="";c=="icon"?e="fb_button_simple":(e=FB._localeIsRtl?"_rtl":"",f=this.getButtonMarkup(),e="fb_button"+e+" fb_button_"+c+e);this.dom.innerHTML='<a class="'+e+'"><span class="fb_button_text">'+f+"</span></a>";this.dom.firstChild.onclick=FB.bind(this.onClick,this)}this.fire("render")}});
FB.provide("Helper",{isUser:function(c){return c<22E8||c>=1E14&&c<=100099999989999},getLoggedInUser:function(){return FB.getUserID()},upperCaseFirstChar:function(c){return c.length>0?c.substr(0,1).toUpperCase()+c.substr(1):c},getProfileLink:function(c,e,f){(f=f||(c?FB.getDomain("www")+"profile.php?id="+c.uid:null))&&(e='<a class="fb_link" href="'+f+'">'+e+"</a>");return e},invokeHandler:function(c,e,f){c&&(typeof c==="string"?eval(c):c.apply&&c.apply(e,f||[]))},fireEvent:function(c,e){var f=e._attr.href;
e.fire(c,f);FB.Event.fire(c,f,e)},executeFunctionByName:function(c){for(var e=Array.prototype.slice.call(arguments,1),f=c.split("."),g=f.pop(),i=window,h=0;h<f.length;h++)i=i[f[h]];return i[g].apply(this,e)}});FB.subclass("XFBML.AddProfileTab","XFBML.ButtonElement",null,{getButtonMarkup:function(){return FB.Intl._tx("Add Profile Tab on Facebook")},onClick:function(){FB.ui({method:"profile.addtab"},this.bind(function(c){c.tab_added&&FB.Helper.invokeHandler(this.getAttribute("on-add"),this)}))}});
FB.subclass("XFBML.Bookmark","XFBML.ButtonElement",null,{getButtonMarkup:function(){return FB.Intl._tx("Bookmark on Facebook")},onClick:function(){FB.ui({method:"bookmark.add"},this.bind(function(c){c.bookmarked&&FB.Helper.invokeHandler(this.getAttribute("on-add"),this)}))}});
FB.subclass("XFBML.Comments","XFBML.IframeWidget",null,{_visibleAfter:"immediate",_refreshOnAuthChange:!0,setupAndValidate:function(){var c={channel_url:this.getChannelUrl(),colorscheme:this.getAttribute("colorscheme"),numposts:this.getAttribute("num-posts",10),width:this._getPxAttribute("width",550),href:this.getAttribute("href"),permalink:this.getAttribute("permalink"),publish_feed:this.getAttribute("publish_feed")};if(c.href){var e=this.getAttribute("fb_comment_id");if(!e)(e=FB.QS.decode(document.URL.substring(document.URL.indexOf("?")+
1)).fb_comment_id)&&e.indexOf("#")>0&&(e=e.substring(0,e.indexOf("#")));if(e)c.fb_comment_id=e,this.subscribe("render",FB.bind(function(){window.location.hash=this.getIframeNode().id},this))}else{c.migrated=this.getAttribute("migrated");c.xid=this.getAttribute("xid");c.title=this.getAttribute("title",document.title);c.url=this.getAttribute("url",document.URL);c.quiet=this.getAttribute("quiet");c.reverse=this.getAttribute("reverse");c.simple=this.getAttribute("simple");c.css=this.getAttribute("css");
c.notify=this.getAttribute("notify");if(!c.xid)e=document.URL.indexOf("#"),c.xid=e>0?encodeURIComponent(document.URL.substring(0,e)):encodeURIComponent(document.URL);if(c.migrated)c.href="http://www.facebook.com/plugins/comments_v1.php?app_id="+FB._apiKey+"&xid="+encodeURIComponent(c.xid)+"&url="+encodeURIComponent(c.url)}this._attr=c;return!0},oneTimeSetup:function(){this.subscribe("xd.addComment",FB.bind(this._handleCommentMsg,this));this.subscribe("xd.commentCreated",FB.bind(this._handleCommentCreatedMsg,
this));this.subscribe("xd.commentRemoved",FB.bind(this._handleCommentRemovedMsg,this))},getSize:function(){return{width:this._attr.width,height:200}},getUrlBits:function(){return{name:"comments",params:this._attr}},_handleCommentMsg:function(c){this.isValid()&&FB.Event.fire("comments.add",{post:c.post,user:c.user,widget:this})},_handleCommentCreatedMsg:function(c){this.isValid()&&FB.Event.fire("comment.create",{href:c.href,commentID:c.commentID,parentCommentID:c.parentCommentID})},_handleCommentRemovedMsg:function(c){this.isValid()&&
FB.Event.fire("comment.remove",{href:c.href,commentID:c.commentID})}});
FB.subclass("XFBML.CommentsCount","XFBML.Element",null,{process:function(){this._href=this.getAttribute("href",window.location.href);this._count=FB.Data._selectByIndex(["commentsbox_count"],"link_stat","url",this._href);FB.Dom.addCss(this.dom,"fb_comments_count_zero");this._count.wait(FB.bind(function(){var c=this._count.value[0].commentsbox_count;this.dom.innerHTML=FB.String.format('<span class="fb_comments_count">{0}</span>',c);c>0&&FB.Dom.removeCss(this.dom,"fb_comments_count_zero");this.fire("render")},
this))}});
FB.provide("Anim",{ate:function(c,e,f,g){var f=!isNaN(parseFloat(f))&&f>=0?f:750,i={},h={},j=null,k=setInterval(FB.bind(function(){j||(j=(new Date).getTime());var n=1;f!=0&&(n=Math.min(((new Date).getTime()-j)/f,1));FB.Array.forEach(e,FB.bind(function(e,f){if(!i[f]){var g=FB.Dom.getStyle(c,f);if(g===!1)return;i[f]=this._parseCSS(g+"")}h[f]||(h[f]=this._parseCSS(e.toString()));var j="";FB.Array.forEach(i[f],function(c,e){isNaN(h[f][e].numPart)&&h[f][e].textPart=="?"?j=c.numPart+c.textPart:isNaN(c.numPart)?
j=c.textPart:j+=c.numPart+Math.ceil((h[f][e].numPart-c.numPart)*Math.sin(Math.PI/2*n))+h[f][e].textPart+" "});FB.Dom.setStyle(c,f,j)},this));n==1&&(clearInterval(k),g&&g(c))},this),40)},_parseCSS:function(c){var e=[];FB.Array.forEach(c.split(" "),function(c){var g=parseInt(c,10);e.push({numPart:g,textPart:c.replace(g,"")})});return e}});
FB.provide("Insights",{impression:function(c,e){var f="//ah8.facebook.com/impression.php/"+FB.guid()+"/",g=new Image(1,1),i=[];if(!c.api_key&&FB._apiKey)c.api_key=FB._apiKey;for(var h in c)i.push(encodeURIComponent(h)+"="+encodeURIComponent(c[h]));f+="?"+i.join("&");if(e)g.onload=e;g.src=f}});
FB.subclass("XFBML.ConnectBar","XFBML.Element",null,{_initialHeight:null,_initTopMargin:0,_picFieldName:"pic_square",_page:null,_displayed:!1,_notDisplayed:!1,_container:null,_animationSpeed:0,process:function(){FB.getLoginStatus(this.bind(function(){FB.Event.monitor("auth.statusChange",this.bind(function(){this.isValid()&&FB._userStatus=="connected"?(this._uid=FB.Helper.getLoggedInUser(),FB.api({method:"Connect.shouldShowConnectBar"},this.bind(function(c){c!=2?(this._animationSpeed=c==0?750:0,this._showBar()):
this._noRender()}))):this._noRender();return!1}))}))},_showBar:function(){var c=FB.Data._selectByIndex(["first_name","profile_url",this._picFieldName],"user","uid",this._uid),e=FB.Data._selectByIndex(["display_name"],"application","api_key",FB._apiKey);FB.Data.waitOn([c,e],FB.bind(function(c){c[0][0].site_name=c[1][0].display_name;if(!this._displayed)this._displayed=!0,this._notDisplayed=!1,this._renderConnectBar(c[0][0]),this.fire("render"),FB.Insights.impression({lid:104,name:"widget_load"}),this.fire("connectbar.ondisplay"),
FB.Event.fire("connectbar.ondisplay",this),FB.Helper.invokeHandler(this.getAttribute("on-display"),this)},this))},_noRender:function(){if(this._displayed)this._displayed=!1,this._closeConnectBar();if(!this._notDisplayed)this._notDisplayed=!0,this.fire("render"),this.fire("connectbar.onnotdisplay"),FB.Event.fire("connectbar.onnotdisplay",this),FB.Helper.invokeHandler(this.getAttribute("on-not-display"),this)},_renderConnectBar:function(c){var e=document.createElement("div"),f=document.createElement("div");
e.className="fb_connect_bar";f.className="fb_reset fb_connect_bar_container";f.appendChild(e);document.body.appendChild(f);this._container=f;this._initialHeight=Math.round(parseFloat(FB.Dom.getStyle(f,"height"))+parseFloat(FB.Dom.getStyle(f,"borderBottomWidth")));e.innerHTML=FB.String.format('<div class="fb_buttons"><a href="#" class="fb_bar_close"><img src="{1}" alt="{2}" title="{2}"/></a></div><a href="{7}" class="fb_profile" target="_blank"><img src="{3}" alt="{4}" title="{4}"/></a>{5} <span><a href="{8}" class="fb_learn_more" target="_blank">{6}</a> &ndash; <a href="#" class="fb_no_thanks">{0}</a></span>',
FB.Intl._tx("No Thanks"),FB.getDomain("cdn")+FB.XFBML.ConnectBar.imgs.buttonUrl,FB.Intl._tx("Close"),c[this._picFieldName]||FB.getDomain("cdn")+FB.XFBML.ConnectBar.imgs.missingProfileUrl,FB.String.escapeHTML(c.first_name),FB.Intl._tx("Hi {firstName}. <strong>{siteName}</strong> is using Facebook to personalize your experience.",{firstName:FB.String.escapeHTML(c.first_name),siteName:FB.String.escapeHTML(c.site_name)}),FB.Intl._tx("Learn More"),c.profile_url,FB.getDomain("www")+"sitetour/connect.php");
var g=this;FB.Array.forEach(e.getElementsByTagName("a"),function(c){c.onclick=FB.bind(g._clickHandler,g)});this._page=document.body;c=0;c=this._page.parentNode?Math.round((parseFloat(FB.Dom.getStyle(this._page.parentNode,"height"))-parseFloat(FB.Dom.getStyle(this._page,"height")))/2):parseInt(FB.Dom.getStyle(this._page,"marginTop"),10);this._initTopMargin=c=isNaN(c)?0:c;window.XMLHttpRequest?(f.style.top=-1*this._initialHeight+"px",FB.Anim.ate(f,{top:"0px"},this._animationSpeed)):f.className+=" fb_connect_bar_container_ie6";
f={marginTop:this._initTopMargin+this._initialHeight+"px"};FB.UA.ie()?f.backgroundPositionY=this._initialHeight+"px":f.backgroundPosition="? "+this._initialHeight+"px";FB.Anim.ate(this._page,f,this._animationSpeed)},_clickHandler:function(c){c=c||window.event;for(c=c.target||c.srcElement;c.nodeName!="A";)c=c.parentNode;switch(c.className){case "fb_bar_close":FB.api({method:"Connect.connectBarMarkAcknowledged"});FB.Insights.impression({lid:104,name:"widget_user_closed"});this._closeConnectBar();break;
case "fb_learn_more":case "fb_profile":window.open(c.href);break;case "fb_no_thanks":this._closeConnectBar(),FB.api({method:"Connect.connectBarMarkAcknowledged"}),FB.Insights.impression({lid:104,name:"widget_user_no_thanks"}),FB.api({method:"auth.revokeAuthorization",block:!0},this.bind(function(){this.fire("connectbar.ondeauth");FB.Event.fire("connectbar.ondeauth",this);FB.Helper.invokeHandler(this.getAttribute("on-deauth"),this);this._getBoolAttribute("auto-refresh",!0)&&window.location.reload()}))}return!1},
_closeConnectBar:function(){this._notDisplayed=!0;var c={marginTop:this._initTopMargin+"px"};FB.UA.ie()?c.backgroundPositionY="0px":c.backgroundPosition="? 0px";var e=this._animationSpeed==0?0:300;FB.Anim.ate(this._page,c,e);FB.Anim.ate(this._container,{top:-1*this._initialHeight+"px"},e,function(c){c.parentNode.removeChild(c)});this.fire("connectbar.onclose");FB.Event.fire("connectbar.onclose",this);FB.Helper.invokeHandler(this.getAttribute("on-close"),this)}});
FB.provide("XFBML.ConnectBar",{imgs:{buttonUrl:"images/facebook-widgets/close_btn.png",missingProfileUrl:"pics/q_silhouette.gif"}});
FB.subclass("XFBML.Facepile","XFBML.IframeWidget",null,{_visibleAfter:"load",_extraParams:{},setupAndValidate:function(){this._attr={href:this.getAttribute("href"),channel:this.getChannelUrl(),colorscheme:this.getAttribute("colorscheme","light"),max_rows:this.getAttribute("max-rows"),action:this.getAttribute("action","like"),tense:this.getAttribute("tense","past"),width:this._getPxAttribute("width",200),ref:this.getAttribute("ref"),size:this.getAttribute("size","small"),login_text:this.dom.innerHTML};
this.clear();for(var c in this._extraParams)this._attr[c]=this._extraParams[c];return!0},setExtraParams:function(c){this._extraParams=c},oneTimeSetup:function(){var c=FB._userStatus;FB.Event.subscribe("auth.statusChange",FB.bind(function(e){(c=="connected"||e.status=="connected")&&this.process(!0);c=e.status},this))},getSize:function(){if(this._attr.size=="large")return{width:this._attr.width,height:90};return{width:this._attr.width,height:70}},getUrlBits:function(){return{name:"facepile",params:this._attr}}});
FB.subclass("XFBML.Fan","XFBML.IframeWidget",null,{_visibleAfter:"load",setupAndValidate:function(){this._attr={api_key:FB._apiKey,connections:this.getAttribute("connections","10"),css:this.getAttribute("css"),height:this._getPxAttribute("height"),id:this.getAttribute("profile-id"),logobar:this._getBoolAttribute("logo-bar"),name:this.getAttribute("name"),stream:this._getBoolAttribute("stream",!0),width:this._getPxAttribute("width",300)};if(!this._attr.id&&!this._attr.name)return FB.log('<fb:fan> requires one of the "id" or "name" attributes.'),
!1;var c=this._attr.height;c||(c=(!this._attr.connections||this._attr.connections==="0")&&!this._attr.stream?65:!this._attr.connections||this._attr.connections==="0"?375:this._attr.stream?550:250);this._attr.logobar&&(c+=25);this._attr.height=c;return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},getUrlBits:function(){return{name:"fan",params:this._attr}}});FB.subclass("XFBML.Friendpile","XFBML.Facepile",null,{});
FB.subclass("XFBML.EdgeCommentWidget","XFBML.IframeWidget",function(c){this._iframeWidth=c.width+1;this._iframeHeight=c.height;this._attr={master_frame_name:c.masterFrameName};this.dom=c.commentNode;this.dom.style.top=c.relativeHeightOffset;if(c.relativeWidthOffset)FB._localeIsRtl?this.dom.style.right=c.relativeWidthOffset:this.dom.style.left=c.relativeWidthOffset;this.dom.style.zIndex=FB.XFBML.EdgeCommentWidget.NextZIndex++;FB.Dom.addCss(this.dom,"fb_edge_comment_widget")},{_visibleAfter:"load",
_showLoader:!1,getSize:function(){return{width:this._iframeWidth,height:this._iframeHeight}},getUrlBits:function(){return{name:"comment_widget_shell",params:this._attr}}});FB.provide("XFBML.EdgeCommentWidget",{NextZIndex:1E4});
FB.subclass("XFBML.EdgeWidget","XFBML.IframeWidget",null,{_visibleAfter:"immediate",_showLoader:!1,setupAndValidate:function(){FB.Dom.addCss(this.dom,"fb_edge_widget_with_comment");this._attr={channel_url:this.getChannelUrl(),debug:this._getBoolAttribute("debug"),href:this.getAttribute("href",window.location.href),is_permalink:this._getBoolAttribute("is-permalink"),node_type:this.getAttribute("node-type","link"),width:this._getWidgetWidth(),font:this.getAttribute("font"),layout:this._getLayout(),
colorscheme:this.getAttribute("color-scheme"),action:this.getAttribute("action"),ref:this.getAttribute("ref"),show_faces:this._shouldShowFaces(),no_resize:this._getBoolAttribute("no_resize"),send:this.getAttribute("send"),url_map:this.getAttribute("url_map")};return!0},oneTimeSetup:function(){this.subscribe("xd.authPrompted",FB.bind(this._onAuthPrompt,this));this.subscribe("xd.edgeCreated",FB.bind(this._onEdgeCreate,this));this.subscribe("xd.edgeRemoved",FB.bind(this._onEdgeRemove,this));this.subscribe("xd.presentEdgeCommentDialog",
FB.bind(this._handleEdgeCommentDialogPresentation,this));this.subscribe("xd.dismissEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogDismissal,this));this.subscribe("xd.hideEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogHide,this));this.subscribe("xd.showEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogShow,this))},getSize:function(){return{width:this._getWidgetWidth(),height:this._getWidgetHeight()}},_getWidgetHeight:function(){var c=this._getLayout(),e=this._shouldShowFaces()?
"show":"hide",f=this.getAttribute("send"),f=65+(f&&f!=="false"?25:0);return{standard:{show:80,hide:35},box_count:{show:f,hide:f},button_count:{show:21,hide:21},simple:{show:20,hide:20}}[c][e]},_getWidgetWidth:function(){var c=this._getLayout(),e=this.getAttribute("send"),f=this._shouldShowFaces()?"show":"hide",e=(this.getAttribute("action")==="recommend"?130:90)+(e&&e!=="false"?60:0),g=this.getAttribute("action")==="recommend"?100:55,i=this.getAttribute("action")==="recommend"?90:50,f=this._getPxAttribute("width",
{standard:{show:450,hide:450},box_count:{show:g,hide:g},button_count:{show:e,hide:e},simple:{show:i,hide:i}}[c][f]),e={standard:{min:225,max:900},box_count:{min:g,max:900},button_count:{min:e,max:900},simple:{min:49,max:900}};if(f<e[c].min)f=e[c].min;else if(f>e[c].max)f=e[c].max;return f},_getLayout:function(){return this._getAttributeFromList("layout","standard",["standard","button_count","box_count","simple"])},_shouldShowFaces:function(){return this._getLayout()==="standard"&&this._getBoolAttribute("show-faces",
!0)},_handleEdgeCommentDialogPresentation:function(c){if(this.isValid()){var e=document.createElement("span");this._commentSlave=this._createEdgeCommentWidget(c,e);this.dom.appendChild(e);this._commentSlave.process();this._commentWidgetNode=e}},_createEdgeCommentWidget:function(c,e){var f={commentNode:e,externalUrl:c.externalURL,width:400,height:225,masterFrameName:c.masterFrameName,layout:this._getLayout(),relativeHeightOffset:this._getHeightOffset(c),relativeWidthOffset:this._getWidthOffset(c)};
return new FB.XFBML.EdgeCommentWidget(f)},_getHeightOffset:function(c){if(c&&c.preComputedHeightOffset)return parseInt(c.preComputedHeightOffset,10)+"px";return{standard:"22px",button_count:"19px",box_count:"-5px",simple:"18px"}[this._getLayout()]},_getCommonEdgeCommentWidgetOpts:function(c,e,f,g){return{colorscheme:this._attr.colorscheme,commentNode:e,controllerID:c.controllerID,nodeImageURL:c.nodeImageURL,nodeRef:this._attr.ref,nodeTitle:c.nodeTitle,nodeURL:c.nodeURL,nodeSummary:c.nodeSummary,width:400,
height:300,relativeHeightOffset:g?this._getHeightOffset(c):this._getHeightOffset(),relativeWidthOffset:f?this._getWidthOffset(c):this._getWidthOffset(),error:c.error,siderender:c.siderender}},_getWidthOffset:function(c){if(c&&c.preComputedWidthOffset)return parseInt(c.preComputedWidthOffset,10)+"px";return{standard:"0px",box_count:"0px",button_count:"0px",simple:"0px"}[this._getLayout()]},_handleEdgeCommentDialogDismissal:function(){this._commentWidgetNode&&(this.dom.removeChild(this._commentWidgetNode),
delete this._commentWidgetNode)},_handleEdgeCommentDialogHide:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="none"},_handleEdgeCommentDialogShow:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="block"},_fireEventAndInvokeHandler:function(c,e){FB.Helper.fireEvent(c,this);FB.Helper.invokeHandler(this.getAttribute(e),this,[this._attr.href])},_onEdgeCreate:function(){this._fireEventAndInvokeHandler("edge.create","on-create")},_onEdgeRemove:function(){this._fireEventAndInvokeHandler("edge.remove",
"on-remove")},_onAuthPrompt:function(){this._fireEventAndInvokeHandler("auth.prompt","on-prompt")}});
FB.subclass("XFBML.SendButtonFormWidget","XFBML.EdgeCommentWidget",function(c){this._base(c);FB.Dom.addCss(this.dom,"fb_send_button_form_widget");FB.Dom.addCss(this.dom,c.colorscheme);FB.Dom.addCss(this.dom,typeof c.siderender!="undefined"&&c.siderender?"siderender":"");this._attr.nodeImageURL=c.nodeImageURL;this._attr.nodeRef=c.nodeRef;this._attr.nodeTitle=c.nodeTitle;this._attr.nodeURL=c.nodeURL;this._attr.nodeSummary=c.nodeSummary;this._attr.channel=this.getChannelUrl();this._attr.controllerID=
c.controllerID;this._attr.colorscheme=c.colorscheme;this._attr.error=c.error;this._attr.siderender=c.siderender},{_showLoader:!0,getUrlBits:function(){return{name:"send_button_form_shell",params:this._attr}},oneTimeSetup:function(){this.subscribe("xd.messageSent",FB.bind(this._onMessageSent,this))},_onMessageSent:function(){FB.Event.fire("message.send",this._attr.nodeURL,this)}});
FB.subclass("XFBML.Send","XFBML.EdgeWidget",null,{setupAndValidate:function(){FB.Dom.addCss(this.dom,"fb_edge_widget_with_comment");this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,font:this.getAttribute("font"),colorscheme:this.getAttribute("colorscheme","light"),href:this.getAttribute("href",window.location.href),ref:this.getAttribute("ref")};return!0},getUrlBits:function(){return{name:"send",params:this._attr}},_createEdgeCommentWidget:function(c,e){var f=this._getCommonEdgeCommentWidgetOpts(c,
e);return new FB.XFBML.SendButtonFormWidget(f)},_getHeightOffset:function(){return"21px"},_getWidthOffset:function(){return"0px"},getSize:function(){return{width:FB.XFBML.Send.Dimensions.width,height:FB.XFBML.Send.Dimensions.height}}});FB.provide("XFBML.Send",{Dimensions:{width:56,height:25}});
FB.subclass("XFBML.Like","XFBML.EdgeWidget",null,{_widgetPipeEnabled:!0,getUrlBits:function(){return{name:"like",params:this._attr}},_createEdgeCommentWidget:function(c,e){if("send"in this._attr&&"widget_type"in c&&c.widget_type=="send"){var f=this._getCommonEdgeCommentWidgetOpts(c,e,!0,!0);return new FB.XFBML.SendButtonFormWidget(f)}else return this._callBase("_createEdgeCommentWidget",c,e)},getIframeTitle:function(){return"Like this content on Facebook."}});
FB.subclass("XFBML.LikeBox","XFBML.IframeWidget",null,{_visibleAfter:"load",setupAndValidate:function(){this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,connections:this.getAttribute("connections"),css:this.getAttribute("css"),height:this.getAttribute("height"),id:this.getAttribute("profile-id"),header:this._getBoolAttribute("header",!0),name:this.getAttribute("name"),show_faces:this._getBoolAttribute("show-faces",!0),stream:this._getBoolAttribute("stream",!0),width:this._getPxAttribute("width",
300),href:this.getAttribute("href"),colorscheme:this.getAttribute("colorscheme","light"),border_color:this.getAttribute("border_color")};if(this._getBoolAttribute("force_wall",!1))this._attr.force_wall=!0;if(this._attr.connections==="0")this._attr.show_faces=!1;else if(this._attr.connections)this._attr.show_faces=!0;if(!this._attr.id&&!this._attr.name&&!this._attr.href)return FB.log('<fb:like-box> requires one of the "id" or "name" attributes.'),!1;var c=this._attr.height;c||(!this._attr.show_faces&&
!this._attr.stream?c=62:(c=95,this._attr.show_faces&&(c+=163),this._attr.stream&&(c+=300),this._attr.header&&this._attr.header!=="0"&&(c+=32)));this._attr.height=c;this.subscribe("xd.likeboxLiked",FB.bind(this._onLiked,this));this.subscribe("xd.likeboxUnliked",FB.bind(this._onUnliked,this));return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},getUrlBits:function(){return{name:"likebox",params:this._attr}},_onLiked:function(){FB.Helper.fireEvent("edge.create",this)},
_onUnliked:function(){FB.Helper.fireEvent("edge.remove",this)}});
FB.subclass("XFBML.LiveStream","XFBML.IframeWidget",null,{_visibleAfter:"load",setupAndValidate:function(){this._attr={height:this._getPxAttribute("height",500),hideFriendsTab:this.getAttribute("hide-friends-tab"),redesigned:this._getBoolAttribute("redesigned-stream"),width:this._getPxAttribute("width",400),xid:this.getAttribute("xid","default"),always_post_to_friends:this._getBoolAttribute("always-post-to-friends",!1),via_url:this.getAttribute("via_url")};return!0},getSize:function(){return{width:this._attr.width,
height:this._attr.height}},getUrlBits:function(){return{name:this._attr.redesigned?"live_stream_box":"livefeed",params:this._attr}}});FB.subclass("XFBML.Login","XFBML.Facepile",null,{_visibleAfter:"load",getSize:function(){return{width:this._attr.width,height:94}},getUrlBits:function(){return{name:"login",params:this._attr}}});
FB.subclass("XFBML.LoginButton","XFBML.ButtonElement",null,{setupAndValidate:function(){if(this._alreadySetup)return!0;this._alreadySetup=!0;this._attr={autologoutlink:this._getBoolAttribute("auto-logout-link"),length:this._getAttributeFromList("length","short",["long","short"]),onlogin:this.getAttribute("on-login"),perms:this.getAttribute("perms"),registration_url:this.getAttribute("registration-url"),status:"unknown"};this._attr.autologoutlink&&FB.Event.subscribe("auth.statusChange",FB.bind(this.process,
this));this._attr.registration_url&&(FB.Event.subscribe("auth.statusChange",this._saveStatus(this.process,!1)),FB.getLoginStatus(this._saveStatus(this.process,!1)));return!0},getButtonMarkup:function(){var c=this.getOriginalHTML();if(c)return c;if(this._attr.registration_url)switch(this._attr.status){case "unknown":return this._getLoginText();case "notConnected":return FB.Intl._tx("Register");case "connected":if(FB.getAccessToken()&&this._attr.autologoutlink)return FB.Intl._tx("Facebook Logout");
return this._getLoginText();default:return FB.log("Unknown status: "+this.status),FB.Intl._tx("Log In")}else return FB.getAccessToken()&&this._attr.autologoutlink?FB.Intl._tx("Facebook Logout"):this._getLoginText()},_getLoginText:function(){return this._attr.length=="short"?FB.Intl._tx("Log In"):FB.Intl._tx("Log In with Facebook")},onClick:function(){if(this._attr.registration_url)switch(this._attr.status){case "unknown":FB.ui({method:"auth.logintoFacebook"},FB.bind(function(){FB.bind(FB.getLoginStatus(this._saveStatus(this._authCallback,
!0),!0),this)},this));break;case "notConnected":window.top.location=this._attr.registration_url;break;case "connected":!FB.getAccessToken()||!this._attr.autologoutlink?this._authCallback():FB.logout(FB.bind(this._authCallback,this));break;default:FB.log("Unknown status: "+this.status)}else!FB.getAccessToken()||!this._attr.autologoutlink?FB.login(FB.bind(this._authCallback,this),{perms:this._attr.perms}):FB.logout(FB.bind(this._authCallback,this))},_authCallback:function(c){FB.Helper.invokeHandler(this._attr.onlogin,
this,[c])},_saveStatus:function(c,e){return FB.bind(function(f){if(e&&this._attr.registration_url&&this._attr.status=="notConnected"&&f.status=="notConnected")window.top.location=this._attr.registration_url;this._attr.status=f.status;if(c)return c=this.bind(c,this),c(f)},this)}});
FB.subclass("XFBML.Name","XFBML.Element",null,{process:function(){FB.copy(this,{_uid:this.getAttribute("uid"),_firstnameonly:this._getBoolAttribute("first-name-only"),_lastnameonly:this._getBoolAttribute("last-name-only"),_possessive:this._getBoolAttribute("possessive"),_reflexive:this._getBoolAttribute("reflexive"),_objective:this._getBoolAttribute("objective"),_linked:this._getBoolAttribute("linked",!0),_subjectId:this.getAttribute("subject-id")});if(this._uid){var c=[];this._firstnameonly?c.push("first_name"):
this._lastnameonly?c.push("last_name"):c.push("name");if(this._subjectId&&(c.push("sex"),this._subjectId==FB.Helper.getLoggedInUser()))this._reflexive=!0;var e;FB.Event.monitor("auth.statusChange",this.bind(function(){if(!this.isValid())return this.fire("render"),!0;if(!this._uid||this._uid=="loggedinuser")this._uid=FB.Helper.getLoggedInUser();this._uid&&(e=FB.Helper.isUser(this._uid)?FB.Data._selectByIndex(c,"user","uid",this._uid):FB.Data._selectByIndex(["name","id"],"profile","id",this._uid),e.wait(this.bind(function(c){this._subjectId==
this._uid?this._renderPronoun(c[0]):this._renderOther(c[0]);this.fire("render")})))}))}else FB.log('"uid" is a required attribute for <fb:name>'),this.fire("render")},_renderPronoun:function(c){var e="",e=this._objective;if(this._subjectId&&(e=!0,this._subjectId===this._uid))this._reflexive=!0;if(this._uid==FB.Connect.get_loggedInUser()&&this._getBoolAttribute("use-you",!0))e=this._possessive?this._reflexive?"your own":"your":this._reflexive?"yourself":"you";else switch(c.sex){case "male":e=this._possessive?
this._reflexive?"his own":"his":this._reflexive?"himself":e?"him":"he";break;case "female":e=this._possessive?this._reflexive?"her own":"her":this._reflexive?"herself":e?"her":"she";break;default:e=this._getBoolAttribute("use-they",!0)?this._possessive?this._reflexive?"their own":"their":this._reflexive?"themselves":e?"them":"they":this._possessive?this._reflexive?"his/her own":"his/her":this._reflexive?"himself/herself":e?"him/her":"he/she"}this._getBoolAttribute("capitalize",!1)&&(e=FB.Helper.upperCaseFirstChar(e));
this.dom.innerHTML=e},_renderOther:function(c){var e="",f="";if(this._uid==FB.Helper.getLoggedInUser()&&this._getBoolAttribute("use-you",!0))e=this._reflexive?this._possessive?"your own":"yourself":this._possessive?"your":"you";else if(c){if(null===c.first_name)c.first_name="";if(null===c.last_name)c.last_name="";this._firstnameonly&&c.first_name!==void 0?e=FB.String.escapeHTML(c.first_name):this._lastnameonly&&c.last_name!==void 0&&(e=FB.String.escapeHTML(c.last_name));e||(e=FB.String.escapeHTML(c.name));
e!==""&&this._possessive&&(e+="'s")}e||(e=FB.String.escapeHTML(this.getAttribute("if-cant-see","Facebook User")));e&&(this._getBoolAttribute("capitalize",!1)&&(e=FB.Helper.upperCaseFirstChar(e)),f=c&&this._linked?FB.Helper.getProfileLink(c,e,this.getAttribute("href",null)):e);this.dom.innerHTML=f}});
FB.subclass("XFBML.ProfilePic","XFBML.Element",null,{process:function(){var c=this.getAttribute("size","thumb"),e=FB.XFBML.ProfilePic._sizeToPicFieldMap[c],f=this._getPxAttribute("width"),g=this._getPxAttribute("height"),c=this.dom.style,i=this.getAttribute("uid");this._getBoolAttribute("facebook-logo")&&(e+="_with_logo");if(f)f+="px",c.width=f;if(g)g+="px",c.height=g;var h=this.bind(function(c){var h=(c=c?c[0]:null)?c[e]:null;h||(h=FB.getDomain("cdn")+FB.XFBML.ProfilePic._defPicMap[e]);var i=(f?
"width:"+f+";":"")+(g?"height:"+f+";":""),h=FB.String.format('<img src="{0}" alt="{1}" title="{1}" style="{2}" class="{3}" />',h,c?FB.String.escapeHTML(c.name):"",i,this.dom.className);this._getBoolAttribute("linked",!0)&&(h=FB.Helper.getProfileLink(c,h,this.getAttribute("href",null)));this.dom.innerHTML=h;FB.Dom.addCss(this.dom,"fb_profile_pic_rendered");this.fire("render")});FB.Event.monitor("auth.statusChange",this.bind(function(){if(!this.isValid())return this.fire("render"),!0;this.getAttribute("uid",
null)=="loggedinuser"&&(i=FB.Helper.getLoggedInUser());FB._userStatus&&i?FB.Data._selectByIndex(["name",e],FB.Helper.isUser(i)?"user":"profile",FB.Helper.isUser(i)?"uid":"id",i).wait(h):h()}))}});
FB.provide("XFBML.ProfilePic",{_defPicMap:{pic:"pics/s_silhouette.jpg",pic_big:"pics/d_silhouette.gif",pic_big_with_logo:"pics/d_silhouette_logo.gif",pic_small:"pics/t_silhouette.jpg",pic_small_with_logo:"pics/t_silhouette_logo.gif",pic_square:"pics/q_silhouette.gif",pic_square_with_logo:"pics/q_silhouette_logo.gif",pic_with_logo:"pics/s_silhouette_logo.gif"},_sizeToPicFieldMap:{n:"pic_big",normal:"pic_big",q:"pic_square",s:"pic",small:"pic",square:"pic_square",t:"pic_small",thumb:"pic_small"}});
FB.subclass("XFBML.Question","XFBML.IframeWidget",null,{_visibleAfter:"load",setupAndValidate:function(){this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,permalink:this.getAttribute("permalink"),width:this.getAttribute("width",400),height:0};return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},getUrlBits:function(){return{name:"question",params:this._attr}}});
FB.subclass("XFBML.Read","XFBML.IframeWidget",null,{getUrlBits:function(){return{name:"read",params:this._attr}},setupAndValidate:function(){function c(c,e){function f(){e();i=null;g=(new Date).getTime()}var g=0,i=null;return function(){if(!i){var e=(new Date).getTime();e-g<c?i=window.setTimeout(f,c-(e-g)):f()}return!0}}this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,font:this.getAttribute("font"),colorscheme:this.getAttribute("colorscheme","light"),href:this.getAttribute("href",window.location.href),
ref:this.getAttribute("ref"),trigger:function(c){c!="manual"&&c!="onvisible"&&(c=c.match(/^\d+(?:\.\d+)?%$/)?parseInt(c,10):80,c=Math.min(Math.max(c,0),100),c/=100);return c}(this.getAttribute("trigger","")),mintime:parseInt(this.getAttribute("mintime"),10)||30};this._showLoader=!1;this.subscribe("iframe.onload",FB.bind(function(){var c=this.dom.firstElementChild;c.style.position="fixed";c.style.bottom="0";c.style.right="10px"},this));var e=FB.bind(function(){FB.Event.unlisten(window,"scroll",e);
FB.Event.unlisten(document.documentElement,"click",e);FB.Event.unlisten(document.documentElement,"mousemove",e);window.setTimeout(FB.bind(this.arbiterInform,this,"platform/plugins/read/action"),this._attr.mintime*1E3);return!0},this);FB.Event.listen(window,"scroll",e);FB.Event.listen(document.documentElement,"click",e);FB.Event.listen(document.documentElement,"mousemove",e);if(this._attr.trigger=="manual"){var f=FB.bind(function(c){c==this._attr.href&&(FB.Event.unsubscribe("xfbml.read.read",f),this.arbiterInform("platform/plugins/read/trigger"));
return!0},this);FB.Event.subscribe("xfbml.read.read",f)}else{var g=c(500,FB.bind(function(){this.calculateVisibility()&&(FB.Event.unlisten(window,"scroll",g),FB.Event.unlisten(window,"resize",g),this.arbiterInform("platform/plugins/read/trigger"));return!0},this));FB.Event.listen(window,"scroll",g);FB.Event.listen(window,"resize",g);g()}this.visible=!1;var i=c(500,FB.bind(function(){if(!this.visible&&this.calculateVisibility())this.visible=!0,this.arbiterInform("platform/plugins/read/visible");else if(this.visible&&
!this.calculateVisibility())this.visible=!1,this.arbiterInform("platform/plugins/read/invisible");return!0},this));FB.Event.listen(window,"scroll",i);FB.Event.listen(window,"resize",i);i();return!0},getSize:function(){return{height:24,width:300}},calculateVisibility:function(){var c=document.documentElement.clientHeight;switch(this._attr.trigger){case "manual":return!1;case "onvisible":return this.dom.getBoundingClientRect().top<=c;default:return(window.scrollY+c)/document.documentElement.scrollHeight>=
this._attr.trigger}}});FB.XFBML.Read.markRead=function(c){FB.Event.fire("xfbml.read.read",c||window.location.href)};
FB.subclass("XFBML.Recommendations","XFBML.IframeWidget",null,{_visibleAfter:"load",_refreshOnAuthChange:!0,setupAndValidate:function(){this._attr={border_color:this.getAttribute("border-color"),colorscheme:this.getAttribute("color-scheme"),filter:this.getAttribute("filter"),font:this.getAttribute("font"),action:this.getAttribute("action"),header:this._getBoolAttribute("header"),height:this._getPxAttribute("height",300),site:this.getAttribute("site",location.hostname),width:this._getPxAttribute("width",
300)};return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},getUrlBits:function(){return{name:"recommendations",params:this._attr}}});
FB.subclass("XFBML.Registration","XFBML.IframeWidget",null,{_visibleAfter:"immediate",_baseHeight:167,_fieldHeight:28,_skinnyWidth:520,_skinnyBaseHeight:173,_skinnyFieldHeight:52,setupAndValidate:function(){this._attr={action:this.getAttribute("action"),border_color:this.getAttribute("border-color"),channel_url:this.getChannelUrl(),client_id:FB._apiKey,fb_only:this._getBoolAttribute("fb-only",!1),fb_register:this._getBoolAttribute("fb-register",!1),fields:this.getAttribute("fields"),height:this._getPxAttribute("height"),
redirect_uri:this.getAttribute("redirect-uri",window.location.href),no_footer:this._getBoolAttribute("no-footer"),no_header:this._getBoolAttribute("no-header"),onvalidate:this.getAttribute("onvalidate"),width:this._getPxAttribute("width",600)};this._attr.onvalidate&&this.subscribe("xd.validate",this.bind(function(c){var e=FB.JSON.parse(c.value),f=this.bind(function(e){FB.Arbiter.inform("Registration.Validation",{errors:e,id:c.id},'parent.frames["'+this.getIframeNode().name+'"]',window.location.protocol==
"https:")});(e=FB.Helper.executeFunctionByName(this._attr.onvalidate,e,f))&&f(e)}));this.subscribe("xd.authLogin",FB.bind(this._onAuthLogin,this));this.subscribe("xd.authLogout",FB.bind(this._onAuthLogout,this));return!0},getSize:function(){return{width:this._attr.width,height:this._getHeight()}},_getHeight:function(){if(this._attr.height)return this._attr.height;var c;if(this._attr.fields)try{c=FB.JSON.parse(this._attr.fields)}catch(e){c=this._attr.fields.split(/,/)}else c=["name"];return this._attr.width<
this._skinnyWidth?this._skinnyBaseHeight+c.length*this._skinnyFieldHeight:this._baseHeight+c.length*this._fieldHeight},getUrlBits:function(){return{name:"registration",params:this._attr}},_onAuthLogin:function(){FB.getSession()||FB.getLoginStatus();FB.Helper.fireEvent("auth.login",this)},_onAuthLogout:function(){FB.getSession()||FB.getLoginStatus();FB.Helper.fireEvent("auth.logout",this)}});
FB.subclass("XFBML.ServerFbml","XFBML.IframeWidget",null,{_visibleAfter:"resize",setupAndValidate:function(){this._attr={channel_url:this.getChannelUrl(),fbml:this.getAttribute("fbml"),width:this._getPxAttribute("width")};if(!this._attr.fbml){var c=this.dom.getElementsByTagName("script")[0];if(c&&c.type==="text/fbml")this._attr.fbml=c.innerHTML}if(!this._attr.fbml)return FB.log('<fb:serverfbml> requires the "fbml" attribute.'),!1;return!0},getSize:function(){return{width:this._attr.width,height:this._attr.height}},
getUrlBits:function(){return{name:"serverfbml",params:this._attr}}});
FB.subclass("XFBML.ShareButton","XFBML.Element",null,{process:function(){this._href=this.getAttribute("href",window.location.href);this._type=this.getAttribute("type","icon_link");FB.Dom.addCss(this.dom,"fb_share_count_hidden");this._renderButton(!0)},_renderButton:function(c){if(this.isValid()){var e="",f="",g="",i="",e=FB.Intl._tx("Share"),h="";switch(this._type){case "icon":case "icon_link":i="fb_button_simple";e='<span class="fb_button_text">'+(this._type=="icon_link"?e:"&nbsp;")+"</span>";c=
!1;break;case "link":e=FB.Intl._tx("Share on Facebook");c=!1;break;case "button":e='<span class="fb_button_text">'+e+"</span>";i="fb_button fb_button_small";c=!1;break;case "button_count":e='<span class="fb_button_text">'+e+"</span>";f='<span class="fb_share_count_nub_right">&nbsp;</span><span class="fb_share_count fb_share_count_right">'+this._getCounterMarkup()+"</span>";i="fb_button fb_button_small";break;default:e='<span class="fb_button_text">'+e+"</span>",g='<span class="fb_share_count_nub_top">&nbsp;</span><span class="fb_share_count fb_share_count_top">'+
this._getCounterMarkup()+"</span>",i="fb_button fb_button_small",h="fb_share_count_wrapper"}var j=FB.guid();this.dom.innerHTML=FB.String.format('<span class="{0}">{4}<a id="{1}" class="{2}" target="_blank">{3}</a>{5}</span>',h,j,i,e,g,f);f=document.getElementById(j);f.href=this._href;f.onclick=function(){FB.ui({method:"stream.share",u:this.href});return!1};c||this.fire("render")}else this.fire("render")},_getCounterMarkup:function(){if(!this._count)this._count=FB.Data._selectByIndex(["total_count"],
"link_stat","url",this._href);var c="0";if(this._count.value!==void 0){if(this._count.value.length>0){var e=this._count.value[0].total_count;e>3&&(FB.Dom.removeCss(this.dom,"fb_share_count_hidden"),c=e>=1E7?Math.round(e/1E6)+"M":e>=1E4?Math.round(e/1E3)+"K":e)}}else this._count.wait(FB.bind(this._renderButton,this,!1));return'<span class="fb_share_count_inner">'+c+"</span>"}});
FB.subclass("XFBML.SocialBar","XFBML.EdgeWidget",function(c){if(FB.XFBML.SocialBar.oInstance)return FB.XFBML.SocialBar.oInstance;this.dom=c;FB.XFBML.SocialBar.oInstance=this;return this},{_fetchPreCachedLoader:!1,_showLoader:!1,_initialWidth:860,_initialHeight:34,_barIframe:null,_currentZ:0,_refreshOnAuthChange:!0,_visibleAfter:"load",_getPageWidth:function(){var c=this._barIframe,e=parseInt(FB.Dom.getStyle(c.parentNode,"width"),10);isNaN(e)&&(e=parseInt(c.parentNode.offsetWidth,10));return e},_minimizeToolbar:function(c){var e=
this._barIframe;c.resetWidth=!1;if(c.width=="100%")c.resetWidth=!0,c.width=this._getPageWidth();if(e.offsetWidth!=c.width){FB.Anim.ate(e,{width:c.width+"px"},300,function(e){c.resetWidth&&FB.Dom.setStyle(e,"width","100%")});var f=this.dom.getElementsByTagName("iframe");FB.Array.forEach(f,function(f){if(f.parentNode.id!="fb_social_bar_container")f._isHidden?(FB.Anim.ate(f,{height:f._isClosed?"0px":f._origHeight+"px",width:f._origWidth+"px",right:f._origRight+"px",left:f._origLeft+"px",opacity:100},
300),f._isHidden=!1):(f._origHeight=parseInt(FB.Dom.getStyle(f,"height"),10),f._origWidth=parseInt(FB.Dom.getStyle(f,"width"),10),f._origRight=parseInt(FB.Dom.getStyle(f,"right"),10),f._origLeft=parseInt(FB.Dom.getStyle(f,"left"),10),f._isHidden=!0,FB.Anim.ate(f,{height:"0px",width:"0px",right:c.width+"px",left:e.offsetWidth-c.width+"px",opacity:0},300))})}},_spawnChild:function(c){var e=this._barIframe,f,g,i=document.createElement("i");!c.position||c.position!="left"?(g=parseInt(FB.Dom.getStyle(e.parentNode,
"paddingRight"),10)+(c.position?0:parseInt(c.minimizeWidth,10)),f="right"):(g=parseInt(FB.Dom.getStyle(e.parentNode,"paddingLeft"),10)+parseInt(c.offsetLeft?c.offsetLeft:0,10),f="left");if(c.name in window.frames){e=this.dom.getElementsByTagName?this.dom.getElementsByTagName("iframe"):document.getElementsByTagName("iframe");for(i=0;i<e.length;i++){var h=e[i];if(h.name==c.name)h.style.width=c.width,h._isClosed=!1,FB.Anim.ate(h,{height:c.height,opacity:100})}}else{e.parentNode.appendChild(i);var j=
this;FB.Content.insertIframe({root:i,name:c.name,url:c.src,className:"fb_social_bar_iframe",width:parseInt(c.width,10),height:0,onload:function(e){e.style.position="absolute";e.style[j._attr.position]=j._initialHeight+"px";e.style.height="0px";e.style[f]=g+"px";e.style.zIndex=++j._currentZ;FB.Dom.setStyle(e,"opacity",0);FB.Anim.ate(e,{height:c.height,opacity:100});e._isClosed=!1}})}FB.Array.forEach(document.getElementsByTagName("object"),function(c){FB.Dom.setStyle(c,"visibility","hidden")})},_closeChild:function(c){for(var e=
this.dom.getElementsByTagName?this.dom.getElementsByTagName("iframe"):document.getElementsByTagName("iframe"),f=function(e){c.remove&&e.parentNode.parentNode.removeChild(e.parentNode)},g=0;g<e.length;g++)if(e[g].name==c.name)e[g]._isClosed=!0,FB.Anim.ate(e[g],{height:"0px",opacity:0},300,f);FB.Array.forEach(document.getElementsByTagName("object"),function(c){FB.Dom.setStyle(c,"visibility","")})},_expand:function(){FB.Dom.setStyle(this._barIframe,"height","100%");FB.Dom.setStyle(this._barIframe.parentNode,
"height","100%")},_shrink:function(){FB.Dom.setStyle(this._barIframe,"height","34px");FB.Dom.setStyle(this._barIframe.parentNode,"height","34px")},_iframeOnload:function(c){function e(){this.widgets={}}this._barIframe=c;var f=c.parentNode;f.id="fb_social_bar_container";FB.Dom.setStyle(c,"width","100%");this._currentZ+=parseInt(FB.Dom.getStyle(c,"zIndex"),10);if(isNaN(this._currentZ))this._currentZ=99999;FB.Dom.setStyle(c,"opacity",100);c.className="fb_social_bar_iframe";window.XMLHttpRequest?FB.Dom.setStyle(f,
this._attr.position,"0px"):(FB.Dom.setStyle(f,"position","absolute"),f.className="fb_social_bar_iframe_"+this._attr.position+"_ie6",f.parentNode.removeChild(f),document.body.appendChild(f));FB.Dom.setStyle(this.dom,"display","inline");FB.copy(e.prototype,{addWidget:function(c,e,f){this.widgets[c]=FB.copy({widget:e},f);return this},send:function(c){var e=FB.guid(),f=FB.copy({widget_pipe:FB.JSON.stringify(this.widgets)},c);FB.Content.insertIframe({url:"about:blank",root:document.getElementById("fb-root")||
document.body,name:e,className:"fb_hidden",onload:function(){FB.Content.submitToTarget({url:FB._domain.www+"widget_pipe.php",target:e,params:f},!0)}})},addSocialBarWidgets:function(c,e){for(var f=0;f<e.length;f++)this.addWidget(c+":"+e[f],e[f]);return this}});(new e).addSocialBarWidgets(c.name,["social_bar_controls","social_bar_profile","social_bar_like","social_bar_activity","social_bar_jewels"]).send({href:window.location,site:this.getAttribute("site",location.hostname),channel:this.getChannelUrl(),
api_key:FB._apiKey,locale:FB._locale,sdk:"joey",session_key:FB._session&&FB._session.session_key})},oneTimeSetup:function(){FB.Dom.setStyle(this.dom,"display","none");this.subscribe("xd.minimizeToolbar",FB.bind(this._minimizeToolbar,this));this.subscribe("xd.spawnChild",FB.bind(this._spawnChild,this));this.subscribe("xd.closeChild",FB.bind(this._closeChild,this));this.subscribe("xd.logoutSocialBar",FB.logout);this.subscribe("xd.loginSocialBar",FB.login);this.subscribe("iframe.onload",FB.bind(this._iframeOnload,
this));this.subscribe("xd.presentEdgeCommentDialog",FB.bind(this._onEdgeCreate,this));this.subscribe("xd.presentEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogPresentation,this));this.subscribe("xd.dismissEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogDismissal,this));this.subscribe("xd.hideEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogHide,this));this.subscribe("xd.showEdgeCommentDialog",FB.bind(this._handleEdgeCommentDialogShow,this));this.subscribe("xd.expandBar",FB.bind(this._expand,
this));this.subscribe("xd.shrinkBar",FB.bind(this._shrink,this))},_handleEdgeCommentDialogPresentation:function(c){if(this.isValid()){var e=document.createElement("i");this._commentSlave=new FB.XFBML.EdgeCommentWidget({commentNode:e,externalUrl:c.externalURL,width:330,height:200,masterFrameName:c.masterFrameName,relativeHeightOffset:"0px"});c=parseInt(FB.Dom.getStyle(this._barIframe.parentNode,"paddingLeft"),10)+parseInt(c.left,10);FB.Dom.setStyle(e,"position","absolute");FB.Dom.removeCss(e,"fb_iframe_widget");
FB.Dom.setStyle(e,"top","");FB.Dom.setStyle(e,this._attr.position,this._initialHeight-1+"px");FB.Dom.setStyle(e,"left",c+"px");FB.Dom.setStyle(e,"zIndex",++this._currentZ);FB.Dom.setStyle(e,"opacity",0);this.dom.parentNode.appendChild(e);this._commentSlave.process();this._commentWidgetNode=e}},_handleEdgeCommentDialogHide:function(){this._commentWidgetNode&&(FB.Dom.removeCss(this._commentWidgetNode,"hidden_elem"),FB.Anim.ate(this._commentWidgetNode,{opacity:0},300,FB.bind(function(){this._commentWidgetNode.style.display=
"none"},this)))},_handleEdgeCommentDialogShow:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="block",FB.Anim.ate(this._commentWidgetNode,{opacity:100},500)},_handleEdgeCommentDialogDismissal:function(){this._commentWidgetNode&&(this._commentWidgetNode.parentNode.removeChild(this._commentWidgetNode),delete this._commentWidgetNode)},getUrlBits:function(){return{name:"social_bar",params:this._attr}},getSize:function(){return{width:this._initialWidth,height:this._initialHeight}},
getIframeName:function(){return"fb_social_bar_iframe"},setupAndValidate:function(){this._attr={like:this._getBoolAttribute("like"),precache:this._getBoolAttribute("precache"),send:this._getBoolAttribute("send"),activity:this._getBoolAttribute("activity"),chat:this._getBoolAttribute("chat"),position:this._getAttributeFromList("position","bottom",["top","bottom"]),href:window.location,site:this.getAttribute("site",location.hostname),channel:this.getChannelUrl()};return!0}});
FB.provide("",{_domain:{api:"https://api.facebook.com/",api_read:"https://api-read.facebook.com/",cdn:"http://static.ak.fbcdn.net/",cdn_foreign:"http://connect.facebook.net/",graph:"https://graph.facebook.com/",https_cdn:"https://s-static.ak.fbcdn.net/",https_staticfb:"https://s-static.ak.facebook.com/",https_www:"https://www.facebook.com/",staticfb:"http://static.ak.facebook.com/",www:"http://www.facebook.com/",m:"http://m.facebook.com/",https_m:"https://m.facebook.com/"},_locale:"en_US",_localeIsRtl:!1},
!0);FB.provide("Flash",{_minVersions:[[10,0,22,87]],_swfPath:"rsrc.php/v1/yK/r/RIxWozDt5Qq.swf"},!0);FB.provide("XD",{_xdProxyUrl:"connect/xd_proxy.php?version=3"},!0);FB.provide("Arbiter",{_canvasProxyUrl:"connect/canvas_proxy.php?version=3"},!0);FB.provide("Auth",{_xdStorePath:"xd_localstorage/"},!0);
FB.initSitevars={parseXFBMLBeforeDomReady:!1,iframePermissions:{read_stream:!1,manage_mailbox:!1,manage_friendlists:!1,read_mailbox:!1,publish_checkins:!0,status_update:!0,photo_upload:!0,video_upload:!0,sms:!1,create_event:!0,rsvp_event:!0,offline_access:!0,email:!0,xmpp_login:!1,create_note:!0,share_item:!0,export_stream:!1,publish_stream:!0,publish_likes:!0,ads_management:!1,contact_email:!0,access_private_data:!1,read_insights:!1,read_requests:!1,read_friendlists:!0,manage_pages:!1,physical_login:!1,
manage_groups:!1,read_deals:!1}};FB.widgetPipeEnabledApps={111476658864976:1,cca6477272fc5cb805f85a84f20fca1d:1,179150165472010:1};FB.widgetPipeTagCountThreshold=4;FB.provide("Canvas.EarlyFlush",{_appIdsBlacklist:[],_sampleRate:500},!0);FB.provide("XFBML.ConnectBar",{imgs:{buttonUrl:"rsrc.php/v1/yY/r/h_Y6u1wrZPW.png",missingProfileUrl:"rsrc.php/v1/yo/r/UlIqmHJn-SK.gif"}},!0);
FB.provide("XFBML.ProfilePic",{_defPicMap:{pic:"rsrc.php/v1/yh/r/C5yt7Cqf3zU.jpg",pic_big:"rsrc.php/v1/yL/r/HsTZSDw4avx.gif",pic_big_with_logo:"rsrc.php/v1/y5/r/SRDCaeCL7hM.gif",pic_small:"rsrc.php/v1/yi/r/odA9sNLrE86.jpg",pic_small_with_logo:"rsrc.php/v1/yD/r/k1xiRXKnlGd.gif",pic_square:"rsrc.php/v1/yo/r/UlIqmHJn-SK.gif",pic_square_with_logo:"rsrc.php/v1/yX/r/9dYJBPDHXwZ.gif",pic_with_logo:"rsrc.php/v1/yu/r/fPPR9f2FJ3t.gif"}},!0);
FB.Dom&&FB.Dom.addCssRules&&FB.Dom.addCssRules('.fb_hidden{position:absolute;top:-10000px;z-index:10001}\n.fb_reset{background:none;border-spacing:0;border:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size: 11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}\n.fb_link img{border:none}\n.fb_dialog{background:rgba(82, 82, 82, .7);position:absolute;top:-10000px;z-index:10001}\n.fb_dialog_advanced{padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px}\n.fb_dialog_content{background:#fff;color:#333}\n.fb_dialog_close_icon{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yL/r/s816eWC-2sl.gif);cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px;top:8px\\9;right:7px\\9}\n.fb_dialog_mobile .fb_dialog_close_icon{top:5px;left:5px;right:auto}\n.fb_dialog_close_icon:hover{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yL/r/s816eWC-2sl.gif)}\n.fb_dialog_close_icon:active{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yL/r/s816eWC-2sl.gif)}\n.fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size: 24px;padding:20px}\n.fb_dialog_top_left,\n.fb_dialog_top_right,\n.fb_dialog_bottom_left,\n.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}\n.fb_dialog_top_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/ye/r/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}\n.fb_dialog_top_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/ye/r/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}\n.fb_dialog_bottom_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/ye/r/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}\n.fb_dialog_bottom_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/ye/r/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right,\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right{width:10px;height:100%}\n.fb_dialog_vert_left{margin-left:-10px}\n.fb_dialog_vert_right{right:0;margin-right:-10px}\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{width:100%;height:10px}\n.fb_dialog_horiz_top{margin-top:-10px}\n.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}\n.fb_dialog_iframe{line-height:0}\n.fb_dialog.loading.fb_dialog_mobile .fb_dialog_iframe{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/yQ/r/pQebR9nCkAT.gif) no-repeat 50% 50%}\n.fb_dialog.loading.fb_dialog_mobile iframe{visibility:hidden}\n.fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #3b5998;color:#fff;font-size: 14px;font-weight:bold;margin:0}\n.fb_dialog_content .dialog_title > span{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/yd/r/Cou7n-nqK52.gif) no-repeat 5px 50%;float:left;padding:5px 0 7px 26px}\n.fb_dialog_content .dialog_content{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/y9/r/jKEcVPZFk-2.gif) no-repeat 50% 50%;border:1px solid #555;border-bottom:0;border-top:0;height:150px}\n.fb_dialog_content .dialog_footer{background:#f2f2f2;border:1px solid #555;border-top-color:#ccc;height:40px}\n#fb_dialog_loader_close{float:right}\n.fb_dialog.fb_dialog_mobile .fb_dialog_close_icon{visibility:hidden}\n.fb_dialog.loading.fb_dialog_mobile .fb_dialog_close_icon{visibility:visible}\n.fb_iframe_widget{position:relative;display:-moz-inline-block;display:inline-block}\n.fb_iframe_widget iframe{position:relative;vertical-align:text-bottom}\n.fb_iframe_widget span{position:relative}\n.fb_hide_iframes iframe{position:relative;left:-10000px}\n.fb_iframe_widget_loader{position:relative;display:inline-block}\n.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}\n.fb_iframe_widget_loader .FB_Loader{background:url(http://static.ak.fbcdn.net/rsrc.php/v1/y9/r/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}\n.fb_button_simple,\n.fb_button_simple_rtl{background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yH/r/eIpbnVKI9lR.png);background-repeat:no-repeat;cursor:pointer;outline:none;text-decoration:none}\n.fb_button_simple_rtl{background-position:right 0}\n.fb_button_simple .fb_button_text{margin:0 0 0 20px;padding-bottom:1px}\n.fb_button_simple_rtl .fb_button_text{margin:0 10px 0 0}\na.fb_button_simple:hover .fb_button_text,\na.fb_button_simple_rtl:hover .fb_button_text,\n.fb_button_simple:hover .fb_button_text,\n.fb_button_simple_rtl:hover .fb_button_text{text-decoration:underline}\n.fb_button,\n.fb_button_rtl{background:#29447e url(http://static.ak.fbcdn.net/rsrc.php/v1/yL/r/FGFbc80dUKj.png);background-repeat:no-repeat;cursor:pointer;display:inline-block;padding:0 0 0 1px;text-decoration:none;outline:none}\n.fb_button .fb_button_text,\n.fb_button_rtl .fb_button_text{background:#5f78ab url(http://static.ak.fbcdn.net/rsrc.php/v1/yL/r/FGFbc80dUKj.png);border-top:solid 1px #879ac0;border-bottom:solid 1px #1a356e;color:#fff;display:block;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;font-weight:bold;padding:2px 6px 3px 6px;margin:1px 1px 0 21px;text-shadow:none}\na.fb_button,\na.fb_button_rtl,\n.fb_button,\n.fb_button_rtl{text-decoration:none}\na.fb_button:active .fb_button_text,\na.fb_button_rtl:active .fb_button_text,\n.fb_button:active .fb_button_text,\n.fb_button_rtl:active .fb_button_text{border-bottom:solid 1px #29447e;border-top:solid 1px #45619d;background:#4f6aa3;text-shadow:none}\n.fb_button_xlarge,\n.fb_button_xlarge_rtl{background-position:left -60px;font-size: 24px;line-height:30px}\n.fb_button_xlarge .fb_button_text{padding:3px 8px 3px 12px;margin-left:38px}\na.fb_button_xlarge:active{background-position:left -99px}\n.fb_button_xlarge_rtl{background-position:right -268px}\n.fb_button_xlarge_rtl .fb_button_text{padding:3px 8px 3px 12px;margin-right:39px}\na.fb_button_xlarge_rtl:active{background-position:right -307px}\n.fb_button_large,\n.fb_button_large_rtl{background-position:left -138px;font-size: 13px;line-height:16px}\n.fb_button_large .fb_button_text{margin-left:24px;padding:2px 6px 4px 6px}\na.fb_button_large:active{background-position:left -163px}\n.fb_button_large_rtl{background-position:right -346px}\n.fb_button_large_rtl .fb_button_text{margin-right:25px}\na.fb_button_large_rtl:active{background-position:right -371px}\n.fb_button_medium,\n.fb_button_medium_rtl{background-position:left -188px;font-size: 11px;line-height:14px}\na.fb_button_medium:active{background-position:left -210px}\n.fb_button_medium_rtl{background-position:right -396px}\n.fb_button_text_rtl,\n.fb_button_medium_rtl .fb_button_text{padding:2px 6px 3px 6px;margin-right:22px}\na.fb_button_medium_rtl:active{background-position:right -418px}\n.fb_button_small,\n.fb_button_small_rtl{background-position:left -232px;font-size: 10px;line-height:10px}\n.fb_button_small .fb_button_text{padding:2px 6px 3px;margin-left:17px}\na.fb_button_small:active,\n.fb_button_small:active{background-position:left -250px}\n.fb_button_small_rtl{background-position:right -440px}\n.fb_button_small_rtl .fb_button_text{padding:2px 6px;margin-right:18px}\na.fb_button_small_rtl:active{background-position:right -458px}\n.fb_share_count_wrapper{position:relative;float:left}\n.fb_share_count{background:#b0b9ec none repeat scroll 0 0;color:#333;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;text-align:center}\n.fb_share_count_inner{background:#e8ebf2;display:block}\n.fb_share_count_right{margin-left:-1px;display:inline-block}\n.fb_share_count_right .fb_share_count_inner{border-top:solid 1px #e8ebf2;border-bottom:solid 1px #b0b9ec;margin:1px 1px 0 1px;font-size: 10px;line-height:10px;padding:2px 6px 3px;font-weight:bold}\n.fb_share_count_top{display:block;letter-spacing:-1px;line-height:34px;margin-bottom:7px;font-size: 22px;border:solid 1px #b0b9ec}\n.fb_share_count_nub_top{border:none;display:block;position:absolute;left:7px;top:35px;margin:0;padding:0;width:6px;height:7px;background-repeat:no-repeat;background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yU/r/bSOHtKbCGYI.png)}\n.fb_share_count_nub_right{border:none;display:inline-block;padding:0;width:5px;height:10px;background-repeat:no-repeat;background-image:url(http://static.ak.fbcdn.net/rsrc.php/v1/yX/r/i_oIVTKMYsL.png);vertical-align:top;background-position:right 5px;z-index:10;left:2px;margin:0 2px 0 0;position:relative}\n.fb_share_no_count{display:none}\n.fb_share_size_Small .fb_share_count_right .fb_share_count_inner{font-size: 10px}\n.fb_share_size_Medium .fb_share_count_right .fb_share_count_inner{font-size: 11px;padding:2px 6px 3px;letter-spacing:-1px;line-height:14px}\n.fb_share_size_Large .fb_share_count_right .fb_share_count_inner{font-size: 13px;line-height:16px;padding:2px 6px 4px;font-weight:normal;letter-spacing:-1px}\n.fb_share_count_hidden .fb_share_count_nub_top,\n.fb_share_count_hidden .fb_share_count_top,\n.fb_share_count_hidden .fb_share_count_nub_right,\n.fb_share_count_hidden .fb_share_count_right{visibility:hidden}\n.fb_connect_bar_container div,\n.fb_connect_bar_container span,\n.fb_connect_bar_container a,\n.fb_connect_bar_container img,\n.fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}\n.fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}\n.fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px":body.scrollTop+"px")}\n.fb_connect_bar{position:relative;margin:auto;height:100%;width:100%;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:"lucida grande", tahoma, verdana, arial, sans-serif !important;font-size: 13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}\n.fb_connect_bar a:hover{color:#fff}\n.fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}\n.fb_connect_bar div a,\n.fb_connect_bar span,\n.fb_connect_bar span a{color:#bac6da;font-size: 11px;text-decoration:none}\n.fb_connect_bar .fb_buttons{float:right;margin-top:7px}\n.fb_edge_widget_with_comment{position:relative;*z-index:1000}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget{position:absolute}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_ltr{left:-4px}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_rtl{left:2px}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget{left:0;z-index:1}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget .FB_Loader{left:0;top:1px;margin-top:6px;margin-left:0;background-position:50% 50%;background-color:#fff;height:150px;width:394px;border:1px #666 solid;border-bottom:2px solid #283e6c;z-index:1}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget.dark .FB_Loader{background-color:#000;border-bottom:2px solid #ccc}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget.siderender\n.FB_Loader{margin-top:0}\n#fb_social_bar_container{position:fixed;left:0;right:0;height:34px;padding:0 25px;z-index:999999999}\n.fb_social_bar_iframe{position:relative;float:right;opacity:0;-moz-opacity:0;filter:alpha(opacity=0)}\n.fb_social_bar_iframe_bottom_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}\n.fb_social_bar_iframe_top_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}\n',["fb.css.base",
"fb.css.dialog","fb.css.iframewidget","fb.css.button","fb.css.sharebutton","fb.css.connectbarwidget","fb.css.edgecommentwidget","fb.css.sendbuttonformwidget","fb.css.socialbarwidget"]);var _sf_startpt=(new Date).getTime();
