/*	SWFObject v2.0 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return }J(I);if(a.ie&&a.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=c("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);V()}}}}catch(j){}}if(a.webkit&&typeof g.readyState!=Z){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){V()}},10)}if(typeof g.addEventListener!=Z){g.addEventListener("DOMContentLoaded",V,null)}M(V)}();function V(){if(S){return }if(a.ie&&a.win){var m=Y("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=Z){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=Z){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=Z){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(a.pv[0]>0){var k=c(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(a.webkit&&a.webkit<312){U(k)}X(m,true)}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(a.win||a.mac)){D(H[j])}else{d(k)}}}}else{X(m,true)}}}function U(m){var k=m.getElementsByTagName(P)[0];if(k){var p=Y("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(a.ie&&a.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=c(i);if(k){for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}})}}function D(j){C=true;var o=c(j.id);if(o){if(j.altContentId){var l=c(j.altContentId);if(l){L=l;T=j.altContentId}}else{L=b(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=a.ie&&a.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(a.ie&&a.win&&o.readyState!=4){var i=Y("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function d(j){if(a.ie&&a.win&&j.readyState!=4){var i=Y("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(b(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(b(j),j)}}function b(n){var m=Y("div");if(a.win&&a.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=c(q);if(typeof AE.id==Z){AE.id=q}if(a.ie&&a.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=c(AE.id)}else{if(a.webkit&&a.webkit<312){var AA=Y("embed");AA.setAttribute("type",W);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=Y(P);s.setAttribute("type",W);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=Y("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function c(i){return g.getElementById(i)}function Y(i){return g.createElement(i)}function O(k){var j=a.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(a.ie&&a.mac){return }var l=g.getElementsByTagName("head")[0],k=Y("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(a.ie&&a.win)&&typeof g.createTextNode!=Z){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(a.ie&&a.win&&typeof g.styleSheets!=Z&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}function X(k,i){var j=i?"visible":"hidden";if(S){c(k).style.visibility=j}else{A("#"+k,"visibility:"+j)}}return{registerObject:function(l,i,k){if(!a.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;X(l,false)},getObjectById:function(l){var i=null;if(a.w3cdom&&S){var j=c(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=Z)){i=j}else{if(typeof k.SetVariable!=Z){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!a.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){X(u,false);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=Z){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);if(q.id==u){X(u,true)}})}else{if(m&&!C&&O("6.0.65")&&(a.win||a.mac)){X(u,false);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i)})}}},getFlashPlayerVersion:function(){return{major:a.pv[0],minor:a.pv[1],release:a.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(a.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(a.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=c(K);if(i){i.parentNode.replaceChild(L,i);if(T){X(T,true);if(a.ie&&a.win){L.style.display="block"}}L=null;T=null;C=false}}}}}();



/*	ColorBox v1.3.1 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 */
(function(A){var p="colorbox",n="hover",w=true,R=false,X,l=!A.support.opacity,T=l&&!window.XMLHttpRequest,W="click.colorbox",x="cbox_open",L="cbox_load",s="cbox_complete",K="cbox_cleanup",m="cbox_closed",O="resize.cbox_resize",I="resize.cboxie6 scroll.cboxie6",F,U,V,d,y,i,b,E,c,P,C,f,q,h,k,M,j,H,r,Y,g,e,a,v,N,o,z,Q,u,G,B={transition:"elastic",speed:350,width:R,height:R,initialWidth:"400",initialHeight:"400",maxWidth:R,maxHeight:R,scalePhotos:w,scrollbars:w,inline:R,html:R,iframe:R,photo:R,href:R,title:R,rel:R,opacity:0.9,preloading:w,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:R,overlayClose:w,slideshow:R,slideshowAuto:w,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow"};function J(Z){if(Z.keyCode===37){Z.preventDefault();H.click()}else{if(Z.keyCode===39){Z.preventDefault();j.click()}}}function D(Z,aa){aa=aa==="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return(typeof Z==="string")?(Z.match(/%/)?(aa/100)*parseInt(Z,10):parseInt(Z,10)):Z}function t(Z){return Q.photo||Z.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function S(){for(var Z in Q){if(typeof(Q[Z])==="function"){Q[Z]=Q[Z].call(o)}}}X=A.fn.colorbox=function(aa,Z){if(this.length){this.each(function(){var ab=A(this).data(p)?A.extend({},A(this).data(p),aa):A.extend({},B,aa);A(this).data(p,ab).addClass("cboxelement")})}else{A(this).data(p,A.extend({},B,aa))}A(this).unbind(W).bind(W,function(ac){o=this;Q=A(o).data(p);S();A().bind("keydown.cbox_close",function(ad){if(ad.keyCode===27){ad.preventDefault();X.close()}});if(Q.overlayClose){F.css({cursor:"pointer"}).one("click",X.close)}o.blur();G=Z||R;var ab=Q.rel||o.rel;if(ab&&ab!=="nofollow"){c=A(".cboxelement").filter(function(){var ad=A(this).data(p).rel||this.rel;return(ad===ab)});z=c.index(o);if(z<0){c=c.add(o);z=c.length-1}}else{c=A(o);z=0}if(!u){u=w;A.event.trigger(x);r.html(Q.close);F.css({opacity:Q.opacity}).show();X.position(D(Q.initialWidth,"x"),D(Q.initialHeight,"y"),0);if(T){P.bind(I,function(){F.css({width:P.width(),height:P.height(),top:P.scrollTop(),left:P.scrollLeft()})}).trigger(I)}}X.slideshow();X.load();ac.preventDefault()});if(aa&&aa.open){A(this).triggerHandler(W)}return this};X.init=function(){function Z(aa){return A('<div id="cbox'+aa+'"/>')}P=A(window);U=A('<div id="colorbox"/>');F=Z("Overlay").hide();V=Z("Wrapper");d=Z("Content").append(C=Z("LoadedContent").css({width:0,height:0}),f=Z("LoadingOverlay"),q=Z("LoadingGraphic"),h=Z("Title"),k=Z("Current"),M=Z("Slideshow"),j=Z("Next"),H=Z("Previous"),r=Z("Close"));V.append(A("<div/>").append(Z("TopLeft"),y=Z("TopCenter"),Z("TopRight")),A("<div/>").append(i=Z("MiddleLeft"),d,b=Z("MiddleRight")),A("<div/>").append(Z("BottomLeft"),E=Z("BottomCenter"),Z("BottomRight"))).children().children().css({"float":"left"});A("body form#aspnetForm").prepend(F,U.append(V));if(l){U.addClass("cboxIE");if(T){F.css("position","absolute")}}d.children().addClass(n).mouseover(function(){A(this).addClass(n)}).mouseout(function(){A(this).removeClass(n)}).hide();Y=y.height()+E.height()+d.outerHeight(w)-d.height();g=i.width()+b.width()+d.outerWidth(w)-d.width();e=C.outerHeight(w);a=C.outerWidth(w);U.css({"padding-bottom":Y,"padding-right":g}).hide();j.click(X.next);H.click(X.prev);r.click(X.close);d.children().removeClass(n)};X.position=function(ac,ab,aa,ad){var ae=document.documentElement.clientHeight,ag=ae/2-ab/2,af=document.body.clientWidth/2-ac/2,Z;if(ab>ae){ag-=(ab-ae)}if(ag<0){ag=0}if(af<0){af=0}ag+=P.scrollTop();af+=P.scrollLeft();ac=ac-g;ab=ab-Y;Z=(U.width()===ac&&U.height()===ab)?0:aa;V[0].style.width=V[0].style.height="9999px";function ah(ai){y[0].style.width=E[0].style.width=d[0].style.width=ai.style.width;q[0].style.height=f[0].style.height=d[0].style.height=i[0].style.height=b[0].style.height=ai.style.height}U.dequeue().animate({height:ab,width:ac,top:ag,left:af},{duration:Z,complete:function(){ah(this);V[0].style.width=(ac+g)+"px";V[0].style.height=(ab+Y)+"px";if(ad){ad()}},step:function(){ah(this)}})};X.resize=function(ae){if(!u){return}var aa,al,af,ad,ab,ah,am,Z,aj,ac=Q.transition==="none"?0:Q.speed;P.unbind(O);if(!ae){aj=setTimeout(function(){al=C.children().outerHeight(w);C[0].style.height=al+"px";X.position(C.width()+a+g,al+e+Y,ac)},1);return}C.remove();C=A(ae);function ai(){aa=Q.width?v:v&&v<C.width()?v:C.width();return aa}function ag(){al=Q.height?N:N&&N<C.height()?N:C.height();return al}if(!Q.scrollbars){C.css({overflow:"hidden"})}C.hide().appendTo("body").attr({id:"cboxLoadedContent"}).css({width:ai()}).css({height:ag()}).prependTo(d);if(T){A("select:not(#colorbox select)").filter(function(){return A(this).css("visibility")!=="hidden"}).css({visibility:"hidden"}).one(K,function(){A(this).css({visibility:"inherit"})})}Z=A("#cboxPhoto")[0];if(Z&&Q.height){af=(al-parseInt(Z.style.height,10))/2;Z.style.marginTop=(af>0?af:0)+"px"}function ak(ao){var an=aa+a+g,ap=al+e+Y;A().unbind("keydown",J);X.position(an,ap,ao,function(){if(!u){return}if(l){if(Z){C.fadeIn(100)}U[0].style.removeAttribute("filter")}d.children().show();A("#cboxIframeTemp").after("<iframe id='cboxIframe' name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+(Q.href||o.href)+"' />").remove();f.hide();q.hide();M.hide();if(c.length>1){k.html(Q.current.replace(/\{current\}/,z+1).replace(/\{total\}/,c.length));j.html(Q.next);H.html(Q.previous);A().bind("keydown",J);if(Q.slideshow){M.show()}}else{k.hide();j.hide();H.hide()}h.html(Q.title||o.title);A.event.trigger(s);if(G){G.call(o)}if(Q.transition==="fade"){U.fadeTo(ac,1,function(){if(l){U[0].style.removeAttribute("filter")}})}P.bind(O,function(){X.position(an,ap,0)})})}if((Q.transition==="fade"&&U.fadeTo(ac,0,function(){ak(0)}))||ak(ac)){}if(Q.preloading&&c.length>1){ad=z>0?c[z-1]:c[c.length-1];ah=z<c.length-1?c[z+1]:c[0];am=A(ah).data(p).href||ah.href;ab=A(ad).data(p).href||ad.href;if(t(am)){A("<img />").attr("src",am)}if(t(ab)){A("<img />").attr("src",ab)}}};X.load=function(){var Z,ad,aa,ac,ab=X.resize;o=c[z];Q=A(o).data(p);S();A.event.trigger(L);Z=Q.height?D(Q.height,"y")-e-Y:R;ad=Q.width?D(Q.width,"x")-a-g:R;aa=Q.href||o.href;f.show();q.show();r.show();if(Q.maxHeight){N=Q.maxHeight?D(Q.maxHeight,"y")-e-Y:R;Z=Z&&Z<N?Z:N}if(Q.maxWidth){v=Q.maxWidth?D(Q.maxWidth,"x")-a-g:R;ad=ad&&ad<v?ad:v}N=Z;v=ad;if(Q.inline){aa=A("#"+(o.href.split("#")[1]));A('<div id="cboxInlineTemp" />').hide().insertBefore(A(aa)[0]).bind(L+" "+K,function(){C.children().insertBefore(this);A(this).remove()});ab(A(aa).wrapAll("<div/>").parent())}else{if(Q.iframe){ab(A("<div><div id='cboxIframeTemp' /></div>"))}else{if(Q.html){ab(A("<div/>").html(Q.html))}else{if(t(aa)){ac=new Image();ac.onload=function(){ac.onload=null;if((N||v)&&Q.scalePhotos){var ag=this.width,ae=this.height,ai=0,ah=this,af=function(){ae+=ae*ai;ag+=ag*ai;ah.height=ae;ah.width=ag};if(v&&ag>v){ai=(v-ag)/ag;af()}if(N&&ae>N){ai=(N-ae)/ae;af()}}ab(A("<div />").css({width:this.width,height:this.height}).append(A(this).css({width:this.width,height:this.height,display:"block",margin:"auto",border:0}).attr("id","cboxPhoto")));if(c.length>1){A(this).css({cursor:"pointer"}).click(X.next)}if(l){this.style.msInterpolationMode="bicubic"}};ac.src=aa}else{A("<div />").load(aa,function(ae,af){if(af==="success"){ab(A(this))}else{ab(A("<p>Request unsuccessful.</p>"))}})}}}}};X.next=function(){z=z<c.length-1?z+1:0;X.load()};X.prev=function(){z=z>0?z-1:c.length-1;X.load()};X.slideshow=function(){var aa,Z,ab="cboxSlideshow_";M.bind(K,function(){clearTimeout(Z);M.unbind(s+" "+L+" click")});function ac(){M.text(Q.slideshowStop).bind(s,function(){Z=setTimeout(X.next,Q.slideshowSpeed)}).bind(L,function(){clearTimeout(Z)}).one("click",function(){aa();A(this).removeClass(n)});U.removeClass(ab+"off").addClass(ab+"on")}aa=function(){clearTimeout(Z);M.text(Q.slideshowStart).unbind(s+" "+L).one("click",function(){ac();Z=setTimeout(X.next,Q.slideshowSpeed);A(this).removeClass(n)});U.removeClass(ab+"on").addClass(ab+"off")};if(Q.slideshow&&c.length>1){if(Q.slideshowAuto){ac()}else{aa()}}};X.close=function(){A.event.trigger(K);u=R;A().unbind("keydown",J).unbind("keydown.cbox_close");P.unbind(O+" "+I);F.css({cursor:"auto"}).fadeOut("fast");U.stop(w,R).fadeOut("fast",function(){C.remove();U.css({opacity:1});d.children().hide();A.event.trigger(m)})};X.element=function(){return o};X.settings=B;A(X.init)}(jQuery));

/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.0.3
* Requires jQuery 1.1.3+
* Docs: http://docs.jquery.com/Plugins/livequery
*/
(function($) {
    $.extend($.fn, { livequery: function(type, fn, fn2) { var self = this, q; if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; $.each($.livequery.queries, function(i, query) { if (self.selector == query.selector && self.context == query.context && type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid)) return (q = query) && false; }); q = q || new $.livequery(this.selector, this.context, type, fn, fn2); q.stopped = false; q.run(); return this; }, expire: function(type, fn, fn2) { var self = this; if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; $.each($.livequery.queries, function(i, query) { if (self.selector == query.selector && self.context == query.context && (!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped) $.livequery.stop(query.id); }); return this; } }); $.livequery = function(selector, context, type, fn, fn2) { this.selector = selector; this.context = context || document; this.type = type; this.fn = fn; this.fn2 = fn2; this.elements = []; this.stopped = false; this.id = $.livequery.queries.push(this) - 1; fn.$lqguid = fn.$lqguid || $.livequery.guid++; if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++; return this; }; $.livequery.prototype = { stop: function() { var query = this; if (this.type) this.elements.unbind(this.type, this.fn); else if (this.fn2) this.elements.each(function(i, el) { query.fn2.apply(el); }); this.elements = []; this.stopped = true; }, run: function() { if (this.stopped) return; var query = this; var oEls = this.elements, els = $(this.selector, this.context), nEls = els.not(oEls); this.elements = els; if (this.type) { nEls.bind(this.type, this.fn); if (oEls.length > 0) $.each(oEls, function(i, el) { if ($.inArray(el, els) < 0) $.event.remove(el, query.type, query.fn); }); } else { nEls.each(function() { query.fn.apply(this); }); if (this.fn2 && oEls.length > 0) $.each(oEls, function(i, el) { if ($.inArray(el, els) < 0) query.fn2.apply(el); }); } } }; $.extend($.livequery, { guid: 0, queries: [], queue: [], running: false, timeout: null, checkQueue: function() { if ($.livequery.running && $.livequery.queue.length) { var length = $.livequery.queue.length; while (length--) $.livequery.queries[$.livequery.queue.shift()].run(); } }, pause: function() { $.livequery.running = false; }, play: function() { $.livequery.running = true; $.livequery.run(); }, registerPlugin: function() { $.each(arguments, function(i, n) { if (!$.fn[n]) return; var old = $.fn[n]; $.fn[n] = function() { var r = old.apply(this, arguments); $.livequery.run(); return r; } }); }, run: function(id) {
        if (id != undefined) { if ($.inArray(id, $.livequery.queue) < 0) $.livequery.queue.push(id); } else
            $.each($.livequery.queries, function(id) { if ($.inArray(id, $.livequery.queue) < 0) $.livequery.queue.push(id); }); if ($.livequery.timeout) clearTimeout($.livequery.timeout); $.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
    }, stop: function(id) {
        if (id != undefined) $.livequery.queries[id].stop(); else
            $.each($.livequery.queries, function(id) { $.livequery.queries[id].stop(); });
    } 
    }); $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove'); $(function() { $.livequery.play(); }); var init = $.prototype.init; $.prototype.init = function(a, c) { var r = init.apply(this, arguments); if (a && a.selector) r.context = a.context, r.selector = a.selector; if (typeof a == 'string') r.context = c || document, r.selector = a; return r; }; $.prototype.init.prototype = $.prototype;
})(jQuery);

/* 
 * flowplayer.js 3.1.4. The Flowplayer API
 * 
 * Copyright 2009 Flowplayer Oy
 * 
 * This file is part of Flowplayer.
 * 
 * Flowplayer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flowplayer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Date: 2009-02-25 16:24:29 -0500 (Wed, 25 Feb 2009)
 * Revision: 166 
 */
/* 
* flowplayer.js 3.1.4. The Flowplayer API
* 
* Copyright 2009 Flowplayer Oy
* 
* This file is part of Flowplayer.
* 
* Flowplayer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* Flowplayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
* 
* Date: 2009-02-25 21:24:29 +0000 (Wed, 25 Feb 2009)
* Revision: 166 
*/
(function() { function g(o) { console.log("$f.fireEvent", [].slice.call(o)) } function k(q) { if (!q || typeof q != "object") { return q } var o = new q.constructor(); for (var p in q) { if (q.hasOwnProperty(p)) { o[p] = k(q[p]) } } return o } function m(t, q) { if (!t) { return } var o, p = 0, r = t.length; if (r === undefined) { for (o in t) { if (q.call(t[o], o, t[o]) === false) { break } } } else { for (var s = t[0]; p < r && q.call(s, p, s) !== false; s = t[++p]) { } } return t } function c(o) { return document.getElementById(o) } function i(q, p, o) { if (typeof p != "object") { return q } if (q && p) { m(p, function(r, s) { if (!o || typeof s != "function") { q[r] = s } }) } return q } function n(s) { var q = s.indexOf("."); if (q != -1) { var p = s.substring(0, q) || "*"; var o = s.substring(q + 1, s.length); var r = []; m(document.getElementsByTagName(p), function() { if (this.className && this.className.indexOf(o) != -1) { r.push(this) } }); return r } } function f(o) { o = o || window.event; if (o.preventDefault) { o.stopPropagation(); o.preventDefault() } else { o.returnValue = false; o.cancelBubble = true } return false } function j(q, o, p) { q[o] = q[o] || []; q[o].push(p) } function e() { return "_" + ("" + Math.random()).substring(2, 10) } var h = function(t, r, s) { var q = this; var p = {}; var u = {}; q.index = r; if (typeof t == "string") { t = { url: t} } i(this, t, true); m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function() { var v = "on" + this; if (v.indexOf("*") != -1) { v = v.substring(0, v.length - 1); var w = "onBefore" + v.substring(2); q[w] = function(x) { j(u, w, x); return q } } q[v] = function(x) { j(u, v, x); return q }; if (r == -1) { if (q[w]) { s[w] = q[w] } if (q[v]) { s[v] = q[v] } } }); i(this, { onCuepoint: function(x, w) { if (arguments.length == 1) { p.embedded = [null, x]; return q } if (typeof x == "number") { x = [x] } var v = e(); p[v] = [x, w]; if (s.isLoaded()) { s._api().fp_addCuepoints(x, r, v) } return q }, update: function(w) { i(q, w); if (s.isLoaded()) { s._api().fp_updateClip(w, r) } var v = s.getConfig(); var x = (r == -1) ? v.clip : v.playlist[r]; i(x, w, true) }, _fireEvent: function(v, y, w, A) { if (v == "onLoad") { m(p, function(B, C) { if (C[0]) { s._api().fp_addCuepoints(C[0], r, B) } }); return false } A = A || q; if (v == "onCuepoint") { var z = p[y]; if (z) { return z[1].call(s, A, w) } } if (y && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v) != -1) { i(A, y); if (y.metaData) { if (!A.duration) { A.duration = y.metaData.duration } else { A.fullDuration = y.metaData.duration } } } var x = true; m(u[v], function() { x = this.call(s, A, y, w) }); return x } }); if (t.onCuepoint) { var o = t.onCuepoint; q.onCuepoint.apply(q, typeof o == "function" ? [o] : o); delete t.onCuepoint } m(t, function(v, w) { if (typeof w == "function") { j(u, v, w); delete t[v] } }); if (r == -1) { s.onCuepoint = this.onCuepoint } }; var l = function(p, r, q, t) { var s = {}; var o = this; var u = false; if (t) { i(s, t) } m(r, function(v, w) { if (typeof w == "function") { s[v] = w; delete r[v] } }); i(this, { animate: function(y, z, x) { if (!y) { return o } if (typeof z == "function") { x = z; z = 500 } if (typeof y == "string") { var w = y; y = {}; y[w] = z; z = 500 } if (x) { var v = e(); s[v] = x } if (z === undefined) { z = 500 } r = q._api().fp_animate(p, y, z, v); return o }, css: function(w, x) { if (x !== undefined) { var v = {}; v[w] = x; w = v } r = q._api().fp_css(p, w); i(o, r); return o }, show: function() { this.display = "block"; q._api().fp_showPlugin(p); return o }, hide: function() { this.display = "none"; q._api().fp_hidePlugin(p); return o }, toggle: function() { this.display = q._api().fp_togglePlugin(p); return o }, fadeTo: function(y, x, w) { if (typeof x == "function") { w = x; x = 500 } if (w) { var v = e(); s[v] = w } this.display = q._api().fp_fadeTo(p, y, x, v); this.opacity = y; return o }, fadeIn: function(w, v) { return o.fadeTo(1, w, v) }, fadeOut: function(w, v) { return o.fadeTo(0, w, v) }, getName: function() { return p }, getPlayer: function() { return q }, _fireEvent: function(w, v, x) { if (w == "onUpdate") { var y = q._api().fp_getPlugin(p); if (!y) { return } i(o, y); delete o.methods; if (!u) { m(y.methods, function() { var A = "" + this; o[A] = function() { var B = [].slice.call(arguments); var C = q._api().fp_invoke(p, A, B); return C === "undefined" || C === undefined ? o : C } }); u = true } } var z = s[w]; if (z) { z.apply(o, v); if (w.substring(0, 1) == "_") { delete s[w] } } } }) }; function b(o, t, z) { var E = this, y = null, x, u, p = [], s = {}, B = {}, r, v, w, D, A, q; i(E, { id: function() { return r }, isLoaded: function() { return (y !== null) }, getParent: function() { return o }, hide: function(F) { if (F) { o.style.height = "0px" } if (y) { y.style.height = "0px" } return E }, show: function() { o.style.height = q + "px"; if (y) { y.style.height = A + "px" } return E }, isHidden: function() { return y && parseInt(y.style.height, 10) === 0 }, load: function(F) { if (!y && E._fireEvent("onBeforeLoad") !== false) { m(a, function() { this.unload() }); x = o.innerHTML; if (x && !flashembed.isSupported(t.version)) { o.innerHTML = "" } flashembed(o, t, { config: z }); if (F) { F.cached = true; j(B, "onLoad", F) } } return E }, unload: function() { if (x.replace(/\s/g, "") !== "") { if (E._fireEvent("onBeforeUnload") === false) { return E } try { if (y) { y.fp_close(); E._fireEvent("onUnload") } } catch (F) { } y = null; o.innerHTML = x } return E }, getClip: function(F) { if (F === undefined) { F = D } return p[F] }, getCommonClip: function() { return u }, getPlaylist: function() { return p }, getPlugin: function(F) { var H = s[F]; if (!H && E.isLoaded()) { var G = E._api().fp_getPlugin(F); if (G) { H = new l(F, G, E); s[F] = H } } return H }, getScreen: function() { return E.getPlugin("screen") }, getControls: function() { return E.getPlugin("controls") }, getConfig: function(F) { return F ? k(z) : z }, getFlashParams: function() { return t }, loadPlugin: function(I, H, K, J) { if (typeof K == "function") { J = K; K = {} } var G = J ? e() : "_"; E._api().fp_loadPlugin(I, H, K, G); var F = {}; F[G] = J; var L = new l(I, null, E, F); s[I] = L; return L }, getState: function() { return y ? y.fp_getState() : -1 }, play: function(G, F) { function H() { if (G !== undefined) { E._api().fp_play(G, F) } else { E._api().fp_play() } } if (y) { H() } else { E.load(function() { H() }) } return E }, getVersion: function() { var G = "flowplayer.js 3.1.4"; if (y) { var F = y.fp_getVersion(); F.push(G); return F } return G }, _api: function() { if (!y) { throw "Flowplayer " + E.id() + " not loaded when calling an API method" } return y }, setClip: function(F) { E.setPlaylist([F]); return E }, getIndex: function() { return w } }); m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function() { var F = "on" + this; if (F.indexOf("*") != -1) { F = F.substring(0, F.length - 1); var G = "onBefore" + F.substring(2); E[G] = function(H) { j(B, G, H); return E } } E[F] = function(H) { j(B, F, H); return E } }); m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed").split(","), function() { var F = this; E[F] = function(H, G) { if (!y) { return E } var I = null; if (H !== undefined && G !== undefined) { I = y["fp_" + F](H, G) } else { I = (H === undefined) ? y["fp_" + F]() : y["fp_" + F](H) } return I === "undefined" || I === undefined ? E : I } }); E._fireEvent = function(O) { if (typeof O == "string") { O = [O] } var P = O[0], M = O[1], K = O[2], J = O[3], I = 0; if (z.debug) { g(O) } if (!y && P == "onLoad" && M == "player") { y = y || c(v); A = y.clientHeight; m(p, function() { this._fireEvent("onLoad") }); m(s, function(Q, R) { R._fireEvent("onUpdate") }); u._fireEvent("onLoad") } if (P == "onLoad" && M != "player") { return } if (P == "onError") { if (typeof M == "string" || (typeof M == "number" && typeof K == "number")) { M = K; K = J } } if (P == "onContextMenu") { m(z.contextMenu[M], function(Q, R) { R.call(E) }); return } if (P == "onPluginEvent") { var F = M.name || M; var G = s[F]; if (G) { G._fireEvent("onUpdate", M); G._fireEvent(K, O.slice(3)) } return } if (P == "onPlaylistReplace") { p = []; var L = 0; m(M, function() { p.push(new h(this, L++, E)) }) } if (P == "onClipAdd") { if (M.isInStream) { return } M = new h(M, K, E); p.splice(K, 0, M); for (I = K + 1; I < p.length; I++) { p[I].index++ } } var N = true; if (typeof M == "number" && M < p.length) { D = M; var H = p[M]; if (H) { N = H._fireEvent(P, K, J) } if (!H || N !== false) { N = u._fireEvent(P, K, J, H) } } m(B[P], function() { N = this.call(E, M, K); if (this.cached) { B[P].splice(I, 1) } if (N === false) { return false } I++ }); return N }; function C() { if ($f(o)) { $f(o).getParent().innerHTML = ""; w = $f(o).getIndex(); a[w] = E } else { a.push(E); w = a.length - 1 } q = parseInt(o.style.height, 10) || o.clientHeight; if (typeof t == "string") { t = { src: t} } r = o.id || "fp" + e(); v = t.id || r + "_api"; t.id = v; z.playerId = r; if (typeof z == "string") { z = { clip: { url: z}} } if (typeof z.clip == "string") { z.clip = { url: z.clip} } z.clip = z.clip || {}; if (o.getAttribute("href", 2) && !z.clip.url) { z.clip.url = o.getAttribute("href", 2) } u = new h(z.clip, -1, E); z.playlist = z.playlist || [z.clip]; var F = 0; m(z.playlist, function() { var H = this; if (typeof H == "object" && H.length) { H = { url: "" + H} } m(z.clip, function(I, J) { if (J !== undefined && H[I] === undefined && typeof J != "function") { H[I] = J } }); z.playlist[F] = H; H = new h(H, F, E); p.push(H); F++ }); m(z, function(H, I) { if (typeof I == "function") { if (u[H]) { u[H](I) } else { j(B, H, I) } delete z[H] } }); m(z.plugins, function(H, I) { if (I) { s[H] = new l(H, I, E) } }); if (!z.plugins || z.plugins.controls === undefined) { s.controls = new l("controls", null, E) } s.canvas = new l("canvas", null, E); t.bgcolor = t.bgcolor || "#000000"; t.version = t.version || [9, 0]; t.expressInstall = "http://www.flowplayer.org/swf/expressinstall.swf"; function G(H) { if (!E.isLoaded() && E._fireEvent("onBeforeClick") !== false) { E.load() } return f(H) } x = o.innerHTML; if (x.replace(/\s/g, "") !== "") { if (o.addEventListener) { o.addEventListener("click", G, false) } else { if (o.attachEvent) { o.attachEvent("onclick", G) } } } else { if (o.addEventListener) { o.addEventListener("click", f, false) } E.load() } } if (typeof o == "string") { flashembed.domReady(function() { var F = c(o); if (!F) { throw "Flowplayer cannot access element: " + o } else { o = F; C() } }) } else { C() } } var a = []; function d(o) { this.length = o.length; this.each = function(p) { m(o, p) }; this.size = function() { return o.length } } window.flowplayer = window.$f = function() { var p = null; var o = arguments[0]; if (!arguments.length) { m(a, function() { if (this.isLoaded()) { p = this; return false } }); return p || a[0] } if (arguments.length == 1) { if (typeof o == "number") { return a[o] } else { if (o == "*") { return new d(a) } m(a, function() { if (this.id() == o.id || this.id() == o || this.getParent() == o) { p = this; return false } }); return p } } if (arguments.length > 1) { var r = arguments[1]; var q = (arguments.length == 3) ? arguments[2] : {}; if (typeof o == "string") { if (o.indexOf(".") != -1) { var t = []; m(n(o), function() { t.push(new b(this, k(r), k(q))) }); return new d(t) } else { var s = c(o); return new b(s !== null ? s : o, r, q) } } else { if (o) { return new b(o, r, q) } } } return null }; i(window.$f, { fireEvent: function() { var o = [].slice.call(arguments); var q = $f(o[0]); return q ? q._fireEvent(o.slice(1)) : null }, addPlugin: function(o, p) { b.prototype[o] = p; return $f }, each: m, extend: i }); if (typeof jQuery == "function") { jQuery.prototype.flowplayer = function(q, p) { if (!arguments.length || typeof arguments[0] == "number") { var o = []; this.each(function() { var r = $f(this); if (r) { o.push(r) } }); return arguments.length ? o[arguments[0]] : new d(o) } return this.each(function() { $f(this, k(q), p ? k(p) : {}) }) } } })(); (function() { var e = typeof jQuery == "function"; var i = { width: "100%", height: "100%", allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: null, onFail: null, expressInstall: null, w3c: false, cachebusting: false }; if (e) { jQuery.tools = jQuery.tools || {}; jQuery.tools.flashembed = { version: "1.0.4", conf: i} } function j() { if (c.done) { return false } var l = document; if (l && l.getElementsByTagName && l.getElementById && l.body) { clearInterval(c.timer); c.timer = null; for (var k = 0; k < c.ready.length; k++) { c.ready[k].call() } c.ready = null; c.done = true } } var c = e ? jQuery : function(k) { if (c.done) { return k() } if (c.timer) { c.ready.push(k) } else { c.ready = [k]; c.timer = setInterval(j, 13) } }; function f(l, k) { if (k) { for (key in k) { if (k.hasOwnProperty(key)) { l[key] = k[key] } } } return l } function g(k) { switch (h(k)) { case "string": k = k.replace(new RegExp('(["\\\\])', "g"), "\\$1"); k = k.replace(/^\s?(\d+)%/, "$1pct"); return '"' + k + '"'; case "array": return "[" + b(k, function(n) { return g(n) }).join(",") + "]"; case "function": return '"function()"'; case "object": var l = []; for (var m in k) { if (k.hasOwnProperty(m)) { l.push('"' + m + '":' + g(k[m])) } } return "{" + l.join(",") + "}" } return String(k).replace(/\s/g, " ").replace(/\'/g, '"') } function h(l) { if (l === null || l === undefined) { return false } var k = typeof l; return (k == "object" && l.push) ? "array" : k } if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { } }) } function b(k, n) { var m = []; for (var l in k) { if (k.hasOwnProperty(l)) { m[l] = n(k[l]) } } return m } function a(r, t) { var q = f({}, r); var s = document.all; var n = '<object width="' + q.width + '" height="' + q.height + '"'; if (s && !q.id) { q.id = "_" + ("" + Math.random()).substring(9) } if (q.id) { n += ' id="' + q.id + '"' } if (q.cachebusting) { q.src += ((q.src.indexOf("?") != -1 ? "&" : "?") + Math.random()) } if (q.w3c || !s) { n += ' data="' + q.src + '" type="application/x-shockwave-flash"' } else { n += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' } n += ">"; if (q.w3c || s) { n += '<param name="movie" value="' + q.src + '" />' } q.width = q.height = q.id = q.w3c = q.src = null; for (var l in q) { if (q[l] !== null) { n += '<param name="' + l + '" value="' + q[l] + '" />' } } var o = ""; if (t) { for (var m in t) { if (t[m] !== null) { o += m + "=" + (typeof t[m] == "object" ? g(t[m]) : t[m]) + "&" } } o = o.substring(0, o.length - 1); n += '<param name="flashvars" value=\'' + o + "' />" } n += "</object>"; return n } function d(m, p, l) { var k = flashembed.getVersion(); f(this, { getContainer: function() { return m }, getConf: function() { return p }, getVersion: function() { return k }, getFlashvars: function() { return l }, getApi: function() { return m.firstChild }, getHTML: function() { return a(p, l) } }); var q = p.version; var r = p.expressInstall; var o = !q || flashembed.isSupported(q); if (o) { p.onFail = p.version = p.expressInstall = null; m.innerHTML = a(p, l) } else { if (q && r && flashembed.isSupported([6, 65])) { f(p, { src: r }); l = { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title }; m.innerHTML = a(p, l) } else { if (m.innerHTML.replace(/\s/g, "") !== "") { } else { m.innerHTML = "<h2>Flash version " + q + " or greater is required</h2><h3>" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "</h3>" + (m.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>"); if (m.tagName == "A") { m.onclick = function() { location.href = "http://www.adobe.com/go/getflashplayer" } } } } } if (!o && p.onFail) { var n = p.onFail.call(this); if (typeof n == "string") { m.innerHTML = n } } if (document.all) { window[p.id] = document.getElementById(p.id) } } window.flashembed = function(l, m, k) { if (typeof l == "string") { var n = document.getElementById(l); if (n) { l = n } else { c(function() { flashembed(l, m, k) }); return } } if (!l) { return } if (typeof m == "string") { m = { src: m} } var o = f({}, i); f(o, m); return new d(l, o, k) }; f(window.flashembed, { getVersion: function() { var m = [0, 0]; if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var l = navigator.plugins["Shockwave Flash"].description; if (typeof l != "undefined") { l = l.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); var n = parseInt(l.replace(/^(.*)\..*$/, "$1"), 10); var r = /r/.test(l) ? parseInt(l.replace(/^.*r(.*)$/, "$1"), 10) : 0; m = [n, r] } } else { if (window.ActiveXObject) { try { var p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (q) { try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); m = [6, 0]; p.AllowScriptAccess = "always" } catch (k) { if (m[0] == 6) { return m } } try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (o) { } } if (typeof p == "object") { l = p.GetVariable("$version"); if (typeof l != "undefined") { l = l.replace(/^\S+\s+(.*)$/, "$1").split(","); m = [parseInt(l[0], 10), parseInt(l[2], 10)] } } } } return m }, isSupported: function(k) { var m = flashembed.getVersion(); var l = (m[0] > k[0]) || (m[0] == k[0] && m[1] >= k[1]); return l }, domReady: c, asString: g, getHTML: a }); if (e) { jQuery.fn.flashembed = function(l, k) { var m = null; this.each(function() { m = flashembed(this, l, k) }); return l.api === false ? this : m } } })();


/*
* flowplayer.playlist 3.0.7. Flowplayer JavaScript plugin.
* 
* This file is part of Flowplayer, http://flowplayer.org
*
* Author: Tero Piirainen, <info@flowplayer.org>
* Copyright (c) 2008 Flowplayer Ltd
*
* Dual licensed under MIT and GPL 2+ licenses
* SEE: http://www.opensource.org/licenses
* 
* Date: 2009-09-03 09:44:40 +0000 (Thu, 03 Sep 2009)
* Revision: 2090 
*/
(function(a) { $f.addPlugin("playlist", function(d, o) { var n = this; var b = { playingClass: "playing", pausedClass: "paused", progressClass: "progress", template: '<a href="${url}">${title}</a>', loop: false, playOnClick: true, manual: false }; a.extend(b, o); d = a(d); var j = n.getPlaylist().length <= 1 || b.manual; var k = null; function e(q) { var p = m; a.each(q, function(r, s) { if (!a.isFunction(s)) { p = p.replace("${" + r + "}", s).replace("$%7B" + r + "%7D", s) } }); return p } function i() { k = d.children().unbind("click.playlist").bind("click.playlist", function() { return h(a(this), k.index(this)) }) } function c() { d.empty(); a.each(n.getPlaylist(), function() { d.append(e(this)) }); i() } function h(p, q) { if (p.hasClass(b.playingClass) || p.hasClass(b.pausedClass)) { n.toggle() } else { p.addClass(b.progressClass); n.play(q) } return false } function l() { if (j) { k = d.children() } k.removeClass(b.playingClass); k.removeClass(b.pausedClass); k.removeClass(b.progressClass) } function f(p) { return (j) ? k.filter("[href=" + p.originalUrl + "]") : k.eq(p.index) } if (!j) { var m = d.is(":empty") ? b.template : d.html(); c() } else { k = d.children(); if (a.isFunction(k.live)) { a(d.selector + "> *").live("click", function() { var p = a(this); return h(p, p.attr("href")) }) } else { k.click(function() { var p = a(this); return h(p, p.attr("href")) }) } var g = n.getClip(0); if (!g.url && b.playOnClick) { g.update({ url: k.eq(0).attr("href") }) } } n.onBegin(function(p) { l(); f(p).addClass(b.playingClass) }); n.onPause(function(p) { f(p).removeClass(b.playingClass).addClass(b.pausedClass) }); n.onResume(function(p) { f(p).removeClass(b.pausedClass).addClass(b.playingClass) }); if (!b.loop && !j) { n.onBeforeFinish(function(p) { if (!p.isInStream && p.index < k.length - 1) { return false } }) } if (j && b.loop) { n.onBeforeFinish(function(q) 
{ var p = f(q); if (p.next().length) { p.next().click() } else { k.eq(0).click() } return false }) } n.onUnload(function() { l() }); if (!j) { n.onPlaylistReplace(function() { c() }) } n.onClipAdd(function(q, p) { k.eq(p).before(e(q)); i() }); return n }) })(jQuery);

/*
 * jQuery UI 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*

 * jQuery UI Datepicker 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	ui.core.js
 */
(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";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"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},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){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(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<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}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){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==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});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(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);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,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}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(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));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||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_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);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){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.rangeStart=null;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")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_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.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_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._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_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{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}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);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.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/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;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){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}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",TIMESTAMP:"@",W3C:"yy-mm-dd",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":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;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){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_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 stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";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 numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";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||!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()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#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()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" 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,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;endYear>=year;endYear--){html+='<option value="'+endYear+'"'+(endYear==drawYear?' selected="selected"':"")+">"+endYear+"</option>"}html+="</select>"}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._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_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,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-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[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_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 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(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);


