﻿/*
 * Globalize
 *
 * http://github.com/jquery/globalize
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
(function(m,r){var x,e,u,n,z,A,l,o,s,q,j,i,y,p,h,c,g,w,a,f,k,b,d;x=function(B){return new x.prototype.init(B)};if(typeof require!=="undefined"&&typeof exports!=="undefined"&&typeof module!=="undefined"){module.exports=x}else{m.Globalize=x}x.cultures={};x.prototype={constructor:x,init:function(B){this.cultures=x.cultures;this.cultureSelector=B;return this}};x.prototype.init.prototype=x.prototype;x.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:false,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"}}},messages:{}};x.cultures["default"].calendar=x.cultures["default"].calendars.standard;x.cultures.en=x.cultures["default"];x.cultureSelector="en";e=/^0x[a-f0-9]+$/i;u=/^[+-]?infinity$/i;n=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;z=/^\s+|\s+$/g;A=function(E,D){if(E.indexOf){return E.indexOf(D)}for(var C=0,B=E.length;C<B;C++){if(E[C]===D){return C}}return -1};l=function(B,C){return B.substr(B.length-C.length)===C};o=function(D){var B,F,J,I,H,K,C=arguments[0]||{},E=1,G=arguments.length,D=false;if(typeof C==="boolean"){D=C;C=arguments[1]||{};E=2}if(typeof C!=="object"&&!q(C)){C={}}for(;E<G;E++){if((B=arguments[E])!=null){for(F in B){J=C[F];I=B[F];if(C===I){continue}if(D&&I&&(j(I)||(H=s(I)))){if(H){H=false;K=J&&s(J)?J:[]}else{K=J&&j(J)?J:{}}C[F]=o(D,K,I)}else{if(I!==r){C[F]=I}}}}}return C};s=Array.isArray||function(B){return Object.prototype.toString.call(B)==="[object Array]"};q=function(B){return Object.prototype.toString.call(B)==="[object Function]"};j=function(B){return Object.prototype.toString.call(B)==="[object Object]"};i=function(B,C){return B.indexOf(C)===0};y=function(B){return(B+"").replace(z,"")};p=function(D,B,C){var E;for(E=D.length;E<B;E+=1){D=(C?("0"+D):(D+"0"))}return D};h=function(H,D){var E=0,C=false;for(var G=0,B=H.length;G<B;G++){var F=H.charAt(G);switch(F){case"'":if(C){D.push("'")}else{E++}C=false;break;case"\\":if(C){D.push("\\")}C=!C;break;default:D.push(F);C=false;break}}return E};c=function(B,C){C=C||"F";var D,F=B.patterns,E=C.length;if(E===1){D=F[C];if(!D){throw"Invalid date format string '"+C+"'."}C=D}else{if(E===2&&C.charAt(0)==="%"){C=C.charAt(1)}}return C};g=function(B,R,L){var S=L.calendar,W=S.convert;if(!R||!R.length||R==="i"){var H;if(L&&L.name.length){if(W){H=g(B,S.patterns.F,L)}else{var Q=new Date(B.getTime()),U=f(B,S.eras);Q.setFullYear(k(B,S,U));H=Q.toLocaleString()}}else{H=B.toString()}return H}var X=S.eras,aa=R==="s";R=c(S,R);H=[];var N,Z=["0","00","000"],M,K,T=/([^d]|^)(d|dd)([^d]|$)/g,G=0,O=a(),D;function ab(ag,af){var ad,ae=ag+"";if(af>1&&ae.length<af){ad=(Z[af-2]+ae);return ad.substr(ad.length-af,af)}else{ad=ae}return ad}function I(){if(M||K){return M}M=T.test(R);K=true;return M}function ac(ad,ae){if(D){return D[ae]}switch(ae){case 0:return ad.getFullYear();case 1:return ad.getMonth();case 2:return ad.getDate()}}if(!aa&&W){D=W.fromGregorian(B)}for(;;){var E=O.lastIndex,C=O.exec(R);var P=R.slice(E,C?C.index:R.length);G+=h(P,H);if(!C){break}if(G%2){H.push(C[0]);continue}var F=C[0],V=F.length;switch(F){case"ddd":case"dddd":var J=(V===3)?S.days.namesAbbr:S.days.names;H.push(J[B.getDay()]);break;case"d":case"dd":M=true;H.push(ab(ac(B,2),V));break;case"MMM":case"MMMM":var Y=ac(B,1);H.push((S.monthsGenitive&&I())?S.monthsGenitive[V===3?"namesAbbr":"names"][Y]:S.months[V===3?"namesAbbr":"names"][Y]);break;case"M":case"MM":H.push(ab(ac(B,1)+1,V));break;case"y":case"yy":case"yyyy":Y=D?D[0]:k(B,S,f(B,X),aa);if(V<4){Y=Y%100}H.push(ab(Y,V));break;case"h":case"hh":N=B.getHours()%12;if(N===0){N=12}H.push(ab(N,V));break;case"H":case"HH":H.push(ab(B.getHours(),V));break;case"m":case"mm":H.push(ab(B.getMinutes(),V));break;case"s":case"ss":H.push(ab(B.getSeconds(),V));break;case"t":case"tt":Y=B.getHours()<12?(S.AM?S.AM[0]:" "):(S.PM?S.PM[0]:" ");H.push(V===1?Y.charAt(0):Y);break;case"f":case"ff":case"fff":H.push(ab(B.getMilliseconds(),3).substr(0,V));break;case"z":case"zz":N=B.getTimezoneOffset()/60;H.push((N<=0?"+":"-")+ab(Math.floor(Math.abs(N)),V));break;case"zzz":N=B.getTimezoneOffset()/60;H.push((N<=0?"+":"-")+ab(Math.floor(Math.abs(N)),2)+":"+ab(Math.abs(B.getTimezoneOffset()%60),2));break;case"g":case"gg":if(S.eras){H.push(S.eras[f(B,X)].name)}break;case"/":H.push(S["/"]);break;default:throw"Invalid date format pattern '"+F+"'.";break}}return H.join("")};(function(){var B;B=function(O,K,P){var M=P.groupSizes,Q=M[0],F=1,G=Math.pow(10,K),J=Math.round(O*G)/G;if(!isFinite(J)){J=O}O=J;var H=O+"",N="",R=H.split(/e/i),E=R.length>1?parseInt(R[1],10):0;H=R[0];R=H.split(".");H=R[0];N=R.length>1?R[1]:"";var D;if(E>0){N=p(N,E,false);H+=N.slice(0,E);N=N.substr(E)}else{if(E<0){E=-E;H=p(H,E+1);N=H.slice(-E,H.length)+N;H=H.slice(0,-E)}}if(K>0){N=P["."]+((N.length>K)?N.slice(0,K):p(N,K))}else{N=""}var C=H.length-1,L=P[","],I="";while(C>=0){if(Q===0||Q>C){return H.slice(0,C+1)+(I.length?(L+I+N):N)}I=H.slice(C-Q+1,C+1)+(I.length?(L+I):"");C-=Q;if(F<M.length){Q=M[F];F++}}return H.slice(0,C+1)+L+I+N};w=function(F,N,D){if(!N||N==="i"){return D.name.length?F.toLocaleString():F.toString()}N=N||"D";var C=D.numberFormat,M=Math.abs(F),J=-1,K;if(N.length>1){J=parseInt(N.slice(1),10)}var H=N.charAt(0).toUpperCase(),L;switch(H){case"D":K="n";if(J!==-1){M=p(""+M,J,true)}if(F<0){M=-M}break;case"N":L=C;case"C":L=L||C.currency;case"P":L=L||C.percent;K=F<0?L.pattern[0]:(L.pattern[1]||"n");if(J===-1){J=L.decimals}M=B(M*(H==="P"?100:1),J,L);break;default:throw"Bad number format specifier: "+H}var I=/n|\$|-|%/g,E="";for(;;){var G=I.lastIndex,O=I.exec(K);E+=K.slice(G,O?O.index:K.length);if(!O){break}switch(O[0]){case"n":E+=M;break;case"$":E+=C.currency.symbol;break;case"-":if(/[1-9]/.test(M)){E+=C["-"]}break;case"%":E+=C.percent.symbol;break}}return E}}());a=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};f=function(D,B){if(!B){return 0}var C,F=D.getTime();for(var E=0,G=B.length;E<G;E++){C=B[E].start;if(C===null||F>=C){return E}}return 0};k=function(E,B,F,C){var D=E.getFullYear();if(!C&&B.eras){D-=B.eras[F].offset}return D};(function(){var C,D,E,H,F,G,B;C=function(I,K){var M=new Date(),L=f(M);if(K<100){var N=I.twoDigitYearMax;N=typeof N==="string"?new Date().getFullYear()%100+parseInt(N,10):N;var J=k(M,I,L);K+=J-(J%100);if(K>N){K-=100}}return K};D=function(I,J,K){var N,M=I.days,L=I._upperDays;if(!L){I._upperDays=L=[B(M.names),B(M.namesAbbr),B(M.namesShort)]}J=G(J);if(K){N=A(L[1],J);if(N===-1){N=A(L[2],J)}}else{N=A(L[0],J)}return N};E=function(L,K,O){var P=L.months,J=L.monthsGenitive||L.months,N=L._upperMonths,M=L._upperMonthsGen;if(!N){L._upperMonths=N=[B(P.names),B(P.namesAbbr)];L._upperMonthsGen=M=[B(J.names),B(J.namesAbbr)]}K=G(K);var I=A(O?N[1]:N[0],K);if(I<0){I=A(O?M[1]:M[0],K)}return I};H=function(U,T){var W=U._parseRegExp;if(!W){U._parseRegExp=W={}}else{var M=W[T];if(M){return M}}var L=c(U,T).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),K=["^"],V=[],I=0,J=0,P=a(),R;while((R=P.exec(L))!==null){var Q=L.slice(I,R.index);I=P.lastIndex;J+=h(Q,K);if(J%2){K.push(R[0]);continue}var O=R[0],Y=O.length,N;switch(O){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":N="(\\D+)";break;case"tt":case"t":N="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":N="(\\d{"+Y+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":N="(\\d\\d?)";break;case"zzz":N="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":N="([+-]?\\d\\d?)";break;case"/":N="(\\"+U["/"]+")";break;default:throw"Invalid date format pattern '"+O+"'.";break}if(N){K.push(N)}V.push(R[0])}h(L.slice(I),K);K.push("$");var X=K.join("").replace(/\s+/g,"\\s+"),S={regExp:X,groups:V};return W[T]=S};F=function(I,J,K){return I<J||I>K};G=function(I){return I.split("\u00A0").join(" ").toUpperCase()};B=function(I){var K=[];for(var J=0,L=I.length;J<L;J++){K[J]=G(I[J])}return K};b=function(L,M,al){L=y(L);var Y=al.calendar,Z=H(Y,M),Q=new RegExp(Z.regExp).exec(L);if(Q===null){return null}var W=Z.groups,P=null,ak=null,ao=null,I=null,U=null,ae=0,ag,N=0,ai=0,J=0,ad=null,am=false;for(var ab=0,ap=W.length;ab<ap;ab++){var aj=Q[ab+1];if(aj){var af=W[ab],X=af.length,K=parseInt(aj,10);switch(af){case"dd":case"d":I=K;if(F(I,1,31)){return null}break;case"MMM":case"MMMM":ao=E(Y,aj,X===3);if(F(ao,0,11)){return null}break;case"M":case"MM":ao=K-1;if(F(ao,0,11)){return null}break;case"y":case"yy":case"yyyy":ak=X<4?C(Y,K):K;if(F(ak,0,9999)){return null}break;case"h":case"hh":ae=K;if(ae===12){ae=0}if(F(ae,0,11)){return null}break;case"H":case"HH":ae=K;if(F(ae,0,23)){return null}break;case"m":case"mm":N=K;if(F(N,0,59)){return null}break;case"s":case"ss":ai=K;if(F(ai,0,59)){return null}break;case"tt":case"t":am=Y.PM&&(aj===Y.PM[0]||aj===Y.PM[1]||aj===Y.PM[2]);if(!am&&(!Y.AM||(aj!==Y.AM[0]&&aj!==Y.AM[1]&&aj!==Y.AM[2]))){return null}break;case"f":case"ff":case"fff":J=K*Math.pow(10,3-X);if(F(J,0,999)){return null}break;case"ddd":case"dddd":U=D(Y,aj,X===3);if(F(U,0,6)){return null}break;case"zzz":var V=aj.split(/:/);if(V.length!==2){return null}ag=parseInt(V[0],10);if(F(ag,-12,13)){return null}var R=parseInt(V[1],10);if(F(R,0,59)){return null}ad=(ag*60)+(i(aj,"-")?-R:R);break;case"z":case"zz":ag=K;if(F(ag,-12,13)){return null}ad=ag*60;break;case"g":case"gg":var O=aj;if(!O||!Y.eras){return null}O=y(O.toLowerCase());for(var aa=0,ac=Y.eras.length;aa<ac;aa++){if(O===Y.eras[aa].name.toLowerCase()){P=aa;break}}if(P===null){return null}break}}}var S=new Date(),ah,T=Y.convert;ah=T?T.fromGregorian(S)[0]:S.getFullYear();if(ak===null){ak=ah}else{if(Y.eras){ak+=Y.eras[(P||0)].offset}}if(ao===null){ao=0}if(I===null){I=1}if(T){S=T.toGregorian(ak,ao,I);if(S===null){return null}}else{S.setFullYear(ak,ao,I);if(S.getDate()!==I){return null}if(U!==null&&S.getDay()!==U){return null}}if(am&&ae<12){ae+=12}S.setHours(ae,N,ai,J);if(ad!==null){var an=S.getMinutes()-(ad+S.getTimezoneOffset());S.setHours(S.getHours()+parseInt(an/60,10),an%60)}return S}}());d=function(C,F,E){var D=F["-"],B=F["+"],G;switch(E){case"n -":D=" "+D;B=" "+B;case"n-":if(l(C,D)){G=["-",C.substr(0,C.length-D.length)]}else{if(l(C,B)){G=["+",C.substr(0,C.length-B.length)]}}break;case"- n":D+=" ";B+=" ";case"-n":if(i(C,D)){G=["-",C.substr(D.length)]}else{if(i(C,B)){G=["+",C.substr(B.length)]}}break;case"(n)":if(i(C,"(")&&l(C,")")){G=["-",C.substr(1,C.length-2)]}break}return G||["",C]};x.prototype.findClosestCulture=function(B){return x.findClosestCulture.call(this,B)};x.prototype.format=function(C,D,B){return x.format.call(this,C,D,B)};x.prototype.localize=function(C,B){return x.localize.call(this,C,B)};x.prototype.parseInt=function(C,D,B){return x.parseInt.call(this,C,D,B)};x.prototype.parseFloat=function(C,D,B){return x.parseFloat.call(this,C,D,B)};x.prototype.culture=function(B){return x.culture.call(this,B)};x.addCultureInfo=function(E,D,C){var B={},F=false;if(typeof E!=="string"){C=E;E=this.culture().name;B=this.cultures[E]}else{if(typeof D!=="string"){C=D;F=(this.cultures[E]==null);B=this.cultures[E]||this.cultures["default"]}else{F=true;B=this.cultures[D]}}this.cultures[E]=o(true,{},B,C);if(F){this.cultures[E].calendar=this.cultures[E].calendars.standard}};x.findClosestCulture=function(H){var M;if(!H){return this.cultures[this.cultureSelector]||this.cultures["default"]}if(typeof H==="string"){H=H.split(",")}if(s(H)){var F,J=this.cultures,K=H,B,D=K.length,C=[];for(B=0;B<D;B++){H=y(K[B]);var E,I=H.split(";");F=y(I[0]);if(I.length===1){E=1}else{H=y(I[1]);if(H.indexOf("q=")===0){H=H.substr(2);E=parseFloat(H);E=isNaN(E)?0:E}else{E=1}}C.push({lang:F,pri:E})}C.sort(function(O,P){return O.pri<P.pri?1:-1});for(B=0;B<D;B++){F=C[B].lang;M=J[F];if(M){return M}}for(B=0;B<D;B++){F=C[B].lang;do{var G=F.lastIndexOf("-");if(G===-1){break}F=F.substr(0,G);M=J[F];if(M){return M}}while(1)}for(B=0;B<D;B++){F=C[B].lang;for(var L in J){var N=J[L];if(N.language==F){return N}}}}else{if(typeof H==="object"){return H}}return M||null};x.format=function(C,D,B){culture=this.findClosestCulture(B);if(C instanceof Date){C=g(C,D,culture)}else{if(typeof C==="number"){C=w(C,D,culture)}}return C};x.localize=function(C,B){return(this.findClosestCulture(B).messages[C]||this.cultures["default"].messages.key)};x.parseDate=function(D,I,F){F=this.findClosestCulture(F);var H,C,E;if(I){if(typeof I==="string"){I=[I]}if(I.length){for(var B=0,J=I.length;B<J;B++){var G=I[B];if(G){H=b(D,G,F);if(H){break}}}}}else{E=F.calendar.patterns;for(C in E){H=b(D,E[C],F);if(H){break}}}return H||null};x.parseInt=function(C,D,B){return Math.floor(x.parseFloat(C,D,B))};x.parseFloat=function(B,G,K){if(typeof G!=="number"){K=G;G=10}var L=this.findClosestCulture(K);var H=NaN,N=L.numberFormat;if(B.indexOf(L.numberFormat.currency.symbol)>-1){B=B.replace(L.numberFormat.currency.symbol,"");B=B.replace(L.numberFormat.currency["."],L.numberFormat["."])}B=y(B);if(u.test(B)){H=parseFloat(B)}else{if(!G&&e.test(B)){H=parseInt(B,16)}else{var F=d(B,N,N.pattern[0]),C=F[0],M=F[1];if(C===""&&N.pattern[0]!=="-n"){F=d(B,N,"-n");C=F[0];M=F[1]}C=C||"+";var D,R,E=M.indexOf("e");if(E<0){E=M.indexOf("E")}if(E<0){R=M;D=null}else{R=M.substr(0,E);D=M.substr(E+1)}var Q,T,U=N["."],S=R.indexOf(U);if(S<0){Q=R;T=null}else{Q=R.substr(0,S);T=R.substr(S+U.length)}var P=N[","];Q=Q.split(P).join("");var I=P.replace(/\u00A0/g," ");if(P!==I){Q=Q.split(I).join("")}var J=C+Q;if(T!==null){J+="."+T}if(D!==null){var O=d(D,N,"-n");J+="e"+(O[0]||"+")+O[1]}if(n.test(J)){H=parseFloat(J)}}}return H};x.culture=function(B){if(typeof B!=="undefined"){this.cultureSelector=B}return this.findClosestCulture(B)||this.culture["default"]}}(this));
/*
 * jQuery UI 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(b,d){b.ui=b.ui||{};if(b.ui.version){return}b.extend(b.ui,{version:"1.8.16",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});b.fn.extend({propAttr:b.fn.prop||b.fn.attr,_focus:b.fn.focus,focus:function(f,e){return typeof f==="number"?this.each(function(){var g=this;setTimeout(function(){b(g).focus();if(e){e.call(g)}},f)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?b(document):e},zIndex:function(g){if(g!==d){return this.css("zIndex",g)}if(this.length){var f=b(this[0]),h,e;while(f.length&&f[0]!==document){h=f.css("position");if(h==="absolute"||h==="relative"||h==="fixed"){e=parseInt(f.css("zIndex"),10);if(!isNaN(e)&&e!==0){return e}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(j,f){var e=f==="Width"?["Left","Right"]:["Top","Bottom"],h=f.toLowerCase(),g={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};function k(l,i,m,n){b.each(e,function(){i-=parseFloat(b.curCSS(l,"padding"+this,true))||0;if(m){i-=parseFloat(b.curCSS(l,"border"+this+"Width",true))||0}if(n){i-=parseFloat(b.curCSS(l,"margin"+this,true))||0}});return i}b.fn["inner"+f]=function(i){if(i===d){return g["inner"+f].call(this)}return this.each(function(){b(this).css(h,k(this,i)+"px")})};b.fn["outer"+f]=function(i,l){if(typeof i!=="number"){return g["outer"+f].call(this,i)}return this.each(function(){b(this).css(h,k(this,i,true,l)+"px")})}});function c(h,e){var f=h.nodeName.toLowerCase();if("area"===f){var i=h.parentNode,j=i.name,g;if(!h.href||!j||i.nodeName.toLowerCase()!=="map"){return false}g=b("img[usemap=#"+j+"]")[0];return !!g&&a(g)}return(/input|select|textarea|button|object/.test(f)?!h.disabled:"a"==f?h.href||e:e)&&a(h)}function a(e){return !b(e).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.extend(b.expr[":"],{data:function(f,g,e){return !!b.data(f,e[3])},focusable:function(e){return c(e,!isNaN(b.attr(e,"tabindex")))},tabbable:function(g){var e=b.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});b(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));b.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=f.offsetHeight===100;b.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});b.extend(b.ui,{plugin:{add:function(g,h,e){var f=b.ui[g].prototype;for(var j in e){f.plugins[j]=f.plugins[j]||[];f.plugins[j].push([h,e[j]])}},call:function(h,f,g){var e=h.plugins[f];if(!e||!h.element[0].parentNode){return}for(var j=0;j<e.length;j++){if(h.options[e[j][0]]){e[j][1].apply(h.element,g)}}}},contains:function(e,f){return document.compareDocumentPosition?e.compareDocumentPosition(f)&16:e!==f&&e.contains(f)},hasScroll:function(e,f){if(b(e).css("overflow")==="hidden"){return false}var g=(f&&f==="left")?"scrollLeft":"scrollTop",h=false;if(e[g]>0){return true}e[g]=1;h=(e[g]>0);e[g]=0;return h},isOverAxis:function(f,g,e){return(f>g)&&(f<(g+e))},isOver:function(f,e,g,j,h,i){return b.ui.isOverAxis(f,g,h)&&b.ui.isOverAxis(e,j,i)}})})(jQuery);
/*
 * jQuery UI Widget 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(j){for(var g=0,f;(f=j[g])!=null;g++){try{b(f).triggerHandler("remove")}catch(h){}}c(j)}}else{var a=b.fn.remove;b.fn.remove=function(f,e){return this.each(function(){if(!e){if(!f||b.filter(f,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),f,e)})}}b.widget=function(f,g,i){var e=f.split(".")[0],h;f=f.split(".")[1];h=e+"-"+f;if(!i){i=g;g=b.Widget}b.expr[":"][h]=function(k){return !!b.data(k,f)};b[e]=b[e]||{};b[e][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var j=new g();j.options=b.extend(true,{},j.options);b[e][f].prototype=b.extend(true,j,{namespace:e,widgetName:f,widgetEventPrefix:b[e][f].prototype.widgetEventPrefix||f,widgetBaseClass:h},i);b.widget.bridge(f,b[e][f])};b.widget.bridge=function(e,f){b.fn[e]=function(j){var i=typeof j==="string",h=Array.prototype.slice.call(arguments,1),g=this;j=!i&&h.length?b.extend.apply(null,[true,j].concat(h)):j;if(i&&j.charAt(0)==="_"){return g}if(i){this.each(function(){var l=b.data(this,e),k=l&&b.isFunction(l[j])?l[j].apply(l,h):l;if(k!==l&&k!==d){g=k;return false}})}else{this.each(function(){var k=b.data(this,e);if(k){k.option(j||{})._init()}else{b.data(this,e,new f(j,this))}})}return g}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,e){var g=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(e===d){return this.options[f]}g={};g[f]=e}this._setOptions(g);return this},_setOptions:function(f){var e=this;b.each(f,function(h,g){e._setOption(h,g)});return this},_setOption:function(f,e){this.options[f]=e;if(f==="disabled"){this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(g,k,h){var f=this.options[g];k=b.Event(k);k.type=(g===this.widgetEventPrefix?g:this.widgetEventPrefix+g).toLowerCase();h=h||{};if(k.originalEvent){for(var j=b.event.props.length,e;j;){e=b.event.props[--j];k[e]=k.originalEvent[e]}}this.element.trigger(k,h);return !(b.isFunction(f)&&f.call(this.element[0],k,h)===false||k.isDefaultPrevented())}}})(jQuery);
/*
 * jQuery UI Mouse 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(e){if(a){return}(this._mouseStarted&&this._mouseUp(e));this._mouseDownEvent=e;var f=this,d=(e.which==1),g=(typeof this.options.cancel=="string"&&e.target.nodeName?b(e.target).closest(this.options.cancel).length:false);if(!d||g||!this._mouseCapture(e)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}if(true===b.data(e.target,this.widgetName+".preventClickEvent")){b.removeData(e.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return f._mouseMove(h)};this._mouseUpDelegate=function(h){return f._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);e.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,f){c.ui=c.ui||{};var d=/left|center|right/,e=/top|center|bottom/,b="center",g=c.fn.position,a=c.fn.offset;c.fn.position=function(i){if(!i||!i.of){return g.apply(this,arguments)}i=c.extend({},i);var n=c(i.of),k=n[0],h=(i.collision||"flip").split(" "),o=i.offset?i.offset.split(" "):[0,0],l,m,j;if(k.nodeType===9){l=n.width();m=n.height();j={top:0,left:0}}else{if(k.setTimeout){l=n.width();m=n.height();j={top:n.scrollTop(),left:n.scrollLeft()}}else{if(k.preventDefault){i.at="left top";l=m=0;j={top:i.of.pageY,left:i.of.pageX}}else{l=n.outerWidth();m=n.outerHeight();j=n.offset()}}}c.each(["my","at"],function(){var p=(i[this]||"").split(" ");if(p.length===1){p=d.test(p[0])?p.concat([b]):e.test(p[0])?[b].concat(p):[b,b]}p[0]=d.test(p[0])?p[0]:b;p[1]=e.test(p[1])?p[1]:b;i[this]=p});if(h.length===1){h[1]=h[0]}o[0]=parseInt(o[0],10)||0;if(o.length===1){o[1]=o[0]}o[1]=parseInt(o[1],10)||0;if(i.at[0]==="right"){j.left+=l}else{if(i.at[0]===b){j.left+=l/2}}if(i.at[1]==="bottom"){j.top+=m}else{if(i.at[1]===b){j.top+=m/2}}j.left+=o[0];j.top+=o[1];return this.each(function(){var y=c(this),u=y.outerWidth(),s=y.outerHeight(),x=parseInt(c.curCSS(this,"marginLeft",true))||0,r=parseInt(c.curCSS(this,"marginTop",true))||0,p=u+x+(parseInt(c.curCSS(this,"marginRight",true))||0),w=s+r+(parseInt(c.curCSS(this,"marginBottom",true))||0),q=c.extend({},j),z;if(i.my[0]==="right"){q.left-=u}else{if(i.my[0]===b){q.left-=u/2}}if(i.my[1]==="bottom"){q.top-=s}else{if(i.my[1]===b){q.top-=s/2}}q.left=Math.round(q.left);q.top=Math.round(q.top);z={left:q.left-x,top:q.top-r};c.each(["left","top"],function(B,A){if(c.ui.position[h[B]]){c.ui.position[h[B]][A](q,{targetWidth:l,targetHeight:m,elemWidth:u,elemHeight:s,collisionPosition:z,collisionWidth:p,collisionHeight:w,offset:o,my:i.my,at:i.at})}});if(c.fn.bgiframe){y.bgiframe()}y.offset(c.extend(q,{using:i.using}))})};c.ui.position={fit:{left:function(j,k){var i=c(window),h=k.collisionPosition.left+k.collisionWidth-i.width()-i.scrollLeft();j.left=h>0?j.left-h:Math.max(j.left-k.collisionPosition.left,j.left)},top:function(j,k){var i=c(window),h=k.collisionPosition.top+k.collisionHeight-i.height()-i.scrollTop();j.top=h>0?j.top-h:Math.max(j.top-k.collisionPosition.top,j.top)}},flip:{left:function(m,n){if(n.at[0]===b){return}var l=c(window),h=n.collisionPosition.left+n.collisionWidth-l.width()-l.scrollLeft(),k=n.my[0]==="left"?-n.elemWidth:n.my[0]==="right"?n.elemWidth:0,i=n.at[0]==="left"?n.targetWidth:-n.targetWidth,j=-2*n.offset[0];m.left+=n.collisionPosition.left<0?k+i+j:h>0?k+i+j:0},top:function(m,n){if(n.at[1]===b){return}var l=c(window),h=n.collisionPosition.top+n.collisionHeight-l.height()-l.scrollTop(),k=n.my[1]==="top"?-n.elemHeight:n.my[1]==="bottom"?n.elemHeight:0,i=n.at[1]==="top"?n.targetHeight:-n.targetHeight,j=-2*n.offset[1];m.top+=n.collisionPosition.top<0?k+i+j:h>0?k+i+j:0}}};if(!c.offset.setOffset){c.offset.setOffset=function(i,l){if(/static/.test(c.curCSS(i,"position"))){i.style.position="relative"}var k=c(i),n=k.offset(),h=parseInt(c.curCSS(i,"top",true),10)||0,m=parseInt(c.curCSS(i,"left",true),10)||0,j={top:(l.top-n.top)+h,left:(l.left-n.left)+m};if("using" in l){l.using.call(i,j)}else{k.css(j)}};c.fn.offset=function(i){var h=this[0];if(!h||!h.ownerDocument){return null}if(i){return this.each(function(){c.offset.setOffset(this,i)})}return a.call(this)}}}(jQuery));(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(d){var c=this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(d);if(!this.handle){return false}if(c.iframeFix){a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})}return true},_mouseStart:function(d){var c=this.options;this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;(c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt));if(c.containment){this._setContainment()}if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,d)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);if(a.ui.ddmanager){a.ui.ddmanager.dragStart(this,d)}return true},_mouseDrag:function(e,c){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",e,d)===false){this._mouseUp({});return false}this.position=d.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,e)}return false},_mouseStop:function(c){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){e=a.ui.ddmanager.drop(this,c)}if(this.dropped){e=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if((this.options.revert=="invalid"&&!e)||(this.options.revert=="valid"&&e)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,e))){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(d._trigger("stop",c)!==false){d._clear()}})}else{if(this._trigger("stop",c)!==false){this._clear()}}return false},_mouseUp:function(c){if(this.options.iframeFix===true){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}if(a.ui.ddmanager){a.ui.ddmanager.dragStop(this,c)}return a.ui.mouse.prototype._mouseUp.call(this,c)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target){d=true}});return d},_createHelper:function(e){var c=this.options;var d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[e])):(c.helper=="clone"?this.element.clone().removeAttr("id"):this.element);if(!d.parents("body").length){d.appendTo((c.appendTo=="parent"?this.element[0].parentNode:c.appendTo))}if(d[0]!=this.element[0]&&!(/(fixed|absolute)/).test(d.css("position"))){d.css("position","absolute")}return d},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[e.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(e.containment=="document"?0:a(window).scrollLeft())+a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e.containment=="document"?0:a(window).scrollTop())+(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var g=a(e.containment);var f=g[0];if(!f){return}var h=g.offset();var d=(a(f).css("overflow")!="hidden");this.containment=[(parseInt(a(f).css("borderLeftWidth"),10)||0)+(parseInt(a(f).css("paddingLeft"),10)||0),(parseInt(a(f).css("borderTopWidth"),10)||0)+(parseInt(a(f).css("paddingTop"),10)||0),(d?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(a(f).css("borderLeftWidth"),10)||0)-(parseInt(a(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(d?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(a(f).css("borderTopWidth"),10)||0)-(parseInt(a(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=g}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(g,f){if(!f){f=this.position}var i=g=="absolute"?1:-1;var e=this.options,h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,c=(/(html|body)/i).test(h[0].tagName);return{top:(f.top+this.offset.relative.top*i+this.offset.parent.top*i-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(c?0:h.scrollTop()))*i)),left:(f.left+this.offset.relative.left*i+this.offset.parent.left*i-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():c?0:h.scrollLeft())*i))}},_generatePosition:function(i){var h=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,k=(/(html|body)/i).test(l[0].tagName);var f=i.pageX;var g=i.pageY;if(this.originalPosition){var e;if(this.containment){if(this.relative_container){var j=this.relative_container.offset();e=[this.containment[0]+j.left,this.containment[1]+j.top,this.containment[2]+j.left,this.containment[3]+j.top]}else{e=this.containment}if(i.pageX-this.offset.click.left<e[0]){f=e[0]+this.offset.click.left}if(i.pageY-this.offset.click.top<e[1]){g=e[1]+this.offset.click.top}if(i.pageX-this.offset.click.left>e[2]){f=e[2]+this.offset.click.left}if(i.pageY-this.offset.click.top>e[3]){g=e[3]+this.offset.click.top}}if(h.grid){var d=h.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/h.grid[1])*h.grid[1]:this.originalPageY;g=e?(!(d-this.offset.click.top<e[1]||d-this.offset.click.top>e[3])?d:(!(d-this.offset.click.top<e[1])?d-h.grid[1]:d+h.grid[1])):d;var c=h.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/h.grid[0])*h.grid[0]:this.originalPageX;f=e?(!(c-this.offset.click.left<e[0]||c-this.offset.click.left>e[2])?c:(!(c-this.offset.click.left<e[0])?c-h.grid[0]:c+h.grid[0])):c}}return{top:(g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(k?0:l.scrollTop())))),left:(f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():k?0:l.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(d,e,c){c=c||this._uiHash();a.ui.plugin.call(this,d,[e,c]);if(d=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,d,e,c)},plugins:{},_uiHash:function(c){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.16"});a.ui.plugin.add("draggable","connectToSortable",{start:function(f,e){var d=a(this).data("draggable"),g=d.options,c=a.extend({},e,{item:d.element});d.sortables=[];a(g.connectToSortable).each(function(){var h=a.data(this,"sortable");if(h&&!h.options.disabled){d.sortables.push({instance:h,shouldRevert:h.options.revert});h.refreshPositions();h._trigger("activate",f,c)}})},stop:function(f,e){var d=a(this).data("draggable"),c=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(f);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",f,c)}})},drag:function(f,e){var c=a(this).data("draggable"),g=this;var d=function(j){var p=this.offset.click.top,n=this.offset.click.left;var i=this.positionAbs.top,m=this.positionAbs.left;var k=j.height,q=j.width;var h=j.top,l=j.left;return a.ui.isOver(i+p,m+n,h,l,k,q)};a.each(c.sortables,function(h){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return e.helper[0]};f.target=this.instance.currentItem[0];this.instance._mouseCapture(f,true);this.instance._mouseStart(f,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",f);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}if(this.instance.currentItem){this.instance._mouseDrag(f)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",f,this.instance._uiHash(this.instance));this.instance._mouseStop(f,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}c._trigger("fromSortable",f);c.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(e,d){var c=a("body"),f=a(this).data("draggable").options;if(c.css("cursor")){f._cursor=c.css("cursor")}c.css("cursor",f.cursor)},stop:function(e,d){var c=a(this).data("draggable").options;if(c._cursor){a("body").css("cursor",c._cursor)}}});a.ui.plugin.add("draggable","opacity",{start:function(e,d){var c=a(d.helper),f=a(this).data("draggable").options;if(c.css("opacity")){f._opacity=c.css("opacity")}c.css("opacity",f.opacity)},stop:function(e,d){var c=a(this).data("draggable").options;if(c._opacity){a(d.helper).css("opacity",c._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(d,c){var e=a(this).data("draggable");if(e.scrollParent[0]!=document&&e.scrollParent[0].tagName!="HTML"){e.overflowOffset=e.scrollParent.offset()}},drag:function(f,e){var g=a(this).data("draggable"),d=g.options,c=false;if(g.scrollParent[0]!=document&&g.scrollParent[0].tagName!="HTML"){if(!d.axis||d.axis!="x"){if((g.overflowOffset.top+g.scrollParent[0].offsetHeight)-f.pageY<d.scrollSensitivity){g.scrollParent[0].scrollTop=c=g.scrollParent[0].scrollTop+d.scrollSpeed}else{if(f.pageY-g.overflowOffset.top<d.scrollSensitivity){g.scrollParent[0].scrollTop=c=g.scrollParent[0].scrollTop-d.scrollSpeed}}}if(!d.axis||d.axis!="y"){if((g.overflowOffset.left+g.scrollParent[0].offsetWidth)-f.pageX<d.scrollSensitivity){g.scrollParent[0].scrollLeft=c=g.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(f.pageX-g.overflowOffset.left<d.scrollSensitivity){g.scrollParent[0].scrollLeft=c=g.scrollParent[0].scrollLeft-d.scrollSpeed}}}}else{if(!d.axis||d.axis!="x"){if(f.pageY-a(document).scrollTop()<d.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<d.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}}if(!d.axis||d.axis!="y"){if(f.pageX-a(document).scrollLeft()<d.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<d.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}}if(c!==false&&a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(g,f)}}});a.ui.plugin.add("draggable","snap",{start:function(e,d){var f=a(this).data("draggable"),c=f.options;f.snapElements=[];a(c.snap.constructor!=String?(c.snap.items||":data(draggable)"):c.snap).each(function(){var h=a(this);var g=h.offset();if(this!=f.element[0]){f.snapElements.push({item:this,width:h.outerWidth(),height:h.outerHeight(),top:g.top,left:g.left})}})},drag:function(e,m){var B=a(this).data("draggable"),q=B.options;var x=q.snapTolerance;var s=m.offset.left,y=s+B.helperProportions.width,u=m.offset.top,z=u+B.helperProportions.height;for(var n=B.snapElements.length-1;n>=0;n--){var p=B.snapElements[n].left,g=p+B.snapElements[n].width,j=B.snapElements[n].top,w=j+B.snapElements[n].height;if(!((p-x<s&&s<g+x&&j-x<u&&u<w+x)||(p-x<s&&s<g+x&&j-x<z&&z<w+x)||(p-x<y&&y<g+x&&j-x<u&&u<w+x)||(p-x<y&&y<g+x&&j-x<z&&z<w+x))){if(B.snapElements[n].snapping){(B.options.snap.release&&B.options.snap.release.call(B.element,e,a.extend(B._uiHash(),{snapItem:B.snapElements[n].item})))}B.snapElements[n].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(j-z)<=x;var k=Math.abs(w-u)<=x;var f=Math.abs(p-y)<=x;var A=Math.abs(g-s)<=x;if(c){m.position.top=B._convertPositionTo("relative",{top:j-B.helperProportions.height,left:0}).top-B.margins.top}if(k){m.position.top=B._convertPositionTo("relative",{top:w,left:0}).top-B.margins.top}if(f){m.position.left=B._convertPositionTo("relative",{top:0,left:p-B.helperProportions.width}).left-B.margins.left}if(A){m.position.left=B._convertPositionTo("relative",{top:0,left:g}).left-B.margins.left}}var h=(c||k||f||A);if(q.snapMode!="outer"){var c=Math.abs(j-u)<=x;var k=Math.abs(w-z)<=x;var f=Math.abs(p-s)<=x;var A=Math.abs(g-y)<=x;if(c){m.position.top=B._convertPositionTo("relative",{top:j,left:0}).top-B.margins.top}if(k){m.position.top=B._convertPositionTo("relative",{top:w-B.helperProportions.height,left:0}).top-B.margins.top}if(f){m.position.left=B._convertPositionTo("relative",{top:0,left:p}).left-B.margins.left}if(A){m.position.left=B._convertPositionTo("relative",{top:0,left:g-B.helperProportions.width}).left-B.margins.left}}if(!B.snapElements[n].snapping&&(c||k||f||A||h)){(B.options.snap.snap&&B.options.snap.snap.call(B.element,e,a.extend(B._uiHash(),{snapItem:B.snapElements[n].item})))}B.snapElements[n].snapping=(c||k||f||A||h)}}});a.ui.plugin.add("draggable","stack",{start:function(f,e){var c=a(this).data("draggable").options;var g=a.makeArray(a(c.stack)).sort(function(h,i){return(parseInt(a(h).css("zIndex"),10)||0)-(parseInt(a(i).css("zIndex"),10)||0)});if(!g.length){return}var d=parseInt(g[0].style.zIndex)||0;a(g).each(function(h){this.style.zIndex=d+h});this[0].style.zIndex=d+g.length}});a.ui.plugin.add("draggable","zIndex",{start:function(e,d){var c=a(d.helper),f=a(this).data("draggable").options;if(c.css("zIndex")){f._zIndex=c.css("zIndex")}c.css("zIndex",f.zIndex)},stop:function(e,d){var c=a(this).data("draggable").options;if(c._zIndex){a(d.helper).css("zIndex",c._zIndex)}}})})(jQuery);(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,d=c.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(d)?d:function(e){return e.is(d)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[c.scope]=a.ui.ddmanager.droppables[c.scope]||[];a.ui.ddmanager.droppables[c.scope].push(this);(c.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var d=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<d.length;c++){if(d[c]==this){d.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept"){this.accept=a.isFunction(c)?c:function(e){return e.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var d=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(d&&this._trigger("activate",c,this.ui(d)))},_deactivate:function(c){var d=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(d&&this._trigger("deactivate",c,this.ui(d)))},_over:function(c){var d=a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(d.currentItem||d.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(d))}},_out:function(c){var d=a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(d.currentItem||d.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(d))}},_drop:function(d,f){var e=f||a.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0]){return false}var c=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=a.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==e.options.scope&&g.accept.call(g.element[0],(e.currentItem||e.element))&&a.ui.intersect(e,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){c=true;return false}});if(c){return false}if(this.accept.call(this.element[0],(e.currentItem||e.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",d,this.ui(e));return this.element}return false},ui:function(d){return{draggable:(d.currentItem||d.element),helper:d.helper,position:d.position,offset:d.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.16"});a.ui.intersect=function(n,c,d){if(!c.offset){return false}var p=(n.positionAbs||n.position.absolute).left,h=p+n.helperProportions.width,q=(n.positionAbs||n.position.absolute).top,i=q+n.helperProportions.height;var e=c.offset.left,k=e+c.proportions.width,o=c.offset.top,j=o+c.proportions.height;switch(d){case"fit":return(e<=p&&h<=k&&o<=q&&i<=j);break;case"intersect":return(e<p+(n.helperProportions.width/2)&&h-(n.helperProportions.width/2)<k&&o<q+(n.helperProportions.height/2)&&i-(n.helperProportions.height/2)<j);break;case"pointer":var f=((n.positionAbs||n.position.absolute).left+(n.clickOffset||n.offset.click).left),g=((n.positionAbs||n.position.absolute).top+(n.clickOffset||n.offset.click).top),m=a.ui.isOver(g,f,o,e,c.proportions.height,c.proportions.width);return m;break;case"touch":return((q>=o&&q<=j)||(i>=o&&i<=j)||(q<o&&i>j))&&((p>=e&&p<=k)||(h>=e&&h<=k)||(p<e&&h>k));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(d,f){var c=a.ui.ddmanager.droppables[d.options.scope]||[];var k=f?f.type:null;var e=(d.currentItem||d.element).find(":data(droppable)").andSelf();droppablesLoop:for(var g=0;g<c.length;g++){if(c[g].options.disabled||(d&&!c[g].accept.call(c[g].element[0],(d.currentItem||d.element)))){continue}for(var h=0;h<e.length;h++){if(e[h]==c[g].element[0]){c[g].proportions.height=0;continue droppablesLoop}}c[g].visible=c[g].element.css("display")!="none";if(!c[g].visible){continue}if(k=="mousedown"){c[g]._activate.call(c[g],f)}c[g].offset=c[g].element.offset();c[g].proportions={width:c[g].element[0].offsetWidth,height:c[g].element[0].offsetHeight}}},drop:function(c,e){var d=false;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)){d=d||this._drop.call(this,e)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(c.currentItem||c.element))){this.isout=1;this.isover=0;this._deactivate.call(this,e)}});return d},dragStart:function(c,d){c.element.parents(":not(body,html)").bind("scroll.droppable",function(){if(!c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}})},drag:function(c,d){if(c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var h=a.ui.intersect(c,this,this.options.tolerance);var g=!h&&this.isover==1?"isout":(h&&this.isover==0?"isover":null);if(!g){return}var e;if(this.options.greedy){var f=this.element.parents(":data(droppable):eq(0)");if(f.length){e=a.data(f[0],"droppable");e.greedyChild=(g=="isover"?1:0)}}if(e&&g=="isover"){e.isover=0;e.isout=1;e._out.call(e,d)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,d);if(e&&g=="isout"){e.isout=0;e.isover=1;e._over.call(e,d)}})},dragStop:function(c,d){c.element.parents(":not(body,html)").unbind("scroll.droppable");if(!c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}}}})(jQuery);(function(a,c){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var j=this,f=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!(f.aspectRatio),aspectRatio:f.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:f.helper||f.ghost||f.animate?f.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&a.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=f.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var e=this.handles.split(",");this.handles={};for(var g=0;g<e.length;g++){var l=a.trim(e[g]),h="ui-resizable-"+l;var k=a('<div class="ui-resizable-handle '+h+'"></div>');if(/sw|se|ne|nw/.test(l)){k.css({zIndex:++f.zIndex})}if("se"==l){k.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[l]=".ui-resizable-"+l;this.element.append(k)}}this._renderAxis=function(o){o=o||this.element;for(var p in this.handles){if(this.handles[p].constructor==String){this.handles[p]=a(this.handles[p],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=a(this.handles[p],this.element),m=0;m=/sw|ne|nw|se|n|s/.test(p)?q.outerHeight():q.outerWidth();var n=["padding",/ne|nw|n/.test(p)?"Top":/se|sw|s/.test(p)?"Bottom":/^e$/.test(p)?"Right":"Left"].join("");o.css(n,m);this._proportionallyResize()}if(!a(this.handles[p]).length){continue}}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!j.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}j.axis=i&&i[1]?i[1]:"se"}});if(f.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){if(f.disabled){return}a(this).removeClass("ui-resizable-autohide");j._handles.show()},function(){if(f.disabled){return}if(!j.resizing){a(this).addClass("ui-resizable-autohide");j._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){a(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(e){var g=false;for(var f in this.handles){if(a(this.handles[f])[0]==e.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(i){var f=this.options,k=this.element.position(),g=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(g.is(".ui-draggable")||(/absolute/).test(g.css("position"))){g.css({position:"absolute",top:k.top,left:k.left})}if(a.browser.opera&&(/relative/).test(g.css("position"))){g.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=d(this.helper.css("left")),h=d(this.helper.css("top"));if(f.containment){j+=a(f.containment).scrollLeft()||0;h+=a(f.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:h};this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:j,top:h};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:i.pageX,top:i.pageY};this.aspectRatio=(typeof f.aspectRatio=="number")?f.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var e=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",e=="auto"?this.axis+"-resize":e);g.addClass("ui-resizable-resizing");this._propagate("start",i);return true},_mouseDrag:function(r){var k=this.helper,g=this.options,f={},q=this,h=this.originalMousePosition,i=this.axis;var n=(r.pageX-h.left)||0,p=(r.pageY-h.top)||0;var e=this._change[i];if(!e){return false}var j=e.apply(this,[r,n,p]),m=a.browser.msie&&a.browser.version<7,l=this.sizeDiff;this._updateVirtualBoundaries(r.shiftKey);if(this._aspectRatio||r.shiftKey){j=this._updateRatio(j,r)}j=this._respectSize(j,r);this._propagate("resize",r);k.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(j);this._trigger("resize",r,this.ui());return false},_mouseStop:function(i){this.resizing=false;var h=this.options,n=this;if(this._helper){var l=this._proportionallyResizeElements,j=l.length&&(/textarea/i).test(l[0].nodeName),f=j&&a.ui.hasScroll(l[0],"left")?0:n.sizeDiff.height,k=j?0:n.sizeDiff.width;var m={width:(n.helper.width()-k),height:(n.helper.height()-f)},g=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,e=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;if(!h.animate){this.element.css(a.extend(m,{top:e,left:g}))}n.helper.height(n.size.height);n.helper.width(n.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",i);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(k){var e=this.options,h,j,f,i,g;g={minWidth:b(e.minWidth)?e.minWidth:0,maxWidth:b(e.maxWidth)?e.maxWidth:Infinity,minHeight:b(e.minHeight)?e.minHeight:0,maxHeight:b(e.maxHeight)?e.maxHeight:Infinity};if(this._aspectRatio||k){h=g.minHeight*this.aspectRatio;f=g.minWidth/this.aspectRatio;j=g.maxHeight*this.aspectRatio;i=g.maxWidth/this.aspectRatio;if(h>g.minWidth){g.minWidth=h}if(f>g.minHeight){g.minHeight=f}if(j<g.maxWidth){g.maxWidth=j}if(i<g.maxHeight){g.maxHeight=i}}this._vBoundaries=g},_updateCache:function(f){var e=this.options;this.offset=this.helper.offset();if(b(f.left)){this.position.left=f.left}if(b(f.top)){this.position.top=f.top}if(b(f.height)){this.size.height=f.height}if(b(f.width)){this.size.width=f.width}},_updateRatio:function(j,h){var f=this.options,i=this.position,e=this.size,g=this.axis;if(b(j.height)){j.width=(j.height*this.aspectRatio)}else{if(b(j.width)){j.height=(j.width/this.aspectRatio)}}if(g=="sw"){j.left=i.left+(e.width-j.width);j.top=null}if(g=="nw"){j.top=i.top+(e.height-j.height);j.left=i.left+(e.width-j.width)}return j},_respectSize:function(h,f){var i=this.helper,e=this._vBoundaries,p=this._aspectRatio||f.shiftKey,g=this.axis,s=b(h.width)&&e.maxWidth&&(e.maxWidth<h.width),n=b(h.height)&&e.maxHeight&&(e.maxHeight<h.height),j=b(h.width)&&e.minWidth&&(e.minWidth>h.width),m=b(h.height)&&e.minHeight&&(e.minHeight>h.height);if(j){h.width=e.minWidth}if(m){h.height=e.minHeight}if(s){h.width=e.maxWidth}if(n){h.height=e.maxHeight}var k=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height;var l=/sw|nw|w/.test(g),u=/nw|ne|n/.test(g);if(j&&l){h.left=k-e.minWidth}if(s&&l){h.left=k-e.maxWidth}if(m&&u){h.top=q-e.minHeight}if(n&&u){h.top=q-e.maxHeight}var r=!h.width&&!h.height;if(r&&!h.left&&h.top){h.top=null}else{if(r&&!h.top&&h.left){h.left=null}}return h},_proportionallyResize:function(){var f=this.options;if(!this._proportionallyResizeElements.length){return}var j=this.helper||this.element;for(var g=0;g<this._proportionallyResizeElements.length;g++){var k=this._proportionallyResizeElements[g];if(!this.borderDif){var h=[k.css("borderTopWidth"),k.css("borderRightWidth"),k.css("borderBottomWidth"),k.css("borderLeftWidth")],e=[k.css("paddingTop"),k.css("paddingRight"),k.css("paddingBottom"),k.css("paddingLeft")];this.borderDif=a.map(h,function(m,o){var n=parseInt(m,10)||0,l=parseInt(e[o],10)||0;return n+l})}if(a.browser.msie&&!(!(a(j).is(":hidden")||a(j).parents(":hidden").length))){continue}k.css({height:(j.height()-this.borderDif[0]-this.borderDif[2])||0,width:(j.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var g=this.element,f=this.options;this.elementOffset=g.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var i=a.browser.msie&&a.browser.version<7,e=(i?1:0),h=(i?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++f.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(e,g,f){return{width:this.originalSize.width+g}},w:function(g,j,h){var f=this.options,i=this.originalSize,e=this.originalPosition;return{left:e.left+j,width:i.width-j}},n:function(g,j,h){var f=this.options,i=this.originalSize,e=this.originalPosition;return{top:e.top+h,height:i.height-h}},s:function(e,g,f){return{height:this.originalSize.height+f}},se:function(e,g,f){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,g,f]))},sw:function(e,g,f){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,g,f]))},ne:function(e,g,f){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,g,f]))},nw:function(e,g,f){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,g,f]))}},_propagate:function(e,f){a.ui.plugin.call(this,e,[f,this.ui()]);(e!="resize"&&this._trigger(e,f,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.extend(a.ui.resizable,{version:"1.8.16"});a.ui.plugin.add("resizable","alsoResize",{start:function(g,f){var h=a(this).data("resizable"),e=h.options;var i=function(j){a(j).each(function(){var k=a(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10),position:k.css("position")})})};if(typeof(e.alsoResize)=="object"&&!e.alsoResize.parentNode){if(e.alsoResize.length){e.alsoResize=e.alsoResize[0];i(e.alsoResize)}else{a.each(e.alsoResize,function(j){i(j)})}}else{i(e.alsoResize)}},resize:function(g,j){var l=a(this).data("resizable"),f=l.options,k=l.originalSize,i=l.originalPosition;var e={height:(l.size.height-k.height)||0,width:(l.size.width-k.width)||0,top:(l.position.top-i.top)||0,left:(l.position.left-i.left)||0},h=function(m,n){a(m).each(function(){var p=a(this),q=a(this).data("resizable-alsoresize"),r={},o=n&&n.length?n:p.parents(j.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(o,function(s,w){var u=(q[w]||0)+(e[w]||0);if(u&&u>=0){r[w]=u||null}});if(a.browser.opera&&/relative/.test(p.css("position"))){l._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(r)})};if(typeof(f.alsoResize)=="object"&&!f.alsoResize.nodeType){a.each(f.alsoResize,function(m,n){h(m,n)})}else{h(f.alsoResize)}},stop:function(h,g){var i=a(this).data("resizable"),f=i.options;var e=function(j){a(j).each(function(){var k=a(this);k.css({position:k.data("resizable-alsoresize").position})})};if(i._revertToRelativePosition){i._revertToRelativePosition=false;if(typeof(f.alsoResize)=="object"&&!f.alsoResize.nodeType){a.each(f.alsoResize,function(j){e(j)})}else{e(f.alsoResize)}}a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(i,l){var p=a(this).data("resizable"),h=p.options;var m=p._proportionallyResizeElements,j=m.length&&(/textarea/i).test(m[0].nodeName),f=j&&a.ui.hasScroll(m[0],"left")?0:p.sizeDiff.height,k=j?0:p.sizeDiff.width;var n={width:(p.size.width-k),height:(p.size.height-f)},g=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,e=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(a.extend(n,e&&g?{top:e,left:g}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(m&&m.length){a(m[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});a.ui.plugin.add("resizable","containment",{start:function(h,m){var u=a(this).data("resizable"),g=u.options,j=u.element;var s=g.containment,r=(s instanceof a)?s.get(0):(/parent/.test(s))?j.parent().get(0):s;if(!r){return}u.containerElement=a(r);if(/document/.test(s)||s==document){u.containerOffset={left:0,top:0};u.containerPosition={left:0,top:0};u.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var f=a(r),n=[];a(["Top","Right","Left","Bottom"]).each(function(p,o){n[p]=d(f.css("padding"+o))});u.containerOffset=f.offset();u.containerPosition=f.position();u.containerSize={height:(f.innerHeight()-n[3]),width:(f.innerWidth()-n[1])};var l=u.containerOffset,q=u.containerSize.height,i=u.containerSize.width,e=(a.ui.hasScroll(r,"left")?r.scrollWidth:i),k=(a.ui.hasScroll(r)?r.scrollHeight:q);u.parentData={element:r,left:l.left,top:l.top,width:e,height:k}}},resize:function(i,m){var s=a(this).data("resizable"),h=s.options,e=s.containerSize,l=s.containerOffset,r=s.size,n=s.position,q=s._aspectRatio||i.shiftKey,u={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){u=l}if(n.left<(s._helper?l.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-l.left):(s.position.left-u.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?l.left:0}if(n.top<(s._helper?l.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-l.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?l.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-u.left:(s.offset.left-u.left))+s.sizeDiff.width),f=Math.abs((s._helper?s.offset.top-u.top:(s.offset.top-l.top))+s.sizeDiff.height);var p=s.containerElement.get(0)==s.element.parent().get(0),j=/relative|absolute/.test(s.containerElement.css("position"));if(p&&j){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(f+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-f;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(j,l){var p=a(this).data("resizable"),i=p.options,m=p.position,k=p.containerOffset,n=p.containerPosition,g=p.containerElement;var f=a(p.helper),e=f.offset(),q=f.outerWidth()-p.sizeDiff.width,r=f.outerHeight()-p.sizeDiff.height;if(p._helper&&!i.animate&&(/relative/).test(g.css("position"))){a(this).css({left:e.left-n.left-k.left,width:q,height:r})}if(p._helper&&!i.animate&&(/static/).test(g.css("position"))){a(this).css({left:e.left-n.left-k.left,width:q,height:r})}}});a.ui.plugin.add("resizable","ghost",{start:function(g,f){var h=a(this).data("resizable"),e=h.options,i=h.size;h.ghost=h.originalElement.clone();h.ghost.css({opacity:0.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");h.ghost.appendTo(h.helper)},resize:function(g,f){var h=a(this).data("resizable"),e=h.options;if(h.ghost){h.ghost.css({position:"relative",height:h.size.height,width:h.size.width})}},stop:function(g,f){var h=a(this).data("resizable"),e=h.options;if(h.ghost&&h.helper){h.helper.get(0).removeChild(h.ghost.get(0))}}});a.ui.plugin.add("resizable","grid",{resize:function(g,j){var p=a(this).data("resizable"),f=p.options,n=p.size,l=p.originalSize,i=p.originalPosition,h=p.axis,k=f._aspectRatio||g.shiftKey;f.grid=typeof f.grid=="number"?[f.grid,f.grid]:f.grid;var e=Math.round((n.width-l.width)/(f.grid[0]||1))*(f.grid[0]||1),m=Math.round((n.height-l.height)/(f.grid[1]||1))*(f.grid[1]||1);if(/^(se|s|e)$/.test(h)){p.size.width=l.width+e;p.size.height=l.height+m}else{if(/^(ne)$/.test(h)){p.size.width=l.width+e;p.size.height=l.height+m;p.position.top=i.top-m}else{if(/^(sw)$/.test(h)){p.size.width=l.width+e;p.size.height=l.height+m;p.position.left=i.left-e}else{p.size.width=l.width+e;p.size.height=l.height+m;p.position.top=i.top-m;p.position.left=i.left-e}}}}});var d=function(e){return parseInt(e,10)||0};var b=function(e){return !isNaN(parseInt(e,10))}})(jQuery);(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(d.options.filter,d.element[0]);c.each(function(){var f=a(this);var e=f.offset();a.data(this,"selectable-item",{element:this,$element:f,left:e.left,top:e.top,right:e.left+f.outerWidth(),bottom:e.top+f.outerHeight(),startselected:false,selected:f.hasClass("ui-selected"),selecting:f.hasClass("ui-selecting"),unselecting:f.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var d=this;this.opos=[c.pageX,c.pageY];if(this.options.disabled){return}var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",c);a(e.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});if(e.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var f=a.data(this,"selectable-item");f.startselected=true;if(!c.metaKey){f.$element.removeClass("ui-selected");f.selected=false;f.$element.addClass("ui-unselecting");f.unselecting=true;d._trigger("unselecting",c,{unselecting:f.element})}});a(c.target).parents().andSelf().each(function(){var g=a.data(this,"selectable-item");if(g){var f=!c.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");g.unselecting=!f;g.selecting=f;g.selected=f;if(f){d._trigger("selecting",c,{selecting:g.element})}else{d._trigger("unselecting",c,{unselecting:g.element})}return false}})},_mouseDrag:function(j){var h=this;this.dragged=true;if(this.options.disabled){return}var c=this.options;var i=this.opos[0],e=this.opos[1],f=j.pageX,g=j.pageY;if(i>f){var d=f;f=i;i=d}if(e>g){var d=g;g=e;e=d}this.helper.css({left:i,top:e,width:f-i,height:g-e});this.selectees.each(function(){var k=a.data(this,"selectable-item");if(!k||k.element==h.element[0]){return}var l=false;if(c.tolerance=="touch"){l=(!(k.left>f||k.right<i||k.top>g||k.bottom<e))}else{if(c.tolerance=="fit"){l=(k.left>i&&k.right<f&&k.top>e&&k.bottom<g)}}if(l){if(k.selected){k.$element.removeClass("ui-selected");k.selected=false}if(k.unselecting){k.$element.removeClass("ui-unselecting");k.unselecting=false}if(!k.selecting){k.$element.addClass("ui-selecting");k.selecting=true;h._trigger("selecting",j,{selecting:k.element})}}else{if(k.selecting){if(j.metaKey&&k.startselected){k.$element.removeClass("ui-selecting");k.selecting=false;k.$element.addClass("ui-selected");k.selected=true}else{k.$element.removeClass("ui-selecting");k.selecting=false;if(k.startselected){k.$element.addClass("ui-unselecting");k.unselecting=true}h._trigger("unselecting",j,{unselecting:k.element})}}if(k.selected){if(!j.metaKey&&!k.startselected){k.$element.removeClass("ui-selected");k.selected=false;k.$element.addClass("ui-unselecting");k.unselecting=true;h._trigger("unselecting",j,{unselecting:k.element})}}}});return false},_mouseStop:function(c){var d=this;this.dragged=false;var e=this.options;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;d._trigger("unselected",c,{unselected:f.element})});a(".ui-selecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;d._trigger("selected",c,{selected:f.element})});this._trigger("stop",c);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.16"})})(jQuery);(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var c=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?c.axis==="x"||(/left|right/).test(this.items[0].item.css("float"))||(/inline|table-cell/).test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}return this},_setOption:function(d,c){if(d==="disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(g,e){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(g);var d=null,h=this,f=a(g.target).parents().each(function(){if(a.data(this,"sortable-item")==h){d=a(this);return false}});if(a.data(g.target,"sortable-item")==h){d=a(g.target)}if(!d){return false}if(this.options.handle&&!e){var c=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==g.target){c=true}});if(!c){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(f,d,c){var h=this.options,g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;(h.cursorAt&&this._adjustOffsetFromHelper(h.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",h.cursor)}if(h.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",h.opacity)}if(h.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",h.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!c){for(var e=this.containers.length-1;e>=0;e--){this.containers[e]._trigger("activate",f,g._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var d=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<d.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+d.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<d.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-d.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<d.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<d.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-d.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<d.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<d.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<d.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<d.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}if(c!==false&&a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var g=this.items.length-1;g>=0;g--){var h=this.items[g],j=h.item[0],e=this._intersectsWithPointer(h);if(!e){continue}if(j!=this.currentItem[0]&&this.placeholder[e==1?"next":"prev"]()[0]!=j&&!a.ui.contains(this.placeholder[0],j)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],j):true)){this.direction=e==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(h)){this._rearrange(f,h)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,c){if(!d){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,d)}if(this.options.revert){var e=this;var f=e.placeholder.offset();e.reverting=true;a(this.helper).animate({left:f.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){e._clear(d)})}else{this._clear(d,c)}return false},cancel:function(){var d=this;if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(c){var e=this._getItemsAsjQuery(c&&c.connected);var d=[];c=c||{};a(e).each(function(){var f=(a(c.item||this).attr(c.attribute||"id")||"").match(c.expression||(/(.+)[-=_](.+)/));if(f){d.push((c.key||f[1]+"[]")+"="+(c.key&&c.expression?f[1]:f[2]))}});if(!d.length&&c.key){d.push(c.key+"=")}return d.join("&")},toArray:function(c){var d=this._getItemsAsjQuery(c&&c.connected);var e=[];c=c||{};d.each(function(){e.push(a(c.item||this).attr(c.attribute||"id")||"")});return e},_intersectsWith:function(d){var n=this.positionAbs.left,e=n+this.helperProportions.width,o=this.positionAbs.top,f=o+this.helperProportions.height;var c=d.left,k=c+d.width,m=d.top,g=m+d.height;var j=this.offset.click.top,i=this.offset.click.left;var h=(o+j)>m&&(o+j)<g&&(n+i)>c&&(n+i)<k;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"])){return h}else{return(c<n+(this.helperProportions.width/2)&&e-(this.helperProportions.width/2)<k&&m<o+(this.helperProportions.height/2)&&f-(this.helperProportions.height/2)<g)}},_intersectsWithPointer:function(g){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,g.top,g.height),e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,g.left,g.width),f=c&&e,d=this._getDragVerticalDirection(),h=this._getDragHorizontalDirection();if(!f){return false}return this.floating?(((h&&h=="right")||d=="down")?2:1):(d&&(d=="down"?2:1))},_intersectsWithSides:function(e){var g=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),c=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return c&&((c=="down"&&g)||(c=="up"&&!g))}},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(f){var m=this;var e=[];var k=[];var h=this._connectWith();if(h&&f){for(var l=h.length-1;l>=0;l--){var c=a(h[l]);for(var d=c.length-1;d>=0;d--){var g=a.data(c[d],"sortable");if(g&&g!=this&&!g.options.disabled){k.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g])}}}}k.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var l=k.length-1;l>=0;l--){k[l][0].each(function(){e.push(this)})}return a(e)},_removeCurrentsFromItems:function(){var c=this.currentItem.find(":data(sortable-item)");for(var d=0;d<this.items.length;d++){for(var e=0;e<c.length;e++){if(c[e]==this.items[d].item[0]){this.items.splice(d,1)}}}},_refreshItems:function(k){this.items=[];this.containers=[this];var f=this.items;var q=this;var o=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],k,{item:this.currentItem}):a(this.options.items,this.element),this]];var n=this._connectWith();if(n){for(var c=n.length-1;c>=0;c--){var l=a(n[c]);for(var d=l.length-1;d>=0;d--){var m=a.data(l[d],"sortable");if(m&&m!=this&&!m.options.disabled){o.push([a.isFunction(m.options.items)?m.options.items.call(m.element[0],k,{item:this.currentItem}):a(m.options.items,m.element),m]);this.containers.push(m)}}}}for(var c=o.length-1;c>=0;c--){var p=o[c][1];var h=o[c][0];for(var d=0,g=h.length;d<g;d++){var e=a(h[d]);e.data("sortable-item",p);f.push({item:e,instance:p,width:0,height:0,left:0,top:0})}}},refreshPositions:function(g){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var e=this.items.length-1;e>=0;e--){var f=this.items[e];if(f.instance!=this.currentContainer&&this.currentContainer&&f.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;if(!g){f.width=c.outerWidth();f.height=c.outerHeight()}var d=c.offset();f.left=d.left;f.top=d.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var e=this.containers.length-1;e>=0;e--){var d=this.containers[e].element.offset();this.containers[e].containerCache.left=d.left;this.containers[e].containerCache.top=d.top;this.containers[e].containerCache.width=this.containers[e].element.outerWidth();this.containers[e].containerCache.height=this.containers[e].element.outerHeight()}}return this},_createPlaceholder:function(c){var f=c||this,d=f.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var g=a(document.createElement(f.currentItem[0].nodeName)).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e){g.style.visibility="hidden"}return g},update:function(g,h){if(e&&!d.forcePlaceholderSize){return}if(!h.height()){h.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10))}if(!h.width()){h.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}}f.placeholder=a(d.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);d.placeholder.update(f,f.placeholder)},_contactContainers:function(f){var m=null,k=null;for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.currentItem[0],this.containers[c].element[0])){continue}if(this._intersectsWith(this.containers[c].containerCache)){if(m&&a.ui.contains(this.containers[c].element[0],m.element[0])){continue}m=this.containers[c];k=c}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",f,this._uiHash(this));this.containers[c].containerCache.over=0}}}if(!m){return}if(this.containers.length===1){this.containers[k]._trigger("over",f,this._uiHash(this));this.containers[k].containerCache.over=1}else{if(this.currentContainer!=this.containers[k]){var h=10000;var e=null;var l=this.positionAbs[this.containers[k].floating?"left":"top"];for(var d=this.items.length-1;d>=0;d--){if(!a.ui.contains(this.containers[k].element[0],this.items[d].item[0])){continue}var g=this.items[d][this.containers[k].floating?"left":"top"];if(Math.abs(g-l)<h){h=Math.abs(g-l);e=this.items[d]}}if(!e&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[k];e?this._rearrange(f,e,null,true):this._rearrange(f,null,this.containers[k].element,true);this._trigger("change",f,this._uiHash());this.containers[k]._trigger("change",f,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[k]._trigger("over",f,this._uiHash(this));this.containers[k].containerCache.over=1}}},_createHelper:function(e){var c=this.options;var d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[e,this.currentItem])):(c.helper=="clone"?this.currentItem.clone():this.currentItem);if(!d.parents("body").length){a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0])}if(d[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(d[0].style.width==""||c.forceHelperSize){d.width(this.currentItem.width())}if(d[0].style.height==""||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent"){d.containment=this.helper[0].parentNode}if(d.containment=="document"||d.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(d.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(d.containment)){var e=a(d.containment)[0];var f=a(d.containment).offset();var c=(a(e).css("overflow")!="hidden");this.containment=[f.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0)-this.margins.left,f.top+(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0)-this.margins.top,f.left+(c?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,f.top+(c?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(g,f){if(!f){f=this.position}var i=g=="absolute"?1:-1;var e=this.options,h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,c=(/(html|body)/i).test(h[0].tagName);return{top:(f.top+this.offset.relative.top*i+this.offset.parent.top*i-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(c?0:h.scrollTop()))*i)),left:(f.left+this.offset.relative.left*i+this.offset.parent.left*i-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():c?0:h.scrollLeft())*i))}},_generatePosition:function(h){var g=this.options,j=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(j[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var e=h.pageX;var f=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){f=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){f=this.containment[3]+this.offset.click.top}}if(g.grid){var d=this.originalPageY+Math.round((f-this.originalPageY)/g.grid[1])*g.grid[1];f=this.containment?(!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?d:(!(d-this.offset.click.top<this.containment[1])?d-g.grid[1]:d+g.grid[1])):d;var c=this.originalPageX+Math.round((e-this.originalPageX)/g.grid[0])*g.grid[0];e=this.containment?(!(c-this.offset.click.left<this.containment[0]||c-this.offset.click.left>this.containment[2])?c:(!(c-this.offset.click.left<this.containment[0])?c-g.grid[0]:c+g.grid[0])):c}}return{top:(f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:j.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:j.scrollLeft())))}},_rearrange:function(e,g,d,h){d?d[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?g.item[0]:g.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var f=this,c=this.counter;window.setTimeout(function(){if(c==f.counter){f.refreshPositions(!h)}},0)},_clear:function(e,c){this.reverting=false;var g=[],f=this;if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var d in this._storedCSS){if(this._storedCSS[d]=="auto"||this._storedCSS[d]=="static"){this._storedCSS[d]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!c){g.push(function(h){this._trigger("receive",h,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c){g.push(function(h){this._trigger("update",h,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!c){g.push(function(h){this._trigger("remove",h,this._uiHash())})}for(var d=this.containers.length-1;d>=0;d--){if(a.ui.contains(this.containers[d].element[0],this.currentItem[0])&&!c){g.push((function(h){return function(i){h._trigger("receive",i,this._uiHash(this))}}).call(this,this.containers[d]));g.push((function(h){return function(i){h._trigger("update",i,this._uiHash(this))}}).call(this,this.containers[d]))}}}for(var d=this.containers.length-1;d>=0;d--){if(!c){g.push((function(h){return function(i){h._trigger("deactivate",i,this._uiHash(this))}}).call(this,this.containers[d]))}if(this.containers[d].containerCache.over){g.push((function(h){return function(i){h._trigger("out",i,this._uiHash(this))}}).call(this,this.containers[d]));this.containers[d].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",e,this._uiHash());for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}return false}if(!c){this._trigger("beforeStop",e,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!c){for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var d=c||this;return{helper:d.helper,placeholder:d.placeholder||a([]),position:d.position,originalPosition:d.originalPosition,offset:d.positionAbs,item:d.currentItem,sender:c?c.element:null}}});a.extend(a.ui.sortable,{version:"1.8.16"})})(jQuery);(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var d=this,e=d.options;d.running=0;d.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");d.headers=d.element.find(e.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(e.disabled){return}a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(e.disabled){return}a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(e.disabled){return}a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(e.disabled){return}a(this).removeClass("ui-state-focus")});d.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(e.navigation){var c=d.element.find("a").filter(e.navigationFilter).eq(0);if(c.length){var f=c.closest(".ui-accordion-header");if(f.length){d.active=f}else{d.active=c.closest(".ui-accordion-content").prev()}}}d.active=d._findActive(d.active||e.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");d.active.next().addClass("ui-accordion-content-active");d._createIcons();d.resize();d.element.attr("role","tablist");d.headers.attr("role","tab").bind("keydown.accordion",function(g){return d._keydown(g)}).next().attr("role","tabpanel");d.headers.not(d.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();if(!d.active.length){d.headers.eq(0).attr("tabIndex",0)}else{d.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0})}if(!a.browser.safari){d.headers.find("a").attr("tabIndex",-1)}if(e.event){d.headers.bind(e.event.split(" ").join(".accordion ")+".accordion",function(g){d._clickHandler.call(d,g,this);g.preventDefault()})}},_createIcons:function(){var c=this.options;if(c.icons){a("<span></span>").addClass("ui-icon "+c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var d=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(c.autoHeight||c.fillHeight){d.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);if(d=="active"){this.activate(c)}if(d=="icons"){this._destroyIcons();if(c){this._createIcons()}}if(d=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(e){if(this.options.disabled||e.altKey||e.ctrlKey){return}var d=a.ui.keyCode,f=this.headers.length,c=this.headers.index(e.target),g=false;switch(e.keyCode){case d.RIGHT:case d.DOWN:g=this.headers[(c+1)%f];break;case d.LEFT:case d.UP:g=this.headers[(c-1+f)%f];break;case d.SPACE:case d.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(g){a(e.target).attr("tabIndex",-1);a(g).attr("tabIndex",0);g.focus();return false}return true},resize:function(){var d=this.options,c;if(d.fillSpace){if(a.browser.msie){var e=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",e)}this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(d.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}}return this},activate:function(d){this.options.active=d;var c=this._findActive(d)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(f,k){var c=this.options;if(c.disabled){return}if(!f.target){if(!c.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(c.icons.headerSelected).addClass(c.icons.header);this.active.next().addClass("ui-accordion-content-active");var l=this.active.next(),h={options:c,newHeader:a([]),oldHeader:c.active,newContent:a([]),oldContent:l},e=(this.active=a([]));this._toggle(e,l,h);return}var i=a(f.currentTarget||k),g=i[0]===this.active[0];c.active=c.collapsible&&g?false:this.headers.index(i);if(this.running||(!c.collapsible&&g)){return}var d=this.active,e=i.next(),l=this.active.next(),h={options:c,newHeader:g&&c.collapsible?a([]):i,oldHeader:this.active,newContent:g&&c.collapsible?a([]):e,oldContent:l},j=this.headers.index(this.active[0])>this.headers.index(i[0]);this.active=g?a([]):i;this._toggle(e,l,h,g,j);d.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(c.icons.headerSelected).addClass(c.icons.header);if(!g){i.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(c.icons.header).addClass(c.icons.headerSelected);i.next().addClass("ui-accordion-content-active")}return},_toggle:function(f,n,h,g,i){var m=this,c=m.options;m.toShow=f;m.toHide=n;m.data=h;var l=function(){if(!m){return}return m._completed.apply(m,arguments)};m._trigger("changestart",null,m.data);m.running=n.size()===0?f.size():n.size();if(c.animated){var e={};if(c.collapsible&&g){e={toShow:a([]),toHide:n,complete:l,down:i,autoHeight:c.autoHeight||c.fillSpace}}else{e={toShow:f,toHide:n,complete:l,down:i,autoHeight:c.autoHeight||c.fillSpace}}if(!c.proxied){c.proxied=c.animated}if(!c.proxiedDuration){c.proxiedDuration=c.duration}c.animated=a.isFunction(c.proxied)?c.proxied(e):c.proxied;c.duration=a.isFunction(c.proxiedDuration)?c.proxiedDuration(e):c.proxiedDuration;var j=a.ui.accordion.animations,d=c.duration,k=c.animated;if(k&&!j[k]&&!a.easing[k]){k="slide"}if(!j[k]){j[k]=function(o){this.slide(o,{easing:k,duration:d||700})}}j[k](e)}else{if(c.collapsible&&g){f.toggle()}else{n.hide();f.show()}l(true)}n.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();f.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(this.running){return}if(this.options.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.8.16",animations:{slide:function(f,k){f=a.extend({easing:"swing",duration:300},f,k);if(!f.toHide.size()){f.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},f);return}if(!f.toShow.size()){f.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},f);return}var e=f.toShow.css("overflow"),c=0,g={},h={},d=["height","paddingTop","paddingBottom"],j;var i=f.toShow;j=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(d,function(l,n){h[n]="hide";var m=(""+a.css(f.toShow[0],n)).match(/^([\d+-.]+)(.*)$/);g[n]={value:m[1],unit:m[2]||"px"}});f.toShow.css({height:0,overflow:"hidden"}).show();f.toHide.filter(":hidden").each(f.complete).end().filter(":visible").animate(h,{step:function(m,l){if(l.prop=="height"){c=(l.end-l.start===0)?0:(l.now-l.start)/(l.end-l.start)}f.toShow[0].style[l.prop]=(c*g[l.prop].value)+g[l.prop].unit},duration:f.duration,easing:f.easing,complete:function(){if(!f.autoHeight){f.toShow.css("height","")}f.toShow.css({width:j,overflow:e});f.complete()}})},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1000:200})}}})})(jQuery);(function(b,c){var a=0;b.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var f=this,d=this.element[0].ownerDocument,e;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(h){if(f.options.disabled||f.element.propAttr("readOnly")){return}e=false;var g=b.ui.keyCode;switch(h.keyCode){case g.PAGE_UP:f._move("previousPage",h);break;case g.PAGE_DOWN:f._move("nextPage",h);break;case g.UP:f._move("previous",h);h.preventDefault();break;case g.DOWN:f._move("next",h);h.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:if(f.menu.active){e=true;h.preventDefault()}case g.TAB:if(!f.menu.active){return}f.menu.select(h);break;case g.ESCAPE:f.element.val(f.term);f.close(h);break;default:clearTimeout(f.searching);f.searching=setTimeout(function(){if(f.term!=f.element.val()){f.selectedItem=null;f.search(null,h)}},f.options.delay);break}}).bind("keypress.autocomplete",function(g){if(e){e=false;g.preventDefault()}}).bind("focus.autocomplete",function(){if(f.options.disabled){return}f.selectedItem=null;f.previous=f.element.val()}).bind("blur.autocomplete",function(g){if(f.options.disabled){return}clearTimeout(f.searching);f.closing=setTimeout(function(){f.close(g);f._change(g)},150)});this._initSource();this.response=function(){return f._response.apply(f,arguments)};this.menu=b("<ul></ul>").addClass("ui-autocomplete").appendTo(b(this.options.appendTo||"body",d)[0]).mousedown(function(g){var h=f.menu.element[0];if(!b(g.target).closest(".ui-menu-item").length){setTimeout(function(){b(document).one("mousedown",function(i){if(i.target!==f.element[0]&&i.target!==h&&!b.ui.contains(h,i.target)){f.close()}})},1)}setTimeout(function(){clearTimeout(f.closing)},13)}).menu({focus:function(h,g){var i=g.item.data("item.autocomplete");if(false!==f._trigger("focus",h,{item:i})){if(/^key/.test(h.originalEvent.type)){f.element.val(i.value)}}},selected:function(h,g){var j=g.item.data("item.autocomplete"),i=f.previous;if(f.element[0]!==d.activeElement){f.element.focus();f.previous=i;setTimeout(function(){f.previous=i;f.selectedItem=j},1)}if(false!==f._trigger("select",h,{item:j})){f.element.val(j.value)}f.term=f.element.val();f.close(h);f.selectedItem=j},blur:function(h,g){if(f.menu.element.is(":visible")&&(f.element.val()!==f.term)){f.element.val(f.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(b.fn.bgiframe){this.menu.element.bgiframe()}},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(e,d){b.Widget.prototype._setOption.apply(this,arguments);if(e==="source"){this._initSource()}if(e==="appendTo"){this.menu.element.appendTo(b(d||"body",this.element[0].ownerDocument)[0])}if(e==="disabled"&&d&&this.xhr){this.xhr.abort()}},_initSource:function(){var e=this,f,d;if(b.isArray(this.options.source)){f=this.options.source;this.source=function(h,g){g(b.ui.autocomplete.filter(f,h.term))}}else{if(typeof this.options.source==="string"){d=this.options.source;this.source=function(h,g){if(e.xhr){e.xhr.abort()}e.xhr=b.ajax({url:d,data:h,dataType:"json",autocompleteRequest:++a,success:function(j,i){if(this.autocompleteRequest===a){g(j)}},error:function(){if(this.autocompleteRequest===a){g([])}}})}}else{this.source=this.options.source}}},search:function(d,e){d=d!=null?d:this.element.val();this.term=this.element.val();if(d.length<this.options.minLength){return this.close(e)}clearTimeout(this.closing);if(this._trigger("search",e)===false){return}return this._search(d)},_search:function(d){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:d},this.response)},_response:function(d){if(!this.options.disabled&&d&&d.length){d=this._normalize(d);this._suggest(d);this._trigger("open")}else{this.close()}this.pending--;if(!this.pending){this.element.removeClass("ui-autocomplete-loading")}},close:function(d){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",d)}},_change:function(d){if(this.previous!==this.element.val()){this._trigger("change",d,{item:this.selectedItem})}},_normalize:function(d){if(d.length&&d[0].label&&d[0].value){return d}return b.map(d,function(e){if(typeof e==="string"){return{label:e,value:e}}return b.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(d){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,d);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(b.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next(new b.Event("mouseover"))}},_resizeMenu:function(){var d=this.menu.element;d.outerWidth(Math.max(d.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(f,d){var e=this;b.each(d,function(h,g){e._renderItem(f,g)})},_renderItem:function(e,d){return b("<li></li>").data("item.autocomplete",d).append(b("<a></a>").text(d.label)).appendTo(e)},_move:function(d,e){if(!this.menu.element.is(":visible")){this.search(null,e);return}if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate();return}this.menu[d](e)},widget:function(){return this.menu.element}});b.extend(b.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(f,e){var d=new RegExp(b.ui.autocomplete.escapeRegex(e),"i");return b.grep(f,function(g){return d.test(g.label||g.value||g)})}})}(jQuery));(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length){return}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var c=this;var b=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");b.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(d){c.activate(d,a(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var d=f.offset().top-this.element.offset().top,e=this.element.scrollTop(),b=this.element.height();if(d<0){this.element.scrollTop(e+d)}else{if(d>=b){this.element.scrollTop(e+d-b+f.height())}}}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,b,d){if(!this.active){this.activate(d,this.element.children(b));return}var e=this.active[c+"All"](".ui-menu-item").eq(0);if(e.length){this.activate(d,e)}else{this.activate(d,this.element.children(b))}},nextPage:function(e){if(this.hasScroll()){if(!this.active||this.last()){this.activate(e,this.element.children(".ui-menu-item:first"));return}var b=this.active.offset().top,d=this.element.height(),c=this.element.children(".ui-menu-item").filter(function(){var f=a(this).offset().top-b-d+a(this).height();return f<10&&f>-10});if(!c.length){c=this.element.children(".ui-menu-item:last")}this.activate(e,c)}else{this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(d){if(this.hasScroll()){if(!this.active||this.first()){this.activate(d,this.element.children(".ui-menu-item:last"));return}var b=this.active.offset().top,c=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-b+c-a(this).height();return e<10&&e>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(d,result)}else{this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})}(jQuery));(function(c,b){var a,f,g,h,j="ui-button ui-widget ui-state-default ui-corner-all",e="ui-state-hover ui-state-active ",k="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",d=function(){var l=c(this).find(":ui-button");setTimeout(function(){l.button("refresh")},1)},i=function(o){var l=o.name,n=o.form,m=c([]);if(l){if(n){m=c(n).find("[name='"+l+"']")}else{m=c("[name='"+l+"']",o.ownerDocument).filter(function(){return !this.form})}}return m};c.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",d);if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.propAttr("disabled")}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var o=this,p=this.options,l=this.type==="checkbox"||this.type==="radio",n="ui-state-hover"+(!l?" ui-state-active":""),m="ui-state-focus";if(p.label===null){p.label=this.buttonElement.html()}if(this.element.is(":disabled")){p.disabled=true}this.buttonElement.addClass(j).attr("role","button").bind("mouseenter.button",function(){if(p.disabled){return}c(this).addClass("ui-state-hover");if(this===a){c(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(p.disabled){return}c(this).removeClass(n)}).bind("click.button",function(q){if(p.disabled){q.preventDefault();q.stopImmediatePropagation()}});this.element.bind("focus.button",function(){o.buttonElement.addClass(m)}).bind("blur.button",function(){o.buttonElement.removeClass(m)});if(l){this.element.bind("change.button",function(){if(h){return}o.refresh()});this.buttonElement.bind("mousedown.button",function(q){if(p.disabled){return}h=false;f=q.pageX;g=q.pageY}).bind("mouseup.button",function(q){if(p.disabled){return}if(f!==q.pageX||g!==q.pageY){h=true}})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(p.disabled||h){return false}c(this).toggleClass("ui-state-active");o.buttonElement.attr("aria-pressed",o.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(p.disabled||h){return false}c(this).addClass("ui-state-active");o.buttonElement.attr("aria-pressed","true");var q=o.element[0];i(q).not(q).map(function(){return c(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")})}else{this.buttonElement.bind("mousedown.button",function(){if(p.disabled){return false}c(this).addClass("ui-state-active");a=this;c(document).one("mouseup",function(){a=null})}).bind("mouseup.button",function(){if(p.disabled){return false}c(this).removeClass("ui-state-active")}).bind("keydown.button",function(q){if(p.disabled){return false}if(q.keyCode==c.ui.keyCode.SPACE||q.keyCode==c.ui.keyCode.ENTER){c(this).addClass("ui-state-active")}}).bind("keyup.button",function(){c(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(q){if(q.keyCode===c.ui.keyCode.SPACE){c(this).click()}})}}}this._setOption("disabled",p.disabled);this._resetButton()},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){var n=this.element.parents().filter(":last"),m="label[for='"+this.element.attr("id")+"']";this.buttonElement=n.find(m);if(!this.buttonElement.length){n=n.length?n.siblings():this.element.siblings();this.buttonElement=n.filter(m);if(!this.buttonElement.length){this.buttonElement=n.find(m)}}this.element.addClass("ui-helper-hidden-accessible");var l=this.element.is(":checked");if(l){this.buttonElement.addClass("ui-state-active")}this.buttonElement.attr("aria-pressed",l)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(j+" "+e+" "+k).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}c.Widget.prototype.destroy.call(this)},_setOption:function(m,l){c.Widget.prototype._setOption.apply(this,arguments);if(m==="disabled"){if(l){this.element.propAttr("disabled",true)}else{this.element.propAttr("disabled",false)}return}this._resetButton()},refresh:function(){var l=this.element.is(":disabled");if(l!==this.options.disabled){this._setOption("disabled",l)}if(this.type==="radio"){i(this.element[0]).each(function(){if(c(this).is(":checked")){c(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true")}else{c(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true")}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var p=this.buttonElement.removeClass(k),o=c("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(p.empty()).text(),n=this.options.icons,m=n.primary&&n.secondary,l=[];if(n.primary||n.secondary){if(this.options.text){l.push("ui-button-text-icon"+(m?"s":(n.primary?"-primary":"-secondary")))}if(n.primary){p.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>")}if(n.secondary){p.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>")}if(!this.options.text){l.push(m?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){p.attr("title",o)}}}else{l.push("ui-button-text-only")}p.addClass(l.join(" "))}});c.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(m,l){if(m==="disabled"){this.buttons.button("option",m,l)}c.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var l=this.element.css("direction")==="ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(l?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(l?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");c.Widget.prototype.destroy.call(this)}})}(jQuery));(function(d,f){var e="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},b={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},c=d.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};d.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(h){var g=d(this).css(h).offset().top;if(g<0){d(this).css("top",h.top-g)}}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var o=this,g=o.options,i=g.title||"&#160;",l=d.ui.dialog.getTitleId(o.element),n=(o.uiDialog=d("<div></div>")).appendTo(document.body).hide().addClass(e+g.dialogClass).css({zIndex:g.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(q){if(g.closeOnEscape&&!q.isDefaultPrevented()&&q.keyCode&&q.keyCode===d.ui.keyCode.ESCAPE){o.close(q);q.preventDefault()}}).attr({role:"dialog","aria-labelledby":l}).mousedown(function(q){o.moveToTop(false,q)}),m=o.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(n),j=(o.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(n),k=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){k.addClass("ui-state-hover")},function(){k.removeClass("ui-state-hover")}).focus(function(){k.addClass("ui-state-focus")}).blur(function(){k.removeClass("ui-state-focus")}).click(function(q){o.close(q);return false}).appendTo(j),p=(o.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(g.closeText).appendTo(k),h=d("<span></span>").addClass("ui-dialog-title").attr("id",l).html(i).prependTo(j);if(d.isFunction(g.beforeclose)&&!d.isFunction(g.beforeClose)){g.beforeClose=g.beforeclose}j.find("*").add(j).disableSelection();if(g.draggable&&d.fn.draggable){o._makeDraggable()}if(g.resizable&&d.fn.resizable){o._makeResizable()}o._createButtons(g.buttons);o._isOpen=false;if(d.fn.bgiframe){n.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var g=this;if(g.overlay){g.overlay.destroy()}g.uiDialog.hide();g.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");g.uiDialog.remove();if(g.originalTitle){g.element.attr("title",g.originalTitle)}return g},widget:function(){return this.uiDialog},close:function(h){var i=this,j,g;if(false===i._trigger("beforeClose",h)){return}if(i.overlay){i.overlay.destroy()}i.uiDialog.unbind("keypress.ui-dialog");i._isOpen=false;if(i.options.hide){i.uiDialog.hide(i.options.hide,function(){i._trigger("close",h)})}else{i.uiDialog.hide();i._trigger("close",h)}d.ui.dialog.overlay.resize();if(i.options.modal){j=0;d(".ui-dialog").each(function(){if(this!==i.uiDialog[0]){g=d(this).css("z-index");if(!isNaN(g)){j=Math.max(j,g)}}});d.ui.dialog.maxZ=j}return i},isOpen:function(){return this._isOpen},moveToTop:function(j,h){var i=this,k=i.options,g;if((k.modal&&!j)||(!k.stack&&!k.modal)){return i._trigger("focus",h)}if(k.zIndex>d.ui.dialog.maxZ){d.ui.dialog.maxZ=k.zIndex}if(i.overlay){d.ui.dialog.maxZ+=1;i.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ)}g={scrollTop:i.element.scrollTop(),scrollLeft:i.element.scrollLeft()};d.ui.dialog.maxZ+=1;i.uiDialog.css("z-index",d.ui.dialog.maxZ);i.element.attr(g);i._trigger("focus",h);return i},open:function(){if(this._isOpen){return}var h=this,i=h.options,g=h.uiDialog;h.overlay=i.modal?new d.ui.dialog.overlay(h):null;h._size();h._position(i.position);g.show(i.show);h.moveToTop(true);if(i.modal){g.bind("keypress.ui-dialog",function(l){if(l.keyCode!==d.ui.keyCode.TAB){return}var j=d(":tabbable",this),k=j.filter(":first"),m=j.filter(":last");if(l.target===m[0]&&!l.shiftKey){k.focus(1);return false}else{if(l.target===k[0]&&l.shiftKey){m.focus(1);return false}}})}d(h.element.find(":tabbable").get().concat(g.find(".ui-dialog-buttonpane :tabbable").get().concat(g.get()))).eq(0).focus();h._isOpen=true;h._trigger("open");return h},_createButtons:function(h){var i=this,k=false,g=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),j=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(g);i.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof h==="object"&&h!==null){d.each(h,function(){return !(k=true)})}if(k){d.each(h,function(m,l){l=d.isFunction(l)?{click:l,text:m}:l;var n=d('<button type="button"></button>').click(function(){l.click.apply(i.element[0],arguments)}).appendTo(j);d.each(l,function(p,o){if(p==="click"){return}if(p in c){n[p](o)}else{n.attr(p,o)}});if(d.fn.button){n.button()}});g.appendTo(i.uiDialog)}},_makeDraggable:function(){var i=this,j=i.options,g=d(document),k;function h(l){return{position:l.position,offset:l.offset}}i.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(m,l){k=j.height==="auto"?"auto":d(this).height();d(this).height(d(this).height()).addClass("ui-dialog-dragging");i._trigger("dragStart",m,h(l))},drag:function(m,l){i._trigger("drag",m,h(l))},stop:function(m,l){j.position=[l.position.left-g.scrollLeft(),l.position.top-g.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(k);i._trigger("dragStop",m,h(l));d.ui.dialog.overlay.resize()}})},_makeResizable:function(h){h=(h===f?this.options.resizable:h);var j=this,k=j.options,l=j.uiDialog.css("position"),i=(typeof h==="string"?h:"n,e,s,w,se,sw,ne,nw");function g(m){return{originalPosition:m.originalPosition,originalSize:m.originalSize,position:m.position,size:m.size}}j.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:j.element,maxWidth:k.maxWidth,maxHeight:k.maxHeight,minWidth:k.minWidth,minHeight:j._minHeight(),handles:i,start:function(n,m){d(this).addClass("ui-dialog-resizing");j._trigger("resizeStart",n,g(m))},resize:function(n,m){j._trigger("resize",n,g(m))},stop:function(n,m){d(this).removeClass("ui-dialog-resizing");k.height=d(this).height();k.width=d(this).width();j._trigger("resizeStop",n,g(m));d.ui.dialog.overlay.resize()}}).css("position",l).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var g=this.options;if(g.height==="auto"){return g.minHeight}else{return Math.min(g.minHeight,g.height)}},_position:function(j){var h=[],i=[0,0],g;if(j){if(typeof j==="string"||(typeof j==="object"&&"0" in j)){h=j.split?j.split(" "):[j[0],j[1]];if(h.length===1){h[1]=h[0]}d.each(["left","top"],function(k,l){if(+h[k]===h[k]){i[k]=h[k];h[k]=l}});j={my:h.join(" "),at:h.join(" "),offset:i.join(" ")}}j=d.extend({},d.ui.dialog.prototype.options.position,j)}else{j=d.ui.dialog.prototype.options.position}g=this.uiDialog.is(":visible");if(!g){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position(d.extend({of:window},j));if(!g){this.uiDialog.hide()}},_setOptions:function(j){var i=this,h={},g=false;d.each(j,function(l,k){i._setOption(l,k);if(l in a){g=true}if(l in b){h[l]=k}});if(g){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",h)}},_setOption:function(i,h){var k=this,j=k.uiDialog;switch(i){case"beforeclose":i="beforeClose";break;case"buttons":k._createButtons(h);break;case"closeText":k.uiDialogTitlebarCloseText.text(""+h);break;case"dialogClass":j.removeClass(k.options.dialogClass).addClass(e+h);break;case"disabled":if(h){j.addClass("ui-dialog-disabled")}else{j.removeClass("ui-dialog-disabled")}break;case"draggable":var l=j.is(":data(draggable)");if(l&&!h){j.draggable("destroy")}if(!l&&h){k._makeDraggable()}break;case"position":k._position(h);break;case"resizable":var g=j.is(":data(resizable)");if(g&&!h){j.resizable("destroy")}if(g&&typeof h==="string"){j.resizable("option","handles",h)}if(!g&&h!==false){k._makeResizable(h)}break;case"title":d(".ui-dialog-title",k.uiDialogTitlebar).html(""+(h||"&#160;"));break}d.Widget.prototype._setOption.apply(k,arguments)},_size:function(){var j=this.options,k,i,g=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(j.minWidth>j.width){j.width=j.minWidth}k=this.uiDialog.css({height:"auto",width:j.width}).height();i=Math.max(0,j.minHeight-k);if(j.height==="auto"){if(d.support.minHeight){this.element.css({minHeight:i,height:"auto"})}else{this.uiDialog.show();var h=this.element.css("height","auto").height();if(!g){this.uiDialog.hide()}this.element.height(Math.max(h,i))}}else{this.element.height(Math.max(j.height-k,0))}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});d.extend(d.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(g){var h=g.attr("id");if(!h){this.uuid+=1;h=this.uuid}return"ui-dialog-title-"+h},overlay:function(g){this.$el=d.ui.dialog.overlay.create(g)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(g){return g+".dialog-overlay"}).join(" "),create:function(h){if(this.instances.length===0){setTimeout(function(){if(d.ui.dialog.overlay.instances.length){d(document).bind(d.ui.dialog.overlay.events,function(i){if(d(i.target).zIndex()<d.ui.dialog.overlay.maxZ){return false}})}},1);d(document).bind("keydown.dialog-overlay",function(i){if(h.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===d.ui.keyCode.ESCAPE){h.close(i);i.preventDefault()}});d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize)}var g=(this.oldInstances.pop()||d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(d.fn.bgiframe){g.bgiframe()}this.instances.push(g);return g},destroy:function(g){var h=d.inArray(g,this.instances);if(h!=-1){this.oldInstances.push(this.instances.splice(h,1)[0])}if(this.instances.length===0){d([document,window]).unbind(".dialog-overlay")}g.remove();var i=0;d.each(this.instances,function(){i=Math.max(i,this.css("z-index"))});this.maxZ=i},height:function(){var g,h;if(d.browser.msie&&d.browser.version<7){g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);h=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(g<h){return d(window).height()+"px"}else{return g+"px"}}else{return d(document).height()+"px"}},width:function(){var h,g;if(d.browser.msie){h=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);g=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(h<g){return d(window).width()+"px"}else{return h+"px"}}else{return d(document).width()+"px"}},resize:function(){var g=d([]);d.each(d.ui.dialog.overlay.instances,function(){g=g.add(this)});g.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)}})}(jQuery));(function(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var j=this,f=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),k="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",h=(f.values&&f.values.length)||1,d=[];this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(f.disabled?" ui-slider-disabled ui-disabled":""));this.range=b([]);if(f.range){if(f.range===true){if(!f.values){f.values=[this._valueMin(),this._valueMin()]}if(f.values.length&&f.values.length!==2){f.values=[f.values[0],f.values[0]]}}this.range=b("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+((f.range==="min"||f.range==="max")?" ui-slider-range-"+f.range:""))}for(var g=e.length;g<h;g+=1){d.push(k)}this.handles=e.add(b(d.join("")).appendTo(j.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(i){i.preventDefault()}).hover(function(){if(!f.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!f.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(l){b(this).data("index.ui-slider-handle",l)});this.handles.keydown(function(n){var q=true,p=b(this).data("index.ui-slider-handle"),l,i,m,o;if(j.options.disabled){return}switch(n.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:q=false;if(!j._keySliding){j._keySliding=true;b(this).addClass("ui-state-active");l=j._start(n,p);if(l===false){return}}break}o=j.options.step;if(j.options.values&&j.options.values.length){i=m=j.values(p)}else{i=m=j.value()}switch(n.keyCode){case b.ui.keyCode.HOME:m=j._valueMin();break;case b.ui.keyCode.END:m=j._valueMax();break;case b.ui.keyCode.PAGE_UP:m=j._trimAlignValue(i+((j._valueMax()-j._valueMin())/a));break;case b.ui.keyCode.PAGE_DOWN:m=j._trimAlignValue(i-((j._valueMax()-j._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(i===j._valueMax()){return}m=j._trimAlignValue(i+o);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(i===j._valueMin()){return}m=j._trimAlignValue(i-o);break}j._slide(n,p,m);return q}).keyup(function(i){var l=b(this).data("index.ui-slider-handle");if(j._keySliding){j._keySliding=false;j._stop(i,l);j._change(i,l);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(h){var g=this.options,f,k,i,d,m,j,n,e,l;if(g.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();f={x:h.pageX,y:h.pageY};k=this._normValueFromMouse(f);i=this._valueMax()-this._valueMin()+1;m=this;this.handles.each(function(p){var o=Math.abs(k-m.values(p));if(i>o){i=o;d=b(this);j=p}});if(g.range===true&&this.values(1)===g.min){j+=1;d=b(this.handles[j])}n=this._start(h,j);if(n===false){return false}this._mouseSliding=true;m._handleIndex=j;d.addClass("ui-state-active").focus();e=d.offset();l=!b(h.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=l?{left:0,top:0}:{left:h.pageX-e.left-(d.width()/2),top:h.pageY-e.top-(d.height()/2)-(parseInt(d.css("borderTopWidth"),10)||0)-(parseInt(d.css("borderBottomWidth"),10)||0)+(parseInt(d.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(h,j,k)}this._animateOff=true;return true},_mouseStart:function(d){return true},_mouseDrag:function(e){var f={x:e.pageX,y:e.pageY},d=this._normValueFromMouse(f);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(i){var d,e,h,f,g;if(this.orientation==="horizontal"){d=this.elementSize.width;e=i.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;e=i.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}h=(e/d);if(h>1){h=1}if(h<0){h=0}if(this.orientation==="vertical"){h=1-h}f=this._valueMax()-this._valueMin();g=this._valueMin()+h*f;return this._trimAlignValue(g)},_start:function(e,f){var d={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(f);d.values=this.values()}return this._trigger("start",e,d)},_slide:function(g,i,f){var d,h,e;if(this.options.values&&this.options.values.length){d=this.values(i?0:1);if((this.options.values.length===2&&this.options.range===true)&&((i===0&&f>d)||(i===1&&f<d))){f=d}if(f!==this.values(i)){h=this.values();h[i]=f;e=this._trigger("slide",g,{handle:this.handles[i],value:f,values:h});d=this.values(i?0:1);if(e!==false){this.values(i,f,true)}}}else{if(f!==this.value()){e=this._trigger("slide",g,{handle:this.handles[i],value:f});if(e!==false){this.value(f)}}}},_stop:function(e,f){var d={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(f);d.values=this.values()}this._trigger("stop",e,d)},_change:function(e,f){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(f);d.values=this.values()}this._trigger("change",e,d)}},value:function(d){if(arguments.length){this.options.value=this._trimAlignValue(d);this._refreshValue();this._change(null,0);return}return this._value()},values:function(g,f){var h,d,e;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(f);this._refreshValue();this._change(null,g);return}if(arguments.length){if(b.isArray(arguments[0])){h=this.options.values;d=arguments[0];for(e=0;e<h.length;e+=1){h[e]=this._trimAlignValue(d[e]);this._change(null,e)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(g)}else{return this.value()}}}else{return this._values()}},_setOption:function(e,d){var g,f=0;if(b.isArray(this.options.values)){f=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(e){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(g=0;g<f;g+=1){this._change(null,g)}this._animateOff=false;break}},_value:function(){var d=this.options.value;d=this._trimAlignValue(d);return d},_values:function(f){var d,g,e;if(arguments.length){d=this.options.values[f];d=this._trimAlignValue(d);return d}else{g=this.options.values.slice();for(e=0;e<g.length;e+=1){g[e]=this._trimAlignValue(g[e])}return g}},_trimAlignValue:function(f){if(f<=this._valueMin()){return this._valueMin()}if(f>=this._valueMax()){return this._valueMax()}var d=(this.options.step>0)?this.options.step:1,e=(f-this._valueMin())%d,g=f-e;if(Math.abs(e)*2>=d){g+=(e>0)?d:(-d)}return parseFloat(g.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var m=this.options.range,e=this.options,l=this,g=(!this._animateOff)?e.animate:false,k,f={},h,j,i,d;if(this.options.values&&this.options.values.length){this.handles.each(function(n,o){k=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100;f[l.orientation==="horizontal"?"left":"bottom"]=k+"%";b(this).stop(1,1)[g?"animate":"css"](f,e.animate);if(l.options.range===true){if(l.orientation==="horizontal"){if(n===0){l.range.stop(1,1)[g?"animate":"css"]({left:k+"%"},e.animate)}if(n===1){l.range[g?"animate":"css"]({width:(k-h)+"%"},{queue:false,duration:e.animate})}}else{if(n===0){l.range.stop(1,1)[g?"animate":"css"]({bottom:(k)+"%"},e.animate)}if(n===1){l.range[g?"animate":"css"]({height:(k-h)+"%"},{queue:false,duration:e.animate})}}}h=k})}else{j=this.value();i=this._valueMin();d=this._valueMax();k=(d!==i)?(j-i)/(d-i)*100:0;f[l.orientation==="horizontal"?"left":"bottom"]=k+"%";this.handle.stop(1,1)[g?"animate":"css"](f,e.animate);if(m==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[g?"animate":"css"]({width:k+"%"},e.animate)}if(m==="max"&&this.orientation==="horizontal"){this.range[g?"animate":"css"]({width:(100-k)+"%"},{queue:false,duration:e.animate})}if(m==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[g?"animate":"css"]({height:k+"%"},e.animate)}if(m==="max"&&this.orientation==="vertical"){this.range[g?"animate":"css"]({height:(100-k)+"%"},{queue:false,duration:e.animate})}}}});b.extend(b.ui.slider,{version:"1.8.16"})}(jQuery));(function(c,e){var d=0,f=0;function b(){return ++d}function a(){return ++f}c.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(h,g){if(h=="selected"){if(this.options.collapsible&&g==this.options.selected){return}this.select(g)}else{this.options[h]=g;this._tabify()}},_tabId:function(g){return g.title&&g.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+b()},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a());return c.cookie.apply(null,[g].concat(c.makeArray(arguments)))},_ui:function(h,g){return{tab:h,panel:g,index:this.anchors.index(h)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g=c(this);g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(k){var u=this,l=this.options,q=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=c(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);this.anchors.each(function(z,x){var A=c(x).attr("href");var C=A.split("#")[0],y;if(C&&(C===location.toString().split("#")[0]||(y=c("base")[0])&&C===y.href)){A=x.hash;x.href=A}if(q.test(A)){u.panels=u.panels.add(u.element.find(u._sanitizeSelector(A)))}else{if(A&&A!=="#"){c.data(x,"href.tabs",A);c.data(x,"load.tabs",A.replace(/#.*$/,""));var o=u._tabId(x);x.href="#"+o;var B=u.element.find("#"+o);if(!B.length){B=c(l.panelTemplate).attr("id",o).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(u.panels[z-1]||u.list);B.data("destroy.tabs",true)}u.panels=u.panels.add(B)}else{l.disabled.push(z)}}});if(k){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(l.selected===e){if(location.hash){this.anchors.each(function(x,o){if(o.hash==location.hash){l.selected=x;return false}})}if(typeof l.selected!=="number"&&l.cookie){l.selected=parseInt(u._cookie(),10)}if(typeof l.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}l.selected=l.selected||(this.lis.length?0:-1)}else{if(l.selected===null){l.selected=-1}}l.selected=((l.selected>=0&&this.anchors[l.selected])||l.selected<0)?l.selected:0;l.disabled=c.unique(l.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(o,x){return u.lis.index(o)}))).sort();if(c.inArray(l.selected,l.disabled)!=-1){l.disabled.splice(c.inArray(l.selected,l.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(l.selected>=0&&this.anchors.length){u.element.find(u._sanitizeSelector(u.anchors[l.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(l.selected).addClass("ui-tabs-selected ui-state-active");u.element.queue("tabs",function(){u._trigger("show",null,u._ui(u.anchors[l.selected],u.element.find(u._sanitizeSelector(u.anchors[l.selected].hash))[0]))});this.load(l.selected)}c(window).bind("unload",function(){u.lis.add(u.anchors).unbind(".tabs");u.lis=u.anchors=u.panels=null})}else{l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[l.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(l.cookie){this._cookie(l.selected,l.cookie)}for(var g=0,h;(h=this.lis[g]);g++){c(h)[c.inArray(g,l.disabled)!=-1&&!c(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(l.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(l.event!=="mouseover"){var s=function(i,o){if(o.is(":not(.ui-state-disabled)")){o.addClass("ui-state-"+i)}};var m=function(i,o){o.removeClass("ui-state-"+i)};this.lis.bind("mouseover.tabs",function(){s("hover",c(this))});this.lis.bind("mouseout.tabs",function(){m("hover",c(this))});this.anchors.bind("focus.tabs",function(){s("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){m("focus",c(this).closest("li"))})}var w,n;if(l.fx){if(c.isArray(l.fx)){w=l.fx[0];n=l.fx[1]}else{w=n=l.fx}}function p(o,i){o.css("display","");if(!c.support.opacity&&i.opacity){o[0].style.removeAttribute("filter")}}var j=n?function(o,i){c(o).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(n,n.duration||"normal",function(){p(i,n);u._trigger("show",null,u._ui(o,i[0]))})}:function(o,i){c(o).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");u._trigger("show",null,u._ui(o,i[0]))};var r=w?function(o,i){i.animate(w,w.duration||"normal",function(){u.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");p(i,w);u.element.dequeue("tabs")})}:function(x,o,i){u.lis.removeClass("ui-tabs-selected ui-state-active");o.addClass("ui-tabs-hide");u.element.dequeue("tabs")};this.anchors.bind(l.event+".tabs",function(){var x=this,i=c(x).closest("li"),o=u.panels.filter(":not(.ui-tabs-hide)"),y=u.element.find(u._sanitizeSelector(x.hash));if((i.hasClass("ui-tabs-selected")&&!l.collapsible)||i.hasClass("ui-state-disabled")||i.hasClass("ui-state-processing")||u.panels.filter(":animated").length||u._trigger("select",null,u._ui(this,y[0]))===false){this.blur();return false}l.selected=u.anchors.index(this);u.abort();if(l.collapsible){if(i.hasClass("ui-tabs-selected")){l.selected=-1;if(l.cookie){u._cookie(l.selected,l.cookie)}u.element.queue("tabs",function(){r(x,o)}).dequeue("tabs");this.blur();return false}else{if(!o.length){if(l.cookie){u._cookie(l.selected,l.cookie)}u.element.queue("tabs",function(){j(x,y)});u.load(u.anchors.index(this));this.blur();return false}}}if(l.cookie){u._cookie(l.selected,l.cookie)}if(y.length){if(o.length){u.element.queue("tabs",function(){r(x,o)})}u.element.queue("tabs",function(){j(x,y)});u.load(u.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(c.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(g){if(typeof g=="string"){g=this.anchors.index(this.anchors.filter("[href$="+g+"]"))}return g},destroy:function(){var g=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h=c.data(this,"href.tabs");if(h){this.href=h}var i=c(this).unbind(".tabs");c.each(["href","load","cache"],function(k,j){i.removeData(j+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(c.data(this,"destroy.tabs")){c(this).remove()}else{c(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(g.cookie){this._cookie(null,g.cookie)}return this},add:function(i,l,k){if(k===e){k=this.anchors.length}var n=this,h=this.options,m=c(h.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,l)),g=!i.indexOf("#")?i.replace("#",""):this._tabId(c("a",m)[0]);m.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=n.element.find("#"+g);if(!j.length){j=c(h.panelTemplate).attr("id",g).data("destroy.tabs",true)}j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(k>=this.lis.length){m.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{m.insertBefore(this.lis[k]);j.insertBefore(this.panels[k])}h.disabled=c.map(h.disabled,function(o,p){return o>=k?++o:o});this._tabify();if(this.anchors.length==1){h.selected=0;m.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[0],n.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[k],this.panels[k]));return this},remove:function(j){j=this._getIndex(j);var h=this.options,g=this.lis.eq(j).remove(),i=this.panels.eq(j).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(j+(j+1<this.anchors.length?1:-1))}h.disabled=c.map(c.grep(h.disabled,function(k,l){return k!=j}),function(k,l){return k>=j?--k:k});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],i[0]));return this},enable:function(h){h=this._getIndex(h);var g=this.options;if(c.inArray(h,g.disabled)==-1){return}this.lis.eq(h).removeClass("ui-state-disabled");g.disabled=c.grep(g.disabled,function(j,k){return j!=h});this._trigger("enable",null,this._ui(this.anchors[h],this.panels[h]));return this},disable:function(i){i=this._getIndex(i);var h=this,g=this.options;if(i!=g.selected){this.lis.eq(i).addClass("ui-state-disabled");g.disabled.push(i);g.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[i],this.panels[i]))}return this},select:function(g){g=this._getIndex(g);if(g==-1){if(this.options.collapsible&&this.options.selected!=-1){g=this.options.selected}else{return this}}this.anchors.eq(g).trigger(this.options.event+".tabs");return this},load:function(l){l=this._getIndex(l);var k=this,h=this.options,i=this.anchors.eq(l)[0],j=c.data(i,"load.tabs");this.abort();if(!j||this.element.queue("tabs").length!==0&&c.data(i,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(l).addClass("ui-state-processing");if(h.spinner){var g=c("span",i);g.data("label.tabs",g.html()).html(h.spinner)}this.xhr=c.ajax(c.extend({},h.ajaxOptions,{url:j,success:function(m,n){k.element.find(k._sanitizeSelector(i.hash)).html(m);k._cleanup();if(h.cache){c.data(i,"cache.tabs",true)}k._trigger("load",null,k._ui(k.anchors[l],k.panels[l]));try{h.ajaxOptions.success(m,n)}catch(o){}},error:function(o,m,n){k._cleanup();k._trigger("load",null,k._ui(k.anchors[l],k.panels[l]));try{h.ajaxOptions.error(o,m,l,i)}catch(n){}}}));k.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(h,g){this.anchors.eq(h).removeData("cache.tabs").data("load.tabs",g);return this},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.8.16"});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(h,i){var j=this,l=this.options;var k=j._rotate||(j._rotate=function(m){clearTimeout(j.rotation);j.rotation=setTimeout(function(){var n=l.selected;j.select(++n<j.anchors.length?n:0)},h);if(m){m.stopPropagation()}});var g=j._unrotate||(j._unrotate=!i?function(m){if(m.clientX){j.rotate(null)}}:function(m){t=l.selected;k()});if(h){this.element.bind("tabsshow",k);this.anchors.bind(l.event+".tabs",g);k()}else{clearTimeout(j.rotation);this.element.unbind("tabsshow",k);this.anchors.unbind(l.event+".tabs",g);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function($,undefined){$.extend($.ui,{datepicker:{version:"1.8.16"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();var instActive;function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst);if(inst.settings.disabled){this._disableDatepicker(target)}},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target)}inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()}var date=this._getDateDatepicker(target,true);var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");extendRemove(inst.settings,settings);if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){inst.settings.minDate=this._formatDate(inst,minDate)}if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){inst.settings.maxDate=this._formatDate(inst,maxDate)}this._attachments($(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}var onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){var dateStr=$.datepicker._formatDate(inst);onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){if($.datepicker._datepickerShowing){$.datepicker._triggerOnClose($.datepicker._curInst)}$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");var beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return}extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){var borders=$.datepicker._getBorders(inst.dpDiv);cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}};inst.dpDiv.zIndex($(input).zIndex()+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;self.maxRows=4;var borders=$.datepicker._getBorders(inst.dpDiv);instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}inst.dpDiv.find("."+this._dayOverClass+" a").mouseover();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&inst.input[0]!=document.activeElement){inst.input.focus()}if(inst.yearshtml){var origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_triggerOnClose:function(inst){var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}$.datepicker._triggerOnClose(inst);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){var isDoubled=lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"&&isDoubled?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return -(a[1].length-b[1].length)});var index=-1;$.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()==name.toLowerCase()){index=pair[0];iValue+=name.length;return false}});if(index!=-1){return index+1}else{throw"Unknown name at position "+iValue}};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(iValue<value.length){throw"Extra/unparsed characters found in date: "+value.substring(iValue)}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};var newDate=(date==null||date===""?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));newDate=(newDate&&newDate.toString()=="Invalid Date"?defaultDate:newDate);if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0)}return this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date;var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;var newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";this.maxRows=4;for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var curRows=Math.ceil((leadDays+daysInMonth)/7);var numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" >";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" >";for(;year<=endYear;year++){inst.yearshtml+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}inst.yearshtml+="</select>";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var newDate=(minDate&&date<minDate?minDate:date);newDate=(maxDate&&newDate>maxDate?maxDate:newDate);return newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.bind("mouseout",function(event){var elem=$(event.target).closest(selector);if(!elem.length){return}elem.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(event){var elem=$(event.target).closest(selector);if($.datepicker._isDisabledDatepicker(instActive.inline?dpDiv.parent()[0]:instActive.input[0])||!elem.length){return}elem.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");elem.addClass("ui-state-hover");if(elem.hasClass("ui-datepicker-prev")){elem.addClass("ui-datepicker-prev-hover")}if(elem.hasClass("ui-datepicker-next")){elem.addClass("ui-datepicker-next-hover")}})}function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!this.length){return this}if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.16";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===b){return this._value()}this._setOption("value",c);return this},_setOption:function(d,c){if(d==="value"){this.options.value=c;this._refreshValue();if(this._value()===this.options.max){this._trigger("complete")}}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number"){c=0}return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var c=this.value();var d=this._percentage();if(this.oldValue!==c){this.oldValue=c;this._trigger("change")}this.valueDiv.toggle(c>this.min).toggleClass("ui-corner-right",c===this.options.max).width(d.toFixed(0)+"%");this.element.attr("aria-valuenow",c)}});a.extend(a.ui.progressbar,{version:"1.8.16"})})(jQuery);jQuery.effects||(function(d,b){d.effects={};d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(m,n){d.fx.step[n]=function(o){if(!o.colorInit){o.start=l(o.elem,n);o.end=i(o.end);o.colorInit=true}o.elem.style[n]="rgb("+Math.max(Math.min(parseInt((o.pos*(o.end[0]-o.start[0]))+o.start[0],10),255),0)+","+Math.max(Math.min(parseInt((o.pos*(o.end[1]-o.start[1]))+o.start[1],10),255),0)+","+Math.max(Math.min(parseInt((o.pos*(o.end[2]-o.start[2]))+o.start[2],10),255),0)+")"}});function i(n){var m;if(n&&n.constructor==Array&&n.length==3){return n}if(m=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n)){return[parseInt(m[1],10),parseInt(m[2],10),parseInt(m[3],10)]}if(m=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n)){return[parseFloat(m[1])*2.55,parseFloat(m[2])*2.55,parseFloat(m[3])*2.55]}if(m=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n)){return[parseInt(m[1],16),parseInt(m[2],16),parseInt(m[3],16)]}if(m=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n)){return[parseInt(m[1]+m[1],16),parseInt(m[2]+m[2],16),parseInt(m[3]+m[3],16)]}if(m=/rgba\(0, 0, 0, 0\)/.exec(n)){return f.transparent}return f[d.trim(n).toLowerCase()]}function l(m,o){var n;do{n=d.curCSS(m,o);if(n!=""&&n!="transparent"||d.nodeName(m,"body")){break}o="backgroundColor"}while(m=m.parentNode);return i(n)}var f={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var c=["add","remove","toggle"],k={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function g(){var o=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,q={},n,m;if(o&&o.length&&o[0]&&o[o[0]]){var p=o.length;while(p--){n=o[p];if(typeof o[n]=="string"){m=n.replace(/\-(\w)/g,function(s,r){return r.toUpperCase()});q[m]=o[n]}}}else{for(n in o){if(typeof o[n]==="string"){q[n]=o[n]}}}return q}function h(n){var m,o;for(m in n){o=n[m];if(o==null||d.isFunction(o)||m in k||(/scrollbar/).test(m)||(!(/color/i).test(m)&&isNaN(parseFloat(o)))){delete n[m]}}return n}function j(n,p){var o={_:0},m;for(m in p){if(n[m]!=p[m]){o[m]=p[m]}}return o}d.effects.animateClass=function(n,o,m,p){if(d.isFunction(m)){p=m;m=null}return this.queue(function(){var r=d(this),q=r.attr("style")||" ",u=h(g.call(this)),w,s=r.attr("class");d.each(c,function(y,x){if(n[x]){r[x+"Class"](n[x])}});w=h(g.call(this));r.attr("class",s);r.animate(j(u,w),{queue:false,duration:o,easing:m,complete:function(){d.each(c,function(y,x){if(n[x]){r[x+"Class"](n[x])}});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=q}else{r.attr("style",q)}if(p){p.apply(this,arguments)}d.dequeue(this)}})})};d.fn.extend({_addClass:d.fn.addClass,addClass:function(o,n,m,p){return n?d.effects.animateClass.apply(this,[{add:o},n,m,p]):this._addClass(o)},_removeClass:d.fn.removeClass,removeClass:function(o,n,m,p){return n?d.effects.animateClass.apply(this,[{remove:o},n,m,p]):this._removeClass(o)},_toggleClass:d.fn.toggleClass,toggleClass:function(p,o,n,m,q){if(typeof o=="boolean"||o===b){if(!n){return this._toggleClass(p,o)}else{return d.effects.animateClass.apply(this,[(o?{add:p}:{remove:p}),n,m,q])}}else{return d.effects.animateClass.apply(this,[{toggle:p},o,n,m])}},switchClass:function(p,n,o,m,q){return d.effects.animateClass.apply(this,[{add:n,remove:p},o,m,q])}});d.extend(d.effects,{version:"1.8.16",save:function(o,m){for(var n=0;n<m.length;n++){if(m[n]!==null){o.data("ec.storage."+m[n],o[0].style[m[n]])}}},restore:function(o,m){for(var n=0;n<m.length;n++){if(m[n]!==null){o.css(m[n],o.data("ec.storage."+m[n]))}}},setMode:function(m,n){if(n=="toggle"){n=m.is(":hidden")?"show":"hide"}return n},getBaseline:function(p,m){var o,n;switch(p[0]){case"top":o=0;break;case"middle":o=0.5;break;case"bottom":o=1;break;default:o=p[0]/m.height}switch(p[1]){case"left":n=0;break;case"center":n=0.5;break;case"right":n=1;break;default:n=p[1]/m.width}return{x:n,y:o}},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper")){return n.parent()}var m={width:n.outerWidth(true),height:n.outerHeight(true),"float":n.css("float")},p=d("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o=document.activeElement;n.wrap(p);if(n[0]===o||d.contains(n[0],o)){d(o).focus()}p=n.parent();if(n.css("position")=="static"){p.css({position:"relative"});n.css({position:"relative"})}else{d.extend(m,{position:n.css("position"),zIndex:n.css("z-index")});d.each(["top","left","bottom","right"],function(r,q){m[q]=n.css(q);if(isNaN(parseInt(m[q],10))){m[q]="auto"}});n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return p.css(m).show()},removeWrapper:function(n){var m,o=document.activeElement;if(n.parent().is(".ui-effects-wrapper")){m=n.parent().replaceWith(n);if(n[0]===o||d.contains(n[0],o)){d(o).focus()}return m}return n},setTransition:function(o,n,p,m){m=m||{};d.each(n,function(r,q){unit=o.cssUnit(q);if(unit[0]>0){m[q]=unit[0]*p+unit[1]}});return m}});function a(p,o,n,m){if(typeof p=="object"){m=o;n=null;o=p;p=o.effect}if(d.isFunction(o)){m=o;n=null;o={}}if(typeof o=="number"||d.fx.speeds[o]){m=n;n=o;o={}}if(d.isFunction(n)){m=n;n=null}o=o||{};n=n||o.duration;n=d.fx.off?0:typeof n=="number"?n:n in d.fx.speeds?d.fx.speeds[n]:d.fx.speeds._default;m=m||o.complete;return[p,o,n,m]}function e(m){if(!m||typeof m==="number"||d.fx.speeds[m]){return true}if(typeof m==="string"&&!d.effects[m]){return true}return false}d.fn.extend({effect:function(n,o,p,u){var r=a.apply(this,arguments),q={options:r[1],duration:r[2],callback:r[3]},m=q.options.mode,s=d.effects[n];if(d.fx.off||!s){if(m){return this[m](q.duration,q.callback)}else{return this.each(function(){if(q.callback){q.callback.call(this)}})}}return s.call(this,q)},_show:d.fn.show,show:function(n){if(e(n)){return this._show.apply(this,arguments)}else{var m=a.apply(this,arguments);m[1].mode="show";return this.effect.apply(this,m)}},_hide:d.fn.hide,hide:function(n){if(e(n)){return this._hide.apply(this,arguments)}else{var m=a.apply(this,arguments);m[1].mode="hide";return this.effect.apply(this,m)}},__toggle:d.fn.toggle,toggle:function(n){if(e(n)||typeof n==="boolean"||d.isFunction(n)){return this.__toggle.apply(this,arguments)}else{var m=a.apply(this,arguments);m[1].mode="toggle";return this.effect.apply(this,m)}},cssUnit:function(m){var n=this.css(m),o=[];d.each(["em","px","%","pt"],function(q,p){if(n.indexOf(p)>0){o=[parseFloat(n),p]}});return o}});d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(m,n,o,p,q){return d.easing[d.easing.def](m,n,o,p,q)},easeInQuad:function(m,n,o,p,q){return p*(n/=q)*n+o},easeOutQuad:function(m,n,o,p,q){return -p*(n/=q)*(n-2)+o},easeInOutQuad:function(m,n,o,p,q){if((n/=q/2)<1){return p/2*n*n+o}return -p/2*((--n)*(n-2)-1)+o},easeInCubic:function(m,n,o,p,q){return p*(n/=q)*n*n+o},easeOutCubic:function(m,n,o,p,q){return p*((n=n/q-1)*n*n+1)+o},easeInOutCubic:function(m,n,o,p,q){if((n/=q/2)<1){return p/2*n*n*n+o}return p/2*((n-=2)*n*n+2)+o},easeInQuart:function(m,n,o,p,q){return p*(n/=q)*n*n*n+o},easeOutQuart:function(m,n,o,p,q){return -p*((n=n/q-1)*n*n*n-1)+o},easeInOutQuart:function(m,n,o,p,q){if((n/=q/2)<1){return p/2*n*n*n*n+o}return -p/2*((n-=2)*n*n*n-2)+o},easeInQuint:function(m,n,o,p,q){return p*(n/=q)*n*n*n*n+o},easeOutQuint:function(m,n,o,p,q){return p*((n=n/q-1)*n*n*n*n+1)+o},easeInOutQuint:function(m,n,o,p,q){if((n/=q/2)<1){return p/2*n*n*n*n*n+o}return p/2*((n-=2)*n*n*n*n+2)+o},easeInSine:function(m,n,o,p,q){return -p*Math.cos(n/q*(Math.PI/2))+p+o},easeOutSine:function(m,n,o,p,q){return p*Math.sin(n/q*(Math.PI/2))+o},easeInOutSine:function(m,n,o,p,q){return -p/2*(Math.cos(Math.PI*n/q)-1)+o},easeInExpo:function(m,n,o,p,q){return(n==0)?o:p*Math.pow(2,10*(n/q-1))+o},easeOutExpo:function(m,n,o,p,q){return(n==q)?o+p:p*(-Math.pow(2,-10*n/q)+1)+o},easeInOutExpo:function(m,n,o,p,q){if(n==0){return o}if(n==q){return o+p}if((n/=q/2)<1){return p/2*Math.pow(2,10*(n-1))+o}return p/2*(-Math.pow(2,-10*--n)+2)+o},easeInCirc:function(m,n,o,p,q){return -p*(Math.sqrt(1-(n/=q)*n)-1)+o},easeOutCirc:function(m,n,o,p,q){return p*Math.sqrt(1-(n=n/q-1)*n)+o},easeInOutCirc:function(m,n,o,p,q){if((n/=q/2)<1){return -p/2*(Math.sqrt(1-n*n)-1)+o}return p/2*(Math.sqrt(1-(n-=2)*n)+1)+o},easeInElastic:function(m,y,o,q,r){var w=1.70158;var u=0;var n=q;if(y==0){return o}if((y/=r)==1){return o+q}if(!u){u=r*0.3}if(n<Math.abs(q)){n=q;var w=u/4}else{var w=u/(2*Math.PI)*Math.asin(q/n)}return -(n*Math.pow(2,10*(y-=1))*Math.sin((y*r-w)*(2*Math.PI)/u))+o},easeOutElastic:function(m,y,o,q,r){var w=1.70158;var u=0;var n=q;if(y==0){return o}if((y/=r)==1){return o+q}if(!u){u=r*0.3}if(n<Math.abs(q)){n=q;var w=u/4}else{var w=u/(2*Math.PI)*Math.asin(q/n)}return n*Math.pow(2,-10*y)*Math.sin((y*r-w)*(2*Math.PI)/u)+q+o},easeInOutElastic:function(m,y,o,q,r){var w=1.70158;var u=0;var n=q;if(y==0){return o}if((y/=r/2)==2){return o+q}if(!u){u=r*(0.3*1.5)}if(n<Math.abs(q)){n=q;var w=u/4}else{var w=u/(2*Math.PI)*Math.asin(q/n)}if(y<1){return -0.5*(n*Math.pow(2,10*(y-=1))*Math.sin((y*r-w)*(2*Math.PI)/u))+o}return n*Math.pow(2,-10*(y-=1))*Math.sin((y*r-w)*(2*Math.PI)/u)*0.5+q+o},easeInBack:function(m,n,o,p,q,r){if(r==b){r=1.70158}return p*(n/=q)*n*((r+1)*n-r)+o},easeOutBack:function(m,n,o,p,q,r){if(r==b){r=1.70158}return p*((n=n/q-1)*n*((r+1)*n+r)+1)+o},easeInOutBack:function(m,n,o,p,q,r){if(r==b){r=1.70158}if((n/=q/2)<1){return p/2*(n*n*(((r*=(1.525))+1)*n-r))+o}return p/2*((n-=2)*n*(((r*=(1.525))+1)*n+r)+2)+o},easeInBounce:function(m,n,o,p,q){return p-d.easing.easeOutBounce(m,q-n,0,p,q)+o},easeOutBounce:function(m,n,o,p,q){if((n/=q)<(1/2.75)){return p*(7.5625*n*n)+o}else{if(n<(2/2.75)){return p*(7.5625*(n-=(1.5/2.75))*n+0.75)+o}else{if(n<(2.5/2.75)){return p*(7.5625*(n-=(2.25/2.75))*n+0.9375)+o}else{return p*(7.5625*(n-=(2.625/2.75))*n+0.984375)+o}}}},easeInOutBounce:function(m,n,o,p,q){if(n<q/2){return d.easing.easeInBounce(m,n*2,0,p,q)*0.5+o}return d.easing.easeOutBounce(m,n*2-q,0,p,q)*0.5+p*0.5+o}})})(jQuery);(function(a,b){a.effects.blind=function(c){return this.queue(function(){var h=a(this),f=["position","top","bottom","left","right"];var d=a.effects.setMode(h,c.options.mode||"hide");var i=c.options.direction||"vertical";a.effects.save(h,f);h.show();var j=a.effects.createWrapper(h).css({overflow:"hidden"});var e=(i=="vertical")?"height":"width";var g=(i=="vertical")?j.height():j.width();if(d=="show"){j.css(e,0)}var k={};k[e]=d=="show"?g:0;j.animate(k,c.duration,c.options.easing,function(){if(d=="hide"){h.hide()}a.effects.restore(h,f);a.effects.removeWrapper(h);if(c.callback){c.callback.apply(h[0],arguments)}h.dequeue()})})}})(jQuery);(function(a,b){a.effects.bounce=function(c){return this.queue(function(){var l=a(this),h=["position","top","bottom","left","right"];var d=a.effects.setMode(l,c.options.mode||"effect");var n=c.options.direction||"up";var k=c.options.distance||20;var g=c.options.times||5;var j=c.duration||250;if(/show|hide/.test(d)){h.push("opacity")}a.effects.save(l,h);l.show();a.effects.createWrapper(l);var f=(n=="up"||n=="down")?"top":"left";var m=(n=="up"||n=="left")?"pos":"neg";var k=c.options.distance||(f=="top"?l.outerHeight({margin:true})/3:l.outerWidth({margin:true})/3);if(d=="show"){l.css("opacity",0).css(f,m=="pos"?-k:k)}if(d=="hide"){k=k/(g*2)}if(d!="hide"){g--}if(d=="show"){var q={opacity:1};q[f]=(m=="pos"?"+=":"-=")+k;l.animate(q,j/2,c.options.easing);k=k/2;g--}for(var o=0;o<g;o++){var p={},e={};p[f]=(m=="pos"?"-=":"+=")+k;e[f]=(m=="pos"?"+=":"-=")+k;l.animate(p,j/2,c.options.easing).animate(e,j/2,c.options.easing);k=(d=="hide")?k*2:k/2}if(d=="hide"){var q={opacity:0};q[f]=(m=="pos"?"-=":"+=")+k;l.animate(q,j/2,c.options.easing,function(){l.hide();a.effects.restore(l,h);a.effects.removeWrapper(l);if(c.callback){c.callback.apply(this,arguments)}})}else{var p={},e={};p[f]=(m=="pos"?"-=":"+=")+k;e[f]=(m=="pos"?"+=":"-=")+k;l.animate(p,j/2,c.options.easing).animate(e,j/2,c.options.easing,function(){a.effects.restore(l,h);a.effects.removeWrapper(l);if(c.callback){c.callback.apply(this,arguments)}})}l.queue("fx",function(){l.dequeue()});l.dequeue()})}})(jQuery);(function(a,b){a.effects.clip=function(c){return this.queue(function(){var i=a(this),f=["position","top","bottom","left","right","height","width"];var d=a.effects.setMode(i,c.options.mode||"hide");var j=c.options.direction||"vertical";a.effects.save(i,f);i.show();var k=a.effects.createWrapper(i).css({overflow:"hidden"});var g=i[0].tagName=="IMG"?k:i;var e={size:(j=="vertical")?"height":"width",position:(j=="vertical")?"top":"left"};var h=(j=="vertical")?g.height():g.width();if(d=="show"){g.css(e.size,0);g.css(e.position,h/2)}var l={};l[e.size]=d=="show"?h:0;l[e.position]=d=="show"?0:h/2;g.animate(l,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(d=="hide"){i.hide()}a.effects.restore(i,f);a.effects.removeWrapper(i);if(c.callback){c.callback.apply(i[0],arguments)}i.dequeue()}})})}})(jQuery);(function(a,b){a.effects.drop=function(c){return this.queue(function(){var h=a(this),f=["position","top","bottom","left","right","opacity"];var d=a.effects.setMode(h,c.options.mode||"hide");var j=c.options.direction||"left";a.effects.save(h,f);h.show();a.effects.createWrapper(h);var e=(j=="up"||j=="down")?"top":"left";var i=(j=="up"||j=="left")?"pos":"neg";var g=c.options.distance||(e=="top"?h.outerHeight({margin:true})/2:h.outerWidth({margin:true})/2);if(d=="show"){h.css("opacity",0).css(e,i=="pos"?-g:g)}var k={opacity:d=="show"?1:0};k[e]=(d=="show"?(i=="pos"?"+=":"-="):(i=="pos"?"-=":"+="))+g;h.animate(k,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(d=="hide"){h.hide()}a.effects.restore(h,f);a.effects.removeWrapper(h);if(c.callback){c.callback.apply(this,arguments)}h.dequeue()}})})}})(jQuery);(function(a,b){a.effects.explode=function(c){return this.queue(function(){var g=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;var h=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):c.options.mode;var k=a(this).show().css("visibility","hidden");var m=k.offset();m.top-=parseInt(k.css("marginTop"),10)||0;m.left-=parseInt(k.css("marginLeft"),10)||0;var f=k.outerWidth(true);var l=k.outerHeight(true);for(var d=0;d<g;d++){for(var e=0;e<h;e++){k.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-e*(f/h),top:-d*(l/g)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f/h,height:l/g,left:m.left+e*(f/h)+(c.options.mode=="show"?(e-Math.floor(h/2))*(f/h):0),top:m.top+d*(l/g)+(c.options.mode=="show"?(d-Math.floor(g/2))*(l/g):0),opacity:c.options.mode=="show"?0:1}).animate({left:m.left+e*(f/h)+(c.options.mode=="show"?0:(e-Math.floor(h/2))*(f/h)),top:m.top+d*(l/g)+(c.options.mode=="show"?0:(d-Math.floor(g/2))*(l/g)),opacity:c.options.mode=="show"?1:0},c.duration||500)}}setTimeout(function(){c.options.mode=="show"?k.css({visibility:"visible"}):k.css({visibility:"visible"}).hide();if(c.callback){c.callback.apply(k[0])}k.dequeue();a("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);(function(a,b){a.effects.fade=function(c){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,c.options.mode||"hide");d.animate({opacity:e},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(c.callback&&c.callback.apply(this,arguments));d.dequeue()}})})}})(jQuery);(function(a,b){a.effects.fold=function(c){return this.queue(function(){var j=a(this),g=["position","top","bottom","left","right"];var d=a.effects.setMode(j,c.options.mode||"hide");var n=c.options.size||15;var i=!(!c.options.horizFirst);var e=c.duration?c.duration/2:a.fx.speeds._default/2;a.effects.save(j,g);j.show();var o=a.effects.createWrapper(j).css({overflow:"hidden"});var m=((d=="show")!=i);var f=m?["width","height"]:["height","width"];var h=m?[o.width(),o.height()]:[o.height(),o.width()];var l=/([0-9]+)%/.exec(n);if(l){n=parseInt(l[1],10)/100*h[d=="hide"?0:1]}if(d=="show"){o.css(i?{height:0,width:n}:{height:n,width:0})}var k={},p={};k[f[0]]=d=="show"?h[0]:n;p[f[1]]=d=="show"?h[1]:0;o.animate(k,e,c.options.easing).animate(p,e,c.options.easing,function(){if(d=="hide"){j.hide()}a.effects.restore(j,g);a.effects.removeWrapper(j);if(c.callback){c.callback.apply(j[0],arguments)}j.dequeue()})})}})(jQuery);(function(a,b){a.effects.highlight=function(c){return this.queue(function(){var f=a(this),d=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(f,c.options.mode||"show"),e={backgroundColor:f.css("backgroundColor")};if(g=="hide"){e.opacity=0}a.effects.save(f,d);f.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(e,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(g=="hide"&&f.hide());a.effects.restore(f,d);(g=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"));(c.callback&&c.callback.apply(this,arguments));f.dequeue()}})})}})(jQuery);(function(a,b){a.effects.pulsate=function(c){return this.queue(function(){var d=a(this),f=a.effects.setMode(d,c.options.mode||"show");times=((c.options.times||5)*2)-1;duration=c.duration?c.duration/2:a.fx.speeds._default/2,isVisible=d.is(":visible"),animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if((f=="hide"&&isVisible)||(f=="show"&&!isVisible)){times--}for(var e=0;e<times;e++){d.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,c.options.easing,function(){if(animateTo==0){d.hide()}(c.callback&&c.callback.apply(this,arguments))});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);(function(a,b){a.effects.puff=function(c){return this.queue(function(){var e=a(this),h=a.effects.setMode(e,c.options.mode||"hide"),f=parseInt(c.options.percent,10)||150,g=f/100,d={height:e.height(),width:e.width()};a.extend(c.options,{fade:true,mode:h,percent:h=="hide"?f:100,from:h=="hide"?d:{height:d.height*g,width:d.width*g}});e.effect("scale",c.options,c.duration,c.callback);e.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var i=a(this);var f=a.extend(true,{},c.options);var d=a.effects.setMode(i,c.options.mode||"effect");var k=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:(d=="hide"?0:100));var h=c.options.direction||"both";var e=c.options.origin;if(d!="effect"){f.origin=e||["middle","center"];f.restore=true}var j={height:i.height(),width:i.width()};i.from=c.options.from||(d=="show"?{height:0,width:0}:j);var g={y:h!="horizontal"?(k/100):1,x:h!="vertical"?(k/100):1};i.to={height:j.height*g.y,width:j.width*g.x};if(c.options.fade){if(d=="show"){i.from.opacity=0;i.to.opacity=1}if(d=="hide"){i.from.opacity=1;i.to.opacity=0}}f.from=i.from;f.to=i.to;f.mode=d;i.effect("size",f,c.duration,c.callback);i.dequeue()})};a.effects.size=function(c){return this.queue(function(){var l=a(this),g=["position","top","bottom","left","right","width","height","overflow","opacity"];var q=["position","top","bottom","left","right","overflow","opacity"];var n=["width","height","overflow"];var o=["fontSize"];var h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var d=a.effects.setMode(l,c.options.mode||"effect");var f=c.options.restore||false;var i=c.options.scale||"both";var e=c.options.origin;var p={height:l.height(),width:l.width()};l.from=c.options.from||p;l.to=c.options.to||p;if(e){var k=a.effects.getBaseline(e,p);l.from.top=(p.height-l.from.height)*k.y;l.from.left=(p.width-l.from.width)*k.x;l.to.top=(p.height-l.to.height)*k.y;l.to.left=(p.width-l.to.width)*k.x}var j={from:{y:l.from.height/p.height,x:l.from.width/p.width},to:{y:l.to.height/p.height,x:l.to.width/p.width}};if(i=="box"||i=="both"){if(j.from.y!=j.to.y){g=g.concat(h);l.from=a.effects.setTransition(l,h,j.from.y,l.from);l.to=a.effects.setTransition(l,h,j.to.y,l.to)}if(j.from.x!=j.to.x){g=g.concat(m);l.from=a.effects.setTransition(l,m,j.from.x,l.from);l.to=a.effects.setTransition(l,m,j.to.x,l.to)}}if(i=="content"||i=="both"){if(j.from.y!=j.to.y){g=g.concat(o);l.from=a.effects.setTransition(l,o,j.from.y,l.from);l.to=a.effects.setTransition(l,o,j.to.y,l.to)}}a.effects.save(l,f?g:q);l.show();a.effects.createWrapper(l);l.css("overflow","hidden").css(l.from);if(i=="content"||i=="both"){h=h.concat(["marginTop","marginBottom"]).concat(o);m=m.concat(["marginLeft","marginRight"]);n=g.concat(h).concat(m);l.find("*[width]").each(function(){child=a(this);if(f){a.effects.save(child,n)}var r={height:child.height(),width:child.width()};child.from={height:r.height*j.from.y,width:r.width*j.from.x};child.to={height:r.height*j.to.y,width:r.width*j.to.x};if(j.from.y!=j.to.y){child.from=a.effects.setTransition(child,h,j.from.y,child.from);child.to=a.effects.setTransition(child,h,j.to.y,child.to)}if(j.from.x!=j.to.x){child.from=a.effects.setTransition(child,m,j.from.x,child.from);child.to=a.effects.setTransition(child,m,j.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){if(f){a.effects.restore(child,n)}})})}l.animate(l.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(l.to.opacity===0){l.css("opacity",l.from.opacity)}if(d=="hide"){l.hide()}a.effects.restore(l,f?g:q);a.effects.removeWrapper(l);if(c.callback){c.callback.apply(this,arguments)}l.dequeue()}})})}})(jQuery);(function(a,b){a.effects.shake=function(c){return this.queue(function(){var l=a(this),h=["position","top","bottom","left","right"];var d=a.effects.setMode(l,c.options.mode||"effect");var n=c.options.direction||"left";var k=c.options.distance||20;var g=c.options.times||3;var j=c.duration||c.options.duration||140;a.effects.save(l,h);l.show();a.effects.createWrapper(l);var f=(n=="up"||n=="down")?"top":"left";var m=(n=="up"||n=="left")?"pos":"neg";var q={},p={},e={};q[f]=(m=="pos"?"-=":"+=")+k;p[f]=(m=="pos"?"+=":"-=")+k*2;e[f]=(m=="pos"?"-=":"+=")+k*2;l.animate(q,j,c.options.easing);for(var o=1;o<g;o++){l.animate(p,j,c.options.easing).animate(e,j,c.options.easing)}l.animate(p,j,c.options.easing).animate(q,j/2,c.options.easing,function(){a.effects.restore(l,h);a.effects.removeWrapper(l);if(c.callback){c.callback.apply(this,arguments)}});l.queue("fx",function(){l.dequeue()});l.dequeue()})}})(jQuery);(function(a,b){a.effects.slide=function(c){return this.queue(function(){var h=a(this),f=["position","top","bottom","left","right"];var d=a.effects.setMode(h,c.options.mode||"show");var j=c.options.direction||"left";a.effects.save(h,f);h.show();a.effects.createWrapper(h).css({overflow:"hidden"});var e=(j=="up"||j=="down")?"top":"left";var i=(j=="up"||j=="left")?"pos":"neg";var g=c.options.distance||(e=="top"?h.outerHeight({margin:true}):h.outerWidth({margin:true}));if(d=="show"){h.css(e,i=="pos"?(isNaN(g)?"-"+g:-g):g)}var k={};k[e]=(d=="show"?(i=="pos"?"+=":"-="):(i=="pos"?"-=":"+="))+g;h.animate(k,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(d=="hide"){h.hide()}a.effects.restore(h,f);a.effects.removeWrapper(h);if(c.callback){c.callback.apply(this,arguments)}h.dequeue()}})})}})(jQuery);(function(a,b){a.effects.transfer=function(c){return this.queue(function(){var e=a(this),f=a(c.options.to),g=f.offset(),h={top:g.top,left:g.left,height:f.innerHeight(),width:f.innerWidth()},i=e.offset(),d=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:i.top,left:i.left,height:e.innerHeight(),width:e.innerWidth(),position:"absolute"}).animate(h,c.duration,c.options.easing,function(){d.remove();(c.callback&&c.callback.apply(e[0],arguments));e.dequeue()})})}})(jQuery);(function(a){a.fn.autoGrowInput=function(d){d=a.extend({maxWidth:1000,minWidth:0,comfortZone:70},d);var f=d.minWidth||a(this).width(),g="",e=a(this),b=a("<tester/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),letterSpacing:e.css("letterSpacing"),whiteSpace:"nowrap"}),c=function(){if(g===(g=e.val())){return}var i=g.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.html(i);var l=b.width(),h=(l+d.comfortZone)>=f?l+d.comfortZone:f,j=e.width(),k=(h<j&&h>=f)||(h>f&&h<d.maxWidth);if(k){e.width(h)}};b.insertAfter(e);a(this).bind("keyup keydown blur update",c);return this}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,e,f,g,h){return jQuery.easing[jQuery.easing.def](a,e,f,g,h)},easeInQuad:function(a,e,f,g,h){return g*(e/=h)*e+f},easeOutQuad:function(a,e,f,g,h){return -g*(e/=h)*(e-2)+f},easeInOutQuad:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e+f}return -g/2*((--e)*(e-2)-1)+f},easeInCubic:function(a,e,f,g,h){return g*(e/=h)*e*e+f},easeOutCubic:function(a,e,f,g,h){return g*((e=e/h-1)*e*e+1)+f},easeInOutCubic:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e+f}return g/2*((e-=2)*e*e+2)+f},easeInQuart:function(a,e,f,g,h){return g*(e/=h)*e*e*e+f},easeOutQuart:function(a,e,f,g,h){return -g*((e=e/h-1)*e*e*e-1)+f},easeInOutQuart:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e+f}return -g/2*((e-=2)*e*e*e-2)+f},easeInQuint:function(a,e,f,g,h){return g*(e/=h)*e*e*e*e+f},easeOutQuint:function(a,e,f,g,h){return g*((e=e/h-1)*e*e*e*e+1)+f},easeInOutQuint:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e*e+f}return g/2*((e-=2)*e*e*e*e+2)+f},easeInSine:function(a,e,f,g,h){return -g*Math.cos(e/h*(Math.PI/2))+g+f},easeOutSine:function(a,e,f,g,h){return g*Math.sin(e/h*(Math.PI/2))+f},easeInOutSine:function(a,e,f,g,h){return -g/2*(Math.cos(Math.PI*e/h)-1)+f},easeInExpo:function(a,e,f,g,h){return(e==0)?f:g*Math.pow(2,10*(e/h-1))+f},easeOutExpo:function(a,e,f,g,h){return(e==h)?f+g:g*(-Math.pow(2,-10*e/h)+1)+f},easeInOutExpo:function(a,e,f,g,h){if(e==0){return f}if(e==h){return f+g}if((e/=h/2)<1){return g/2*Math.pow(2,10*(e-1))+f}return g/2*(-Math.pow(2,-10*--e)+2)+f},easeInCirc:function(a,e,f,g,h){return -g*(Math.sqrt(1-(e/=h)*e)-1)+f},easeOutCirc:function(a,e,f,g,h){return g*Math.sqrt(1-(e=e/h-1)*e)+f},easeInOutCirc:function(a,e,f,g,h){if((e/=h/2)<1){return -g/2*(Math.sqrt(1-e*e)-1)+f}return g/2*(Math.sqrt(1-(e-=2)*e)+1)+f},easeInElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return -(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g},easeOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return f*Math.pow(2,-10*l)*Math.sin((l*i-k)*(2*Math.PI)/j)+h+g},easeInOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i/2)==2){return g+h}if(!j){j=i*(0.3*1.5)}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}if(l<1){return -0.5*(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g}return f*Math.pow(2,-10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j)*0.5+h+g},easeInBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}return g*(e/=h)*e*((i+1)*e-i)+f},easeOutBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}return g*((e=e/h-1)*e*((i+1)*e+i)+1)+f},easeInOutBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}if((e/=h/2)<1){return g/2*(e*e*(((i*=(1.525))+1)*e-i))+f}return g/2*((e-=2)*e*(((i*=(1.525))+1)*e+i)+2)+f},easeInBounce:function(a,e,f,g,h){return g-jQuery.easing.easeOutBounce(a,h-e,0,g,h)+f},easeOutBounce:function(a,e,f,g,h){if((e/=h)<(1/2.75)){return g*(7.5625*e*e)+f}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+f}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+f}else{return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+f}}}},easeInOutBounce:function(a,e,f,g,h){if(e<h/2){return jQuery.easing.easeInBounce(a,e*2,0,g,h)*0.5+f}return jQuery.easing.easeOutBounce(a,e*2-h,0,g,h)*0.5+g*0.5+f}});
/*
 * Modernizr v2.0.6
 * http://www.modernizr.com
 *
 * Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton
 * Dual-licensed under the BSD or MIT licenses: www.modernizr.com/license/
 */
