/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
 * Contains: fontface | backgroundsize | borderimage | borderradius | boxshadow | flexbox | hsla | multiplebgs | opacity | rgba | cssanimations | csscolumns | generatedcontent | cssgradients | cssreflections | csstransforms | csstransforms3d | csstransitions | hashchange | history | iepp | mq | cssclasses | teststyles | testprop | testallprops | hasevent | prefixes | domprefixes | load
 */
function $A(a){if(!a)return[];if(a.toArray)return a.toArray();var b=a.length||0,c=new Array(b);while(b--)c[b]=a[b];return c}function $w(a){return Object.isString(a)?(a=a.strip(),a?a.split(/\s+/):[]):[]}function $H(a){return new Hash(a)}function $(a){if(arguments.length>1){for(var b=0,c=[],d=arguments.length;b<d;b++)c.push($(arguments[b]));return c}return Object.isString(a)&&(a=document.getElementById(a)),Element.extend(a)}function $$(){return Selector.findChildElements(document,$A(arguments))}function clearText(a){a.defaultValue==a.value&&(a.value="")}function set_rating_stars(a){$$("#stars a").slice(0,a+1).each(function(a){a.addClassName("user-rated")})}function show_rating_stars(a){$$("#stars a").slice(0,a+1).each(function(a){a.addClassName("display-rating-hover")})}function clear_rating_stars(){$$("#stars a").each(function(a){a.removeClassName("display-rating-hover")})}function ArrayList(){this.clear()}function CustomEvent(){this.handlers=new ArrayList}function Binding(a,b){this.event=a,this.handler=b}function MessageReceiver(){}function Marshaller(){}function Model(){}function View(){}function Controller(){}function Timer(a,b){b=b||{},this.interval=a||33,this.context=b.context||window,this.tick=new CustomEvent,this.started=!1,this.intervalId=null}function Duration(){}function Series(){}function SeriesItem(){}function VideoIdeaSeriesItem(){}function TextIdeaSeriesItem(){}function Video(){}function BrightcoveVideo(){}function TrimmedVideo(){}function YouTubeVideo(){}function VimeoVideo(){}function VideoIdea(){}function Frame(){}function VideoIdeaView(){}function TextField(){}function VideoPlayer(){}function VideoPlayerFactory(){}function BrightcoveVideoPlayer(){}function StandardBrightcoveVideoPlayer(){}function BareBrightcoveVideoPlayer(){}function TrimmedVideoPlayer(){}function ScriptableYouTubeVideoPlayer(){}function EmbeddedYouTubeVideoPlayer(){}function ChromelessYouTubeVideoPlayer(){}function IframeYouTubeVideoPlayer(){}function MoogaloopVimeoVideoPlayer(){}function UniversalVimeoVideoPlayer(){}function BigThinkVideoPlayer(){}function PlayPauseView(){}function PagerView(){}function PlaylistView(){}function SeriesItemView(){}function VideoIdeaSeriesItemView(){}function TextIdeaSeriesItemView(){}function SeriesItemContainerView(){}function PlaylistController(){}function Application(){}function SeriesApplication(){}function UserApplication(){}window.Modernizr=function(a,b,c){function d(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+v.join(c+" ")+c).split(" ");return e(d,b)}function e(a,b){for(var d in a)if(q[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function f(a,b){return!!~(""+a).indexOf(b)}function g(a,b){return typeof a===b}function h(a,b){return i(u.join(a+";")+(b||""))}function i(a){q.cssText=a}var j="2.0.6",k={},l=!0,m=b.documentElement,n=b.head||b.getElementsByTagName("head")[0],o="modernizr",p=b.createElement(o),q=p.style,r,s=":)",t=Object.prototype.toString,u=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),v="Webkit Moz O ms Khtml".split(" "),w={},x={},y={},z=[],A=function(a,c,d,e){var f,g,h,i=b.createElement("div");if(parseInt(d,10))while(d--)h=b.createElement("div"),h.id=e?e[d]:o+(d+1),i.appendChild(h);return f=["&shy;","<style>",a,"</style>"].join(""),i.id=o,i.innerHTML+=f,m.appendChild(i),g=c(i,a),i.parentNode.removeChild(i),!!g},B=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;return A("@media "+b+" { #"+o+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"}),c},C=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var f=a in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),f=g(e[a],"function"),g(e[a],c)||(e[a]=c),e.removeAttribute(a))),e=null,f}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),D,E={}.hasOwnProperty,F;!g(E,c)&&!g(E.call,c)?F=function(a,b){return E.call(a,b)}:F=function(a,b){return b in a&&g(a.constructor.prototype[b],c)};var G=function(a,c){var d=a.join(""),e=c.length;A(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],f=d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"",g=a.childNodes,h={};while(e--)h[g[e].id]=g[e];k.csstransforms3d=h.csstransforms3d.offsetLeft===9,k.generatedcontent=h.generatedcontent.offsetHeight>=1,k.fontface=/src/i.test(f)&&f.indexOf(c.split(" ")[0])===0},e,c)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",u.join("transform-3d),("),o,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',s,'";visibility:hidden}'].join("")],["fontface","csstransforms3d","generatedcontent"]);w.flexbox=function(){function a(a,b,c,d){a.style.cssText=u.join(b+":"+c+";")+(d||"")}function c(a,b,c,d){b+=":",a.style.cssText=(b+u.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");c(d,"display","box","width:42px;padding:0;"),a(e,"box-flex","1","width:10px;"),d.appendChild(e),m.appendChild(d);var f=e.offsetWidth===42;return d.removeChild(e),m.removeChild(d),f},w.hashchange=function(){return C("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},w.history=function(){return!!a.history&&!!history.pushState},w.rgba=function(){return i("background-color:rgba(150,255,150,.5)"),f(q.backgroundColor,"rgba")},w.hsla=function(){return i("background-color:hsla(120,40%,100%,.5)"),f(q.backgroundColor,"rgba")||f(q.backgroundColor,"hsla")},w.multiplebgs=function(){return i("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(q.background)},w.backgroundsize=function(){return d("backgroundSize")},w.borderimage=function(){return d("borderImage")},w.borderradius=function(){return d("borderRadius")},w.boxshadow=function(){return d("boxShadow")},w.opacity=function(){return h("opacity:.55"),/^0.55$/.test(q.opacity)},w.cssanimations=function(){return d("animationName")},w.csscolumns=function(){return d("columnCount")},w.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return i((a+u.join(b+a)+u.join(c+a)).slice(0,-a.length)),f(q.backgroundImage,"gradient")},w.cssreflections=function(){return d("boxReflect")},w.csstransforms=function(){return!!e(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},w.csstransforms3d=function(){var a=!!e(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);return a&&"webkitPerspective"in m.style&&(a=k.csstransforms3d),a},w.csstransitions=function(){return d("transitionProperty")},w.fontface=function(){return k.fontface},w.generatedcontent=function(){return k.generatedcontent};for(var H in w)F(w,H)&&(D=H.toLowerCase(),k[D]=w[H](),z.push((k[D]?"":"no-")+D));return i(""),p=r=null,a.attachEvent&&function(){var a=b.createElement("div");return a.innerHTML="<elem></elem>",a.childNodes.length!==1}()&&function(a,b){function d(a){var b=-1;while(++b<h)a.createElement(g[b])}a.iepp=a.iepp||{};var e=a.iepp,f=e.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",g=f.split("|"),h=g.length,i=new RegExp("(^|\\s)("+f+")","gi"),j=new RegExp("<(/*)("+f+")","gi"),k=/^\s*[\{\}]\s*$/,l=new RegExp("(^|[^\\n]*?\\s)("+f+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),m=b.createDocumentFragment(),n=b.documentElement,o=n.firstChild,p=b.createElement("body"),q=b.createElement("style"),r=/print|all/,s;e.getCSS=function(a,b){if(a+""===c)return"";var d=-1,f=a.length,g,h=[];while(++d<f){g=a[d];if(g.disabled)continue;b=g.media||b,r.test(b)&&h.push(e.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},e.parseCSS=function(a){var b=[],c;while((c=l.exec(a))!=null)b.push(((k.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(i,"$1.iepp_$2")+c[4]);return b.join("\n")},e.writeHTML=function(){var a=-1;s=s||b.body;while(++a<h){var c=b.getElementsByTagName(g[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+g[a])}m.appendChild(s),n.appendChild(p),p.className=s.className,p.id=s.id,p.innerHTML=s.innerHTML.replace(j,"<$1font")},e._beforePrint=function(){q.styleSheet.cssText=e.parseCSS(e.getCSS(b.styleSheets,"all")),e.writeHTML()},e.restoreHTML=function(){p.innerHTML="",n.removeChild(p),n.appendChild(s)},e._afterPrint=function(){e.restoreHTML(),q.styleSheet.cssText=""},d(b),d(m),e.disablePP||(o.insertBefore(q,o.firstChild),q.media="print",q.className="iepp-printshim",a.attachEvent("onbeforeprint",e._beforePrint),a.attachEvent("onafterprint",e._afterPrint))}(a,b),k._version=j,k._prefixes=u,k._domPrefixes=v,k.mq=B,k.hasEvent=C,k.testProp=function(a){return e([a])},k.testAllProps=d,k.testStyles=A,m.className=m.className.replace(/\bno-js\b/,"")+(l?" js "+z.join(" "):""),k}(this,this.document),function(a,b,c){function d(a){return!a||a=="loaded"||a=="complete"}function e(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&h()}function f(a){var c=b.createElement("script"),f;c.src=a.s,c.onreadystatechange=c.onload=function(){!f&&d(c.readyState)&&(f=1,e(),c.onload=c.onreadystatechange=null)},m(function(){f||(f=1,e())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function g(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var f=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,e()):f(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){e()},0)):f(a)}},0)};f(c)}else c.onload=function(){d||(d=1,m(function(){e()},0))},a.e&&c.onload();m(function(){d||(d=1,e())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function h(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?g(a):f(a)},0):(a(),e()):q=0}function i(a,c,f,g,i,j){function k(){!o&&d(l.readyState)&&(r.r=o=1,!q&&e(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:f,s:c,e:j};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=f),l.onload=l.onreadystatechange=k,a=="img"?l.onerror=k:a=="script"&&(l.onerror=function(){r.e=r.r=1,h()}),p.splice(g,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,e())},H.errorTimeout)}function j(a,b,c){var d=b=="c"?z:y;return q=0,b=b||"j",C(a)?i(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=H;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function b(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function d(a,d,e,f,g){var h=b(a),i=h.autoCallback;if(!h.bypass){d&&(d=D(d)?d:d[a]||d[f]||d[a.split("/").pop().split("?")[0]]);if(h.instead)return h.instead(a,d,e,f,g);e.load(h.url,h.forceCSS||!h.forceJS&&/css$/.test(h.url)?"c":c,h.noexec),(D(d)||D(i))&&e.load(function(){k(),d&&d(h.origUrl,g,f),i&&i(h.origUrl,g,f)})}}function e(a,b){function c(a){if(C(a))d(a,h,b,0,e);else if(B(a))for(i in a)a.hasOwnProperty(i)&&d(a[i],h,b,i,e)}var e=!!a.test,f=e?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var f,g,h=this.yepnope.loader;if(C(a))d(a,0,h,0);else if(A(a))for(f=0;f<a.length;f++)g=a[f],C(g)?d(g,0,h,0):A(g)?H(g):B(g)&&e(g,h);else B(a)&&e(a,h)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=k()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes),e.merge(this,a);h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function d(c,d){return d&&d instanceof e&&!(d instanceof a)&&(d=a(d)),e.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;return k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];if(!r)return;j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"
,l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i)}),b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return;if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),g===null?b:g)},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(this instanceof f.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0;else return new f.Event(a,b)},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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 contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length!==1||w[0]!=="~"&&w[0]!=="+"||!d.parentNode?d:d.parentNode,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);return l&&(m(l,h,e,f),m.uniqueSort(e)),e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=
b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);return L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={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,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}return d=e=null,h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;return f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){return f.isFunction(d)&&(g=g||e,e=d,d=b),f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s===2)return;s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(e,v,d)!==!1&&s!==2){for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v}return v.abort(),!1},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";return b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState
(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})}(window),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),function(){function a(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function b(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d]));return c}function c(b,c,f){if(i.isSupported(c.version))b.innerHTML=i.getHTML(c,f);else if(c.expressInstall&&i.isSupported([6,65]))b.innerHTML=i.getHTML(a(c,{src:c.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{b.innerHTML.replace(/\s/g,"")||(b.innerHTML="<h2>Flash version "+c.version+" or greater is required</h2><h3>"+(j[0]>0?"Your version is "+j:"You have no flash plugin installed")+"</h3>"+(b.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+e+"'>here</a></p>"),b.tagName=="A"&&(b.onclick=function(){location.href=e}));if(c.onFail){var g=c.onFail.call(this);typeof g=="string"&&(b.innerHTML=g)}}d&&(window[c.id]=document.getElementById(c.id)),a(this,{getRoot:function(){return b},getOptions:function(){return c},getConf:function(){return f},getApi:function(){return b.firstChild}})}var d=document.all,e="http://www.adobe.com/go/getflashplayer",f=typeof jQuery=="function",g=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,h={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){},__flash_savedUnloadHandler=function(){}}),window.flashembed=function(b,d,e){typeof b=="string"&&(b=document.getElementById(b.replace("#","")));if(b)return typeof d=="string"&&(d={src:d}),new c(b,a(a({},h),d),e)};var i=a(window.flashembed,{conf:h,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(d){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(e){}}}return(b=g.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined)return null;var c=typeof a;c=="object"&&a.push&&(c="array");switch(c){case"string":return a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1"),a=a.replace(/^\s?(\d+\.?\d+)%/,"$1pct"),'"'+a+'"';case"array":return"["+b(a,function(a){return i.asString(a)}).join(",")+"]";case"function":return'"function()"';case"object":c=[];for(var d in a)a.hasOwnProperty(d)&&c.push('"'+d+'":'+i.asString(a[d]));return"{"+c.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(b,c){b=a({},b);var e='<object width="'+b.width+'" height="'+b.height+'" id="'+b.id+'" name="'+b.id+'"';b.cachebusting&&(b.src+=(b.src.indexOf("?")!=-1?"&":"?")+Math.random()),e+=b.w3c||!d?' data="'+b.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"',e+=">";if(b.w3c||d)e+='<param name="movie" value="'+b.src+'" />';b.width=b.height=b.id=b.w3c=b.src=null,b.onFail=b.version=b.expressInstall=null;for(var f in b)b[f]&&(e+='<param name="'+f+'" value="'+b[f]+'" />');b="";if(c){for(var g in c)c[g]&&(f=c[g],b+=g+"="+(/function|object/.test(typeof f)?i.asString(f):f)+"&");b=b.slice(0,-1),e+='<param name="flashvars" value=\''+b+"' />"}return e+="</object>",e},isSupported:function(a){return j[0]>a[0]||j[0]==a[0]&&j[1]>=a[1]}}),j=i.getVersion();f&&(jQuery.tools=jQuery.tools||{version:"1.2.5"},jQuery.tools.flashembed={conf:h},jQuery.fn.flashembed=function(a,b){return this.each(function(){$(this).data("flashembed",flashembed(this,a,b))})})}(),function(a){function b(a){if(a){var b=d.contentWindow.document;b.open().close(),b.location.hash=a}}var c,d,e,f;a.tools=a.tools||{version:"1.2.5"},a.tools.history={init:function(j){f||(a.browser.msie&&a.browser.version<"8"?d||(d=a("<iframe/>").attr("src","javascript:false;").hide().get(0),a("body").append(d),setInterval(function(){var b=d.contentWindow.document;b=b.location.hash,c!==b&&a.event.trigger("hash",b)},100),b(location.hash||"#")):setInterval(function(){var b=location.hash;b!==c&&a.event.trigger("hash",b)},100),e=e?e.add(j):j,j.click(function(c){var e=a(this).attr("href");d&&b(e);if(e.slice(0,1)!="#")return location.href="#"+e,c.preventDefault()}),f=!0)}},a(window).bind("hash",function(b,d){d?e.filter(function(){var b=a(this).attr("href");return b==d||b==d.replace("#","")}).trigger("history",[d]):e.eq(0).trigger("history",[d]),c=d}),a.fn.history=function(b){return a.tools.history.init(this),this.bind("history",b)}}(jQuery),function(a){function b(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function c(b){if(b)return b.call(a.mask)}a.tools=a.tools||{version:"1.2.5"};var d;d=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};var e,f,g,h,i;a.mask={load:function(m,n){if(g)return this;typeof m=="string"&&(m={color:m}),m=m||h,h=m=a.extend(a.extend({},d.conf),m),e=a("#"+m.maskId),e.length||(e=a("<div/>").attr("id",m.maskId),a("body").append(e));var o=b();return e.css({position:"absolute",top:0,left:0,width:o[0],height:o[1],display:"none",opacity:m.startOpacity,zIndex:m.zIndex}),m.color&&e.css("backgroundColor",m.color),c(m.onBeforeLoad)===!1?this:(m.closeOnEsc&&a(document).bind("keydown.mask",function(b){b.keyCode==27&&a.mask.close(b)}),m.closeOnClick&&e.bind("click.mask",function(b){a.mask.close(b)}),a(window).bind("resize.mask",function(){a.mask.fit()}),n&&n.length&&(i=n.eq(0).css("zIndex"),a.each(n,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),f=n.css({zIndex:Math.max(m.zIndex+1,i=="auto"?0:i)})),e.css({display:"block"}).fadeTo(m.loadSpeed,m.opacity,function(){a.mask.fit(),c(m.onLoad),g="full"}),g=!0,this)},close:function(){if(g){if(c(h.onBeforeClose)===!1)return this;e.fadeOut(h.closeSpeed,function(){c(h.onClose),f&&f.css({zIndex:i}),g=!1}),a(document).unbind("keydown.mask"),e.unbind("click.mask"),a(window).unbind("resize.mask")}return this},fit:function(){if(g){var a=b();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?g=="full":g},getConf:function(){return h},getExposed:function(){return f}},a.fn.mask=function(b){return a.mask.load(b),this},a.fn.expose=function(b){return a.mask.load(b,this),this}}(jQuery),function(a){function b(b){switch(b.type){case"mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case"DOMMouseScroll":a.extend(b,b.data),b.delta=-b.detail/3;break;case"mousewheel":b.delta=b.wheelDelta/120}return b.type="wheel",a.event.handle.call(this,b,b.delta)}a.fn.mousewheel=function(a){return this[a?"bind":"trigger"]("wheel",a)},a.event.special.wheel={setup:function(){a.event.add(this,c,b,{})},teardown:function(){a.event.remove(this,c,b)}};var c=a.browser.mozilla?"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":""):"mousewheel"}(jQuery),function(a){function b(b,d,e){var f=this,g=b.add(this),h=b.find(e.tabs),i=d.jquery?d:b.children(d),j;h.length||(h=b.children()),i.length||(i=b.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(b,d){var i=h.eq(b);typeof b=="string"&&b.replace("#","")&&(i=h.filter("[href*="+b.replace("#","")+"]"),b=Math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(b<0)return f.click(k,d);if(b>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;b=e.initialIndex,i=h.eq(b)}if(b===j)return f;d=d||a.Event(),d.type="onBeforeClick",g.trigger(d,[b]);if(!d.isDefaultPrevented())return c[e.effect].call(f,b,function(){d.type="onClick",g.trigger(d,[b])}),j=b,h.removeClass(e.current),i.addClass(e.current),f},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){return h.unbind(e.event).removeClass(e.current),i.find("a[href^=#]").unbind("click.T"),f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){return b&&a(f).bind(c,b),f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){return f.click(b,a),a.preventDefault()})}),i.find("a[href^=#]").bind("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&b.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.tools=a.tools||{version:"1.2.5"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:!1,history:!1},addEffect:function(a,b){c[a]=b}};var c={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){this.getPanes().slideUp(200),this.getPanes().eq(a).slideDown(400,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},d;a.tools.tabs.addEffect("horizontal",function(b,c){d||(d=this.getPanes().eq(0).width()),this.getCurrentPane().animate({width:0},function(){a(this).hide()}),this.getPanes().eq(b).animate({width:d},function(){a(this).show(),c.call()})}),a.fn.tabs=function(c,d){var e=this.data("tabs");return e&&(e.destroy(),this.removeData("tabs")),a.isFunction(d)&&(d={onBeforeClick:d}),d=a.extend({},a.tools.tabs.conf,d),this.each(function(){e=new b(a(this),c,d),a(this).data("tabs",e)}),d.api?e:this}}(jQuery),function(a){function b(b,c){function d(c){var d=a(c);return d.length<2?d:b.parent().find(c)}var e=this,f=b.add(this),g=b.data("tabs"),h,i=!0,j=d(c.next).click(function(){g.next()}),k=d(c.prev).click(function(){g.prev()});a.extend(e,{getTabs:function(){return g},getConf:function(){return c},play:function(){if(h)return e;var b=a.Event("onBeforePlay");return f.trigger(b),b.isDefaultPrevented()?e:(h=setInterval(g.next,c.interval),i=!1,f.trigger("onPlay"),e)},pause:function(){if(!h)return e;var b=a.Event("onBeforePause");return f.trigger(b),b.isDefaultPrevented()?e:(h=clearInterval(h),f.trigger("onPause"),e)},stop:function(){e.pause(),i=!0}}),a.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(b,d){a.isFunction(c[d])&&a(e).bind(d,c[d]),e[d]=function(b){return a(e).bind(d,b)}}),c.autopause&&g.getTabs().add(j).add(k).add(g.getPanes()).hover(e.pause,function(){i||e.play()}),c.autoplay&&e.play(),c.clickable&&g.getPanes().click(function(){g.next()});if(!g.getConf().rotate){var l=c.disabledClass;g.getIndex()||k.addClass(l),g.onBeforeClick(function(a,b){k.toggleClass(l,!b),j.toggleClass(l,b==g.getTabs().length-1)})}}var c;c=a.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}},a.fn.slideshow=function(d){var e=this.data("slideshow");return e?e:(d=a.extend({},c.conf,d),this.each(function(){e=new b(a(this),d),a(this).data("slideshow",e)}),d.api?e:this)}}(jQuery),function(a){function b(b,c,d){var e=d.relative?b.position().top:b.offset().top,g=d.relative?b.position().left:b.offset().left,h=d.position[0];e-=c.outerHeight()-d.offset[0],g+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var i=c.outerHeight()+b.outerHeight();return h=="center"&&(e+=i/2),h=="bottom"&&(e+=i),h=d.position[1],b=c.outerWidth()+b.outerWidth(),h=="center"&&(g-=b/2),h=="left"&&(g-=b),{top:e,left:g}}function c(c,e){var g=this,h=c.add(g),i,j=0,k=0,l=c.attr("title"),m=c.attr("data-tooltip"),n=d[e.effect],q,r=c.is(":input"),s=r&&c.is(":checkbox, :radio, select, :button, :submit"),t=c.attr("type"),u=e.events[t]||e.events[r?s?"widget":"input":"def"];if(!n)throw'Nonexistent effect "'+e.effect+'"';u=u.split(/,\s*/);if(u.length!=2)throw"Tooltip: bad events configuration for "+t;c.bind(u[0],function(a){clearTimeout(j),e.predelay?k=setTimeout(function(){g.show(a)},e.predelay):g.show(a)}).bind(u[1],function(a){clearTimeout(k),e.delay?j=setTimeout(function(){g.hide(a)},e.delay):g.hide(a)}),l&&e.cancelDefault&&(c.removeAttr("title"),c.data("title",l)),a.extend(g,{show:function(d){if(!i){m?i=a(m):e.tip?i=a(e.tip).eq(0):l?i=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(l):(i=c.next(),i.length||(i=c.parent().next()));if(!i.length)throw"Cannot find tooltip for "+c}if(g.isShown())return g;i.stop(!0,!0);var o=b(c,i,e);return e.tip&&i.html(c.data("title")),d=d||a.Event(),d.type="onBeforeShow",h.trigger(d,[o]),d.isDefaultPrevented()?g:(o=b(c,i,e),i.css({position:"absolute",top:o.top,left:o.left}),q=!0,n[0].call(g,function(){d.type="onShow",q="full",h.trigger(d)}),o=e.events.tooltip.split(/,\s*/),i.data("__set")||(i.bind(o[0],function(){clearTimeout(j),clearTimeout(k)}),o[1]&&!c.is("input:not(:checkbox, :radio), textarea")&&i.bind(o[1],function(a){a.relatedTarget!=c[0]&&c.trigger(u[1].split(" ")[0])}),i.data("__set",!0)),g)},hide:function(b){if(!i||!g.isShown())return g;b=b||a.Event(),b.type="onBeforeHide",h.trigger(b);if(!b.isDefaultPrevented())return q=!1,d[e.effect][1].call(g,function(){b.type="onHide",h.trigger(b)}),g},isShown:function(a){return a?q=="full":q},getConf:function(){return e},getTip:function(){return i},getTrigger:function(){return c}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(g).bind(c,e[c]),g[c]=function(b){return b&&a(g).bind(c,b),g}})}a.tools=a.tools||{version:"1.2.5"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,c){d[a]=[b,c]}};var d={toggle:[function(a){var b=this.getConf(),c=this.getTip();b=b.opacity,b<1&&c.css({opacity:b}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(a){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};a.fn.tooltip=function(b){var d=this.data("tooltip");return d?d:(b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){d=new c(a(this),b),a(this).data("tooltip",d)}),b.api?d:this)}}(jQuery),function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),f=b.slideFade?{opacity:b.opacity}:{},g=c[b.direction]||c.up;f[g[1]]=g[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(f,b.slideInSpeed,a)},function(b){var f=this.getConf(),g=f.slideOffset,h=f.slideFade?{opacity:0}:{},i=c[f.direction]||c.up,j=""+i[0];f.bounce&&(j=j=="+"?"-":"+"),h[i[1]]=j+"="+g,this.getTip().animate(h,f.slideOutSpeed,function(){a(this).hide(),b.call()})})}(jQuery),function(a){function b(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function c(a){for(var b=a.length;b--;)if(a[b])return!1;return!0}var d=a.tools.tooltip;d.dynamic={conf:{classNames:"top right bottom left"}},a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},d.dynamic.conf,e);var f=e.classNames.split(/\s/),h;return this.each(function(){var d=a(this).tooltip().onBeforeShow(function(d,i){d=this.getTip();var l=this.getConf();h||(h=[l.position[0],l.position[1],l.offset[0],l.offset[1],a.extend({},l)]),a.extend(l,h[4]),l.position=[h[0],h[1]],l.offset=[h[2],h[3]],d.css({visibility:"hidden",position:"absolute",top:i.top,left:i.left}).show(),i=b(d);if(!c(i)){i[2]&&(a.extend(l,e.top),l.position[0]="top",d.addClass(f[0])),i[3]&&(a.extend(l,e.right),l.position[1]="right",d.addClass(f[1])),i[0]&&(a.extend(l,e.bottom),l.position[0]="bottom",d.addClass(f[2])),i[1]&&(a.extend(l,e.left),l.position[1]="left",d.addClass(f[3]));if(i[0]||i[2])l.offset[0]*=-1;if(i[1]||i[3])l.offset[1]*=-1}d.css({visibility:"visible"}).hide()});d.onBeforeShow(function(){var a=this.getConf();this.getTip(),setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),d.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=d}),e.api?ret:this}}(jQuery),function(a){function b(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}function c(c,f){var g=this,h=c.add(g),i=c.children(),j=0,l=f.vertical;d||(d=g),i.length>1&&(i=a(f.items,c)),a.extend(g,{getConf:function(){return f},getIndex:function(){return j},getSize:function(){return g.getItems().size()},getNaviButtons:function(){return o.add(q)},getRoot:function(){return c},getItemWrap:function(){return i},getItems:function(){return i.children(f.item).not("."+f.clonedClass)},move:function(a,b){return g.seekTo(j+a,b)},next:function(a){return g.move(1,a)},prev:function(a){return g.move(-1,a)},begin:function(a){return g.seekTo(0,a)},end:function(a){return g.seekTo(g.getSize()-1,a)},focus:function(){return d=g},addItem:function(b){return b=a(b),f.circular?(i.children("."+f.clonedClass+":last").before(b),i.children("."+f.clonedClass+":first").replaceWith(b.clone().addClass(f.clonedClass))):i.append(b),h.trigger("onAddItem",[b]),g},seekTo:function(b,c,m){b.jquery||(b*=1);if(f.circular&&b===0&&j==-1&&c!==0)return g;if(!f.circular&&b<0||b>g.getSize()||b<-1)return g;var n=b;b.jquery?b=g.getItems().index(b):n=g.getItems().eq(b);var o=a.Event("onBeforeSeek");if(!m){h.trigger(o,[b,c]);if(o.isDefaultPrevented()||!n.length)return g}return n=l?{top:-n.position().top}:{left:-n.position().left},j=b,d=g,c===undefined&&(c=f.speed),i.animate(n,c,f.easing,m||function(){h.trigger("onSeek",[b])}),g}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(b,c){a.isFunction(f[c])&&a(g).bind(c,f[c]),g[c]=function(b){return b&&a(g).bind(c,b),g}});if(f.circular){var m=g.getItems().slice(-1).clone().prependTo(i),n=g.getItems().eq(1).clone().appendTo(i);m.add(n).addClass(f.clonedClass),g.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1)return g.seekTo(m,c,function(){g.end(0)}),a.preventDefault();b==g.getSize()&&g.seekTo(n,c,function(){g.begin(0)})}}),g.seekTo(0,0,function(){})}var o=b(c,f.prev).click(function(){g.prev()}),q=b(c,f.next).click(function(){g.next()});!f.circular&&g.getSize()>1&&(g.onBeforeSeek(function(a,b){setTimeout(function(){a.isDefaultPrevented()||(o.toggleClass(f.disabledClass,b<=0),q.toggleClass(f.disabledClass,b>=g.getSize()-1))},1)}),f.initialIndex||o.addClass(f.disabledClass)),f.mousewheel&&a.fn
.mousewheel&&c.mousewheel(function(a,b){if(f.mousewheel)return g.move(b<0?1:-1,f.wheelSpeed||50),!1});if(f.touch){var r={};i[0].ontouchstart=function(a){a=a.touches[0],r.x=a.clientX,r.y=a.clientY},i[0].ontouchmove=function(a){if(a.touches.length==1&&!i.is(":animated")){var b=a.touches[0],c=r.x-b.clientX;b=r.y-b.clientY,g[l&&b>0||!l&&c>0?"next":"prev"](),a.preventDefault()}}}f.keyboard&&a(document).bind("keydown.scrollable",function(b){if(!(!f.keyboard||b.altKey||b.ctrlKey||a(b.target).is(":input")))if(f.keyboard=="static"||d==g){var c=b.keyCode;if(!(!l||c!=38&&c!=40))return g.move(c==38?-1:1),b.preventDefault();if(!l&&(c==37||c==39))return g.move(c==37?-1:1),b.preventDefault()}}),f.initialIndex&&g.seekTo(f.initialIndex,0,function(){})}a.tools=a.tools||{version:"1.2.5"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",speed:400,vertical:!1,touch:!0,wheelSpeed:0}};var d;a.fn.scrollable=function(b){var d=this.data("scrollable");return d?d:(b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){d=new c(a(this),b),a(this).data("scrollable",d)}),b.api?d:this)}}(jQuery),function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;return this.each(function(){var b=a(this).data("scrollable");b&&(e=b);var c,f=!0;b.play=function(){c||(f=!1,c=setInterval(function(){b.next()},d.interval))},b.pause=function(){c=clearInterval(c)},b.stop=function(){b.pause(),f=!0},d.autopause&&b.getRoot().add(b.getNaviButtons()).hover(b.pause,b.play),d.autoplay&&b.play()}),d.api?e:this}}(jQuery),function(a){function b(b,c){var e=a(c);return e.length<2?e:b.parent().find(c)}var c=a.tools.scrollable;c.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}},a.fn.navigator=function(e){typeof e=="string"&&(e={navi:e}),e=a.extend({},c.navigator.conf,e);var f;return this.each(function(){function c(a,b,c){k.seekTo(b);if(o)location.hash&&(location.hash=a.attr("href").replace("#",""));else return c.preventDefault()}function h(){return l.find(e.naviItem||"> *")}function i(b){var f=a("<"+(e.naviItem||"a")+"/>").click(function(e){c(a(this),b,e)}).attr("href","#"+b);return b===0&&f.addClass(n),e.indexed&&f.text(b+1),e.idPrefix&&f.attr("id",e.idPrefix+b),f.appendTo(l)}function j(a,b){a=h().eq(b.replace("#","")),a.length||(a=h().filter("[href="+b+"]")),a.click()}var k=a(this).data("scrollable"),l=e.navi.jquery?e.navi:b(k.getRoot(),e.navi),m=k.getNaviButtons(),n=e.activeClass,o=e.history&&a.fn.history;k&&(f=k),k.getNaviButtons=function(){return m.add(l)},h().length?h().each(function(b){a(this).click(function(e){c(a(this),b,e)})}):a.each(k.getItems(),function(a){i(a)}),k.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var c=h().eq(b);!a.isDefaultPrevented()&&c.length&&h().removeClass(n).eq(b).addClass(n)}},1)}),k.onAddItem(function(a,b){b=i(k.getItems().index(b)),o&&b.history(j)}),o&&h().history(j)}),e.api?f:this}}(jQuery),function(a){function b(b,e){var f=this,g=b.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=Math.random().toString().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=!1);var n=e.target||b.attr("rel");j=n?a(n):b;if(!j.length)throw"Could not find Overlay: "+n;b&&b.index(j)==-1&&b.click(function(a){return f.load(a),a.preventDefault()}),a.extend(f,{load:function(b){if(f.isOpened())return f;var i=d[e.effect];if(!i)throw'Overlay: cannot find effect : "'+e.effect+'"';e.oneInstance&&a.each(c,function(){this.close(b)}),b=b||a.Event(),b.type="onBeforeLoad",g.trigger(b);if(b.isDefaultPrevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,p=e.left,r=j.outerWidth({margin:!0}),t=j.outerHeight({margin:!0});return typeof n=="string"&&(n=n=="center"?Math.max((h.height()-t)/2,0):parseInt(n,10)/100*h.height()),p=="center"&&(p=Math.max((h.width()-r)/2,0)),i[0].call(f,{top:n,left:p},function(){k&&(b.type="onLoad",g.trigger(b))}),l&&e.closeOnClick&&a.mask.getMask().one("click",f.close),e.closeOnClick&&a(document).bind("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeOnEsc&&a(document).bind("keydown."+m,function(a){a.keyCode==27&&f.close(a)}),f},close:function(b){if(!f.isOpened())return f;b=b||a.Event(),b.type="onBeforeClose",g.trigger(b);if(!b.isDefaultPrevented())return k=!1,d[e.effect][1].call(f,function(){b.type="onClose",g.trigger(b)}),a(document).unbind("click."+m).unbind("keydown."+m),l&&a.mask.close(),f},getOverlay:function(){return j},getTrigger:function(){return b},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){return b&&a(f).bind(c,b),f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a('<a class="close"></a>'),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.tools=a.tools||{version:"1.2.5"},a.tools.overlay={addEffect:function(a,b,c){d[a]=[b,c]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var c=[],d={};a.tools.overlay.addEffect("default",function(b,c){var d=this.getConf(),e=a(window);d.fixed||(b.top+=e.scrollTop(),b.left+=e.scrollLeft()),b.position=d.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)}),a.fn.overlay=function(d){var e=this.data("overlay");return e?e:(a.isFunction(d)&&(d={onBeforeLoad:d}),d=a.extend(!0,{},a.tools.overlay.conf,d),this.each(function(){e=new b(a(this),d),c.push(e),a(this).data("overlay",e)}),d.api?e:this)}}(jQuery),function(a){function b(a){var b=a.offset();return{top:b.top+a.height()/2,left:b.left+a.width()/2}}function e(c,e){var f=this.getOverlay(),g=this.getConf(),i=this.getTrigger(),j=this,l=f.outerWidth({margin:!0}),m=f.data("img"),n=g.fixed?"fixed":"absolute";if(!m){m=f.css("backgroundImage");if(!m)throw"background-image CSS property not set for overlay";m=m.slice(m.indexOf("(")+1,m.indexOf(")")).replace(/\"/g,""),f.css("backgroundImage","none"),m=a('<img src="'+m+'"/>'),m.css({border:0,display:"none"}).width(l),a("body").append(m),f.data("img",m)}var o=g.start.top||Math.round(d.height()/2),p=g.start.left||Math.round(d.width()/2);i&&(i=b(i),o=i.top,p=i.left),g.fixed?(o-=d.scrollTop(),p-=d.scrollLeft()):(c.top+=d.scrollTop(),c.left+=d.scrollLeft()),m.css({position:"absolute",top:o,left:p,width:0,zIndex:g.zIndex}).show(),c.position=n,f.css(c),m.animate({top:f.css("top"),left:f.css("left"),width:l},g.speed,function(){f.css("zIndex",g.zIndex+1).fadeIn(g.fadeInSpeed,function(){j.isOpened()&&!a(this).index(f)?e.call():f.hide()})}).css("position",n)}function f(c){var e=this.getOverlay().hide(),f=this.getConf(),g=this.getTrigger();e=e.data("img");var i={top:f.start.top,left:f.start.left,width:0};g&&a.extend(i,b(g)),f.fixed&&e.css({position:"absolute"}).animate({top:"+="+d.scrollTop(),left:"+="+d.scrollLeft()},0),e.animate(i,f.closeSpeed,c)}var c=a.tools.overlay,d=a(window);a.extend(c.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999}),c.addEffect("apple",e,f)}(jQuery),function(a){function b(a,b){return 32-(new Date(a,b,32)).getDate()}function c(a,b){a=""+a;for(b=b||2;a.length<b;)a="0"+a;return a}function d(a,b,d){var e=a.getDate(),f=a.getDay(),g=a.getMonth();a=a.getFullYear();var h={d:e,dd:c(e),ddd:l[d].shortDays[f],dddd:l[d].days[f],m:g+1,mm:c(g+1),mmm:l[d].shortMonths[g],mmmm:l[d].months[g],yy:String(a).slice(2),yyyy:a};return b=b.replace(m,function(a){return a in h?h[a]:a.slice(1,a.length-1)}),n.html(b).html()}function e(a){return parseInt(a,10)}function f(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()==b.getMonth()&&a.getDate()==b.getDate()}function g(a){if(a){if(a.constructor==Date)return a;if(typeof a=="string"){var b=a.split("-");if(b.length==3)return new Date(e(b[0]),e(b[1])-1,e(b[2]));if(!/^-?\d+$/.test(a))return;a=e(a)}return b=new Date,b.setDate(b.getDate()+a),b}}function h(c,h){function j(b,e,f){A=b,x=b.getFullYear(),y=b.getMonth(),z=b.getDate(),f=f||a.Event("api"),f.type="change",H.trigger(f,[b]),f.isDefaultPrevented()||(c.val(d(b,e.format,e.lang)),c.data("date",b),n.hide(f))}function m(b){b.type="onShow",H.trigger(b),a(document).bind("keydown.d",function(b){if(b.ctrlKey)return!0;var d=b.keyCode;if(d==8)return c.val(""),n.hide(b);if(d==27)return n.hide(b);if(a(k).index(d)>=0){if(!F)return n.show(b),b.preventDefault();var e=a("#"+p.weeks+" a"),f=a("."+p.focus),g=e.index(f);f.removeClass(p.focus);if(d==74||d==40)g+=7;else if(d==75||d==38)g-=7;else if(d==76||d==39)g+=1;else if(d==72||d==37)g-=1;return g>41?(n.addMonth(),f=a("#"+p.weeks+" a:eq("+(g-42)+")")):g<0?(n.addMonth(-1),f=a("#"+p.weeks+" a:eq("+(g+42)+")")):f=e.eq(g),f.addClass(p.focus),b.preventDefault()}return d==34?n.addMonth():d==33?n.addMonth(-1):d==36?n.today():(d==13&&(a(b.target).is("select")||a("."+p.focus).click()),a([16,17,18,9]).index(d)>=0)}),a(document).bind("click.d",function(b){var d=b.target;!a(d).parents("#"+p.root).length&&d!=c[0]&&(!t||d!=t[0])&&n.hide(b)})}var n=this,o=new Date,p=h.css,q=l[h.lang],r=a("#"+p.root),s=r.find("#"+p.title),t,u,w,x,y,z,A=c.attr("data-value")||h.value||c.val(),D=c.attr("min")||h.min,E=c.attr("max")||h.max,F;D===0&&(D="0"),A=g(A)||o,D=g(D||h.yearRange[0]*365),E=g(E||h.yearRange[1]*365);if(!q)throw"Dateinput: invalid language: "+h.lang;if(c.attr("type")=="date"){var G=a("<input/>");a.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(a,b){G.attr(b,c.attr(b))}),c.replaceWith(G),c=G}c.addClass(p.input);var H=c.add(n);if(!r.length){r=a("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",p.root),r.children().eq(0).attr("id",p.head).end().eq(1).attr("id",p.body).children().eq(0).attr("id",p.days).end().eq(1).attr("id",p.weeks).end().end().end().find("a").eq(0).attr("id",p.prev).end().eq(1).attr("id",p.next),s=r.find("#"+p.head).find("div").attr("id",p.title);if(h.selectors){var I=a("<select/>").attr("id",p.month),J=a("<select/>").attr("id",p.year);s.html(I.add(J))}for(var K=r.find("#"+p.days),L=0;L<7;L++)K.append(a("<span/>").text(q.shortDays[(L+h.firstDay)%7]));a("body").append(r)}h.trigger&&(t=a("<a/>").attr("href","#").addClass(p.trigger).click(function(a){return n.show(),a.preventDefault()}).insertAfter(c));var M=r.find("#"+p.weeks);J=r.find("#"+p.year),I=r.find("#"+p.month),a.extend(n,{show:function(b){if(!(c.attr("readonly")||c.attr("disabled")||F)){b=b||a.Event(),b.type="onBeforeShow",H.trigger(b);if(!b.isDefaultPrevented()){a.each(i,function(){this.hide()}),F=!0,I.unbind("change").change(function(){n.setValue(J.val(),a(this).val())}),J.unbind("change").change(function(){n.setValue(a(this).val(),I.val())}),u=r.find("#"+p.prev).unbind("click").click(function(){return u.hasClass(p.disabled)||n.addMonth(-1),!1}),w=r.find("#"+p.next).unbind("click").click(function(){return w.hasClass(p.disabled)||n.addMonth(),!1}),n.setValue(A);var d=c.offset();return/iPad/i.test(navigator.userAgent)&&(d.top-=a(window).scrollTop()),r.css({top:d.top+c.outerHeight({margins:!0})+h.offset[0],left:d.left+h.offset[1]}),h.speed?r.show(h.speed,function(){m(b)}):(r.show(),m(b)),n}}},setValue:function(c,d,g){var i=e(d)>=-1?new Date(e(c),e(d),e(g||1)):c||A;i<D?i=D:i>E&&(i=E),c=i.getFullYear(),d=i.getMonth(),g=i.getDate(),d==-1?(d=11,c--):d==12&&(d=0,c++);if(!F)return j(i,h),n;y=d,x=c,g=new Date(c,d,1-h.firstDay),g=g.getDay();var k=b(c,d),l=b(c,d-1),m;if(h.selectors){I.empty(),a.each(q.months,function(b,d){D<new Date(c,b+1,-1)&&E>new Date(c,b,0)&&I.append(a("<option/>").html(d).attr("value",b))}),J.empty(),i=o.getFullYear();for(var r=i+h.yearRange[0];r<i+h.yearRange[1];r++)D<=new Date(r+1,-1,1)&&E>new Date(r,0,0)&&J.append(a("<option/>").text(r));I.val(d),J.val(c)}else s.html(q.months[d]+" "+c);M.empty(),u.add(w).removeClass(p.disabled),r=g?0:-7;for(var t,z;r<(g?42:35);r++)t=a("<a/>"),r%7===0&&(m=a("<div/>").addClass(p.week),M.append(m)),r<g?(t.addClass(p.off),z=l-g+r+1,i=new Date(c,d-1,z)):r>=g+k?(t.addClass(p.off),z=r-k-g+1,i=new Date(c,d+1,z)):(z=r-g+1,i=new Date(c,d,z),f(A,i)?t.attr("id",p.current).addClass(p.focus):f(o,i)&&t.attr("id",p.today)),D&&i<D&&t.add(u).addClass(p.disabled),E&&i>E&&t.add(w).addClass(p.disabled),t.attr("href","#"+z).text(z).data("date",i),m.append(t);return M.find("a").click(function(b){var c=a(this);return c.hasClass(p.disabled)||(a("#"+p.current).removeAttr("id"),c.attr("id",p.current),j(c.data("date"),h,b)),!1}),p.sunday&&M.find(p.week).each(function(){var b=h.firstDay?7-h.firstDay:0;a(this).children().slice(b,b+1).addClass(p.sunday)}),n},setMin:function(a,b){return D=g(a),b&&A<D&&n.setValue(D),n},setMax:function(a,b){return E=g(a),b&&A>E&&n.setValue(E),n},today:function(){return n.setValue(o)},addDay:function(a){return this.setValue(x,y,z+(a||1))},addMonth:function(a){return this.setValue(x,y+(a||1),z)},addYear:function(a){return this.setValue(x+(a||1),y,z)},hide:function(b){if(F){b=a.Event(),b.type="onHide",H.trigger(b),a(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;r.hide(),F=!1}return n},getConf:function(){return h},getInput:function(){return c},getCalendar:function(){return r},getValue:function(a){return a?d(A,a,h.lang):A},isOpen:function(){return F}}),a.each(["onBeforeShow","onShow","change","onHide"],function(b,c){a.isFunction(h[c])&&a(n).bind(c,h[c]),n[c]=function(b){return b&&a(n).bind(c,b),n}}),c.bind("focus click",n.show).keydown(function(b){var c=b.keyCode;return!F&&a(k).index(c)>=0?(n.show(b),b.preventDefault()):b.shiftKey||b.ctrlKey||b.altKey||c==9?!0:b.preventDefault()}),g(c.val())&&j(A,h)}a.tools=a.tools||{version:"1.2.5"};var i=[],j,k=[75,76,38,39,74,72,40,37],l={};j=a.tools.dateinput={conf:{format:"mm/dd/yy",selectors:!1,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:undefined,max:undefined,trigger:!1,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(b,c){a.each(c,function(a,b){c[a]=b.split(",")}),l[b]=c}},j.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var m=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,n=a("<a/>");a.expr[":"].date=function(b){var c=b.getAttribute("type");return c&&c=="date"||!!a(b).data("dateinput")},a.fn.dateinput=function(b){if(this.data("dateinput"))return this;b=a.extend(!0,{},j.conf,b),a.each(b.css,function(a,c){!c&&a!="prefix"&&(b.css[a]=(b.css.prefix||"")+(c||a))});var c;return this.each(function(){var d=new h(a(this),b);i.push(d),d=d.getInput().data("dateinput",d),c=c?c.add(d):d}),c?c:this}}(jQuery),function(a){function b(a,b){return b=Math.pow(10,b),Math.round(a*b)/b}function c(a,b){return(b=parseInt(a.css(b),10))?b:(a=a[0].currentStyle)&&a.width&&parseInt(a.width,10)}function d(a){return(a=a.data("events"))&&a.onSlide}function e(e,f){function g(a,c,d,g){d===undefined?d=c/p*u:g&&(d-=f.min),v&&(d=Math.round(d/v)*v);if(c===undefined||v)c=d*p/u;if(isNaN(d))return j;c=Math.max(0,Math.min(c,p)),d=c/p*u;if(g||!m)d+=f.min;m&&(g?c=p-c:d=f.max-d),d=b(d,w);var h=a.type=="click";if(A&&n!==undefined&&!h){a.type="onSlide",z.trigger(a,[d,c]);if(a.isDefaultPrevented())return j}return g=h?f.speed:0,h=h?function(){a.type="change",z.trigger(a,[d])}:null,m?(s.animate({top:c},g,h),f.progress&&t.animate({height:p-c+s.width()/2},g)):(s.animate({left:c},g,h),f.progress&&t.animate({width:c+s.width()/2},g)),n=d,r=c,e.val(d),j}function h(){(m=f.vertical||c(l,"height")>c(l,"width"))?(p=c(l,"height")-c(s,"height"),o=l.offset().top+p):(p=c(l,"width")-c(s,"width"),o=l.offset().left)}function i(){h(),j.setValue(f.value!==undefined?f.value:f.min)}var j=this,k=f.css,l=a("<div><div/><a href='#'/></div>").data("rangeinput",j),m,n,o,p,r;e.before(l);var s=l.addClass(k.slider).find("a").addClass(k.handle),t=l.find("div").addClass(k.progress);a.each("min,max,step,value".split(","),function(a,b){a=e.attr(b),parseFloat(a)&&(f[b]=parseFloat(a,10))});var u=f.max-f.min,v=f.step=="any"?0:f.step,w=f.precision;if(w===undefined)try{w=v.toString().split(".")[1].length}catch(x){w=0}if(e.attr("type")=="range"){var y=a("<input/>");a.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(a,b){y.attr(b,e.attr(b))}),y.val(f.value),e.replaceWith(y),e=y}e.addClass(k.input);var z=a(j).add(e),A=!0;a.extend(j,{getValue:function(){return n},setValue:function(b,c){return h(),g(c||a.Event("api"),undefined,b,!0)},getConf:function(){return f},getProgress:function(){return t},getHandle:function(){return s},getInput:function(){return e},step:function(b,c){c=c||a.Event();var d=f.step=="any"?1:f.step;j.setValue(n+d*(b||1),c)},stepUp:function(a){return j.step(a||1)},stepDown:function(a){return j.step(-a||-1)}}),a.each("onSlide,change".split(","),function(b,c){a.isFunction(f[c])&&a(j).bind(c,f[c]),j[c]=function(b){return b&&a(j).bind(c,b),j}}),s.drag({drag:!1}).bind("dragStart",function(){h(),A=d(a(j))||d(e)}).bind("drag",function(a,b,c){if(e.is(":disabled"))return!1;g(a,m?b:c)}).bind("dragEnd",function(a){a.isDefaultPrevented()||(a.type="change",z.trigger(a,[n]))}).click(function(a){return a.preventDefault()}),l.click(function(a){if(e.is(":disabled")||a.target==s[0])return a.preventDefault();h();var b=s.width()/2;g(a,m?p-o-b+a.pageY:a.pageX-o-b)}),f.keyboard&&e.keydown(function(b){if(!e.attr("readonly")){var c=b.keyCode,d=a([75,76,38,33,39]).index(c)!=-1,f=a([74,72,40,34,37]).index(c)!=-1;if((d||f)&&!(b.shiftKey||b.altKey||b.ctrlKey))return d?j.step(c==33?10:1,b):f&&j.step(c==34?-10:-1,b),b.preventDefault()}}),e.blur(function(b){var c=a(this).val();c!==n&&j.setValue(c,b)}),a.extend(e[0],{stepUp:j.stepUp,stepDown:j.stepDown}),i(),p||a(window).load(i)}a.tools=a.tools||{version:"1.2.5"};var f;f=a.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var g,h;a.fn.drag=function(b){return document.ondragstart=function(){return!1},b=a.extend({x:!0,y:!0,drag:!0},b),g=g||a(document).bind("mousedown mouseup",function(c){var d=a(c.target);if(c.type=="mousedown"&&d.data("drag")){var e=d.position(),f=c.pageX-e.left,i=c.pageY-e.top,j=!0;g.bind("mousemove.drag",function(a){var c=a.pageX-f;a=a.pageY-i;var e={};b.x&&(e.left=c),b.y&&(e.top=a),j&&(d.trigger("dragStart"),j=!1),b.drag&&d.css(e),d.trigger("drag",[a,c]),h=d}),c.preventDefault()}else try{h&&h.trigger("dragEnd")}finally{g.unbind("mousemove.drag"),h=null}}),this.data("drag",!0)},a.expr[":"].range=function(b){var c=b.getAttribute("type");return c&&c=="range"||!!a(b).filter("input").data("rangeinput")},a.fn.rangeinput=function(b){if(this.data("rangeinput"))return this;b=a.extend(!0,{},f.conf,b);var c;return this.each(function(){var d=new e(a(this),a.extend(!0,{},b));d=d.getInput().data("rangeinput",d),c=c?c.add(d):d}),c?c:this}}(jQuery),function(a){function b(b,c,d){var e=b.offset().top,f=b.offset().left,g=d.position.split(/,?\s+/),h=g[0];return g=g[1],e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop()),d=c.outerHeight()+b.outerHeight(),h=="center"&&(e+=d/2),h=="bottom"&&(e+=d),b=b.outerWidth(),g=="center"&&(f-=(b+c.outerWidth())/2),g=="left"&&(f-=b),{top:e,left:f}}function c(a){function b(){return this.getAttribute("type")==a}return b.key="[type="+a+"]",b}function d(c,d,e){function f(b,c,d){if(!!e.grouped||!b.length){var f;d===!1||a.isArray(d)?(f=j.messages[c.key||c]||j.messages["*"],f=f[e.lang]||j.messages["*"].en,(c=f.match(/\$\d/g))&&a.isArray(d)&&a.each(c,function(a){f=f.replace(this,d[a])})):f=d[e.lang]||d,b.push(f)}}var h=this,i=d.add(h);c=c.not(":button, :image, :reset, :submit"),a.extend(h,{getConf:function(){return e},getForm:function(){return d},getInputs:function(){return c},reflow:function(){return c.each(function(){var c=a(this),d=c.data("msg.el");d&&(c=b(c,d,e),d.css({top:c.top,left:c.left}))}),h},invalidate:function(b,d){if(!d){var f=[];a.each(b,function(a,b){a=c.filter("[name='"+a+"']"),a.length&&(a.trigger("OI",[b]),f.push({input:a,messages:[b]}))}),b=f,d=a.Event()}return d.type="onFail",i.trigger(d,[b]),d.isDefaultPrevented()||l[e.effect][0].call(h,b,d),h},reset:function(b){return b=b||c,b.removeClass(e.errorClass).each(function(){var b=a(this).data("msg.el");b&&(b.remove(),a(this).data("msg.el",null))}).unbind(e.errorInputEvent||""),h},destroy:function(){return d.unbind(e.formEvent+".V").unbind("reset.V"),c.unbind(e.inputEvent+".V").unbind("change.V"),h.reset()},checkValidity:function(b,d){b=b||c,b=b.not(":disabled");if(!b.length)return!0;d=d||a.Event(),d.type="onBeforeValidate",i.trigger(d,[b]);if(d.isDefaultPrevented())return d.result;var j=[];b.not(":radio:not(:checked)").each(function(){var b=[],c=a(this).data("messages",b),l=g&&c.is(":date")?"onHide.v":e.errorInputEvent+".v";c.unbind(l),a.each(k,function(){var a=this,g=a[0];if(c.filter(g).length){a=a[1].call(h,c,c.val());if(a!==!0){d.type="onBeforeFail",i.trigger(d,[c,g]);if(d.isDefaultPrevented())return!1;var j=c.attr(e.messageAttr);if(j)return b=[j],!1;f(b,g,a)}}}),b.length&&(j.push({input:c,messages:b}),c.trigger("OI",[b]),e.errorInputEvent&&c.bind(l,function(a){h.checkValidity(c,a)}));if(e.singleError&&j.length)return!1});var m=l[e.effect];if(!m)throw'Validator: cannot find effect "'+e.effect+'"';return j.length?(h.invalidate(j,d),!1):(m[1].call(h,b,d),d.type="onSuccess",i.trigger(d,[b]),b.unbind(e.errorInputEvent+".v"),!0)}}),a.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(b,c){a.isFunction(e[c])&&a(h).bind(c,e[c]),h[c]=function(b){return b&&a(h).bind(c,b),h}}),e.formEvent&&d.bind(e.formEvent+".V",function(a){if(!h.checkValidity(null,a))return a.preventDefault()}),d.bind("reset.V",function(){h.reset()}),c[0]&&c[0].validity&&c.each(function(){this.oninvalid=function(){return!1}}),d[0]&&(d[0].checkValidity=h.checkValidity),e.inputEvent&&c.bind(e.inputEvent+".V",function(b){h.checkValidity(a(this),b)}),c.filter(":checkbox, select").filter("[required]").bind("change.V",function(b){var c=a(this);(this.checked||c.is("select")&&a(this).val())&&l[e.effect][1].call(h,c,b)});var m=c.filter(":radio").change(function(a){h.checkValidity(m,a)});a(window).resize(function(){h.reflow()})}a.tools=a.tools||{version:"1.2.5"};var e=/\[type=([a-z]+)\]/,f=/^-?[0-9]*(\.[0-9]+)?$/,g=a.tools.dateinput,h=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,i=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,j;j=a.tools.validator={conf:{grouped:!1,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:!1,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(b,c){a.each(c,function(a,c){j.messages[a]=j.messages[a]||{},j.messages[a][b]=c})},localizeFn:function(b,c){j.messages[b]=j.messages[b]||{},a.extend(j.messages[b],c)},fn:function(b,d,f){a.isFunction(d)?f=d:(typeof d=="string"&&(d={en:d}),this.messages[b.key||b]=d);if(d=e.exec(b))b=c(d[1]);k.push([b,f])},addEffect:function(a,b,c){l[a]=[b,c]}};var k=[],l={"default":[function(c){var d=this.getConf();a.each(c,function(c,e){c=e.input,c.addClass(d.errorClass);var f=c.data("msg.el");f||(f=a(d.message).addClass(d.messageClass).appendTo(document.body),c.data("msg.el",f)),f.css({visibility:"hidden"}).find("p").remove(),a.each(e.messages,function(b,c){a("<p/>").html(c).appendTo(f)}),f.outerWidth()==f.parent().width()&&f.add(f.find("p")).css({display:"inline"}),e=b(c,f,d),f.css({visibility:"visible",position:"absolute",top:e.top,left:e.left}).fadeIn(d.speed)})},function(b){var c=this.getConf();b.removeClass(c.errorClass).each(function(){var b=a(this).data("msg.el");b&&b.css({visibility:"hidden"})})}]};a.each("email,url,number".split(","),function(b,c){a.expr[":"][c]=function(a){return a.getAttribute("type")===c}}),a.fn.oninvalid=function(a){return this[a?"bind":"trigger"]("OI",a)},j.fn(":email","Please enter a valid email address",function(a,b){return!b||h.test(b)}),j.fn(":url","Please enter a valid URL",function(a,b){return!b||i.test(b)}),j.fn(":number","Please enter a numeric value.",function(a,b){return f.test(b)}),j.fn("[max]","Please enter a value smaller than $1",function(a,b){return b===""||g&&a.is(":date")?!0:(a=a.attr("max"),parseFloat(b)<=parseFloat(a)?!0:[a])}),j.fn("[min]","Please enter a value larger than $1",function(a,b){return b===""||g&&a.is(":date")?!0:(a=a.attr("min"),parseFloat(b)>=parseFloat(a)?!0:[a])}),j.fn("[required]","Please complete this mandatory field.",function(a,b){return a.is(":checkbox")?a.is(":checked"):!!b}),j.fn("[pattern]",function(a){var b=new RegExp("^"+a.attr("pattern")+"$");return b.test(a.val())}),a.fn.validator=function(b){var c=this.data("validator");return c&&(c.destroy(),this.removeData("validator")),b=a.extend(!0,{},j.conf,b),this.is("form")?this.each(function(){var e=a(this);c=new d(e.find(":input"),e,b),e.data("validator",c)}):(c=new d(this,this.eq(0).closest("form"),b),this.data("validator",c))}}(jQuery),jQuery.noConflict();var Prototype={Version:"1.6.0.3",Browser:{IE:!!window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1,Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&document.createElement("div").__proto__!==document.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)</script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};Prototype.Browser.MobileSafari&&(Prototype.BrowserFeatures.SpecificElementExtensions=!1);var Class={create:function(){function c(){this.initialize.apply(this,arguments)}var a=null,b=$A(arguments);Object.isFunction(b[0])&&(a=b.shift()),Object.extend(c,Class.Methods),c.superclass=a,c.subclasses=[];if(a){var d=function(){};d.prototype=a.prototype,c.prototype=new d,a.subclasses.push(c)}for(var e=0;e<b.length;e++)c.addMethods(b[e]);return c.prototype.initialize||(c.prototype.initialize=Prototype.emptyFunction),c.prototype.constructor=c,c}};Class.Methods={addMethods:function(a){var b=this.superclass&&this.superclass.prototype,c=Object.keys(a);Object.keys({toString:!0}).length||c.push("toString","valueOf");for(var d=0,e=c.length;d<e;d++){var f=c[d],g=a[f];if(b&&Object.isFunction(g)&&g.argumentNames().first()=="$super"){var h=g;g=function(a){return function(){return b[a].apply(this,arguments)}}(f).wrap(h),g.valueOf=h.valueOf.bind(h),g.toString=h.toString.bind(h)}this.prototype[f]=g}return this}};var Abstract={};Object.extend=function(a,b){for(var c in b)a[c]=b[c];return a},Object.extend(Object,{inspect:function(a){try{return Object.isUndefined(a)?"undefined":a===null?"null":a.inspect?a.inspect():String(a)}catch(b){if(b instanceof RangeError)return"...";throw b}},toJSON:function(a){var b=typeof a;switch(b){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null)return"null";if(a.toJSON)return a.toJSON();if(Object.isElement(a))return;var c=[];for(var d in a){var e=Object.toJSON(a[d]);Object.isUndefined(e)||c.push(d.toJSON()+": "+e)}return"{"+c.join(", ")+"}"},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a)b.push(c);return b},values:function(a){var b=[];for(var c in a)b.push(a[c]);return b},clone:function(a){return Object.extend({},a)},isElement:function(a){return!!a&&a.nodeType==1},isArray:function(a){return a!=null&&typeof a=="object"&&"splice"in a&&"join"in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}}),Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var a=this,b=$A(arguments),c=b.shift();return function(){return a.apply(c,b.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,b=$A(arguments),c=b.shift();return function(d){return a.apply(c,[d||window.event].concat(b))}},curry:function(){if(!arguments.length)return this;var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1e3;return window.setTimeout(function(){return a.apply(a,b)},c)},defer:function(){var a=[.01].concat($A(arguments));return this.delay.apply(this,a)},wrap:function(a){var b=this;return function(){return a.apply(this,[b.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized)return this._methodized;var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}}),Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var a;for(var b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a}};RegExp.prototype.match=RegExp.prototype.test,RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(a,b){this.callback=a,this.frequency=b,this.currentlyExecuting=!1,this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1e3)},execute:function(){this.callback(this)},stop:function(){if(!this.timer)return;clearInterval(this.timer),this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=!0,this.execute()}finally{this.currentlyExecuting=!1}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}}),Object.extend(String.prototype,{gsub:function(a,b){var c="",d=this,e;b=arguments.callee.prepareReplacement(b);while(d.length>0)(e=d.match(a))?(c+=d.slice(0,e.index),c+=String.interpret(b(e)),d=d.slice(e.index+e[0].length)):(c+=d,d="");return c},sub:function(a,b,c){return b=this.gsub.prepareReplacement(b),c=Object.isUndefined(c)?1:c,this.gsub(a,function(a){return--c<0?a[0]:b(a)})},scan:function(a,b){return this.gsub(a,b),String(this)},truncate:function(a,b){return a=a||30,b=Object.isUndefined(b)?"...":b,this.length>a?this.slice(0,a-b.length)+b:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var a=new RegExp(Prototype.ScriptFragment,"img"),b=new RegExp(Prototype.ScriptFragment,"im");return(this.match(a)||[]).map(function(a){return(a.match(b)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;return a.text.data=this,a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");return a.innerHTML=this.stripTags(),a.childNodes[0]?a.childNodes.length>1?$A(a.childNodes).inject("",function(a,b){return a+b.nodeValue}):a.childNodes[0].nodeValue:""},toQueryParams:function(a){var b=this.strip().match(/([^?#]*)(#.*)?$/);return b?b[1].split(a||"&").inject({},function(a,b){if((b=b.split("=")
)[0]){var c=decodeURIComponent(b.shift()),d=b.length>1?b.join("="):b[0];d!=undefined&&(d=decodeURIComponent(d)),c in a?(Object.isArray(a[c])||(a[c]=[a[c]]),a[c].push(d)):a[c]=d}return a}):{}},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":(new Array(a+1)).join(this)},camelize:function(){var a=this.split("-"),b=a.length;if(b==1)return a[0];var c=this.charAt(0)=="-"?a[0].charAt(0).toUpperCase()+a[0].substring(1):a[0];for(var d=1;d<b;d++)c+=a[d].charAt(0).toUpperCase()+a[d].substring(1);return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(a){var b=this.gsub(/[\x00-\x1f\\]/,function(a){var b=String.specialChar[a[0]];return b?b:"\\u00"+a[0].charCodeAt().toPaddedString(2,16)});return a?'"'+b.replace(/"/g,'\\"')+'"':"'"+b.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(!0)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;return a.blank()?!1:(a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(a))},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval("("+json+")")}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return(new Template(this,b)).evaluate(a)}}),(Prototype.Browser.WebKit||Prototype.Browser.IE)&&Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}}),String.prototype.gsub.prepareReplacement=function(a){if(Object.isFunction(a))return a;var b=new Template(a);return function(a){return b.evaluate(a)}},String.prototype.parseQuery=String.prototype.toQueryParams,Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")}),String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(a,b){this.template=a.toString(),this.pattern=b||Template.Pattern},evaluate:function(a){return Object.isFunction(a.toTemplateReplacements)&&(a=a.toTemplateReplacements()),this.template.gsub(this.pattern,function(b){if(a==null)return"";var c=b[1]||"";if(c=="\\")return b[2];var d=a,e=b[3],f=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;b=f.exec(e);if(b==null)return c;while(b!=null){var g=b[1].startsWith("[")?b[2].gsub("\\\\]","]"):b[1];d=d[g];if(null==d||""==b[3])break;e=e.substring("["==b[3]?b[1].length:b[0].length),b=f.exec(e)}return c+String.interpret(d)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={},Enumerable={each:function(a,b){var c=0;try{this._each(function(d){a.call(b,d,c++)})}catch(d){if(d!=$break)throw d}return this},eachSlice:function(a,b,c){var d=-a,e=[],f=this.toArray();if(a<1)return f;while((d+=a)<f.length)e.push(f.slice(d,d+a));return e.collect(b,c)},all:function(a,b){a=a||Prototype.K;var c=!0;return this.each(function(d,e){c=c&&!!a.call(b,d,e);if(!c)throw $break}),c},any:function(a,b){a=a||Prototype.K;var c=!1;return this.each(function(d,e){if(c=!!a.call(b,d,e))throw $break}),c},collect:function(a,b){a=a||Prototype.K;var c=[];return this.each(function(d,e){c.push(a.call(b,d,e))}),c},detect:function(a,b){var c;return this.each(function(d,e){if(a.call(b,d,e))throw c=d,$break}),c},findAll:function(a,b){var c=[];return this.each(function(d,e){a.call(b,d,e)&&c.push(d)}),c},grep:function(a,b,c){b=b||Prototype.K;var d=[];return Object.isString(a)&&(a=new RegExp(a)),this.each(function(e,f){a.match(e)&&d.push(b.call(c,e,f))}),d},include:function(a){if(Object.isFunction(this.indexOf)&&this.indexOf(a)!=-1)return!0;var b=!1;return this.each(function(c){if(c==a)throw b=!0,$break}),b},inGroupsOf:function(a,b){return b=Object.isUndefined(b)?null:b,this.eachSlice(a,function(c){while(c.length<a)c.push(b);return c})},inject:function(a,b,c){return this.each(function(d,e){a=b.call(c,a,d,e)}),a},invoke:function(a){var b=$A(arguments).slice(1);return this.map(function(c){return c[a].apply(c,b)})},max:function(a,b){a=a||Prototype.K;var c;return this.each(function(d,e){d=a.call(b,d,e);if(c==null||d>=c)c=d}),c},min:function(a,b){a=a||Prototype.K;var c;return this.each(function(d,e){d=a.call(b,d,e);if(c==null||d<c)c=d}),c},partition:function(a,b){a=a||Prototype.K;var c=[],d=[];return this.each(function(e,f){(a.call(b,e,f)?c:d).push(e)}),[c,d]},pluck:function(a){var b=[];return this.each(function(c){b.push(c[a])}),b},reject:function(a,b){var c=[];return this.each(function(d,e){a.call(b,d,e)||c.push(d)}),c},sortBy:function(a,b){return this.map(function(c,d){return{value:c,criteria:a.call(b,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var a=Prototype.K,b=$A(arguments);Object.isFunction(b.last())&&(a=b.pop());var c=[this].concat(b).map($A);return this.map(function(b,d){return a(c.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any}),Prototype.Browser.WebKit&&($A=function(a){if(!a)return[];if(typeof a=="function"&&typeof a.length=="number"&&typeof a.item=="function"||!a.toArray){var b=a.length||0,c=new Array(b);while(b--)c[b]=a[b];return c}return a.toArray()}),Array.from=$A,Object.extend(Array.prototype,Enumerable),Array.prototype._reverse||(Array.prototype._reverse=Array.prototype.reverse),Object.extend(Array.prototype,{_each:function(a){for(var b=0,c=this.length;b<c;b++)a(this[b])},clear:function(){return this.length=0,this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(a,b){return a.concat(Object.isArray(b)?b.flatten():[b])})},without:function(){var a=$A(arguments);return this.select(function(b){return!a.include(b)})},reverse:function(a){return(a!==!1?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(b,c,d){return(0==d||(a?b.last()!=c:!b.include(c)))&&b.push(c),b})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(a){return b===a})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];return this.each(function(b){var c=Object.toJSON(b);Object.isUndefined(c)||a.push(c)}),"["+a.join(", ")+"]"}}),Object.isFunction(Array.prototype.forEach)&&(Array.prototype._each=Array.prototype.forEach),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b||(b=0);var c=this.length;b<0&&(b=c+b);for(;b<c;b++)if(this[b]===a)return b;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a,b){b=isNaN(b)?this.length:(b<0?this.length+b:b)+1;var c=this.slice(0,b).reverse().indexOf(a);return c<0?c:b-c-1}),Array.prototype.toArray=Array.prototype.clone,Prototype.Browser.Opera&&(Array.prototype.concat=function(){var a=[];for(var b=0,c=this.length;b<c;b++)a.push(this[b]);for(var b=0,c=arguments.length;b<c;b++)if(Object.isArray(arguments[b]))for(var d=0,e=arguments[b].length;d<e;d++)a.push(arguments[b][d]);else a.push(arguments[b]);return a}),Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a,b){return $R(0,this,!0).each(a,b),this},toPaddedString:function(a,b){var c=this.toString(b||10);return"0".times(a-c.length)+c},toJSON:function(){return isFinite(this)?this.toString():"null"}}),$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});var Hash=Class.create(Enumerable,function(){function a(a,b){return Object.isUndefined(b)?a:a+"="+encodeURIComponent(String.interpret(b))}return{initialize:function(a){this._object=Object.isHash(a)?a.toObject():Object.clone(a)},_each:function(a){for(var b in this._object){var c=this._object[b],d=[b,c];d.key=b,d.value=c,a(d)}},set:function(a,b){return this._object[a]=b},get:function(a){if(this._object[a]!==Object.prototype[a])return this._object[a]},unset:function(a){var b=this._object[a];return delete this._object[a],b},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(a){var b=this.detect(function(b){return b.value===a});return b&&b.key},merge:function(a){return this.clone().update(a)},update:function(a){return(new Hash(a)).inject(this,function(a,b){return a.set(b.key,b.value),a})},toQueryString:function(){return this.inject([],function(b,c){var d=encodeURIComponent(c.key),e=c.value;if(e&&typeof e=="object"){if(Object.isArray(e))return b.concat(e.map(a.curry(d)))}else b.push(a(d,e));return b}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(a){return a.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}}());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject,Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(a,b,c){this.start=a,this.end=b,this.exclusive=c},_each:function(a){var b=this.start;while(this.include(b))a(b),b=b.succ()},include:function(a){return a<this.start?!1:this.exclusive?a<this.end:a<=this.end}}),$R=function(a,b,c){return new ObjectRange(a,b,c)},Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||!1},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,b,c,d){this.each(function(e){if(Object.isFunction(e[a]))try{e[a].apply(e,[b,c,d])}catch(f){}})}},Object.extend(Ajax.Responders,Enumerable),Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}}),Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:!0,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:!0,evalJS:!0},Object.extend(this.options,a||{}),this.options.method=this.options.method.toLowerCase(),Object.isString(this.options.parameters)?this.options.parameters=this.options.parameters.toQueryParams():Object.isHash(this.options.parameters)&&(this.options.parameters=this.options.parameters.toObject())}}),Ajax.Request=Class.create(Ajax.Base,{_complete:!1,initialize:function($super,a,b){$super(b),this.transport=Ajax.getTransport(),this.request(a)},request:function(a){this.url=a,this.method=this.options.method;var b=Object.clone(this.options.parameters);["get","post"].include(this.method)||(b._method=this.method,this.method="post"),this.parameters=b;if(b=Object.toQueryString(b))this.method=="get"?this.url+=(this.url.include("?")?"&":"?")+b:/Konqueror|Safari|KHTML/.test(navigator.userAgent)&&(b+="&_=");try{var c=new Ajax.Response(this);this.options.onCreate&&this.options.onCreate(c),Ajax.Responders.dispatch("onCreate",this,c),this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous),this.options.asynchronous&&this.respondToReadyState.bind(this).defer(1),this.transport.onreadystatechange=this.onStateChange.bind(this),this.setRequestHeaders(),this.body=this.method=="post"?this.options.postBody||b:null,this.transport.send(this.body),!this.options.asynchronous&&this.transport.overrideMimeType&&this.onStateChange()}catch(d){this.dispatchException(d)}},onStateChange:function(){var a=this.transport.readyState;a>1&&(a!=4||!this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};this.method=="post"&&(a["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:""),this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005&&(a.Connection="close"));if(typeof this.options.requestHeaders=="object"){var b=this.options.requestHeaders;if(Object.isFunction(b.push))for(var c=0,d=b.length;c<d;c+=2)a[b[c]]=b[c+1];else $H(b).each(function(b){a[b.key]=b.value})}for(var e in a)this.transport.setRequestHeader(e,a[e])},success:function(){var a=this.getStatus();return!a||a>=200&&a<300},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var b=Ajax.Request.Events[a],c=new Ajax.Response(this);if(b=="Complete"){try{this._complete=!0,(this.options["on"+c.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(c,c.headerJSON)}catch(d){this.dispatchException(d)}var e=c.getHeader("Content-type");(this.options.evalJS=="force"||this.options.evalJS&&this.isSameOrigin()&&e&&e.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))&&this.evalResponse()}try{(this.options["on"+b]||Prototype.emptyFunction)(c,c.headerJSON),Ajax.Responders.dispatch("on"+b,this,c,c.headerJSON)}catch(d){this.dispatchException(d)}b=="Complete"&&(this.transport.onreadystatechange=Prototype.emptyFunction)},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return!a||a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""})},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a),Ajax.Responders.dispatch("onException",this,a)}}),Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"],Ajax.Response=Class.create({initialize:function(a){this.request=a;var b=this.transport=a.transport,c=this.readyState=b.readyState;if(c>2&&!Prototype.Browser.IE||c==4)this.status=this.getStatus(),this.statusText=this.getStatusText(),this.responseText=String.interpret(b.responseText),this.headerJSON=this._getHeaderJSON();if(c==4){var d=b.responseXML;this.responseXML=Object.isUndefined(d)?null:d,this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json")||this.responseText.blank())return null;try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}}),Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,b,c){this.container={success:a.success||a,failure:a.failure||(a.success?null:a)},c=Object.clone(c);var d=c.onComplete;c.onComplete=function(a,b){this.updateContent(a.responseText),Object.isFunction(d)&&d(a,b)}.bind(this),$super(b,c)},updateContent:function(a){var b=this.container[this.success()?"success":"failure"],c=this.options;c.evalScripts||(a=a.stripScripts());if(b=$(b))if(c.insertion)if(Object.isString(c.insertion)){var d={};d[c.insertion]=a,b.insert(d)}else c.insertion(b,a);else b.update(a)}}),Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,b,c){$super(c),this.onComplete=this.options.onComplete,this.frequency=this.options.frequency||2,this.decay=this.options.decay||1,this.updater={},this.container=a,this.url=b,this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this),this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined,clearTimeout(this.timer),(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){this.options.decay&&(this.decay=a.responseText==this.lastText?this.decay*this.options.decay:1,this.lastText=a.responseText),this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}}),Prototype.BrowserFeatures.XPath&&(document._getElementsByXPath=function(a,b){var c=[],d=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var e=0,f=d.snapshotLength;e<f;e++)c.push(Element.extend(d.snapshotItem(e)));return c});if(!window.Node)var Node={};Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}),function(){var a=this.Element;this.Element=function(a,b){b=b||{},a=a.toLowerCase();var c=Element.cache;return Prototype.Browser.IE&&b.name?(a="<"+a+' name="'+b.name+'">',delete b.name,Element.writeAttribute(document.createElement(a),b)):(c[a]||(c[a]=Element.extend(document.createElement(a))),Element.writeAttribute(c[a].cloneNode(!1),b))},Object.extend(this.Element,a||{}),a&&(this.Element.prototype=a.prototype)}.call(window),Element.cache={},Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){return a=$(a),Element[Element.visible(a)?"hide":"show"](a),a},hide:function(a){return a=$(a),a.style.display="none",a},show:function(a){return a=$(a),a.style.display="",a},remove:function(a){return a=$(a),a.parentNode.removeChild(a),a},update:function(a,b){return a=$(a),b&&b.toElement&&(b=b.toElement()),Object.isElement(b)?a.update().insert(b):(b=Object.toHTML(b),a.innerHTML=b.stripScripts(),b.evalScripts.bind(b).defer(),a)},replace:function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();else if(!Object.isElement(b)){b=Object.toHTML(b);var c=a.ownerDocument.createRange();c.selectNode(a),b.evalScripts.bind(b).defer(),b=c.createContextualFragment(b.stripScripts())}return a.parentNode.replaceChild(b,a),a},insert:function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var c,d,e,f;for(var g in b){c=b[g],g=g.toLowerCase(),d=Element._insertionTranslations[g],c&&c.toElement&&(c=c.toElement());if(Object.isElement(c)){d(a,c);continue}c=Object.toHTML(c),e=(g=="before"||g=="after"?a.parentNode:a).tagName.toUpperCase(),f=Element._getContentFromAnonymousElement(e,c.stripScripts()),(g=="top"||g=="after")&&f.reverse(),f.each(d.curry(a)),c.evalScripts.bind(c).defer()}return a},wrap:function(a,b,c){return a=$(a),Object.isElement(b)?$(b).writeAttribute(c||{}):Object.isString(b)?b=new Element(b,c):b=new Element("div",b),a.parentNode&&a.parentNode.replaceChild(b,a),b.appendChild(a),b},inspect:function(a){a=$(a);var b="<"+a.tagName.toLowerCase();return $H({id:"id",className:"class"}).each(function(c){var d=c.first(),e=c.last(),f=(a[d]||"").toString();f&&(b+=" "+e+"="+f.inspect(!0))}),b+">"},recursivelyCollect:function(a,b){a=$(a);var c=[];while(a=a[b])a.nodeType==1&&c.push(Element.extend(a));return c},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1)a=a.nextSibling;return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];while(a&&a.nodeType!=1)a=a.nextSibling;return a?[a].concat($(a).nextSiblings()):[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){return a=$(a),a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(a,b){return Object.isString(b)&&(b=new Selector(b)),b.match($(a))},up:function(a,b,c){a=$(a);if(arguments.length==1)return $(a.parentNode);var d=a.ancestors();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},down:function(a,b,c){return a=$(a),arguments.length==1?a.firstDescendant():Object.isNumber(b)?a.descendants()[b]:Element.select(a,b)[c||0]},previous:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(a));var d=a.previousSiblings();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},next:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(a));var d=a.nextSiblings();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(a){a=$(a);var b=a.readAttribute("id"),c=arguments.callee;if(b)return b;do b="anonymous_element_"+c.counter++;while($(b));return a.writeAttribute("id",b),b},readAttribute:function(a,b){a=$(a);if(Prototype.Browser.IE){var c=Element._attributeTranslations.read;if(c.values[b])return c.values[b](a,b);c.names[b]&&(b=c.names[b]);if(b.include(":"))return!a.attributes||!a.attributes[b]?null:a.attributes[b].value}return a.getAttribute(b)},writeAttribute:function(a,b,c){a=$(a);var d={},e=Element._attributeTranslations.write;typeof b=="object"?d=b:d[b]=Object.isUndefined(c)?!0:c;for(var f in d)b=e.names[f]||f,c=d[f],e.values[f]&&(b=e.values[f](a,c)),c===!1||c===null?a.removeAttribute(b):c===!0?a.setAttribute(b,b):a.setAttribute(b,c);return a},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a)))return;var c=a.className;return c.length>0&&(c==b||(new RegExp("(^|\\s)"+b+"(\\s|$)")).test(c))},addClassName:function(a,b){if(!(a=$(a)))return;return a.hasClassName(b)||(a.className+=(a.className?" ":"")+b),a},removeClassName:function(a,b){if(!(a=$(a)))return;return a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip(),a},toggleClassName:function(a,b){if(!(a=$(a)))return;return a[a.hasClassName(b)?"removeClassName":"addClassName"](b)},cleanWhitespace:function(a){a=$(a);var b=a.firstChild;while(b){var c=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b),b=c}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(a,b){a=$(a),b=$(b);if(a.compareDocumentPosition)return(a.compareDocumentPosition(b)&8)===8;if(b.contains)return b.contains(a)&&b!==a;while(a=a.parentNode)if(a==b)return!0;return!1},scrollTo:function(a){a=$(a);var b=a.cumulativeOffset();return window.scrollTo(b[0],b[1]),a},getStyle:function(a,b){a=$(a),b=b=="float"?"cssFloat":b.camelize();var c=a.style[b];if(!c||c=="auto"){var d=document.defaultView.getComputedStyle(a,null);c=d?d[b]:null}return b=="opacity"?c?parseFloat(c):1:c=="auto"?null:c},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,b){a=$(a);var c=a.style,d;if(Object.isString(b))return a.style.cssText+=";"+b,b.include("opacity")?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a;for(var e in b)e=="opacity"?a.setOpacity(b[e]):c[e=="float"||e=="cssFloat"?Object.isUndefined(c.styleFloat)?"cssFloat":"styleFloat":e]=b[e];return a},setOpacity:function(a,b){return a=$(a),a.style.opacity=b==1||b===""?"":b<1e-5?0:b,a},getDimensions:function(a){a=$(a);var b=a.getStyle("display");if(b!="none"&&b!=null)return{width:a.offsetWidth,height:a.offsetHeight};var c=a.style,d=c.visibility,e=c.position,f=c.display;c.visibility="hidden",c.position="absolute",c.display="block";var g=a.clientWidth,h=a.clientHeight;return c.display=f,c.position=e,c.visibility=d,{width:g,height:h}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b)a._madePositioned=!0,a.style.position="relative",Prototype.Browser.Opera&&(a.style.top=0,a.style.left=0);return a},undoPositioned:function(a){return a=$(a),a._madePositioned&&(a._madePositioned=undefined,a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""),a},makeClipping:function(a){return a=$(a),a._overflow?a:(a._overflow=Element.getStyle(a,"overflow")||"auto",a._overflow!=="hidden"&&(a.style.overflow="hidden"),a)},undoClipping:function(a){return a=$(a),a._overflow?(a.style.overflow=a._overflow=="auto"?"":a._overflow,a._overflow=null,a):a},cumulativeOffset:function(a){var b=0,c=0;do b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;while(a);return Element._returnOffset(c,b)},positionedOffset:function(a){var b=0,c=0;do{b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;if(a){if(a.tagName.toUpperCase()=="BODY")break;var d=Element.getStyle(a,"position");if(d!=="static")break}}while(a);return Element._returnOffset(c,b)},absolutize:function(a){a=$(a);if(a.getStyle("position")=="absolute")return a;var b=a.positionedOffset(),c=b[1],d=b[0],e=a.clientWidth,f=a.clientHeight;return a._originalLeft=d-parseFloat(a.style.left||0),a._originalTop=c-parseFloat(a.style.top||0),a._originalWidth=a.style.width,a._originalHeight=a.style.height,a.style.position="absolute",a.style.top=c+"px",a.style.left=d+"px",a.style.width=e+"px",a.style.height=f+"px",a},relativize:function(a){a=$(a);if(a.getStyle("position")=="relative")return a;a.style.position="relative";var b=parseFloat(a.style.top||0)-(a._originalTop||0),c=parseFloat(a.style.left||0)-(a._originalLeft||0);return a.style.top=b+"px",a.style.left=c+"px",a.style.height=a._originalHeight,a.style.width=a._originalWidth,a},cumulativeScrollOffset:function(a){var b=0,c=0;do b+=a.scrollTop||0,c+=a.scrollLeft||0,a=a.parentNode;while(a);return Element._returnOffset(c,b)},getOffsetParent:function(a){if(a.offsetParent)return $(a.offsetParent);if(a==document.body)return $(a);while((a=a.parentNode)&&a!=document.body)if(Element.getStyle(a,"position")!="static")return $(a);return $(document.body)},viewportOffset:function(a){var b=0,c=0,d=a;do{b+=d.offsetTop||0,c+=d.offsetLeft||0;if(d.offsetParent==document.body&&Element.getStyle(d,"position")=="absolute")break}while(d=d.offsetParent);d=a;do if(!Prototype.Browser.Opera||d.tagName&&d.tagName.toUpperCase()=="BODY")b-=d.scrollTop||0,c-=d.scrollLeft||0;while(d=d.parentNode);return Element._returnOffset(c,b)},clonePosition:function(a,b){var c=Object.extend({setLeft:!0,setTop:!0,setWidth:!0,setHeight:!0,offsetTop:0,offsetLeft:0},arguments[2]||{});b=$(b);var d=b.viewportOffset();a=$(a);var e=[0,0],f=null;return Element.getStyle(a,"position")=="absolute"&&(f=a.getOffsetParent(),e=f.viewportOffset()),f==document.body&&(e[0]-=document.body.offsetLeft,e[1]-=document.body.offsetTop),c.setLeft&&(a.style.left=d[0]-e[0]+c.offsetLeft+"px"),c.setTop&&(a.style.top=d[1]-e[1]+c.offsetTop+"px"),c.setWidth&&(a.style.width=b.offsetWidth+"px"),c.setHeight&&(a.style.height=b.offsetHeight+"px"),a}},Element.Methods.identify.counter=1,Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants}),Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}},Prototype.Browser.Opera?(Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(a,b,c){switch(c){case"left":case"top":case"right":case"bottom":if(a(b,"position")==="static")return null;case"height":case"width":if(!Element.visible(b))return null;var d=parseInt(a(b,c),10);if(d!==b["offset"+c.capitalize()])return d+"px";var e;return c==="height"?e=["border-top-width","padding-top","padding-bottom","border-bottom-width"]:e=["border-left-width","padding-left","padding-right","border-right-width"],e.inject(d,function(c,d){var e=a(b,d);return e===null?c:c-parseInt(e,10)})+"px";default:return a(b,c)}}),Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,b,c){return c==="title"?b.title:a(b,c)})):Prototype.Browser.IE?(Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(a,b){b=$(b);try{b.offsetParent}catch(c){return $(document.body)}var d=b.getStyle("position");if(d!=="static")return a(b);b.setStyle({position:"relative"});var e=a(b);return b.setStyle({position:d}),e}),$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(a,b){b=$(b);try{b.offsetParent}catch(c){return Element._returnOffset(0,0)}var d=b.getStyle("position");if(d!=="static")return a(b);var e=b.getOffsetParent();e&&e.getStyle("position")==="fixed"&&e.setStyle({zoom:1}),b.setStyle({position:"relative"});var f=a(b);return b.setStyle({position:d}),f})}),Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(a,b){try{b.offsetParent}catch(c){return Element._returnOffset(0,0)}return a(b)}),Element.Methods.getStyle=function(a,b){a=$(a),b=b=="float"||b=="cssFloat"?"styleFloat":b.camelize();var c=a.style[b];!c&&a.currentStyle&&(c=a.currentStyle[b]);if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(c[1])return parseFloat(c[1])/100;return 1}return c=="auto"?b!="width"&&b!="height"||a.getStyle("display")=="none"?null:a["offset"+b.capitalize()]+"px":c},Element.Methods.setOpacity=function(a,b){function c(a){return a.replace(/alpha\([^\)]*\)/gi,"")}a=$(a);var d=a.currentStyle;if(d&&!d.hasLayout||!d&&a.style.zoom=="normal")a.style.zoom=1;var e=a.getStyle("filter"),f=a.style;return b==1||b===""?((e=c(e))?f.filter=e:f.removeAttribute("filter"),a):(b<1e-5&&(b=0),f.filter=c(e)+"alpha(opacity="+b*100+")",a)},Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,b){var c=a.getAttributeNode(b);return c?c.value:""},_getEv:function(a,b){return b=a.getAttribute(b),b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}},Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}},Element._attributeTranslations.has={},$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a,Element._attributeTranslations.has[a.toLowerCase()]=a}),function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})}(Element._attributeTranslations.read.values)):Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)?Element.Methods.setOpacity=function(a,b){return a=$(a),a.style.opacity=b==1?.999999:b===""?"":b<1e-5?0:b,a}:Prototype.Browser.WebKit&&(Element.Methods.setOpacity=function(a,b){a=$
(a),a.style.opacity=b==1||b===""?"":b<1e-5?0:b;if(b==1)if(a.tagName.toUpperCase()=="IMG"&&a.width)a.width++,a.width--;else try{var c=document.createTextNode(" ");a.appendChild(c),a.removeChild(c)}catch(d){}return a},Element.Methods.cumulativeOffset=function(a){var b=0,c=0;do{b+=a.offsetTop||0,c+=a.offsetLeft||0;if(a.offsetParent==document.body&&Element.getStyle(a,"position")=="absolute")break;a=a.offsetParent}while(a);return Element._returnOffset(c,b)});if(Prototype.Browser.IE||Prototype.Browser.Opera)Element.Methods.update=function(a,b){a=$(a),b&&b.toElement&&(b=b.toElement());if(Object.isElement(b))return a.update().insert(b);b=Object.toHTML(b);var c=a.tagName.toUpperCase();return c in Element._insertionTranslations.tags?($A(a.childNodes).each(function(b){a.removeChild(b)}),Element._getContentFromAnonymousElement(c,b.stripScripts()).each(function(b){a.appendChild(b)})):a.innerHTML=b.stripScripts(),b.evalScripts.bind(b).defer(),a};"outerHTML"in document.createElement("div")&&(Element.Methods.replace=function(a,b){a=$(a),b&&b.toElement&&(b=b.toElement());if(Object.isElement(b))return a.parentNode.replaceChild(b,a),a;b=Object.toHTML(b);var c=a.parentNode,d=c.tagName.toUpperCase();if(Element._insertionTranslations.tags[d]){var e=a.next(),f=Element._getContentFromAnonymousElement(d,b.stripScripts());c.removeChild(a),e?f.each(function(a){c.insertBefore(a,e)}):f.each(function(a){c.appendChild(a)})}else a.outerHTML=b.stripScripts();return b.evalScripts.bind(b).defer(),a}),Element._returnOffset=function(a,b){var c=[a,b];return c.left=a,c.top=b,c},Element._getContentFromAnonymousElement=function(a,b){var c=new Element("div"),d=Element._insertionTranslations.tags[a];return d?(c.innerHTML=d[0]+b+d[1],d[2].times(function(){c=c.firstChild})):c.innerHTML=b,$A(c.childNodes)},Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}},function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}.call(Element._insertionTranslations),Element.Methods.Simulated={hasAttribute:function(a,b){b=Element._attributeTranslations.has[b]||b;var c=$(a).getAttributeNode(b);return!!c&&!!c.specified}},Element.Methods.ByTag={},Object.extend(Element,Element.Methods),!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__&&(window.HTMLElement={},window.HTMLElement.prototype=document.createElement("div").__proto__,Prototype.BrowserFeatures.ElementExtensions=!0),Element.extend=function(){if(Prototype.BrowserFeatures.SpecificElementExtensions)return Prototype.K;var a={},b=Element.Methods.ByTag,c=Object.extend(function(c){if(!c||c._extendedByPrototype||c.nodeType!=1||c==window)return c;var d=Object.clone(a),e=c.tagName.toUpperCase(),f,g;b[e]&&Object.extend(d,b[e]);for(f in d)g=d[f],Object.isFunction(g)&&!(f in c)&&(c[f]=g.methodize());return c._extendedByPrototype=Prototype.emptyFunction,c},{refresh:function(){Prototype.BrowserFeatures.ElementExtensions||(Object.extend(a,Element.Methods),Object.extend(a,Element.Methods.Simulated))}});return c.refresh(),c}(),Element.hasAttribute=function(a,b){return a.hasAttribute?a.hasAttribute(b):Element.Methods.Simulated.hasAttribute(a,b)},Element.addMethods=function(a){function e(b){b=b.toUpperCase(),Element.Methods.ByTag[b]||(Element.Methods.ByTag[b]={}),Object.extend(Element.Methods.ByTag[b],a)}function f(a,b,c){c=c||!1;for(var d in a){var e=a[d];if(!Object.isFunction(e))continue;if(!c||!(d in b))b[d]=e.methodize()}}function g(a){var b,c={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};return c[a]&&(b="HTML"+c[a]+"Element"),window[b]?window[b]:(b="HTML"+a+"Element",window[b]?window[b]:(b="HTML"+a.capitalize()+"Element",window[b]?window[b]:(window[b]={},window[b].prototype=document.createElement(a).__proto__,window[b])))}var b=Prototype.BrowserFeatures,c=Element.Methods.ByTag;a||(Object.extend(Form,Form.Methods),Object.extend(Form.Element,Form.Element.Methods),Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)}));if(arguments.length==2){var d=a;a=arguments[1]}d?Object.isArray(d)?d.each(e):e(d):Object.extend(Element.Methods,a||{}),b.ElementExtensions&&(f(Element.Methods,HTMLElement.prototype),f(Element.Methods.Simulated,HTMLElement.prototype,!0));if(b.SpecificElementExtensions)for(var h in Element.Methods.ByTag){var i=g(h);if(Object.isUndefined(i))continue;f(c[h],i.prototype)}Object.extend(Element,Element.Methods),delete Element.ByTag,Element.extend.refresh&&Element.extend.refresh(),Element.cache={}},document.viewport={getDimensions:function(){var a={},b=Prototype.Browser;return $w("width height").each(function(c){var d=c.capitalize();b.WebKit&&!document.evaluate?a[c]=self["inner"+d]:b.Opera&&parseFloat(window.opera.version())<9.5?a[c]=document.body["client"+d]:a[c]=document.documentElement["client"+d]}),a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip(),this.shouldUseSelectorsAPI()?this.mode="selectorsAPI":this.shouldUseXPath()?(this.mode="xpath",this.compileXPathMatcher()):(this.mode="normal",this.compileMatcher())},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath)return!1;var a=this.expression;return Prototype.Browser.WebKit&&(a.include("-of-type")||a.include(":empty"))?!1:/(\[[\w-]*?:|:checked)/.test(a)?!1:!0},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI)return!1;Selector._div||(Selector._div=new Element("div"));try{Selector._div.querySelector(this.expression)}catch(a){return!1}return!0},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&/\S/.test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):(new Template(c[i])).evaluate(m)),e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}"),eval(this.matcher.join("\n")),Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var a=this.expression,b=Selector.patterns,c=Selector.xpath,d,e;if(Selector._cache[a]){this.xpath=Selector._cache[a];return}this.matcher=[".//*"];while(a&&d!=a&&/\S/.test(a)){d=a;for(var f in b)if(e=a.match(b[f])){this.matcher.push(Object.isFunction(c[f])?c[f](e):(new Template(c[f])).evaluate(e)),a=a.replace(e[0],"");break}}this.xpath=this.matcher.join(""),Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;var b=this.expression,c;switch(this.mode){case"selectorsAPI":if(a!==document){var d=a.id,e=$(a).identify();b="#"+e+" "+b}return c=$A(a.querySelectorAll(b)).map(Element.extend),a.id=d,c;case"xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a)}},match:function(a){this.tokens=[];var b=this.expression,c=Selector.patterns,d=Selector.assertions,e,f,g;while(b&&e!==b&&/\S/.test(b)){e=b;for(var h in c){f=c[h];if(g=b.match(f))if(d[h])this.tokens.push([h,Object.clone(g)]),b=b.replace(g[0],"");else return this.findElements(document).include(a)}}var i=!0,j,k;for(var h=0,l;l=this.tokens[h];h++){j=l[0],k=l[1];if(!Selector.assertions[j](a,k)){i=!1;break}}return i},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){return a[1]=="*"?"":"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){return a[1]=a[1].toLowerCase(),(new Template("[@#{1}]")).evaluate(a)},attr:function(a){return a[1]=a[1].toLowerCase(),a[3]=a[5]||a[6],(new Template(Selector.xpath.operators[a[2]])).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];return b?Object.isFunction(b)?b(a):(new Template(Selector.xpath.pseudos[a[1]])).evaluate(a):""},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(a){var b=a[6],c=Selector.patterns,d=Selector.xpath,e,f,g=[];while(b&&e!=b&&/\S/.test(b)){e=b;for(var h in c)if(a=b.match(c[h])){f=Object.isFunction(d[h])?d[h](a):(new Template(d[h])).evaluate(a),g.push("("+f.substring(1,f.length-1)+")"),b=b.replace(a[0],"");break}}return"[not("+g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){return a[6]="1",Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){return a[6]="1",Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(a,b){var c,d=b[6],e;d=="even"&&(d="2n+0"),d=="odd"&&(d="2n+1");if(c=d.match(/^(\d+)$/))return"["+a+"= "+c[1]+"]";if(c=d.match(/^(-?\d*)?n(([+-])(\d+))?/)){c[1]=="-"&&(c[1]=-1);var f=c[1]?Number(c[1]):1,g=c[2]?Number(c[2]):0;return e="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]",(new Template(e)).evaluate({fragment:a,a:f,b:g})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){return a[3]=a[5]||a[6],(new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;')).evaluate(a)},pseudo:function(a){return a[6]&&(a[6]=a[6].replace(/"/g,'\\"')),(new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;')).evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(a,b){var c=Element.readAttribute(a,b[1]);return c&&Selector.operators[b[2]](c,b[5]||b[6])}},handlers:{concat:function(a,b){for(var c=0,d;d=b[c];c++)a.push(d);return a},mark:function(a){var b=Prototype.emptyFunction;for(var c=0,d;d=a[c];c++)d._countedByPrototype=b;return a},unmark:function(a){for(var b=0,c;c=a[b];b++)c._countedByPrototype=undefined;return a},index:function(a,b,c){a._countedByPrototype=Prototype.emptyFunction;if(b)for(var d=a.childNodes,e=d.length-1,f=1;e>=0;e--){var g=d[e];g.nodeType==1&&(!c||g._countedByPrototype)&&(g.nodeIndex=f++)}else for(var e=0,f=1,d=a.childNodes;g=d[e];e++)g.nodeType==1&&(!c||g._countedByPrototype)&&(g.nodeIndex=f++)},unique:function(a){if(a.length==0)return a;var b=[],c;for(var d=0,e=a.length;d<e;d++)(c=a[d])._countedByPrototype||(c._countedByPrototype=Prototype.emptyFunction,b.push(Element.extend(c)));return Selector.handlers.unmark(b)},descendant:function(a){var b=Selector.handlers;for(var c=0,d=[],e;e=a[c];c++)b.concat(d,e.getElementsByTagName("*"));return d},child:function(a){var b=Selector.handlers;for(var c=0,d=[],e;e=a[c];c++)for(var f=0,g;g=e.childNodes[f];f++)g.nodeType==1&&g.tagName!="!"&&d.push(g);return d},adjacent:function(a){for(var b=0,c=[],d;d=a[b];b++){var e=this.nextElementSibling(d);e&&c.push(e)}return c},laterSibling:function(a){var b=Selector.handlers;for(var c=0,d=[],e;e=a[c];c++)b.concat(d,Element.nextSiblings(e));return d},nextElementSibling:function(a){while(a=a.nextSibling)if(a.nodeType==1)return a;return null},previousElementSibling:function(a){while(a=a.previousSibling)if(a.nodeType==1)return a;return null},tagName:function(a,b,c,d){var e=c.toUpperCase(),f=[],g=Selector.handlers;if(a){if(d){if(d=="descendant"){for(var h=0,i;i=a[h];h++)g.concat(f,i.getElementsByTagName(c));return f}a=this[d](a);if(c=="*")return a}for(var h=0,i;i=a[h];h++)i.tagName.toUpperCase()===e&&f.push(i);return f}return b.getElementsByTagName(c)},id:function(a,b,c,d){var e=$(c),f=Selector.handlers;if(!e)return[];if(!a&&b==document)return[e];if(a){if(d)if(d=="child"){for(var g=0,h;h=a[g];g++)if(e.parentNode==h)return[e]}else if(d=="descendant"){for(var g=0,h;h=a[g];g++)if(Element.descendantOf(e,h))return[e]}else if(d=="adjacent"){for(var g=0,h;h=a[g];g++)if(Selector.handlers.previousElementSibling(e)==h)return[e]}else a=f[d](a);for(var g=0,h;h=a[g];g++)if(h==e)return[e];return[]}return e&&Element.descendantOf(e,b)?[e]:[]},className:function(a,b,c,d){return a&&d&&(a=this[d](a)),Selector.handlers.byClassName(a,b,c)},byClassName:function(a,b,c){a||(a=Selector.handlers.descendant([b]));var d=" "+c+" ";for(var e=0,f=[],g,h;g=a[e];e++){h=g.className;if(h.length==0)continue;(h==c||(" "+h+" ").include(d))&&f.push(g)}return f},attrPresence:function(a,b,c,d){a||(a=b.getElementsByTagName("*")),a&&d&&(a=this[d](a));var e=[];for(var f=0,g;g=a[f];f++)Element.hasAttribute(g,c)&&e.push(g);return e},attr:function(a,b,c,d,e,f){a||(a=b.getElementsByTagName("*")),a&&f&&(a=this[f](a));var g=Selector.operators[e],h=[];for(var i=0,j;j=a[i];i++){var k=Element.readAttribute(j,c);if(k===null)continue;g(k,d)&&h.push(j)}return h},pseudo:function(a,b,c,d,e){return a&&e&&(a=this[e](a)),a||(a=d.getElementsByTagName("*")),Selector.pseudos[b](a,c,d)}},pseudos:{"first-child":function(a,b,c){for(var d=0,e=[],f;f=a[d];d++){if(Selector.handlers.previousElementSibling(f))continue;e.push(f)}return e},"last-child":function(a,b,c){for(var d=0,e=[],f;f=a[d];d++){if(Selector.handlers.nextElementSibling(f))continue;e.push(f)}return e},"only-child":function(a,b,c){var d=Selector.handlers;for(var e=0,f=[],g;g=a[e];e++)!d.previousElementSibling(g)&&!d.nextElementSibling(g)&&f.push(g);return f},"nth-child":function(a,b,c){return Selector.pseudos.nth(a,b,c)},"nth-last-child":function(a,b,c){return Selector.pseudos.nth(a,b,c,!0)},"nth-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,!1,!0)},"nth-last-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,!0,!0)},"first-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,!1,!0)},"last-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,!0,!0)},"only-of-type":function(a,b,c){var d=Selector.pseudos;return d["last-of-type"](d["first-of-type"](a,b,c),b,c)},getIndices:function(a,b,c){return a==0?b>0?[b]:[]:$R(1,c).inject([],function(c,d){return 0==(d-b)%a&&(d-b)/a>=0&&c.push(d),c})},nth:function(a,b,c,d,e){if(a.length==0)return[];b=="even"&&(b="2n+0"),b=="odd"&&(b="2n+1");var f=Selector.handlers,g=[],h=[],i;f.mark(a);for(var j=0,k;k=a[j];j++)k.parentNode._countedByPrototype||(f.index(k.parentNode,d,e),h.push(k.parentNode));if(b.match(/^\d+$/)){b=Number(b);for(var j=0,k;k=a[j];j++)k.nodeIndex==b&&g.push(k)}else if(i=b.match(/^(-?\d*)?n(([+-])(\d+))?/)){i[1]=="-"&&(i[1]=-1);var l=i[1]?Number(i[1]):1,m=i[2]?Number(i[2]):0,n=Selector.pseudos.getIndices(l,m,a.length);for(var j=0,k,o=n.length;k=a[j];j++)for(var p=0;p<o;p++)k.nodeIndex==n[p]&&g.push(k)}return f.unmark(a),f.unmark(h),g},empty:function(a,b,c){for(var d=0,e=[],f;f=a[d];d++){if(f.tagName=="!"||f.firstChild)continue;e.push(f)}return e},not:function(a,b,c){var d=Selector.handlers,e,f,g=(new Selector(b)).findElements(c);d.mark(g);for(var h=0,i=[],j;j=a[h];h++)j._countedByPrototype||i.push(j);return d.unmark(g),i},enabled:function(a,b,c){for(var d=0,e=[],f;f=a[d];d++)!f.disabled&&(!f.type||f.type!=="hidden")&&e.push(f);return e},disabled:function(a,b,c){for(var d=0,e=[],f;f=a[d];d++)f.disabled&&e.push(f);return e},checked:function(a,b,c){for(var d=0,e=[],f;f=a[d];d++)f.checked&&e.push(f);return e}},operators:{"=":function(a,b){return a==b},"!=":function(a,b){return a!=b},"^=":function(a,b){return a==b||a&&a.startsWith(b)},"$=":function(a,b){return a==b||a&&a.endsWith(b)},"*=":function(a,b){return a==b||a&&a.include(b)},"$=":function(a,b){return a.endsWith(b)},"*=":function(a,b){return a.include(b)},"~=":function(a,b){return(" "+a+" ").include(" "+b+" ")},"|=":function(a,b){return("-"+(a||"").toUpperCase()+"-").include("-"+(b||"").toUpperCase()+"-")}},split:function(a){var b=[];return a.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(a){b.push(a[1].strip())}),b},matchElements:function(a,b){var c=$$(b),d=Selector.handlers;d.mark(c);for(var e=0,f=[],g;g=a[e];e++)g._countedByPrototype&&f.push(g);return d.unmark(c),f},findElement:function(a,b,c){return Object.isNumber(b)&&(c=b,b=!1),Selector.matchElements(a,b||"*")[c||0]},findChildElements:function(a,b){b=Selector.split(b.join(","));var c=[],d=Selector.handlers;for(var e=0,f=b.length,g;e<f;e++)g=new Selector(b[e].strip()),d.concat(c,g.findElements(a));return f>1?d.unique(c):c}}),Prototype.Browser.IE&&Object.extend(Selector.handlers,{concat:function(a,b){for(var c=0,d;d=b[c];c++)d.tagName!=="!"&&a.push(d);return a},unmark:function(a){for(var b=0,c;c=a[b];b++)c.removeAttribute("_countedByPrototype");return a}});var Form={reset:function(a){return $(a).reset(),a},serializeElements:function(a,b){typeof b!="object"?b={hash:!!b}:Object.isUndefined(b.hash)&&(b.hash=!0);var c,d,e=!1,f=b.submit,g=a.inject({},function(a,b){return!b.disabled&&b.name&&(c=b.name,d=$(b).getValue(),d!=null&&b.type!="file"&&(b.type!="submit"||!e&&f!==!1&&(!f||c==f)&&(e=!0))&&(c in a?(Object.isArray(a[c])||(a[c]=[a[c]]),a[c].push(d)):a[c]=d)),a});return b.hash?g:Object.toQueryString(g)}};Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(a,b){return Form.Element.Serializers[b.tagName.toLowerCase()]&&a.push(Element.extend(b)),a})},getInputs:function(a,b,c){a=$(a);var d=a.getElementsByTagName("input");if(!b&&!c)return $A(d).map(Element.extend);for(var e=0,f=[],g=d.length;e<g;e++){var h=d[e];if(b&&h.type!=b||c&&h.name!=c)continue;f.push(Element.extend(h))}return f},disable:function(a){return a=$(a),Form.getElements(a).invoke("disable"),a},enable:function(a){return a=$(a),Form.getElements(a).invoke("enable"),a},findFirstElement:function(a){var b=$(a).getElements().findAll(function(a){return"hidden"!=a.type&&!a.disabled}),c=b.findAll(function(a){return a.hasAttribute("tabIndex")&&a.tabIndex>=0}).sortBy(function(a){return a.tabIndex}).first();return c?c:b.find(function(a){return["input","select","textarea"].include(a.tagName.toLowerCase())})},focusFirstElement:function(a){return a=$(a),a.findFirstElement().activate(),a},request:function(a,b){a=$(a),b=Object.clone(b||{});var c=b.parameters,d=a.readAttribute("action")||"";return d.blank()&&(d=window.location.href),b.parameters=a.serialize(!0),c&&(Object.isString(c)&&(c=c.toQueryParams()),Object.extend(b.parameters,c)),a.hasAttribute("method")&&!b.method&&(b.method=a.method),new Ajax.Request(d,b)}},Form.Element={focus:function(a){return $(a).focus(),a},select:function(a){return $(a).select(),a}},Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};return c[a.name]=b,Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();return Form.Element.Serializers[c](a,b),a},clear:function(a){return $(a).value="",a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus(),a.select&&(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type))&&a.select()}catch(b){}return a},disable:function(a){return a=$(a),a.disabled=!0,a},enable:function(a){return a=$(a),a.disabled=!1,a}};var Field=Form.Element,$F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b))return a.checked?a.value:null;a.checked=!!b},textarea:function(a,b){if(Object.isUndefined(b))return a.value;a.value=b},select:function(a,b){if(Object.isUndefined(b))return this[a.type=="select-one"?"selectOne":"selectMany"](a);var c,d,e=!Object.isArray(b);for(var f=0,g=a.length;f<g;f++){c=a.options[f],d=this.optionValue(c);if(e){if(d==b){c.selected=!0;return}}else c.selected=b.include(d)}},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var b,c=a.length;if(!c)return null;for(var d=0,b=[];d<c;d++){var e=a.options[d];e.selected&&b.push(this.optionValue(e))}return b},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}},Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b),this.element=$(a),this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a))this.callback(this.element,a),this.lastValue=a}}),Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}}),Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}}),Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a),this.callback=b,this.lastValue=this.getValue(),this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();this.lastValue!=a&&(this.callback(this.element,a),this.lastValue=a)},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type)switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this))}}}),Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}}),Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event={};Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(a){var b;switch(a.type){case"mouseover":b=a.fromElement;break;case"mouseout":b=a.toElement;break;default:return null}return Element.extend(b)}}),Event.Methods=function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(a,c){return a.button==b[c]}}else Prototype.Browser.WebKit?a=function(a,b){switch(b){case 0:return a.which==1&&!a.metaKey;case 1:return a.which==1&&a.metaKey;default:return!1}}:a=function(a,b){return a.which?a.which===b+1:a.button===b};return{isLeftClick:function(b){return a(b,0)},isMiddleClick:function(b){return a(b,1)},isRightClick:function(b){return a(b,2)},element:function(a){a=Event.extend(a);var b=a.target,c=a.type,d=a.currentTarget;return d&&d.tagName&&(c==="load"||c==="error"||c==="click"&&d.tagName.toLowerCase()==="input"&&d.type==="radio")&&(b=d),b.nodeType==Node.TEXT_NODE&&(b=b.parentNode),Element.extend(b)},findElement:function(a,b){var c=Event.element(a);if(!b)return c;var d=[c].concat(c.ancestors());return Selector.findElement(d,b,0)},pointer:function(a){var b=document.documentElement,c=document.body||{scrollLeft:0,scrollTop:0};return{x:a.pageX||a.clientX+(b.scrollLeft||c.scrollLeft)-(b.clientLeft||0),y:a.pageY||a.clientY+(b.scrollTop||c.scrollTop)-(b.clientTop||0)}},pointerX:function(a){return Event.pointer(a).x},pointerY:function(a){return Event.pointer(a).y},stop:function(a){Event.extend(a),a.preventDefault(),a.stopPropagation(),a.stopped=!0}}}(),Event.extend=function(){var a=Object.keys(Event.Methods).inject({},function(a,b){return a[b]=Event.Methods[b].methodize(),a});return Prototype.Browser.IE?(Object.extend(a,{stopPropagation:function(){this.cancelBubble=!0},preventDefault:function(){this.returnValue=!1},inspect:function(){return"[object Event]"}}),function(b){if(!b)return!1;if(b._extendedByPrototype)return b;b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);return Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),pageX:c.x,pageY:c.y}),Object.extend(b,a)}):(Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__,Object.extend(Event.prototype,a),Prototype.K)}(),Object.extend(Event,function(){function b(a){return a._prototypeEventID?a._prototypeEventID[0]:(arguments.callee.id=arguments.callee.id||1,a._prototypeEventID=[++arguments.callee.id])}function c(a){return a&&a.include(":")?"dataavailable":a}function d(b){return a[b]=a[b]||{}}function e(a,b){var c=d(a);return c[b]=c[b]||[]}function f(a,c,d){var f=b(a),g=e(f,c);if(g.pluck("handler").include(d))return!1;var h=function(b){if(!Event||!Event.extend||b.eventName&&b.eventName!=c)return!1;Event.extend(b),d.call(a,b)};return h.handler=d,g.push(h),h}function g(a,b,c){var d=e(a,b);return d.find(function(a){return a.handler==c})}function h(a,b,c){var e=d(a);if(!e[b])return!1;e[b]=e[b].without(g(a,b,c))}function i(){for(var b in a)for(var c in a[b])a[b][c]=null}var a=Event.cache;return window.attachEvent&&window.attachEvent("onunload",i),Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,!1),{observe:function(a,b,d){a=$(a);var e=c(b),g=f(a,b,d);return g?(a.addEventListener?a.addEventListener(e,g,!1):a.attachEvent("on"+e,g),a):a},stopObserving:function(a,f,i){a=$(a);var j=b(a),k=c(f);if(!i&&f)return e(j,f).each(function(b){a.stopObserving(f,b.handler)}),a;if(!f)return Object.keys(d(j)).each(function(b){a.stopObserving(b)}),a;var l=g(j,f,i);return l?(a.removeEventListener?a.removeEventListener(k,l,!1):a.detachEvent("on"+k,l),h(j,f,i),a):a},fire:function(a,b,c){a=$(a),a==document&&document.createEvent&&!a.dispatchEvent&&(a=document.documentElement);var d;return document.createEvent?(d=document.createEvent("HTMLEvents"),d.initEvent("dataavailable",!0,!0)):(d=document.createEventObject(),d.eventType="ondataavailable"),d.eventName=b,d.memo=c||{},document.createEvent?a.dispatchEvent(d):a.fireEvent(d.eventType,d),Event.extend(d)}}}()),Object.extend(Event,Event.Methods),Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving}),Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:!1}),function(){function b(){if(document.loaded)return;a&&window.clearInterval(a),document.fire("dom:loaded"),document.loaded=!0}var a;document.addEventListener?Prototype.Browser.WebKit?(a=window.setInterval(function(){/loaded|complete/.test(document.readyState)&&b()},0),Event.observe(window,"load",b)):document.addEventListener("DOMContentLoaded",b,!1):(document.write("<script id=__onDOMContentLoaded defer src=//:></script>"),$("__onDOMContentLoaded").onreadystatechange=function(){this.readyState=="complete"&&(this.onreadystatechange=null,b())})}(),Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}},$continue=new Error('"throw $continue" is deprecated, use "return" instead'),Position={includeScrollOffsets:!1,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(a,b,c){return this.includeScrollOffsets?this.withinIncludingScrolloffsets(a,b,c):(this.xcomp=b,this.ycomp=c,this.offset=Element.cumulativeOffset(a),c>=this.offset[1]&&c<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth)},withinIncludingScrolloffsets:function(a,b,c){var d=Element.cumulativeScrollOffset(a);return this.xcomp=b+d[0]-this.deltaX,this.ycomp=c+d[1]-this.deltaY,this.offset=Element.cumulativeOffset(a),this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,b){if(!a)return 0;if(a=="vertical")return(this.offset[1]+b.offsetHeight-this.ycomp)/b.offsetHeight;if(a=="horizontal")return(this.offset[0]+b.offsetWidth-this.xcomp)/b.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){return Position.prepare(),Element.absolutize(a)},relativize:function(a){return Position.prepare(),Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,b,c){return c=c||{},Element.clonePosition(b,a,c)}};document.getElementsByClassName||(document.getElementsByClassName=function(a){function b(a){return a.blank()?null:"[contains(concat(' ', @class, ' '), ' "+a+" ')]"}return a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(a,c){c=c.toString().strip();var d=/\s/.test(c)?$w(c).map(b).join(""):b(c);return d?document._getElementsByXPath(".//*"+d,a):[]}:function(a,b){b=b.toString().strip();var c=[],d=/\s/.test(b)?$w(b):null;if(!d&&!b)return c;var e=$(a).getElementsByTagName("*");b=" "+b+" ";for(var f=0,g,h;g=e[f];f++)g.className&&(h=" "+g.className+" ")&&(h.include(b)||d&&d.all(function(a){return!a.toString().blank()&&h.include(" "+a+" ")}))&&c.push(Element.extend(g));return c},function(a,b){return $(b||document.body).getElementsByClassName(a)}}(Element.Methods)),Element.ClassNames=Class.create(),Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(a){return a.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a))return;this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)
)return;this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}},Object.extend(Element.ClassNames.prototype,Enumerable),Element.addMethods();var swfobject=function(){function A(){if(t)return;try{var a=i.getElementsByTagName("body")[0].appendChild(Q("span"));a.parentNode.removeChild(a)}catch(b){return}t=!0;var c=l.length;for(var d=0;d<c;d++)l[d]()}function B(a){t?a():l[l.length]=a}function C(b){if(typeof h.addEventListener!=a)h.addEventListener("load",b,!1);else if(typeof i.addEventListener!=a)i.addEventListener("load",b,!1);else if(typeof h.attachEvent!=a)R(h,"onload",b);else if(typeof h.onload=="function"){var c=h.onload;h.onload=function(){c(),b()}}else h.onload=b}function D(){k?E():F()}function E(){var c=i.getElementsByTagName("body")[0],d=Q(b);d.setAttribute("type",e);var f=c.appendChild(d);if(f){var g=0;(function(){if(typeof f.GetVariable!=a){var b=f.GetVariable("$version");b&&(b=b.split(" ")[1].split(","),y.pv=[parseInt(b[0],10),parseInt(b[1],10),parseInt(b[2],10)])}else if(g<10){g++,setTimeout(arguments.callee,10);return}c.removeChild(d),f=null,F()})()}else F()}function F(){var b=m.length;if(b>0)for(var c=0;c<b;c++){var d=m[c].id,e=m[c].callbackFn,f={success:!1,id:d};if(y.pv[0]>0){var g=P(d);if(g)if(S(m[c].swfVersion)&&!(y.wk&&y.wk<312))U(d,!0),e&&(f.success=!0,f.ref=G(d),e(f));else if(m[c].expressInstall&&H()){var h={};h.data=m[c].expressInstall,h.width=g.getAttribute("width")||"0",h.height=g.getAttribute("height")||"0",g.getAttribute("class")&&(h.styleclass=g.getAttribute("class")),g.getAttribute("align")&&(h.align=g.getAttribute("align"));var i={},j=g.getElementsByTagName("param"),k=j.length;for(var l=0;l<k;l++)j[l].getAttribute("name").toLowerCase()!="movie"&&(i[j[l].getAttribute("name")]=j[l].getAttribute("value"));I(h,i,d,e)}else J(g),e&&e(f)}else{U(d,!0);if(e){var n=G(d);n&&typeof n.SetVariable!=a&&(f.success=!0,f.ref=n),e(f)}}}}function G(c){var d=null,e=P(c);if(e&&e.nodeName=="OBJECT")if(typeof e.SetVariable!=a)d=e;else{var f=e.getElementsByTagName(b)[0];f&&(d=f)}return d}function H(){return!u&&S("6.0.65")&&(y.win||y.mac)&&!(y.wk&&y.wk<312)}function I(b,c,d,e){u=!0,r=e||null,s={success:!1,id:d};var g=P(d);if(g){g.nodeName=="OBJECT"?(p=K(g),q=null):(p=g,q=d),b.id=f;if(typeof b.width==a||!/%$/.test(b.width)&&parseInt(b.width,10)<310)b.width="310";if(typeof b.height==a||!/%$/.test(b.height)&&parseInt(b.height,10)<137)b.height="137";i.title=i.title.slice(0,47)+" - Flash Player Installation";var j=y.ie&&y.win?"ActiveX":"PlugIn",k="MMredirectURL="+h.location.toString().replace(/&/g,"%26")+"&MMplayerType="+j+"&MMdoctitle="+i.title;typeof c.flashvars!=a?c.flashvars+="&"+k:c.flashvars=k;if(y.ie&&y.win&&g.readyState!=4){var l=Q("div");d+="SWFObjectNew",l.setAttribute("id",d),g.parentNode.insertBefore(l,g),g.style.display="none",function(){g.readyState==4?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}()}L(b,c,d)}}function J(a){if(y.ie&&y.win&&a.readyState!=4){var b=Q("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(K(a),b),a.style.display="none",function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}else a.parentNode.replaceChild(K(a),a)}function K(a){var c=Q("div");if(y.win&&y.ie)c.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(b)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&c.appendChild(e[g].cloneNode(!0))}}}return c}function L(c,d,f){var g,h=P(f);if(y.wk&&y.wk<312)return g;if(h){typeof c.id==a&&(c.id=f);if(y.ie&&y.win){var i="";for(var j in c)c[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=c[j]:j.toLowerCase()=="styleclass"?i+=' class="'+c[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+c[j]+'"'));var k="";for(var l in d)d[l]!=Object.prototype[l]&&(k+='<param name="'+l+'" value="'+d[l]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",n[n.length]=c.id,g=P(c.id)}else{var m=Q(b);m.setAttribute("type",e);for(var o in c)c[o]!=Object.prototype[o]&&(o.toLowerCase()=="styleclass"?m.setAttribute("class",c[o]):o.toLowerCase()!="classid"&&m.setAttribute(o,c[o]));for(var p in d)d[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&M(m,p,d[p]);h.parentNode.replaceChild(m,h),g=m}}return g}function M(a,b,c){var d=Q("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function N(a){var b=P(a);b&&b.nodeName=="OBJECT"&&(y.ie&&y.win?(b.style.display="none",function(){b.readyState==4?O(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function O(a){var b=P(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function P(a){var b=null;try{b=i.getElementById(a)}catch(c){}return b}function Q(a){return i.createElement(a)}function R(a,b,c){a.attachEvent(b,c),o[o.length]=[a,b,c]}function S(a){var b=y.pv,c=a.split(".");return c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0,b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function T(c,d,e,f){if(y.ie&&y.mac)return;var g=i.getElementsByTagName("head")[0];if(!g)return;var h=e&&typeof e=="string"?e:"screen";f&&(v=null,w=null);if(!v||w!=h){var j=Q("style");j.setAttribute("type","text/css"),j.setAttribute("media",h),v=g.appendChild(j),y.ie&&y.win&&typeof i.styleSheets!=a&&i.styleSheets.length>0&&(v=i.styleSheets[i.styleSheets.length-1]),w=h}y.ie&&y.win?v&&typeof v.addRule==b&&v.addRule(c,d):v&&typeof i.createTextNode!=a&&v.appendChild(i.createTextNode(c+" {"+d+"}"))}function U(a,b){if(!x)return;var c=b?"visible":"hidden";t&&P(a)?P(a).style.visibility=c:T("#"+a,"visibility:"+c)}function V(b){var c=/[\\\"<>\.;]/,d=c.exec(b)!=null;return d&&typeof encodeURIComponent!=a?encodeURIComponent(b):b}var a="undefined",b="object",c="Shockwave Flash",d="ShockwaveFlash.ShockwaveFlash",e="application/x-shockwave-flash",f="SWFObjectExprInst",g="onreadystatechange",h=window,i=document,j=navigator,k=!1,l=[D],m=[],n=[],o=[],p,q,r,s,t=!1,u=!1,v,w,x=!0,y=function(){var f=typeof i.getElementById!=a&&typeof i.getElementsByTagName!=a&&typeof i.createElement!=a,g=j.userAgent.toLowerCase(),l=j.platform.toLowerCase(),m=l?/win/.test(l):/win/.test(g),n=l?/mac/.test(l):/mac/.test(g),o=/webkit/.test(g)?parseFloat(g.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,p=!1,q=[0,0,0],r=null;if(typeof j.plugins!=a&&typeof j.plugins[c]==b)r=j.plugins[c].description,r&&(typeof j.mimeTypes==a||!j.mimeTypes[e]||!!j.mimeTypes[e].enabledPlugin)&&(k=!0,p=!1,r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),q[0]=parseInt(r.replace(/^(.*)\..*$/,"$1"),10),q[1]=parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),q[2]=/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof h.ActiveXObject!=a)try{var s=new ActiveXObject(d);s&&(r=s.GetVariable("$version"),r&&(p=!0,r=r.split(" ")[1].split(","),q=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)]))}catch(t){}return{w3:f,pv:q,wk:o,ie:p,win:m,mac:n}}(),z=function(){if(!y.w3)return;(typeof i.readyState!=a&&i.readyState=="complete"||typeof i.readyState==a&&(i.getElementsByTagName("body")[0]||i.body))&&A(),t||(typeof i.addEventListener!=a&&i.addEventListener("DOMContentLoaded",A,!1),y.ie&&y.win&&(i.attachEvent(g,function(){i.readyState=="complete"&&(i.detachEvent(g,arguments.callee),A())}),h==top&&function(){if(t)return;try{i.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}A()}()),y.wk&&function(){if(t)return;if(!/loaded|complete/.test(i.readyState)){setTimeout(arguments.callee,0);return}A()}(),C(A))}(),W=function(){y.ie&&y.win&&window.attachEvent("onunload",function(){var a=o.length;for(var b=0;b<a;b++)o[b][0].detachEvent(o[b][1],o[b][2]);var c=n.length;for(var d=0;d<c;d++)N(n[d]);for(var e in y)y[e]=null;y=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(a,b,c,d){if(y.w3&&a&&b){var e={};e.id=a,e.swfVersion=b,e.expressInstall=c,e.callbackFn=d,m[m.length]=e,U(a,!1)}else d&&d({success:!1,id:a})},getObjectById:function(a){if(y.w3)return G(a)},embedSWF:function(c,d,e,f,g,h,i,j,k,l){var m={success:!1,id:d};y.w3&&!(y.wk&&y.wk<312)&&c&&d&&e&&f&&g?(U(d,!1),B(function(){e+="",f+="";var n={};if(k&&typeof k===b)for(var o in k)n[o]=k[o];n.data=c,n.width=e,n.height=f;var p={};if(j&&typeof j===b)for(var q in j)p[q]=j[q];if(i&&typeof i===b)for(var r in i)typeof p.flashvars!=a?p.flashvars+="&"+r+"="+i[r]:p.flashvars=r+"="+i[r];if(S(g)){var s=L(n,p,d);n.id==d&&U(d,!0),m.success=!0,m.ref=s}else{if(h&&H()){n.data=h,I(n,p,d,l);return}U(d,!0)}l&&l(m)})):l&&l(m)},switchOffAutoHideShow:function(){x=!1},ua:y,getFlashPlayerVersion:function(){return{major:y.pv[0],minor:y.pv[1],release:y.pv[2]}},hasFlashPlayerVersion:S,createSWF:function(a,b,c){return y.w3?L(a,b,c):undefined},showExpressInstall:function(a,b,c,d){y.w3&&H()&&I(a,b,c,d)},removeSWF:function(a){y.w3&&N(a)},createCSS:function(a,b,c,d){y.w3&&T(a,b,c,d)},addDomLoadEvent:B,addLoadEvent:C,getQueryParamValue:function(a){var b=i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return V(b);var c=b.split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return V(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(u){var a=P(f);a&&p&&(a.parentNode.replaceChild(p,a),q&&(U(q,!0),y.ie&&y.win&&(p.style.display="block")),r&&r(s)),u=!1}}}}();Util={},Util.constantToUpperCamelCase=function(a){var b,c="",d=a.split("_");for(b=0;b<d.length;++b)c+=Util.toUpperCamelCase(d[b]);return c},Util.toUpperCamelCase=function(a){return a.substring(0,1).toUpperCase()+a.substring(1).toLowerCase()},Util.buildUriQueryString=function(a){var b,c=[];a=a||{};for(b in a)c.push(encodeURIComponent(b)+"="+encodeURIComponent(a[b]));return c.join("&")},Date.prototype.getMonthName=function(){return Date.monthNames[this.getMonth()]},Date.prototype.getUTCMonthName=function(){return Date.monthNames[this.getUTCMonth()]},Date.prototype.getTwoDigitYear=function(){return(this.getFullYear()%100).toString().lpad(2,"0")},Date.prototype.getTwoDigitUTCYear=function(){return(this.getUTCFullYear()%100).toString().lpad(2,"0")},Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.lpad=function(a,b){var c=this;while(c.length<a)c=b+c;return c},String.prototype.splitAndTrim=function(a){var b,c=this.split(a);for(b=0;b<c.length;++b)c[b]=c[b].trim();return c},ArrayList.prototype.clear=function(){this.data=[]},ArrayList.prototype.add=function(a){this.data[this.data.length]=a},ArrayList.prototype.remove=function(a){for(var b=0;b<this.data.length;++b)if(this.data[b]===a){this.removeAt(b);break}},ArrayList.prototype.removeAt=function(a){var b;if(a<0||a>this.data.length-1)throw"Index out of bounds";for(b=a;b<this.data.length-1;++b)this.data[b]=this.data[b+1];this.data.length=this.data.length-1},ArrayList.prototype.get=function(a){if(a<0||a>this.data.length-1)throw"Index out of bounds";return this.data[a]},ArrayList.prototype.indexOf=function(a){var b;for(b=0;b<this.data.length;++b)if(this.data[b]===a)return b;return-1},ArrayList.prototype.contains=function(a){return this.indexOf(a)!==-1},ArrayList.prototype.toArray=function(){return this.data.copy()},ArrayList.prototype.getLength=function(){return this.data.length},CustomEvent.prototype={attach:function(a){return this.handlers.add(a),new Binding(this,a)},detach:function(a){this.handlers.remove(a)},fire:function(){var a;for(a=0;a<this.handlers.getLength();++a)this.handlers.get(a).apply(null,arguments)}},Binding.prototype={destroy:function(){this.event.detach(this.handler)}},MessageReceiver.prototype.receiveMessage=function(a){var b,c;return b=this.findDefaultMessageHandler(a),b?(c=b.call(this,a),c===undefined?!0:c):!1},MessageReceiver.prototype.findDefaultMessageHandler=function(a){var b="do"+Util.constantToUpperCamelCase(a.name);return typeof this[b]=="function"?this[b]:null},Marshaller.unmarshal=function(a){return(new Marshaller).init().unmarshal(a)},Marshaller.prototype.init=function(){return this},Marshaller.prototype.unmarshal=function(a){var b,c,d,e;if(a===null)return a;if(Object.isArray(a))return a.collect(function(a){return this.unmarshal(a)}.bind(this));if(typeof a=="object"){d=a.type,e=window[d],b=typeof e=="function"?(new window[d]).init():{};for(c in a)b[c]=this.unmarshal(a[c]);return b}return a},Model.prototype.init=function(){return this},View.prototype.init=function(a){return this.parent=a||null,this.target=null,this.rendered=new CustomEvent,this},View.prototype.render=function(a){},View.prototype.destroy=function(){},View.prototype.setTarget=function(a){this.target=a},View.prototype.postMessage=function(a){this.receiveMessage(a,!0)},View.prototype.receiveMessage=function(a,b){this.target!==null&&this.target.receiveMessage(a);var c=!b&&MessageReceiver.prototype.receiveMessage.apply(this,arguments);return c||!this.parent?c:this.parent.receiveMessage(a,!1)},View.prototype.findDefaultMessageHandler=MessageReceiver.prototype.findDefaultMessageHandler,Controller.prototype.init=function(){},Controller.prototype.postMessage=function(a){Application.instance.receiveMessage(a)},Controller.prototype.receiveMessage=MessageReceiver.prototype.receiveMessage,Controller.prototype.findDefaultMessageHandler=MessageReceiver.prototype.findDefaultMessageHandler,Timer.prototype={destroy:function(){this.stop()},start:function(){this.started||(this.started=!0,this.intervalId=this.context.setInterval(this.update.bind(this),this.interval))},stop:function(){this.started&&(this.started=!1,this.context.clearInterval(this.intervalId))},update:function(){this.tick.fire()},toString:function(){return"Timer ("+(this.started?"started":"stopped")+")"}},Duration.MILLISECONDS_PER_SECOND=1e3,Duration.SECONDS_PER_MINUTE=60,Duration.MINUTES_PER_HOUR=60,Duration.HOURS_PER_DAY=24,Duration.SECONDS_PER_HOUR=Duration.SECONDS_PER_MINUTE*Duration.MINUTES_PER_HOUR,Duration.SECONDS_PER_DAY=Duration.SECONDS_PER_HOUR*Duration.HOURS_PER_DAY,Duration.prototype.init=function(a){return this.totalMilliseconds=a,this.totalSeconds=Math.floor(a/Duration.MILLISECONDS_PER_SECOND),this.totalMinutes=Math.floor(this.totalSeconds/Duration.SECONDS_PER_MINUTE),this.totalHours=Math.floor(this.totalSeconds/Duration.SECONDS_PER_HOUR),this.totalDays=Math.floor(this.totalSeconds/Duration.SECONDS_PER_DAY),this.milliseconds=Math.floor(this.totalMilliseconds%Duration.MILLISECONDS_PER_SECOND),this.seconds=Math.floor(this.totalSeconds%Duration.SECONDS_PER_MINUTE),this.minutes=Math.floor(this.totalMinutes%Duration.MINUTES_PER_HOUR),this.hours=Math.floor(this.totalHours%Duration.HOURS_PER_DAY),this.days=this.totalDays,this},Duration.prototype.toString=function(){return this.hours>0?this.hours.toString()+":"+this.minutes.toString().lpad(2,"0")+":"+this.seconds.toString().lpad(2,"0"):this.minutes.toString()+":"+this.seconds.toString().lpad(2,"0")},Series.prototype=new Model,SeriesItem.prototype=new Model,SeriesItem.prototype.isPlayable=function(){return!1},VideoIdeaSeriesItem.prototype=new SeriesItem,VideoIdeaSeriesItem.prototype.isPlayable=function(){return!0},TextIdeaSeriesItem.prototype=new SeriesItem,Video.prototype=new Model,Video.prototype.getAspectRatio=function(){return 1*this.width/this.height},BrightcoveVideo.prototype=new Video,TrimmedVideo.prototype=new Video,YouTubeVideo.prototype=new Video,VimeoVideo.prototype=new Video,VideoIdea.prototype=new Model,VideoIdea.prototype.isPlayable=function(){return!0},Frame.prototype=new View,Frame.prototype.init=function(a){return View.prototype.init.apply(this,arguments),this.displayed=new CustomEvent,this.childView=null,this.childViewRenderedBinding=null,this},Frame.prototype.render=function(a){var b=this.element=document.createElement("div");b.className="frame",a.appendChild(b)},Frame.prototype.display=function(a,b){b=b||{},this.clear();if(a instanceof VideoIdea)this.childView=(new VideoIdeaView).init(this,a),this.childViewRenderedBinding=this.handleChildViewRendered.bind(this),this.childView.rendered.attach(this.childViewRenderedBinding),this.childView.render(this.element);else throw"Frame can't display content"},Frame.prototype.clear=function(){this.childView!==null&&(this.childView.rendered.detach(this.childViewRenderedBinding),this.childViewRenderedBinding=null,this.childView.destroy(),this.childView=null)},Frame.prototype.handleChildViewRendered=function(){this.displayed.fire(this)},VideoIdeaView.prototype=new View,VideoIdeaView.prototype.init=function(a,b){return View.prototype.init.apply(this,arguments),this.videoIdea=b,this.video=this.videoIdea.video,this.element=null,this.player=null,this.playerRenderedBinding=null,this},VideoIdeaView.prototype.render=function(a){var b=this.element=document.createElement("div");a.appendChild(b),b.className="video_idea_view",this.player=VideoPlayerFactory.instance.create(this,this.video,{width:512}),this.playerRenderedBinding=this.handlePlayerRendered.bind(this),this.player.rendered.attach(this.playerRenderedBinding),this.player.render(b)},VideoIdeaView.prototype.destroy=function(){this.player&&(this.player.rendered.detach(this.playerRenderedBinding),this.playerRenderedBinding=null,this.player.destroy(),this.player=null),this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},VideoIdeaView.prototype.handlePlayerRendered=function(){this.rendered.fire(this)},TextField.prototype.init=function(a,b){return this.labelShowing=!1,this.element=a,this.attachUI(),b=b||{},this.label=b.label||null,this.setValue(b.value||""),this.hasLabel()&&this.isBlank()&&this.showLabel(),this},TextField.SHOWING_LABEL_CLASSNAME="text_field_showing_label",TextField.prototype.attachUI=function(){this.textInput=Element.select(this.element,"input")[0],this.textInput.observe("focus",this.handleTextInputFocus.bind(this)),this.textInput.observe("blur",this.handleTextInputBlur.bind(this))},TextField.prototype.hasLabel=function(){return this.label!==null},TextField.prototype.showLabel=function(){this.labelShowing=!0,this.setValue(this.label),$(this.element).addClassName(TextField.SHOWING_LABEL_CLASSNAME)},TextField.prototype.hideLabel=function(){this.setValue(""),this.labelShowing=!1,$(this.element).removeClassName(TextField.SHOWING_LABEL_CLASSNAME)},TextField.prototype.handleTextInputFocus=function(a){this.labelShowing&&this.hideLabel()},TextField.prototype.handleTextInputBlur=function(a){this.hasLabel()&&this.isBlank()&&this.showLabel()},TextField.prototype.getValue=function(){return this.textInput.value},TextField.prototype.setValue=function(a){this.textInput.value=a},TextField.prototype.isBlank=function(){return""===this.getValue()},TextField.prototype.focus=function(){this.textInput.focus()},VideoPlayer.prototype=new View,VideoPlayer.defaultWidth=640,VideoPlayer.prototype.init=function(a,b,c){return View.prototype.init.apply(this,arguments),c=c||{},this.video=b,this.autoPlay=c.autoPlay===undefined||c.autoPlay,this.width=c.width||VideoPlayer.defaultWidth,this.height=c.height||this.getChromeHeight()+Math.ceil(this.width/b.getAspectRatio()/4)*4,this.state=PlayState.STOPPED,this.lastPosition=-1,this.position=0,this.nextCueHandle=0,this.cuesByHandle={},this.unsupportedMessageElement=null,this},VideoPlayer.prototype.destroy=function(){View.prototype.destroy.apply(this,arguments),this.unsupportedMessageElement&&this.unsupportedMessageElement.parentNode.removeChild(this.unsupportedMessageElement)},VideoPlayer.prototype.isSupported=function(){return!0},VideoPlayer.prototype.render=function(a){this.isSupported()?this.renderInternal(a):this.renderUnsupportedMessage(a)},VideoPlayer.prototype.renderInternal=function(a){},VideoPlayer.prototype.renderUnsupportedMessage=function(a){var b=this.unsupportedMessageElement=document.createElement("div");b.style.height=this.height.toString()+"px",b.style.width=this.width.toString()+"px",b.appendChild(document.createTextNode("This video can't be played on     your device.")),a.appendChild(b),this.rendered.fire()},VideoPlayer.prototype.play=function(){this.seek(0)},VideoPlayer.prototype.pause=function(){},VideoPlayer.prototype.resume=function(){},VideoPlayer.prototype.seek=function(a){if(a<0||a>this.video.duration)throw"position out of bounds"},VideoPlayer.prototype.getState=function(){return this.state},VideoPlayer.prototype.setState=function(a){this.state=a},VideoPlayer.prototype.registerCue=function(a,b){var c=++this.nextCueHandle;return this.cuesByHandle[c]={position:a,callback:b},c},VideoPlayer.prototype.unregisterCue=function(a){delete this.cuesByHandle[a]},VideoPlayer.prototype.getChromeHeight=function(){return 0},VideoPlayer.prototype.sendCues=function(){var a,b;for(a in this.cuesByHandle)b=this.cuesByHandle[a],b.position>=this.lastPosition&&b.position<this.position&&b.callback()},VideoPlayer.prototype.onStarted=function(){this.state!==PlayState.PLAYING&&(this.setState(PlayState.PLAYING),this.postMessage({name:"started"}))},VideoPlayer.prototype.onPaused=function(){this.state!==PlayState.PAUSED&&(this.setState(PlayState.PAUSED),this.postMessage({name:"paused"}))},VideoPlayer.prototype.onCompleted=function(){this.state!==PlayState.STOPPED&&(this.setState(PlayState.STOPPED),this.postMessage({name:"completed"}))},VideoPlayer.prototype.onPositionChanged=function(a){this.lastPosition!==a&&(this.lastPosition=this.position,this.position=a,this.sendCues()),this.postMessage({name:"position_changed",position:a})},VideoPlayerFactory.prototype.init=function(){return this},VideoPlayerFactory.instance=(new VideoPlayerFactory).init(),VideoPlayerFactory.prototype.create=function(a,b,c){var d=null;return b instanceof BrightcoveVideo?d=StandardBrightcoveVideoPlayer:b instanceof YouTubeVideo?d=ScriptableYouTubeVideoPlayer.isSupported()?EmbeddedYouTubeVideoPlayer:IframeYouTubeVideoPlayer:b instanceof VimeoVideo?d=MoogaloopVimeoVideoPlayer.isSupported()?MoogaloopVimeoVideoPlayer:UniversalVimeoVideoPlayer:b instanceof TrimmedVideo&&(d=BigThinkVideoPlayer),d&&(new d).init(a,b,c)},BrightcoveVideoPlayer.prototype=new VideoPlayer,BrightcoveVideoPlayer.playersByElementId={},BrightcoveVideoPlayer.initialized=!1,BrightcoveVideoPlayer.maxId=0,BrightcoveVideoPlayer.init=function(){return BrightcoveVideoPlayer.initialized||(BrightcoveVideoPlayer.initialized=!0,window.onTemplateLoaded=BrightcoveVideoPlayer.templateLoadedCallback),this},BrightcoveVideoPlayer.isScriptable=function(){return swfobject.hasFlashPlayerVersion("9.0.28")},BrightcoveVideoPlayer.nextElementId=function(){return BrightcoveVideoPlayer.maxId++,"brightcoveVideoPlayer"+BrightcoveVideoPlayer.maxId.toString()},BrightcoveVideoPlayer.templateLoadedCallback=function(a){var b=BrightcoveVideoPlayer.playersByElementId[a];if(b===undefined)throw"BrightcoveVideoPlayer with the given ID does not exist";b.templateLoadedCallback()},BrightcoveVideoPlayer.prototype.init=function(a,b,c,d,e){return e=e||{},VideoPlayer.prototype.init.call(this,a,b,e),BrightcoveVideoPlayer.init(),this.playerId=c,this.playerKey=d,this.elementId=e.elementId||BrightcoveVideoPlayer.nextElementId().toString(),BrightcoveVideoPlayer.playersByElementId[this.elementId]=this,this.element=null,this.playerElement=null,this.experience=null,this.videoPlayerModule=null,this.experienceModule=null,this.pendingSeekPosition=null,this},BrightcoveVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.playerElement&&(swfobject.removeSWF(this.elementId),this.playerElement=null),this.element&&(this.element.parentNode.removeChild(this.element),this.element=null),delete BrightcoveVideoPlayer.playersByElementId[this.elementId]},BrightcoveVideoPlayer.prototype.seek=function(a){VideoPlayer.prototype.seek.apply(this,arguments),this.state===PlayState.PLAYING?this.videoPlayerModule.seek(a/1e3):(this.pendingSeekPosition=a,this.videoPlayerModule.play())},BrightcoveVideoPlayer.prototype.pause=function(){this.videoPlayerModule.pause(!0)},BrightcoveVideoPlayer.prototype.resume=function(){this.videoPlayerModule.pause(!1)},BrightcoveVideoPlayer.prototype.renderInternal=function(a){var b=this.element=document.createElement("div");a.appendChild(b);var c=this.playerElement=document.createElement("object");c.id=this.elementId,c.className="BrightcoveExperience";var d,e,f=this.getObjectParams();for(e in f)d=document.createElement("param"),d.name=e,d.value=f[e],c.appendChild(d);b.appendChild(c),window.brightcove.createExperience(c,b,!0)},BrightcoveVideoPlayer.prototype.getObjectParams=function(){throw"Not implemented"},BrightcoveVideoPlayer.prototype.resolvePendingSeek=function(){var a;this.pendingSeekPosition!==null&&(a=this.pendingSeekPosition,this.pendingSeekPosition=null,this.videoPlayerModule.seek(a/1e3))},BrightcoveVideoPlayer.prototype.templateLoadedCallback=function(){this.experience=brightcove.getExperience(this.elementId),brightcove.playerType.FLASH!==this.experience.type?this.rendered.fire():(this.videoPlayerModule=this.experience.getModule(APIModules.VIDEO_PLAYER),this.experienceModule=this.experience.getModule(APIModules.EXPERIENCE),null!==this.experienceModule&&(this.experienceModule.addEventListener(BCExperienceEvent.TEMPLATE_READY,this.handleExperienceEventTemplateReady.bind(this)),this.videoPlayerModule.addEventListener(BCMediaEvent.BEGIN,this.handleMediaEventBegin.bind(this)),this.videoPlayerModule.addEventListener(BCMediaEvent.PLAY,this.handleMediaEventPlay.bind(this)),this.videoPlayerModule.addEventListener(BCMediaEvent.STOP,this.handleMediaEventStop.bind(this)),this.videoPlayerModule.addEventListener(BCMediaEvent.COMPLETE,this.handleMediaEventComplete.bind(this)),this.videoPlayerModule.addEventListener(BCMediaEvent.PROGRESS,this.handleMediaEventProgress.bind(this))))},BrightcoveVideoPlayer.prototype.handleExperienceEventTemplateReady=function(a){this.rendered.fire(this)},BrightcoveVideoPlayer.prototype.handleMediaEventBegin=function(a){this.resolvePendingSeek()},BrightcoveVideoPlayer.prototype.handleMediaEventPlay=function(a){this.state===PlayState.PAUSED&&this.resolvePendingSeek(),this.onStarted()},BrightcoveVideoPlayer.prototype.handleMediaEventStop=function(a){this.onPaused()},BrightcoveVideoPlayer.prototype.handleMediaEventComplete=function(a){this.onCompleted()},BrightcoveVideoPlayer.prototype.handleMediaEventProgress=function(a){this.onPositionChanged(Math.floor(a.position*1e3))},StandardBrightcoveVideoPlayer.prototype=new BrightcoveVideoPlayer,StandardBrightcoveVideoPlayer.defaultPlayerId=null,StandardBrightcoveVideoPlayer.defaultPlayerKey=null,StandardBrightcoveVideoPlayer.prototype.init=function(a,b,c){return c=c||{},BrightcoveVideoPlayer.prototype.init.call(this,a,b,c.playerId||StandardBrightcoveVideoPlayer.defaultPlayerId,c.playerKey||StandardBrightcoveVideoPlayer.defaultPlayerKey,c)},StandardBrightcoveVideoPlayer.prototype.getObjectParams=function(){return{playerID:this.playerId,playerKey:this.playerKey,"@videoPlayer":this.video.key,width:this.width.toString(),height:this.height.toString(),wmode:"opaque",bgcolor:"#ffffff",isVid:"true",isUI:"true",videoSmoothing:"true",dynamicStreaming:"false",autoStart:this.autoPlay?"true":"false"}},BareBrightcoveVideoPlayer.prototype=new BrightcoveVideoPlayer,BareBrightcoveVideoPlayer.defaultPlayerId=null,BareBrightcoveVideoPlayer.defaultPlayerKey=null,BareBrightcoveVideoPlayer.prototype.init=function(a,b,c){return c=c||{},BrightcoveVideoPlayer.prototype.init.call(this,a,b,c.playerId||BareBrightcoveVideoPlayer.defaultPlayerId,c.playerKey||BareBrightcoveVideoPlayer.defaultPlayerKey,c)},BareBrightcoveVideoPlayer.prototype.getObjectParams=function(){return{playerID:this.playerId,playerKey:this.playerKey,"@videoPlayer":this.video.key,width:this.width.toString(),height:this.height.toString(),wmode:"opaque",bgcolor:"#ffffff",isSlim:"true",videoSmoothing:"true",dynamicStreaming:"false",autoStart:this.autoPlay?"true":"false"}},TrimmedVideoPlayer.prototype=new VideoPlayer,TrimmedVideoPlayer.prototype.init=function(a,b,c){return VideoPlayer.prototype.init.apply(this,arguments),this.element=null,this.sourceVideoPlayer=null,this.sourceVideoPlayerRenderedBinding=null,this.sourceVideoPlayer=this.createSourceVideoPlayer(),this},TrimmedVideoPlayer.prototype.isSupported=function(){return this.sourceVideoPlayer!==null},TrimmedVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.sourceVideoPlayerRenderedBinding&&this.sourceVideoPlayer.rendered.detach(this.sourceVideoPlayerRenderedBinding),this.sourceVideoPlayer!==null&&this.sourceVideoPlayer.destroy()},TrimmedVideoPlayer.prototype.pause=function(){this.sourceVideoPlayer.pause()},TrimmedVideoPlayer.prototype.resume=function(){this.sourceVideoPlayer.resume()},TrimmedVideoPlayer.prototype.seek=function(a){VideoPlayer.prototype.seek.apply(this,arguments),this.sourceVideoPlayer.seek(this.toSourcePosition(a))},TrimmedVideoPlayer.prototype.renderInternal=function(a){this.sourceVideoPlayer.registerCue(this.video.out_time,this.handleOutTimeCue.bind(this)),this.sourceVideoPlayerRenderedBinding=this.handleSourceVideoPlayerRendered.bind(this),this.sourceVideoPlayer.rendered.attach(this.sourceVideoPlayerRenderedBinding),this.sourceVideoPlayer.render(a)},TrimmedVideoPlayer.prototype.createSourceVideoPlayer=function(){var a=this.video.source_video,b={width:this.width,height:this.height,autoPlay:!1};if(a instanceof BrightcoveVideo)return BrightcoveVideoPlayer.isScriptable()?(new BareBrightcoveVideoPlayer).init(this,a,b):null;if(a instanceof YouTubeVideo)return ScriptableYouTubeVideoPlayer.isSupported()?(new ChromelessYouTubeVideoPlayer).init(this,a,b):null;throw"TrimmedVideoPlayer can't create source video player. Did you pass a     video that's not trimmable?"},TrimmedVideoPlayer.prototype.toSourcePosition=function(a){return a+this.video.in_time},TrimmedVideoPlayer.prototype.fromSourcePosition=function(a){return Math.max(0,a-this.video.in_time)},TrimmedVideoPlayer.prototype.simulateCompletion=function(){this.pause(),this.onCompleted()},TrimmedVideoPlayer.prototype.handleOutTimeCue=function(){this.simulateCompletion()},TrimmedVideoPlayer.prototype.handleSourceVideoPlayerRendered=function(){this.rendered.fire(),this.autoPlay&&this.play()},TrimmedVideoPlayer.prototype.doStarted=function(a){this.onStarted()},TrimmedVideoPlayer.prototype.doPaused=function(a){this.onPaused()},TrimmedVideoPlayer.prototype.doCompleted=function(a){this.onCompleted()},TrimmedVideoPlayer.prototype.doPositionChanged=function(a){this.onPositionChanged(this.fromSourcePosition(a.position))},ScriptableYouTubeVideoPlayer.prototype=new VideoPlayer,ScriptableYouTubeVideoPlayer.State={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,VIDEO_CUED:5},ScriptableYouTubeVideoPlayer.playersById={},ScriptableYouTubeVideoPlayer.initialized=!1,ScriptableYouTubeVideoPlayer.maxId=0,ScriptableYouTubeVideoPlayer.init=function(){ScriptableYouTubeVideoPlayer.initialized||(window.onYouTubePlayerReady=ScriptableYouTubeVideoPlayer.handleYouTubePlayerReady,ScriptableYouTubeVideoPlayer.initialized=!0)},ScriptableYouTubeVideoPlayer.isSupported=function(){return swfobject.hasFlashPlayerVersion("8")},ScriptableYouTubeVideoPlayer.nextId=function(){return ScriptableYouTubeVideoPlayer.maxId++,"youtubeVideoPlayer"+ScriptableYouTubeVideoPlayer.maxId.toString()},ScriptableYouTubeVideoPlayer.handleYouTubePlayerReady=function(a){var b=ScriptableYouTubeVideoPlayer.playersById[a];if(b===undefined)throw"ScriptableYouTubeVideoPlayer with the given ID does not exist";b.handleReady()},ScriptableYouTubeVideoPlayer.prototype.init=function(a,b,c){return ScriptableYouTubeVideoPlayer.init(),VideoPlayer.prototype.init.apply(this,arguments),c=c||{},this.playerId=c.playerId||ScriptableYouTubeVideoPlayer.nextId().toString(),ScriptableYouTubeVideoPlayer.playersById[this.playerId]=this,this.element=null,this.timer=null,this.videoCued=!1,this.youTubeState=null,this},ScriptableYouTubeVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.element&&(swfobject.removeSWF(this.elementId),this.element=null),this.timer&&this.timer.destroy(),delete ScriptableYouTubeVideoPlayer.playersById[this.playerId]},ScriptableYouTubeVideoPlayer.prototype.pause=function(){this.element.pauseVideo()},ScriptableYouTubeVideoPlayer.prototype.resume=function(){this.element.playVideo()},ScriptableYouTubeVideoPlayer.prototype.seek=function(a){this.element.seekTo(a/1e3,!0),this.element.playVideo()},ScriptableYouTubeVideoPlayer.prototype.renderInternal=function(a){var b=document.createElement("div");b.id=this.playerId,a.appendChild(b),swfobject.embedSWF(this.getSwfUrl(),this.playerId,this.width.toString(),this.height.toString(),"8",null,{},{allowscriptaccess:"always",allowfullscreen
:"true",wmode:"opaque"},{},function(a){a.success&&(this.element=a.ref)}.bind(this))},ScriptableYouTubeVideoPlayer.prototype.getSwfUrl=function(){throw"Not implemented"},ScriptableYouTubeVideoPlayer.prototype.getChromeHeight=function(){throw"Not implemented"},ScriptableYouTubeVideoPlayer.prototype.handleReady=function(){var a="youTubeVideoPlayerHandleStateChange_"+this.playerId;window[a]=this.handlePlayerStateChange.bind(this),this.element.addEventListener("onStateChange",a),this.element.cueVideoById(this.video.key)},ScriptableYouTubeVideoPlayer.prototype.handleVideoCued=function(){this.rendered.fire();var a=this.timer=new Timer(50);a.tick.attach(this.handleTimerTick.bind(this)),a.start(),this.autoPlay&&this.play()},ScriptableYouTubeVideoPlayer.prototype.handleTimerTick=function(){this.onPositionChanged(Math.floor(this.element.getCurrentTime()*1e3))},ScriptableYouTubeVideoPlayer.prototype.handlePlayerStateChange=function(a){if(a===this.youTubeState)return;this.youTubeState=a;switch(a){case ScriptableYouTubeVideoPlayer.State.PAUSED:this.onPaused();break;case ScriptableYouTubeVideoPlayer.State.PLAYING:this.onStarted();break;case ScriptableYouTubeVideoPlayer.State.ENDED:this.onCompleted();break;case ScriptableYouTubeVideoPlayer.State.UNSTARTED:this.setState(PlayState.STOPPED);break;case ScriptableYouTubeVideoPlayer.State.VIDEO_CUED:this.handleVideoCued()}},EmbeddedYouTubeVideoPlayer.prototype=new ScriptableYouTubeVideoPlayer,EmbeddedYouTubeVideoPlayer.prototype.getSwfUrl=function(){var a={enablejsapi:"1",version:"3",playerapiid:this.playerId,egm:"0",showinfo:"1",showsearch:"0",iv_load_policy:"3"};return"http://www.youtube.com/v/"+encodeURIComponent(this.video.key)+"?"+Util.buildUriQueryString(a)},EmbeddedYouTubeVideoPlayer.prototype.getChromeHeight=function(){return 30},ChromelessYouTubeVideoPlayer.prototype=new ScriptableYouTubeVideoPlayer,ChromelessYouTubeVideoPlayer.prototype.getSwfUrl=function(){var a={enablejsapi:"1",version:"3",playerapiid:this.playerId,rel:"0",egm:"0",showinfo:"0",showsearch:"0",iv_load_policy:"3"};return"http://www.youtube.com/apiplayer?"+Util.buildUriQueryString(a)},ChromelessYouTubeVideoPlayer.prototype.getChromeHeight=function(){return 0},IframeYouTubeVideoPlayer.prototype=new VideoPlayer,IframeYouTubeVideoPlayer.CHROME_HEIGHT=30,IframeYouTubeVideoPlayer.prototype.init=function(a,b,c){return VideoPlayer.prototype.init.apply(this,arguments),this.element=null,this},IframeYouTubeVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},IframeYouTubeVideoPlayer.prototype.renderInternal=function(a){var b=this.element=document.createElement("iframe");b.type="text/html",b.width=this.width.toString(),b.height=this.height.toString(),b.frameBorder="0",b.marginHeight="0",b.marginWidth="0",b.scrolling="no",b.src="http://www.youtube.com/embed/"+encodeURIComponent(this.video.key),a.appendChild(b),this.rendered.fire()},IframeYouTubeVideoPlayer.prototype.getChromeHeight=function(){return 0},MoogaloopVimeoVideoPlayer.prototype=new VideoPlayer,MoogaloopVimeoVideoPlayer.playersById={},MoogaloopVimeoVideoPlayer.initialized=!1,MoogaloopVimeoVideoPlayer.maxId=0,MoogaloopVimeoVideoPlayer.init=function(){if(MoogaloopVimeoVideoPlayer.initialized)return;window.vimeo_player_loaded=function(a){MoogaloopVimeoVideoPlayer.routeEvent(a,"handleLoaded")},window.vimeo_on_play=function(a){MoogaloopVimeoVideoPlayer.routeEvent(a,"handleOnPlay")},window.vimeo_on_pause=function(a){MoogaloopVimeoVideoPlayer.routeEvent(a,"handleOnPause")},window.vimeo_on_progress=function(a,b){MoogaloopVimeoVideoPlayer.routeEvent(b,"handleOnProgress",[a])},window.vimeo_on_finish=function(a){MoogaloopVimeoVideoPlayer.routeEvent(a,"handleOnFinish")},MoogaloopVimeoVideoPlayer.initialized=!0},MoogaloopVimeoVideoPlayer.isSupported=function(){return swfobject.hasFlashPlayerVersion("9.0.0")},MoogaloopVimeoVideoPlayer.routeEvent=function(a,b,c){var d=MoogaloopVimeoVideoPlayer.playersById[a];d&&d[b].apply(d,c||[])},MoogaloopVimeoVideoPlayer.nextId=function(){return MoogaloopVimeoVideoPlayer.maxId++,"vimeoVideoPlayer"+MoogaloopVimeoVideoPlayer.maxId.toString()},MoogaloopVimeoVideoPlayer.prototype.init=function(a,b,c){return MoogaloopVimeoVideoPlayer.init(),VideoPlayer.prototype.init.apply(this,arguments),c=c||{},this.playerId=c.playerId||MoogaloopVimeoVideoPlayer.nextId().toString(),MoogaloopVimeoVideoPlayer.playersById[this.playerId]=this,this.element=null,this.playerElement=null,this},MoogaloopVimeoVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.playerElement&&(swfobject.removeSWF(this.playerId),this.playerElement=null),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.element=null),delete MoogaloopVimeoVideoPlayer.playersById[this.playerId]},MoogaloopVimeoVideoPlayer.prototype.play=function(){this.playerElement.api_play()},MoogaloopVimeoVideoPlayer.prototype.pause=function(){this.playerElement.api_pause()},MoogaloopVimeoVideoPlayer.prototype.seek=function(a){throw"Not implemented"},MoogaloopVimeoVideoPlayer.prototype.renderInternal=function(a){var b=this.element=document.createElement("div");b.style.width=this.width.toString()+"px",b.style.height=this.height.toString()+"px",a.appendChild(b);var c=this.playerElement=document.createElement("div");c.id=this.playerId,b.appendChild(c),swfobject.embedSWF("http://vimeo.com/moogaloop.swf",this.playerId,this.width.toString(),this.height.toString(),"9.0.0","expressInstall.swf",{clip_id:this.video.key,show_portrait:0,show_byline:0,show_title:0,js_api:1,js_onLoad:"vimeo_player_loaded",js_swf_id:this.playerId},{allowscriptaccess:"always",allowfullscreen:"true",wmode:"opaque"},{},function(a){a.success&&(this.playerElement=a.ref)}.bind(this))},MoogaloopVimeoVideoPlayer.prototype.handleLoaded=function(){this.playerElement.api_addEventListener("onPlay","vimeo_on_play"),this.playerElement.api_addEventListener("onPause","vimeo_on_pause"),this.playerElement.api_addEventListener("onProgress","vimeo_on_progress"),this.playerElement.api_addEventListener("onFinish","vimeo_on_finish"),this.rendered.fire(),this.autoPlay&&this.play()},MoogaloopVimeoVideoPlayer.prototype.handleOnProgress=function(a){this.onPositionChanged(Math.floor(a*1e3))},MoogaloopVimeoVideoPlayer.prototype.handleOnFinish=function(){this.onCompleted()},MoogaloopVimeoVideoPlayer.prototype.handleOnPlay=function(){this.onStarted()},MoogaloopVimeoVideoPlayer.prototype.handleOnPause=function(){this.onPaused()},UniversalVimeoVideoPlayer.prototype=new VideoPlayer,UniversalVimeoVideoPlayer.prototype.init=function(a,b,c){return VideoPlayer.prototype.init.apply(this,arguments),this.element=null,this},UniversalVimeoVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.element=null)},UniversalVimeoVideoPlayer.prototype.renderInternal=function(a){var b=this.element=document.createElement("iframe");b.width=this.width.toString(),b.height=this.height.toString(),b.frameBorder="0",b.marginHeight="0",b.marginWidth="0",b.scrolling="no",b.src="http://player.vimeo.com/video/"+encodeURIComponent(this.video.key)+"?"+Util.buildUriQueryString({show_portrait:0,show_byline:0,show_title:0,autoplay:this.autoPlay?"1":"0"}),a.appendChild(b),this.rendered.fire()},BigThinkVideoPlayer.prototype=new VideoPlayer,BigThinkVideoPlayer.prototype.init=function(a,b,c){return VideoPlayer.prototype.init.apply(this,arguments),this.element=null,this.childVideoPlayer=null,this.playPauseView=null,this.positionElement=null,this.childVideoPlayerRenderedBinding=null,this},BigThinkVideoPlayer.prototype.destroy=function(){VideoPlayer.prototype.destroy.apply(this,arguments),this.childVideoPlayer&&this.childVideoPlayer.destroy(),this.childVideoPlayerRenderedBinding&&this.childVideoPlayerRenderedBinding.destroy()},BigThinkVideoPlayer.prototype.pause=function(){this.childVideoPlayer.pause()},BigThinkVideoPlayer.prototype.resume=function(){this.childVideoPlayer.resume()},BigThinkVideoPlayer.prototype.seek=function(a){VideoPlayer.prototype.seek.apply(this,arguments),this.childVideoPlayer.seek(a)},BigThinkVideoPlayer.prototype.renderInternal=function(a){var b,c=this.element=document.createElement("div");c.className="big_think_video_player",c.style.height=this.height.toString()+"px",c.style.width=this.width.toString()+"px",a.appendChild(c),$(c).observe("mouseover",function(){$(this.playControlsElement).show()}.bind(this)),$(c).observe("mouseout",function(){$(this.playControlsElement).hide()}.bind(this));var d=document.createElement("div");d.className="child_video_player",c.appendChild(d);var e=this.playControlsElement=document.createElement("div");e.className="play_controls",c.appendChild(e),$(e).hide(),this.playPauseView=(new PlayPauseView).init(this),this.playPauseView.render(e),this.positionElement=document.createElement("div"),this.positionElement.className="position",e.appendChild(this.positionElement),this.childVideoPlayer=this.createChildVideoPlayer(),this.childVideoPlayerRenderedBinding=this.childVideoPlayer.rendered.attach(this.handleChildVideoPlayerRendered.bind(this)),this.childVideoPlayer.render(d),this.updateChildViews()},BigThinkVideoPlayer.prototype.setState=function(a){VideoPlayer.prototype.setState.apply(this,arguments),this.updateChildViews()},BigThinkVideoPlayer.prototype.onPositionChanged=function(a){VideoPlayer.prototype.onPositionChanged.apply(this,arguments),this.updateChildViews()},BigThinkVideoPlayer.prototype.updateChildViews=function(){this.playPauseView.update(this.state),this.positionElement.innerHTML=(new Duration).init(this.position).toString()+" / "+(new Duration).init(this.video.duration).toString()},BigThinkVideoPlayer.prototype.createChildVideoPlayer=function(){if(this.video instanceof TrimmedVideo)return(new TrimmedVideoPlayer).init(this,this.video,{width:this.width,height:this.height,autoPlay:this.autoPlay});throw"Unrecognized video class"},BigThinkVideoPlayer.prototype.handleChildVideoPlayerRendered=function(){this.rendered.fire()},BigThinkVideoPlayer.prototype.doPause=function(a){this.pause()},BigThinkVideoPlayer.prototype.doPlay=function(a){this.state===PlayState.PAUSED?this.resume():this.play()},BigThinkVideoPlayer.prototype.doStarted=function(a){this.onStarted()},BigThinkVideoPlayer.prototype.doPaused=function(a){this.onPaused()},BigThinkVideoPlayer.prototype.doCompleted=function(a){this.onCompleted()},BigThinkVideoPlayer.prototype.doPositionChanged=function(a){this.onPositionChanged(a.position)},PlayPauseView.prototype=new View,PlayPauseView.prototype.init=function(a){return View.prototype.init.apply(this,arguments),this.state=null,this.element=null,this.labelElement=null,this},PlayPauseView.prototype.render=function(a){this.element=document.createElement("div"),this.element.className="play_pause_view",a.appendChild(this.element),this.imgElement=document.createElement("img"),this.imgElement.height="16",this.imgElement.width="16",$(this.imgElement).observe("click",this.handleImgElementClick.bind(this)),this.element.appendChild(this.imgElement),this.update(PlayState.STOPPED)},PlayPauseView.prototype.update=function(a){this.state=a,this.updateImage()},PlayPauseView.prototype.updateImage=function(a){var b=this.state===PlayState.PLAYING?"pause.gif":"play.gif";this.imgElement.src="/images/play_pause_view/"+b,this.imgElement.alt=this.state===PlayState.PLAYING?"Pause":"Play"},PlayPauseView.prototype.handleImgElementClick=function(){this.state===PlayState.PLAYING?this.postMessage({name:"pause"}):this.postMessage({name:"play"})},PlayState={STOPPED:0,PLAYING:1,PAUSED:2},PagerView.prototype=new View,PagerView.prototype.init=function(a,b){return View.prototype.init.apply(this,arguments),this.itemCount=b,this},PagerView.prototype.renderFromElement=function(a){this.element=a,this.nextElement=$(a).select(".next")[0],this.previousElement=$(a).select(".previous")[0],this.labelElement=$(a).select(".label")[0],$(this.nextElement).observe("click",this.handleNextElementClick.bind(this)),$(this.previousElement).observe("click",this.handlePreviousElementClick.bind(this))},PagerView.prototype.update=function(a){this.updateArrows(a),this.updateLabel(a)},PagerView.prototype.updateArrows=function(a){var b=a===0,c=a===this.itemCount-1;$(this.previousElement)[b?"addClassName":"removeClassName"]("disabled"),$(this.nextElement)[c?"addClassName":"removeClassName"]("disabled")},PagerView.prototype.updateLabel=function(a){this.labelElement.innerHTML=(a+1).toString()+" of "+this.itemCount.toString()},PagerView.prototype.handleNextElementClick=function(){this.postMessage({name:"next"})},PagerView.prototype.handlePreviousElementClick=function(){this.postMessage({name:"previous"})},PlaylistView.prototype=new View,PlaylistView.prototype.init=function(a){return View.prototype.init.apply(this,arguments),this.selectedItemElement=null,this.selectedIndex=null,this},PlaylistView.prototype.renderFromElement=function(a){var b,c,d;this.element=a,d=this.itemElements=$(a).select(".item");var e=function(a){var b=this;return function(c){c.stop(),b.postMessage({name:"select",index:a})}};for(b=0;b<d.length;++b)c=d[b].select(".handle")[0],$(c).observe("click",e.bind(this)(b))},PlaylistView.prototype.selectIndex=function(a){this.selectedItemElement&&$(this.selectedItemElement).removeClassName("selected"),this.selectedItemElement=this.itemElements[a],$(this.selectedItemElement).addClassName("selected")},SeriesItemView.prototype=new View,SeriesItemView.makeFromItem=function(a,b){if(b instanceof VideoIdeaSeriesItem)return(new VideoIdeaSeriesItemView).init(a,b);if(b instanceof TextIdeaSeriesItem)return(new TextIdeaSeriesItemView).init(a,b);throw"Unrecognized SeriesItem type"},VideoIdeaSeriesItemView.prototype=new SeriesItemView,VideoIdeaSeriesItemView.prototype.init=function(a,b){return SeriesItemView.prototype.init.apply(this,arguments),this.item=b,this.player=null,this.playerRenderedBinding=null,this},VideoIdeaSeriesItemView.prototype.destroy=function(){this.player&&(this.player.rendered.detach(this.playerRenderedBinding),this.playerRenderedBinding=null,this.player.destroy(),this.player=null)},VideoIdeaSeriesItemView.prototype.renderFromElement=function(a){this.element=a,this.playerContainer=$(a).select(".player_container")[0],this.player=VideoPlayerFactory.instance.create(this,this.item.video_idea.video,{width:512}),this.playerRenderedBinding=this.handlePlayerRendered.bind(this),this.player.rendered.attach(this.playerRenderedBinding),this.player.render(this.playerContainer)},VideoIdeaSeriesItemView.prototype.handlePlayerRendered=function(){this.rendered.fire(this)},TextIdeaSeriesItemView.prototype=new SeriesItemView,TextIdeaSeriesItemView.prototype.init=function(a,b){return SeriesItemView.prototype.init.apply(this,arguments),this.item=b,this},TextIdeaSeriesItemView.prototype.renderFromElement=function(a){this.rendered.fire(this)},SeriesItemContainerView.prototype=new View,SeriesItemContainerView.prototype.init=function(a){return View.prototype.init.apply(this,arguments),this.displayed=new CustomEvent,this.itemView=null,this.itemViewRenderedBinding=null,this},SeriesItemContainerView.prototype.destroy=function(){this.destroyItemView()},SeriesItemContainerView.prototype.destroyItemView=function(){this.itemView&&(this.itemView.rendered.detach(this.itemViewRenderedBinding),this.itemViewRenderedBinding=null,this.itemView.destroy(),this.itemView=null)},SeriesItemContainerView.prototype.renderFromElement=function(a){this.element=a},SeriesItemContainerView.prototype.replaceItemViewWithHtml=function(a){this.destroyItemView(),this.element.innerHTML=a;var b=$(this.element).select(".series_item")[0];this.itemView=SeriesItemView.makeFromItem(this,this.selectedItem),this.itemViewRenderedBinding=this.handleItemViewRendered.bind(this),this.itemView.rendered.attach(this.itemViewRenderedBinding),this.itemView.renderFromElement(b)},SeriesItemContainerView.prototype.display=function(a){var b="/series_items/"+a.id.toString();new Ajax.Request(b,{method:"get",onSuccess:function(b){this.selectedItem=a,this.replaceItemViewWithHtml(b.responseText)}.bind(this)})},SeriesItemContainerView.prototype.handleItemViewRendered=function(){this.displayed.fire(this)},PlaylistController.prototype=new Controller,PlaylistController.prototype.init=function(a,b,c,d){return Controller.prototype.init.apply(this),this.selectedIndex=null,this.selectedItem=null,this.selecting=!1,this.items=a,this.autoPlay=this.items.all(function(a){return a.isPlayable()}),this.itemsById={},this.items.each(function(a){this.itemsById[a.id]=a}.bind(this)),this.playlist=b,this.playlist.setTarget(this),this.player=c,this.player.setTarget(this),this.player.displayed.attach(this.handlePlayerDisplayed.bind(this)),this.pager=d||null,this.pager&&this.pager.setTarget(this),this},PlaylistController.prototype.selectItem=function(a){this.selectItemByIndex(this.items.indexOf(a))},PlaylistController.prototype.selectItemById=function(a){this.selectItem(this.itemsById[a])},PlaylistController.prototype.selectItemByIndex=function(a){this.selecting=!0,this.selectedItem=this.items[a],this.selectedIndex=a,this.playlist.selectIndex(this.selectedIndex),this.pager&&this.pager.update(this.selectedIndex),this.player.display(this.selectedItem)},PlaylistController.prototype.postSelected=function(){this.postMessage({name:"selected",selection_id:this.selectedItem.id})},PlaylistController.prototype.handlePlayerDisplayed=function(){this.selecting=!1},PlaylistController.prototype.doNext=function(a){!this.selecting&&this.selectedIndex<this.items.length-1&&(this.selectItemByIndex(this.selectedIndex+1),this.postSelected())},PlaylistController.prototype.doPrevious=function(a){!this.selecting&&this.selectedIndex>0&&(this.selectItemByIndex(this.selectedIndex-1),this.postSelected())},PlaylistController.prototype.doSelect=function(a){!this.selecting&&this.selectedIndex!==a.index&&(this.selectItemByIndex(a.index),this.postSelected())},PlaylistController.prototype.doCompleted=function(a){this.autoPlay&&this.doNext()},Application.instance=null,Application.prototype.init=function(a){return StandardBrightcoveVideoPlayer.defaultPlayerId=a.standard_brightcove_player_id,StandardBrightcoveVideoPlayer.defaultPlayerKey=a.standard_brightcove_player_key,BareBrightcoveVideoPlayer.defaultPlayerId=a.bare_brightcove_player_id,BareBrightcoveVideoPlayer.defaultPlayerKey=a.bare_brightcove_player_key,this},Application.prototype.receiveMessage=MessageReceiver.prototype.receiveMessage,Application.prototype.findDefaultMessageHandler=MessageReceiver.prototype.findDefaultMessageHandler,Application.prototype.run=function(){var a=this;YUI().use("history",function(b){a.yui=b,b.on("domready",function(){b.HistoryHash.hashPrefix="!",a.history=new b.HistoryHash,b.on("history:change",a.handleHistoryChange.bind(a)),a.render(),a.applyState(a.history.get())})})},Application.prototype.render=function(){},Application.prototype.applyState=function(a){},Application.prototype.addHistory=function(a){var b=!0,c=this.history.get();for(key in a)a[key]!==c[key]&&(b=!1);b||this.history.add(a)},Application.prototype.handleHistoryChange=function(a){this.yui.HistoryHash.SRC_HASH===a.src&&this.applyState(a.newVal)},SeriesApplication.prototype=new Application,SeriesApplication.prototype.init=function(a,b,c,d,e){return Application.prototype.init.apply(this,arguments),this.playlistElement=c,this.pagerElement=d,this.itemContainerElement=e,this.series=Marshaller.unmarshal(b),this.playlist=(new PlaylistView).init(),this.pager=(new PagerView).init(null,this.series.items.length),this.seriesItemContainer=(new SeriesItemContainerView).init(),this.controller=(new PlaylistController).init(this.series.items,this.playlist,this.seriesItemContainer,this.pager),this},SeriesApplication.prototype.render=function(){this.playlist.renderFromElement(this.playlistElement),this.pager.renderFromElement(this.pagerElement),this.seriesItemContainer.renderFromElement(this.itemContainerElement)},SeriesApplication.prototype.applyState=function(a){var b=a.selected_item;undefined===b?this.series.items.length>0&&this.controller.selectItemByIndex(this.series.complete?0:this.series.items.length-1):this.controller.selectItemById(parseInt(b,10))},SeriesApplication.prototype.doSelected=function(a){this.addHistory({selected_item:a.selection_id.toString()}),_gaq.push(["_trackPageview",window.location.pathname+window.location.hash])},UserApplication.prototype=new Application,UserApplication.prototype.init=function(a,b,c,d){return Application.prototype.init.apply(this,arguments),this.playlistElement=c,this.playerParentElement=d,this.videoIdeas=Marshaller.unmarshal(b),this.playlist=(new PlaylistView).init(),this.player=(new Frame).init(),this.controller=(new PlaylistController).init(this.videoIdeas,this.playlist,this.player),this},UserApplication.prototype.render=function(){this.playlist.renderFromElement(this.playlistElement),this.player.render(this.playerParentElement)},UserApplication.prototype.applyState=function(a){var b=a.video_idea_id;undefined===b?this.controller.items.length>0&&this.controller.selectItemByIndex(0):this.controller.selectItemById(parseInt(b,10))},UserApplication.prototype.doSelected=function(a){this.addHistory({video_idea_id:a.selection_id.toString()}),_gaq.push(["_trackPageview",window.location.pathname+window.location.hash])},jQuery(function(){function a(){jQuery("#intro-body").is(":visible")?jQuery("#intro-body *").animate({opacity:"0"},300,function(){jQuery("#intro-body").slideUp()}):jQuery("#intro-body").slideDown(function(){jQuery("#intro-body *").animate({opacity:"1"},300)}),jQuery("a.collapse").toggleClass("expanded")}jQuery("#intro-body *").animate({opacity:"0"},1),jQuery("a.collapse").click(a),jQuery("#intro h2").click(a)})