window.Modernizr=(function(b,x,d){var f="2.0.6",a={},C=true,o=x.documentElement,m=x.head||x.getElementsByTagName("head")[0],z="modernizr",n=x.createElement(z),H=n.style,u=x.createElement("input"),y=":)",G=Object.prototype.toString,k=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),A="Webkit Moz O ms Khtml".split(" "),F={svg:"http://www.w3.org/2000/svg"},E={},L={},K={},s=[],c,I=function(N,T,S,Q){var R,O,M,P=x.createElement("div");if(parseInt(S,10)){while(S--){M=x.createElement("div");M.id=Q?Q[S]:z+(S+1);P.appendChild(M)}}R=["&shy;","<style>",N,"</style>"].join("");P.id=z;P.innerHTML+=R;o.appendChild(P);O=T(P,N);P.parentNode.removeChild(P);return !!O},B=function(M){if(b.matchMedia){return matchMedia(M).matches}var N;I("@media "+M+" { #"+z+" { position: absolute; } }",function(O){N=(b.getComputedStyle?getComputedStyle(O,null):O.currentStyle)["position"]=="absolute"});return N},j=(function(){var N={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function M(P,O){O=O||x.createElement(N[P]||"div");P="on"+P;var Q=P in O;if(!Q){if(!O.setAttribute){O=x.createElement("div")}if(O.setAttribute&&O.removeAttribute){O.setAttribute(P,"");Q=w(O[P],"function");if(!w(O[P],d)){O[P]=d}O.removeAttribute(P)}}O=null;return Q}return M})();var l=({}).hasOwnProperty,q;if(!w(l,d)&&!w(l.call,d)){q=function(N,M){return l.call(N,M)}}else{q=function(N,M){return((M in N)&&w(N.constructor.prototype[M],d))}}function r(M){H.cssText=M}function g(M,N){return r(k.join(M+";")+(N||""))}function w(N,M){return typeof N===M}function J(N,M){return !!~(""+N).indexOf(M)}function p(M,N){for(var O in M){if(H[M[O]]!==d){return N=="pfx"?M[O]:true}}return false}function D(P,O){var N=P.charAt(0).toUpperCase()+P.substr(1),M=(P+" "+A.join(N+" ")+N).split(" ");return p(M,O)}var h=(function(N,P){var O=N.join(""),M=P.length;I(O,function(V,U){var S=x.styleSheets[x.styleSheets.length-1],T=S.cssRules&&S.cssRules[0]?S.cssRules[0].cssText:S.cssText||"",R=V.childNodes,Q={};while(M--){Q[R[M].id]=R[M]}a.touch=("ontouchstart" in b)||Q.touch.offsetTop===9;a.csstransforms3d=Q.csstransforms3d.offsetLeft===9;a.generatedcontent=Q.generatedcontent.offsetHeight>=1;a.fontface=/src/i.test(T)&&T.indexOf(U.split(" ")[0])===0},M,P)})(['@font-face {font-family:"font";src:url("https://")}',["@media (",k.join("touch-enabled),("),z,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",k.join("transform-3d),("),z,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',y,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);E.flexbox=function(){function Q(T,S,R,U){S+=":";T.style.cssText=(S+k.join(R+";"+S)).slice(0,-S.length)+(U||"")}function N(T,S,R,U){T.style.cssText=k.join(S+":"+R+";")+(U||"")}var P=x.createElement("div"),O=x.createElement("div");Q(P,"display","box","width:42px;padding:0;");N(O,"box-flex","1","width:10px;");P.appendChild(O);o.appendChild(P);var M=O.offsetWidth===42;P.removeChild(O);o.removeChild(P);return M};E.canvas=function(){var M=x.createElement("canvas");return !!(M.getContext&&M.getContext("2d"))};E.canvastext=function(){return !!(a.canvas&&w(x.createElement("canvas").getContext("2d").fillText,"function"))};E.webgl=function(){return !!b.WebGLRenderingContext};E.touch=function(){return a.touch};E.geolocation=function(){return !!navigator.geolocation};E.postmessage=function(){return !!b.postMessage};E.websqldatabase=function(){var M=!!b.openDatabase;return M};E.indexedDB=function(){for(var N=-1,M=A.length;++N<M;){if(b[A[N].toLowerCase()+"IndexedDB"]){return true}}return !!b.indexedDB};E.hashchange=function(){return j("hashchange",b)&&(x.documentMode===d||x.documentMode>7)};E.history=function(){return !!(b.history&&history.pushState)};E.draganddrop=function(){return j("dragstart")&&j("drop")};E.websockets=function(){for(var N=-1,M=A.length;++N<M;){if(b[A[N]+"WebSocket"]){return true}}return"WebSocket" in b};E.rgba=function(){r("background-color:rgba(150,255,150,.5)");return J(H.backgroundColor,"rgba")};E.hsla=function(){r("background-color:hsla(120,40%,100%,.5)");return J(H.backgroundColor,"rgba")||J(H.backgroundColor,"hsla")};E.multiplebgs=function(){r("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(H.background)};E.backgroundsize=function(){return D("backgroundSize")};E.borderimage=function(){return D("borderImage")};E.borderradius=function(){return D("borderRadius")};E.boxshadow=function(){return D("boxShadow")};E.textshadow=function(){return x.createElement("div").style.textShadow===""};E.opacity=function(){g("opacity:.55");return/^0.55$/.test(H.opacity)};E.cssanimations=function(){return D("animationName")};E.csscolumns=function(){return D("columnCount")};E.cssgradients=function(){var M="background-image:",O="gradient(linear,left top,right bottom,from(#9f9),to(white));",N="linear-gradient(left top,#9f9, white);";r((M+k.join(O+M)+k.join(N+M)).slice(0,-M.length));return J(H.backgroundImage,"gradient")};E.cssreflections=function(){return D("boxReflect")};E.csstransforms=function(){return !!p(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};E.csstransforms3d=function(){var M=!!p(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(M&&"webkitPerspective" in o.style){M=a.csstransforms3d}return M};E.csstransitions=function(){return D("transitionProperty")};E.fontface=function(){return a.fontface};E.generatedcontent=function(){return a.generatedcontent};E.video=function(){var M=x.createElement("video"),N=false;try{if(N=!!M.canPlayType){N=new Boolean(N);N.ogg=M.canPlayType('video/ogg; codecs="theora"');var P='video/mp4; codecs="avc1.42E01E';N.h264=M.canPlayType(P+'"')||M.canPlayType(P+', mp4a.40.2"');N.webm=M.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(O){}return N};E.audio=function(){var M=x.createElement("audio"),N=false;try{if(N=!!M.canPlayType){N=new Boolean(N);N.ogg=M.canPlayType('audio/ogg; codecs="vorbis"');N.mp3=M.canPlayType("audio/mpeg;");N.wav=M.canPlayType('audio/wav; codecs="1"');N.m4a=M.canPlayType("audio/x-m4a;")||M.canPlayType("audio/aac;")}}catch(O){}return N};E.localstorage=function(){try{return !!localStorage.getItem}catch(M){return false}};E.sessionstorage=function(){try{return !!sessionStorage.getItem}catch(M){return false}};E.webworkers=function(){return !!b.Worker};E.applicationcache=function(){return !!b.applicationCache};E.svg=function(){return !!x.createElementNS&&!!x.createElementNS(F.svg,"svg").createSVGRect};E.inlinesvg=function(){var M=x.createElement("div");M.innerHTML="<svg/>";return(M.firstChild&&M.firstChild.namespaceURI)==F.svg};E.smil=function(){return !!x.createElementNS&&/SVG/.test(G.call(x.createElementNS(F.svg,"animate")))};E.svgclippaths=function(){return !!x.createElementNS&&/SVG/.test(G.call(x.createElementNS(F.svg,"clipPath")))};function i(){a.input=(function(M){for(var O=0,N=M.length;O<N;O++){K[M[O]]=!!(M[O] in u)}return K})("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));a.inputtypes=(function(M){for(var Q=0,P,N,R,O=M.length;Q<O;Q++){u.setAttribute("type",N=M[Q]);P=u.type!=="text";if(P){u.value=y;u.style.cssText="position:absolute;visibility:hidden;";if(/^range$/.test(N)&&u.style.WebkitAppearance!==d){o.appendChild(u);R=x.defaultView;P=R.getComputedStyle&&R.getComputedStyle(u,null).WebkitAppearance!=="textfield"&&(u.offsetHeight!==0);o.removeChild(u)}else{if(/^(search|tel)$/.test(N)){}else{if(/^(url|email)$/.test(N)){P=u.checkValidity&&u.checkValidity()===false}else{if(/^color$/.test(N)){o.appendChild(u);o.offsetWidth;P=u.value!=y;o.removeChild(u)}else{P=u.value!=y}}}}}L[M[Q]]=!!P}return L})("search tel url email datetime date month week time datetime-local number range color".split(" "))}for(var e in E){if(q(E,e)){c=e.toLowerCase();a[c]=E[e]();s.push((a[c]?"":"no-")+c)}}a.input||i();a.addTest=function(O,M){if(typeof O=="object"){for(var N in O){if(q(O,N)){a.addTest(N,O[N])}}}else{O=O.toLowerCase();if(a[O]!==d){return}M=typeof M=="boolean"?M:!!M();o.className+=" "+(M?"":"no-")+O;a[O]=M}return a};r("");n=u=null;if(b.attachEvent&&(function(){var M=x.createElement("div");M.innerHTML="<elem></elem>";return M.childNodes.length!==1})()){(function(S,N){S.iepp=S.iepp||{};var X=S.iepp,Z=X.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",R=Z.split("|"),W=R.length,O=new RegExp("(^|\\s)("+Z+")","gi"),V=new RegExp("<(/*)("+Z+")","gi"),T=/^\s*[\{\}]\s*$/,P=new RegExp("(^|[^\\n]*?\\s)("+Z+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),Q=N.createDocumentFragment(),ab=N.documentElement,ac=ab.firstChild,aa=N.createElement("body"),Y=N.createElement("style"),ad=/print|all/,U;function M(ae){var af=-1;while(++af<W){ae.createElement(R[af])}}X.getCSS=function(ai,ae){if(ai+""===d){return""}var ag=-1,af=ai.length,aj,ah=[];while(++ag<af){aj=ai[ag];if(aj.disabled){continue}ae=aj.media||ae;if(ad.test(ae)){ah.push(X.getCSS(aj.imports,ae),aj.cssText)}ae="all"}return ah.join("")};X.parseCSS=function(af){var ae=[],ag;while((ag=P.exec(af))!=null){ae.push(((T.exec(ag[1])?"\n":ag[1])+ag[2]+ag[3]).replace(O,"$1.iepp_$2")+ag[4])}return ae.join("\n")};X.writeHTML=function(){var ag=-1;U=U||N.body;while(++ag<W){var af=N.getElementsByTagName(R[ag]),ae=af.length,ah=-1;while(++ah<ae){if(af[ah].className.indexOf("iepp_")<0){af[ah].className+=" iepp_"+R[ag]}}}Q.appendChild(U);ab.appendChild(aa);aa.className=U.className;aa.id=U.id;aa.innerHTML=U.innerHTML.replace(V,"<$1font")};X._beforePrint=function(){Y.styleSheet.cssText=X.parseCSS(X.getCSS(N.styleSheets,"all"));X.writeHTML()};X.restoreHTML=function(){aa.innerHTML="";ab.removeChild(aa);ab.appendChild(U)};X._afterPrint=function(){X.restoreHTML();Y.styleSheet.cssText=""};M(N);M(Q);if(X.disablePP){return}ac.insertBefore(Y,ac.firstChild);Y.media="print";Y.className="iepp-printshim";S.attachEvent("onbeforeprint",X._beforePrint);S.attachEvent("onafterprint",X._afterPrint)})(b,x)}a._version=f;a._prefixes=k;a._domPrefixes=A;a.mq=B;a.hasEvent=j;a.testProp=function(M){return p([M])};a.testAllProps=D;a.testStyles=I;a.prefixed=function(M){return D(M,"pfx")};o.className=o.className.replace(/\bno-js\b/,"")+(C?" js "+s.join(" "):"");return a})(this,this.document);
/*
 * Raphael 1.5.2 - JavaScript Vector Library
 *
 * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
 * Licensed under the MIT (http://raphaeljs.com/license.html) license.
 */
(function(){function br(){if(br.is(arguments[0],u)){var e=arguments[0],d=ag[aQ](br,e.splice(0,3+br.is(e[0],o))),E=d.set();for(var R=0,S=e[aS];R<S;R++){var b=e[R]||{};ao[P](b.type)&&E[aT](d[b.type]().attr(b))}return E}return ag[aQ](br,arguments)}br.version="1.5.2";var aj=/[, ]+/,ao={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},g=/\{(\d+)\}/g,L="prototype",P="hasOwnProperty",bu=document,aa=window,aV={was:Object[L][P].call(aa,"Raphael"),is:aa.Raphael},ba=function(){this.customAttributes={}},bn,bF="appendChild",aQ="apply",aq="concat",au="createTouch" in bu,bC="",bv=" ",A=String,aU="split",at="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[aU](bv),F={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},bt="join",aS="length",N=A[L].toLowerCase,ap=Math,bj=ap.max,a6=ap.min,aF=ap.abs,M=ap.pow,f=ap.PI,o="number",by="string",u="array",aP="toString",bI="fill",ar=Object[L][aP],bs={},aT="push",H=/^url\(['"]?([^\)]+?)['"]?\)$/i,bm=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,bf={"NaN":1,"Infinity":1,"-Infinity":1},V=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,bx=ap.round,W="setAttribute",a8=parseFloat,B=parseInt,a0=" progid:DXImageTransform.Microsoft",h=A[L].toUpperCase,a={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},bz={along:"along",blur:o,"clip-rect":"csv",cx:o,cy:o,fill:"colour","fill-opacity":o,"font-size":o,height:o,opacity:o,path:"path",r:o,rotation:"csv",rx:o,ry:o,scale:"csv",stroke:"colour","stroke-opacity":o,"stroke-width":o,translation:"csv",width:o,x:o,y:o},bE="replace",l=/^(from|to|\d+%?)$/,bb=/\s*,\s*/,U={hs:1,rg:1},aB=/,?([achlmqrstvxz]),?/gi,I=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,bg=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bh=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,T=function(d,e){return d.key-e.key};br.type=(aa.SVGAngle||bu.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(br.type=="VML"){var s=bu.createElement("div"),r;s.innerHTML='<v:shape adj="1"/>';r=s.firstChild;r.style.behavior="url(#default#VML)";if(!(r&&typeof r.adj=="object")){return br.type=null}s=null}br.svg=!(br.vml=br.type=="VML");ba[L]=br[L];bn=ba[L];br._id=0;br._oid=0;br.fn={};br.is=function(b,d){d=N.call(d);if(d=="finite"){return !bf[P](+b)}return(d=="null"&&b===null)||(d==typeof b)||(d=="object"&&b===Object(b))||(d=="array"&&Array.isArray&&Array.isArray(b))||ar.call(b).slice(8,-1).toLowerCase()==d};br.angle=function(S,bJ,e,i,E,R){if(E==null){var d=S-e,b=bJ-i;if(!d&&!b){return 0}return((d<0)*180+ap.atan(-b/-d)*180/f+360)%360}else{return br.angle(S,bJ,E,R)-br.angle(e,i,E,R)}};br.rad=function(b){return b%360*f/180};br.deg=function(b){return b*180/f%360};br.snapTo=function(E,b,d){d=br.is(d,"finite")?d:10;if(br.is(E,u)){var e=E.length;while(e--){if(aF(E[e]-b)<=d){return E[e]}}}else{E=+E;var R=b%E;if(R<d){return b-R}if(R>E-d){return b-R+E}}return b};function bk(){var b=[],d=0;for(;d<32;d++){b[d]=(~~(ap.random()*16))[aP](16)}b[12]=4;b[16]=((b[16]&3)|8)[aP](16);return"r-"+b[bt]("")}br.setWindow=function(b){aa=b;bu=aa.document};var aD=function(bJ){if(br.vml){var bK=/^\s+|\s+$/g;var d;try{var E=new ActiveXObject("htmlfile");E.write("<body>");E.close();d=E.body}catch(S){d=createPopup().document.body}var b=d.createTextRange();aD=bD(function(bM){try{d.style.color=A(bM)[bE](bK,bC);var i=b.queryCommandValue("ForeColor");i=((i&255)<<16)|(i&65280)|((i&16711680)>>>16);return"#"+("000000"+i[aP](16)).slice(-6)}catch(bL){return"none"}})}else{var R=bu.createElement("i");R.title="Rapha\xebl Colour Picker";R.style.display="none";bu.body[bF](R);aD=bD(function(e){R.style.color=e;return bu.defaultView.getComputedStyle(R,bC).getPropertyValue("color")})}return aD(bJ)},aZ=function(){return"hsb("+[this.h,this.s,this.b]+")"},aA=function(){return"hsl("+[this.h,this.s,this.l]+")"},ab=function(){return this.hex};br.hsb2rgb=function(bQ,bM,R,e){var bL,bJ,R,d,S,E,bK,bN,bP;if(bQ.h!=null){v=bQ.b;bM=bQ.s;bQ=bQ.h}bQ%=360;if(bQ<1){bQ*=360}bM=bM>1?1:bM<0?0:bM;v=v>1?1:v<0?0:v;bP=bQ;if(bM==0){bL=bJ=R=v}else{bQ/=60;S=bQ-(d=Math.floor(bQ));E=v*(1-bM);bK=v*(1-bM*S);bN=v*(1-bM*(1-S));switch(d){case 0:bL=v;bJ=bN;R=E;break;case 1:bL=bK;bJ=v;R=E;break;case 2:bL=E;bJ=v;R=bN;break;case 3:bL=E;bJ=bK;R=v;break;case 4:bL=bN;bJ=E;R=v;break;case 5:bL=v;bJ=E;R=bK;break}}var bO={};bO.r=Math.floor(bL*255);bO.g=Math.floor(bJ*255);bO.b=Math.floor(R*255);bO.hex="#"+(16777216|bO.b|(bO.g<<8)|(bO.r<<16)).toString(16).slice(1);return bO};br.hsl2rgb=function(bQ,bM,e,R){if(br.is(bQ,"object")&&"h" in bQ&&"s" in bQ&&"l" in bQ){e=bQ.l;bM=bQ.s;bQ=bQ.h}if(bQ>1||bM>1||e>1){bQ/=360;bM/=100;e/=100}var bO={},bP=["r","g","b"],bN,bJ,E,bL,bK,S;if(!bM){bO={r:e,g:e,b:e}}else{if(e<0.5){bN=e*(1+bM)}else{bN=e+bM-e*bM}bJ=2*e-bN;for(var d=0;d<3;d++){E=bQ+1/3*-(d-1);E<0&&E++;E>1&&E--;if(E*6<1){bO[bP[d]]=bJ+(bN-bJ)*6*E}else{if(E*2<1){bO[bP[d]]=bN}else{if(E*3<2){bO[bP[d]]=bJ+(bN-bJ)*(2/3-E)*6}else{bO[bP[d]]=bJ}}}}}bO.r*=255;bO.g*=255;bO.b*=255;bO.hex="#"+(16777216|bO.b|(bO.g<<8)|(bO.r<<16)).toString(16).slice(1);br.is(R,"finite")&&(bO.opacity=R);bO.toString=ab;return bO};br.rgb2hsb=function(d,e,bL){if(e==null&&br.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){bL=d.b;e=d.g;d=d.r}if(e==null&&br.is(d,by)){var E=br.getRGB(d);d=E.r;e=E.g;bL=E.b}if(d>1||e>1||bL>1){d/=255;e/=255;bL/=255}var bJ=bj(d,e,bL),i=a6(d,e,bL),bK,S,R=bJ;if(i==bJ){return{h:0,s:0,b:bJ,toString:aZ}}else{var b=(bJ-i);S=b/bJ;if(d==bJ){bK=(e-bL)/b}else{if(e==bJ){bK=2+((bL-d)/b)}else{bK=4+((d-e)/b)}}bK/=6;bK<0&&bK++;bK>1&&bK--}return{h:bK,s:S,b:R,toString:aZ}};br.rgb2hsl=function(d,e,bM){if(e==null&&br.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){bM=d.b;e=d.g;d=d.r}if(e==null&&br.is(d,by)){var E=br.getRGB(d);d=E.r;e=E.g;bM=E.b}if(d>1||e>1||bM>1){d/=255;e/=255;bM/=255}var R=bj(d,e,bM),i=a6(d,e,bM),S,bJ,bL=(R+i)/2,bK;if(i==R){bK={h:0,s:0,l:bL}}else{var b=R-i;bJ=bL<0.5?b/(R+i):b/(2-R-i);if(d==R){S=(e-bM)/b}else{if(e==R){S=2+(bM-d)/b}else{S=4+(d-e)/b}}S/=6;S<0&&S++;S>1&&S--;bK={h:S,s:bJ,l:bL}}bK.toString=aA;return bK};br._path2string=function(){return this.join(",")[bE](aB,"$1")};function bD(e,i,b){function d(){var R=Array[L].slice.call(arguments,0),S=R[bt]("\u25ba"),bJ=d.cache=d.cache||{},E=d.count=d.count||[];if(bJ[P](S)){return b?b(bJ[S]):bJ[S]}E[aS]>=1000&&delete bJ[E.shift()];E[aT](S);bJ[S]=e[aQ](i,R);return b?b(bJ[S]):bJ[S]}return d}br.getRGB=bD(function(i){if(!i||!!((i=A(i)).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1}}if(i=="none"){return{r:-1,g:-1,b:-1,hex:"none"}}!(U[P](i.toLowerCase().substring(0,2))||i.charAt()=="#")&&(i=aD(i));var b,d,e,bK,R,S,E,bJ=i.match(bm);if(bJ){if(bJ[2]){bK=B(bJ[2].substring(5),16);e=B(bJ[2].substring(3,5),16);d=B(bJ[2].substring(1,3),16)}if(bJ[3]){bK=B((S=bJ[3].charAt(3))+S,16);e=B((S=bJ[3].charAt(2))+S,16);d=B((S=bJ[3].charAt(1))+S,16)}if(bJ[4]){E=bJ[4][aU](bb);d=a8(E[0]);E[0].slice(-1)=="%"&&(d*=2.55);e=a8(E[1]);E[1].slice(-1)=="%"&&(e*=2.55);bK=a8(E[2]);E[2].slice(-1)=="%"&&(bK*=2.55);bJ[1].toLowerCase().slice(0,4)=="rgba"&&(R=a8(E[3]));E[3]&&E[3].slice(-1)=="%"&&(R/=100)}if(bJ[5]){E=bJ[5][aU](bb);d=a8(E[0]);E[0].slice(-1)=="%"&&(d*=2.55);e=a8(E[1]);E[1].slice(-1)=="%"&&(e*=2.55);bK=a8(E[2]);E[2].slice(-1)=="%"&&(bK*=2.55);(E[0].slice(-3)=="deg"||E[0].slice(-1)=="\xb0")&&(d/=360);bJ[1].toLowerCase().slice(0,4)=="hsba"&&(R=a8(E[3]));E[3]&&E[3].slice(-1)=="%"&&(R/=100);return br.hsb2rgb(d,e,bK,R)}if(bJ[6]){E=bJ[6][aU](bb);d=a8(E[0]);E[0].slice(-1)=="%"&&(d*=2.55);e=a8(E[1]);E[1].slice(-1)=="%"&&(e*=2.55);bK=a8(E[2]);E[2].slice(-1)=="%"&&(bK*=2.55);(E[0].slice(-3)=="deg"||E[0].slice(-1)=="\xb0")&&(d/=360);bJ[1].toLowerCase().slice(0,4)=="hsla"&&(R=a8(E[3]));E[3]&&E[3].slice(-1)=="%"&&(R/=100);return br.hsl2rgb(d,e,bK,R)}bJ={r:d,g:e,b:bK};bJ.hex="#"+(16777216|bK|(e<<8)|(d<<16)).toString(16).slice(1);br.is(R,"finite")&&(bJ.opacity=R);return bJ}return{r:-1,g:-1,b:-1,hex:"none",error:1}},br);br.getColor=function(b){var d=this.getColor.start=this.getColor.start||{h:0,s:1,b:b||0.75},e=this.hsb2rgb(d.h,d.s,d.b);d.h+=0.075;if(d.h>1){d.h=0;d.s-=0.2;d.s<=0&&(this.getColor.start={h:0,s:1,b:d.b})}return e.hex};br.getColor.reset=function(){delete this.start};br.parsePathString=bD(function(b){if(!b){return null}var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];if(br.is(b,u)&&br.is(b[0],u)){d=aN(b)}if(!d[aS]){A(b)[bE](I,function(R,S,bJ){var i=[],E=N.call(S);bJ[bE](bg,function(bK,bL){bL&&i[aT](+bL)});if(E=="m"&&i[aS]>2){d[aT]([S][aq](i.splice(0,2)));E="l";S=S=="m"?"l":"L"}while(i[aS]>=e[E]){d[aT]([S][aq](i.splice(0,e[E])));if(!e[E]){break}}})}d[aP]=br._path2string;return d});br.findDotsAtSegment=function(bQ,bP,bN,bU,bJ,S,bV,bT,R){var bR=1-R,e=M(bR,3)*bQ+M(bR,2)*3*R*bN+bR*3*R*R*bJ+M(R,3)*bV,i=M(bR,3)*bP+M(bR,2)*3*R*bU+bR*3*R*R*S+M(R,3)*bT,bW=bQ+2*R*(bN-bQ)+R*R*(bJ-2*bN+bQ),bK=bP+2*R*(bU-bP)+R*R*(S-2*bU+bP),b=bN+2*R*(bJ-bN)+R*R*(bV-2*bJ+bN),bL=bU+2*R*(S-bU)+R*R*(bT-2*S+bU),d=(1-R)*bQ+R*bN,bM=(1-R)*bP+R*bU,bS=(1-R)*bJ+R*bV,bO=(1-R)*S+R*bT,E=(90-ap.atan((bW-b)/(bK-bL))*180/f);(bW>b||bK<bL)&&(E+=180);return{x:e,y:i,m:{x:bW,y:bK},n:{x:b,y:bL},start:{x:d,y:bM},end:{x:bS,y:bO},alpha:E}};var Q=bD(function(d){if(!d){return{x:0,y:0,width:0,height:0}}d=J(d);var R=0,S=0,bM=[],bN=[],bK;for(var b=0,bL=d[aS];b<bL;b++){bK=d[b];if(bK[0]=="M"){R=bK[1];S=bK[2];bM[aT](R);bN[aT](S)}else{var bJ=bq(R,S,bK[1],bK[2],bK[3],bK[4],bK[5],bK[6]);bM=bM[aq](bJ.min.x,bJ.max.x);bN=bN[aq](bJ.min.y,bJ.max.y);R=bK[5];S=bK[6]}}var e=a6[aQ](0,bM),E=a6[aQ](0,bN);return{x:e,y:E,width:bj[aQ](0,bM)-e,height:bj[aQ](0,bN)-E}}),aN=function(R){var e=[];if(!br.is(R,u)||!br.is(R&&R[0],u)){R=br.parsePathString(R)}for(var E=0,b=R[aS];E<b;E++){e[E]=[];for(var d=0,S=R[E][aS];d<S;d++){e[E][d]=R[E][d]}}e[aP]=br._path2string;return e},j=bD(function(S){if(!br.is(S,u)||!br.is(S&&S[0],u)){S=br.parsePathString(S)}var b=[],R=0,d=0,bR=0,bN=0,bQ=0;if(S[0][0]=="M"){R=S[0][1];d=S[0][2];bR=R;bN=d;bQ++;b[aT](["M",R,d])}for(var bP=bQ,bS=S[aS];bP<bS;bP++){var bO=b[bP]=[],bK=S[bP];if(bK[0]!=N.call(bK[0])){bO[0]=N.call(bK[0]);switch(bO[0]){case"a":bO[1]=bK[1];bO[2]=bK[2];bO[3]=bK[3];bO[4]=bK[4];bO[5]=bK[5];bO[6]=+(bK[6]-R).toFixed(3);bO[7]=+(bK[7]-d).toFixed(3);break;case"v":bO[1]=+(bK[1]-d).toFixed(3);break;case"m":bR=bK[1];bN=bK[2];default:for(var bL=1,E=bK[aS];bL<E;bL++){bO[bL]=+(bK[bL]-((bL%2)?R:d)).toFixed(3)}}}else{bO=b[bP]=[];if(bK[0]=="m"){bR=bK[1]+R;bN=bK[2]+d}for(var e=0,bM=bK[aS];e<bM;e++){b[bP][e]=bK[e]}}var bJ=b[bP][aS];switch(b[bP][0]){case"z":R=bR;d=bN;break;case"h":R+=+b[bP][bJ-1];break;case"v":d+=+b[bP][bJ-1];break;default:R+=+b[bP][bJ-2];d+=+b[bP][bJ-1]}}b[aP]=br._path2string;return b},0,aN),ai=bD(function(S){if(!br.is(S,u)||!br.is(S&&S[0],u)){S=br.parsePathString(S)}var b=[],R=0,d=0,bQ=0,bM=0,bP=0;if(S[0][0]=="M"){R=+S[0][1];d=+S[0][2];bQ=R;bM=d;bP++;b[0]=["M",R,d]}for(var bO=bP,bR=S[aS];bO<bR;bO++){var bN=b[bO]=[],bJ=S[bO];if(bJ[0]!=h.call(bJ[0])){bN[0]=h.call(bJ[0]);switch(bN[0]){case"A":bN[1]=bJ[1];bN[2]=bJ[2];bN[3]=bJ[3];bN[4]=bJ[4];bN[5]=bJ[5];bN[6]=+(bJ[6]+R);bN[7]=+(bJ[7]+d);break;case"V":bN[1]=+bJ[1]+d;break;case"H":bN[1]=+bJ[1]+R;break;case"M":bQ=+bJ[1]+R;bM=+bJ[2]+d;default:for(var bK=1,E=bJ[aS];bK<E;bK++){bN[bK]=+bJ[bK]+((bK%2)?R:d)}}}else{for(var e=0,bL=bJ[aS];e<bL;e++){b[bO][e]=bJ[e]}}switch(bN[0]){case"Z":R=bQ;d=bM;break;case"H":R=bN[1];break;case"V":d=bN[1];break;case"M":bQ=b[bO][b[bO][aS]-2];bM=b[bO][b[bO][aS]-1];default:R=b[bO][b[bO][aS]-2];d=b[bO][b[bO][aS]-1]}}b[aP]=br._path2string;return b},null,aN),aO=function(b,d,e,i){return[b,d,e,i,e,i]},aH=function(S,bJ,E,R,e,i){var d=1/3,b=2/3;return[d*S+b*E,d*bJ+b*R,d*e+b*E,d*i+b*R,e,i]},aR=function(b5,b6,S,b2,ch,ci,bP,b,d,cb){var b9=f*120/180,b0=f/180*(+ch||0),bS=[],b1,bJ=bD(function(i,cm,cn){var co=i*ap.cos(cn)-cm*ap.sin(cn),cp=i*ap.sin(cn)+cm*ap.cos(cn);return{x:co,y:cp}});if(!cb){b1=bJ(b5,b6,-b0);b5=b1.x;b6=b1.y;b1=bJ(b,d,-b0);b=b1.x;d=b1.y;var bT=ap.cos(f/180*ch),E=ap.sin(f/180*ch),bO=(b5-b)/2,cj=(b6-d)/2;var bV=(bO*bO)/(S*S)+(cj*cj)/(b2*b2);if(bV>1){bV=ap.sqrt(bV);S=bV*S;b2=bV*b2}var b3=S*S,cl=b2*b2,bY=(ci==bP?-1:1)*ap.sqrt(aF((b3*cl-b3*cj*cj-cl*bO*bO)/(b3*cj*cj+cl*bO*bO))),bR=bY*S*cj/b2+(b5+b)/2,cf=bY*-b2*bO/S+(b6+d)/2,cg=ap.asin(((b6-cf)/b2).toFixed(9)),e=ap.asin(((d-cf)/b2).toFixed(9));cg=b5<bR?f-cg:cg;e=b<bR?f-e:e;cg<0&&(cg=f*2+cg);e<0&&(e=f*2+e);if(bP&&cg>e){cg=cg-f*2}if(!bP&&e>cg){e=e-f*2}}else{cg=cb[0];e=cb[1];bR=cb[2];cf=cb[3]}var ck=e-cg;if(aF(ck)>b9){var bX=e,b4=b,bQ=d;e=cg+b9*(bP&&e>cg?1:-1);b=bR+S*ap.cos(e);d=cf+b2*ap.sin(e);bS=aR(b,d,S,b2,ch,0,bP,b4,bQ,[e,bX,bR,cf])}ck=e-cg;var ce=ap.cos(cg),b8=ap.sin(cg),ca=ap.cos(e),R=ap.sin(e),bU=ap.tan(ck/4),bL=4/3*S*bU,b7=4/3*b2*bU,cd=[b5,b6],bM=[b5+bL*b8,b6-b7*ce],cc=[b+bL*R,d-b7*ca],bN=[b,d];bM[0]=2*cd[0]-bM[0];bM[1]=2*cd[1]-bM[1];if(cb){return[bM,cc,bN][aq](bS)}else{bS=[bM,cc,bN][aq](bS)[bt]()[aU](",");var bK=[];for(var bW=0,bZ=bS[aS];bW<bZ;bW++){bK[bW]=bW%2?bJ(bS[bW-1],bS[bW],b0).y:bJ(bS[bW],bS[bW+1],b0).x}return bK}},bA=function(bK,bL,S,bJ,b,d,e,i,R){var E=1-R;return{x:M(E,3)*bK+M(E,2)*3*R*S+E*3*R*R*b+M(R,3)*e,y:M(E,3)*bL+M(E,2)*3*R*bJ+E*3*R*R*d+M(R,3)*i}},bq=bD(function(bQ,bS,bO,bP,d,i,E,S){var bJ=(d-2*bO+bQ)-(E-2*d+bO),bK=2*(bO-bQ)-2*(d-bO),bL=bQ-bO,e=(-bK+ap.sqrt(bK*bK-4*bJ*bL))/2/bJ,bR=(-bK-ap.sqrt(bK*bK-4*bJ*bL))/2/bJ,bM=[bS,S],R=[bQ,E],bN;aF(e)>"1e12"&&(e=0.5);aF(bR)>"1e12"&&(bR=0.5);if(e>0&&e<1){bN=bA(bQ,bS,bO,bP,d,i,E,S,e);R[aT](bN.x);bM[aT](bN.y)}if(bR>0&&bR<1){bN=bA(bQ,bS,bO,bP,d,i,E,S,bR);R[aT](bN.x);bM[aT](bN.y)}bJ=(i-2*bP+bS)-(S-2*i+bP);bK=2*(bP-bS)-2*(i-bP);bL=bS-bP;e=(-bK+ap.sqrt(bK*bK-4*bJ*bL))/2/bJ;bR=(-bK-ap.sqrt(bK*bK-4*bJ*bL))/2/bJ;aF(e)>"1e12"&&(e=0.5);aF(bR)>"1e12"&&(bR=0.5);if(e>0&&e<1){bN=bA(bQ,bS,bO,bP,d,i,E,S,e);R[aT](bN.x);bM[aT](bN.y)}if(bR>0&&bR<1){bN=bA(bQ,bS,bO,bP,d,i,E,S,bR);R[aT](bN.x);bM[aT](bN.y)}return{min:{x:a6[aQ](0,R),y:a6[aQ](0,bM)},max:{x:bj[aQ](0,R),y:bj[aQ](0,bM)}}}),J=bD(function(bP,bL){var bJ=ai(bP),bK=bL&&ai(bL),bR={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},bM={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d=function(bT,bU){var bS,i;if(!bT){return["C",bU.x,bU.y,bU.x,bU.y,bU.x,bU.y]}!(bT[0] in {T:1,Q:1})&&(bU.qx=bU.qy=null);switch(bT[0]){case"M":bU.X=bT[1];bU.Y=bT[2];break;case"A":bT=["C"][aq](aR[aQ](0,[bU.x,bU.y][aq](bT.slice(1))));break;case"S":bS=bU.x+(bU.x-(bU.bx||bU.x));i=bU.y+(bU.y-(bU.by||bU.y));bT=["C",bS,i][aq](bT.slice(1));break;case"T":bU.qx=bU.x+(bU.x-(bU.qx||bU.x));bU.qy=bU.y+(bU.y-(bU.qy||bU.y));bT=["C"][aq](aH(bU.x,bU.y,bU.qx,bU.qy,bT[1],bT[2]));break;case"Q":bU.qx=bT[1];bU.qy=bT[2];bT=["C"][aq](aH(bU.x,bU.y,bT[1],bT[2],bT[3],bT[4]));break;case"L":bT=["C"][aq](aO(bU.x,bU.y,bT[1],bT[2]));break;case"H":bT=["C"][aq](aO(bU.x,bU.y,bT[1],bU.y));break;case"V":bT=["C"][aq](aO(bU.x,bU.y,bU.x,bT[1]));break;case"Z":bT=["C"][aq](aO(bU.x,bU.y,bU.X,bU.Y));break}return bT},bQ=function(bS,bT){if(bS[bT][aS]>7){bS[bT].shift();var bU=bS[bT];while(bU[aS]){bS.splice(bT++,0,["C"][aq](bU.splice(0,6)))}bS.splice(bT,1);e=bj(bJ[aS],bK&&bK[aS]||0)}},E=function(bU,bT,bV,bS,bW){if(bU&&bT&&bU[bW][0]=="M"&&bT[bW][0]!="M"){bT.splice(bW,0,["M",bS.x,bS.y]);bV.bx=0;bV.by=0;bV.x=bU[bW][1];bV.y=bU[bW][2];e=bj(bJ[aS],bK&&bK[aS]||0)}};for(var b=0,e=bj(bJ[aS],bK&&bK[aS]||0);b<e;b++){bJ[b]=d(bJ[b],bR);bQ(bJ,b);bK&&(bK[b]=d(bK[b],bM));bK&&bQ(bK,b);E(bJ,bK,bR,bM,b);E(bK,bJ,bM,bR,b);var R=bJ[b],bN=bK&&bK[b],bO=R[aS],S=bK&&bN[aS];bR.x=R[bO-2];bR.y=R[bO-1];bR.bx=a8(R[bO-4])||bR.x;bR.by=a8(R[bO-3])||bR.y;bM.bx=bK&&(a8(bN[S-4])||bM.x);bM.by=bK&&(a8(bN[S-3])||bM.y);bM.x=bK&&bN[S-2];bM.y=bK&&bN[S-1]}return bK?[bJ,bK]:bJ},null,aN),aY=bD(function(bK){var e=[];for(var b=0,bL=bK[aS];b<bL;b++){var bJ={},S=bK[b].match(/^([^:]*):?([\d\.]*)/);bJ.color=br.getRGB(S[1]);if(bJ.color.error){return null}bJ.color=bJ.color.hex;S[2]&&(bJ.offset=S[2]+"%");e[aT](bJ)}for(b=1,bL=e[aS]-1;b<bL;b++){if(!e[b].offset){var bM=a8(e[b-1].offset||0),E=0;for(var R=b+1;R<bL;R++){if(e[R].offset){E=e[R].offset;break}}if(!E){E=100;R=bL}E=a8(E);var bN=(E-bM)/(R-b+1);for(;b<R;b++){bM+=bN;e[b].offset=bM+"%"}}}return e}),aK=function(b,d,e,i){var E;if(br.is(b,by)||br.is(b,"object")){E=br.is(b,by)?bu.getElementById(b):b;if(E.tagName){if(d==null){return{container:E,width:E.style.pixelWidth||E.offsetWidth,height:E.style.pixelHeight||E.offsetHeight}}else{return{container:E,width:d,height:e}}}}else{return{container:1,x:b,y:d,width:e,height:i}}},m=function(e,b){var d=this;for(var i in b){if(b[P](i)&&!(i in e)){switch(typeof b[i]){case"function":(function(E){e[i]=e===d?E:function(){return E[aQ](d,arguments)}})(b[i]);break;case"object":e[i]=e[i]||{};m.call(this,e[i],b[i]);break;default:e[i]=b[i];break}}}},bc=function(b,d){b==d.top&&(d.top=b.prev);b==d.bottom&&(d.bottom=b.next);b.next&&(b.next.prev=b.prev);b.prev&&(b.prev.next=b.next)},a4=function(b,d){if(d.top===b){return}bc(b,d);b.next=null;b.prev=d.top;d.top.next=b;d.top=b},p=function(b,d){if(d.bottom===b){return}bc(b,d);b.next=d.bottom;b.prev=null;d.bottom.prev=b;d.bottom=b},be=function(b,d,e){bc(b,e);d==e.top&&(e.top=b);d.next&&(d.next.prev=b);b.next=d.next;b.prev=d;d.next=b},bH=function(b,d,e){bc(b,e);d==e.bottom&&(e.bottom=b);d.prev&&(d.prev.next=b);b.prev=d.prev;d.prev=b;b.next=d},q=function(b){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+b+"\u201d of removed object")}};br.pathToRelative=j;if(br.svg){bn.svgns="http://www.w3.org/2000/svg";bn.xlink="http://www.w3.org/1999/xlink";bx=function(b){return +b+(~~b===b)*0.5};var am=function(d,e){if(e){for(var b in e){if(e[P](b)){d[W](b,A(e[b]))}}}else{d=bu.createElementNS(bn.svgns,d);d.style.webkitTapHighlightColor="rgba(0,0,0,0)";return d}};br[aP]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var O=function(d,e){var b=am("path");e.canvas&&e.canvas[bF](b);var i=new af(b,e);i.type="path";aM(i,{fill:"none",stroke:"#000",path:d});return i};var X=function(b,bN,S){var bJ="linear",bO=0.5,d=0.5,bP=b.style;bN=A(bN)[bE](bh,function(bV,bU,i){bJ="radial";if(bU&&i){bO=a8(bU);d=a8(i);var bT=((d>0.5)*2-1);M(bO-0.5,2)+M(d-0.5,2)>0.25&&(d=ap.sqrt(0.25-M(bO-0.5,2))*bT+0.5)&&d!=0.5&&(d=d.toFixed(5)-1e-05*bT)}return bC});bN=bN[aU](/\s*\-\s*/);if(bJ=="linear"){var bK=bN.shift();bK=-a8(bK);if(isNaN(bK)){return null}var e=[0,0,ap.cos(bK*f/180),ap.sin(bK*f/180)],bR=1/(bj(aF(e[2]),aF(e[3]))||1);e[2]*=bR;e[3]*=bR;if(e[2]<0){e[0]=-e[2];e[2]=0}if(e[3]<0){e[1]=-e[3];e[3]=0}}var bS=aY(bN);if(!bS){return null}var bM=b.getAttribute(bI);bM=bM.match(/^url\(#(.*)\)$/);bM&&S.defs.removeChild(bu.getElementById(bM[1]));var bL=am(bJ+"Gradient");bL.id=bk();am(bL,bJ=="radial"?{fx:bO,fy:d}:{x1:e[0],y1:e[1],x2:e[2],y2:e[3]});S.defs[bF](bL);for(var R=0,E=bS[aS];R<E;R++){var bQ=am("stop");am(bQ,{offset:bS[R].offset?bS[R].offset:!R?"0%":"100%","stop-color":bS[R].color||"#fff"});bL[bF](bQ)}am(b,{fill:"url(#"+bL.id+")",opacity:1,"fill-opacity":1});bP.fill=bC;bP.opacity=1;bP.fillOpacity=1;return 1};var al=function(b){var d=b.getBBox();am(b.pattern,{patternTransform:br.format("translate({0},{1})",d.x,d.y)})};var aM=function(bN,bK){var i={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},bY=bN.node,bP=bN.attrs,bW=bN.rotate(),S=function(b2,b1){b1=i[N.call(b1)];if(b1){var b3=b2.attrs["stroke-width"]||"1",b0={round:b3,square:b3,butt:0}[b2.attrs["stroke-linecap"]||bK["stroke-linecap"]]||0,b4=[];var b5=b1[aS];while(b5--){b4[b5]=b1[b5]*b3+((b5%2)?1:-1)*b0}am(bY,{"stroke-dasharray":b4[bt](",")})}};bK[P]("rotation")&&(bW=bK.rotation);var R=A(bW)[aU](aj);if(!(R.length-1)){R=null}else{R[1]=+R[1];R[2]=+R[2]}a8(bW)&&bN.rotate(0,true);for(var bO in bK){if(bK[P](bO)){if(!a[P](bO)){continue}var b=bK[bO];bP[bO]=b;switch(bO){case"blur":bN.blur(b);break;case"rotation":bN.rotate(b,true);break;case"href":case"title":case"target":var e=bY.parentNode;if(N.call(e.tagName)!="a"){var bQ=am("a");e.insertBefore(bQ,bY);bQ[bF](bY);e=bQ}if(bO=="target"&&b=="blank"){e.setAttributeNS(bN.paper.xlink,"show","new")}else{e.setAttributeNS(bN.paper.xlink,bO,b)}break;case"cursor":bY.style.cursor=b;break;case"clip-rect":var E=A(b)[aU](aj);if(E[aS]==4){bN.clip&&bN.clip.parentNode.parentNode.removeChild(bN.clip.parentNode);var bV=am("clipPath"),d=am("rect");bV.id=bk();am(d,{x:E[0],y:E[1],width:E[2],height:E[3]});bV[bF](d);bN.paper.defs[bF](bV);am(bY,{"clip-path":"url(#"+bV.id+")"});bN.clip=d}if(!b){var bZ=bu.getElementById(bY.getAttribute("clip-path")[bE](/(^url\(#|\)$)/g,bC));bZ&&bZ.parentNode.removeChild(bZ);am(bY,{"clip-path":bC});delete bN.clip}break;case"path":if(bN.type=="path"){am(bY,{d:b?bP.path=ai(b):"M0,0"})}break;case"width":bY[W](bO,b);if(bP.fx){bO="x";b=bP.x}else{break}case"x":if(bP.fx){b=-bP.x-(bP.width||0)}case"rx":if(bO=="rx"&&bN.type=="rect"){break}case"cx":R&&(bO=="x"||bO=="cx")&&(R[1]+=b-bP[bO]);bY[W](bO,b);bN.pattern&&al(bN);break;case"height":bY[W](bO,b);if(bP.fy){bO="y";b=bP.y}else{break}case"y":if(bP.fy){b=-bP.y-(bP.height||0)}case"ry":if(bO=="ry"&&bN.type=="rect"){break}case"cy":R&&(bO=="y"||bO=="cy")&&(R[2]+=b-bP[bO]);bY[W](bO,b);bN.pattern&&al(bN);break;case"r":if(bN.type=="rect"){am(bY,{rx:b,ry:b})}else{bY[W](bO,b)}break;case"src":if(bN.type=="image"){bY.setAttributeNS(bN.paper.xlink,"href",b)}break;case"stroke-width":bY.style.strokeWidth=b;bY[W](bO,b);if(bP["stroke-dasharray"]){S(bN,bP["stroke-dasharray"])}break;case"stroke-dasharray":S(bN,b);break;case"translation":var bX=A(b)[aU](aj);bX[0]=+bX[0]||0;bX[1]=+bX[1]||0;if(R){R[1]+=bX[0];R[2]+=bX[1]}az.call(bN,bX[0],bX[1]);break;case"scale":bX=A(b)[aU](aj);bN.scale(+bX[0]||1,+bX[1]||+bX[0]||1,isNaN(a8(bX[2]))?null:+bX[2],isNaN(a8(bX[3]))?null:+bX[3]);break;case bI:var bM=A(b).match(H);if(bM){bV=am("pattern");var bU=am("image");bV.id=bk();am(bV,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});am(bU,{x:0,y:0});bU.setAttributeNS(bN.paper.xlink,"href",bM[1]);bV[bF](bU);var bL=bu.createElement("img");bL.style.cssText="position:absolute;left:-9999em;top-9999em";bL.onload=function(){am(bV,{width:this.offsetWidth,height:this.offsetHeight});am(bU,{width:this.offsetWidth,height:this.offsetHeight});bu.body.removeChild(this);bN.paper.safari()};bu.body[bF](bL);bL.src=bM[1];bN.paper.defs[bF](bV);bY.style.fill="url(#"+bV.id+")";am(bY,{fill:"url(#"+bV.id+")"});bN.pattern=bV;bN.pattern&&al(bN);break}var bS=br.getRGB(b);if(!bS.error){delete bK.gradient;delete bP.gradient;!br.is(bP.opacity,"undefined")&&br.is(bK.opacity,"undefined")&&am(bY,{opacity:bP.opacity});!br.is(bP["fill-opacity"],"undefined")&&br.is(bK["fill-opacity"],"undefined")&&am(bY,{"fill-opacity":bP["fill-opacity"]})}else{if((({circle:1,ellipse:1})[P](bN.type)||A(b).charAt()!="r")&&X(bY,b,bN.paper)){bP.gradient=b;bP.fill="none";break}}bS[P]("opacity")&&am(bY,{"fill-opacity":bS.opacity>1?bS.opacity/100:bS.opacity});case"stroke":bS=br.getRGB(b);bY[W](bO,bS.hex);bO=="stroke"&&bS[P]("opacity")&&am(bY,{"stroke-opacity":bS.opacity>1?bS.opacity/100:bS.opacity});break;case"gradient":(({circle:1,ellipse:1})[P](bN.type)||A(b).charAt()!="r")&&X(bY,b,bN.paper);break;case"opacity":if(bP.gradient&&!bP[P]("stroke-opacity")){am(bY,{"stroke-opacity":b>1?b/100:b})}case"fill-opacity":if(bP.gradient){var bT=bu.getElementById(bY.getAttribute(bI)[bE](/^url\(#|\)$/g,bC));if(bT){var bJ=bT.getElementsByTagName("stop");bJ[bJ[aS]-1][W]("stop-opacity",b)}break}default:bO=="font-size"&&(b=B(b,10)+"px");var bR=bO[bE](/(\-.)/g,function(b0){return h.call(b0.substring(1))});bY.style[bR]=b;bY[W](bO,b);break}}}D(bN,bK);if(R){bN.rotate(R.join(bv))}else{a8(bW)&&bN.rotate(bW,true)}};var ac=1.2,D=function(bK,R){if(bK.type!="text"||!(R[P]("text")||R[P]("font")||R[P]("font-size")||R[P]("x")||R[P]("y"))){return}var S=bK.attrs,d=bK.node,e=d.firstChild?B(bu.defaultView.getComputedStyle(d.firstChild,bC).getPropertyValue("font-size"),10):10;if(R[P]("text")){S.text=R.text;while(d.firstChild){d.removeChild(d.firstChild)}var bJ=A(R.text)[aU]("\n");for(var b=0,bM=bJ[aS];b<bM;b++){if(bJ[b]){var bL=am("tspan");b&&am(bL,{dy:e*ac,x:S.x});bL[bF](bu.createTextNode(bJ[b]));d[bF](bL)}}}else{bJ=d.getElementsByTagName("tspan");for(b=0,bM=bJ[aS];b<bM;b++){b&&am(bJ[b],{dy:e*ac,x:S.x})}}am(d,{y:S.y});var bN=bK.getBBox(),E=S.y-(bN.y+bN.height/2);E&&br.is(E,"finite")&&am(d,{y:S.y+E})},af=function(i,b){var d=0,e=0;this[0]=i;this.id=br._oid++;this.node=i;i.raphael=this;this.paper=b;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);this.prev=b.top;b.top&&(b.top.next=this);b.top=this;this.next=null};var bl=af[L];af[L].rotate=function(i,e,b){if(this.removed){return this}if(i==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][bt](bv)}return this._.rt.deg}var d=this.getBBox();i=A(i)[aU](aj);if(i[aS]-1){e=a8(i[1]);b=a8(i[2])}i=a8(i[0]);if(e!=null&&e!==false){this._.rt.deg=i}else{this._.rt.deg+=i}(b==null)&&(e=null);this._.rt.cx=e;this._.rt.cy=b;e=e==null?d.x+d.width/2:e;b=b==null?d.y+d.height/2:b;if(this._.rt.deg){this.transformations[0]=br.format("rotate({0} {1} {2})",this._.rt.deg,e,b);this.clip&&am(this.clip,{transform:br.format("rotate({0} {1} {2})",-this._.rt.deg,e,b)})}else{this.transformations[0]=bC;this.clip&&am(this.clip,{transform:bC})}am(this.node,{transform:this.transformations[bt](bv)});return this};af[L].hide=function(){!this.removed&&(this.node.style.display="none");return this};af[L].show=function(){!this.removed&&(this.node.style.display="");return this};af[L].remove=function(){if(this.removed){return}bc(this,this.paper);this.node.parentNode.removeChild(this.node);for(var b in this){delete this[b]}this.removed=true};af[L].getBBox=function(){if(this.removed){return this}if(this.type=="path"){return Q(this.attrs.path)}if(this.node.style.display=="none"){this.show();var E=true}var S={};try{S=this.node.getBBox()}catch(d){}finally{S=S||{}}if(this.type=="text"){S={x:S.x,y:Infinity,width:0,height:0};for(var R=0,b=this.node.getNumberOfChars();R<b;R++){var bJ=this.node.getExtentOfChar(R);(bJ.y<S.y)&&(S.y=bJ.y);(bJ.y+bJ.height-S.y>S.height)&&(S.height=bJ.y+bJ.height-S.y);(bJ.x+bJ.width-S.x>S.width)&&(S.width=bJ.x+bJ.width-S.x)}}E&&this.hide();return S};af[L].attr=function(S,R){if(this.removed){return this}if(S==null){var bN={};for(var b in this.attrs){if(this.attrs[P](b)){bN[b]=this.attrs[b]}}this._.rt.deg&&(bN.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(bN.scale=this.scale());bN.gradient&&bN.fill=="none"&&(bN.fill=bN.gradient)&&delete bN.gradient;return bN}if(R==null&&br.is(S,by)){if(S=="translation"){return az.call(this)}if(S=="rotation"){return this.rotate()}if(S=="scale"){return this.scale()}if(S==bI&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[S]}if(R==null&&br.is(S,u)){var bJ={};for(var d=0,e=S.length;d<e;d++){bJ[S[d]]=this.attr(S[d])}return bJ}if(R!=null){var E={};E[S]=R}else{if(S!=null&&br.is(S,"object")){E=S}}for(var bL in this.paper.customAttributes){if(this.paper.customAttributes[P](bL)&&E[P](bL)&&br.is(this.paper.customAttributes[bL],"function")){var bM=this.paper.customAttributes[bL].apply(this,[][aq](E[bL]));this.attrs[bL]=E[bL];for(var bK in bM){if(bM[P](bK)){E[bK]=bM[bK]}}}}aM(this,E);return this};af[L].toFront=function(){if(this.removed){return this}this.node.parentNode[bF](this.node);var b=this.paper;b.top!=this&&a4(this,b);return this};af[L].toBack=function(){if(this.removed){return this}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);p(this,this.paper);var b=this.paper}return this};af[L].insertAfter=function(b){if(this.removed){return this}var d=b.node||b[b.length-1].node;if(d.nextSibling){d.parentNode.insertBefore(this.node,d.nextSibling)}else{d.parentNode[bF](this.node)}be(this,b,this.paper);return this};af[L].insertBefore=function(b){if(this.removed){return this}var d=b.node||b[0].node;d.parentNode.insertBefore(this.node,d);bH(this,b,this.paper);return this};af[L].blur=function(b){var d=this;if(+b!==0){var i=am("filter"),e=am("feGaussianBlur");d.attrs.blur=b;i.id=bk();am(e,{stdDeviation:+b||1.5});i.appendChild(e);d.paper.defs.appendChild(i);d._blur=i;am(d.node,{filter:"url(#"+i.id+")"})}else{if(d._blur){d._blur.parentNode.removeChild(d._blur);delete d._blur;delete d.attrs.blur}d.node.removeAttribute("filter")}};var ax=function(d,R,e,b){var i=am("circle");d.canvas&&d.canvas[bF](i);var E=new af(i,d);E.attrs={cx:R,cy:e,r:b,fill:"none",stroke:"#000"};E.type="circle";am(i,E.attrs);return E},a5=function(d,e,i,S,bJ,R){var E=am("rect");d.canvas&&d.canvas[bF](E);var b=new af(E,d);b.attrs={x:e,y:i,width:S,height:bJ,r:R||0,rx:R||0,ry:R||0,fill:"none",stroke:"#000"};b.type="rect";am(E,b.attrs);return b},aX=function(d,S,e,b,R){var i=am("ellipse");d.canvas&&d.canvas[bF](i);var E=new af(i,d);E.attrs={cx:S,cy:e,rx:b,ry:R,fill:"none",stroke:"#000"};E.type="ellipse";am(i,E.attrs);return E},ak=function(d,R,e,i,S,bJ){var E=am("image");am(E,{x:e,y:i,width:S,height:bJ,preserveAspectRatio:"none"});E.setAttributeNS(d.xlink,"href",R);d.canvas&&d.canvas[bF](E);var b=new af(E,d);b.attrs={x:e,y:i,width:S,height:bJ,src:R};b.type="image";return b},Y=function(b,E,d,R){var e=am("text");am(e,{x:E,y:d,"text-anchor":"middle"});b.canvas&&b.canvas[bF](e);var i=new af(e,b);i.attrs={x:E,y:d,"text-anchor":"middle",text:R,font:a.font,stroke:"none",fill:"#000"};i.type="text";aM(i,i.attrs);return i},a1=function(d,b){this.width=d||this.width;this.height=b||this.height;this.canvas[W]("width",this.width);this.canvas[W]("height",this.height);return this},ag=function(){var E=aK[aQ](0,arguments),d=E&&E.container,b=E.x,R=E.y,e=E.width,i=E.height;if(!d){throw new Error("SVG container not found.")}var S=am("svg");b=b||0;R=R||0;e=e||512;i=i||342;am(S,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:i});if(d==1){S.style.cssText="position:absolute;left:"+b+"px;top:"+R+"px";bu.body[bF](S)}else{if(d.firstChild){d.insertBefore(S,d.firstChild)}else{d[bF](S)}}d=new ba;d.width=e;d.height=i;d.canvas=S;m.call(d,d,br.fn);d.clear();return d};bn.clear=function(){var b=this.canvas;while(b.firstChild){b.removeChild(b.firstChild)}this.bottom=this.top=null;(this.desc=am("desc"))[bF](bu.createTextNode("Created with Rapha\xebl"));b[bF](this.desc);b[bF](this.defs=am("defs"))};bn.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=q(b)}}}if(br.vml){var G={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bG=/([clmz]),?([^clmz]*)/gi,a7=/ progid:\S+Blur\([^\)]+\)/g,w=/-?[^,\s-]+/g,an=1000+bv+1000,aI=10,ad={path:1,rect:1},aJ=function(bM){var R=/[ahqstv]/ig,e=ai;A(bM).match(R)&&(e=J);R=/[clmz]/g;if(e==ai&&!A(bM).match(R)){var b=A(bM)[bE](bG,function(bR,i,bO){var bS=[],bP=N.call(i)=="m",bQ=G[i];bO[bE](w,function(bT){if(bP&&bS[aS]==2){bQ+=bS+G[i=="m"?"l":"L"];bS=[]}bS[aT](bx(bT*aI))});return bQ+bS});return b}var S=e(bM),bJ,bK;b=[];for(var bL=0,bN=S[aS];bL<bN;bL++){bJ=S[bL];bK=N.call(S[bL][0]);bK=="z"&&(bK="x");for(var d=1,E=bJ[aS];d<E;d++){bK+=bx(bJ[d]*aI)+(d!=E-1?",":bC)}b[aT](bK)}return b[bt](bv)};br[aP]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};O=function(e,i){var S=Z("group");S.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";S.coordsize=i.coordsize;S.coordorigin=i.coordorigin;var d=Z("shape"),E=d.style;E.width=i.width+"px";E.height=i.height+"px";d.coordsize=an;d.coordorigin=i.coordorigin;S[bF](d);var R=new af(d,S,i),b={fill:"none",stroke:"#000"};e&&(b.path=e);R.type="path";R.path=[];R.Path=bC;aM(R,b);i.canvas[bF](S);return R};aM=function(bO,bQ){bO.attrs=bO.attrs||{};var bJ=bO.node,bP=bO.attrs,i=bJ.style,bK,S=(bQ.x!=bP.x||bQ.y!=bP.y||bQ.width!=bP.width||bQ.height!=bP.height||bQ.r!=bP.r)&&bO.type=="rect",bR=bO;for(var E in bQ){if(bQ[P](E)){bP[E]=bQ[E]}}if(S){bP.path=ah(bP.x,bP.y,bP.width,bP.height,bP.r);bO.X=bP.x;bO.Y=bP.y;bO.W=bP.width;bO.H=bP.height}bQ.href&&(bJ.href=bQ.href);bQ.title&&(bJ.title=bQ.title);bQ.target&&(bJ.target=bQ.target);bQ.cursor&&(i.cursor=bQ.cursor);"blur" in bQ&&bO.blur(bQ.blur);if(bQ.path&&bO.type=="path"||S){bJ.path=aJ(bP.path)}if(bQ.rotation!=null){bO.rotate(bQ.rotation,true)}if(bQ.translation){bK=A(bQ.translation)[aU](aj);az.call(bO,bK[0],bK[1]);if(bO._.rt.cx!=null){bO._.rt.cx+=+bK[0];bO._.rt.cy+=+bK[1];bO.setBox(bO.attrs,bK[0],bK[1])}}if(bQ.scale){bK=A(bQ.scale)[aU](aj);bO.scale(+bK[0]||1,+bK[1]||+bK[0]||1,+bK[2]||null,+bK[3]||null)}if("clip-rect" in bQ){var bL=A(bQ["clip-rect"])[aU](aj);if(bL[aS]==4){bL[2]=+bL[2]+(+bL[0]);bL[3]=+bL[3]+(+bL[1]);var bW=bJ.clipRect||bu.createElement("div"),bM=bW.style,bT=bJ.parentNode;bM.clip=br.format("rect({1}px {2}px {3}px {0}px)",bL);if(!bJ.clipRect){bM.position="absolute";bM.top=0;bM.left=0;bM.width=bO.paper.width+"px";bM.height=bO.paper.height+"px";bT.parentNode.insertBefore(bW,bT);bW[bF](bT);bJ.clipRect=bW}}if(!bQ["clip-rect"]){bJ.clipRect&&(bJ.clipRect.style.clip=bC)}}if(bO.type=="image"&&bQ.src){bJ.src=bQ.src}if(bO.type=="image"&&bQ.opacity){bJ.filterOpacity=a0+".Alpha(opacity="+(bQ.opacity*100)+")";i.filter=(bJ.filterMatrix||bC)+(bJ.filterOpacity||bC)}bQ.font&&(i.font=bQ.font);bQ["font-family"]&&(i.fontFamily='"'+bQ["font-family"][aU](",")[0][bE](/^['"]+|['"]+$/g,bC)+'"');bQ["font-size"]&&(i.fontSize=bQ["font-size"]);bQ["font-weight"]&&(i.fontWeight=bQ["font-weight"]);bQ["font-style"]&&(i.fontStyle=bQ["font-style"]);if(bQ.opacity!=null||bQ["stroke-width"]!=null||bQ.fill!=null||bQ.stroke!=null||bQ["stroke-width"]!=null||bQ["stroke-opacity"]!=null||bQ["fill-opacity"]!=null||bQ["stroke-dasharray"]!=null||bQ["stroke-miterlimit"]!=null||bQ["stroke-linejoin"]!=null||bQ["stroke-linecap"]!=null){bJ=bO.shape||bJ;var bS=(bJ.getElementsByTagName(bI)&&bJ.getElementsByTagName(bI)[0]),bU=false;!bS&&(bU=bS=Z(bI));if("fill-opacity" in bQ||"opacity" in bQ){var bV=((+bP["fill-opacity"]+1||2)-1)*((+bP.opacity+1||2)-1)*((+br.getRGB(bQ.fill).o+1||2)-1);bV=a6(bj(bV,0),1);bS.opacity=bV}bQ.fill&&(bS.on=true);if(bS.on==null||bQ.fill=="none"){bS.on=false}if(bS.on&&bQ.fill){var bX=bQ.fill.match(H);if(bX){bS.src=bX[1];bS.type="tile"}else{bS.color=br.getRGB(bQ.fill).hex;bS.src=bC;bS.type="solid";if(br.getRGB(bQ.fill).error&&(bR.type in {circle:1,ellipse:1}||A(bQ.fill).charAt()!="r")&&X(bR,bQ.fill)){bP.fill="none";bP.gradient=bQ.fill}}}bU&&bJ[bF](bS);var d=(bJ.getElementsByTagName("stroke")&&bJ.getElementsByTagName("stroke")[0]),b=false;!d&&(b=d=Z("stroke"));if((bQ.stroke&&bQ.stroke!="none")||bQ["stroke-width"]||bQ["stroke-opacity"]!=null||bQ["stroke-dasharray"]||bQ["stroke-miterlimit"]||bQ["stroke-linejoin"]||bQ["stroke-linecap"]){d.on=true}(bQ.stroke=="none"||d.on==null||bQ.stroke==0||bQ["stroke-width"]==0)&&(d.on=false);var R=br.getRGB(bQ.stroke);d.on&&bQ.stroke&&(d.color=R.hex);bV=((+bP["stroke-opacity"]+1||2)-1)*((+bP.opacity+1||2)-1)*((+R.o+1||2)-1);var bN=(a8(bQ["stroke-width"])||1)*0.75;bV=a6(bj(bV,0),1);bQ["stroke-width"]==null&&(bN=bP["stroke-width"]);bQ["stroke-width"]&&(d.weight=bN);bN&&bN<1&&(bV*=bN)&&(d.weight=1);d.opacity=bV;bQ["stroke-linejoin"]&&(d.joinstyle=bQ["stroke-linejoin"]||"miter");d.miterlimit=bQ["stroke-miterlimit"]||8;bQ["stroke-linecap"]&&(d.endcap=bQ["stroke-linecap"]=="butt"?"flat":bQ["stroke-linecap"]=="square"?"square":"round");if(bQ["stroke-dasharray"]){var e={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};d.dashstyle=e[P](bQ["stroke-dasharray"])?e[bQ["stroke-dasharray"]]:bC}b&&bJ[bF](d)}if(bR.type=="text"){i=bR.paper.span.style;bP.font&&(i.font=bP.font);bP["font-family"]&&(i.fontFamily=bP["font-family"]);bP["font-size"]&&(i.fontSize=bP["font-size"]);bP["font-weight"]&&(i.fontWeight=bP["font-weight"]);bP["font-style"]&&(i.fontStyle=bP["font-style"]);bR.node.string&&(bR.paper.span.innerHTML=A(bR.node.string)[bE](/</g,"&#60;")[bE](/&/g,"&#38;")[bE](/\n/g,"<br>"));bR.W=bP.w=bR.paper.span.offsetWidth;bR.H=bP.h=bR.paper.span.offsetHeight;bR.X=bP.x;bR.Y=bP.y+bx(bR.H/2);switch(bP["text-anchor"]){case"start":bR.node.style["v-text-align"]="left";bR.bbx=bx(bR.W/2);break;case"end":bR.node.style["v-text-align"]="right";bR.bbx=-bx(bR.W/2);break;default:bR.node.style["v-text-align"]="center";break}}};X=function(R,d){R.attrs=R.attrs||{};var bK=R.attrs,bM,S="linear",e=".5 .5";R.attrs.gradient=d;d=A(d)[bE](bh,function(bO,i,bP){S="radial";if(i&&bP){i=a8(i);bP=a8(bP);M(i-0.5,2)+M(bP-0.5,2)>0.25&&(bP=ap.sqrt(0.25-M(i-0.5,2))*((bP>0.5)*2-1)+0.5);e=i+bv+bP}return bC});d=d[aU](/\s*\-\s*/);if(S=="linear"){var bJ=d.shift();bJ=-a8(bJ);if(isNaN(bJ)){return null}}var bN=aY(d);if(!bN){return null}R=R.shape||R.node;bM=R.getElementsByTagName(bI)[0]||Z(bI);!bM.parentNode&&R.appendChild(bM);if(bN[aS]){bM.on=true;bM.method="none";bM.color=bN[0].color;bM.color2=bN[bN[aS]-1].color;var bL=[];for(var b=0,E=bN[aS];b<E;b++){bN[b].offset&&bL[aT](bN[b].offset+bv+bN[b].color)}bM.colors&&(bM.colors.value=bL[aS]?bL[bt]():"0% "+bM.color);if(S=="radial"){bM.type="gradientradial";bM.focus="100%";bM.focussize=e;bM.focusposition=e}else{bM.type="gradient";bM.angle=(270-bJ)%360}}return 1};af=function(S,e,i){var E=0,R=0,b=0,d=1;this[0]=S;this.id=br._oid++;this.node=S;S.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=e;this.paper=i;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!i.bottom&&(i.bottom=this);this.prev=i.top;i.top&&(i.top.next=this);i.top=this;this.next=null};bl=af[L];bl.rotate=function(e,d,b){if(this.removed){return this}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][bt](bv)}return this._.rt.deg}e=A(e)[aU](aj);if(e[aS]-1){d=a8(e[1]);b=a8(e[2])}e=a8(e[0]);if(d!=null){this._.rt.deg=e}else{this._.rt.deg+=e}b==null&&(d=null);this._.rt.cx=d;this._.rt.cy=b;this.setBox(this.attrs,d,b);this.Group.style.rotation=this._.rt.deg;return this};bl.setBox=function(R,bL,bQ){if(this.removed){return this}var bO=this.Group.style,bN=(this.shape&&this.shape.style)||this.node.style;R=R||{};for(var b in R){if(R[P](b)){this.attrs[b]=R[b]}}bL=bL||this._.rt.cx;bQ=bQ||this._.rt.cy;var E=this.attrs,S,bJ,bK,bR;switch(this.type){case"circle":S=E.cx-E.r;bJ=E.cy-E.r;bK=bR=E.r*2;break;case"ellipse":S=E.cx-E.rx;bJ=E.cy-E.ry;bK=E.rx*2;bR=E.ry*2;break;case"image":S=+E.x;bJ=+E.y;bK=E.width||0;bR=E.height||0;break;case"text":this.textpath.v=["m",bx(E.x),", ",bx(E.y-2),"l",bx(E.x)+1,", ",bx(E.y-2)][bt](bC);S=E.x-bx(this.W/2);bJ=E.y-this.H/2;bK=this.W;bR=this.H;break;case"rect":case"path":if(!this.attrs.path){S=0;bJ=0;bK=this.paper.width;bR=this.paper.height}else{var bM=Q(this.attrs.path);S=bM.x;bJ=bM.y;bK=bM.width;bR=bM.height}break;default:S=0;bJ=0;bK=this.paper.width;bR=this.paper.height;break}bL=(bL==null)?S+bK/2:bL;bQ=(bQ==null)?bJ+bR/2:bQ;var d=bL-this.paper.width/2,e=bQ-this.paper.height/2,bP;bO.left!=(bP=d+"px")&&(bO.left=bP);bO.top!=(bP=e+"px")&&(bO.top=bP);this.X=ad[P](this.type)?-d:S;this.Y=ad[P](this.type)?-e:bJ;this.W=bK;this.H=bR;if(ad[P](this.type)){bN.left!=(bP=-d*aI+"px")&&(bN.left=bP);bN.top!=(bP=-e*aI+"px")&&(bN.top=bP)}else{if(this.type=="text"){bN.left!=(bP=-d+"px")&&(bN.left=bP);bN.top!=(bP=-e+"px")&&(bN.top=bP)}else{bO.width!=(bP=this.paper.width+"px")&&(bO.width=bP);bO.height!=(bP=this.paper.height+"px")&&(bO.height=bP);bN.left!=(bP=S-d+"px")&&(bN.left=bP);bN.top!=(bP=bJ-e+"px")&&(bN.top=bP);bN.width!=(bP=bK+"px")&&(bN.width=bP);bN.height!=(bP=bR+"px")&&(bN.height=bP)}}};bl.hide=function(){!this.removed&&(this.Group.style.display="none");return this};bl.show=function(){!this.removed&&(this.Group.style.display="block");return this};bl.getBBox=function(){if(this.removed){return this}if(ad[P](this.type)){return Q(this.attrs.path)}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};bl.remove=function(){if(this.removed){return}bc(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this){delete this[b]}this.removed=true};bl.attr=function(R,E){if(this.removed){return this}if(R==null){var bM={};for(var b in this.attrs){if(this.attrs[P](b)){bM[b]=this.attrs[b]}}this._.rt.deg&&(bM.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(bM.scale=this.scale());bM.gradient&&bM.fill=="none"&&(bM.fill=bM.gradient)&&delete bM.gradient;return bM}if(E==null&&br.is(R,"string")){if(R=="translation"){return az.call(this)}if(R=="rotation"){return this.rotate()}if(R=="scale"){return this.scale()}if(R==bI&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[R]}if(this.attrs&&E==null&&br.is(R,u)){var bK,S={};for(b=0,bK=R[aS];b<bK;b++){S[R[b]]=this.attr(R[b])}return S}var e;if(E!=null){e={};e[R]=E}E==null&&br.is(R,"object")&&(e=R);if(e){for(var d in this.paper.customAttributes){if(this.paper.customAttributes[P](d)&&e[P](d)&&br.is(this.paper.customAttributes[d],"function")){var bL=this.paper.customAttributes[d].apply(this,[][aq](e[d]));this.attrs[d]=e[d];for(var bJ in bL){if(bL[P](bJ)){e[bJ]=bL[bJ]}}}}if(e.text&&this.type=="text"){this.node.string=e.text}aM(this,e);if(e.gradient&&(({circle:1,ellipse:1})[P](this.type)||A(e.gradient).charAt()!="r")){X(this,e.gradient)}(!ad[P](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};bl.toFront=function(){!this.removed&&this.Group.parentNode[bF](this.Group);this.paper.top!=this&&a4(this,this.paper);return this};bl.toBack=function(){if(this.removed){return this}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);p(this,this.paper)}return this};bl.insertAfter=function(b){if(this.removed){return this}if(b.constructor==aC){b=b[b.length-1]}if(b.Group.nextSibling){b.Group.parentNode.insertBefore(this.Group,b.Group.nextSibling)}else{b.Group.parentNode[bF](this.Group)}be(this,b,this.paper);return this};bl.insertBefore=function(b){if(this.removed){return this}if(b.constructor==aC){b=b[0]}b.Group.parentNode.insertBefore(this.Group,b.Group);bH(this,b,this.paper);return this};bl.blur=function(b){var d=this.node.runtimeStyle,e=d.filter;e=e.replace(a7,bC);if(+b!==0){this.attrs.blur=b;d.filter=e+bv+a0+".Blur(pixelradius="+(+b||1.5)+")";d.margin=br.format("-{0}px 0 0 -{0}px",bx(+b||1.5))}else{d.filter=e;d.margin=0;delete this.attrs.blur}};ax=function(R,b,i,S){var E=Z("group"),e=Z("oval"),d=e.style;E.style.cssText="position:absolute;left:0;top:0;width:"+R.width+"px;height:"+R.height+"px";E.coordsize=an;E.coordorigin=R.coordorigin;E[bF](e);var bJ=new af(e,E,R);bJ.type="circle";aM(bJ,{stroke:"#000",fill:"none"});bJ.attrs.cx=b;bJ.attrs.cy=i;bJ.attrs.r=S;bJ.setBox({x:b-S,y:i-S,width:S*2,height:S*2});R.canvas[bF](E);return bJ};function ah(d,e,i,E,b){if(b){return br.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",d+b,e,i-b*2,b,-b,E-b*2,b*2-i,b*2-E)}else{return br.format("M{0},{1}l{2},0,0,{3},{4},0z",d,e,i,E,-i)}}a5=function(E,d,e,bJ,bK,R){var S=ah(d,e,bJ,bK,R),b=E.path(S),i=b.attrs;b.X=i.x=d;b.Y=i.y=e;b.W=i.width=bJ;b.H=i.height=bK;i.r=R;i.path=S;b.type="rect";return b};aX=function(S,b,E,bJ,e){var R=Z("group"),i=Z("oval"),d=i.style;R.style.cssText="position:absolute;left:0;top:0;width:"+S.width+"px;height:"+S.height+"px";R.coordsize=an;R.coordorigin=S.coordorigin;R[bF](i);var bK=new af(i,R,S);bK.type="ellipse";aM(bK,{stroke:"#000"});bK.attrs.cx=b;bK.attrs.cy=E;bK.attrs.rx=bJ;bK.attrs.ry=e;bK.setBox({x:b-bJ,y:E-e,width:bJ*2,height:e*2});S.canvas[bF](R);return bK};ak=function(E,R,d,e,bJ,bK){var i=Z("group"),b=Z("image");i.style.cssText="position:absolute;left:0;top:0;width:"+E.width+"px;height:"+E.height+"px";i.coordsize=an;i.coordorigin=E.coordorigin;b.src=R;i[bF](b);var S=new af(b,i,E);S.type="image";S.attrs.src=R;S.attrs.x=d;S.attrs.y=e;S.attrs.w=bJ;S.attrs.h=bK;S.setBox({x:d,y:e,width:bJ,height:bK});E.canvas[bF](i);return S};Y=function(bL,e,i,S){var R=Z("group"),E=Z("shape"),d=E.style,bK=Z("path"),b=bK.style,bJ=Z("textpath");R.style.cssText="position:absolute;left:0;top:0;width:"+bL.width+"px;height:"+bL.height+"px";R.coordsize=an;R.coordorigin=bL.coordorigin;bK.v=br.format("m{0},{1}l{2},{1}",bx(e*10),bx(i*10),bx(e*10)+1);bK.textpathok=true;d.width=bL.width;d.height=bL.height;bJ.string=A(S);bJ.on=true;E[bF](bJ);E[bF](bK);R[bF](E);var bM=new af(bJ,R,bL);bM.shape=E;bM.textpath=bK;bM.type="text";bM.attrs.text=S;bM.attrs.x=e;bM.attrs.y=i;bM.attrs.w=1;bM.attrs.h=1;aM(bM,{font:a.font,stroke:"none",fill:"#000"});bM.setBox();bL.canvas[bF](R);return bM};a1=function(d,b){var e=this.canvas.style;d==+d&&(d+="px");b==+b&&(b+="px");e.width=d;e.height=b;e.clip="rect(0 "+d+" "+b+" 0)";return this};var Z;bu.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!bu.namespaces.rvml&&bu.namespaces.add("rvml","urn:schemas-microsoft-com:vml");Z=function(b){return bu.createElement("<rvml:"+b+' class="rvml">')}}catch(z){Z=function(b){return bu.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}ag=function(){var bJ=aK[aQ](0,arguments),d=bJ.container,bL=bJ.height,S,e=bJ.width,i=bJ.x,E=bJ.y;if(!d){throw new Error("VML container not found.")}var b=new ba,R=b.canvas=bu.createElement("div"),bK=R.style;i=i||0;E=E||0;e=e||512;bL=bL||342;e==+e&&(e+="px");bL==+bL&&(bL+="px");b.width=1000;b.height=1000;b.coordsize=aI*1000+bv+aI*1000;b.coordorigin="0 0";b.span=bu.createElement("span");b.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";R[bF](b.span);bK.cssText=br.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,bL);if(d==1){bu.body[bF](R);bK.left=i+"px";bK.top=E+"px";bK.position="absolute"}else{if(d.firstChild){d.insertBefore(R,d.firstChild)}else{d[bF](R)}}m.call(b,b,br.fn);return b};bn.clear=function(){this.canvas.innerHTML=bC;this.span=bu.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[bF](this.span);this.bottom=this.top=null};bn.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=q(b)}return true}}var bB=navigator.userAgent.match(/Version\/(.*?)\s/);if((navigator.vendor=="Apple Computer, Inc.")&&(bB&&bB[1]<4||navigator.platform.slice(0,2)=="iP")){bn.safari=function(){var b=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});aa.setTimeout(function(){b.remove()})}}else{bn.safari=function(){}}var n=function(){this.returnValue=false},a2=function(){return this.originalEvent.preventDefault()},K=function(){this.cancelBubble=true},bw=function(){return this.originalEvent.stopPropagation()},C=(function(){if(bu.addEventListener){return function(R,e,b,i){var d=au&&F[e]?F[e]:e;var E=function(bL){if(au&&F[P](e)){for(var bK=0,S=bL.targetTouches&&bL.targetTouches.length;bK<S;bK++){if(bL.targetTouches[bK].target==R){var bJ=bL;bL=bL.targetTouches[bK];bL.originalEvent=bJ;bL.preventDefault=a2;bL.stopPropagation=bw;break}}}return b.call(i,bL)};R.addEventListener(d,E,false);return function(){R.removeEventListener(d,E,false);return true}}}else{if(bu.attachEvent){return function(R,e,b,i){var E=function(S){S=S||aa.event;S.preventDefault=S.preventDefault||n;S.stopPropagation=S.stopPropagation||K;return b.call(i,S)};R.attachEvent("on"+e,E);var d=function(){R.detachEvent("on"+e,E);return true};return d}}}})(),av=[],aW=function(bK){var R=bK.clientX,S=bK.clientY,bL=bu.documentElement.scrollTop||bu.body.scrollTop,bM=bu.documentElement.scrollLeft||bu.body.scrollLeft,E,d=av.length;while(d--){E=av[d];if(au){var b=bK.touches.length,bJ;while(b--){bJ=bK.touches[b];if(bJ.identifier==E.el._drag.id){R=bJ.clientX;S=bJ.clientY;(bK.originalEvent?bK.originalEvent:bK).preventDefault();break}}}else{bK.preventDefault()}R+=bM;S+=bL;E.move&&E.move.call(E.move_scope||E.el,R-E.el._drag.x,S-E.el._drag.y,R,S,bK)}},ay=function(E){br.unmousemove(aW).unmouseup(ay);var d=av.length,b;while(d--){b=av[d];b.el._drag={};b.end&&b.end.call(b.end_scope||b.start_scope||b.move_scope||b.el,E)}av=[]};for(var y=at[aS];y--;){(function(b){br[b]=af[L][b]=function(d,e){if(br.is(d,"function")){this.events=this.events||[];this.events.push({name:b,f:d,unbind:C(this.shape||this.node||bu,b,d,e||this)})}return this};br["un"+b]=af[L]["un"+b]=function(d){var e=this.events,i=e[aS];while(i--){if(e[i].name==b&&e[i].f==d){e[i].unbind();e.splice(i,1);!e.length&&delete this.events;return this}}return this}})(at[y])}bl.hover=function(e,d,b,i){return this.mouseover(e,b).mouseout(d,i||b)};bl.unhover=function(d,b){return this.unmouseover(d).unmouseout(b)};bl.drag=function(R,e,b,i,d,E){this._drag={};this.mousedown(function(bK){(bK.originalEvent||bK).preventDefault();var bJ=bu.documentElement.scrollTop||bu.body.scrollTop,S=bu.documentElement.scrollLeft||bu.body.scrollLeft;this._drag.x=bK.clientX+S;this._drag.y=bK.clientY+bJ;this._drag.id=bK.identifier;e&&e.call(d||i||this,bK.clientX+S,bK.clientY+bJ,bK);!av.length&&br.mousemove(aW).mouseup(ay);av.push({el:this,move:R,end:b,move_scope:i,start_scope:d,end_scope:E})});return this};bl.undrag=function(E,d,b){var e=av.length;while(e--){av[e].el==this&&(av[e].move==E&&av[e].end==b)&&av.splice(e++,1)}!av.length&&br.unmousemove(aW).unmouseup(ay)};bn.circle=function(d,e,b){return ax(this,d||0,e||0,b||0)};bn.rect=function(d,e,i,E,b){return a5(this,d||0,e||0,i||0,E||0,b||0)};bn.ellipse=function(d,e,b,i){return aX(this,d||0,e||0,b||0,i||0)};bn.path=function(b){b&&!br.is(b,by)&&!br.is(b[0],u)&&(b+=bC);return O(br.format[aQ](br,arguments),this)};bn.image=function(E,b,d,e,i){return ak(this,E||"about:blank",b||0,d||0,e||0,i||0)};bn.text=function(b,d,e){return Y(this,b||0,d||0,A(e))};bn.set=function(b){arguments[aS]>1&&(b=Array[L].splice.call(arguments,0,arguments[aS]));return new aC(b)};bn.setSize=a1;bn.top=bn.bottom=null;bn.raphael=br;function bi(){return this.x+bv+this.y}bl.resetScale=function(){if(this.removed){return this}this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};bl.scale=function(bM,bN,bP,b8){if(this.removed){return this}if(bM==null&&bN==null){return{x:this._.sx,y:this._.sy,toString:bi}}bN=bN||bM;!+bN&&(bN=bM);var bQ,b9,e,b6,bY=this.attrs;if(bM!=0){var cc=this.getBBox(),b7=cc.x+cc.width/2,bR=cc.y+cc.height/2,bK=aF(bM/this._.sx),b5=aF(bN/this._.sy);bP=(+bP||bP==0)?bP:b7;b8=(+b8||b8==0)?b8:bR;var b1=this._.sx>0,bJ=this._.sy>0,d=~~(bM/aF(bM)),bO=~~(bN/aF(bN)),S=bK*d,b2=b5*bO,bT=this.node.style,cd=bP+aF(b7-bP)*S*(b7>bP==b1?1:-1),bW=b8+aF(bR-b8)*b2*(bR>b8==bJ?1:-1),R=(bM*d>bN*bO?b5:bK);switch(this.type){case"rect":case"image":var bL=bY.width*bK,cb=bY.height*b5;this.attr({height:cb,r:bY.r*R,width:bL,x:cd-bL/2,y:bW-cb/2});break;case"circle":case"ellipse":this.attr({rx:bY.rx*bK,ry:bY.ry*b5,r:bY.r*R,cx:cd,cy:bW});break;case"text":this.attr({x:cd,y:bW});break;case"path":var bZ=j(bY.path),bV=true,b3=b1?S:bK,ca=bJ?b2:b5;for(var bU=0,bX=bZ[aS];bU<bX;bU++){var bS=bZ[bU],b0=h.call(bS[0]);if(b0=="M"&&bV){continue}else{bV=false}if(b0=="A"){bS[bZ[bU][aS]-2]*=b3;bS[bZ[bU][aS]-1]*=ca;bS[1]*=bK;bS[2]*=b5;bS[5]=+(d+bO?!!+bS[5]:!+bS[5])}else{if(b0=="H"){for(var E=1,b=bS[aS];E<b;E++){bS[E]*=b3}}else{if(b0=="V"){for(E=1,b=bS[aS];E<b;E++){bS[E]*=ca}}else{for(E=1,b=bS[aS];E<b;E++){bS[E]*=(E%2)?b3:ca}}}}}var b4=Q(bZ);bQ=cd-b4.x-b4.width/2;b9=bW-b4.y-b4.height/2;bZ[0][1]+=bQ;bZ[0][2]+=b9;this.attr({path:bZ});break}if(this.type in {text:1,image:1}&&(d!=1||bO!=1)){if(this.transformations){this.transformations[2]="scale("[aq](d,",",bO,")");this.node[W]("transform",this.transformations[bt](bv));bQ=(d==-1)?-bY.x-(bL||0):bY.x;b9=(bO==-1)?-bY.y-(cb||0):bY.y;this.attr({x:bQ,y:b9});bY.fx=d-1;bY.fy=bO-1}else{this.node.filterMatrix=a0+".Matrix(M11="[aq](d,", M12=0, M21=0, M22=",bO,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bT.filter=(this.node.filterMatrix||bC)+(this.node.filterOpacity||bC)}}else{if(this.transformations){this.transformations[2]=bC;this.node[W]("transform",this.transformations[bt](bv));bY.fx=0;bY.fy=0}else{this.node.filterMatrix=bC;bT.filter=(this.node.filterMatrix||bC)+(this.node.filterOpacity||bC)}}bY.scale=[bM,bN,bP,b8][bt](bv);this._.sx=bM;this._.sy=bN}return this};bl.clone=function(){if(this.removed){return null}var b=this.attr();delete b.scale;delete b.translation;return this.paper[this.type]().attr(b)};var bp={},x=function(bL,bK,b,bR,S,bM,bS,bQ,bT){var bO=0,d=100,R=[bL,bK,b,bR,S,bM,bS,bQ].join(),bP=bp[R],E,bN;!bP&&(bp[R]=bP={data:[]});bP.timer&&clearTimeout(bP.timer);bP.timer=setTimeout(function(){delete bp[R]},2000);if(bT!=null){var e=x(bL,bK,b,bR,S,bM,bS,bQ);d=~~e*10}for(var bJ=0;bJ<d+1;bJ++){if(bP.data[bT]>bJ){bN=bP.data[bJ*d]}else{bN=br.findDotsAtSegment(bL,bK,b,bR,S,bM,bS,bQ,bJ/d);bP.data[bJ]=bN}bJ&&(bO+=M(M(E.x-bN.x,2)+M(E.y-bN.y,2),0.5));if(bT!=null&&bO>=bT){return bN}E=bN}if(bT==null){return bO}},a3=function(d,b){return function(bQ,bN,bP){bQ=J(bQ);var bJ,bK,bM,R,bR="",E={},bL,bO=0;for(var e=0,S=bQ.length;e<S;e++){bM=bQ[e];if(bM[0]=="M"){bJ=+bM[1];bK=+bM[2]}else{R=x(bJ,bK,bM[1],bM[2],bM[3],bM[4],bM[5],bM[6]);if(bO+R>bN){if(b&&!E.start){bL=x(bJ,bK,bM[1],bM[2],bM[3],bM[4],bM[5],bM[6],bN-bO);bR+=["C",bL.start.x,bL.start.y,bL.m.x,bL.m.y,bL.x,bL.y];if(bP){return bR}E.start=bR;bR=["M",bL.x,bL.y+"C",bL.n.x,bL.n.y,bL.end.x,bL.end.y,bM[5],bM[6]][bt]();bO+=R;bJ=+bM[5];bK=+bM[6];continue}if(!d&&!b){bL=x(bJ,bK,bM[1],bM[2],bM[3],bM[4],bM[5],bM[6],bN-bO);return{x:bL.x,y:bL.y,alpha:bL.alpha}}}bO+=R;bJ=+bM[5];bK=+bM[6]}bR+=bM}E.end=bR;bL=d?bO:b?E:br.findDotsAtSegment(bJ,bK,bM[1],bM[2],bM[3],bM[4],bM[5],bM[6],1);bL.alpha&&(bL={x:bL.x,y:bL.y,alpha:bL.alpha});return bL}};var bd=a3(1),aG=a3(),k=a3(0,1);bl.getTotalLength=function(){if(this.type!="path"){return}if(this.node.getTotalLength){return this.node.getTotalLength()}return bd(this.attrs.path)};bl.getPointAtLength=function(b){if(this.type!="path"){return}return aG(this.attrs.path,b)};bl.getSubpath=function(b,d){if(this.type!="path"){return}if(aF(this.getTotalLength()-d)<"1e-6"){return k(this.attrs.path,b).end}var e=k(this.attrs.path,d,1);return b?k(e,b).end:e};br.easing_formulas={linear:function(b){return b},"<":function(b){return M(b,3)},">":function(b){return M(b-1,3)+1},"<>":function(b){b=b*2;if(b<1){return M(b,3)/2}b-=2;return(M(b,3)+2)/2},backIn:function(b){var d=1.70158;return b*b*((d+1)*b-d)},backOut:function(b){b=b-1;var d=1.70158;return b*b*((d+1)*b+d)+1},elastic:function(b){if(b==0||b==1){return b}var e=0.3,d=e/4;return M(2,-10*b)*ap.sin((b-d)*(2*f)/e)+1},bounce:function(b){var d=7.5625,e=2.75,i;if(b<(1/e)){i=d*b*b}else{if(b<(2/e)){b-=(1.5/e);i=d*b*b+0.75}else{if(b<(2.5/e)){b-=(2.25/e);i=d*b*b+0.9375}else{b-=(2.625/e);i=d*b*b+0.984375}}}return i}};var aE=[],aw=function(){var bM=+new Date;for(var bP=0;bP<aE[aS];bP++){var bU=aE[bP];if(bU.stop||bU.el.removed){continue}var d=bM-bU.start,S=bU.ms,bW=bU.easing,bZ=bU.from,bT=bU.diff,bR=bU.to,bK=bU.t,bL=bU.el,bJ={},b;if(d<S){var bQ=bW(d/S);for(var bY in bZ){if(bZ[P](bY)){switch(bz[bY]){case"along":b=bQ*S*bT[bY];bR.back&&(b=bR.len-b);var bX=aG(bR[bY],b);bL.translate(bT.sx-bT.x||0,bT.sy-bT.y||0);bT.x=bX.x;bT.y=bX.y;bL.translate(bX.x-bT.sx,bX.y-bT.sy);bR.rot&&bL.rotate(bT.r+bX.alpha,bX.x,bX.y);break;case o:b=+bZ[bY]+bQ*S*bT[bY];break;case"colour":b="rgb("+[c(bx(bZ[bY].r+bQ*S*bT[bY].r)),c(bx(bZ[bY].g+bQ*S*bT[bY].g)),c(bx(bZ[bY].b+bQ*S*bT[bY].b))][bt](",")+")";break;case"path":b=[];for(var bN=0,R=bZ[bY][aS];bN<R;bN++){b[bN]=[bZ[bY][bN][0]];for(var bO=1,bV=bZ[bY][bN][aS];bO<bV;bO++){b[bN][bO]=+bZ[bY][bN][bO]+bQ*S*bT[bY][bN][bO]}b[bN]=b[bN][bt](bv)}b=b[bt](bv);break;case"csv":switch(bY){case"translation":var b0=bQ*S*bT[bY][0]-bK.x,E=bQ*S*bT[bY][1]-bK.y;bK.x+=b0;bK.y+=E;b=b0+bv+E;break;case"rotation":b=+bZ[bY][0]+bQ*S*bT[bY][0];bZ[bY][1]&&(b+=","+bZ[bY][1]+","+bZ[bY][2]);break;case"scale":b=[+bZ[bY][0]+bQ*S*bT[bY][0],+bZ[bY][1]+bQ*S*bT[bY][1],(2 in bR[bY]?bR[bY][2]:bC),(3 in bR[bY]?bR[bY][3]:bC)][bt](bv);break;case"clip-rect":b=[];bN=4;while(bN--){b[bN]=+bZ[bY][bN]+bQ*S*bT[bY][bN]}break}break;default:var bS=[].concat(bZ[bY]);b=[];bN=bL.paper.customAttributes[bY].length;while(bN--){b[bN]=+bS[bN]+bQ*S*bT[bY][bN]}break}bJ[bY]=b}}bL.attr(bJ);bL._run&&bL._run.call(bL)}else{if(bR.along){bX=aG(bR.along,bR.len*!bR.back);bL.translate(bT.sx-(bT.x||0)+bX.x-bT.sx,bT.sy-(bT.y||0)+bX.y-bT.sy);bR.rot&&bL.rotate(bT.r+bX.alpha,bX.x,bX.y)}(bK.x||bK.y)&&bL.translate(-bK.x,-bK.y);bR.scale&&(bR.scale+=bC);bL.attr(bR);aE.splice(bP--,1)}}br.svg&&bL&&bL.paper&&bL.paper.safari();aE[aS]&&setTimeout(aw)},bo=function(E,e,i,b,d){var R=i-b;e.timeouts.push(setTimeout(function(){br.is(d,"function")&&d.call(e);e.animate(E,R,E.easing)},b))},c=function(b){return bj(a6(b,255),0)},az=function(b,d){if(b==null){return{x:this._.tx,y:this._.ty,toString:bi}}this._.tx+=+b;this._.ty+=+d;switch(this.type){case"circle":case"ellipse":this.attr({cx:+b+this.attrs.cx,cy:+d+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+b+this.attrs.x,y:+d+this.attrs.y});break;case"path":var e=j(this.attrs.path);e[0][1]+=+b;e[0][2]+=+d;this.attr({path:e});break}return this};bl.animateWith=function(R,b,e,d,bJ){for(var E=0,S=aE.length;E<S;E++){if(aE[E].el.id==R.id){b.start=aE[E].start}}return this.animate(b,e,d,bJ)};bl.animateAlong=ae();bl.animateAlongBack=ae(1);function ae(b){return function(i,e,E,R){var d={back:b};br.is(E,"function")?(R=E):(d.rot=E);i&&i.constructor==af&&(i=i.attrs.path);i&&(d.along=i);return this.animate(d,e,R)}}function a9(i,bN,bQ,e,E,b){var bK=3*bN,bJ=3*(e-bN)-bK,S=1-bK-bJ,bM=3*bQ,bP=3*(E-bQ)-bM,bO=1-bM-bP;function d(bR){return((S*bR+bJ)*bR+bK)*bR}function R(bS,bR){var bT=bL(bS,bR);return((bO*bT+bP)*bT+bM)*bT}function bL(bT,bR){var bS,bV,bY,bU,bW,bX;for(bY=bT,bX=0;bX<8;bX++){bU=d(bY)-bT;if(aF(bU)<bR){return bY}bW=(3*S*bY+2*bJ)*bY+bK;if(aF(bW)<1e-06){break}bY=bY-bU/bW}bS=0;bV=1;bY=bT;if(bY<bS){return bS}if(bY>bV){return bV}while(bS<bV){bU=d(bY);if(aF(bU-bT)<bR){return bY}if(bT>bU){bS=bY}else{bV=bY}bY=(bV-bS)/2+bS}return bY}return R(i,1/(200*b))}bl.onAnimation=function(b){this._run=b||0;return this};bl.animate=function(bQ,E,bZ,bL){var bN=this;bN.timeouts=bN.timeouts||[];if(br.is(bZ,"function")||!bZ){bL=bZ||null}if(bN.removed){bL&&bL.call(bN);return bN}var b2={},bR={},bV=false,bS={};for(var b1 in bQ){if(bQ[P](b1)){if(bz[P](b1)||bN.paper.customAttributes[P](b1)){bV=true;b2[b1]=bN.attr(b1);(b2[b1]==null)&&(b2[b1]=a[b1]);bR[b1]=bQ[b1];switch(bz[b1]){case"along":var b3=bd(bQ[b1]);var b0=aG(bQ[b1],b3*!!bQ.back);var b=bN.getBBox();bS[b1]=b3/E;bS.tx=b.x;bS.ty=b.y;bS.sx=b0.x;bS.sy=b0.y;bR.rot=bQ.rot;bR.back=bQ.back;bR.len=b3;bQ.rot&&(bS.r=a8(bN.rotate())||0);break;case o:bS[b1]=(bR[b1]-b2[b1])/E;break;case"colour":b2[b1]=br.getRGB(b2[b1]);var S=br.getRGB(bR[b1]);bS[b1]={r:(S.r-b2[b1].r)/E,g:(S.g-b2[b1].g)/E,b:(S.b-b2[b1].b)/E};break;case"path":var bX=J(b2[b1],bR[b1]);b2[b1]=bX[0];var bU=bX[1];bS[b1]=[];for(var bK=0,bM=b2[b1][aS];bK<bM;bK++){bS[b1][bK]=[0];for(var bO=1,bW=b2[b1][bK][aS];bO<bW;bO++){bS[b1][bK][bO]=(bU[bK][bO]-b2[b1][bK][bO])/E}}break;case"csv":var R=A(bQ[b1])[aU](aj),bT=A(b2[b1])[aU](aj);switch(b1){case"translation":b2[b1]=[0,0];bS[b1]=[R[0]/E,R[1]/E];break;case"rotation":b2[b1]=(bT[1]==R[1]&&bT[2]==R[2])?bT:[0,R[1],R[2]];bS[b1]=[(R[0]-b2[b1][0])/E,0,0];break;case"scale":bQ[b1]=R;b2[b1]=A(b2[b1])[aU](aj);bS[b1]=[(R[0]-b2[b1][0])/E,(R[1]-b2[b1][1])/E,0,0];break;case"clip-rect":b2[b1]=A(b2[b1])[aU](aj);bS[b1]=[];bK=4;while(bK--){bS[b1][bK]=(R[bK]-b2[b1][bK])/E}break}bR[b1]=R;break;default:R=[].concat(bQ[b1]);bT=[].concat(b2[b1]);bS[b1]=[];bK=bN.paper.customAttributes[b1][aS];while(bK--){bS[b1][bK]=((R[bK]||0)-(bT[bK]||0))/E}break}}}}if(!bV){var bP=[],e;for(var bJ in bQ){if(bQ[P](bJ)&&l.test(bJ)){b1={value:bQ[bJ]};bJ=="from"&&(bJ=0);bJ=="to"&&(bJ=100);b1.key=B(bJ,10);bP.push(b1)}}bP.sort(T);if(bP[0].key){bP.unshift({key:0,value:bN.attrs})}for(bK=0,bM=bP[aS];bK<bM;bK++){bo(bP[bK].value,bN,E/100*bP[bK].key,E/100*(bP[bK-1]&&bP[bK-1].key||0),bP[bK-1]&&bP[bK-1].value.callback)}e=bP[bP[aS]-1].value.callback;if(e){bN.timeouts.push(setTimeout(function(){e.call(bN)},E))}}else{var d=br.easing_formulas[bZ];if(!d){d=A(bZ).match(V);if(d&&d[aS]==5){var bY=d;d=function(i){return a9(i,+bY[1],+bY[2],+bY[3],+bY[4],E)}}else{d=function(i){return i}}}aE.push({start:bQ.start||+new Date,ms:E,easing:d,from:b2,diff:bS,to:bR,el:bN,t:{x:0,y:0}});br.is(bL,"function")&&(bN._ac=setTimeout(function(){bL.call(bN)},E));aE[aS]==1&&setTimeout(aw)}return this};bl.stop=function(){for(var b=0;b<aE.length;b++){aE[b].el.id==this.id&&aE.splice(b--,1)}for(b=0,ii=this.timeouts&&this.timeouts.length;b<ii;b++){clearTimeout(this.timeouts[b])}this.timeouts=[];clearTimeout(this._ac);delete this._ac;return this};bl.translate=function(b,d){return this.attr({translation:b+" "+d})};bl[aP]=function(){return"Rapha\xebl\u2019s object"};br.ae=aE;var aC=function(b){this.items=[];this[aS]=0;this.type="set";if(b){for(var d=0,e=b[aS];d<e;d++){if(b[d]&&(b[d].constructor==af||b[d].constructor==aC)){this[this.items[aS]]=this.items[this.items[aS]]=b[d];this[aS]++}}}};aC[L][aT]=function(){var E,b;for(var e=0,d=arguments[aS];e<d;e++){E=arguments[e];if(E&&(E.constructor==af||E.constructor==aC)){b=this.items[aS];this[b]=this.items[b]=E;this[aS]++}}return this};aC[L].pop=function(){delete this[this[aS]--];return this.items.pop()};for(var aL in bl){if(bl[P](aL)){aC[L][aL]=(function(b){return function(){for(var d=0,e=this.items[aS];d<e;d++){this.items[d][b][aQ](this.items[d],arguments)}return this}})(aL)}}aC[L].attr=function(b,S){if(b&&br.is(b,u)&&br.is(b[0],"object")){for(var R=0,E=b[aS];R<E;R++){this.items[R].attr(b[R])}}else{for(var e=0,d=this.items[aS];e<d;e++){this.items[e].attr(b,S)}}return this};aC[L].animate=function(e,S,R,bL){(br.is(R,"function")||!R)&&(bL=R||null);var bK=this.items[aS],b=bK,d,E=this,bJ;bL&&(bJ=function(){!--bK&&bL.call(E)});R=br.is(R,by)?R:bJ;d=this.items[--b].animate(e,S,R,bJ);while(b--){this.items[b]&&!this.items[b].removed&&this.items[b].animateWith(d,e,S,R,bJ)}return this};aC[L].insertAfter=function(b){var d=this.items[aS];while(d--){this.items[d].insertAfter(b)}return this};aC[L].getBBox=function(){var b=[],d=[],e=[],E=[];for(var R=this.items[aS];R--;){var S=this.items[R].getBBox();b[aT](S.x);d[aT](S.y);e[aT](S.x+S.width);E[aT](S.y+S.height)}b=a6[aQ](0,b);d=a6[aQ](0,d);return{x:b,y:d,width:bj[aQ](0,e)-b,height:bj[aQ](0,E)-d}};aC[L].clone=function(b){b=new aC;for(var d=0,e=this.items[aS];d<e;d++){b[aT](this.items[d].clone())}return b};br.registerFont=function(E){if(!E.face){return E}this.fonts=this.fonts||{};var S={w:E.w,face:{},glyphs:{}},b=E.face["font-family"];for(var e in E.face){if(E.face[P](e)){S.face[e]=E.face[e]}}if(this.fonts[b]){this.fonts[b][aT](S)}else{this.fonts[b]=[S]}if(!E.svg){S.face["units-per-em"]=B(E.face["units-per-em"],10);for(var d in E.glyphs){if(E.glyphs[P](d)){var i=E.glyphs[d];S.glyphs[d]={w:i.w,k:{},d:i.d&&"M"+i.d[bE](/[mlcxtrv]/g,function(bJ){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[bJ]||"M"})+"z"};if(i.k){for(var R in i.k){if(i[P](R)){S.glyphs[d].k[R]=i.k[R]}}}}}}return E};bn.getFont=function(d,bK,bL,e){e=e||"normal";bL=bL||"normal";bK=+bK||{normal:400,bold:700,lighter:300,bolder:800}[bK]||400;if(!br.fonts){return}var bJ=br.fonts[d];if(!bJ){var R=new RegExp("(^|\\s)"+d[bE](/[^\w\d\s+!~.:_-]/g,bC)+"(\\s|$)","i");for(var b in br.fonts){if(br.fonts[P](b)){if(R.test(b)){bJ=br.fonts[b];break}}}}var E;if(bJ){for(var S=0,bM=bJ[aS];S<bM;S++){E=bJ[S];if(E.face["font-weight"]==bK&&(E.face["font-style"]==bL||!E.face["font-style"])&&E.face["font-stretch"]==e){break}}}return E};bn.print=function(e,E,bU,R,bP,bR,bS){bR=bR||"middle";bS=bj(a6(bS||0,1),-1);var bM=this.set(),bV=A(bU)[aU](bC),bQ=0,b=bC,bO;br.is(R,bU)&&(R=this.getFont(R));if(R){bO=(bP||16)/R.face["units-per-em"];var d=R.face.bbox.split(aj),bT=+d[0],bJ=+d[1]+(bR=="baseline"?d[3]-d[1]+(+R.face.descent):(d[3]-d[1])/2);for(var bL=0,bN=bV[aS];bL<bN;bL++){var S=bL&&R.glyphs[bV[bL-1]]||{},bK=R.glyphs[bV[bL]];bQ+=bL?(S.w||R.w)+(S.k&&S.k[bV[bL]]||0)+(R.w*bS):0;bK&&bK.d&&bM[aT](this.path(bK.d).attr({fill:"#000",stroke:"none",translation:[bQ,0]}))}bM.scale(bO,bO,bT,bJ).translate(e-bT,E-bJ)}return bM};br.format=function(e,b){var d=br.is(b,u)?[0][aq](b):arguments;e&&br.is(e,by)&&d[aS]-1&&(e=e[bE](g,function(E,R){return d[++R]==null?bC:d[R]}));return e||bC};br.ninja=function(){aV.was?(aa.Raphael=aV.is):delete Raphael;return br};br.el=bl;br.st=aC[L];aV.was?(aa.Raphael=br):(Raphael=br)})();(function(j,b,h){var c=["webkit","Moz","ms","O"],m={},l;function p(s,w){var u=b.createElement(s||"div"),r;for(r in w){u[r]=w[r]}return u}function n(s,r,u){if(u&&!u.parentNode){n(s,u)}s.insertBefore(r,u||null);return s}var d=(function(){var r=p("style");n(b.getElementsByTagName("head")[0],r);return r.sheet||r.styleSheet})();function a(w,y,r,A){var s=["opacity",y,~~(w*100),r,A].join("-"),B=0.01+r/A*100,x=Math.max(1-(1-w)/y*(100-B),w),C=l.substring(0,l.indexOf("Animation")).toLowerCase(),u=C&&"-"+C+"-"||"";if(!m[s]){d.insertRule("@"+u+"keyframes "+s+"{0%{opacity:"+x+"}"+B+"%{opacity:"+w+"}"+(B+0.01)+"%{opacity:1}"+(B+y)%100+"%{opacity:"+w+"}100%{opacity:"+x+"}}",0);m[s]=1}return s}function g(u,y){var r=u.style,w,x;if(r[y]!==h){return y}y=y.charAt(0).toUpperCase()+y.slice(1);for(x=0;x<c.length;x++){w=c[x]+y;if(r[w]!==h){return w}}}function o(s,u){for(var r in u){s.style[g(s,r)||r]=u[r]}return s}function f(w){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var r in u){if(w[r]===h){w[r]=u[r]}}}return w}function q(s){var r={x:s.offsetLeft,y:s.offsetTop};while((s=s.offsetParent)){r.x+=s.offsetLeft;r.y+=s.offsetTop}return r}var k=function k(r){if(!this.spin){return new k(r)}this.opts=f(r||{},k.defaults,i)},i=k.defaults={lines:12,length:7,width:5,radius:10,color:"#000",speed:1,trail:100,opacity:1/4,fps:20},e=k.prototype={spin:function(C){this.stop();var D=this,w=D.el=o(p(),{position:"relative"}),B,r;if(C){r=q(n(C,w,C.firstChild));B=q(w);o(w,{left:(C.offsetWidth>>1)-B.x+r.x+"px",top:(C.offsetHeight>>1)-B.y+r.y+"px"})}w.setAttribute("aria-role","progressbar");D.lines(w,D.opts);if(!l){var u=D.opts,x=0,A=u.fps,z=A/u.speed,y=(1-u.opacity)/(z*u.trail/100),E=z/u.lines;(function s(){x++;for(var F=u.lines;F;F--){var G=Math.max(1-(x+F*E)%z*y,u.opacity);D.opacity(w,u.lines-F,G,u)}D.timeout=D.el&&setTimeout(s,~~(1000/A))})()}return D},stop:function(){var r=this.el;if(r){clearTimeout(this.timeout);if(r.parentNode){r.parentNode.removeChild(r)}this.el=h}return this}};e.lines=function(u,s){var x=0,w;function r(y,z){return o(p(),{position:"absolute",width:(s.length+s.width)+"px",height:s.width+"px",background:y,boxShadow:z,transformOrigin:"left",transform:"rotate("+~~(360/s.lines*x)+"deg) translate("+s.radius+"px,0)",borderRadius:(s.width>>1)+"px"})}for(;x<s.lines;x++){w=o(p(),{position:"absolute",top:1+~(s.width/2)+"px",transform:"translate3d(0,0,0)",opacity:s.opacity,animation:l&&a(s.opacity,s.trail,x,s.lines)+" "+1/s.speed+"s linear infinite"});if(s.shadow){n(w,o(r("#000","0 0 4px #000"),{top:2+"px"}))}n(u,n(w,r(s.color,"0 0 1px rgba(0,0,0,.1)")))}return u};e.opacity=function(r,s,u){if(s<r.childNodes.length){r.childNodes[s].style.opacity=u}};(function(){var r=o(p("group"),{behavior:"url(#default#VML)"}),u;if(!g(r,"transform")&&r.adj){for(u=4;u--;){d.addRule(["group","roundrect","fill","stroke"][u],"behavior:url(#default#VML)")}e.lines=function(z,x){var B=x.length+x.width,C=2*B;function E(){return o(p("group",{coordsize:C+" "+C,coordorigin:-B+" "+-B}),{width:C,height:C})}var A=E(),D=~(x.length+x.radius+x.width)+"px",w;function y(s,G,F){n(A,n(o(E(),{rotation:360/x.lines*s+"deg",left:~~G}),n(o(p("roundrect",{arcsize:1}),{width:B,height:x.width,left:x.radius,top:-x.width>>1,filter:F}),p("fill",{color:x.color,opacity:x.opacity}),p("stroke",{opacity:0}))))}if(x.shadow){for(w=1;w<=x.lines;w++){y(w,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)")}}for(w=1;w<=x.lines;w++){y(w)}return n(o(z,{margin:D+" 0 0 "+D,zoom:1}),A)};e.opacity=function(w,y,z,s){var x=w.firstChild;s=s.shadow&&s.lines||0;if(x&&y+s<x.childNodes.length){x=x.childNodes[y+s];x=x&&x.firstChild;x=x&&x.firstChild;if(x){x.opacity=z}}}}else{l=g(r,"animation")}})();j.Spinner=k})(window,document);(function(){var a;a=(function(){function b(){this.options_index=0;this.parsed=[]}b.prototype.add_node=function(c){if(c.nodeName==="OPTGROUP"){return this.add_group(c)}else{return this.add_option(c)}};b.prototype.add_group=function(e){var g,h,i,d,c,f;g=this.parsed.length;this.parsed.push({array_index:g,group:true,label:e.label,children:0,disabled:e.disabled});c=e.childNodes;f=[];for(i=0,d=c.length;i<d;i++){h=c[i];f.push(this.add_option(h,g,e.disabled))}return f};b.prototype.add_option=function(d,e,c){if(d.nodeName==="OPTION"){if(d.text!==""){if(e!=null){this.parsed[e].children+=1}this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:d.value,text:d.text,html:d.innerHTML,selected:d.selected,disabled:c===true?c:d.disabled,group_array_index:e,classes:d.className,style:d.style.cssText})}else{this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:true})}return this.options_index+=1}};return b})();a.select_to_array=function(d){var f,g,e,c,b;g=new a();b=d.childNodes;for(e=0,c=b.length;e<c;e++){f=b[e];g.add_node(f)}return g.parsed};this.SelectParser=a}).call(this);(function(){var c,b;var a=function(d,e){return function(){return d.apply(e,arguments)}};b=this;c=(function(){function d(e,f){this.form_field=e;this.options=f!=null?f:{};this.set_default_values();this.is_multiple=this.form_field.multiple;this.default_text_default=this.is_multiple?"Select Some Options":"Select an Option";this.setup();this.set_up_html();this.register_observers();this.finish_setup()}d.prototype.set_default_values=function(){this.click_test_action=a(function(e){return this.test_active_click(e)},this);this.activate_action=a(function(e){return this.activate_field(e)},this);this.active_field=false;this.mouse_on_container=false;this.results_showing=false;this.result_highlighted=null;this.result_single_selected=null;this.allow_single_deselect=(this.options.allow_single_deselect!=null)&&(this.form_field.options[0]!=null)&&this.form_field.options[0].text===""?this.options.allow_single_deselect:false;this.disable_search_threshold=this.options.disable_search_threshold||0;this.choices=0;return this.results_none_found=this.options.no_results_text||"No results match"};d.prototype.mouse_enter=function(){return this.mouse_on_container=true};d.prototype.mouse_leave=function(){return this.mouse_on_container=false};d.prototype.input_focus=function(e){if(!this.active_field){return setTimeout((a(function(){return this.container_mousedown()},this)),50)}};d.prototype.input_blur=function(e){if(!this.mouse_on_container){this.active_field=false;return setTimeout((a(function(){return this.blur_test()},this)),100)}};d.prototype.result_add_option=function(g){var e,f;if(!g.disabled){g.dom_id=this.container_id+"_o_"+g.array_index;e=g.selected&&this.is_multiple?[]:["active-result"];if(g.selected){e.push("result-selected")}if(g.group_array_index!=null){e.push("group-option")}if(g.classes!==""){e.push(g.classes)}f=g.style.cssText!==""?' style="'+g.style+'"':"";return'<li id="'+g.dom_id+'" class="'+e.join(" ")+'"'+f+">"+g.html+"</li>"}else{return""}};d.prototype.results_update_field=function(){this.result_clear_highlight();this.result_single_selected=null;return this.results_build()};d.prototype.results_toggle=function(){if(this.results_showing){return this.results_hide()}else{return this.results_show()}};d.prototype.results_search=function(e){if(this.results_showing){return this.winnow_results()}else{return this.results_show()}};d.prototype.keyup_checker=function(f){var g,e;g=(e=f.which)!=null?e:f.keyCode;this.search_field_scale();switch(g){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0){return this.keydown_backstroke()}else{if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}}break;case 13:f.preventDefault();if(this.results_showing){return this.result_select(f)}break;case 27:if(this.results_showing){return this.results_hide()}break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}};d.prototype.generate_field_id=function(){var e;e=this.generate_random_id();this.form_field.id=e;return e};d.prototype.generate_random_char=function(){var g,f,e;g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";e=Math.floor(Math.random()*g.length);return f=g.substring(e,e+1)};return d})();b.AbstractChosen=c}).call(this);(function(){var e,d,g,c;var b=Object.prototype.hasOwnProperty,f=function(i,h){for(var j in h){if(b.call(h,j)){i[j]=h[j]}}function k(){this.constructor=i}k.prototype=h.prototype;i.prototype=new k;i.__super__=h.prototype;return i},a=function(h,i){return function(){return h.apply(i,arguments)}};c=this;e=jQuery;e.fn.extend({chosen:function(h){if(e.browser.msie&&(e.browser.version==="6.0"||e.browser.version==="7.0")){return this}return e(this).each(function(i){if(!(e(this)).hasClass("chzn-done")){return new d(this,h)}})}});d=(function(){f(h,AbstractChosen);function h(){h.__super__.constructor.apply(this,arguments)}h.prototype.setup=function(){this.form_field_jq=e(this.form_field);return this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")};h.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")};h.prototype.set_up_html=function(){var j,i,k,l;this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id();this.container_id+="_chzn";this.f_width=this.form_field_jq.outerWidth();this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default;j=e("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"});if(this.is_multiple){j.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>')}else{j.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>')}this.form_field_jq.hide().after(j);this.container=e("#"+this.container_id);this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single"));this.dropdown=this.container.find("div.chzn-drop").first();i=this.container.height();k=this.f_width-g(this.dropdown);this.dropdown.css({width:k+"px",top:i+"px"});this.search_field=this.container.find("input").first();this.search_results=this.container.find("ul.chzn-results").first();this.search_field_scale();this.search_no_results=this.container.find("li.no-results").first();if(this.is_multiple){this.search_choices=this.container.find("ul.chzn-choices").first();this.search_container=this.container.find("li.search-field").first()}else{this.search_container=this.container.find("div.chzn-search").first();this.selected_item=this.container.find(".chzn-single").first();l=k-g(this.search_container)-g(this.search_field);this.search_field.css({width:l+"px"})}this.results_build();this.set_tab_index();return this.form_field_jq.trigger("liszt:ready",{chosen:this})};h.prototype.register_observers=function(){this.container.mousedown(a(function(i){return this.container_mousedown(i)},this));this.container.mouseup(a(function(i){return this.container_mouseup(i)},this));this.container.mouseenter(a(function(i){return this.mouse_enter(i)},this));this.container.mouseleave(a(function(i){return this.mouse_leave(i)},this));this.search_results.mouseup(a(function(i){return this.search_results_mouseup(i)},this));this.search_results.mouseover(a(function(i){return this.search_results_mouseover(i)},this));this.search_results.mouseout(a(function(i){return this.search_results_mouseout(i)},this));this.form_field_jq.bind("liszt:updated",a(function(i){return this.results_update_field(i)},this));this.search_field.blur(a(function(i){return this.input_blur(i)},this));this.search_field.keyup(a(function(i){return this.keyup_checker(i)},this));this.search_field.keydown(a(function(i){return this.keydown_checker(i)},this));if(this.is_multiple){this.search_choices.click(a(function(i){return this.choices_click(i)},this));return this.search_field.focus(a(function(i){return this.input_focus(i)},this))}};h.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled){this.container.addClass("chzn-disabled");this.search_field[0].disabled=true;if(!this.is_multiple){this.selected_item.unbind("focus",this.activate_action)}return this.close_field()}else{this.container.removeClass("chzn-disabled");this.search_field[0].disabled=false;if(!this.is_multiple){return this.selected_item.bind("focus",this.activate_action)}}};h.prototype.container_mousedown=function(j){var i;if(!this.is_disabled){i=j!=null?(e(j.target)).hasClass("search-choice-close"):false;if(j&&j.type==="mousedown"){j.stopPropagation()}if(!this.pending_destroy_click&&!i){if(!this.active_field){if(this.is_multiple){this.search_field.val("")}e(document).click(this.click_test_action);this.results_show()}else{if(!this.is_multiple&&j&&((e(j.target)[0]===this.selected_item[0])||e(j.target).parents("a.chzn-single").length)){j.preventDefault();this.results_toggle()}}return this.activate_field()}else{return this.pending_destroy_click=false}}};h.prototype.container_mouseup=function(i){if(i.target.nodeName==="ABBR"){return this.results_reset(i)}};h.prototype.blur_test=function(i){if(!this.active_field&&this.container.hasClass("chzn-container-active")){return this.close_field()}};h.prototype.close_field=function(){e(document).unbind("click",this.click_test_action);if(!this.is_multiple){this.selected_item.attr("tabindex",this.search_field.attr("tabindex"));this.search_field.attr("tabindex",-1)}this.active_field=false;this.results_hide();this.container.removeClass("chzn-container-active");this.winnow_results_clear();this.clear_backstroke();this.show_search_field_default();return this.search_field_scale()};h.prototype.activate_field=function(){if(!this.is_multiple&&!this.active_field){this.search_field.attr("tabindex",this.selected_item.attr("tabindex"));this.selected_item.attr("tabindex",-1)}this.container.addClass("chzn-container-active");this.active_field=true;this.search_field.val(this.search_field.val());return this.search_field.focus()};h.prototype.test_active_click=function(i){if(e(i.target).parents("#"+this.container_id).length){return this.active_field=true}else{return this.close_field()}};h.prototype.results_build=function(){var k,m,l,j,i;this.parsing=true;this.results_data=c.SelectParser.select_to_array(this.form_field);if(this.is_multiple&&this.choices>0){this.search_choices.find("li.search-choice").remove();this.choices=0}else{if(!this.is_multiple){this.selected_item.find("span").text(this.default_text);if(this.form_field.options.length<=this.disable_search_threshold){this.container.addClass("chzn-container-single-nosearch")}else{this.container.removeClass("chzn-container-single-nosearch")}}}k="";i=this.results_data;for(l=0,j=i.length;l<j;l++){m=i[l];if(m.group){k+=this.result_add_group(m)}else{if(!m.empty){k+=this.result_add_option(m);if(m.selected&&this.is_multiple){this.choice_build(m)}else{if(m.selected&&!this.is_multiple){this.selected_item.find("span").text(m.text);if(this.allow_single_deselect){this.single_deselect_control_build()}}}}}}this.search_field_disabled();this.show_search_field_default();this.search_field_scale();this.search_results.html(k);return this.parsing=false};h.prototype.result_add_group=function(i){if(!i.disabled){i.dom_id=this.container_id+"_g_"+i.array_index;return'<li id="'+i.dom_id+'" class="group-result">'+e("<div />").text(i.label).html()+"</li>"}else{return""}};h.prototype.result_do_highlight=function(j){var l,i,m,k,n;if(j.length){this.result_clear_highlight();this.result_highlight=j;this.result_highlight.addClass("highlighted");m=parseInt(this.search_results.css("maxHeight"),10);n=this.search_results.scrollTop();k=m+n;i=this.result_highlight.position().top+this.search_results.scrollTop();l=i+this.result_highlight.outerHeight();if(l>=k){return this.search_results.scrollTop((l-m)>0?l-m:0)}else{if(i<n){return this.search_results.scrollTop(i)}}}};h.prototype.result_clear_highlight=function(){if(this.result_highlight){this.result_highlight.removeClass("highlighted")}return this.result_highlight=null};h.prototype.results_show=function(){var i;if(!this.is_multiple){this.selected_item.addClass("chzn-single-with-drop");if(this.result_single_selected){this.result_do_highlight(this.result_single_selected)}}i=this.is_multiple?this.container.height():this.container.height()-1;this.dropdown.css({top:i+"px",left:0});this.results_showing=true;this.search_field.focus();this.search_field.val(this.search_field.val());return this.winnow_results()};h.prototype.results_hide=function(){if(!this.is_multiple){this.selected_item.removeClass("chzn-single-with-drop")}this.result_clear_highlight();this.dropdown.css({left:"-9000px"});return this.results_showing=false};h.prototype.set_tab_index=function(i){var j;if(this.form_field_jq.attr("tabindex")){j=this.form_field_jq.attr("tabindex");this.form_field_jq.attr("tabindex",-1);if(this.is_multiple){return this.search_field.attr("tabindex",j)}else{this.selected_item.attr("tabindex",j);return this.search_field.attr("tabindex",-1)}}};h.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default")}else{this.search_field.val("");return this.search_field.removeClass("default")}};h.prototype.search_results_mouseup=function(i){var j;j=e(i.target).hasClass("active-result")?e(i.target):e(i.target).parents(".active-result").first();if(j.length){this.result_highlight=j;return this.result_select(i)}};h.prototype.search_results_mouseover=function(i){var j;j=e(i.target).hasClass("active-result")?e(i.target):e(i.target).parents(".active-result").first();if(j){return this.result_do_highlight(j)}};h.prototype.search_results_mouseout=function(i){if(e(i.target).hasClass("active-result"||e(i.target).parents(".active-result").first())){return this.result_clear_highlight()}};h.prototype.choices_click=function(i){i.preventDefault();if(this.active_field&&!(e(i.target).hasClass("search-choice"||e(i.target).parents(".search-choice").first))&&!this.results_showing){return this.results_show()}};h.prototype.choice_build=function(j){var k,i;k=this.container_id+"_c_"+j.array_index;this.choices+=1;this.search_container.before('<li class="search-choice" id="'+k+'"><span>'+j.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+j.array_index+'"></a></li>');i=e("#"+k).find("a").first();return i.click(a(function(l){return this.choice_destroy_link_click(l)},this))};h.prototype.choice_destroy_link_click=function(i){i.preventDefault();if(!this.is_disabled){this.pending_destroy_click=true;return this.choice_destroy(e(i.target))}else{return i.stopPropagation}};h.prototype.choice_destroy=function(i){this.choices-=1;this.show_search_field_default();if(this.is_multiple&&this.choices>0&&this.search_field.val().length<1){this.results_hide()}this.result_deselect(i.attr("rel"));return i.parents("li").first().remove()};h.prototype.results_reset=function(i){this.form_field.options[0].selected=true;this.selected_item.find("span").text(this.default_text);this.show_search_field_default();e(i.target).remove();this.form_field_jq.trigger("change");if(this.active_field){return this.results_hide()}};h.prototype.result_select=function(k){var i,j,l,m;if(this.result_highlight){i=this.result_highlight;j=i.attr("id");this.result_clear_highlight();if(this.is_multiple){this.result_deactivate(i)}else{this.search_results.find(".result-selected").removeClass("result-selected");this.result_single_selected=i}i.addClass("result-selected");m=j.substr(j.lastIndexOf("_")+1);l=this.results_data[m];l.selected=true;this.form_field.options[l.options_index].selected=true;if(this.is_multiple){this.choice_build(l)}else{this.selected_item.find("span").first().text(l.text);if(this.allow_single_deselect){this.single_deselect_control_build()}}if(!(k.metaKey&&this.is_multiple)){this.results_hide()}this.search_field.val("");this.form_field_jq.trigger("change");return this.search_field_scale()}};h.prototype.result_activate=function(i){return i.addClass("active-result")};h.prototype.result_deactivate=function(i){return i.removeClass("active-result")};h.prototype.result_deselect=function(k){var j,i;i=this.results_data[k];i.selected=false;this.form_field.options[i.options_index].selected=false;j=e("#"+this.container_id+"_o_"+k);j.removeClass("result-selected").addClass("active-result").show();this.result_clear_highlight();this.winnow_results();this.form_field_jq.trigger("change");return this.search_field_scale()};h.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1){return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')}};h.prototype.winnow_results=function(){var o,w,u,z,A,s,x,k,r,i,j,p,m,l,q,y,n;this.no_results_clear();k=0;r=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html();A=new RegExp("^"+r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");p=new RegExp(r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");n=this.results_data;for(m=0,q=n.length;m<q;m++){w=n[m];if(!w.disabled&&!w.empty){if(w.group){e("#"+w.dom_id).css("display","none")}else{if(!(this.is_multiple&&w.selected)){o=false;x=w.dom_id;s=e("#"+x);if(A.test(w.html)){o=true;k+=1}else{if(w.html.indexOf(" ")>=0||w.html.indexOf("[")===0){z=w.html.replace(/\[|\]/g,"").split(" ");if(z.length){for(l=0,y=z.length;l<y;l++){u=z[l];if(A.test(u)){o=true;k+=1}}}}}if(o){if(r.length){i=w.html.search(p);j=w.html.substr(0,i+r.length)+"</em>"+w.html.substr(i+r.length);j=j.substr(0,i)+"<em>"+j.substr(i)}else{j=w.html}s.html(j);this.result_activate(s);if(w.group_array_index!=null){e("#"+this.results_data[w.group_array_index].dom_id).css("display","list-item")}}else{if(this.result_highlight&&x===this.result_highlight.attr("id")){this.result_clear_highlight()}this.result_deactivate(s)}}}}}if(k<1&&r.length){return this.no_results(r)}else{return this.winnow_results_set_highlight()}};h.prototype.winnow_results_clear=function(){var i,l,m,j,k;this.search_field.val("");l=this.search_results.find("li");k=[];for(m=0,j=l.length;m<j;m++){i=l[m];i=e(i);k.push(i.hasClass("group-result")?i.css("display","auto"):!this.is_multiple||!i.hasClass("result-selected")?this.result_activate(i):void 0)}return k};h.prototype.winnow_results_set_highlight=function(){var j,i;if(!this.result_highlight){i=!this.is_multiple?this.search_results.find(".result-selected.active-result"):[];j=i.length?i.first():this.search_results.find(".active-result").first();if(j!=null){return this.result_do_highlight(j)}}};h.prototype.no_results=function(i){var j;j=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>');j.find("span").first().html(i);return this.search_results.append(j)};h.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()};h.prototype.keydown_arrow=function(){var i,j;if(!this.result_highlight){i=this.search_results.find("li.active-result").first();if(i){this.result_do_highlight(e(i))}}else{if(this.results_showing){j=this.result_highlight.nextAll("li.active-result").first();if(j){this.result_do_highlight(j)}}}if(!this.results_showing){return this.results_show()}};h.prototype.keyup_arrow=function(){var i;if(!this.results_showing&&!this.is_multiple){return this.results_show()}else{if(this.result_highlight){i=this.result_highlight.prevAll("li.active-result");if(i.length){return this.result_do_highlight(i.first())}else{if(this.choices>0){this.results_hide()}return this.result_clear_highlight()}}}};h.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}else{this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")}};h.prototype.clear_backstroke=function(){if(this.pending_backstroke){this.pending_backstroke.removeClass("search-choice-focus")}return this.pending_backstroke=null};h.prototype.keydown_checker=function(j){var k,i;k=(i=j.which)!=null?i:j.keyCode;this.search_field_scale();if(k!==8&&this.pending_backstroke){this.clear_backstroke()}switch(k){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:if(this.results_showing&&!this.is_multiple){this.result_select(j)}this.mouse_on_container=false;break;case 13:j.preventDefault();break;case 38:j.preventDefault();this.keyup_arrow();break;case 40:this.keydown_arrow();break}};h.prototype.search_field_scale=function(){var n,k,q,o,i,l,p,j,m;if(this.is_multiple){q=0;p=0;i="position:absolute; left: -1000px; top: -1000px; display:none;";l=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(j=0,m=l.length;j<m;j++){o=l[j];i+=o+":"+this.search_field.css(o)+";"}k=e("<div />",{style:i});k.text(this.search_field.val());e("body").append(k);p=k.width()+25;k.remove();if(p>this.f_width-10){p=this.f_width-10}this.search_field.css({width:p+"px"});n=this.container.height();return this.dropdown.css({top:n+"px"})}};h.prototype.generate_random_id=function(){var i;i="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+i).length>0){i+=this.generate_random_char()}return i};return h})();g=function(h){var i;return i=h.outerWidth()-h.width()};c.get_side_border_padding=g}).call(this);ko.bindingHandlers.autoComplete={init:function(d,g){var f=ko.utils.unwrapObservable(g());var b=$(d);f.editable=ko.isObservable(f.editable)?f.editable:ko.observable(f.observable);f.multiple=ko.isObservable(f.multiple)?f.multiple:ko.observable(f.multiple);f.single=ko.isObservable(f.single)?f.single:ko.observable(f.single);var h={options:ko.dependentObservable(function(){var e=ko.utils.unwrapObservable(f.options).slice(0);e.unshift("");return e}),editable:f.editable,multiple:f.multiple,single:f.single,selectedOptions:ko.observableArray([]),selectedOption:ko.observable(),value:f.value||""};var c=function(e){if(!e){return}if(h.value()){var j=h.value().split(",");var i=[];ko.utils.arrayForEach(j,function(k){var l=ko.utils.arrayFirst(h.options(),function(m){return m.id==k});if(l===null){return}i.push(l.id)});h.selectedOptions(i)}h.selectedOptions.subscribe(function(m){var k=ko.utils.arrayFilter(m,function(n){return !!n});var l=k.join(",");f.value(l)})};h.multiple.subscribe(c);c(h.multiple());var a=function(i){if(!i){return}if(h.value()){var e=ko.utils.arrayFirst(h.options(),function(j){return j.id==h.value()});if(e===null){return}h.selectedOption(e)}h.selectedOption.subscribe(function(j){;if(!j){f.value(null)}else{f.value(j.id)}})};h.single.subscribe(a);a(h.single());ko.renderTemplate("AutoCompleteDropdownTemplate",h,{},d)}};ko.bindingHandlers.chosen={init:function(a,b){if(CIV.Portal.Browser.ie7){return}$(a).chosen()},update:function(a,b){$(a).trigger("liszt:updated")}};ko.bindingHandlers.cssAnimation={update:function(c,e){var b=ko.utils.unwrapObservable(e());var f=ko.utils.unwrapObservable(b.data);var d=$.extend({},{queue:false},b.options);var a={};ko.utils.arrayForEach(b.css,function(j){var i=f?j.on:j.off;var g=(!f)?j.on:j.off;var h=d.duration?g:i;$(c).css(j.name,h);a[j.name]=i});if(!d.duration){return}$(c).animate(a,d)}};ko.bindingHandlers.datePicker={init:function(d,e){var c=$(d);c.attr("readonly","readonly");var b=e();var f={date:b.value,validCallback:b.dateValidCallback,ignoreTimezone:b.ignoreTimezone,maxValue:b.maxValue||ko.observable(new Date())};ko.dependentObservable(function(){var g={time:false};if(f.ignoreTimezone){g.offset=0}c.val(CIV.Global.Format.toString(f.date(),g))});f.visible=ko.observable(false);f.selectedMonth=ko.observable();var a=function(){var k=f.maxValue();var g=[];var l=new Date(k);for(var h=0;h<100;h++){var i=Globalize.format(l,"MMMM yyyy",CIV.Preferences.Current.culture());var j={description:i,value:new Date(l),index:h};g.push(j);if(l.getFullYear()==f.date().getFullYear()&&l.getMonth()==f.date().getMonth()){f.selectedMonth(j)}l.setMonth(l.getMonth()-1)}return g};f.months=a();f.dayNames=ko.dependentObservable(function(){var g=Globalize.cultures[CIV.Preferences.Current.culture()];return ko.utils.arrayMap(g.calendars.standard.days.namesShort,function(h){return h.toUpperCase()})});f.days=ko.dependentObservable(function(){if(!f.visible()){return[]}var q=new Date();var l=f.selectedMonth().value;var i=CIV.Global.Format.createDate(l.getFullYear(),l.getMonth(),1);var o=i.getDay();i.setUTCDate(i.getUTCDate()-o);var k=[];for(var p=1;p<=42;p++){var j=i.getDate();var h=function(r){return new Date(r.getFullYear(),r.getMonth(),r.getDate(),f.date().getHours(),f.date().getMinutes(),f.date().getSeconds())};var n=(i.getMonth()!=l.getMonth())||(i>f.maxValue());if(f.validCallback){n=n||!f.validCallback(h(i))}var g=i.getFullYear()==q.getFullYear()&&i.getMonth()==q.getMonth()&&i.getDate()==q.getDate();var m=i.getFullYear()==f.date().getFullYear()&&i.getMonth()==f.date().getMonth()&&i.getDate()==f.date().getDate();k.push({value:j,date:new Date(i),cannotSelect:n,isSelected:m,isToday:g,isSpecial:m||g,click:function(){if(this.cannotSelect){return}f.date(h(this.date));f.close()}});i.setUTCDate(i.getUTCDate()+1)}return k});f.canPrev=ko.dependentObservable(function(){return f.selectedMonth().index<f.months.length-1});f.canNext=ko.dependentObservable(function(){return f.selectedMonth().index>0});f.prevMonth=function(){f.selectedMonth(f.months[f.selectedMonth().index+1])};f.nextMonth=function(){f.selectedMonth(f.months[f.selectedMonth().index-1])};ko.bindingHandlers.datePicker.render("DatePickerTemplate",f,c,function(g){$(".datebox",g).chosen()})},render:function(c,g,b,d){var a=$("<span/>");$("body").append(a);ko.renderTemplate(c,g,{},a.getSingleDOM(),"replaceChildren");var f=$(".pickerpopup",a);d&&d(f);var e=function(){var h=b.parent().position();h.top+=(-b.outerHeight()+f.outerHeight())*-0.5;f.css("top",h.top+"px");if(b.hasClass("right")){$(".arrow",f).addClass("right");h.left-=f.outerWidth()+10;f.css("left",h.left+"px")}else{$(".arrow",f).removeClass("right");h.left+=b.width()-5;f.css("left",h.left+"px")}};e();f.bind("mousedown",function(){},false);g.close=function(){if(g.canClose&&!g.canClose()){return}g.visible(false);$(document).unbind("mousedown.picker")};b.click(function(){e();g.visible(true);$(document).bind("mousedown.picker",g.close)})}};ko.bindingHandlers.dialog={init:function(a,b){var c=b();if(!(c instanceof CIV.Portal.Dialog)){throw"model is not a CIV.Portal.Dialog!"}Clock.setTimeout(function(){var d=$(a).html();$(a).remove();var f=$("<span/>");$("body").append(f);ko.renderTemplate("DialogTemplate",c,{},f.getSingleDOM(),"replaceChildren");var e=$(".contents .container",f);e.html(d);ko.dependentObservable(function(){var h=$(".dialog",f);if(c.visible()){var g=(CIV.Portal.Browser.size().height-h.height())*(30/100);var i=(CIV.Portal.Browser.size().width-h.width())*(50/100);h.css("top",g+"px");h.css("left",i+"px");if(e.height()>400){var j=$(".contents",f);j.css("overflow-y","auto")}}else{h.css("top","");h.css("left","")}});ko.applyBindings(c.data,e.getSingleDOM())},0);return{controlsDescendantBindings:true}}};ko.bindingHandlers.focus={update:function(b,d){var a=ko.utils.unwrapObservable(d());var c=$(b);if(a){c.focus()}}};ko.bindingHandlers.horizontalSlider={init:function(a,b){var c=b();if(!(c instanceof CIV.Portal.Slider)){throw"model is not a CIV.Portal.Slider!"}ko.renderTemplate("HorizontalSliderTemplate",c,{},a);ko.dependentObservable(function(){c.minTip.message(c.minValue());c.maxTip.message(c.maxValue())});Clock.setTimeout(function(){var k=$(".horizontalslider",a);var g=$(".selection",k);var i=$(".thumb#min",k);var h=$(".thumb#max",k);var d=function(n,o,e,p){if(c.readOnly){return}n.mousedown(function(){o.disabled(false);$(document).bind("mousemove.slider",function(r){var s=k.offset();var u=r.pageX-s.left;var q=m(u);if(p(q)){if(CIV.getType(e())==="date"){q=new Date(q);if(e().getTime()===q.getTime()){return}}else{if(e()===q){return}}e(q);o.message(q)}}).bind("mouseup.slider",function(){$(document).unbind("mousemove.slider");$(document).unbind("mouseup.slider");o.disabled(true)})})};d(i,c.minTip,c.minValue,function(n){var e=c.maxValue();if(CIV.getType(c.maxValue())==="date"){e=e.getTime()}n=Math.round(n/c.step);e=Math.round(e/c.step);return n<e});d(h,c.maxTip,c.maxValue,function(n){var e=c.minValue();if(CIV.getType(c.minValue())==="date"){e=e.getTime()}n=Math.round(n/c.step);e=Math.round(e/c.step);return n>e});var f=function(e){e=e<0?0:e;e=e>1?1:e;return e};var j=function(e){var n=ko.utils.unwrapObservable(e);if(CIV.getType(n)==="date"){return n.getTime()}return n};var l=function(e){var n=j(e);n=Math.round(n/c.step)*c.step;n=f((n-j(c.min))/(j(c.max)-j(c.min)))*k.width();return n};var m=function(n){var o=f(n/k.width());var e=j(c.min)+(o*(j(c.max)-j(c.min)));e=Math.round(e/c.step)*c.step;return e};ko.dependentObservable(function(){CIV.Portal.Browser.size();c.isVisible();var e=l(c.minValue());var n=l(c.maxValue());i.css("left",e+"px");h.css("left",n+"px");g.css("left",e+"px");g.css("width",(n-e)+"px")})},0)}};ko.bindingHandlers.inlineEdit={init:function(d,l){var k=$(d);var i=l();var g;var n;var p;k.addClass("inlineEditable");if(i.canCommit){g=i.data;n=i.canCommit}else{g=i;n=ko.observable(true)}var c=$("<input class='inlineEdit styled' type='text'></input>");var m=function(){k.show();c.hide()};var f=function(){if(!n()){j();return}var e=g();if(!!p||!!e){p=e;m()}else{j()}};k.after(c);c.hide();c.blur(f);k.click(function(){p=g();k.hide();c.show();c.focus();c.select()});var j=function(){g(p);m()};c.blur(j);c.keyup(function(e){if(!c.is(":visible")){return true}if(e.keyCode!=27){return true}j();return false});var a={enter:f,value:g,valueUpdate:"afterkeydown"};ko.applyBindingsToNode(c.getSingleDOM(),a,{observable:g});c.autoGrowInput({comfortZone:10,minWidth:50});var b="Edit...";var o=ko.dependentObservable(function(){return !g()});var h=ko.dependentObservable(function(){return o()?b:g()});a={text:h,css:{inlineEditableDefault:o}};ko.applyBindingsToNode(k.getSingleDOM(),a,{spanValue:h,showDefaultValue:o})}};(function(){ko.bindingHandlers.opacityVisible={init:function(b,d){var a=ko.utils.unwrapObservable(d());var c=$(b);if(Modernizr.opacity){c.css("opacity",0)}c.css("display","none")},update:function(d,g){var a=ko.utils.unwrapObservable(g());var c=a?1:0;var b=(!a)?1:0;var f=$(d);if(Modernizr.opacity){f.css("opacity",b);f.animate({opacity:c},{queue:false})}f.css("display",a?"":"none")}}})();ko.bindingHandlers.opacityTransitionVisible={init:function(b,d){var a=ko.utils.unwrapObservable(d());var c=$(b);if(Modernizr.opacity){c.css("opacity",0)}else{c.css("display","none")}},update:function(c,f){var a=ko.utils.unwrapObservable(f());var b=a?1:0;var d=$(c);if(Modernizr.opacity){d.css("opacity",b)}else{d.css("display",a?"":"none")}}};ko.bindingHandlers.pie={init:function(a,b){if(!window.PIE||CIV.Portal.Browser.ie7){return}PIE.attach(a)}};ko.bindingHandlers.preventScroll={scrollTop:null,update:function(c,d){if(Modernizr.touch){return}var a=$.unwrap(d());if(a){this.scrollTop=$(window).scrollTop()}else{var b=this.scrollTop;Clock.setTimeout(function(){$(window).scrollTop(b)},0)}}};(function(){ko.bindingHandlers.radioButtons={init:function(c,f){var a=ko.utils.unwrapObservable(f());var d=$(c);d.addClass("buttongroup");for(var b in a.data){(function(g){var e=$("<div>"+g+"</div>");d.append(e);ko.applyBindingsToNode(e.getSingleDOM(),{css:{selected:ko.dependentObservable(function(){return a.selected()===a.data[g]})},click:function(){a.selected(a.data[g])}})})(b)}}}})();ko.bindingHandlers.sortableList={init:function(b,c){var a=c();$(b).sortable({handle:".handle",placeholder:"sortablePlaceholder",update:function(g,f){var h=f.item.tmplItem().data;var i=ko.utils.arrayIndexOf(f.item.parent().children(),f.item[0]);if(i>=0){a.remove(h);var d=0;var e=false;for(var j=0;j<a().length;j++){if(d===i){a.splice(d,0,h);e=true;break}if(!a()[j].hasOwnProperty("_destroy")){d++}}if(!e){a.push(h)}}},start:function(e,d){d.item.addClass("dragging")},stop:function(e,d){d.item.removeClass("dragging")}})}};ko.bindingHandlers.spinner={update:function(d,f){var b=f();var e=b;if(!e.data){e={data:b,color:"#fff"}}var c=$(d).data("spinner");c&&c.stop();$(d).data("spinner",null);if(ko.utils.unwrapObservable(e.data)){var a={lines:16,length:0,width:3,radius:5,color:e.color,speed:1.4,trail:70,shadow:false};$(d).data("spinner",new Spinner(a).spin(d))}}};ko.bindingHandlers.styledCheckbox={init:function(b,g,d){if(Modernizr.touch){return}var f=$(b);var a="styledCheckbox_unique_"+(++ko.bindingHandlers.styledCheckbox.currentIndex);f.attr("id",a);f.addClass("styled-input");var i=$("<label for='"+a+"'></label>");f.after(i);f.parent().addClass("styled");var h=d();var c=h.checked;ko.dependentObservable(function(){var e=c();if(e){f.addClass("checked")}else{f.removeClass("checked")}})}};ko.bindingHandlers.styledCheckbox.currentIndex=0;ko.bindingHandlers.timePicker={init:function(d,f){var i=$(d);i.attr("readonly","readonly");var e=f();var j={value:e.value,validCallback:e.timeValidCallback,visible:ko.observable(false)};ko.dependentObservable(function(){i.val(CIV.Global.Format.toString(j.value(),{date:false}))});var h=Globalize.cultures[CIV.Preferences.Current.culture()];var k=h.calendars.standard.AM;k=k&&k[0];var n=h.calendars.standard.PM;n=n&&n[0];j.ampm=[];if(k&&n){j.ampm=[{hourOffset:0,text:k},{hourOffset:12,text:n}]}var a=function(c){return c<10?("0"+c):c};var l;j.hours=[];for(l=0;l<(k?12:24);l++){j.hours.push(a((k&&l===0)?12:l))}j.minutesSeconds=[];for(l=0;l<60;l++){j.minutesSeconds.push(a(l))}j.amOrPm=ko.observable();j.hour=ko.observable();j.minute=ko.observable();j.second=ko.observable();var g=function(p,o){if(!j.visible()&&!o){return}var c=p.getUTCHours()+CIV.Preferences.Current.timezone().offset;if(c<0){c+=24}if(j.ampm.length){j.amOrPm(c<12?j.ampm[0]:j.ampm[1]);c%=12}j.hour(c);j.minute(p.getUTCMinutes());j.second(p.getUTCSeconds())};g(j.value(),true);j.visible.subscribe(function(c){if(c){g(j.value())}});j.value.subscribe(g);var b=function(){var c=new Date(j.value().getTime()+CIV.Preferences.Current.timezone().offsetTicks);if(!j.visible()){return c}if(j.ampm.length){c.setUTCHours(j.hour()%12+j.amOrPm().hourOffset)}else{c.setUTCHours(j.hour())}c.setUTCHours(c.getUTCHours()-CIV.Preferences.Current.timezone().offset);c.setUTCMinutes(j.minute());c.setUTCSeconds(j.second());c.setUTCMilliseconds(0);return c};var m=function(){if(!j.visible()){return}var c=b();if(j.value().getTime()!==c.getTime()){if(j.validCallback&&!j.validCallback(c)){return}j.value(c)}};j.amOrPm.subscribe(m);j.hour.subscribe(m);j.minute.subscribe(m);j.second.subscribe(m);j.canClose=ko.dependentObservable(function(){return j.validCallback(b())});ko.bindingHandlers.datePicker.render("TimePickerTemplate",j,i)}};ko.bindingHandlers.tooltip={init:function(a,b){var c=b();if(!(c instanceof CIV.Portal.Tooltip)){throw"model is not a CIV.Portal.Tooltip!"}ko.renderTemplate("TooltipTemplate",c,{},a);if(c.hoverVisible){$(a).hover(function(){c.visible(true)},function(){c.visible(false)})}ko.bindingHandlers.tooltip.applyPosition(a,c)},update:function(a,b){var c=b();if(!c.visible()||!c.displayMessage()){return}ko.bindingHandlers.tooltip.applyPosition(a,c)},applyPosition:function(a,d){var f=$(".tooltip .callout",a);var g=$(a).parent();var b=d.position().x;var c=d.position().y;switch(d.location){case"top":case"bottom":b-=f.outerWidth()/2;f.css("left",b);break}switch(d.location){case"top":c=g.height()-c;f.css("bottom",c);break;case"bottom":c=$(a).height();$(".tooltip",a).css("top",c);break}var e=$(".notch",f);var h=15;e.css("left",(f.outerWidth()-h)/2);switch(d.location){case"top":e.css("bottom","-9px");break;case"bottom":e.css("top","-8px");break}}};CIV.Portal=CIV.Portal||{};CIV.Model.Loading=ko.observable(0);CIV.Model.Loading.add=function(){CIV.Model.Loading(CIV.Model.Loading()+1)};CIV.Model.Loading.release=function(){var a=CIV.Model.Loading()-1;if(a<0){a=0}CIV.Model.Loading(a)};CIV.Portal.Browser={size:ko.observable(),ie:false,ie7:false,ie8:false,ie78:false};CIV.Portal.Browser.size.equalityComparer=function(c,d){return c&&d&&c.length==2&&d.length==2&&c[0]==d[0]&&c[1]==d[1]};(function(){var a=function(){var b=$(window);CIV.Portal.Browser.size({width:b.width(),height:b.height()})};$(window).resize(a);$(document).ready(a)})();CIV.Portal.PageLoaded=function(){if($.browser.msie){var a=$.browser.version.slice(0,1);$("body").addClass("ie");switch(a){case"7":$("body").addClass("ie7");$("body").addClass("ie78");CIV.Portal.Browser.ie7=true;CIV.Portal.Browser.ie78=true;break;case"8":$("body").addClass("ie8");$("body").addClass("ie78");CIV.Portal.Browser.ie8=true;CIV.Portal.Browser.ie78=true;break}}ko.applyBindings(CIV.Model);$("body").removeClass("loading");(function(){var e=$(window);var b=$("#toolbar");var h=$("#toolbarShadow");var f=$("#fixedToolbarSpacer");var g=$("#header");var c=function(){var d=e.scrollTop()>=g.height();b.css("position",d?"fixed":"inherit");b.css("top",d?"0":"auto");h.css("position",d?"fixed":"inherit");h.css("top",d?"0":"auto");f.css("display",d?"block":"none")};e.scroll(c);c()})()};ko.utils.arrayWithId=function(a){return ko.utils.arrayFilter(a,function(b){if(b.id){return true}return !b._destroy})};Date.prototype.toUTC=function(){var a=this;return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())};(function(){CIV.Timezone=function(a){var b=this;b.name=a.name;b.offset=a.offset;b.offsetTicks=b.offset*3600000;b.localTime=a.localTime?true:false;b.timezoneId=a.timezoneId;b.fromUtc=function(c){return new Date(c.getTime()+b.offsetTicks)}};CIV.Timezones=[new CIV.Timezone({offset:-8,name:"GMT - 08:00",timezoneId:"Pacific Standard Time"}),new CIV.Timezone({offset:-6,name:"GMT - 06:00",timezoneId:"Central Standard Time"}),new CIV.Timezone({offset:-5,name:"GMT - 05:00",timezoneId:"Eastern Standard Time"}),new CIV.Timezone({offset:0,name:"GMT",timezoneId:"UTC"}),new CIV.Timezone({offset:1,name:"GMT + 01:00",timezoneId:"W. Europe Standard Time"}),new CIV.Timezone({offset:2,name:"GMT + 02:00",timezoneId:"E. Europe Standard Time"})];CIV.TimezonesWithLocal=CIV.Timezones.slice(0);CIV.TimezonesWithLocal.unshift(new CIV.Timezone({offset:0,name:"Local",localTime:true,timezoneId:""}));ko.utils.arrayForEach(CIV.TimezonesWithLocal,function(a){a.prototype=CIV.Timezone});CIV.Timezones.findByOffset=function(a){return ko.utils.arrayFirst(CIV.Timezones,function(b){return b.offset===a&&!b.localTime})};CIV.TimezonesWithLocal.findByTimezoneId=function(a){return ko.utils.arrayFirst(CIV.TimezonesWithLocal,function(b){return b.timezoneId===a})}})();(function(){var a=function(b){if(b===undefined){return undefined}return ko.mapping.toJSON(b)};ko.extenders.dirty=function(c,b){b.register(c);c.isDirty=ko.dependentObservable(function(){var d=b.getJsonStateFor(c);var e=a(c)!==d;b.update(e);return e}).extend({throttle:0});return c};CIV.DirtyTracker=CIV.Class.Create(function(g){var h=this;if(!g.apply){throw"Did not provide 'apply' callback"}h.isDirty=ko.observable(false);h.update=function(i){h.isDirty(i)};var e=function(j){var i={observable:j,data:ko.mapping.visitModel(j,function(k){return ko.utils.unwrapObservable(k)},g)};i.dataJson=a(i.data);return i};h.getJsonStateFor=function(j){var i=ko.utils.arrayFirst(c,function(k){return k.observable===j});if(i){return i.dataJson}return null};var c=[];h.register=function(i){c.push(e(i))};h.isApplying=ko.observable(false);h.isReverting=ko.observable(false);h.isBusy=ko.dependentObservable(function(){return h.isApplying()||h.isReverting()});h.enabled=ko.dependentObservable(function(){return !h.isBusy()});h.apply=function(){h.isApplying(true);g.apply(h.afterApply)};h.afterApply=function(i){if(i){var j=[];ko.utils.arrayForEach(c,function(k){j.push(e(k.observable))});c=j;h.isDirty(false)}h.isApplying(false)};var d=[];var f=[];var b=[];h.revert=function(){ko.utils.arrayForEach(d,function(i){i()});h.isReverting(true);ko.utils.arrayForEach(c,function(i){var j=function(){var k=i.observable.__ko_mapping__;if(k){ko.mapping.fromJS(i.data,i.observable)}else{ko.mapping.fromJS(i.data,{},i.observable)}};if(b.length){ko.utils.arrayForEach(b,function(l){var k=l(i.observable,i.data);if(k){j()}})}else{j()}});h.isReverting(false);h.isDirty(false);ko.utils.arrayForEach(f,function(i){i()})};h.beforeRevert=function(i){d.push(i);return h};h.afterRevert=function(i){f.push(i);return h};h.onRevert=function(i){b.push(i);return h}});CIV.MultiDirtyTracker=CIV.DirtyTracker.Extend(function(e){var g=this;g._super(e);var c=ko.observableArray();var b=function(h){ko.utils.arrayForEach(c(),function(i){h(i.tracker)})};g.add=function(h){var i={name:h,tracker:new CIV.DirtyTracker({apply:function(){}})};c.push(i);return i.tracker};g.getTracker=function(h){var i=ko.utils.arrayFilter(c(),function(j){return j.name===h});if(!i.length){throw"Unknown dirtytracker: "+h}return i[0].tracker};g.isDirty=ko.dependentObservable({read:function(){var h=false;b(function(i){h|=i.isDirty()});return h},write:function(h){b(function(i){i.isDirty(h)})}});var f=g.apply;g.apply=function(){g.isApplying(true);f()};var d=g.afterApply;g.afterApply=function(h){b(function(i){i.afterApply(h)});d(h)};g.revert=function(){b(function(h){h.revert()})}})})();CIV.getType=function(a){if((a)&&(typeof(a)==="object")&&(a.constructor==(new Date).constructor)){return"date"}return typeof a};CIV.canHaveProperties=function(a){return(CIV.getType(a)=="object")&&(a!==null)&&(typeof a!=="undefined")};CIV.Preferences={};CIV.Preferences.ViewModel=CIV.Class.Create(function(a){var b=this;b.timezone=ko.observable(CIV.Timezones.findByOffset(0));b.culture=ko.observable("en")});CIV.Preferences.Reset=function(){CIV.Preferences.Current=new CIV.Preferences.ViewModel()};CIV.Preferences.Reset();CIV.Format=CIV.Class.Create(function(c){var f=this;var b=function(){return CIV.Preferences.Current.culture()};f.convertUtcToLocal=function(g,i){if(i===undefined){i=CIV.Preferences.Current.timezone().offset}i*=60;var h=new Date(g.getTime());h.setMinutes(h.getMinutes()+h.getTimezoneOffset()+i);return h};f.convertLocalToUtc=function(g,i){if(i===undefined){i=CIV.Preferences.Current.timezone().offset}i*=60;var h=new Date(g.getTime());h.setMinutes(h.getMinutes()-h.getTimezoneOffset()-i);return h};var d=function(g,j){j=$.extend({},{date:true,time:true,offset:undefined},j);var i=f.convertUtcToLocal(g,j.offset);var h="";if(j.date){h+=Globalize.format(i,"d",b())}if(j.time){if(h!=""){h+=" "}h+=Globalize.format(i,"T",b())}return h};var a=function(h,i){i=$.extend({},{digits:0,prefix:false,currency:false,percentage:false},i);var g="n";if(i.prefix){g="d"}else{if(i.currency){g="c"}else{if(i.percentage){g="p"}}}g+=i.digits;return Globalize.format(h,g,b())};var e=function(g){return Globalize.localize(g,b())||g};f.toString=function(h,g){if(h==null){return null}switch(CIV.getType(h)){case"date":return d(h,g);case"number":return a(h,g);case"string":return e(h,g);default:return"Invalid type for Format: "+CIV.getType(h)}};f.parseNumber=function(g,h){return Globalize.parseFloat(g,10,b())};f.parseDate=function(g,i){i=i||{};var h=f.convertLocalToUtc(Globalize.parseDate(g,false,b()),i.offset);return h};f.createDate=function(h,g,i){return f.convertLocalToUtc(new Date(h,g,i),0)};f.createDateTime=function(j,i,k,h,l,g){return f.convertLocalToUtc(new Date(j,i,k,h,l,g),0)}});CIV.Global.Format=new CIV.Format();CIV.Portal.Dialog=CIV.Class.Create(function(a){var b=this;a=a||{};b.visible=ko.observable(false);b.data=a.data||{};b.title=ko.observable(a.title||"Dialog");b.buttons=a.buttons||ko.observableArray();b.showClose=a.showClose||true;b.callback=null;b.open=function(c){b.callback=c;b.visible(true);CIV.Model.lightbox(true)};b.closeDialog=function(){b.visible(false);CIV.Model.lightbox(false)};b.close=function(c){if(c.disabled()){return}if(!b.callback(c)){return}b.closeDialog()};this.data.visible=b.visible;b.data.defaultButton=function(){var c=ko.utils.arrayFirst(ko.utils.unwrapObservable(b.buttons),function(d){return d.defaultButton});if(!c){return}b.close(c)}});CIV.Portal.DialogButton=CIV.Class.Create(function(a){var b=this;b.title=a.title;b.disabled=a.disabled||ko.observable(false);b.defaultButton=a.defaultButton||false});CIV.Portal.ArrayDataSource=CIV.DataSource.Extend(function(c){console.assert(typeof c.items!="undefined","options.items not set!");c.mapping=c.mapping||{};c.data=c.data||{};$.extend(c.mapping,{allItems:c.itemMap});this._super(c);var d=this;d.allItems=ko.observable(c.items);d.pagingOptions=ko.observableArray(["5","10","25","50"]);d.itemsPerPage=ko.dependentObservable({read:function(){var e=d.page().count||50;return e?e.toString():null},write:function(e){var f=d.page();f.count=parseInt(e);f.startIndex=0;d.page(f)}}).extend({address:"Count"});var b=function(){var f=d.sort().expression;if(!f){return}var e=d.sort().order;d.allItems().sort(CIV.Global.Sort(f,e));d.allItems.valueHasMutated()};d.sort.subscribe(b);b();var a=ko.dependentObservable(function(){if(!d.page().count){d.page({startIndex:0,count:0})}var e=d.page();var g=[];var f=Math.min(parseInt(e.startIndex)+parseInt(e.count),d.allItems().length);for(var h=e.startIndex;h<f;h++){g.push(d.allItems()[h])}d.items(g);return{totalItemCount:d.allItems().length,itemStart:Math.min(e.startIndex+1,f),itemEnd:f,loaded:true}});this._load=function(){var e=a();ko.mapping.fromJS(e,d)};d.totalPages=ko.dependentObservable(function(){if(!d.page().count){return 0}return Math.ceil(d.totalItemCount()/d.page().count)});d.currentPage=ko.dependentObservable({read:function(){if(!d.page().count){return 0}return 1+Math.floor(d.page().startIndex/d.page().count)},write:function(e){if(e>d.totalPages()){e=1}var f=(e-1)*d.page().count;d.page({startIndex:f,count:d.page().count})}});d.canPageLeft=ko.dependentObservable(function(){return d.currentPage()>1});d.canPageRight=ko.dependentObservable(function(){if(!d.page().count){return 0}return d.currentPage()<d.totalPages()});d.pageLeft=function(){d.currentPage(d.currentPage()-1)};d.pageRight=function(){d.currentPage(d.currentPage()+1)};d.totalNavigationPages=ko.observable(5);d.navigationPages=ko.dependentObservable(function(){var e=[];var f=d.totalNavigationPages();var g=d.currentPage();g-=Math.ceil(f/2);while(e.length<f&&g<=d.totalPages()){if(g>=1){var h=function(i){return function(){d.currentPage(i)}};e.push({value:g,active:g===d.currentPage(),click:h(g)})}g++}return e});d.itemName=ko.dependentObservable(function(){return d.allItems().length==1?c.itemNameSingular:c.itemNamePlural})});CIV.Portal.Tooltip=CIV.Class.Create(function(b){var c=this;b=b||{};c.message=ko.observable(b.message||"");if(ko.isObservable(b.visible)){c.visible=b.visible}else{c.visible=ko.observable(b.visible||false).extend({throttle:{rate:250,predicate:function(d){return d}}})}c.displayMessage=ko.observable();var a=function(d){if(b.messageCallback){d=b.messageCallback(d)}c.displayMessage(d||"")};c.message.subscribe(a);a(c.message());c.position=ko.observable({x:b.x||0,y:b.y||0});c.size=b.size;c.disabled=ko.observable(b.disabled);c.location=b.location||"top";c.hoverVisible=b.hoverVisible;c.animationDuration=500;if(b.animationDuration!==undefined){c.animationDuration=b.animationDuration}});CIV.Portal.Slider=CIV.Class.Create(function(b){var c=this;b=b||{};c.isVisible=b.isVisible;c.readOnly=b.readOnly;c.min=b.min;c.max=b.max;c.step=b.step||5;c.minValue=b.minValue;c.maxValue=b.maxValue;c.min.subscribe(function(d){c.minValue(d)});c.max.subscribe(function(d){c.maxValue(d)});var a=function(d,e){var f={visible:c.isVisible,disabled:true,location:e,messageCallback:b.messageCallback,x:5.5,y:2,size:"small",animationDuration:0};return new CIV.Portal.Tooltip(f)};b.tooltipLocation=b.tooltipLocation||"top";c.minTip=a(c.minValue,b.tooltipLocation);c.maxTip=a(c.maxValue,b.tooltipLocation)});CIV.Cache=function(c){var d=this;d.items=[];var a=function(e){for(var f=0,g=d.items.length;f<g;f++){if($.equals(d.items[f].key,e)){return f}}return -1};var b=function(h,e,f){var g=h.slice((f||e)+1||h.length);h.length=e<0?h.length+e:e;return h.push.apply(h,g)};d.get=function(e){var g=a(e);if(g===-1){return null}var f=d.items[g];b(d.items,g);d.items.push(f);return f.value};d.set=function(f,e){var g=a(f);if(g!==-1){d.items[g].value=e}else{d.items.push({key:f,value:e});while(d.items.length>c){d.items.shift()}}}};
