$(document).ready(function(){var a=$("select.selectStatus");var b=false;for(i=0;i<a.length;++i){val=a[i].options[a[i].selectedIndex].value;arr=val.split("_");if(arr[1]=="1"){b=true}}if($("#tr_confirmed").hasClass("hidden")&&b){$("#tr_confirmed").removeClass("hidden")}});function showElement(b){var f=document.getElementById(b);var e=f.options[f.selectedIndex].value;var g=e.split("_");switch(g[1]){case"4":$("#tr_changed_"+g[0]).removeClass("hidden");break;default:$("#tr_changed_"+g[0]).addClass("hidden")}var j=$("select.selectStatus");var k=false;var h=false;var a=new Array();for(i=0;i<j.length;++i){e=j[i].options[j[i].selectedIndex].value;g=e.split("_");if(g[1]=="1"){h=true}if(g[1]=="4"){k=true;a.push(g[0])}}if($("#tr_confirmed").hasClass("hidden")&&h){$("#tr_confirmed").removeClass("hidden")}else{if(!$("#tr_confirmed").hasClass("hidden")&&!h){$("#tr_confirmed").addClass("hidden");$("#tr_enter_email").addClass("hidden");$("#input_email_address").val("");$("#tr_confirmed_quest").removeClass("hidden");$("#tr_invoice_link").addClass("hidden")}}if($("#changed_text").hasClass("hidden")&&k){$("#changed_text").removeClass("hidden");$("#changed_bookings_no").text("");var l="";for(i=0;i<a.length;++i){l=l+a[i]+"  "}$("#changed_bookings_no").text(l)}else{if(!$("#changed_text").hasClass("hidden")&&!k){$("#changed_text").addClass("hidden")}else{if(!$("#changed_text").hasClass("hidden")){$("#changed_bookings_no").text("");var l="";for(i=0;i<a.length;++i){l=l+a[i]+"  "}$("#changed_bookings_no").text(l)}}}}function getInvoice(a,b){if(a==true){$("#tr_enter_email").addClass("hidden");$("#tr_invoice_link").removeClass("hidden");$("#input_email_address").val("");$("#tr_confirmed_quest").addClass("hidden")}else{$("#tr_invoice_link").addClass("hidden");$("#tr_enter_email").removeClass("hidden")}}function sendForm(g){var a=$("select.selectStatus");var f=false;var e="Check your input!";for(i=0;i<a.length;++i){val=a[i].options[a[i].selectedIndex].value;arr=val.split("_");if(arr[1]=="4"){if(($("#changed_comment_"+arr[0]).val().length==0)&&($("#changed_amount_"+arr[0]).val().length==0)&&($("#changed_commission_"+arr[0]).val().length==0)){f=true;break}}else{if(arr[1]=="0"){f=true;break}}}if(!$("#tr_enter_email").hasClass("hidden")&&$("#input_email_address").val().length==0){f=true}else{if(!$("#tr_enter_email").hasClass("hidden")){var b=/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i;if(!b.test($("#input_email_address").val())){f=true}}}if(f==true){alert(g)}else{$("#main_form").submit()}}
/*!
 * jQuery hashchange event - v1.3 - 7/21/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,g,b){var e="hashchange",k=document,h,j=$.event.special,l=k.documentMode,f="on"+e in g&&(l===b||l>7);function a(m){m=m||location.href;return"#"+m.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[e]=function(m){return m?this.bind(e,m):this.trigger(e)};$.fn[e].delay=50;j[e]=$.extend(j[e],{setup:function(){if(f){return false}$(h.start)},teardown:function(){if(f){return false}$(h.stop)}});h=(function(){var m={},u,q=a(),o=function(v){return v},p=o,s=o;m.start=function(){u||r()};m.stop=function(){u&&clearTimeout(u);u=b};function r(){var w=a(),v=s(q);if(w!==q){p(q=w,v);$(g).trigger(e)}else{if(v!==q){location.href=location.href.replace(/#.*/,"")+v}}u=setTimeout(r,$.fn[e].delay)}$.browser.msie&&!f&&(function(){var v,w;m.start=function(){if(!v){w=$.fn[e].src;w=w&&w+a();v=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){w||p(a());r()}).attr("src",w||"javascript:0").insertAfter("body")[0].contentWindow;k.onpropertychange=function(){try{if(event.propertyName==="title"){v.document.title=k.title}}catch(x){}}}};m.stop=o;s=function(){return a(v.location.href)};p=function(A,x){var z=v.document,y=$.fn[e].domain;if(A!==x){z.title=k.title;z.open();y&&z.write('<script>document.domain="'+y+'"<\/script>');z.close();v.location.hash=A}}})();return m})()})(jQuery,this);
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version 2.1.2
 */
(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(f){f=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},f);var e='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+f.src+'"style="display:block;position:absolute;z-index:-1;'+(f.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(f.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(f.top))+";left:"+(f.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(f.left))+";width:"+(f.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(f.width))+";height:"+(f.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(f.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(e),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(e){return e&&e.constructor===Number?e+"px":e}})(jQuery);(function(b){var f={};var a=0;b.galleriffic={version:"2.0.1",normalizeHash:function(g){return g.replace(/^.*#/,"").replace(/\?.*$/,"")},getImage:function(g){if(!g){return undefined}g=b.galleriffic.normalizeHash(g);return f[g]},gotoImage:function(h){var j=b.galleriffic.getImage(h);if(!j){return false}var g=j.gallery;g.gotoImage(j);return true},removeImageByHash:function(j,h){var k=b.galleriffic.getImage(j);if(!k){return false}var g=k.gallery;if(h&&h!=g){return false}return g.removeImageByIndex(k.index)}};var e={delay:3000,numThumbs:20,preloadAhead:40,enableTopPager:false,enableBottomPager:true,maxPagesToShow:7,imageContainerSel:"",captionContainerSel:"",controlsContainerSel:"",loadingContainerSel:"",renderSSControls:true,renderNavControls:true,playLinkText:"Play",pauseLinkText:"Pause",prevLinkText:"Previous",nextLinkText:"Next",nextPageLinkText:"Next &rsaquo;",prevPageLinkText:"&lsaquo; Prev",enableHistory:false,enableKeyboardNavigation:true,autoStart:false,syncTransitions:false,defaultTransitionDuration:1000,onSlideChange:undefined,onTransitionOut:undefined,onTransitionIn:undefined,onPageTransitionOut:undefined,onPageTransitionIn:undefined,onImageAdded:undefined,onImageRemoved:undefined};b.fn.galleriffic=function(j){b.extend(this,{version:b.galleriffic.version,isSlideshowRunning:false,slideshowTimeout:undefined,clickHandler:function(p,m){this.pause();if(!this.enableHistory){var o=b.galleriffic.normalizeHash(b(m).attr("href"));b.galleriffic.gotoImage(o);p.preventDefault()}},appendImage:function(m){this.addImage(m,false,false);return this},insertImage:function(o,m){this.addImage(o,false,true,m);return this},addImage:function(o,u,y,v){var w=(typeof o==="string")?b(o):o;var p=w.find("a.thumb");var q=p.attr("href");var x=p.attr("title");var s=w.find(".caption").remove();var r=p.attr("name");a++;if(!r||f[""+r]){r=a}if(!y){v=this.data.length}var m={title:x,slideUrl:q,caption:s,hash:r,gallery:this,index:v};if(y){this.data.splice(v,0,m);this.updateIndices(v)}else{this.data.push(m)}var z=this;if(!u){this.updateThumbs(function(){var A=z.find("ul.thumbs");if(y){A.children(":eq("+v+")").before(w)}else{A.append(w)}if(z.onImageAdded){z.onImageAdded(m,w)}})}f[""+r]=m;p.attr("rel","history").attr("href","#"+r).removeAttr("name").click(function(A){z.clickHandler(A,this)});return this},removeImageByIndex:function(m){if(m<0||m>=this.data.length){return false}var o=this.data[m];if(!o){return false}this.removeImage(o);return true},removeImageByHash:function(m){return b.galleriffic.removeImageByHash(m,this)},removeImage:function(o){var m=o.index;this.data.splice(m,1);delete f[""+o.hash];this.updateThumbs(function(){var p=g.find("ul.thumbs").children(":eq("+m+")").remove();if(g.onImageRemoved){g.onImageRemoved(o,p)}});this.updateIndices(m);return this},updateIndices:function(m){for(i=m;i<this.data.length;i++){this.data[i].index=i}return this},initializeThumbs:function(){this.data=[];var m=this;this.find("ul.thumbs > li").each(function(o){m.addImage(b(this),true,false)});return this},isPreloadComplete:false,preloadInit:function(){if(this.preloadAhead==0){return this}this.preloadStartIndex=this.currentImage.index;var m=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,m)},preloadRelocate:function(m){this.preloadStartIndex=m;return this},preloadRecursive:function(s,p){if(s!=this.preloadStartIndex){var m=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,m)}var o=this;var q=p-s;if(q<0){q=this.data.length-1-s+p}if(this.preloadAhead>=0&&q>this.preloadAhead){setTimeout(function(){o.preloadRecursive(s,p)},500);return this}var u=this.data[p];if(!u){return this}if(u.image){return this.preloadNext(s,p)}var r=new Image();r.onload=function(){u.image=this;o.preloadNext(s,p)};r.alt=u.title;r.src=u.slideUrl;return this},preloadNext:function(q,p){var m=this.getNextIndex(p);if(m==q){this.isPreloadComplete=true}else{var o=this;setTimeout(function(){o.preloadRecursive(q,m)},100)}return this},getNextIndex:function(o){var m=o+1;if(m>=this.data.length){m=0}return m},getPrevIndex:function(m){var o=m-1;if(o<0){o=this.data.length-1}return o},pause:function(){this.isSlideshowRunning=false;if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout);this.slideshowTimeout=undefined}if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("play").attr("title",this.playLinkText).attr("href","#play").html(this.playLinkText)}return this},play:function(){this.isSlideshowRunning=true;if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("pause").attr("title",this.pauseLinkText).attr("href","#pause").html(this.pauseLinkText)}if(!this.slideshowTimeout){var m=this;this.slideshowTimeout=setTimeout(function(){m.ssAdvance()},this.delay)}return this},toggleSlideshow:function(){if(this.isSlideshowRunning){this.pause()}else{this.play()}return this},ssAdvance:function(){if(this.isSlideshowRunning){this.next(true)}return this},next:function(m,o){this.gotoIndex(this.getNextIndex(this.currentImage.index),m,o);return this},previous:function(m,o){this.gotoIndex(this.getPrevIndex(this.currentImage.index),m,o);return this},nextPage:function(o,s){var q=this.getCurrentPage();var p=this.getNumPages()-1;if(q<p){var r=q*this.numThumbs;var m=r+this.numThumbs;this.gotoIndex(m,o,s)}return this},previousPage:function(m,r){var p=this.getCurrentPage();if(p>0){var q=p*this.numThumbs;var o=q-this.numThumbs;this.gotoIndex(o,m,r)}return this},gotoIndex:function(o,m,p){if(!m){this.pause()}if(o<0){o=0}else{if(o>=this.data.length){o=this.data.length-1}}var q=this.data[o];if(!p&&this.enableHistory){b.historyLoad(String(q.hash))}else{this.gotoImage(q)}return this},gotoImage:function(o){var m=o.index;if(this.onSlideChange){this.onSlideChange(this.currentImage.index,m)}this.currentImage=o;this.preloadRelocate(m);this.refresh();return this},getDefaultTransitionDuration:function(m){if(m){return this.defaultTransitionDuration}return this.defaultTransitionDuration/2},refresh:function(){var m=this.currentImage;if(!m){return this}var r=m.index;if(this.$controlsContainer){this.$controlsContainer.find("div.nav-controls a.prev").attr("href","#"+this.data[this.getPrevIndex(r)].hash).end().find("div.nav-controls a.next").attr("href","#"+this.data[this.getNextIndex(r)].hash)}var v=this.$imageContainer.find("span.current").addClass("previous").removeClass("current");var u=0;if(this.$captionContainer){u=this.$captionContainer.find("span.current").addClass("previous").removeClass("current")}var q=this.syncTransitions&&m.image;var o=true;var w=this;var s=function(){o=false;v.remove();if(u){u.remove()}if(!q){if(m.image&&m.hash==w.data[w.currentImage.index].hash){w.buildImage(m,q)}else{if(w.$loadingContainer){w.$loadingContainer.show()}}}};if(v.length==0){s()}else{if(this.onTransitionOut){this.onTransitionOut(v,u,q,s)}else{v.fadeTo(this.getDefaultTransitionDuration(q),0,s);if(u){u.fadeTo(this.getDefaultTransitionDuration(q),0)}}}if(q){this.buildImage(m,q)}if(!m.image){var p=new Image();p.onload=function(){m.image=this;if(!o&&m.hash==w.data[w.currentImage.index].hash){w.buildImage(m,q)}};p.alt=m.title;p.src=m.slideUrl}this.relocatePreload=true;return this.syncThumbs()},buildImage:function(s,q){var p=this;var m=this.getNextIndex(s.index);var o=this.$imageContainer.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#'+this.data[m].hash+'" title="'+s.title+'">&nbsp;</a></span>').find("span.current").css("opacity","0");o.find("a").append(s.image).click(function(u){p.clickHandler(u,this)});var r=0;if(this.$captionContainer){r=this.$captionContainer.append('<span class="image-caption current"></span>').find("span.current").css("opacity","0").append(s.caption)}if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.onTransitionIn){this.onTransitionIn(o,r,q)}else{o.fadeTo(this.getDefaultTransitionDuration(q),1);if(r){r.fadeTo(this.getDefaultTransitionDuration(q),1)}}if(this.isSlideshowRunning){if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout)}this.slideshowTimeout=setTimeout(function(){p.ssAdvance()},this.delay)}return this},getCurrentPage:function(){return Math.floor(this.currentImage.index/this.numThumbs)},syncThumbs:function(){var o=this.getCurrentPage();if(o!=this.displayedPage){this.updateThumbs()}var m=this.find("ul.thumbs").children();m.filter(".selected").removeClass("selected");m.eq(this.currentImage.index).addClass("selected");return this},updateThumbs:function(m){var o=this;var p=function(){if(m){m()}o.rebuildThumbs();if(o.onPageTransitionIn){o.onPageTransitionIn()}else{o.show()}};if(this.onPageTransitionOut){this.onPageTransitionOut(p)}else{this.hide();p()}return this},rebuildThumbs:function(){var p=this.data.length>this.numThumbs;if(this.enableTopPager){var m=this.find("div.top");if(m.length==0){m=this.prepend('<div class="top pagination"></div>').find("div.top")}else{m.empty()}if(p){this.buildPager(m)}}if(this.enableBottomPager){var r=this.find("div.bottom");if(r.length==0){r=this.append('<div class="bottom pagination"></div>').find("div.bottom")}else{r.empty()}if(p){this.buildPager(r)}}var s=this.getCurrentPage();var u=s*this.numThumbs;var o=u+this.numThumbs-1;if(o>=this.data.length){o=this.data.length-1}var q=this.find("ul.thumbs");q.find("li").each(function(v){var w=b(this);if(v>=u&&v<=o){w.show()}else{w.hide()}});this.displayedPage=s;q.removeClass("noscript");return this},getNumPages:function(){return Math.ceil(this.data.length/this.numThumbs)},buildPager:function(p){var y=this;var o=this.getNumPages();var r=this.getCurrentPage();var w=r*this.numThumbs;var m=this.maxPagesToShow-1;var s=r-Math.floor((this.maxPagesToShow-1)/2)+1;if(s>0){var x=o-s;if(x<m){s=s-(m-x)}}if(s<0){s=0}if(r>0){var q=w-this.numThumbs;p.append('<a rel="history" href="#'+this.data[q].hash+'" title="'+this.prevPageLinkText+'">'+this.prevPageLinkText+"</a>")}if(s>0){this.buildPageLink(p,0,o);if(s>1){p.append('<span class="ellipsis">&hellip;</span>')}m--}while(m>0){this.buildPageLink(p,s,o);m--;s++}if(s<o){var v=o-1;if(s<v){p.append('<span class="ellipsis">&hellip;</span>')}this.buildPageLink(p,v,o)}var u=w+this.numThumbs;if(u<this.data.length){p.append('<a rel="history" href="#'+this.data[u].hash+'" title="'+this.nextPageLinkText+'">'+this.nextPageLinkText+"</a>")}p.find("a").click(function(z){y.clickHandler(z,this)});return this},buildPageLink:function(p,s,q){var o=s+1;var r=this.getCurrentPage();if(s==r){p.append('<span class="current">'+o+"</span>")}else{if(s<q){var m=s*this.numThumbs;p.append('<a rel="history" href="#'+this.data[m].hash+'" title="'+o+'">'+o+"</a>")}}return this}});b.extend(this,e,j);if(this.enableHistory&&!b.historyInit){this.enableHistory=false}if(this.imageContainerSel){this.$imageContainer=b(this.imageContainerSel)}if(this.captionContainerSel){this.$captionContainer=b(this.captionContainerSel)}if(this.loadingContainerSel){this.$loadingContainer=b(this.loadingContainerSel)}this.initializeThumbs();if(this.maxPagesToShow<3){this.maxPagesToShow=3}this.displayedPage=-1;this.currentImage=this.data[0];var g=this;if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.controlsContainerSel){this.$controlsContainer=b(this.controlsContainerSel).empty();if(this.renderSSControls){if(this.autoStart){this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+"</a></div>")}else{this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+"</a></div>")}this.$controlsContainer.find("div.ss-controls a").click(function(m){g.toggleSlideshow();m.preventDefault();return false})}if(this.renderNavControls){this.$controlsContainer.append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.prevLinkText+'">'+this.prevLinkText+'</a><a class="next" rel="history" title="'+this.nextLinkText+'">'+this.nextLinkText+"</a></div>").find("div.nav-controls a").click(function(m){g.clickHandler(m,this)})}}var h=!this.enableHistory||!location.hash;if(this.enableHistory&&location.hash){var k=b.galleriffic.normalizeHash(location.hash);var l=f[k];if(!l){h=true}}if(h){this.gotoIndex(0,false,true)}if(this.enableKeyboardNavigation){b(document).keydown(function(o){var m=o.charCode?o.charCode:o.keyCode?o.keyCode:0;switch(m){case 32:g.next();o.preventDefault();break;case 33:g.previousPage();o.preventDefault();break;case 34:g.nextPage();o.preventDefault();break;case 35:g.gotoIndex(g.data.length-1);o.preventDefault();break;case 36:g.gotoIndex(0);o.preventDefault();break;case 37:g.previous();o.preventDefault();break;case 39:g.next();o.preventDefault();break}})}if(this.autoStart){this.play()}setTimeout(function(){g.preloadInit()},1000);return this}})(jQuery);(function(b){var a=[];b.loadScript=function(f,h,g){var e=a[f]||(a[f]={loaded:false,callbacks:[]});if(e.loaded){return h.apply(g)}e.callbacks.push({fn:h,context:g});if(e.callbacks.length==1){b.ajax({type:"GET",url:f,dataType:"script",cache:true,success:function(){e.loaded=true;b.each(e.callbacks,function(){this.fn.apply(this.context)});e.callbacks.length=0}})}}})(jQuery);jQuery.autocomplete=function(f,y){var s=this;var C=$(f).attr("autocomplete","off");if(y.inputClass){C.addClass(y.inputClass)}var u=document.createElement("div");var l=$(u);l.hide().addClass(y.resultsClass).css("position","absolute");if(y.width>0){l.css("width",y.width)}$("body").append(u);f.autocompleter=s;var L=null;var B="";var M=-1;var m={};var E=false;var o=false;var a=null;function p(){m={};m.data={};m.length=0}p();if(y.data!=null){var w="",R={},q=[];if(typeof y.url!="string"){y.cacheLength=1}for(var P=0;P<y.data.length;P++){q=((typeof y.data[P]=="string")?[y.data[P]]:y.data[P]);if(q[0].length>0){w=q[0].substring(0,1).toLowerCase();if(!R[w]){R[w]=[]}R[w].push(q)}}for(var O in R){y.cacheLength++;g(O,R[O])}}C.keydown(function(k){a=k.keyCode;switch(k.keyCode){case 38:k.preventDefault();H(-1);break;case 40:k.preventDefault();H(1);break;case 9:case 13:if(J()){C.get(0).blur();k.preventDefault()}break;default:M=-1;if(L){clearTimeout(L)}L=setTimeout(function(){x()},y.delay);break}}).focus(function(){o=true}).blur(function(){o=false;e()});z();function x(){if(a==46||(a>8&&a<32)){return l.hide()}var k=C.val();if(k==B){return}B=k;if(k.length>=y.minChars){C.addClass(y.loadingClass);G(k)}else{C.removeClass(y.loadingClass);l.hide()}}function H(S){var k=$("li",u);if(!k){return}M+=S;if(M<0){M=0}else{if(M>=k.size()){M=k.size()-1}}k.removeClass("ac_over");$(k[M]).addClass("ac_over")}function J(){var k=$("li.ac_over",u)[0];if(!k){var S=$("li",u);if(y.selectOnly){if(S.length==1){k=S[0]}}else{if(y.selectFirst){k=S[0]}}}if(k){v(k);return true}else{return false}}function v(k){if(!k){k=document.createElement("li");k.extra=[];k.selectValue=""}var S=$.trim(k.selectValue?k.selectValue:k.innerHTML);f.lastSelected=S;B=S;l.html("");C.val(S);z();if(y.onItemSelect){setTimeout(function(){y.onItemSelect(k)},1)}}function b(U,S){var T=C.get(0);if(T.createTextRange){var k=T.createTextRange();k.collapse(true);k.moveStart("character",U);k.moveEnd("character",S);k.select()}else{if(T.setSelectionRange){T.setSelectionRange(U,S)}else{if(T.selectionStart){T.selectionStart=U;T.selectionEnd=S}}}T.focus()}function A(k){if(a!=8){C.val(C.val()+k.substring(B.length));b(B.length,k.length)}}function I(){var S=D(f);var k=(y.width>0)?y.width:C.width();l.css({width:parseInt(k)+"px",top:(S.y+f.offsetHeight)+"px",left:S.x+"px"}).show()}function e(){if(L){clearTimeout(L)}L=setTimeout(z,200)}function z(){if(L){clearTimeout(L)}C.removeClass(y.loadingClass);if(l.is(":visible")){l.hide()}if(y.mustMatch){var k=C.val();if(k!=f.lastSelected){v(null)}}}function j(S,k){if(k){C.removeClass(y.loadingClass);u.innerHTML="";if(!o||k.length==0){return z()}if($.browser.msie){l.append(document.createElement("iframe"))}u.appendChild(N(k));if(y.autoFill&&(C.val().toLowerCase()==S.toLowerCase())){A(k[0][0])}I()}else{z()}}function h(U){if(!U){return null}var k=[];var T=U.split(y.lineSeparator);for(var S=0;S<T.length;S++){var V=$.trim(T[S]);if(V){k[k.length]=V.split(y.cellSeparator)}}return k}function N(X){var W=document.createElement("ul");var U=X.length;if((y.maxItemsToShow>0)&&(y.maxItemsToShow<U)){U=y.maxItemsToShow}for(var V=0;V<U;V++){var Y=X[V];if(!Y){continue}var S=document.createElement("li");if(y.formatItem){S.innerHTML=y.formatItem(Y,V,U);S.selectValue=Y[0]}else{S.innerHTML=Y[0];S.selectValue=Y[0]}var k=null;if(Y.length>1){k=[];for(var T=1;T<Y.length;T++){k[k.length]=Y[T]}}S.extra=k;W.appendChild(S);$(S).hover(function(){$("li",W).removeClass("ac_over");$(this).addClass("ac_over");M=$("li",W).indexOf($(this).get(0))},function(){$(this).removeClass("ac_over")}).click(function(Z){Z.preventDefault();Z.stopPropagation();v(this)})}return W}function G(S){if(!y.matchCase){S=S.toLowerCase()}var k=null;if(k){j(S,k)}else{if((typeof y.url=="string")&&(y.url.length>0)){$.get(r(S),function(T){T=h(T);g(S,T);j(S,T)})}else{C.removeClass(y.loadingClass)}}}function r(T){var k=y.url+"?q="+encodeURI(T);for(var S in y.extraParams){k+="&"+S+"="+encodeURI(y.extraParams[S])}return k}function Q(X){if(!X){return null}if(m.data[X]){return m.data[X]}if(y.matchSubset){for(var V=X.length-1;V>=y.minChars;V--){var S=X.substr(0,V);var Y=m.data[S];if(Y){var W=[];for(var T=0;T<Y.length;T++){var k=Y[T];var U=k[0];if(F(U,X)){W[W.length]=k}}return W}}}return null}function F(T,S){if(!y.matchCase){T=T.toLowerCase()}var k=T.indexOf(S);if(k==-1){return false}return k==0||y.matchContains}this.flushCache=function(){p()};this.setExtraParams=function(k){y.extraParams=k};this.findValue=function(){var S=C.val();if(!y.matchCase){S=S.toLowerCase()}var k=y.cacheLength?Q(S):null;if(k){K(S,k)}else{if((typeof y.url=="string")&&(y.url.length>0)){$.get(r(S),function(T){T=h(T);g(S,T);K(S,T)})}else{K(S,null)}}};function K(X,W){if(W){C.removeClass(y.loadingClass)}var U=(W)?W.length:0;var S=null;for(var V=0;V<U;V++){var Y=W[V];if(Y[0].toLowerCase()==X.toLowerCase()){S=document.createElement("li");if(y.formatItem){S.innerHTML=y.formatItem(Y,V,U);S.selectValue=Y[0]}else{S.innerHTML=Y[0];S.selectValue=Y[0]}var k=null;if(Y.length>1){k=[];for(var T=1;T<Y.length;T++){k[k.length]=Y[T]}}S.extra=k}}if(y.onFindValue){setTimeout(function(){y.onFindValue(S)},1)}}function g(S,k){if(!k||!S||!y.cacheLength){return}if(!m.length||m.length>y.cacheLength){p();m.length++}else{if(!m[S]){m.length++}}m.data[S]=k}function D(S){var T=S.offsetLeft||0;var k=S.offsetTop||0;while(S=S.offsetParent){T+=S.offsetLeft;k+=S.offsetTop}return{x:T,y:k}}};jQuery.fn.autocomplete=function(b,a,e){a=a||{};a.url=b;a.data=((typeof e=="object")&&(e.constructor==Array))?e:null;a.inputClass=a.inputClass||"ac_input";a.resultsClass=a.resultsClass||"ac_results";a.lineSeparator=a.lineSeparator||"\n";a.cellSeparator=a.cellSeparator||"|";a.minChars=a.minChars||1;a.delay=a.delay||400;a.matchCase=a.matchCase||0;a.matchSubset=a.matchSubset||1;a.matchContains=a.matchContains||0;a.cacheLength=a.cacheLength||1;a.mustMatch=a.mustMatch||0;a.extraParams=a.extraParams||{};a.loadingClass=a.loadingClass||"ac_loading";a.selectFirst=a.selectFirst||false;a.selectOnly=a.selectOnly||false;a.maxItemsToShow=a.maxItemsToShow||-1;a.autoFill=a.autoFill||false;a.width=parseInt(a.width,10)||0;this.each(function(){var f=this;new jQuery.autocomplete(f,a)});return this};jQuery.fn.autocompleteArray=function(b,a){return this.autocomplete(null,a,b)};jQuery.fn.indexOf=function(b){for(var a=0;a<this.length;a++){if(this[a]==b){return a}}return -1};eval(function(j,b,l,f,h,g){h=function(a){return(a<b?"":h(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(l--){g[h(l)]=f[l]||h(l)}f=[function(a){return g[a]}];h=function(){return"\\w+"};l=1}while(l--){if(f[l]){j=j.replace(new RegExp("\\b"+h(l)+"\\b","g"),f[l])}}return j}("(5($){$.19={P:'1.2'};$.u(['j','w'],5(i,d){$.q['O'+d]=5(){p(!3[0])6;g a=d=='j'?'s':'m',e=d=='j'?'D':'C';6 3.B(':y')?3[0]['L'+d]:4(3,d.x())+4(3,'n'+a)+4(3,'n'+e)};$.q['I'+d]=5(b){p(!3[0])6;g c=d=='j'?'s':'m',e=d=='j'?'D':'C';b=$.F({t:Z},b||{});g a=3.B(':y')?3[0]['8'+d]:4(3,d.x())+4(3,'E'+c+'w')+4(3,'E'+e+'w')+4(3,'n'+c)+4(3,'n'+e);6 a+(b.t?(4(3,'t'+c)+4(3,'t'+e)):0)}});$.u(['m','s'],5(i,b){$.q['l'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b=='m'?a:$(h)['U'](),b=='s'?a:$(h)['T']()):3['l'+b]=a}):3[0]==h||3[0]==r?S[(b=='m'?'R':'Q')]||$.N&&r.M['l'+b]||r.A['l'+b]:3[0]['l'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,'K');8.k-=4(o,'J');9.f+=4(7,'H');9.k+=4(7,'Y');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,'z')=='13'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);",62,72,"|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions".split("|"),0,{}));var first_prop=0;var global_lang_id="1";var global_lang_code="en";var global_left_avail_hotels=0;var global_mainaffiliate=0;var global_langcobrand=0;var price_slider_timer=undefined;var global_change_tab=0;var global_filter_hotel_id=0;function select_filter_url(g,f,b,e){var a="";if(global_lang_code!="en"&&global_langcobrand!=1){a+="/"+global_lang_code}a+=f;switch(g){case"0":a+="/list";break;case"1":a+="/"+e;break;case"2":a+="/"+b+"-"+e;break;case"3":a+="/district-"+e;break;case"4":a+="/"+e;break;case"5":a+="/"+e;break;case"6":a+="/"+e;break;case"7":a+="/"+e;break;case"8":a+="/list";break}return a}function change_lang_url(a,e){var b="/"+e;if(e.indexOf("http://")!=-1){b=e}else{if((global_langcobrand==1||global_mainaffiliate==1)&&e=="cs"){b="http://www.booked.cz"}else{if((global_langcobrand==1||global_mainaffiliate==1)&&e=="he"){b="http://booked.co.il"}else{if(global_langcobrand==1){b="http://www.booked.net/"+e}}}}b+=a;return b}function hotellist_function(){$("#pr-f a").each(function(){var f=$(this).attr("id");var e=f.indexOf("filter_star_link");if(e!=-1){e+=16;var a=f.substr(e);if(a>0){var b=$(this).parent().hasClass("curr-f");if(b){$(this).bind("click",function(g){return remove_list_filter(g,"rHotelStar",a,"st"+a,"pr-f")});$("#st"+a).bind("click",function(g){remove_list_filter(g,"rHotelStar",a,"st"+a,"pr-f")})}else{$(this).bind("click",function(g){return apply_list_filter(g,"HotelStar",a,"st"+a,"pr-f")});$("#st"+a).bind("click",function(g){apply_list_filter(g,"HotelStar",a,"st"+a,"pr-f")})}}}});$(".amenity_list a").each(function(){var g=$(this).attr("id");var f=g.indexOf("filter_amenity_link");if(f!=-1){f+=19;var b=g.substr(f);if(b>0){var e=$(this).parent().hasClass("curr-f");var a=$(this).parent().parent().attr("id");if(e){$(this).bind("click",function(h){return remove_list_filter(h,"ramf",b,"am"+b,a)});$("#am"+b).bind("click",function(h){remove_list_filter(h,"ramf",b,"am"+b,a)})}else{$(this).bind("click",function(h){return apply_list_filter(h,"amf",b,"am"+b,a)});$("#am"+b).bind("click",function(h){apply_list_filter(h,"amf",b,"am"+b,a)})}}}});$("#hb-f a").each(function(){var g=$(this).attr("id");var f=g.indexOf("filter_brand_link");if(f!=-1){f+=17;var b=g.substr(f);if(b>0){var e=$(this).parent().hasClass("curr-f");var a=$(this).parent().parent().attr("id");if(e){$(this).bind("click",function(h){return remove_list_filter(h,"rbrand_id",b,"br"+b,a)});$("#br"+b).bind("click",function(h){remove_list_filter(h,"rbrand_id",b,"br"+b,a)})}else{$(this).bind("click",function(h){return apply_list_filter(h,"nbrand_id",b,"br"+b,a)});$("#br"+b).bind("click",function(h){apply_list_filter(h,"nbrand_id",b,"br"+b,a)})}}}});$("#ht-f a").each(function(){var g=$(this).attr("id");var f=g.indexOf("filter_theme_link");if(f!=-1){f+=17;var b=g.substr(f);if(b>0){var e=$(this).parent().hasClass("curr-f");var a=$(this).parent().parent().attr("id");if(e){$(this).bind("click",function(h){return remove_list_filter(h,"rtheme_id",b,"th"+b,a)});$("#th"+b).bind("click",function(h){remove_list_filter(h,"rtheme_id",b,"th"+b,a)})}else{$(this).bind("click",function(h){return apply_list_filter(h,"ntheme_id",b,"th"+b,a)});$("#th"+b).bind("click",function(h){apply_list_filter(h,"ntheme_id",b,"th"+b,a)})}}}});$(".val-list li").hover(function(){$(this).addClass("hover-val")},function(){$(this).removeClass("hover-val")})}function init(o){var f=o.page;var a=o.langid;var w=o.langcode;var g=o.logged;var x=o.day;var B=o.month;var m=o.year;$.ajaxSettings.traditional=true;$(".smartlink").each(function(){var C="";for(var D=0;D<10;++D){var s=$(this).attr("link"+(D?D:""));if(typeof s=="undefined"||s==""){break}C+=s}$(this).attr("href",C)});global_lang_id=a;global_lang_code=w;global_mainaffiliate=o.mainaffiliate;global_langcobrand=o.langcobrand;global_filter_hotel_id=o.filter_hotel_id;$(".ac_dest").autocomplete("/",{extraParams:{page:"dest_help",langID:a,limit:50},minChars:2,matchSubset:0,matchContains:0,cacheLength:0,delay:100,width:350,onItemSelect:ac_select_dest,formatItem:ac_format_dest});fd=$("#d").val();$(".ac_hotel").autocomplete("/",{extraParams:{page:"hotel_help",langID:a,d:fd,site:"1",limit:50},minChars:3,matchSubset:0,matchContains:0,cacheLength:0,delay:100,width:350,onItemSelect:ac_select_hotel,formatItem:ac_format_hotel});$("#d2").val("");$(".ac_dest_top").autocomplete("/",{extraParams:{page:"dest_help",brandID:$("#brand_id").val()||"",cid:o.countryid||"",rid:o.regionid||"",state:o.state||"",langID:a,limit:50},minChars:2,matchSubset:0,matchContains:0,cacheLength:0,delay:100,width:350,onItemSelect:ac_select_dest2,formatItem:ac_format_dest});$("#header_search_input").keypress(function(s){if(s.which==13){$("#header_search_form").submit()}});$("#header_search_form .search-en").bind("click",function(){$("#header_search_form").submit()});if($("#user_popup").size()){$("#user_popup").load("/",{page:"myselection_block"})}$("#club_sign").live("click",function(){$(".usp_content").hide("medium");$("#club_login").toggle("medium");return false});$("#club_myaccount").live("click",function(){$(".usp_content").hide("medium");$("#club_account").toggle("medium");return false});$("#user_popup a.club_notmember, #club_fav .club_notmember").live("click",function(){if(!$("#auth_dialog").size()){$("body").append('<div id="auth_dialog" class="pu"></div>');$("#auth_dialog").load("/?page=register_popup","",function(){$("#auth_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:585,height:"auto",overlay:{opacity:0.5,background:"black"}});$("#auth_close").click(function(){$("#auth_dialog").dialog("close");$("#auth_dialog").hide();return false})})}else{$("#auth_dialog").show();$("#auth_dialog").dialog("open")}return false});$("#user_popup .arrow_collapse, #club_fav .arrow_collapse").live("click",function(){var s=$(this).attr("id");s=s.replace("coll_","club_");$("#"+s).hide("medium");return false});$("a.add-my-favorites").live("click",function(){var C=$(this).attr("id");C=C.replace("bfav_","");var s=this;$.getJSON("/",{page:"add2fav",add:C},function(E){if(E!=null&&typeof E.count!="undefined"){var D=E.count;if(D=="0"){D=""}else{D="("+D+")"}$("#fav_count").text(D);favlist_load();$(s).removeClass("add-my-favorites").addClass("added-my-favorites").attr("href","/favourites.html?del="+C).html($("#tr_fav_del").html())}});return false});$("a.added-my-favorites").live("click",function(){var C=$(this).attr("id");C=C.replace("bfav_","");var s=this;$.getJSON("/",{page:"delfav",del:C},function(E){if(E!=null&&typeof E.count!="undefined"){var D=E.count;if(D=="0"){D=""}else{D="("+D+")"}$("#fav_count").text(D);favlist_load();$(s).removeClass("added-my-favorites").addClass("add-my-favorites").attr("href","/favourites.html?add="+C).html($("#tr_fav_add").html())}});return false});$("a.hotel-email").bind("click",function(){var s=$(this).attr("id").replace("email_","");mail_hotels(s);return false});$("#selection").live("click",function(){if(!$("#club_fav").is(":visible")){$(".usp_content").hide("medium")}$("#club_fav").toggle("medium");if(!$("#club_fav").hasClass("loaded")){favlist_load()}return false});$("#usp_city").live("change",function(){favlist_load()});$("#frm_register").live("submit",function(){$("#fld_register").html('<center><img src="/images/favlist-loading.gif"></center>');$.post("/",{page:"register_popup",action:"register",step:1,login:$("#p_email").val(),pass:$("#p_pass").val(),recieve:$("#p_receive_y").is(":checked")?1:0},function(C){$("#auth_dialog").html(C);if($("#auth_dialog #account_registered").size()){var s=window.location.href;window.location=s}});return false});if(f=="profile"){$("#mcd_bday").each(function(){var D=cal_get_date($(this).val());var C=1970;var E=undefined;var s=undefined;if(D){C=D.getYear();E=D.getMonth()+1;s=D.getDate();if(C<1900){C+=1900}}cal_init_year($(this).attr("id"),C,m-100,m-6);cal_init_month($(this).attr("id"),E);cal_init_day($(this).attr("id"),s)});$("#mcd_bday_m").change(function(){var s=$(this).attr("id");s=s.replace("_m","");return cal_init_day(s)});$("#mcd_bday_y, #mcd_bday_m, #mcd_bday_d").change(function(){var s=$(this).attr("id");s=s.replace("_y","");s=s.replace("_m","");s=s.replace("_d","");cal_read_linked_lite(s)});$("#chpass").bind("click",function(){$("#chpass").hide();$("#r_old_pass, #r_pass, #r_rpass").show()})}$("#club_send").live("click",function(){mail_hotels();return false});cal_init(x,B,m);$(".b_popupdate").bind("click",function(){var s=$(this).attr("href");var C=$(this).attr("title");$("#form_find_popup").attr("action",s+"#results");$("#popuptitle").html(C);if($("#datespopup").hasClass("ready")){$("#datespopup").show();$("#datespopup").dialog("open")}else{$("#datespopup").addClass("ready").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:440,height:"auto"});child_check()}return false});$(".close-date-popup").bind("click",function(){$("#datespopup").hide();$("#datespopup").dialog("close")});$(".str_date").each(function(){$(this).html(get_string_date($(this).html()))});$("a.gallery").lightBox({fixedNavigation:true});$(".rooms-result tr").each(function(){$(this).find("a.gallery_main").lightBox({fixedNavigation:true})});$(".room-photos").each(function(){$(this).find("a.gallery_add").lightBox({fixedNavigation:true})});$("#ReservationDataHas").bind("click",function(){if($(this).attr("checked")){$("#ReservationData").attr("style","display: block;");$("#subject").val("1");$("#subject").attr("disabled","1")}else{$("#ReservationData").attr("style","display: none;");$("#subject").attr("disabled","")}});$("#ReservationDataHas").each(function(){if($(this).attr("checked")){$("#ReservationData").attr("style","display: block;");$("#subject").val("1");$("#subject").attr("disabled","1")}});if((f=="writereview"||f=="addphotos")&&$("#reviewform").size()){$(".write_review input.inp_txt").click(function(){if($(this).attr("clicked")){return false}$(this).val("");$(this).attr("clicked","1");return false});$(".write_review .body a.add_photo").click(function(){$(".write_review #review_photos").show();$(".write_review .body #save1").hide();$(this).hide();addphotos_verify();return false});$(".write_review .body a.add_review").click(function(){$(".write_review .review").show();$(".write_review .body #save1").hide();$(this).hide();writereview_verify();return false});$(".write_review .body a.add_more").click(function(){add_more_photos(3);$("#review_photos input.ne").unbind("click");$("#review_photos input.ne").bind("click",function(){$(this).val("").removeClass("ne").unbind("click")});return false});var z="";for(i=0;i<prop_ids.length;++i){if(z!=""){z+=" "}z+="p"+prop_ids[i]}$("#reviewform").validate({errorClass:"err",rules:{email:{required:true,email:true},name:{required:true}},errorPlacement:function(s,C){if(C.attr("name")=="statement"){s.insertBefore(C)}else{if(C.attr("name")==first_prop){s.insertAfter("#props_hr")}else{s.insertAfter(C)}}},groups:{props:z}});if(f=="writereview"){writereview_verify()}if(f=="addphotos"){addphotos_verify()}$("#review_photos input.ne").bind("click",function(){$(this).val("").removeClass("ne").unbind("click")});$("#reviewform").bind("submit",function(){$("#review_photos input.ne").val("")})}if(f=="support"||f=="faq"){var k="<";k+="input ty";k+='pe="hidd';k+='en" name="ste';k+='p" val';k+='ue="1"/>';k+="<inp";k+='ut type="hi';k+='dden" nam';k+='e="pag';k+='e" value="su';k+='pport"/>';$("#hfields").html(k);$(".faq-nav a").bind("click",function(){$(".faq-nav li a").removeClass("curr");$(this).addClass("curr");var s=$(this).attr("id");$(".faq-short-list .faq-tab").hide();$("#"+s.replace("ft_","fd_")).show(200);return false});$(".faq-short-list h4").bind("click",function(){var s=$(this).attr("id");$("#"+s.replace("fq_","fa_")).toggle(200)});$(".sup-ma").each(function(){var s=$(this).text().replace(/ \[at\] /g,"@").replace(/ \[dot\] /g,".");$(this).html('<a href="mailto:'+s+'">'+s+"</a>")});$(".default-value").bind("focus",function(){var s=$(this).val();if(s!=""&&$(this).attr("oldvalue")==undefined){$(this).attr("oldvalue",s).removeClass("default-value").val("")}});$(".default-value").bind("blur",function(){var s=$(this).val();if(s==""){$(this).val($(this).attr("oldvalue")).removeAttr("oldvalue").addClass("default-value")}});$(".show-faqs").bind("click",function(){$(this).parent().find("h4").show(200);$(this).detach()});$(".mailContact").bind("submit",function(){$(".default-value").val("")})}$(".cvc_help").tooltip({delay:0,showURL:false,bodyHandler:function(){var s=$("#cvc_help_info").html();return s}});$(".more_rate_info").tooltip({delay:0,showURL:false,top:5,left:-50,extraClass:"hint-hotel-inf",bodyHandler:function(){var C=$(this).attr("id");C=C.replace("rt_","mrt_");var s=$("#"+C).html();return s}});$(".more_site_info").tooltip({delay:0,showURL:false,top:10,bodyHandler:function(){var C=$(this).attr("id");C=C.replace("si_","msi_");var s=$("#"+C).html();return s}});$(".local_cur").tooltip({delay:0,showURL:false,top:-10,bodyHandler:function(){var C=$(this).attr("id");var s=$("#"+C+"_desc").html();return s}});$("#dd_language, #dd_currency, #ff_currency, #weather_language").bind("mouseover",function(){if(!$(this).hasClass("languages-show")){$(this).addClass("languages-show")}});$("#dd_language, #dd_currency, #ff_currency, #weather_language").bind("mouseout",function(){if($(this).hasClass("languages-show")){$(this).removeClass("languages-show")}});if($.browser.msie){if($.browser.version==6){$("#dd_language").bgiframe();$("#dd_currency").bgiframe();$("#ff_currency").bgiframe()}}$("#feedback_link").attr("href","mailto:feedback@booked.net");$("a.showmap").bind("click",function(){var s=$(gmap_opts.mapcont);if(!s.size()){return false}var F=$(this).attr("id");var D=F.split("_");var E=D[1];var G=$(this).attr("href");if(G.indexOf("#")==-1){G=""}else{G=G.substr(G.indexOf("#")+1,G.length)}var C="";var H="";if($(this).hasClass("landmark")){C=E;H=G;E="";G="";if(typeof gmap_opts.hotel!="undefined"){E=gmap_opts.hotel.id;G=gmap_opts.hotel.lat+","+gmap_opts.hotel.lng}}if(!s.hasClass("ready")||typeof gmap=="undefined"){s.html('<div id="map_ajax_loader">&nbsp;</div>');s.show();s.bgiframe();center_window(s);load_map(E,G);center_window(s);if(C!=""){var I=H.split(",");$.extend(gmap_opts,{landmark:{id:C,lat:I[0],lng:I[1]}})}}else{if(C!=""){var I=H.split(",");gmap.options({landmark:{id:C,lat:I[0],lng:I[1]}})}gmap.show(E,G)}return false});$(window).bind("unload",function(){if(typeof GUnload=="function"){GUnload()}});if(f=="country"){$("#sect_city_more .show_all").bind("click",function(){var F=$(this).attr("id");var E=F.indexOf("show_all_");if(E!=-1){E+=9;var s=F.indexOf("_",E);if(s!=-1){var D=F.substr(E,s-E);if(D>0){var C="";E=s+1;s=F.length;if(E<s){C=F.substr(E,s-E)}load_all_cities("more2_cities",D,C)}}}return false})}if(f=="main"){var j="";if(global_lang_code!="en"&&global_langcobrand!=1){j+="/"+global_lang_code}j+="/mainmap.html";$("#mainmap_block").load(j,function(){setTimeout(function(){$("#mainmap_block").toggle("medium")},1500)});$("#big_map").bind("click",view_big_map)}if(f=="hotellist"||f=="city"){$(".sect_stars_add").hide();$(".sect_price_add").hide();$(".sect_district_add").hide();$(".sect_airport_add").hide();$(".sect_airportcities_add").hide();$(".sect_brand_add").hide();$(".sect_theme_add").hide();$(".sect_landmark_add").hide();$(".sect_amenity_add").hide();$(".sect_related_add").hide();setTimeout(function(){$(".full_city_text").hide()},1000);$(".short_city_text a.more-res").bind("click",function(){$(".short_city_text").hide();$(".full_city_text").show();return false});$(".sect_filter_link").each(function(){var D=$(this).attr("add_link");var C=$(this).attr("add_link_type");var E=$(this).attr("add_link_prefix");var G=$(this).attr("add_link_id");var s=$(this).attr("add_link_name");if(typeof D!="undefined"){$(this).attr("href",D)}else{if(typeof C!="undefined"){var F=select_filter_url(C,E,G,s);if(F.length){$(this).attr("href",F)}}}});$("#pr-from, #pr-to").bind("click",function(){$(this).val("")});var u=$("#slider-range");if(u.size()){var r=typeof o.min_price=="undefined"?0:o.min_price;var l=typeof o.max_price=="undefined"?5000:o.max_price;var A=typeof o.price_from=="undefined"?r:o.price_from;var e=typeof o.price_to=="undefined"?l:o.price_to;if(A<r){A=r}if(e>l||e==0){e=l}var b=[];b[0]=A;b[1]=e;u.slider({range:true,min:r,max:l,step:10,values:b,slide:function(s,C){if(typeof price_slider_timer!="undefined"){clearTimeout(price_slider_timer);price_slider_timer=undefined}var D=o.curr;$("#amount").html(D+" "+C.values[0]+" - "+D+" "+C.values[1]);$("#pr-from").val(C.values[0]);$("#pr-to").val(C.values[1])},stop:function(C,D){if(typeof price_slider_timer!="undefined"){clearTimeout(price_slider_timer);price_slider_timer=undefined}var s=$('form[name="form_find2"] input[name="PriceFilter"]');if(!s.size()){s=$('form[name="form_find2"] #add_f_param')}s.attr("name","PriceFilter");s.attr("value",D.values[0]+"-"+D.values[1]);if(!$("#apply-price").size()){price_slider_timer=setTimeout(function(){u.slider({disabled:true});document.forms.form_find2.submit()},1000)}else{$("#apply-price").removeClass("hidden")}}});var y=o.curr;$("#amount").html(y+" "+u.slider("values",0)+" - "+y+" "+u.slider("values",1));$("#pr-from").val(u.slider("values",0));$("#pr-to").val(u.slider("values",1));$("#pr-from, #pr-to").bind("keyup",function(){if($("#apply-price").hasClass("hidden")){$("#apply-price").removeClass("hidden")}u.slider("values",0,$("#pr-from").val());u.slider("values",1,$("#pr-to").val());$("#amount").html(y+" "+u.slider("values",0)+" - "+y+" "+u.slider("values",1));var s=$('form[name="form_find2"] input[name="PriceFilter"]');if(!s.size()){s=$("#add_f_param")}s.attr("name","PriceFilter");s.attr("value",u.slider("values",0)+"-"+u.slider("values",1))});$("#apply-price").bind("click",function(){u.slider({disabled:true});document.forms.form_find2.submit();return false});$("#ff_currency a").bind("click",function(){var C=$('form[name="form_find2"] input[name="ShowCurrency"]');if(C.size()){var s=$(this).attr("id").replace("pfc-","");C.val(s);$("#pfc-cur").html(s);u.slider({disabled:true});document.forms.form_find2.submit();return false}})}hotellist_function();if(f=="city"){$(".top-city-hotels .last-viwed-menu a:eq(0)").addClass("curr");$(".top-city-hotels ul.top-city-hotels-list:gt(0)").hide();$(".top-city-hotels .last-viwed-menu a").bind("click",function(){var s=$(this).attr("id");$(".top-city-hotels .last-viwed-menu a").removeClass("curr");$(this).addClass("curr");$(".top-city-hotels ul.top-city-hotels-list").hide();$("#"+s+"_list").slideDown(400);return false})}}if(f=="hotellist"||f=="city"||f=="hotel"||f=="weather_city_forecast"){$(".change_lang_link").each(function(){var C=$(this).attr("code");var s=$(this).attr("suff");if(typeof C!="undefined"){var D=change_lang_url(s,C);if(D.length){$(this).attr("href",D)}}})}$("#add_this").each(function(){var s="http://";s+="www.addthis.com";s+="/bookmark.php";$(this).attr("href",s)});$("#add_hotel_link").each(function(){var s="https://";s+="secure.booked.net";s+="/extranet/";$(this).attr("href",s)});if(f=="book"){if(a==1||a==16||a==17||a==19||a==20||a==21||a==22||a==24||a==25){$(".person-name").bind("blur",function(){var E=$(this).attr("id");var D=$(this).val();var C=$("#er-"+E);if(!/^[a-z\d\s-']*$/i.test(D)){$(this).addClass("hl-field");if(!C.size()){$("<span>").attr("class","hl-label").attr("id","er-"+E).html($("#latin-warning").html()).insertAfter($(this))}else{C.show()}}else{C.hide();$(this).removeClass("hl-field")}})}$("a#creditcards").bind("click",function(){if(!$("#cc_dialog").size()){$("body").append('<div id="cc_dialog" class="pu"></div>');$("#cc_dialog").load("/creditcards_pop.html","",function(){var s=$(window).height()-100;if(s>400){s=400}$("#cc_dialog .textcms").height(s);$("#cc_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:685,height:"auto",overlay:{opacity:0.5,background:"black"}});$("#cc_dialog #dlg_close").click(function(){$("#cc_dialog").dialog("close");$("#cc_dialog").hide();return false})})}else{$("#cc_dialog").show();$("#cc_dialog").dialog("open")}return false});$("a.confirm_ajax").bind("click",function(){var C=$(this).attr("href");var s="";if(C.indexOf("BookingID=")!=-1){s=C.substr(C.indexOf("BookingID=")+10)}C=C.replace("page=book","page=book_ajax");$("#left_block_"+s).hide();$("#right_block_"+s).hide();$(".room_block_"+s).hide();$("#wait_block_"+s).show();$("#booking_block_"+s).load(C,function(){if($("#locked",this).size()){$("#wait_block_"+s).hide();setTimeout(function(){load_booking_room(C,s)},30000)}});return false})}if(f=="owners"){update_badges();add_badges_events()}$(".dym-close a").bind("click",function(){$(".did-you-mean").hide();return false});$(".dym-close").bind("click",function(){$(".prop-hotel").hide();return false});$(".add_sentance_group").each(function(){$(this).hide()});if(f=="hotel"||f=="main"||f=="city"||f=="hotellist"||f=="brand"||f=="country"||f=="region"||f=="mybooking"){child_check()}if(f=="brand"){$(".brand-countries span").bind("click",function(){$(".brand-countries .brand-c-city-list").hide();$(this).parent().find(".brand-c-city-list").show()});$(".brand-cities-close").bind("click",function(){$(this).parent().parent().find(".brand-c-city-list").hide()})}if(f=="country"||f=="region"){$(".reg-letters span").bind("click",function(){$(".reg-letters span").removeClass("act-let");$(this).addClass("act-let");$(".reg-letters .let-cities-list").hide();$(this).parent().find(".let-cities-list").show()});$(".close-city-list").bind("click",function(){$(this).parent().hide();$(".reg-letters span").removeClass("act-let")});$(".more-cities-list").hide();$(".more-cities").bind("click",function(){$(this).detach();$(".more-cities-list").show(200)});$(".tab-letters a, .f-nav a").live("click",function(){var E=$(this).attr("id");var C=E.split("-");if(C[0]=="chl"){$(".tab-letters a").removeClass("active");$(this).addClass("active")}var s=$("#country_hotels");var D=$("<div>").attr("id","hotels-blackout").css({position:"absolute",backgroundColor:"#fff",opacity:"0.8"}).width(s.outerWidth()).height(s.outerHeight()).appendTo("body");D.offset(s.offset());s.load("/",{page:"country_hotels",countryID:o.countryid||"",regionID:o.regionid||"",state:o.state||"",letter:C[1],part:C[2]},function(){$("#hotels-blackout").detach()});return false})}if(f=="hotel"){refresh_total_rooms("0");refresh_total_rooms("1");refresh_total_rooms("2");refresh_total_rooms("3");var h=window.location+"";if(h.indexOf("#phototab")>-1||h.indexOf("#videotab")>-1){change_hotel_tab("photo")}else{if(h.indexOf("#locationtab")>-1||h.indexOf("map.html")>-1){change_hotel_tab("location")}else{if(h.indexOf("#reviewtab")>-1||h.indexOf("#reviews")>-1||h.indexOf("_review/")>-1||h.indexOf("review.html")>-1){change_hotel_tab("review")}else{setTimeout(function(){if(global_change_tab==0){change_hotel_tab("overview")}},10000);$(window).bind("focus",function(){if(global_change_tab==0){change_hotel_tab("overview")}})}}}setTimeout(function(){$(".room_types_more_info").hide()},10000);$(".review-navigation a").live("click",function(){return change_review_page($(this))});$(".landmark_group").bind("click",function(){var s=$(this).attr("id");s=s.replace("_group_","_group_list_");if($(this).parent().hasClass("active-item")){$(this).parent().removeClass("active-item");$("#"+s).hide()}else{$(this).parent().addClass("active-item");$("#"+s).show()}});var q=$(".share-addthis");if(q.size()){addthis_pub="booked";var v=document.createElement("script");v.type="text/javascript";v.async=true;v.src=("https:"==document.location.protocol?"https://":"http://")+"s7.addthis.com/js/widget.php?v=10";var p=document.getElementsByTagName("script")[0];p.parentNode.insertBefore(v,p);q.each(function(){$(this).bind("click",function(){return addthis_click(this)})})}$(".share-google").each(function(){var C=$(this).attr("link1");var s=$(this).attr("link2");var D=$(this).attr("link3");$(this).attr("href","http://www.google.com/bookmarks/mark?op=edit&bkmk="+encodeURIComponent(s)+"&title="+C+"&annotation="+D).attr("target","_blank")});$(".share-twitter").each(function(){var C=$(this).attr("link1");var s=$(this).attr("link2");var E=$(this).attr("link3");if(C==""||s==""||E==""){return}var D=C.replace("[HOTEL]",s).replace("[URL]","");$(this).attr("href","http://twitter.com/intent/tweet?text="+encodeURIComponent(D)+"&via=bookednet&url="+encodeURIComponent(E)).attr("target","_blank")});$(".share-facebook").each(function(){var C=$(this).attr("link1");var s=$(this).attr("link2");if(C==""||s==""){return}$(this).attr("href","http://www.facebook.com/sharer.php?u="+encodeURIComponent(s)+"&t="+encodeURIComponent(C)).attr("target","_blank")});$(".gal-col").on("click",".share_photo",function(){var C=$(".fotorama__frame_active img");if(!C.size()){return false}if(window.fotorama&&window.fotorama.timer){clearTimeout(window.fotorama.timer)}var F=C.attr("src");var E=F.lastIndexOf("/");var D=F.lastIndexOf("/",E-1);var H=F.substring(D+1,E);var s=o.hotelid;if(H!=""){var G=!$("#sharephoto_dialog").size();if(G){$("body").append('<div id="sharephoto_dialog"></div>')}$("#sharephoto_dialog").load("/",{page:"sharephoto",id:H,hotelID:s},function(){$("#sharephoto_dialog .close-map-popup").click(function(){$("#sharephoto_dialog").dialog("close");$("#sharephoto_dialog").hide();return false});$("#sharephoto_dialog .close-map-popup").click(function(){$("#sharephoto_dialog").dialog("close");$("#sharephoto_dialog").hide();return false});$("#sharephoto_dialog input").bind("click",function(){$(this).focus().select()});if(G){$("#sharephoto_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:"auto",height:"auto",overlay:{opacity:0.3,background:"black"}})}else{$("#sharephoto_dialog").show().dialog("open")}})}return false});$(".share_map").bind("click",function(){var D=o.hotelid;var s=o.hotelid;if(D!=""){var C=!$("#sharemap_dialog").size();if(C){$("body").append('<div id="sharemap_dialog"></div>')}$("#sharemap_dialog").load("/",{page:"sharemap",id:D,hotelID:s},function(){$("#sharemap_dialog .close-map-popup").click(function(){$("#sharemap_dialog").dialog("close");$("#sharemap_dialog").hide();return false});$("#sharemap_dialog .close-map-popup").click(function(){$("#sharemap_dialog").dialog("close");$("#sharemap_dialog").hide();return false});$("#sharemap_dialog #code").unbind("click").bind("click",function(){$(this).focus().select()});$("#sharemap_dialog input").unbind("change").bind("change",function(){var E=700,F=300;var I=$(this).attr("id");if(I=="sm-size"){E=F=300}else{if(I=="me-size"){E=425;F=350}else{if(I=="la-size"){E=640;F=480}else{if(I=="cust-w"||I=="cust-h"||I=="cust-size"){E=$("#cust-w").val();F=$("#cust-h").val()}}}}var H=$("#map_frame").attr("src");var G='<iframe src="'+H+'" width="'+E+'" height="'+F+'" border="0" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ></iframe>';G+=$("#link").html();$("#code").val(G);$("#map_frame").attr("width",E);$("#map_frame").attr("height",F)});if(C){$("#sharemap_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:"auto",height:"auto",overlay:{opacity:0.3,background:"black"}})}else{$("#sharemap_dialog").show().dialog("open")}})}return false});$(".review-trans input").live("change",function(){var s=$(this).attr("id");if($(this).attr("value")==0){s=s.replace("rtrans_","trans_text_");s=s.replace("_tr","");$("#"+s).show();s=s.replace("trans_text_","orig_text_");$("#"+s).hide()}else{s=s.replace("rtrans_","orig_text_");s=s.replace("_sr","");$("#"+s).show();s=s.replace("orig_text_","trans_text_");$("#"+s).hide()}});$(".review-value a").live("click",function(){var s=$(this).attr("id");s=s.replace("review_value_","");s=s.replace("_1","");s=s.replace("_0","");if($(this).hasClass("plus")){$.get("/",{page:"review_mark",rid:s,langID:global_lang_id,mark:"1",r:Math.random()})}else{$.get("/",{page:"review_mark",rid:s,langID:global_lang_id,mark:"-1",r:Math.random()})}$(this).parent().hide();return false});if(typeof _gaq != 'undefined' && _gaq != null){check_visible_blocks(o);$(".hotel-save-mail .map-hotel").bind("click",function(){_gaq.push(["_trackEvent","HotelInfo","ShowMap",$(this).attr("id"),parseInt(o.hotelid),true])});$(".hotel-save-mail .save-hotel").bind("click",function(){_gaq.push(["_trackEvent","HotelInfo","SaveHotel",$(this).attr("id"),parseInt(o.hotelid),true])});$(".share_map").bind("click",function(){_gaq.push(["_trackEvent","HotelInfo","ShareMap","",parseInt(o.hotelid),true])});$(".hotel-submenu a").bind("click",function(){_gaq.push(["_trackEvent","HotelInfo","SubMenu",$(this).attr("href").replace("#",""),parseInt(o.hotelid),true])});$(".gal-col").on("click",".fotorama__thumb__img",function(){_gaq.push(["_trackEvent","Gallery","ThumbClick",$(this).find("img").attr("src"),parseInt(o.hotelid),true])});$(".gal-col").on("click",".fotorama__arr_prev",function(){_gaq.push(["_trackEvent","Gallery","PrevClick","",parseInt(o.hotelid),true])});$(".gal-col").on("click",".fotorama__arr_next",function(){_gaq.push(["_trackEvent","Gallery","NextClick","",parseInt(o.hotelid),true])});$(".gal-col").on("click",".share_photo",function(){_gaq.push(["_trackEvent","Gallery","SharePhoto",$("#slideshow_over").find("img").attr("src"),parseInt(o.hotelid),true])});$(".h-description form").bind("submit",function(){_gaq.push(["_trackEvent","Avail","CheckAvail",$(this).serialize(),parseInt(o.hotelid),true])});$(".b_popupdate").bind("click",function(){_gaq.push(["_trackEvent","Avail","PopupDate","",parseInt(o.hotelid),true])});$(".Availability-table .more_room_info").live("click",function(){_gaq.push(["_trackEvent","Avail","MoreRoomInfo",$(this).parent().attr("id"),parseInt(o.hotelid),true])});$(".rooms-result .more_room_info").live("click",function(){_gaq.push(["_trackEvent","Avail","MoreRoomInfoDates",$(this).parent().attr("id"),parseInt(o.hotelid),true])});$(".change-date a").live("click",function(){_gaq.push(["_trackEvent","Avail","ChangeDates","",parseInt(o.hotelid),true])});$(".button-book-now").live("click",function(){_gaq.push(["_trackEvent","Avail","BookNow","",parseInt(o.hotelid),true])});$(".left-col .toggle-list").bind("click",function(){if(!$(this).hasClass("clicked")){_gaq.push(["_trackEvent","LeftCol","UnfoldBlock",$(this).parent().next().attr("id"),parseInt(o.hotelid),true]);$(this).addClass("clicked")}});$(".left-col .share2 a").bind("click",function(){_gaq.push(["_trackEvent","LeftCol","Share",$(this).attr("class"),parseInt(o.hotelid),true])});$(".review-menu-box a").bind("click",function(){_gaq.push(["_trackEvent","Reviews","Menu",$(this).attr("id"),parseInt(o.hotelid),true])});$("#review_dyn_block .review-navigation a").live("click",function(){_gaq.push(["_trackEvent","Reviews","Navigation",$(this).attr("href"),parseInt(o.hotelid),true])});$(document).bind("scroll",function(){if(!document.scroll_sent){_gaq.push(["_trackEvent","HotelInfo","Scroll","",parseInt(o.hotelid),true]);document.scroll_sent=1}check_visible_blocks(o)})}}if(f=="hotel"||f=="hotellist"||f=="city"||f=="weather_city_forecast"){$("#other-hotels li").addClass("not-activ");$("#travel-more li").addClass("not-activ");$("#other-dest li").addClass("not-activ");$("#see-also li").addClass("not-activ");$(".win-free-hd a, #winfree").bind("click",function(){if(!$("#bf_dialog").size()){$("body").append('<div id="bf_dialog"></div>');$("#bf_dialog").load("/every_free_pop.html","",function(){var s=$(window).height()-150;if(s>400){s=400}$("#bf_dialog .legal-info").height(s);$("#mw-btn").bind("click",function(){$(this).toggleClass("hide-winers");$(".hide-row").toggle()});$(".book100-nav a").bind("click",function(){var C=$(this).attr("id");$(".book100-nav a").removeClass("curr");$(this).addClass("curr");$(".book100pop-deck").hide();$("#"+C+"_tab").show();return false});$("#ef_bestrates_add").bind("click",function(){$(".book100-nav a").removeClass("curr");$("#ef_bestrates").addClass("curr");$(".book100pop-deck").hide();$("#ef_bestrates_tab").show();return false});$("#bf_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:720,height:"auto",overlay:{opacity:0.3,background:"black"}});$("#bf_dialog #dlg_close").click(function(){$("#bf_dialog").dialog("close");$("#bf_dialog").hide();return false})})}else{$("#bf_dialog").show();$("#bf_dialog").dialog("open")}return false})}$(".review-menu-box a").bind("click",function(){var s=$(this).attr("id");$(".review-menu-box a").removeClass("curr-rev");$(this).addClass("curr-rev");s=s.replace("_menu_","_group_");$(".reviews-block").hide();$("#"+s).show();return false});$(".h-menu-main a").bind("click",function(){var s=$(this).attr("id");$(".h-menu a").removeClass("curr");$(this).addClass("curr");s=s.replace("_menu_","_tab_");$(".hotel_tab").hide();$(".hotel_sub_tab").hide();$("#"+s).show();$("#"+s+"_add").show();global_change_tab=1;check_visible_blocks(o);if(typeof _gaq != 'undefined' && _gaq != null){_gaq.push(["_trackEvent","HotelInfo","TabClick",$(this).attr("id"),parseInt(o.hotelid),true])}return false});$("#move_sdesc").show();$("#move_text").hide();$("#move_sdesc a").bind("click",function(){$("#move_text").show();$("#move_sdesc").hide();return false});$("#move_text a").bind("click",function(){$("#move_text").hide();$("#move_sdesc").show();return false});$(".change_main_en").each(function(){var C="/en";var s=$(this).attr("href");var D=0;if(s.indexOf("http://www.booked.net")!=-1){C=s;C=C.replace("http://www.booked.net","http://www.booked.net/en")}else{C+=s}$(this).attr("href",C)});$(".photolink").bind("click",function(){$(".full-img-photo").html("<img src='"+$(this).attr("href")+"' />");return false});if(f=="mybooking"){$("#Widget a").each(function(){$(this).removeAttr("onclick").attr("target","_blank").attr("href",$(this).attr("href").replace("http://www.cartrawler.com/res/affiliate/","http://www.booked.net/cars.html"));if($(this).attr("href").indexOf("?")==-1){var s=$("#cts").attr("src");s=s.substring(s.indexOf("?"),s.length);s=s.replace("303519","304114");$(this).attr("href",$(this).attr("href")+s)}})}if(f=="page"){if($("#page-about").size()&&window.location.hash===""){window.location.hash="about"}update_info_page();$(window).hashchange(function(){update_info_page()})}$("#visa_support").change(function(){if($(this).attr("checked")){$("#visa_support_block").show()}else{$("#visa_support_block").hide()}});if(f=="destinations"){$(".last-viwed-menu a").bind("click",function(){var s=$(this).attr("id");s=s.substr(1);subMenu(this,s);return false});$(".all-countries-list:gt(0)").hide()}}function check_visible_blocks(b){var e=$(window).height();var a=$(window).scrollTop();$(".ntit a, .hotel-subtitle-wmenu h3 a").each(function(){if(!$(this).is(":visible")){return}var f=$(this).attr("name");if(!document.bev){document.bev=[]}if(!document.bev[f]){var g=$(this).offset().top+50;if(g>=a&&g<=(a+e)){if(typeof _gaq != 'undefined' && _gaq != null){_gaq.push(["_trackEvent","HotelInfo","BlockVisible",f,parseInt(b.hotelid),true])}document.bev[f]=1}}})}function update_info_page(){var e=window.location.hash.replace("#","");if(e==""){return}$(".page-content").hide();var b=$("#page-"+e);b.show();var a=$(".name",b).html();$(".breadcrumbs .title").html(a)}function change_review_page(f){var h=f.attr("id");var g=h.indexOf("reviews_");f.attr("href","#reviewtab");if(g!=-1){g+=8;var b=h.indexOf("_",g);if(b!=-1){var e=h.substr(g,b-g);if(e>0){g=b+1;var a=h.substr(g,h.length-g);if(a>0){load_reviews_page("review_dyn_block",e,a);return true}}}}return true}function change_hotel_tab(a){global_change_tab=1;var b="hotel_menu_overview";if(a=="review"){b="hotel_menu_review"}else{if(a=="photo"){b="hotel_menu_photo"}else{if(a=="location"){b="hotel_menu_location"}else{if(a=="facilities"){b="hotel_menu_facilities"}}}}$(".h-menu a").removeClass("curr");$("#"+b).addClass("curr");b=b.replace("_menu_","_tab_");$(".hotel_tab").hide();$(".hotel_sub_tab").hide();$("#"+b).show();$("#"+b+"_add").show()}function add_badges_events(){$(".ha-register-body a").bind("click",function(){$(this).detach();$(".ha-register-body div.hidden").removeClass("hidden")});$(".ha-button").bind("click",function(){var m=$(this).attr("id").replace("badge","");var j="";if(m==2){m=$(this).closest(".ha-row").find(".ha-holder").attr("id");m=m.substring(2,m.length)}else{if(m=="ex"){m=$("#hhs-ex input[type=radio]:checked").attr("id");m=m.substring(2,m.length)}}var f=$("#hh"+m);if(m.indexOf("-")!=-1){j=m.substring(m.indexOf("-")+1,m.length);m=m.substring(0,m.indexOf("-"))}var h={page:"badge_code",type:m,hotelID:$("#hotelID").text()};if(m==1){var r=[3,5,10];var o=0;var e=0;var p=$("a",f).hasClass("booked-bold")?1:0;var q=$("a",f);for(var k=0;k<r.length;++k){if(q.hasClass("booked-top"+r[k])){o=r[k];break}}for(var k=6;k<15;++k){if(q.hasClass("booked-a"+k)){e=k;break}}h.font_size=e;h.top=o;h.has_bold=p;if($("a",f).hasClass("booked-short")){h.len="short"}else{h.len="long"}}else{if(m==2){if($(".booked-top",f).hasClass("booked-short")){h.len="short"}else{h.len="long"}h.type2=j}else{if(m==5){h.r1=$("#r1").text();h.d1=$("#d1").text();h.r2=$("#r2").text();h.d2=$("#d2").text();h.count=$("#total").text()}else{if(m==6||m==7){h.count=$("#rextotal").text()}else{if(m==8){h.count=$("#total").text();h.mark=$("#mark").text()}}}}}if(m>=3||m==9){var l=$(this).closest("div");var g=$(".ha-palette a.active span",l).attr("class").replace("color","");h.color=g}if(m>=6&&m<9){var b=null;if(m==6||m==7){b=$(".booked-badge"+m+" .booked-top")}else{b=$(".booked-badge8 > div")}var g=1;var s=b.attr("class");for(var k=12;k>=1;--k){if(s.indexOf("booked-color"+k)!=-1){g=k;break}}h.color=g}if(!$("#badgecode_dialog").size()){$("body").append('<div id="badgecode_dialog"></div>');$("#badgecode_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:585,height:"auto",overlay:{opacity:0.5,background:"black"}})}$("#badgecode_dialog .hap-close").live("click",function(){$("#badgecode_dialog").dialog("close");$("#badgecode_dialog").hide();return false});$("#badgecode_dialog").html('<div class="ha-popup"><a class="hap-close" href="#">Close window</a><div class="hap-row"><center><img style="margin: 50px;" src="/images/favlist-loading.gif"></center></div></div>').show().dialog("open").load("/",h,function(){$("#badgecode_dialog a").bind("click",function(){return false});$("#badgecode_dialog .hap-close").unbind("click").bind("click",function(){$("#badgecode_dialog").dialog("close");$("#badgecode_dialog").hide();return false});$("#badgecode_dialog textarea").bind("click",function(){$(this).focus().select()})});return false});$(".ha-palette .skin").bind("click",function(){var j=$("span",$(this)).attr("class");var e=$(this).parent("p");var f=$('a[class ~= "active"]',e);var b=$("span",f).attr("class");var k=$(this).closest("div");var l=k.attr("id").replace("skn-","");if(l=="ex"){l=$("#hhs-ex input[type=radio]:checked").attr("id").replace("bt","");var g=null;if(l==6||l==7){g=$(".booked-badge"+l+" .booked-top")}else{g=$(".booked-badge8 > div")}b=0;var m=g.attr("class");for(var h=12;h>=1;--h){if(m.indexOf("booked-color"+h)!=-1){b="color"+h;break}}}if(l==3){$(".booked-badge3 .booked-top").removeClass("booked-"+b).addClass("booked-"+j)}else{if(l==4){$(".booked-badge4 > div").removeClass("booked-"+b).addClass("booked-"+j)}else{if(l==5){$(".booked-badge5 > div").removeClass("booked-"+b).addClass("booked-"+j)}else{if(l==6){$(".booked-badge6 .booked-top").removeClass("booked-"+b).addClass("booked-"+j)}else{if(l==7){$(".booked-badge7 .booked-top").removeClass("booked-"+b).addClass("booked-"+j)}else{if(l==8){var a=$(".booked-badge8 > div").attr("class").replace("booked-"+b,"").replace(" ","");$(".booked-badge8 > div").attr("class","booked-"+j+a)}else{if(l==9){var a=$(".booked-badge9 > div").attr("class").replace("booked-"+b,"").replace(" ","");$(".booked-badge9 > div").attr("class","booked-"+j+" "+a)}}}}}}}f.removeClass("active");$(this).addClass("active");return false});$(".ha-type a").bind("click",function(){var b=$(this);var g=b.attr("id").replace("th-","");var e=b.closest(".ha-row").find(".ha-holder");var f=e.attr("id").replace("hh2-","");if(f!=g){$(".ha-type a").removeClass("selected");b.addClass("selected");e.attr("id","hh2-"+g);$(".booked-"+f,e).each(function(){var a=$(this);a.removeClass("booked-"+f).addClass("booked-"+g)})}return false});$(".ha-language").bind("change",function(){var a=$(this).val();window.location="/"+$("#hotelID").text()+"/owners_center/?langID="+a})}function update_badges(){var e=$(".booked-badge1 a");var g=$("span",e);var f=g.height();var b=g.width();var j=12;while(f>24||b>90){e.removeClass("booked-short").addClass("booked-long");f=g.height();b=g.width();if(f<25&&b<90){break}e.removeClass("booked-long").addClass("booked-short").removeClass("booked-bold");f=g.height();b=g.width();if(f<25&&b<90){break}e.removeClass("booked-short").addClass("booked-long");f=g.height();b=g.width();if(f<25&&b<90){break}e.removeClass("booked-long").addClass("booked-short").addClass("booked-bold");e.removeClass("booked-a"+j).addClass("booked-a"+(j-1));--j;f=g.height();b=g.width()}$(".booked-badge2").each(function(){var a=$(".booked-top",$(this));if($("span",a).height()>16){a.removeClass("booked-short").addClass("booked-long");$(".booked-body span",$(this)).detach()}});$(".booked-date").each(function(){$(this).html(get_string_date2($(this).html()))})}function load_booking_room(b,a){$("#booking_block_"+a).load(b,function(){if($("#locked",this).size()){setTimeout(function(){load_booking_room(b,a)},30000)}})}function mail_hotels(a){if(!$("#clubsend_dialog").size()){$("body").append('<div id="clubsend_dialog" class="pu"></div>');$("#clubsend_dialog").load("/",{page:"clubsend_popup",city:$("#usp_city").size()?$("#usp_city").val():"",id:(typeof a!="undefined")?a:""},function(){$("#clubsend_dialog").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:585,height:"auto",overlay:{opacity:0.5,background:"black"}});$("#clubsend_close").live("click",function(){$("#clubsend_dialog").dialog("close");$("#clubsend_dialog").hide();return false});$("#f_clubsend").unbind("submit");$("#f_clubsend").live("submit",function(){$("#f_clubsend #fld_submit").html('<center><img src="/images/favlist-loading.gif"></center>');$("#clubsend_dialog").load("/?"+$(this).serialize());return false})})}else{if(typeof a!="undefined"){$("#clubsend_dialog #mailhotelid").val(a)}else{$("#clubsend_dialog #mailhotelid").val("")}$("#clubsend_dialog").show();$("#clubsend_dialog").dialog("open")}}function favlist_load(){var a=$("#usp_city").val();$("#club_fav").removeClass("loaded");$("#club_fav_list").html('<center><img src="/images/favlist-loading.gif"></center>');$("#club_fav_list").load("/",{page:"favlist",city:(typeof a!="undefined"?a:"")},function(){$("#club_fav").addClass("loaded");$("#club_fav #fav_share_url").bind("click",function(){$(this).focus();$(this).select()})})}var map_id=undefined;var map_coords=undefined;var gmap=undefined;function load_map(f,b){map_id=f;map_coords=b;var e=typeof $.loadScript!="undefined"?$.loadScript:$.getScript;var a="http://maps.google.com/maps?file=api&v=2&key="+gmap_opts.gmapkey+"&async=2&callback=load_map_page&hl="+gmap_opts.lang_code;e(a,function(){})}function load_map_page(){var a=$(gmap_opts.mapcont);var e=$(a).height();var g=$(a).width();var f=map_id;if(typeof gmap_opts.hotel_id!="undefined"){f=gmap_opts.hotel_id}var b="";if(typeof(gmap_opts.page_url)!="undefined"){b=gmap_opts.page_url;b=b.replace("[LANG]",gmap_opts.lang_id);b=b.replace("[DEST]",gmap_opts.dest_id);b=b.replace("[ID]",f);if(b.indexOf("?")>-1){b+="&"}else{b+="?"}b+="&w="+g+"&h="+e;b+="&r="+Math.random()}else{var f=map_id;if(typeof gmap_opts.hotel_id!="undefined"){f=gmap_opts.hotel_id}b="/maps/data/page?langID="+gmap_opts.lang_id+"&w="+g+"&h="+e+"&id="+f+"&did="+gmap_opts.dest_id+"&r="+Math.random()}$(a).load(b,function(){$(a).bgiframe();var h=typeof $.loadScript!="undefined"?$.loadScript:$.getScript;h("/maps/js/maps.pack.js?v=1.0.10",function(){if(typeof gmap_opts=="object"){gmap=new HotelsMap(gmap_opts);if(typeof geo_opts!="undefined"){gmap.options(geo_opts)}gmap.init(f,map_coords)}a.addClass("ready")})})}function update_map(a){if(typeof gmap!="undefined"){gmap.options(a)}if(typeof gmap_opts!="undefined"){$.extend(gmap_opts,a)}}function center_window(f){var a=$(f).width();var e=$(f).height();var b=Math.floor(-e/2);if($.browser.msie&&$.browser.version.substr(0,1)<7){b+=document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}$(f).css({marginLeft:Math.floor(-a/2)+"px",width:a+"px",marginTop:b+"px",display:"block"})}function writereview_verify(){var b=new Array();b={trvl_group:{required:true},month:{required:true},year:{required:true}};for(i=0;i<prop_ids.length;++i){b["p"+prop_ids[i]]={required:true}}if(prop_ids.length){first_prop="p"+prop_ids[0]}for(var a in b){$("input[name = '"+a+"'], select[name = '"+a+"']").rules("add",b[a])}}function addphotos_verify(){$("#agree").rules("add",{required:true})}var photos_amount=3;function add_more_photos(b){var a=$("#reviewform #photo1").html();if(!b){b=1}for(i=0;i<b;++i){photos_amount++;var e='<div class="row rrow" id="photo'+photos_amount+'">';e+=a.replace(/1/g,photos_amount).replace('class="inp_txt"','class="inp_txt ne"');e+="</div>";$("#photo"+(photos_amount-1)).after(e);$("#photo"+photos_amount).slideDown("normal")}$("#pa").val(photos_amount);return false}function ac_select_dest(b){var a=b.extra[3];$("#d").val(a)}function ac_select_dest2(b){var a=b.extra[3];$("#d2").val(a)}function ac_format_dest(a){return"<small>"+a[1]+a[2]+"</small> - <strong>"+a[3]+"</strong>"}function ac_select_hotel(b){var a=b.extra[1];$("#h").val(a)}function ac_format_hotel(b){var a="<small>"+b[1]+"</small> - <strong>"+b[0]+"</strong>";if(b[3].length){a+=" - <small>"+b[3]+"</small>"}return a}function get_num_nights(b,a){var f=cal_get_date(b);var e=cal_get_date(a);return(e-f)/86400000}function avails_get(e,a,b){$.ajax({type:"GET",url:"/",data:{page:"check_avail",availID:e,r:Math.random()},success:function(h){var g=$(h).find("check_avail").find("status").text();if(g=="wait"){if(b=="1"){var k=$(h).find("check_avail").find("find").text();$("#find_hotels_count").text(k);var j=$(h).find("check_avail").find("process").text();var f=(100-j)+"%";$("#find_hotels_process").animate({width:f},1000)}setTimeout(function(){avails_get(e,a,b)},3000)}else{if(g=="finish"){$("#find_hotels_process").animate({width:"0%"},300);window.location=a}}}})}function alt_avails_get(b,a){$.ajax({type:"GET",url:"/",data:{page:"check_avail",availID:b,r:Math.random()},success:function(g){var f=$(g).find("check_avail").find("status").text();if(f=="wait"){var j=$(g).find("check_avail").find("find").text();$("#find_hotels_count").text(j);var h=$(g).find("check_avail").find("process").text();var e=(100-h)+"%";$("#find_hotels_process").animate({width:e},1000);setTimeout(function(){alt_avails_get(b,a)},2000)}else{if(f=="finish"){$("#find_hotels_process").animate({width:"0%"},300);$(".block-available-hotels").load(a)}}}})}function avail_hotel_group(a,h,g,f,e,b){if(global_left_avail_hotels==0){global_left_avail_hotels=b}$.ajax({type:"GET",url:"/",data:{page:"havail_only",hotelID:a,from:h,to:g,numPersons:f,ShowCurrency:e,r:Math.random(),only_check:"1"},success:function(k){var j=new Array();$(k).find("hotel_avail").find("item").each(function(){var l=$(this).find("status").text();var m=$(this).find("hotelID").text();if(l=="wait"){j.push(m)}else{if(l=="bad"){$("#bookavail_"+m).hide();$("#booknotavail_"+m).show();$("#hotelavail_"+m).hide();if(global_left_avail_hotels>5&&m!=global_filter_hotel_id){$("#hotelblock_"+m).hide();global_left_avail_hotels-=1}}else{if(l=="good"){var o={};o.page="havail";o.hotelID=m;o.from=h;o.to=g;o.numPersons=f;o.ShowCurrency=e;o.r=Math.random();$("#hotelavail_"+m).load("/",o,function(p,r,q){$("#book_"+m).hide();$("#hotelinfo_"+m).attr("class","hotel-ldesk htl hd-wide");$("#hotelavail_"+m).find(".tbl_avail tr").hover(function(){$(this).addClass("hover-tr")},function(){$(this).removeClass("hover-tr")})})}}}});if(j.length>0){setTimeout(function(){avail_hotel_group(j,h,g,f,e,b)},1500)}}})}function recv_avail_hotel_block(a){$.ajax({type:"GET",url:"/",data:{page:"hotel_avail",hotelID:a,r:Math.random()},dataType:"html",success:function(b){$(".ratesresults_block").each(function(){var f=$(this).attr("id");var e=$(b).find("#"+f).children();$(this).html(e)});$(b).find("#alt_avail").each(function(){alt_avails_get($(this).find("a").attr("id"),$(this).find("a").attr("href"))});$(".more_rate_info").tooltip({delay:0,showURL:false,top:5,left:-50,extraClass:"hint-hotel-inf",bodyHandler:function(){var f=$(this).attr("id");f=f.replace("rt_","mrt_");var e=$("#"+f).html();return e}});$(".more_site_info").tooltip({delay:0,showURL:false,top:10,bodyHandler:function(){var f=$(this).attr("id");f=f.replace("si_","msi_");var e=$("#"+f).html();return e}});cal_init("","","");$(".rooms-result tr").each(function(){$(this).find("a.gallery_main").lightBox({fixedNavigation:true})});$(".room-photos").each(function(){$(this).find("a.gallery_add").lightBox({fixedNavigation:true})});child_check();$(".ratesresults_block .str_date").each(function(){$(this).html(get_string_date($(this).html()))});if(typeof _gaq != 'undefined' && _gaq != null){_gaq.push(["_trackEvent","Avail","HasRooms",a,true])}}})}function avail_hotel_block(a,b){$.ajax({type:"GET",url:"/",data:{page:"havail_only",CheckAvailID:a,r:Math.random(),only_check:"1"},success:function(f){var e=new Array();$(f).find("hotel_avail").find("item").each(function(){var g=$(this).find("status").text();var h=$(this).find("rurl").text();if(g=="wait"){setTimeout(function(){avail_hotel_block(a,b)},1000)}else{if(g=="bad"&&h.length){window.location=h}else{if(g=="bad"||g=="good"){recv_avail_hotel_block(b)}}}})}})}function booking_lock(){setTimeout(function(){document.forms.booking_form.submit()},5000)}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function partner_stats(a){if(getCookie("c_aid")!=a){$.get("/",{page:"pstat",uvisit:"1"});document.cookie="c_aid="+escape(a)}else{$.get("/",{page:"pstat"})}}function test_stats(a){$.get("/?page=tstat&"+a)}function change_country(a){if(a=="US"){$("#r_states").show();$("#state_us").show();$("#state_ca").hide();$("#state_au").hide()}else{if(a=="CA"){$("#r_states").show();$("#state_us").hide();$("#state_ca").show();$("#state_au").hide()}else{if(a=="AU"){$("#r_states").show();$("#state_us").hide();$("#state_ca").hide();$("#state_au").show()}else{$("#r_states").hide();$("#state_us").hide();$("#state_ca").hide();$("#state_au").hide()}}}}function filters_show_more(b){var e=".sect_"+b+"_add";var a="#sect_"+b+"_more";var f="#sect_"+b+"_hide";$(e).show();$(a).hide();$(f).show();return false}function filters_hide(b){var e=".sect_"+b+"_add";var a="#sect_"+b+"_more";var f="#sect_"+b+"_hide";$(e).hide();$(a).show();$(f).hide();return false}function filters_collapse(b){var a="#"+b+"_collapse";var f="#"+b+"_expand";var e="#"+b+"_block";$(a).hide();$(f).show();$(e).hide();return false}function filters_expand(b){var a="#"+b+"_collapse";var f="#"+b+"_expand";var e="#"+b+"_block";$(a).show();$(f).hide();$(e).show();return false}function apply_filter_url(g,f,b,e){var a=select_filter_url(g,f,b,e);window.location=a;return false}function show_list_filter_wait(){$("#request_is_processing").show();$("#request_is_processing").dialog({modal:true,resizable:false,draggable:false,title:false,dialogClass:"splash",width:330,height:"auto"})}function apply_list_filter(b,a,f,h,e){var g=$(b.target);$("#add_f_param").attr("name",a);$("#add_f_param").attr("value",f);show_list_filter_wait();document.forms.form_find2.action+="#"+e;document.forms.form_find2.submit();if(!g.is(":input")){$("#"+h).attr("checked",true);b.preventDefault();return false}else{return true}}function remove_list_filter(b,a,f,h,e){var g=$(b.target);show_list_filter_wait();$("#add_f_param").attr("name",a);$("#add_f_param").attr("value",f);document.forms.form_find2.action+="#"+e;document.forms.form_find2.submit();if(!g.is(":input")){$("#"+h).removeAttr("checked");b.preventDefault()}else{return true}}function add_currency(b,f,a){$("#dd_currency").append('<li><a href="'+b+"&ShowCurrency="+f+'">'+a+" ("+f+")</a></li>");var e=$("#ff_currency");if(e.size()){$("li",e).removeClass("last");e.append('<li class="last"><a href="'+b+"&ShowCurrency="+f+'"  id="pfc-'+f+'">'+a+" ("+f+")</a></li>")}}function view_big_map(){$("#mainmap_regions").toggle("medium");$("#big_map").hide()}function show_lvc(a,b){document.getElementById("lvc_"+b).style.display="none";document.getElementById("lvc_"+a).style.display="block"}function del_hotel(b,e,a){if(a==0){$("#lvc_"+e+"_hotellist").load("/",{page:"last_viewed_city_hotels",cid:e,hid:b,action:"delete_hotel"})}else{if(a==2){$("#last_viewed_div").load("/",{page:"last_viewed_all_left",hid:b,action:"delete_hotel"})}else{$("#last_viewed_div").load("/",{page:"last_viewed_all",hid:b,action:"delete_hotel"})}}}function del_all(){$("#last_viewed_div").load("/",{page:"last_viewed_all",action:"delete_all"});$("#last_viewed_div").toggle()}function select_tab(a,b){document.getElementById("group_tab_"+b).style.display="block";document.getElementById("group_tab_"+a).style.display="none"}function load_reviews_page(e,a,b){$(".reviews-list").html('<li><center style="padding:100px;"><img src="/images/favlist-loading.gif"></center></li>');$("#"+e).load("/",{page:"review_page",part:b,hotelID:a},function(){$("a.gallery").lightBox({fixedNavigation:true})})}function load_all_cities(b,e,a){$("#sect_city_more").html('<li><center style="padding:50px;"><img src="/images/favlist-loading.gif"></center></li>');$("#"+b).load("/",{page:"country_cities",countryID:e,state:a})}function hotellist_sort_filter(a,b){$("#sort_form_sort").val(a);$("#sort_form_sortd").val(b);$("#sort_form").submit();return false}function change_user_comment(){if($("#def_comment").val()=="1"){$("#user_comment").text("");$("#user_comment").removeClass("def_comment");$("#def_comment").val("0")}}function video_carousel(a){$("#video-list-next").bind("click",function(){a.next();if(a.first+3>=a.options.size){$("#video-list-next").hide()}if(a.first>1){$("#video-list-prev").show()}return false});$("#video-list-prev").bind("click",function(){a.prev();if(a.first==1){$("#video-list-prev").hide()}if(a.first+3<a.options.size){$("#video-list-next").show()}return false})}function animate_check_avails(){$(".ch-av-in-tab").animate({opacity:0.8},400,function(){$(".ch-av-in-tab").css("background-color","#d4e3f2")}).animate({opacity:1},400,function(){$(".ch-av-in-tab").css("background-color","#a8d2f6")}).animate({opacity:0.8},400,function(){$(".ch-av-in-tab").css("background-color","#d4e3f2")}).animate({opacity:1},400,function(){$(".ch-av-in-tab").css("background-color","#a8d2f6")})}function scroll_book_now(){$(".book-scroll").addClass("fix").css("top","auto");var g=$(".book-scroll");var e=$(".book-scroll").offset();var b=e.top;var j=b+$(".book-scroll").height();var f=$("#rooms_avail_0").offset();var a=$("#rooms_avail_0").height()+f.top;if(b<f.top){g.removeClass("fix")}else{if(j>a-20){var h=($("#rooms_avail_0").height()-$(".book-scroll").height()-20);if(h<40){h=40}g.removeClass("fix").css("top",h+"px")}else{g.addClass("fix").css("top","auto")}}}function toggleFbl(a,e){$(e).toggleClass("f-show");$("#"+a).toggle()}function hotellist_Initphotos(e,b){if(!(e in hotellist_photos)){return false}for(var a=0;a<hotellist_photos[e].length;++a){b.add(a+3,'<img src="'+hotellist_photos[e][a].url+'" width="'+hotellist_photos[e][a].width+'" height="'+hotellist_photos[e][a].height+'" />')}}function hotellist_InitCarosel(a,b){$("#hotelphotos_"+a).jcarousel({scroll:1,wrap:"circular",animation:"fast",size:b});var e=$("#hotelphotos_"+a).data("jcarousel");$("#photo_nav_"+a+" .photo_nav_next a").bind("click",function(){if(!$("#hotelphotos_"+a).hasClass("init_photos")){hotellist_Initphotos(a,e);$("#hotelphotos_"+a).addClass("init_photos")}e.next();if(e.size()){var g=parseInt(e.first%e.size());var f=0;while(g<0&&f<10){++f;g+=parseInt(e.size())}if(!g){g=e.size()}$("#photo_nav_"+a+" .photo_counter span").text(g+"-"+e.size())}return false});$("#photo_nav_"+a+" .photo_nav_prev a").bind("click",function(){if(!$("#hotelphotos_"+a).hasClass("init_photos")){hotellist_Initphotos(a,e);$("#hotelphotos_"+a).addClass("init_photos")}e.prev();if(e.size()){var g=parseInt(e.first%e.size());var f=0;while(g<0&&f<10){++f;g+=parseInt(e.size())}if(!g){g=e.size()}$("#photo_nav_"+a+" .photo_counter span").text(g+"-"+e.size())}return false})}function subMenu(b,a){$(".last-viwed-menu a").removeClass("curr");$(b).addClass("curr");$(".all-countries-page .all-countries-list").slideUp();$("#"+a).slideDown()}function toggleList(b,a){$("#"+b).find(".not-activ").slideToggle();$(a).toggleClass("toggle-activ-list")}function isset(a){return typeof(a)!="undefined"&&a!==null}function refresh_total_rooms(a){var e=0;var b=0;$("#selected_rooms_"+a).find(".rooms-count-select").each(function(){var l=$(this).attr("id");var g="";var h="room_count_"+a+"_select_";if(l.length>h.length){g=l.substr(h.length)}var k=$("#room_price_"+a+"_"+g).attr("value")*1;var j=$(this).find("option:selected").text()*1;e+=j*1;b+=(k*j)});var f=$("#total_price_cur_"+a).attr("value")+" "+b;$("#rooms_count_"+a+"_0").text(e);$("#rooms_count_"+a+"_1").text(e);$("#total_price_"+a+"_0").text(f);$("#total_price_"+a+"_1").text(f)}function check_booking_forms(a,e){var b=0;$("#selected_rooms_"+a).find(".rooms-count-select").each(function(){var f=$(this).find("option:selected").text()*1;b+=f*1});if(b>0){return true}alert(e);return false}function check_modify_forms(a,b){if($("input[name=roomSelected]:radio:checked").size()>0){return true}alert(b);return false}function show_room_info(e,b,a){if(e.hasClass("collapsed")){$("#rmd_"+b+"_"+a).show();e.find(".more_room_info").hide();e.find(".hide_room_info").show()}else{$("#rmd_"+b+"_"+a).hide();e.find(".more_room_info").show();e.find(".hide_room_info").hide()}$(".rate_cols_"+b+"_"+a).toggleClass("bor-bot");e.toggleClass("collapsed");e.toggleClass("expanded");return false}function init_load_rooms_block(){$(".more_rate_info").tooltip({delay:0,showURL:false,top:5,left:-50,extraClass:"hint-hotel-inf",bodyHandler:function(){var b=$(this).attr("id");b=b.replace("rt_","mrt_");var a=$("#"+b).html();return a}});$(".more_site_info").tooltip({delay:0,showURL:false,top:10,bodyHandler:function(){var b=$(this).attr("id");b=b.replace("si_","msi_");var a=$("#"+b).html();return a}});$(".rooms-result tr").each(function(){$(this).find("a.gallery_main").lightBox({fixedNavigation:true})});$(".room-photos").each(function(){$(this).find("a.gallery_add").lightBox({fixedNavigation:true})});$("a.gallery").lightBox({fixedNavigation:true});$(".room_types_more_info").hide();$(".ratesresults_block .str_date").each(function(){$(this).html(get_string_date($(this).html()))})}function child_check(){$(".ch-on").bind("change",function(){if($(this).attr("checked")){$(this).parent().parent().find(".ch-num").show()}else{$(this).parent().parent().find(".ch-num").hide().val("0");$(this).parent().parent().find(".ch-list-age").hide()}});$(".ch-num").bind("change",function(){if($(this).val()>0){$(this).parent().parent().find(".ch-list-age").show();if($(this).val()==1){$(this).parent().parent().find(".ch-list-age").find(".tit_child").show();$(this).parent().parent().find(".ch-list-age").find(".tit_childred").hide()}else{$(this).parent().parent().find(".ch-list-age").find(".tit_child").hide();$(this).parent().parent().find(".ch-list-age").find(".tit_childred").show()}$(this).parent().parent().find(".ch-list-age-deck").empty();for(i=0;i<$(this).val();i++){$(this).parent().parent().find(".ch-list-age-deck").append('<select name="childAge'+(i+1)+'"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option></select>')}}else{$(this).parent().parent().find(".ch-list-age-deck").empty();$(this).parent().parent().find(".ch-list-age").hide()}})}function cal_init(g,b,f){$.datepicker.setDefaults({showOn:"both",buttonImageOnly:true,buttonImage:"/images/calendar.gif",buttonText:"Calendar",numberOfMonths:2,speed:"",firstDay:1,changeMonth:false,changeYear:false,dateFormat:"yy-mm-dd",closeAtTop:false,mandatory:true,changeFirstDay:false,widthFix:6});$(".calendar_field").datepicker({beforeShow:cal_read_linked,onSelect:cal_update_linked});$(".calendar_field").each(function(){var m=cal_get_date($(this).val());var k=undefined;var l=undefined;var j=undefined;if(m){k=m.getYear();l=m.getMonth()+1;j=m.getDate();if(k<2000){k+=1900}}var h=$("#empty_date").val();cal_init_monyear_field($(this).attr("id"),k,l,12,h,g,b,f);if(h=="1"){j=undefined}cal_init_days_field($(this).attr("id"),j)});for(var e=0;e<=11;++e){var a=e?(e-1):"";$("#d_from"+a+"_my, #d_to"+a+"_my").change(function(){var h=$(this).attr("id");h=h.replace("_my","");return cal_init_days_field(h)});$("#d_from"+a+"_my, #d_from"+a+"_d, #d_to"+a+"_my, #d_to"+a+"_d").change(function(){var l=$(this).attr("id");var k=$(this);var h=k.get(0);if(h.options[0].value==-1){h.remove(0)}l=l.replace("_my","");l=l.replace("_d","");var j=cal_read_linked(l);return j});$("#d_to"+a+", #d_from"+a).change(function(){cal_recheck($(this).attr("id"))})}}function cal_read_linked(a){if(typeof(a)=="object"){a=a.id}if(!a){a=$(this).attr("id")}var f=a;f=f.replace("_to","_from");var g=f;g=g.replace("_from","_to");$("#"+a).val($("#"+a+"_my").val()+"-"+$("#"+a+"_d").val());$("#"+a).trigger("change");var e=new Date();var b=cal_get_date($("#"+f).val());if(b==null){b=e}b.setTime(b.getTime()+86400000);var h=(a==g?b:e);return{minDate:h,maxDate:null}}function cal_update_linked(g,f){if(typeof(f)=="object"){f=$(this).attr("id")}if(!g||g==""){return false}var e=g.split("-");var j=$("#"+f+"_my").val();var b=e[0]+"-"+e[1];var h=$("#"+f+"_my");var a=h.get(0);if(a.options[0].value==-1){a.remove(0)}if(j!=b){$("#"+f+"_my").val(b);cal_init_days_field(f)}$("#"+f+"_d").val(e[2]);$("#"+f).trigger("change");return true}function cal_init_monyear_field(k,q,l,j,o,f,v,h){var u=new Array();var w="",e="";var a=$.datepicker._defaults.monthNamesShort;if(global_lang_id==13){a=$.datepicker._defaults.monthNames}var p=new Date();if(f!=""&&v!=""&&h!=""){p=new Date(h,v-1,f,1,1,1,1)}var g=p.getMonth()+1;var s=p.getYear();if(s<1900){s+=1900}var b=$("#"+k+"_my");b.empty();select_ctrl_m=b.get(0);var w="",e="";var r=0;if(o=="1"){select_ctrl_m.options[0]=new Option(month_translate[global_lang_id],"-1");++r}for(i=0;i<j;++i){w=s+"-"+(g<10?"0"+g:g);e=a[g-1]+" '"+(s%100<100?s%100:s%100);select_ctrl_m.options[r]=new Option(e,w);++r;++g;if(g>12){++s;g=1}}if(o=="1"){b.val("-1")}else{b.val(q+"-"+(l<10?"0"+l:l))}}function cal_init_days_field(q,u){var f=$("#"+q+"_my").val();if(!f){return}if(f=="-1"){var e=$("#"+q+"_d");var j=$.datepicker._defaults.dayNamesShort;var a=31;e.empty();var o=e.get(0);var w="",h="";o.options[0]=new Option(day_translate[global_lang_id],"-1");for(d=1;d<=a;++d){h=d;w=d<10?"0"+d:d;o.options[d]=new Option(h,w);if(d==u){o.options[d].selected=true}}}else{var p=f.split("-");var s=p[0];var l=p[1];if(u==undefined){u=$("#"+q+"_d").val()}var e=$("#"+q+"_d");var j=$.datepicker._defaults.dayNamesShort;var k=new Date(s,l-1,1).getDay();var a=32-new Date(s,l-1,32).getDate();var r=new Date();var v=r.getYear();if(v<1900){v+=1900}var b=1;if(s==v&&l==(r.getMonth()+1)){b=r.getDate()}e.empty();var o=e.get(0);var g=0;var w="",h="";for(d=b;d<=a;++d){if(global_lang_id==16){h=d+" "+j[(k+d-1)%7]}else{h=j[(k+d-1)%7]+" "+d}w=d<10?"0"+d:d;o.options[d-b]=new Option(h,w);if(d==u){o.options[d-b].selected=true}++g}}return true}function cal_recheck(a){var f=a;f=f.replace("_to","_from");var g=f;g=g.replace("_from","_to");var j=cal_get_date($("#"+f).val());var b=cal_get_date($("#"+g).val());var e=new Date;if(!j){j=e}if(!b){b=e}var k=$("#"+f+"_my").val();var h=$("#"+g+"_my").val();if(b<=j||(h=="-1"&&a==f&&k!="-1")){b.setTime(j.getTime()+86400000);$("#"+g).val($.datepicker.formatDate("yy-mm-dd",b));cal_update_linked($("#"+g).val(),g)}if(a==g&&k=="-1"&&h!="-1"){j.setTime(b.getTime()-86400000);$("#"+f).val($.datepicker.formatDate("yy-mm-dd",j));cal_update_linked($("#"+f).val(),f)}}function cal_get_date(a){if(!a){return}fields=a.split("-");return(fields.length<3?null:new Date(parseInt(fields[0],10),parseInt(fields[1],10)-1,parseInt(fields[2],10)))}function cal_init_month(b,h){var f=$.datepicker._defaults.monthNames;var g=$("#"+b+"_m");if(!g){return}g.empty();var a=g.get(0);if(!a){return}for(var e=0;e<f.length;++e){a.options[e]=new Option(f[e],e+1);if(e+1==h){a.options[e].selected=true}}}function cal_init_year(b,h,e,f){var j=$("#"+b+"_y");if(!j){return}j.empty();var a=j.get(0);if(!a){return}var k=0;for(var g=f;g>e;--g){a.options[k]=new Option(g,g);if(g==h){a.options[k].selected=true}++k}}function cal_init_day(j,l){var k=$("#"+j+"_y").val();var f=$("#"+j+"_m").val();var b=$("#"+j+"_d");if(!b){return}if(!l&&b.val()){l=b.val()}b.empty();var g=b.get(0);if(!g){return}var e=new Date(k,f-1,1).getDay();var a=32-new Date(k,f-1,32).getDate();for(var h=1;h<=a;++h){g.options[h-1]=new Option(h,h);if(h==l){g.options[h-1].selected=true}}}function cal_read_linked_lite(a){$("#"+a).val($("#"+a+"_y").val()+"-"+$("#"+a+"_m").val()+"-"+$("#"+a+"_d").val())}function get_string_date(f){var a=f;if(a.length==14){a=f.substr(0,4)+"-"+f.substr(4,2)+"-"+f.substr(6,2)}var h=cal_get_date(a);year=h.getYear();month=h.getMonth()+1;day=h.getDate();if(year<2000){year+=1900}var b=$.datepicker._defaults.monthNamesShort;var g=$.datepicker._defaults.dayNamesShort;var e=new Date(year,month-1,1).getDay();if(global_lang_id==16){return year+" "+year_translate[16]+b[month-1]+" "+day+day_add_translate[16]+" ("+g[(e+day-1)%7]+")"}else{return g[(e+day-1)%7]+" "+day+" "+b[month-1]+" "+year}}function get_string_date2(f){var a=f;if(a.length==14){a=f.substr(0,4)+"-"+f.substr(4,2)+"-"+f.substr(6,2)}var h=cal_get_date(a);year=h.getYear();month=h.getMonth()+1;day=h.getDate();if(year<2000){year+=1900}var b=$.datepicker._defaults.monthNamesShort;var g=$.datepicker._defaults.dayNamesShort;var e=new Date(year,month-1,1).getDay();if(global_lang_id==16){return year+" "+year_translate[16]+b[month-1]}else{return b[month-1]+" "+year}}function drawmap(){return}function hideById(b){var a=document.getElementById(b);if(a){a.style.display="none"}}function showById(b){var a=document.getElementById(b);if(a){a.style.display="block"}}function flipById(b){var a=document.getElementById(b);if(a){if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}}}var ua=navigator.userAgent.toLowerCase();var KO=ua.match(/konqueror\/(\d+)/),KO3=KO&&KO[1]==3;var cidCtrl=new Object(),cimCtrl=new Object(),codCtrl=new Object(),comCtrl=new Object();var Days=[31,28,31,30,31,30,31,31,30,31,30,31];var Weekdays=[],Months=[];var gd=new Date(),rToday=rBegin=rGetDate(gd);gd.setDate(gd.getDate()+1);var rTomorrow=rGetDate(gd);gd=new Date();gd.setMonth(gd.getMonth()+11);var rEnd=rGetDate(gd);if(rEnd[1]==1){rGetDays(rEnd[0])}rEnd[2]=Days[rEnd[1]];var DOWs=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var MONs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var fullMONs=["January","February","March","April","May","June","July","August","September","October","November","December"];var fullDOWs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var rBegin,rEnd;function rGetById(a,b){return a.getElementById(b)}function rCalibrate(b,a){if(a<1){b--;a+=12}else{if(a>12){b++;a-=12}}return[b,a]}function rGetDays(a){Days[1]=a%4==0&&a%100!=0||a%400==0?29:28;return Days}function rParseDate(b,e){var f=b.options[b.options.selectedIndex].value,a=e.options[e.selectedIndex].value.split("-");return[a[0],a[1]-1,f]}function rGetDOW(e,a,b){return(new Date(e,a,b).getDay()+6)%7}function rGetDate(a){return[a.getFullYear(),a.getMonth(),a.getDate(),a.getDay()]}function rSetMonths(g,k,b,h,j){var a,f;for(var e=1;e<=12;e++){a=rCalibrate(k,b+e);g.options[e-1]=new Option(Months[a[1]-1]+" "+a[0],a[0]+"-"+a[1]);if((h==a[0])&&(j==(a[1]-1))){f=e-1}}if(typeof(f)!="undefined"){setTimeout(function(){g.options[f].selected=true},1)}}function rSetDays(e,h,a,f){var b,g;e.options.length=0;if(a==1){rGetDays(h)}for(b=1;b<=Days[a];b++){g=rGetDOW(h,a,b);e.options[b-1]=new Option(Weekdays[g]+" "+b,b)}setTimeout(function(){e.options[f-1].selected=true},1)}function rValidRange(g,a,f){var e=codCtrl.options[codCtrl.selectedIndex].value;var b=comCtrl.options[comCtrl.selectedIndex].value.split("-");return((new Date(g,a,f))<(new Date(b[0],b[1]-1,e)))}function rNextDay(f,a,e){var b=new Date(f,a,e);if((rEnd[0]==f)&&(rEnd[1]==a)&&(rEnd[2]==e)){return rGetDate(b)}b.setDate(b.getDate()+1);return rGetDate(b)}function rChangeDay(b,a){var e=rParseDate(b,a);if((b==cidCtrl)&&(!rValidRange(e[0],e[1],e[2]))){var f=rNextDay(e[0],e[1],e[2]);if(e[1]==f[1]){codCtrl.options[f[2]-1].selected=true}else{comCtrl.options.selectedIndex++;rChangeMonth(selDay,selMonth);codCtrl.options[f[2]-1].selected=true}}}function rChangeMonth(e,a){var f=rParseDate(e,a);rSetDays(e,f[0],f[1],f[2]);if((e==cidCtrl)&&(!rValidRange(f[0],f[1],f[2]))){var g=rNextDay(f[0],f[1],f[2]);var b=f[1]-rBegin[1];if(b<0){b+=12}comCtrl.options.selectedIndex=b;rSetDays(codCtrl,g[0],g[1],g[2])}}function rChMonth(b,f){var e=rGetById(document,b);var a=rGetById(document,f);rChangeMonth(e,a)}function rChDay(b,f){var e=rGetById(document,b);var a=rGetById(document,f);rChangeDay(e,a)}function InitCtrl(a,b){switch(b){case"en":Months=["January","February","March","April","May","June","July","August","September","October","November","December"];Weekdays=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];break;case"de":Months=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];Weekdays=["Mo","Di","Mi","Do","Fr","Sa","So"];break;case"fr":Months=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];Weekdays=["Lu","Ma","Me","Je","Ve","Sa","Di"];break;case"es":Months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];Weekdays=["Lu","Ma","Mi","Ju","Vi","Sa","Do"];break;case"it":Months=["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"];Weekdays=["Lu","Ma","Me","Gi","Ve","Sa","Do"];break;default:Months=["January","February","March","April","May","June","July","August","September","October","November","December"];Weekdays=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}cidCtrl=rGetById(a,"ci_day");cimCtrl=rGetById(a,"ci_month");codCtrl=rGetById(a,"co_day");comCtrl=rGetById(a,"co_month")}function InitCal(e,a,b){InitCtrl(document,e);if((typeof(a)=="undefined")||(typeof(b)=="undefined")){rSetMonths(cimCtrl,rToday[0],rToday[1]);rSetMonths(comCtrl,rTomorrow[0],rTomorrow[1],rToday[0],rToday[1]);rSetDays(cidCtrl,rToday[0],rToday[1],rToday[2],rToday[0],rToday[1]);rSetDays(codCtrl,rTomorrow[0],rTomorrow[1],rTomorrow[2])}else{cid=a.split("-");cod=b.split("-");rSetMonths(cimCtrl,rToday[0],rToday[1],cid[0],cid[1]-1);rSetMonths(comCtrl,rTomorrow[0],rTomorrow[1],cod[0],cod[1]-1);rSetDays(cidCtrl,cid[0],cid[1]-1,cid[2]);rSetDays(codCtrl,cod[0],cod[1]-1,cod[2])}}function escramble(h){var g,f,l,k,j;g='<a href="mai';f="booking";l='">';g+="lto:";f+="@";j="</a>";f+=h;k=f;document.write(g+f+l+k+j)}function escramble2(h){var g,f,l,k,j;g="mai";f="customer.service";l="";g+="lto:";f+="@";j="";f+=h;k=f;window.location=g+f+l+j}function RoomDetails(a){if(rGetById(document,"room_details_"+a).style.display=="none"){rGetById(document,"room_details_"+a).style.display="block"}else{rGetById(document,"room_details_"+a).style.display="none"}}function ChangeDates(a){rGetById(document,"check_avail_"+a).style.display="block";if(rGetById(document,"norooms_"+a)){rGetById(document,"norooms_"+a).style.display="none"}rGetById(document,"date_"+a).style.display="none";return true}function ValueValidate(){var h=rGetById(document,"destination").value;var j=cidCtrl.options[cidCtrl.selectedIndex].value;var g=cimCtrl.options[cimCtrl.selectedIndex].value.split("-");var e=codCtrl.options[codCtrl.selectedIndex].value;var b=comCtrl.options[comCtrl.selectedIndex].value.split("-");var a=((new Date(rToday[0],rToday[1],rToday[2]))>(new Date(g[0],g[1]-1,j)));var f=((new Date(g[0],g[1]-1,j))>=(new Date(b[0],b[1]-1,e)));if(h.length<3){rGetById(document,"error_destination").style.display="block";rGetById(document,"error_arrival_date").style.display="none";rGetById(document,"error_departure_date").style.display="none";return false}else{rGetById(document,"error_destination").style.display="none";if(a||f){rGetById(document,"error_arrival_date").style.display=a?"block":"none";rGetById(document,"error_departure_date").style.display=f?"block":"none";return false}return true}}function GetXY(e){var f=[0,0],b;while(e){b=e.tagName.toUpperCase();f[0]+=e.offsetLeft-(!KO3&&b=="DIV"&&e.scrollLeft?e.scrollLeft:0);f[1]+=e.offsetTop-(!KO3&&b=="DIV"&&e.scrollTop?e.scrollTop:0);if(b=="BODY"){break}e=e.offsetParent}return f}function hiddenLayer(a){rGetById(document,a).style.display="none"}function showLayer(a){rGetById(document,a).style.display="block"}function hiddenOptions(){showLayer("show_opt");hiddenLayer("options")}function showOptions(){showLayer("options");hiddenLayer("show_opt")}function hideAllThumbnails(a){if(document.getElementById){for(i=1;i<=a;i++){if(t=document.getElementById("thumbnails"+i)){t.style.display="none"}}}}function resizeThumbnailsNavigation(b,a){if(document.getElementById){if(n=document.getElementById("thumbnails_nav")){str="";for(i=1;i<=a;i++){if(i==b){str+=i+" "}else{str+='<a href="#" onclick="showThumbnails(\''+i+"', '"+a+"'); return false;\">"+i+"</a> "}}n.innerHTML=str}}}function showThumbnails(b,a){hideAllThumbnails(a);resizeThumbnailsNavigation(b,a);if(document.getElementById){if(t=document.getElementById("thumbnails"+b)){t.style.display=""}}}function showPhoto(e,g,f,b,j){if(document.getElementById){if((i=document.getElementById("bigpic"))&&(c=document.getElementById("capt"))){i.innerHTML='<img width="'+e+'" height="'+g+'" src="'+f+'" alt="'+b+'" />';c.innerHTML=j}}}
/*!
 * jQuery UI 1.8rc1
 *
 * Copyright (c) 2010 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(b){var a=b.browser.mozilla&&(parseFloat(b.browser.version)<1.9);b.ui={version:"1.8rc1",plugin:{add:function(f,g,j){var h=b.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(b(h).css("overflow")=="hidden"){return false}var e=(f&&f=="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(k,f,j,h,e,g){return b.ui.isOverAxis(k,j,e)&&b.ui.isOverAxis(f,h,g)},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}};b.fn.extend({_focus:b.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){b(g).focus();(f&&f.call(g))},e)}):this._focus.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 e;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?b(document):e},zIndex:function(f){if(f!==undefined){return this.css("zIndex",f)}var e=this[0];while(e&&e.style){if(e.style.zIndex!==""&&e.style.zIndex!==0){return +e.style.zIndex}e=e.parentNode}return 0}});b.extend(b.expr[":"],{data:function(g,f,e){return !!b.data(g,e[3])},focusable:function(f){var g=f.nodeName.toLowerCase(),e=b.attr(f,"tabindex");return(/input|select|textarea|button|object/.test(g)?!f.disabled:"a"==g||"area"==g?f.href||!isNaN(e):!isNaN(e))&&!b(f)["area"==g?"parents":"closest"](":hidden").length},tabbable:function(f){var e=b.attr(f,"tabindex");return(isNaN(e)||e>=0)&&b(f).is(":focusable")}})})(jQuery);
/*!
 * jQuery UI Widget 1.8rc1
 *
 * Copyright (c) 2010 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/Widget
 */
(function(b){var a=b.fn.remove;b.fn.remove=function(e,f){if(!f){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}return a.apply(this,arguments)};b.widget=function(f,h,e){var g=f.split(".")[0],k;f=f.split(".")[1];k=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][k]=function(l){return !!b.data(l,f)};b[g]=b[g]||{};b[g][f]=function(l,m){if(arguments.length){this._createWidget(l,m)}};var j=new h();j.options=b.extend({},j.options);b[g][f].prototype=b.extend(true,j,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:k},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(j){var g=typeof j==="string",h=Array.prototype.slice.call(arguments,1),k=this;j=!g&&h.length?b.extend.apply(null,[true,j].concat(h)):j;if(g&&j.substring(0,1)==="_"){return k}if(g){this.each(function(){var l=b.data(this,f),m=l&&b.isFunction(l[j])?l[j].apply(l,h):l;if(m!==l&&m!==undefined){k=m;return false}})}else{this.each(function(){var l=b.data(this,f);if(l){if(j){l.option(j)}l._init()}else{b.data(this,f,new e(j,this))}})}return k}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){this.element=b(g).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(g)[this.widgetName],f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(g,h){var f=g,e=this;if(arguments.length===0){return b.extend({},e.options)}if(typeof g==="string"){if(h===undefined){return this.options[g]}f={};f[g]=h}b.each(f,function(j,k){e._setOption(j,k)});return e},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(f,g,h){var k=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();h=h||{};if(g.originalEvent){for(var e=b.event.props.length,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(b.isFunction(k)&&k.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);(function(h){h.ui=h.ui||{};var e=/left|center|right/,g="center",f=/top|center|bottom/,j="center",a=h.fn.position;h.fn.position=function(l){if(!l||!l.of){return a.apply(this,arguments)}l=h.extend({},l);var p=h(l.of),r=(l.collision||"flip").split(" "),q=l.offset?l.offset.split(" "):[0,0],o,k,m;if(l.of.nodeType===9){o=p.width();k=p.height();m={top:0,left:0}}else{if(l.of.scrollTo&&l.of.document){o=p.width();k=p.height();m={top:p.scrollTop(),left:p.scrollLeft()}}else{if(l.of.preventDefault){l.at="left top";o=k=0;m={top:l.of.pageY,left:l.of.pageX}}else{o=p.outerWidth();k=p.outerHeight();m=p.offset()}}}h.each(["my","at"],function(){var s=(l[this]||"").split(" ");s=s.length==1?e.test(s[0])?s.concat([j]):f.test(s[0])?[g].concat(s):[g,j]:s;s[0]=e.test(s[0])?s[0]:g;s[1]=f.test(s[1])?s[1]:j;l[this]=s});if(r.length==1){r[1]=r[0]}q[0]=parseInt(q[0],10)||0;if(q.length==1){q[1]=q[0]}q[1]=parseInt(q[1],10)||0;switch(l.at[0]){case"right":m.left+=o;break;case g:m.left+=o/2;break}switch(l.at[1]){case"bottom":m.top+=k;break;case j:m.top+=k/2;break}m.left+=q[0];m.top+=q[1];return this.each(function(){var y=h(this),x=y.outerWidth(),w=y.outerHeight(),u=h.extend({},m),z,s,v;switch(l.my[0]){case"right":u.left-=x;break;case g:u.left-=x/2;break}switch(l.my[1]){case"bottom":u.top-=w;break;case j:u.top-=w/2;break}h.each(["left","top"],function(B,A){(h.ui.position[r[B]]&&h.ui.position[r[B]][A](u,{targetWidth:o,targetHeight:k,elemWidth:x,elemHeight:w,offset:q,my:l.my,at:l.at}))});(h.fn.bgiframe&&y.bgiframe());y.offset(h.extend(u,{using:l.using}))})};h.ui.position={fit:{left:function(k,l){var m=k.left+l.elemWidth-h(window).width()-h(window).scrollLeft();k.left=m>0?k.left-m:Math.max(0,k.left)},top:function(k,l){var m=k.top+l.elemHeight-h(window).height()-h(window).scrollTop();k.top=m>0?k.top-m:Math.max(0,k.top)}},flip:{left:function(l,m){if(m.at[0]=="center"){return}var o=l.left+m.elemWidth-h(window).width()-h(window).scrollLeft(),k=m.my[0]=="left"?-m.elemWidth:m.my[0]=="right"?m.elemWidth:0,p=-2*m.offset[0];l.left+=l.left<0?k+m.targetWidth+p:o>0?k-m.targetWidth+p:0},top:function(l,o){if(o.at[1]=="center"){return}var p=l.top+o.elemHeight-h(window).height()-h(window).scrollTop(),k=o.my[1]=="top"?-o.elemHeight:o.my[1]=="bottom"?o.elemHeight:0,m=o.at[1]=="top"?o.targetHeight:-o.targetHeight,q=-2*o.offset[1];l.top+=l.top<0?k+o.targetHeight+q:p>0?k+m+q:0}}};if(!h.offset.setOffset){h.offset.setOffset=function(p,l){if(/static/.test(jQuery.curCSS(p,"position"))){p.style.position="relative"}var o=jQuery(p),r=o.offset(),k=parseInt(jQuery.curCSS(p,"top",true),10)||0,q=parseInt(jQuery.curCSS(p,"left",true),10)||0,m={top:(l.top-r.top)+k,left:(l.left-r.left)+q};if("using" in l){l.using.call(p,m)}else{o.css(m)}};var b=h.fn.offset;h.fn.offset=function(k){var l=this[0];if(!l||!l.ownerDocument){return null}if(k){return this.each(function(){h.offset.setOffset(this,k)})}return b.call(this)}}})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.8rc1"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"_default",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};$.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)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst)},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}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()}var date=this._getDateDatepicker(target,true);extendRemove(inst.settings,settings);this._attachments($(target),inst);this._autoSize(inst);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){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass,inst.dpDiv).add($("td."+$.datepicker._currentClass,inst.dpDiv));if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()}).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==$.datepicker._curInst&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")){$(inst.input[0]).focus()}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}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}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._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;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[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);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;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 size=(match=="@"?14:(match=="!"?20:(match=="y"?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length)==names[i]){iValue+=names[i].length;return i+1}}throw"Unknown name at position "+iValue};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",(date.getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){var dateFormat=this._get(inst,"dateFormat");inst.lastVal=inst.input?inst.input.val():null;var dates=inst.lastVal;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date):(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,noChange){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._restrictMinMax(inst,this._determineDate(inst,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)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var 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=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".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 thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function 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"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8rc1";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(b){var a="ui-dialog ui-widget ui-widget-content ui-corner-all ";b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");var o=this,p=o.options,l=p.title||o.originalTitle||"&#160;",f=b.ui.dialog.getTitleId(o.element),m=(o.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass(a+p.dialogClass).css({zIndex:p.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(q){(p.closeOnEscape&&q.keyCode&&q.keyCode==b.ui.keyCode.ESCAPE&&o.close(q))}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(q){o.moveToTop(false,q)}),h=o.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(m),g=(o.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(m),k=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){k.addClass("ui-state-hover")},function(){k.removeClass("ui-state-hover")}).focus(function(){k.addClass("ui-state-focus")}).blur(function(){k.removeClass("ui-state-focus")}).mousedown(function(q){q.stopPropagation()}).click(function(q){o.close(q);return false}).appendTo(g),j=(o.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(p.closeText).appendTo(k),e=b("<span></span>").addClass("ui-dialog-title").attr("id",f).html(l).prependTo(g);if(b.isFunction(p.beforeclose)&&!b.isFunction(p.beforeClose)){p.beforeClose=p.beforeclose}g.find("*").add(g).disableSelection();(p.draggable&&b.fn.draggable&&o._makeDraggable());(p.resizable&&b.fn.resizable&&o._makeResizable());o._createButtons(p.buttons);o._isOpen=false;(b.fn.bgiframe&&m.bgiframe())},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var e=this;(e.overlay&&e.overlay.destroy());e.uiDialog.hide();e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");e.uiDialog.remove();(e.originalTitle&&e.element.attr("title",e.originalTitle));return e},widget:function(){return this.uiDialog},close:function(g){var e=this;if(false===e._trigger("beforeClose",g)){return}(e.overlay&&e.overlay.destroy());e.uiDialog.unbind("keypress.ui-dialog");(e.options.hide?e.uiDialog.hide(e.options.hide,function(){e._trigger("close",g)}):e.uiDialog.hide()&&e._trigger("close",g));b.ui.dialog.overlay.resize();e._isOpen=false;if(e.options.modal){var f=0;b(".ui-dialog").each(function(){if(this!=e.uiDialog[0]){f=Math.max(f,b(this).css("z-index"))}});b.ui.dialog.maxZ=f}return e},isOpen:function(){return this._isOpen},moveToTop:function(j,h){var e=this,g=e.options;if((g.modal&&!j)||(!g.stack&&!g.modal)){return e._trigger("focus",h)}if(g.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=g.zIndex}(e.overlay&&e.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=++b.ui.dialog.maxZ));var f={scrollTop:e.element.attr("scrollTop"),scrollLeft:e.element.attr("scrollLeft")};e.uiDialog.css("z-index",++b.ui.dialog.maxZ);e.element.attr(f);e._trigger("focus",h);return e},open:function(){if(this._isOpen){return}var f=this,g=f.options,e=f.uiDialog;f.overlay=g.modal?new b.ui.dialog.overlay(f):null;(e.next().length&&e.appendTo("body"));f._size();f._position(g.position);e.show(g.show);f.moveToTop(true);(g.modal&&e.bind("keypress.ui-dialog",function(k){if(k.keyCode!=b.ui.keyCode.TAB){return}var j=b(":tabbable",this),l=j.filter(":first"),h=j.filter(":last");if(k.target==h[0]&&!k.shiftKey){l.focus(1);return false}else{if(k.target==l[0]&&k.shiftKey){h.focus(1);return false}}}));b([]).add(e.find(".ui-dialog-content :tabbable:first")).add(e.find(".ui-dialog-buttonpane :tabbable:first")).add(e).filter(":first").focus();f._trigger("open");f._isOpen=true;return f},_createButtons:function(h){var g=this,e=false,f=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");g.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof h=="object"&&h!==null&&b.each(h,function(){return !(e=true)}));if(e){b.each(h,function(j,l){var k=b('<button type="button"></button>').text(j).click(function(){l.apply(g.element[0],arguments)}).appendTo(f);(b.fn.button&&k.button())});f.appendTo(g.uiDialog)}},_makeDraggable:function(){var e=this,g=e.options,h=b(document),f;e.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(j){f=g.height;b(this).height(b(this).height()).addClass("ui-dialog-dragging");e._trigger("dragStart",j)},drag:function(j){e._trigger("drag",j)},stop:function(j,k){g.position=[k.position.left-h.scrollLeft(),k.position.top-h.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(f);e._trigger("dragStop",j);b.ui.dialog.overlay.resize()}})},_makeResizable:function(j){j=(j===undefined?this.options.resizable:j);var f=this,h=f.options,e=f.uiDialog.css("position"),g=typeof j=="string"?j:"n,e,s,w,se,sw,ne,nw";f.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:f.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:f._minHeight(),handles:g,start:function(k){b(this).addClass("ui-dialog-resizing");f._trigger("resizeStart",k)},resize:function(k){f._trigger("resize",k)},stop:function(k){b(this).removeClass("ui-dialog-resizing");h.height=b(this).height();h.width=b(this).width();f._trigger("resizeStop",k);b.ui.dialog.overlay.resize()}}).css("position",e).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return(e.height=="auto"?e.minHeight:Math.min(e.minHeight,e.height))},_position:function(f){var g=[],h=[0,0];f=f||b.ui.dialog.prototype.options.position;if(typeof f=="string"||(typeof f=="object"&&"0" in f)){g=f.split?f.split(" "):[f[0],f[1]];if(g.length==1){g[1]=g[0]}b.each(["left","top"],function(k,j){if(+g[k]==g[k]){h[k]=g[k];g[k]=j}})}else{if(typeof f=="object"){if("left" in f){g[0]="left";h[0]=f.left}else{if("right" in f){g[0]="right";h[0]=-f.right}}if("top" in f){g[1]="top";h[1]=f.top}else{if("bottom" in f){g[1]="bottom";h[1]=-f.bottom}}}}var e=this.uiDialog.is(":visible");if(!e){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position({my:g.join(" "),at:g.join(" "),offset:h.join(" "),of:window,collision:"fit"});if(!e){this.uiDialog.hide()}},_setOption:function(h,j){var f=this,e=f.uiDialog,k=e.is(":data(resizable)"),g=false;switch(h){case"beforeclose":h="beforeClose";break;case"buttons":f._createButtons(j);break;case"closeText":f.uiDialogTitlebarCloseText.text(""+j);break;case"dialogClass":e.removeClass(f.options.dialogClass).addClass(a+j);break;case"disabled":(j?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled"));break;case"draggable":(j?f._makeDraggable():e.draggable("destroy"));break;case"height":g=true;break;case"maxHeight":(k&&e.resizable("option","maxHeight",j));g=true;break;case"maxWidth":(k&&e.resizable("option","maxWidth",j));g=true;break;case"minHeight":(k&&e.resizable("option","minHeight",j));g=true;break;case"minWidth":(k&&e.resizable("option","minWidth",j));g=true;break;case"position":f._position(j);break;case"resizable":(k&&!j&&e.resizable("destroy"));(k&&typeof j=="string"&&e.resizable("option","handles",j));(k||(j!==false&&f._makeResizable(j)));break;case"title":b(".ui-dialog-title",f.uiDialogTitlebar).html(""+(j||"&#160;"));break;case"width":g=true;break}b.Widget.prototype._setOption.apply(f,arguments);(g&&f._size())},_size:function(){var f=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var e=this.uiDialog.css({height:"auto",width:f.width}).height();this.element.css(f.height=="auto"?{minHeight:Math.max(f.minHeight-e,0),height:"auto"}:{height:Math.max(f.height-e,0)});(this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight()))}});b.extend(b.ui.dialog,{version:"1.8rc1",uuid:0,maxZ:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,{instances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(f){if(this.instances.length===0){setTimeout(function(){if(b.ui.dialog.overlay.instances.length){b(document).bind(b.ui.dialog.overlay.events,function(g){var h=b(g.target).parents(".ui-dialog").css("zIndex")||0;return(h>b.ui.dialog.overlay.maxZ)})}},1);b(document).bind("keydown.dialog-overlay",function(g){(f.options.closeOnEscape&&g.keyCode&&g.keyCode==b.ui.keyCode.ESCAPE&&f.close(g))});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var e=b("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(b.fn.bgiframe&&e.bgiframe());this.instances.push(e);return e},destroy:function(e){this.instances.splice(b.inArray(this.instances,e),1);if(this.instances.length===0){b([document,window]).unbind(".dialog-overlay")}e.remove();var f=0;b.each(this.instances,function(){f=Math.max(f,this.css("z-index"))});this.maxZ=f},height:function(){if(b.browser.msie&&b.browser.version<7){var f=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var e=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(f<e){return b(window).height()+"px"}else{return f+"px"}}else{return b(document).height()+"px"}},width:function(){if(b.browser.msie&&b.browser.version<7){var e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var f=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(e<f){return b(window).width()+"px"}else{return e+"px"}}else{return b(document).width()+"px"}},resize:function(){var e=b([]);b.each(b.ui.dialog.overlay.instances,function(){e=e.add(this)});e.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
/*!
 * jQuery UI Mouse 1.8rc1
 *
 * Copyright (c) 2010 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/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(e){return b._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(b._preventClickEvent){b._preventClickEvent=false;e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){f.originalEvent=f.originalEvent||{};if(f.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),b=(typeof this.options.cancel=="string"?a(f.target).parents().add(f.target).filter(this.options.cancel).length:false);if(!g||b||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(a.browser.safari||f.preventDefault());f.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,b)!==false);(this._mouseStarted?this._mouseDrag(b):this._mouseUp(b))}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(b.target==this._mouseDownEvent.target);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return(Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance)},_mouseDelayMet:function(b){return this.mouseDelayMet},_mouseStart:function(b){},_mouseDrag:function(b){},_mouseStop:function(b){},_mouseCapture:function(b){return true}})})(jQuery);(function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var e=this,f=this.options;this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(f.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(f.range){if(f.range===true){this.range=b("<div></div>");if(!f.values){f.values=[this._valueMin(),this._valueMin()]}if(f.values.length&&f.values.length!=2){f.values=[f.values[0],f.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(f.range=="min"||f.range=="max"){this.range.addClass("ui-slider-range-"+f.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(f.values&&f.values.length){while(b(".ui-slider-handle",this.element).length<f.values.length){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){if(!f.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!f.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(g){b(this).data("index.ui-slider-handle",g)});this.handles.keydown(function(m){var j=true;var h=b(this).data("index.ui-slider-handle");if(e.options.disabled){return}switch(m.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:j=false;if(!e._keySliding){e._keySliding=true;b(this).addClass("ui-state-active");e._start(m,h)}break}var k,g,l=e._step();if(e.options.values&&e.options.values.length){k=g=e.values(h)}else{k=g=e.value()}switch(m.keyCode){case b.ui.keyCode.HOME:g=e._valueMin();break;case b.ui.keyCode.END:g=e._valueMax();break;case b.ui.keyCode.PAGE_UP:g=k+((e._valueMax()-e._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:g=k-((e._valueMax()-e._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(k==e._valueMax()){return}g=k+l;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(k==e._valueMin()){return}g=k-l;break}e._slide(m,h,g);return j}).keyup(function(h){var g=b(this).data("index.ui-slider-handle");if(e._keySliding){e._stop(h,g);e._change(h,g);e._keySliding=false;b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(g){var h=this.options;if(h.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var l={x:g.pageX,y:g.pageY};var p=this._normValueFromMouse(l);var f=this._valueMax()-this._valueMin()+1,j;var q=this,m;this.handles.each(function(o){var r=Math.abs(p-q.values(o));if(f>r){f=r;j=b(this);m=o}});if(h.range==true&&this.values(1)==h.min){j=b(this.handles[++m])}this._start(g,m);q._handleIndex=m;j.addClass("ui-state-active").focus();var k=j.offset();var e=!b(g.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=e?{left:0,top:0}:{left:g.pageX-k.left-(j.width()/2),top:g.pageY-k.top-(j.height()/2)-(parseInt(j.css("borderTopWidth"),10)||0)-(parseInt(j.css("borderBottomWidth"),10)||0)+(parseInt(j.css("marginTop"),10)||0)};p=this._normValueFromMouse(l);this._slide(g,m,p);this._animateOff=true;return true},_mouseStart:function(e){return true},_mouseDrag:function(g){var e={x:g.pageX,y:g.pageY};var f=this._normValueFromMouse(e);this._slide(g,this._handleIndex,f);return false},_mouseStop:function(e){this.handles.removeClass("ui-state-active");this._stop(e,this._handleIndex);this._change(e,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(g){var f,l;if("horizontal"==this.orientation){f=this.elementSize.width;l=g.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;l=g.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var j=(l/f);if(j>1){j=1}if(j<0){j=0}if("vertical"==this.orientation){j=1-j}var h=this._valueMax()-this._valueMin(),m=j*h,e=m%this.options.step,k=this._valueMin()+m-e;if(e>(this.options.step/2)){k+=this.options.step}return parseFloat(k.toFixed(5))},_start:function(g,f){var e={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(f);e.values=this.values()}this._trigger("start",g,e)},_slide:function(j,h,g){var k=this.handles[h];if(this.options.values&&this.options.values.length){var e=this.values(h?0:1);if((this.options.values.length==2&&this.options.range===true)&&((h==0&&g>e)||(h==1&&g<e))){g=e}if(g!=this.values(h)){var f=this.values();f[h]=g;var l=this._trigger("slide",j,{handle:this.handles[h],value:g,values:f});var e=this.values(h?0:1);if(l!==false){this.values(h,g,true)}}}else{if(g!=this.value()){var l=this._trigger("slide",j,{handle:this.handles[h],value:g});if(l!==false){this.value(g)}}}},_stop:function(g,f){var e={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(f);e.values=this.values()}this._trigger("stop",g,e)},_change:function(g,f){var e={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(f);e.values=this.values()}this._trigger("change",g,e)},value:function(e){if(arguments.length){this.options.value=this._trimValue(e);this._refreshValue();this._change(null,0)}return this._value()},values:function(g,k){if(arguments.length>1){this.options.values[g]=this._trimValue(k);this._refreshValue();this._change(null,g)}if(arguments.length){if(b.isArray(arguments[0])){var j=this.options.values,f=arguments[0];for(var h=0,e=j.length;h<e;h++){j[h]=this._trimValue(f[h]);this._change(null,h)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(g)}else{return this.value()}}}else{return this._values()}},_setOption:function(e,f){b.Widget.prototype._setOption.apply(this,arguments);switch(e){case"disabled":if(f){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();this._animateOff=false;break}},_step:function(){var e=this.options.step;return e},_value:function(){var e=this.options.value;e=this._trimValue(e);return e},_values:function(f){if(arguments.length){var j=this.options.values[f];j=this._trimValue(j);return j}else{var h=this.options.values.slice();for(var g=0,e=h.length;g<e;g++){h[g]=this._trimValue(h[g])}return h}},_trimValue:function(e){if(e<this._valueMin()){e=this._valueMin()}if(e>this._valueMax()){e=this._valueMax()}return e},_valueMin:function(){var e=this.options.min;return e},_valueMax:function(){var e=this.options.max;return e},_refreshValue:function(){var j=this.options.range,g=this.options,r=this;var f=(!this._animateOff)?g.animate:false;if(this.options.values&&this.options.values.length){var m,l;this.handles.each(function(v,s){var u=(r.values(v)-r._valueMin())/(r._valueMax()-r._valueMin())*100;var o={};o[r.orientation=="horizontal"?"left":"bottom"]=u+"%";b(this).stop(1,1)[f?"animate":"css"](o,g.animate);if(r.options.range===true){if(r.orientation=="horizontal"){(v==0)&&r.range.stop(1,1)[f?"animate":"css"]({left:u+"%"},g.animate);(v==1)&&r.range[f?"animate":"css"]({width:(u-lastValPercent)+"%"},{queue:false,duration:g.animate})}else{(v==0)&&r.range.stop(1,1)[f?"animate":"css"]({bottom:(u)+"%"},g.animate);(v==1)&&r.range[f?"animate":"css"]({height:(u-lastValPercent)+"%"},{queue:false,duration:g.animate})}}lastValPercent=u})}else{var p=this.value(),k=this._valueMin(),q=this._valueMax(),h=q!=k?(p-k)/(q-k)*100:0;var e={};e[r.orientation=="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[f?"animate":"css"](e,g.animate);(j=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[f?"animate":"css"]({width:h+"%"},g.animate);(j=="max")&&(this.orientation=="horizontal")&&this.range[f?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:g.animate});(j=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[f?"animate":"css"]({height:h+"%"},g.animate);(j=="max")&&(this.orientation=="vertical")&&this.range[f?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:g.animate})}}});b.extend(b.ui.slider,{version:"1.8rc1",eventPrefix:"slide"})})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var e=a.data(this[0],"validator");if(e){return e}e=new a.validator(b,this[0]);a.data(this[0],"validator",e);if(e.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){e.cancelSubmit=true});if(e.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){e.submitButton=this})}this.submit(function(f){if(e.settings.debug){f.preventDefault()}function g(){if(e.settings.submitHandler){if(e.submitButton){var h=a("<input type='hidden'/>").attr("name",e.submitButton.name).val(e.submitButton.value).appendTo(e.currentForm)}e.settings.submitHandler.call(e,e.currentForm);if(e.submitButton){h.remove()}return false}return true}if(e.cancelSubmit){e.cancelSubmit=false;return g()}if(e.form()){if(e.pendingRequest){e.formSubmitted=true;return false}return g()}else{e.focusInvalid();return false}})}return e},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var e=true;var b=a(this[0].form).validate();this.each(function(){e&=b.element(this)});return e}},removeAttrs:function(f){var b={},e=this;a.each(f.split(/\s/),function(g,h){b[h]=e.attr(h);e.removeAttr(h)});return b},rules:function(g,b){var j=this[0];if(g){var f=a.data(j.form,"validator").settings;var l=f.rules;var m=a.validator.staticRules(j);switch(g){case"add":a.extend(m,a.validator.normalizeRule(b));l[j.name]=m;if(b.messages){f.messages[j.name]=a.extend(f.messages[j.name],b.messages)}break;case"remove":if(!b){delete l[j.name];return m}var k={};a.each(b.split(/\s/),function(o,p){k[p]=m[p];delete m[p]});return k}}var h=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(j),a.validator.classRules(j),a.validator.attributeRules(j),a.validator.staticRules(j)),j);if(h.required){var e=h.required;delete h.required;h=a.extend({required:e},h)}return h}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(b.value)},filled:function(b){return !!a.trim(b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,e){this.settings=a.extend({},a.validator.defaults,b);this.currentForm=e;this.init()};a.validator.format=function(b,e){if(arguments.length==1){return function(){var f=a.makeArray(arguments);f.unshift(b);return a.validator.format.apply(this,f)}}if(arguments.length>2&&e.constructor!=Array){e=a.makeArray(arguments).slice(1)}if(e.constructor!=Array){e=[e]}a.each(e,function(f,g){b=b.replace(new RegExp("\\{"+f+"\\}","g"),g)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}},highlight:function(f,b,e){a(f).addClass(b).removeClass(e)},unhighlight:function(f,b,e){a(f).removeClass(b).addClass(e)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(g,h){a.each(h.split(/\s/),function(k,j){b[j]=g})});var f=this.settings.rules;a.each(f,function(g,h){f[g]=a.validator.normalizeRule(h)});function e(h){var g=a.data(this[0].form,"validator");g.settings["on"+h.type]&&g.settings["on"+h.type].call(g,this[0])}a(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",e).delegate("click",":radio, :checkbox",e);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,e=(this.currentElements=this.elements());e[b];b++){this.check(e[b])}return this.valid()},element:function(e){e=this.clean(e);this.lastElement=e;this.prepareElement(e);this.currentElements=a(e);var b=this.check(e);if(b){delete this.invalid[e.name]}else{this.invalid[e.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(e){if(e){a.extend(this.errorMap,e);this.errorList=[];for(var b in e){this.errorList.push({message:e[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(f){return !(f.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(f){var e=0;for(var b in f){e++}return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(e){return e.element.name==b.name}).length==1&&b},elements:function(){var e=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!e.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.formSubmitted=false;this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(f){f=this.clean(f);if(this.checkable(f)){f=this.findByName(f.name)[0]}var k=a(f).rules();var g=false;for(method in k){var j={method:method,parameters:k[method]};try{var b=a.validator.methods[method].call(this,f.value.replace(/\r/g,""),f,j.parameters);if(b=="dependency-mismatch"){g=true;continue}g=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(f));return}if(!b){this.formatAndAdd(f,j);return false}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+f.id+", check the '"+j.method+"' method");throw h}}if(g){return}if(this.objectLength(k)){this.successList.push(f)}return true},customMetaMessage:function(b,f){if(!a.metadata){return}var e=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return e&&e.messages&&e.messages[f]},customMessage:function(e,f){var b=this.settings.messages[e];return b&&(b.constructor==String?b:b[f])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,e){return this.findDefined(this.customMessage(b.name,e),this.customMetaMessage(b,e),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[e],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,f){var e=this.defaultMessage(b,f.method);if(typeof e=="function"){e=e.call(this,f.parameters,b)}this.errorList.push({message:e,element:b});this.errorMap[b.name]=e;this.submitted[b.name]=e},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var e=0;this.errorList[e];e++){var b=this.errorList[e];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var e=0;this.successList[e];e++){this.showLabel(this.successList[e])}}if(this.settings.unhighlight){for(var e=0,f=this.validElements();f[e];e++){this.settings.unhighlight.call(this,f[e],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(e,f){var b=this.errorsFor(e);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(f)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(e),generated:true}).addClass(this.settings.errorClass).html(f||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(e)):b.insertAfter(e)}}if(!f&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(b){return this.errors().filter("[for='"+this.idOrName(b)+"']")},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var e=this.currentForm;return a(document.getElementsByName(b)).map(function(f,g){return g.form==e&&g.name==b&&g||null})},getLength:function(e,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return e.length},depend:function(e,b){return this.dependTypes[typeof e]?this.dependTypes[typeof e](e,b):true},dependTypes:{"boolean":function(e,b){return e},string:function(e,b){return !!a(e,b.form).length},"function":function(e,b){return e(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,e){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(e&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit()}else{if(!e&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,e){b.constructor==String?this.classRuleSettings[b]=e:a.extend(this.classRuleSettings,b)},classRules:function(e){var f={};var b=a(e).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(f,a.validator.classRuleSettings[this])}});return f},attributeRules:function(e){var g={};var b=a(e);for(method in a.validator.methods){var f=b.attr(method);if(f){g[method]=f}}if(g.maxlength&&/-1|2147483647|524288/.test(g.maxlength)){delete g.maxlength}return g},metadataRules:function(b){if(!a.metadata){return{}}var e=a.data(b.form,"validator").settings.meta;return e?a(b).metadata()[e]:a(b).metadata()},staticRules:function(e){var f={};var b=a.data(e.form,"validator");if(b.settings.rules){f=a.validator.normalizeRule(b.settings.rules[e.name])||{}}return f},normalizeRules:function(e,b){a.each(e,function(h,g){if(g===false){delete e[h];return}if(g.param||g.depends){var f=true;switch(typeof g.depends){case"string":f=!!a(g.depends,b.form).length;break;case"function":f=g.depends.call(b,b);break}if(f){e[h]=g.param!==undefined?g.param:true}else{delete e[h]}}});a.each(e,function(f,g){e[f]=a.isFunction(g)?g(b):g});a.each(["minlength","maxlength","min","max"],function(){if(e[this]){e[this]=Number(e[this])}});a.each(["rangelength","range"],function(){if(e[this]){e[this]=[Number(e[this][0]),Number(e[this][1])]}});if(a.validator.autoCreateRanges){if(e.min&&e.max){e.range=[e.min,e.max];delete e.min;delete e.max}if(e.minlength&&e.maxlength){e.rangelength=[e.minlength,e.maxlength];delete e.minlength;delete e.maxlength}}if(e.messages){delete e.messages}return e},normalizeRule:function(e){if(typeof e=="string"){var b={};a.each(e.split(/\s/),function(){b[this]=true});e=b}return e},addMethod:function(b,f,e){a.validator.methods[b]=f;a.validator.messages[b]=e||a.validator.messages[b];if(f.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(f,e,g){if(!this.depend(g,e)){return"dependency-mismatch"}switch(e.nodeName.toLowerCase()){case"select":var b=a("option:selected",e);return b.length>0&&(e.type=="select-multiple"||(a.browser.msie&&!(b[0].attributes.value.specified)?b[0].text:b[0].value).length>0);case"input":if(this.checkable(e)){return this.getLength(f,e)>0}default:return a.trim(f).length>0}},remote:function(h,e,j){if(this.optional(e)){return"dependency-mismatch"}var f=this.previousValue(e);if(!this.settings.messages[e.name]){this.settings.messages[e.name]={}}this.settings.messages[e.name].remote=typeof f.message=="function"?f.message(h):f.message;j=typeof j=="string"&&{url:j}||j;if(f.old!==h){f.old=h;var b=this;this.startRequest(e);var g={};g[e.name]=h;a.ajax(a.extend(true,{url:j,mode:"abort",port:"validate"+e.name,dataType:"json",data:g,success:function(l){var m=l===true;if(m){var k=b.formSubmitted;b.prepareElement(e);b.formSubmitted=k;b.successList.push(e);b.showErrors()}else{var o={};o[e.name]=f.message=l||b.defaultMessage(e,"remote");b.showErrors(o)}f.valid=m;b.stopRequest(e,m)}},j));return"pending"}else{if(this.pending[e.name]){return"pending"}}return f.valid},minlength:function(e,b,f){return this.optional(b)||this.getLength(a.trim(e),b)>=f},maxlength:function(e,b,f){return this.optional(b)||this.getLength(a.trim(e),b)<=f},rangelength:function(f,b,g){var e=this.getLength(a.trim(f),b);return this.optional(b)||(e>=g[0]&&e<=g[1])},min:function(e,b,f){return this.optional(b)||e>=f},max:function(e,b,f){return this.optional(b)||e<=f},range:function(e,b,f){return this.optional(b)||(e>=f[0]&&e<=f[1])},email:function(e,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e)},url:function(e,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},date:function(e,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(e))},dateISO:function(e,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(e)},dateDE:function(e,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(e)},number:function(e,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(e)},numberDE:function(e,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(e)},digits:function(e,b){return this.optional(b)||/^\d+$/.test(e)},creditcard:function(h,e){if(this.optional(e)){return"dependency-mismatch"}if(/[^0-9-]+/.test(h)){return false}var j=0,g=0,b=false;h=h.replace(/\D/g,"");for(n=h.length-1;n>=0;n--){var f=h.charAt(n);var g=parseInt(f,10);if(b){if((g*=2)>9){g-=9}}j+=g;b=!b}return(j%10)==0},accept:function(e,b,f){f=typeof f=="string"?f.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||e.match(new RegExp(".("+f+")$","i"))},equalTo:function(e,b,f){return e==a(f).val()}}});a.format=a.validator.format})(jQuery);(function(e){var b=e.ajax;var a={};e.ajax=function(g){g=e.extend(g,e.extend({},e.ajaxSettings,g));var f=g.port;if(g.mode=="abort"){if(a[f]){a[f].abort()}return(a[f]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(e,b){a.event.special[b]={setup:function(){if(a.browser.msie){return false}this.addEventListener(e,a.event.special[b].handler,true)},teardown:function(){if(a.browser.msie){return false}this.removeEventListener(e,a.event.special[b].handler,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(f,e,b){return this.bind(f,function(g){var h=a(g.target);if(h.is(e)){return b.apply(h,arguments)}})},triggerEvent:function(b,e){return this.triggerHandler(b,[a.event.fix({type:b,target:e})])}})})(jQuery);(function(a){a.fn.lightBox=function(u){u=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"http://s.bookcdn.com/images/lightbox-ico-loading.gif",imageBtnPrev:"http://s.bookcdn.com/images/lightbox-btn-prev.gif",imageBtnNext:"http://s.bookcdn.com/images/lightbox-btn-next.gif",imageBtnClose:"http://s.bookcdn.com/images/lightbox-btn-close.gif",imageBlank:"http://s.bookcdn.com/images/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},u);var l=this;function w(){s(this,l);return false}function s(A,z){a("embed, object, select").css({visibility:"hidden"});e();u.imageArray.length=0;u.activeImage=0;if(z.length==1){u.imageArray.push(new Array(A.getAttribute("href"),A.getAttribute("title")))}else{for(var y=0;y<z.length;y++){u.imageArray.push(new Array(z[y].getAttribute("href"),z[y].getAttribute("title")))}}while(u.imageArray[u.activeImage][0]!=A.getAttribute("href")){u.activeImage++}p()}function e(){a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+u.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+u.imageBtnClose+'"></a></div></div></div></div>');var y=h();a("#jquery-overlay").css({backgroundColor:u.overlayBgColor,opacity:u.overlayOpacity,width:y[0],height:y[1]}).fadeIn();var z=k();a("#jquery-lightbox").css({top:z[1]+(y[3]/10),left:z[0]}).show();a("#jquery-overlay,#jquery-lightbox").click(function(){b()});a("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){b();return false});a(window).resize(function(){var A=h();a("#jquery-overlay").css({width:A[0],height:A[1]});var B=k();a("#jquery-lightbox").css({top:B[1]+(A[3]/10),left:B[0]})})}function p(){a("#lightbox-loading").show();if(u.fixedNavigation){a("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}else{a("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}var y=new Image();y.onload=function(){a("#lightbox-image").attr("src",u.imageArray[u.activeImage][0]);m(y.width,y.height);y.onload=function(){}};y.src=u.imageArray[u.activeImage][0]}function m(B,E){var y=a("#lightbox-container-image-box").width();var D=a("#lightbox-container-image-box").height();var C=(B+(u.containerBorderSize*2));var A=(E+(u.containerBorderSize*2));var z=y-C;var F=D-A;a("#lightbox-container-image-box").animate({width:C,height:A},u.containerResizeSpeed,function(){j()});if((z==0)&&(F==0)){if(a.browser.msie){r(250)}else{r(100)}}a("#lightbox-container-image-data-box").css({width:B});a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:E+(u.containerBorderSize*2)})}function j(){a("#lightbox-loading").hide();a("#lightbox-image").fadeIn(function(){o();x()});v()}function o(){a("#lightbox-container-image-data-box").slideDown("fast");a("#lightbox-image-details-caption").hide();if(u.imageArray[u.activeImage][1]){a("#lightbox-image-details-caption").html(u.imageArray[u.activeImage][1]).show()}if(u.imageArray.length>1){a("#lightbox-image-details-currentNumber").html(u.txtImage+" "+(u.activeImage+1)+" "+u.txtOf+" "+u.imageArray.length).show()}}function x(){a("#lightbox-nav").show();a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+u.imageBlank+") no-repeat"});if(u.activeImage!=0){if(u.fixedNavigation){a("#lightbox-nav-btnPrev").css({background:"url("+u.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){u.activeImage=u.activeImage-1;p();return false})}else{a("#lightbox-nav-btnPrev").unbind().hover(function(){a(this).css({background:"url("+u.imageBtnPrev+") left 15% no-repeat"})},function(){a(this).css({background:"transparent url("+u.imageBlank+") no-repeat"})}).show().bind("click",function(){u.activeImage=u.activeImage-1;p();return false})}}if(u.activeImage!=(u.imageArray.length-1)){if(u.fixedNavigation){a("#lightbox-nav-btnNext").css({background:"url("+u.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){u.activeImage=u.activeImage+1;p();return false})}else{a("#lightbox-nav-btnNext").unbind().hover(function(){a(this).css({background:"url("+u.imageBtnNext+") right 15% no-repeat"})},function(){a(this).css({background:"transparent url("+u.imageBlank+") no-repeat"})}).show().bind("click",function(){u.activeImage=u.activeImage+1;p();return false})}}q()}function q(){a(document).keydown(function(y){f(y)})}function g(){a(document).unbind()}function f(y){if(a.browser.msie){keycode=y.keyCode;escapeKey=27}else{if(a.browser.safari){keycode=y.which;escapeKey=27}else{keycode=y.keyCode;escapeKey=KeyEvent.DOM_VK_ESCAPE}}key=String.fromCharCode(keycode).toLowerCase();if((key==u.keyToClose)||(key=="x")||(keycode==escapeKey)){b()}if((key==u.keyToPrev)||(keycode==37)){if(u.activeImage!=0){u.activeImage=u.activeImage-1;p();g()}}if((key==u.keyToNext)||(keycode==39)){if(u.activeImage!=(u.imageArray.length-1)){u.activeImage=u.activeImage+1;p();g()}}}function v(){if((u.imageArray.length-1)>u.activeImage){objNext=new Image();objNext.src=u.imageArray[u.activeImage+1][0]}if(u.activeImage>0){objPrev=new Image();objPrev.src=u.imageArray[u.activeImage-1][0]}}function b(){a("#jquery-lightbox").remove();a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove()});a("embed, object, select").css({visibility:"visible"})}function h(){var A,y;if(window.innerHeight&&window.scrollMaxY){A=window.innerWidth+window.scrollMaxX;y=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){A=document.body.scrollWidth;y=document.body.scrollHeight}else{A=document.body.offsetWidth;y=document.body.offsetHeight}}var z,B;if(self.innerHeight){if(document.documentElement.clientWidth){z=document.documentElement.clientWidth}else{z=self.innerWidth}B=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){z=document.documentElement.clientWidth;B=document.documentElement.clientHeight}else{if(document.body){z=document.body.clientWidth;B=document.body.clientHeight}}}if(y<B){pageHeight=B}else{pageHeight=y}if(A<z){pageWidth=A}else{pageWidth=z}arrayPageSize=new Array(pageWidth,pageHeight,z,B);return arrayPageSize}function k(){var z,y;if(self.pageYOffset){y=self.pageYOffset;z=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){y=document.documentElement.scrollTop;z=document.documentElement.scrollLeft}else{if(document.body){y=document.body.scrollTop;z=document.body.scrollLeft}}}arrayPageScroll=new Array(z,y);return arrayPageScroll}function r(A){var z=new Date();y=null;do{var y=new Date()}while(y-z<A)}return this.unbind("click").click(w)}})(jQuery);(function(g){var b={},o,q,s,m=g.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),a=false;g.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){g.tooltip.blocked=!g.tooltip.blocked}};g.fn.extend({tooltip:function(u){u=g.extend({},g.tooltip.defaults,u);k(u);return this.each(function(){g.data(this,"tooltip",u);this.tOpacity=b.parent.css("opacity");this.tooltipText=this.title;g(this).removeAttr("title");this.alt=""}).mouseover(p).mouseout(h).click(h)},fixPNG:m?function(){return this.each(function(){var u=g(this).css("backgroundImage");if(u.match(/^url\(["']?(.*\.png)["']?\)$/i)){u=RegExp.$1;g(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+u+"')"}).each(function(){var v=g(this).css("position");if(v!="absolute"&&v!="relative"){g(this).css("position","relative")}})}})}:function(){return this},unfixPNG:m?function(){return this.each(function(){g(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){g(this)[g(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function k(u){if(b.parent){return}b.parent=g('<div id="'+u.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if(g.fn.bgiframe){b.parent.bgiframe()}b.title=g("h3",b.parent);b.body=g("div.body",b.parent);b.url=g("div.url",b.parent)}function e(u){return g.data(u,"tooltip")}function j(u){if(e(this).delay){s=setTimeout(r,e(this).delay)}else{r()}a=!!e(this).track;g(document.body).bind("mousemove",f);f(u)}function p(){if(g.tooltip.blocked||this==o||(!this.tooltipText&&!e(this).bodyHandler)){return}o=this;q=this.tooltipText;if(e(this).bodyHandler){b.title.hide();var x=e(this).bodyHandler.call(this);if(x.nodeType||x.jquery){b.body.empty().append(x)}else{b.body.html(x)}b.body.show()}else{if(e(this).showBody){var w=q.split(e(this).showBody);b.title.html(w.shift()).show();b.body.empty();for(var v=0,u;(u=w[v]);v++){if(v>0){b.body.append("<br/>")}b.body.append(u)}b.body.hideWhenEmpty()}else{b.title.html(q).show();b.body.hide()}}if(e(this).showURL&&g(this).url()){b.url.html(g(this).url().replace("http://","")).show()}else{b.url.hide()}b.parent.addClass(e(this).extraClass);if(e(this).fixPNG){b.parent.fixPNG()}j.apply(this,arguments)}function r(){s=null;if((!m||!g.fn.bgiframe)&&e(o).fade){if(b.parent.is(":animated")){b.parent.stop().show().fadeTo(e(o).fade,o.tOpacity)}else{b.parent.is(":visible")?b.parent.fadeTo(e(o).fade,o.tOpacity):b.parent.fadeIn(e(o).fade)}}else{b.parent.show()}f()}function f(y){if(g.tooltip.blocked){return}if(y&&y.target.tagName=="OPTION"){return}if(!a&&b.parent.is(":visible")){g(document.body).unbind("mousemove",f)}if(o==null){g(document.body).unbind("mousemove",f);return}b.parent.removeClass("viewport-right").removeClass("viewport-bottom");var A=b.parent[0].offsetLeft;var z=b.parent[0].offsetTop;if(y){A=y.pageX+e(o).left;z=y.pageY+e(o).top;var w="auto";if(e(o).positionLeft){w=g(window).width()-A;A="auto"}b.parent.css({left:A,right:w,top:z})}var u=l(),x=b.parent[0];if(u.x+u.cx<x.offsetLeft+x.offsetWidth){A-=x.offsetWidth+20+e(o).left;b.parent.css({left:A+"px"}).addClass("viewport-right")}if(u.y+u.cy<x.offsetTop+x.offsetHeight){z-=x.offsetHeight+20+e(o).top;b.parent.css({top:z+"px"}).addClass("viewport-bottom")}}function l(){return{x:g(window).scrollLeft(),y:g(window).scrollTop(),cx:g(window).width(),cy:g(window).height()}}function h(w){if(g.tooltip.blocked){return}if(s){clearTimeout(s)}o=null;var v=e(this);function u(){b.parent.removeClass(v.extraClass).hide().css("opacity","")}if((!m||!g.fn.bgiframe)&&v.fade){if(b.parent.is(":animated")){b.parent.stop().fadeTo(v.fade,0,u)}else{b.parent.stop().fadeOut(v.fade,u)}}else{u()}if(e(this).fixPNG){b.parent.unfixPNG()}}})(jQuery);(function(r){var v,k,m,o=false,u=false,l=[];function q(){k=s.GL=google.language;m=k.Languages;o=true;var a;while(a=l.shift()){a()}}function p(){}function s(){this.extend(r.translate);delete this.defaults;delete this.fn}s.prototype={version:"1.3.9",translateInit:function(e,a){var b=this;this.options=a;a.from=this.toLanguageCode(a.from)||"";a.to=this.toLanguageCode(a.to)||"";if(a.fromOriginal&&a.nodes[0]){a.nodes.each(function(g){var f=r.translate.getData(this,a.from,a);if(!f){return false}e[g]=f})}if(typeof e==="string"){if(!a.comments){e=this.stripComments(e)}this.rawSource="<div>"+e+"</div>";this.isString=true}else{if(!a.comments){e=r.map(e,function(f){return r.translate.stripComments(f)})}this.rawSource="<div>"+e.join("</div><div>")+"</div>";this.isString=false}this.from=a.from;this.to=a.to;this.source=e;this.elements=a.nodes;this.rawTranslation="";this.translation=[];this.startPos=0;this.i=0;this.stopped=false;a.start.call(this,a.nodes[0]?a.nodes:e,a.from,a.to,a);if(a.timeout>0){this.timeout=setTimeout(function(){a.onTimeout.call(b,a.nodes[0]?a.nodes:e,a.from,a.to,a)},a.timeout)}(a.toggle&&a.nodes[0])?this._toggle():this.translate();return this},translate:function(){if(this.stopped){return}var z=this,h=this.options;this.rawSourceSub=this.truncate(this.rawSource.substr(this.startPos),1750);this.startPos+=this.rawSourceSub.length;var b=this.rawTranslation.length,y;while((y=this.rawTranslation.lastIndexOf("</div>",b))>-1){b=y-1;var x=this.rawTranslation.substr(0,b+1),A=x.match(/<div[> ]/gi),a=x.match(/<\/div>/gi);A=A?A.length:0;a=a?a.length:0;if(A!=a+1){continue}var g=r(this.rawTranslation.substr(0,b+7)),e=g.length,f=this.i;if(f==e){break}g.slice(f,e).each(function(w,B){(function(){if(this.stopped){return false}var F=r(B).html().replace(/^\s/,""),D=f+w,E=this.source,C=this.from.length<2&&this.detectedSourceLanguage||this.from;this.translation[D]=F;if(!h.nodes[0]){if(this.isString){this.translation=F}else{E=this.source[D]}h.each.call(this,D,F,E,C,this.to,h)}else{this.each(D,this.elements[D],F,this.source[D],C,this.to,h);h.each.call(this,D,this.elements[D],F,this.source[D],C,this.to,h)}this.i++}).call(z)});break}if(this.rawSourceSub.length>0){k.translate(this.rawSourceSub,this.from,this.to,function(w){(function(){if(w.error){return h.error.call(this,w.error,this.rawSourceSub,this.from,this.to,h)}this.rawTranslation+=w.translation||this.rawSourceSub;this.detectedSourceLanguage=w.detectedSourceLanguage;this.translate()}).call(z)});if(!h.nodes[0]){return}}else{if(!this.rawTranslation){return}var j=this.from.length<2&&this.detectedSourceLanguage||this.from;if(this.timeout){clearTimeout(this.timeout)}if(!h.nodes[0]){h.complete.call(this,this.translation,this.source,j,this.to,h)}else{h.complete.call(this,this.elements.end(),this.elements,this.translation,this.source,j,this.to,h)}}},stop:function(){if(this.stopped){return this}this.stopped=true;this.options.error.call(this,{message:"stopped"});return this}};r.translate=function(a,b,e,f){if(a==v){return new s()}if(r.isFunction(a)){return r.translate.ready(a,b)}var g=new s();return r.translate.ready(function(){return g.translateInit(a,r.translate._getOpt(b,e,f))},false,g)};r.translate.fn=r.translate.prototype=s.prototype;r.translate.fn.extend=r.translate.extend=r.extend;r.translate.extend({stripComments:function(a){return a.replace(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g,"")},truncate:function(b,j){var h,x,a,e,f,y,w=encodeURIComponent(b);for(h=0;h<10;h++){try{y=decodeURIComponent(w.substr(0,j-h))}catch(g){continue}if(y){break}}return(!(x=/<(?![^<]*>)/.exec(y)))?((!(a=/>\s*$/.exec(y)))?((e=/[\.\?\!;:](?![^\.\?\!;:]*[\.\?\!;:])/.exec(y))?((f=/>(?![^>]*<)/.exec(y))?(e.index>f.index?y.substring(0,e.index+1):y.substring(0,f.index+1)):y.substring(0,e.index+1)):y):y):y.substring(0,x.index)},getLanguages:function(w,x){if(w==v||(x==v&&!w)){return m}var a={},h=x,e=m;if(x){e=r.translate.getLanguages(w)}else{if(typeof w==="object"){h=w}}if(h){for(var b=0,g=h.length,j,f;b<g;b++){j=r.translate.toLanguageCode(h[b]);for(f in e){if(j===e[f]){a[f]=e[f]}}}}else{for(var f in m){if(k.isTranslatable(m[f])){a[f]=m[f]}}}return a},toLanguage:function(a,e){for(var b in m){if(a===b||a===m[b]||a.toUpperCase()===b||a.toLowerCase()===m[b].toLowerCase()){return e==="lowercase"?b.toLowerCase():e==="capitalize"?b.charAt(0).toUpperCase()+b.substr(1).toLowerCase():b}}},toLanguageCode:function(a){return m.a||m[r.translate.toLanguage(a)]},same:function(a,b){return a===b||r.translate.toLanguageCode(a)===r.translate.toLanguageCode(b)},isTranslatable:function(a){return k.isTranslatable(r.translate.toLanguageCode(a))},getBranding:function(b,e,a){return r(k.getBranding(b,e,a))},load:function(b,a,e){u=true;function f(){google.load(a||"language",e||"1",{callback:q})}(typeof google!=="undefined"&&google.load)?f():r.getScript("http://www.google.com/jsapi?"+(b?"key="+b:""),f);return r.translate},ready:function(e,a,b){o?e():l.push(e);if(!u&&!a){r.translate.load()}return b||r.translate},_getOpt:function(b,e,f,g){var h,j,a={};if(typeof b==="object"){a=b}else{if(!e&&!f){j=b}if(!f&&e){if(typeof e==="object"){j=b;a=e}else{h=b;j=e}}if(b!=v&&e&&f){h=b;j=e;a=f}a.from=h||a.from||"";a.to=j||a.to||""}if(a.fromOriginal){a.toggle=true}if(a.toggle){a.data=true}if(a.async===true){a.async=2}return r.extend({},r.translate._defaults,(g?r.fn.translate.defaults:r.translate.defaults),a)},_defaults:{comments:false,start:p,error:p,each:p,complete:p,onTimeout:p,timeout:0,from:"",to:"",nodes:[],walk:true,returnAll:false,replace:true,rebind:true,data:true,setLangAttr:false,subject:true,not:"",altAndVal:true,async:false,toggle:false,fromOriginal:false}});r.translate.defaults=r.extend({},r.translate._defaults)})(jQuery);(function(h){var f={text:true,button:true,submit:true};function e(b,j){var a=b.css("text-align");b.css("direction",j);if(a==="right"){b.css("text-align","left")}if(a==="left"){b.css("text-align","right")}}function g(j,b){var a=j.nodeName.toUpperCase(),k=a==="INPUT"&&h.attr(j,"type").toLowerCase();return typeof b.subject==="string"?b.subject:b.altAndVal&&(a==="IMG"||k==="image")?"alt":b.altAndVal&&f[k]?"value":a==="TEXTAREA"?"value":"html"}h.translate.fn._toggle=function(){var j=this,b=this.options,k=b.nodes,a=b.to,l=false;k.each(function(p){j.i=p;var m=h(this),o=j.getData(this,a,b);if(!o){return !(l=true)}j.translation.push(o);j.setLangAttr(m,a,b);j.replace(m,o,b);b.each.call(j,p,j.elements[p],o,j.source[p],j.from,a,b)});!l?b.complete.call(this,k.end(),k,j.translation,this.source,this.from,this.to,b):this.translate()};h.translate.extend({isRtl:{ar:true,he:true,iw:true,fa:true,ur:true},each:function(r,p,s,q,u,a,b){var o=h(p);h.translate.setData(p,s,q,u,a,b);h.translate.replace(o,s,b);h.translate.setLangAttr(o,a,b)},getData:function(k,a,b){var j=h.data(k,"translation");return j&&j[a]&&j[a][g(k,b)]},setData:function(p,s,q,a,b,m){if(!m.data){return}var r=g(p,m),o=h.data(p,"translation");o=o||h.data(p,"translation",{});(o[a]=o[a]||{})[r]=q;(o[b]=o[b]||{})[r]=s;h.data(p,"translation."+a+"."+r,q);h.data(p,"translation."+b+"."+r,s)},replace:function(s,a,w){if(!w.replace){return}if(typeof w.subject==="string"){return s.attr(w.subject,a)}var u=s[0],o=u.nodeName.toUpperCase(),q=o==="INPUT"&&h.attr(u,"type").toLowerCase(),r=h.translate.isRtl,v=h.data(u,"lang");if(v===w.to){return}if(r[w.to]!==r[v||w.from]){if(r[w.to]){e(s,"rtl")}else{if(s.css("direction")==="rtl"){e(s,"ltr")}}}if(w.altAndVal&&(o==="IMG"||q==="image")){s.attr("alt",a)}else{if(o==="TEXTAREA"||w.altAndVal&&f[q]){s.val(a)}else{if(w.rebind){var x=s.find("*").not("script"),b=h("<div/>").html(a);h.translate.copyEvents(x,b.find("*"));s.html(b.contents())}else{s.html(a)}}}h.data(u,"lang",w.to)},setLangAttr:function(j,a,b){if(b.setLangAttr){j.attr(b.setLangAttr===true?"lang":b.setLangAttr,a)}},copyEvents:function(a,b){b.each(function(q){var m=a[q];if(!this||!m){return false}if(({SCRIPT:1,NOSCRIPT:1,STYLE:1,OBJECT:1,IFRAME:1})[m.nodeName.toUpperCase()]){return true}var r=h.data(m,"events");if(!r){return true}for(var o in r){for(var p in r[o]){h.event.add(this,o,r[o][p],r[o][p].data)}}})}});h.fn.translate=function(k,l,a){var j=h.translate._getOpt(k,l,a,true),b=h.extend({},h.translate._defaults,h.fn.translate.defaults,j,{complete:function(m,o){j.nodes=m;h.translate(o,j)},each:function(){}});if(this.nodesContainingText){return this.nodesContainingText(b)}j.nodes=this;h.translate(h.map(this,function(m){return h(m).html()||h(m).val()}),j);return this};h.fn.translate.defaults=h.extend({},h.translate._defaults)})(jQuery);(function(b){b.translate.ui=b.translate.fn.ui=function(l,o,a){var j="",k="",m="";if(a){k="<"+a+">";m="</"+a+">"}b.each(b.translate.getLanguages(true),function(e,f){j+=("<"+o+">"+k+e.charAt(0)+e.substring(1).toLowerCase()+m+"</"+o+">")});return b("<"+l+' class="jq-translate-ui">'+j+"</"+l+">")}})(jQuery);(function(b){b.translate.fn.progress=function(a,g){if(!this.i){this.pr=0}this.pr+=this.source[this.i].length;var h=100*this.pr/(this.rawSource.length-(11*(this.i+1)));if(a){var e=b(a);if(!this.i&&!e.hasClass("ui-progressbar")){e.progressbar(g)}e.progressbar("option","value",h)}return h}})(jQuery);(function(e){function f(){}f.prototype={init:function(a,b){this.textArray=[];this.elements=[];this.options=b;this.jquery=a;this.n=-1;if(b.async===true){b.async=2}if(b.not){a=a.not(b.not);a=a.add(a.find("*").not(b.not)).not(e(b.not).find("*"))}else{a=a.add(a.find("*"))}this.jq=a;this.jql=this.jq.length;return this.process()},process:function(){this.n++;var u=this,y=this.options,a="",v=false,w=false,x=this.jq[this.n],r,o,s;if(this.n==this.jql){s=this.jquery.pushStack(this.elements,"nodesContainingText");y.complete.call(s,s,this.textArray);if(y.returnAll===false&&y.walk===false){return this.jquery}return s}if(!x){return this.process()}r=e(x);var b=x.nodeName.toUpperCase(),q=b==="INPUT"&&e.attr(x,"type").toLowerCase();if(({SCRIPT:1,NOSCRIPT:1,STYLE:1,OBJECT:1,IFRAME:1})[b]){return this.process()}if(typeof y.subject==="string"){a=r.attr(y.subject)}else{if(y.altAndVal&&(b==="IMG"||q==="image")){a=r.attr("alt")}else{if(y.altAndVal&&({text:1,button:1,submit:1})[q]){a=r.val()}else{if(b==="TEXTAREA"){a=r.val()}else{o=x.firstChild;if(y.walk!==true){w=true}else{while(o){if(o.nodeType==1){w=true;break}o=o.nextSibling}}if(!w){a=r.text()}else{if(y.walk!==true){v=true}o=x.firstChild;while(o){if(o.nodeType==3&&o.nodeValue.match(/\S/)!==null){if(o.nodeValue.match(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/)!==null){if(o.nodeValue.match(/(\S+(?=.*<))|(>(?=.*\S+))/)!==null){v=true;break}}else{v=true;break}}o=o.nextSibling}if(v){a=r.html().replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,"");this.jq=this.jq.not(r.find("*"))}}}}}}if(!a){return this.process()}this.elements.push(x);if(y.comments===false){a=this.stripComments(a)}this.textArray.push(a);y.each.call(x,this.elements.length-1,x,a);if(y.async){setTimeout(function(){u.process()},y.async);return this.jquery}else{return this.process()}},stripComments:function(a){return a.replace(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g,"")}};e.fn.nodesContainingText=function(a){a=e.extend({},g,e.fn.nodesContainingText.defaults,a);return new f().init(this,a)};var g={not:"",async:false,each:function(){},complete:function(){},comments:false,returnAll:true,walk:true,altAndVal:false,subject:true};e.fn.nodesContainingText.defaults=g})(jQuery);var jwplayer=function(b){if(jwplayer.api){return jwplayer.api.selectPlayer(b)}};var $jw=jwplayer;jwplayer.version="5.5.1641 (Licensed version)";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(e){e.utils=function(){};e.utils.typeOf=function(a){var b=typeof a;if(b==="object"){if(a){if(a instanceof Array){b="array"}}else{b="null"}}return b};e.utils.extend=function(){var g=e.utils.extend["arguments"];if(g.length>1){for(var a=1;a<g.length;a++){for(var b in g[a]){g[0][b]=g[a][b]}}return g[0]}return null};e.utils.clone=function(a){var h;var g=e.utils.clone["arguments"];if(g.length==1){switch(e.utils.typeOf(g[0])){case"object":h={};for(var b in g[0]){h[b]=e.utils.clone(g[0][b])}break;case"array":h=[];for(var b in g[0]){h[b]=e.utils.clone(g[0][b])}break;default:return g[0];break}}return h};e.utils.extension=function(a){a=a.substring(a.lastIndexOf("/")+1,a.length);a=a.split("?")[0];if(a.lastIndexOf(".")>-1){return a.substr(a.lastIndexOf(".")+1,a.length).toLowerCase()}return};e.utils.html=function(b,a){b.innerHTML=a};e.utils.wrap=function(b,a){b.parentNode.replaceChild(a,b);a.appendChild(b)};e.utils.ajax=function(a,b,h){var g;if(window.XMLHttpRequest){g=new XMLHttpRequest()}else{g=new ActiveXObject("Microsoft.XMLHTTP")}g.onreadystatechange=function(){if(g.readyState===4){if(g.status===200){if(b){b(g)}}else{if(h){h(a)}}}};g.open("GET",a,true);g.send(null);return g};e.utils.load=function(b,a,g){b.onreadystatechange=function(){if(b.readyState===4){if(b.status===200){if(a){a()}}else{if(g){g()}}}}};e.utils.find=function(a,b){return a.getElementsByTagName(b)};e.utils.append=function(b,a){b.appendChild(a)};e.utils.isIE=function(){return((!+"\v1")||(typeof window.ActiveXObject!="undefined"))};e.utils.isLegacyAndroid=function(){var a=navigator.userAgent.toLowerCase();return(a.match(/android 2.[012]/i)!==null)};e.utils.isIOS=function(){var a=navigator.userAgent.toLowerCase();return(a.match(/iP(hone|ad)/i)!==null)};e.utils.getFirstPlaylistItemFromConfig=function(g){var b={};var a;if(g.playlist&&g.playlist.length){a=g.playlist[0]}else{a=g}b.file=a.file;b.levels=a.levels;b.streamer=a.streamer;b.playlistfile=a.playlistfile;if(b.file&&b.file.toLowerCase().indexOf("youtube.com")>-1){b.provider="youtube"}if(b.streamer&&b.streamer.toLowerCase().indexOf("rtmp://")==0){b.provider="rtmp"}if(a.type){b.provider=a.type.toLowerCase()}else{if(a.provider){b.provider=a.provider.toLowerCase()}}return b};e.utils.getOuterHTML=function(j){if(j.outerHTML){return j.outerHTML}else{var h=j.parentNode;var k=document.createElement(h.tagName);var a=document.createElement(j.tagName);h.replaceChild(a,j);k.appendChild(j);var b=k.innerHTML;h.replaceChild(j,a);return b}};e.utils.setOuterHTML=function(b,h){if(b.outerHTML){b.outerHTML=h}else{var a=document.createElement("div");a.innerHTML=h;var k=document.createRange();k.selectNodeContents(a);var j=k.extractContents();b.parentNode.insertBefore(j,b);b.parentNode.removeChild(b)}};e.utils.hasFlash=function(){return(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined")||(typeof window.ActiveXObject!="undefined")};e.utils.getPluginName=function(a){if(a.lastIndexOf("/")>=0){a=a.substring(a.lastIndexOf("/")+1,a.length)}if(a.lastIndexOf("-")>=0){a=a.substring(0,a.lastIndexOf("-"))}if(a.lastIndexOf(".swf")>=0){a=a.substring(0,a.lastIndexOf(".swf"))}if(a.lastIndexOf(".js")>=0){a=a.substring(0,a.lastIndexOf(".js"))}return a};e.utils.getAbsolutePath=function(b,l){if(l===undefined){l=document.location.href}if(b===undefined){return undefined}if(f(b)){return b}var a=l.substring(0,l.indexOf("://")+3);var m=l.substring(a.length,l.indexOf("/",a.length+1));var q;if(b.indexOf("/")===0){q=b.split("/")}else{var p=l.split("?")[0];p=p.substring(a.length+m.length+1,p.lastIndexOf("/"));q=p.split("/").concat(b.split("/"))}var r=[];for(var o=0;o<q.length;o++){if(!q[o]||q[o]===undefined||q[o]=="."){continue}else{if(q[o]==".."){r.pop()}else{r.push(q[o])}}}return a+m+"/"+r.join("/")};function f(b){if(b===null){return}var a=b.indexOf("://");var g=b.indexOf("?");return(a>0&&(g<0||(g>a)))}e.utils.pluginPathType={ABSOLUTE:"ABSOLUTE",RELATIVE:"RELATIVE",CDN:"CDN"};e.utils.getPluginPathType=function(g){if(typeof g!="string"){return}g=g.split("?")[0];var b=g.indexOf("://");if(b>0){return e.utils.pluginPathType.ABSOLUTE}var h=g.indexOf("/");var a=e.utils.extension(g);if(b<0&&h<0&&(!a||!isNaN(a))){return e.utils.pluginPathType.CDN}return e.utils.pluginPathType.RELATIVE};e.utils.mapEmpty=function(b){for(var a in b){return false}return true};e.utils.mapLength=function(b){var g=0;for(var a in b){g++}return g};e.utils.log=function(a,b){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(b){console.log(a,b)}else{console.log(a)}}};e.utils.css=function(j,a,k){if(j!==undefined){for(var h in a){try{if(typeof a[h]==="undefined"){continue}else{if(typeof a[h]=="number"&&!(h=="zIndex"||h=="opacity")){if(isNaN(a[h])){continue}if(h.match(/color/i)){a[h]="#"+e.utils.strings.pad(a[h].toString(16),6)}else{a[h]=Math.ceil(a[h])+"px"}}}j.style[h]=a[h]}catch(b){}}}};e.utils.isYouTube=function(a){return a.indexOf("youtube.com")>-1};e.utils.getYouTubeId=function(a){a.indexOf("youtube.com">0)};e.utils.transform=function(b,a){b.style.webkitTransform=a;b.style.MozTransform=a;b.style.OTransform=a};e.utils.stretch=function(r,a,b,u,o,s){if(typeof b=="undefined"||typeof u=="undefined"||typeof o=="undefined"||typeof s=="undefined"){return}var w=b/o;var v=u/s;var p=0;var q=0;a.style.overflow="hidden";e.utils.transform(a,"");var x={};switch(r.toUpperCase()){case e.utils.stretching.NONE:x.width=o;x.height=s;break;case e.utils.stretching.UNIFORM:if(w>v){x.width=o*v;x.height=s*v}else{x.width=o*w;x.height=s*w}break;case e.utils.stretching.FILL:if(w>v){x.width=o*w;x.height=s*w}else{x.width=o*v;x.height=s*v}break;case e.utils.stretching.EXACTFIT:e.utils.transform(a,["scale(",w,",",v,")"," translate(0px,0px)"].join(""));x.width=o;x.height=s;break;default:break}x.top=(u-x.height)/2;x.left=(b-x.width)/2;e.utils.css(a,x)};e.utils.stretching={NONE:"NONE",FILL:"FILL",UNIFORM:"UNIFORM",EXACTFIT:"EXACTFIT"}})(jwplayer);(function(b){b.events=function(){};b.events.COMPLETE="COMPLETE";b.events.ERROR="ERROR"})(jwplayer);(function(jwplayer){jwplayer.events.eventdispatcher=function(debug){var _debug=debug;var _listeners;var _globallisteners;this.resetEventListeners=function(){_listeners={};_globallisteners=[]};this.resetEventListeners();this.addEventListener=function(type,listener,count){try{if(_listeners[type]===undefined){_listeners[type]=[]}if(typeof(listener)=="string"){eval("listener = "+listener)}_listeners[type].push({listener:listener,count:count})}catch(err){jwplayer.utils.log("error",err)}return false};this.removeEventListener=function(type,listener){try{for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){if(_listeners[type][lisenterIndex].toString()==listener.toString()){_listeners[type].slice(lisenterIndex,lisenterIndex+1);break}}}catch(err){jwplayer.utils.log("error",err)}return false};this.addGlobalListener=function(listener,count){try{if(typeof(listener)=="string"){eval("listener = "+listener)}_globallisteners.push({listener:listener,count:count})}catch(err){jwplayer.utils.log("error",err)}return false};this.removeGlobalListener=function(listener){try{for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){if(_globallisteners[globalListenerIndex].toString()==listener.toString()){_globallisteners.slice(globalListenerIndex,globalListenerIndex+1);break}}}catch(err){jwplayer.utils.log("error",err)}return false};this.sendEvent=function(type,data){if(data===undefined){data={}}if(_debug){jwplayer.utils.log(type,data)}if(typeof _listeners[type]!="undefined"){for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){try{_listeners[type][listenerIndex].listener(data)}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_listeners[type][listenerIndex].listener)}if(_listeners[type][listenerIndex].count===1){delete _listeners[type][listenerIndex]}else{if(_listeners[type][listenerIndex].count>0){_listeners[type][listenerIndex].count=_listeners[type][listenerIndex].count-1}}}}for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){try{_globallisteners[globalListenerIndex].listener(data)}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_globallisteners[globalListenerIndex].listener)}if(_globallisteners[globalListenerIndex].count===1){delete _globallisteners[globalListenerIndex]}else{if(_globallisteners[globalListenerIndex].count>0){_globallisteners[globalListenerIndex].count=_globallisteners[globalListenerIndex].count-1}}}}}})(jwplayer);(function(f){var e={};f.utils.animations=function(){};f.utils.animations.transform=function(b,a){b.style.webkitTransform=a;b.style.MozTransform=a;b.style.OTransform=a};f.utils.animations.transformOrigin=function(b,a){b.style.webkitTransformOrigin=a;b.style.MozTransformOrigin=a;b.style.OTransformOrigin=a};f.utils.animations.rotate=function(b,a){f.utils.animations.transform(b,["rotate(",a,"deg)"].join(""))};f.utils.cancelAnimation=function(a){delete e[a.id]};f.utils.fadeTo=function(a,r,s,o,p,u){if(e[a.id]!=u&&u!==undefined){return}var v=new Date().getTime();if(u>v){setTimeout(function(){f.utils.fadeTo(a,r,s,o,0,u)},u-v)}a.style.display="block";if(o===undefined){o=a.style.opacity===""?1:a.style.opacity}if(a.style.opacity==r&&a.style.opacity!==""&&u!==undefined){if(r===0){a.style.display="none"}return}if(u===undefined){u=v;e[a.id]=u}if(p===undefined){p=0}var m=(v-u)/(s*1000);m=m>1?1:m;var b=r-o;var q=o+(m*b);if(q>1){q=1}else{if(q<0){q=0}}a.style.opacity=q;if(p>0){e[a.id]=u+p*1000;f.utils.fadeTo(a,r,s,o,0,e[a.id]);return}setTimeout(function(){f.utils.fadeTo(a,r,s,o,0,u)},10)}})(jwplayer);(function(b){b.utils.arrays=function(){};b.utils.arrays.indexOf=function(f,e){for(var a=0;a<f.length;a++){if(f[a]==e){return a}}return -1};b.utils.arrays.remove=function(f,e){var a=b.utils.arrays.indexOf(f,e);if(a>-1){f.splice(a,1)}}})(jwplayer);(function(b){b.utils.extensionmap={"3gp":{html5:"video/3gpp",flash:"video"},"3gpp":{html5:"video/3gpp"},"3g2":{html5:"video/3gpp2",flash:"video"},"3gpp2":{html5:"video/3gpp2"},flv:{flash:"video"},f4a:{html5:"audio/mp4"},f4b:{html5:"audio/mp4",flash:"video"},f4p:{html5:"video/mp4",flash:"video"},f4v:{html5:"video/mp4",flash:"video"},mov:{html5:"video/quicktime",flash:"video"},m4a:{html5:"audio/mp4",flash:"video"},m4b:{html5:"audio/mp4"},m4p:{html5:"audio/mp4"},m4v:{html5:"video/mp4",flash:"video"},mkv:{html5:"video/x-matroska"},mp4:{html5:"video/mp4",flash:"video"},rbs:{flash:"sound"},sdp:{html5:"application/sdp",flash:"video"},vp6:{html5:"video/x-vp6"},aac:{html5:"audio/aac",flash:"video"},mp3:{flash:"sound"},ogg:{html5:"audio/ogg"},ogv:{html5:"video/ogg"},webm:{html5:"video/webm"},m3u8:{html5:"audio/x-mpegurl"},gif:{flash:"image"},jpeg:{flash:"image"},jpg:{flash:"image"},swf:{flash:"image"},png:{flash:"image"}}})(jwplayer);(function(p){p.utils.mediaparser=function(){};var m={element:{width:"width",height:"height",id:"id","class":"className",name:"name"},media:{src:"file",preload:"preload",autoplay:"autostart",loop:"repeat",controls:"controls"},source:{src:"file",type:"type",media:"media","data-jw-width":"width","data-jw-bitrate":"bitrate"},video:{poster:"image"}};var o={};p.utils.mediaparser.parseMedia=function(a){return q(a)};function r(a,b){if(b===undefined){b=m[a]}else{p.utils.extend(b,m[a])}return b}function q(a,g){if(o[a.tagName.toLowerCase()]&&(g===undefined)){return o[a.tagName.toLowerCase()](a)}else{g=r("element",g);var h={};for(var f in g){if(f!="length"){var b=a.getAttribute(f);if(!(b===""||b===undefined||b===null)){h[g[f]]=a.getAttribute(f)}}}var e=a.style["#background-color"];if(e&&!(e=="transparent"||e=="rgba(0, 0, 0, 0)")){h.screencolor=e}return h}}function l(h,e){e=r("media",e);var b=[];var f=p.utils.selectors("source",h);for(var a in f){if(!isNaN(a)){b.push(k(f[a]))}}var g=q(h,e);if(g.file!==undefined){b[0]={file:g.file}}g.levels=b;return g}function k(a,b){b=r("source",b);var e=q(a,b);e.width=e.width?e.width:0;e.bitrate=e.bitrate?e.bitrate:0;return e}function j(a,b){b=r("video",b);var e=l(a,b);return e}o.media=l;o.audio=l;o.source=k;o.video=j})(jwplayer);(function(b){b.utils.loaderstatus={NEW:"NEW",LOADING:"LOADING",ERROR:"ERROR",COMPLETE:"COMPLETE"};b.utils.scriptloader=function(f){var e=b.utils.loaderstatus.NEW;var a=new b.events.eventdispatcher();b.utils.extend(this,a);this.load=function(){if(e==b.utils.loaderstatus.NEW){e=b.utils.loaderstatus.LOADING;var g=document.createElement("script");g.onload=function(h){e=b.utils.loaderstatus.COMPLETE;a.sendEvent(b.events.COMPLETE)};g.onerror=function(h){e=b.utils.loaderstatus.ERROR;a.sendEvent(b.events.ERROR)};g.onreadystatechange=function(){if(g.readyState=="loaded"||g.readyState=="complete"){e=b.utils.loaderstatus.COMPLETE;a.sendEvent(b.events.COMPLETE)}};document.getElementsByTagName("head")[0].appendChild(g);g.src=f}};this.getStatus=function(){return e}}})(jwplayer);(function(b){b.utils.selectors=function(a,e){if(e===undefined){e=document}a=b.utils.strings.trim(a);var f=a.charAt(0);if(f=="#"){return e.getElementById(a.substr(1))}else{if(f=="."){if(e.getElementsByClassName){return e.getElementsByClassName(a.substr(1))}else{return b.utils.selectors.getElementsByTagAndClass("*",a.substr(1))}}else{if(a.indexOf(".")>0){selectors=a.split(".");return b.utils.selectors.getElementsByTagAndClass(selectors[0],selectors[1])}else{return e.getElementsByTagName(a)}}}return null};b.utils.selectors.getElementsByTagAndClass=function(m,j,k){elements=[];if(k===undefined){k=document}var l=k.getElementsByTagName(m);for(var o=0;o<l.length;o++){if(l[o].className!==undefined){var p=l[o].className.split(" ");for(var a=0;a<p.length;a++){if(p[a]==j){elements.push(l[o])}}}}return elements}})(jwplayer);(function(b){b.utils.strings=function(){};b.utils.strings.trim=function(a){return a.replace(/^\s*/,"").replace(/\s*$/,"")};b.utils.strings.pad=function(f,e,a){if(!a){a="0"}while(f.length<e){f=a+f}return f};b.utils.strings.serialize=function(a){if(a==null){return null}else{if(a=="true"){return true}else{if(a=="false"){return false}else{if(isNaN(Number(a))||a.length>5||a.length==0){return a}else{return Number(a)}}}}};b.utils.strings.seconds=function(e){e=e.replace(",",".");var a=e.split(":");var f=0;if(e.substr(-1)=="s"){f=Number(e.substr(0,e.length-1))}else{if(e.substr(-1)=="m"){f=Number(e.substr(0,e.length-1))*60}else{if(e.substr(-1)=="h"){f=Number(e.substr(0,e.length-1))*3600}else{if(a.length>1){f=Number(a[a.length-1]);f+=Number(a[a.length-2])*60;if(a.length==3){f+=Number(a[a.length-3])*3600}}else{f=Number(e)}}}}return f};b.utils.strings.xmlAttribute=function(a,f){for(var e in a.attributes){if(a.attributes[e].name&&a.attributes[e].name.toLowerCase()==f.toLowerCase()){return a.attributes[e].value.toString()}}return""}})(jwplayer);(function(k){var j=new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/);k.utils.typechecker=function(a,b){b=b===null?f(a):b;return h(a,b)};function f(b){var a=["true","false","t","f"];if(a.toString().indexOf(b.toLowerCase().replace(" ",""))>=0){return"boolean"}else{if(j.test(b)){return"color"}else{if(!isNaN(parseInt(b,10))&&parseInt(b,10).toString().length==b.length){return"integer"}else{if(!isNaN(parseFloat(b))&&parseFloat(b).toString().length==b.length){return"float"}}}}return"string"}function h(a,b){if(b===null){return a}switch(b){case"color":if(a.length>0){return g(a)}return null;case"integer":return parseInt(a,10);case"float":return parseFloat(a);case"boolean":if(a.toLowerCase()=="true"){return true}else{if(a=="1"){return true}}return false}return a}function g(a){switch(a.toLowerCase()){case"blue":return parseInt("0000FF",16);case"green":return parseInt("00FF00",16);case"red":return parseInt("FF0000",16);case"cyan":return parseInt("00FFFF",16);case"magenta":return parseInt("FF00FF",16);case"yellow":return parseInt("FFFF00",16);case"black":return parseInt("000000",16);case"white":return parseInt("FFFFFF",16);default:a=a.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(a.length==3){a=a.charAt(0)+a.charAt(0)+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)}return parseInt(a,16)}return parseInt("000000",16)}})(jwplayer);(function(f){var g={};var e={};f.plugins=function(){};f.plugins.loadPlugins=function(a,b){e[a]=new f.plugins.pluginloader(new f.plugins.model(g),b);return e[a]};f.plugins.registerPlugin=function(a,h,j){if(g[a]){g[a].registerPlugin(a,h,j)}else{f.utils.log("A plugin ("+a+") was registered with the player that was not loaded. Please check your configuration.");for(var b in e){e[b].pluginFailed()}}}})(jwplayer);(function(b){b.plugins.model=function(a){this.addPlugin=function(f){var e=b.utils.getPluginName(f);if(!a[e]){a[e]=new b.plugins.plugin(f)}return a[e]}}})(jwplayer);(function(b){b.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};b.plugins.plugin=function(v){var s="http://lp.longtailvideo.com";var m=b.utils.loaderstatus.NEW;var l;var o;var a;var u=new b.events.eventdispatcher();b.utils.extend(this,u);function r(){switch(b.utils.getPluginPathType(v)){case b.utils.pluginPathType.ABSOLUTE:return v;case b.utils.pluginPathType.RELATIVE:return b.utils.getAbsolutePath(v,window.location.href);case b.utils.pluginPathType.CDN:var e=b.utils.getPluginName(v);return s+"/"+b.version.split(".")[0]+"/"+e+"/"+e+".js"}}function p(e){a=setTimeout(function(){m=b.utils.loaderstatus.COMPLETE;u.sendEvent(b.events.COMPLETE)},1000)}function q(e){m=b.utils.loaderstatus.ERROR;u.sendEvent(b.events.ERROR)}this.load=function(){if(m==b.utils.loaderstatus.NEW){if(v.lastIndexOf(".swf")>0){l=v;m=b.utils.loaderstatus.COMPLETE;u.sendEvent(b.events.COMPLETE);return}m=b.utils.loaderstatus.LOADING;var e=new b.utils.scriptloader(r());e.addEventListener(b.events.COMPLETE,p);e.addEventListener(b.events.ERROR,q);e.load()}};this.registerPlugin=function(g,e,f){if(a){clearTimeout(a);a=undefined}if(e&&f){l=f;o=e}else{if(typeof e=="string"){l=e}else{if(typeof e=="function"){o=e}else{if(!e&&!f){l=g}}}}m=b.utils.loaderstatus.COMPLETE;u.sendEvent(b.events.COMPLETE)};this.getStatus=function(){return m};this.getPluginName=function(){return b.utils.getPluginName(v)};this.getFlashPath=function(){if(l){switch(b.utils.getPluginPathType(l)){case b.utils.pluginPathType.ABSOLUTE:return l;case b.utils.pluginPathType.RELATIVE:if(v.lastIndexOf(".swf")>0){return b.utils.getAbsolutePath(l,window.location.href)}return b.utils.getAbsolutePath(l,r());case b.utils.pluginPathType.CDN:if(l.indexOf("-")>-1){return l+"h"}return l+"-h"}}return null};this.getJS=function(){return o};this.getPluginmode=function(){if(typeof l!="undefined"&&typeof o!="undefined"){return b.plugins.pluginmodes.HYBRID}else{if(typeof l!="undefined"){return b.plugins.pluginmodes.FLASH}else{if(typeof o!="undefined"){return b.plugins.pluginmodes.JAVASCRIPT}}}};this.getNewInstance=function(e,f,g){return new o(e,f,g)};this.getURL=function(){return v}}})(jwplayer);(function(b){b.plugins.pluginloader=function(l,p){var m={};var a=b.utils.loaderstatus.NEW;var q=false;var s=false;var r=new b.events.eventdispatcher();b.utils.extend(this,r);function o(){if(!s){s=true;a=b.utils.loaderstatus.COMPLETE;r.sendEvent(b.events.COMPLETE)}}function k(){if(!s){var e=0;for(plugin in m){if(m[plugin].getStatus()==b.utils.loaderstatus.LOADING){e++}}if(e==0){o()}}}this.setupPlugins=function(e,g,h){var f={length:0,plugins:{}};var v={length:0,plugins:{}};for(var w in m){var u=m[w].getPluginName();if(m[w].getFlashPath()){f.plugins[m[w].getFlashPath()]=g.plugins[w];f.plugins[m[w].getFlashPath()].pluginmode=m[w].getPluginmode();f.length++}if(m[w].getJS()){var j=document.createElement("div");j.id=e.id+"_"+u;j.style.position="absolute";j.style.zIndex=v.length+10;v.plugins[u]=m[w].getNewInstance(e,g.plugins[w],j);v.length++;if(typeof v.plugins[u].resize!="undefined"){e.onReady(h(v.plugins[u],j,true));e.onResize(h(v.plugins[u],j))}}}e.plugins=v.plugins;return f};this.load=function(){a=b.utils.loaderstatus.LOADING;q=true;for(var e in p){m[e]=l.addPlugin(e);m[e].addEventListener(b.events.COMPLETE,k);m[e].addEventListener(b.events.ERROR,k);m[e].load()}q=false;k()};this.pluginFailed=function(){o()};this.getStatus=function(){return a}}})(jwplayer);(function(e){var f=[];e.api=function(D){this.container=D;this.id=D.id;var v={};var a={};var E=[];var z=undefined;var w=false;var y=[];var r=e.utils.getOuterHTML(D);var b={};var u=0;var x={};this.getBuffer=function(){return this.callInternal("jwGetBuffer")};this.getContainer=function(){return this.container};function C(g){return function(h,m,l,k){var j;if(m){x[h]=m;j="jwplayer('"+g+"').callback('"+h+"')"}else{if(!m&&x[h]){delete x[h]}}z.jwDockSetButton(h,j,l,k)}}this.getPlugin=function(g){var h=this.callInternal;if(g=="dock"){return{setButton:C(this.id)}}return this.plugins[g]};this.callback=function(g){if(x[g]){return x[g]()}};this.getDuration=function(){return this.callInternal("jwGetDuration")};this.getFullscreen=function(){return this.callInternal("jwGetFullscreen")};this.getHeight=function(){return this.callInternal("jwGetHeight")};this.getLockState=function(){return this.callInternal("jwGetLockState")};this.getMeta=function(){return this.getItemMeta()};this.getMute=function(){return this.callInternal("jwGetMute")};this.getPlaylist=function(){var g=this.callInternal("jwGetPlaylist");for(var h=0;h<g.length;h++){if(g[h].index===undefined){g[h].index=h}}return g};this.getPlaylistItem=function(g){if(g===undefined){g=this.getCurrentItem()}return this.getPlaylist()[g]};this.getPosition=function(){return this.callInternal("jwGetPosition")};this.getRenderingMode=function(){return this.renderingMode};this.getState=function(){return this.callInternal("jwGetState")};this.getVolume=function(){return this.callInternal("jwGetVolume")};this.getWidth=function(){return this.callInternal("jwGetWidth")};this.setFullscreen=function(g){if(g===undefined){this.callInternal("jwSetFullscreen",!this.callInternal("jwGetFullscreen"))}else{this.callInternal("jwSetFullscreen",g)}return this};this.setMute=function(g){if(g===undefined){this.callInternal("jwSetMute",!this.callInternal("jwGetMute"))}else{this.callInternal("jwSetMute",g)}return this};this.lock=function(){return this};this.unlock=function(){return this};this.load=function(g){this.callInternal("jwLoad",g);return this};this.playlistItem=function(g){this.callInternal("jwPlaylistItem",g);return this};this.playlistPrev=function(){this.callInternal("jwPlaylistPrev");return this};this.playlistNext=function(){this.callInternal("jwPlaylistNext");return this};this.resize=function(g,h){if(this.renderingMode=="html5"){z.jwResize(g,h)}else{this.container.width=g;this.container.height=h}return this};this.play=function(g){if(typeof g=="undefined"){g=this.getState();if(g==e.api.events.state.PLAYING||g==e.api.events.state.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPlay",g)}return this};this.pause=function(g){if(typeof g=="undefined"){g=this.getState();if(g==e.api.events.state.PLAYING||g==e.api.events.state.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPause",g)}return this};this.stop=function(){this.callInternal("jwStop");return this};this.seek=function(g){this.callInternal("jwSeek",g);return this};this.setVolume=function(g){this.callInternal("jwSetVolume",g);return this};this.onBufferChange=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_BUFFER,g)};this.onBufferFull=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_BUFFER_FULL,g)};this.onError=function(g){return this.eventListener(e.api.events.JWPLAYER_ERROR,g)};this.onFullscreen=function(g){return this.eventListener(e.api.events.JWPLAYER_FULLSCREEN,g)};this.onMeta=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_META,g)};this.onMute=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_MUTE,g)};this.onPlaylist=function(g){return this.eventListener(e.api.events.JWPLAYER_PLAYLIST_LOADED,g)};this.onPlaylistItem=function(g){return this.eventListener(e.api.events.JWPLAYER_PLAYLIST_ITEM,g)};this.onReady=function(g){return this.eventListener(e.api.events.API_READY,g)};this.onResize=function(g){return this.eventListener(e.api.events.JWPLAYER_RESIZE,g)};this.onComplete=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_COMPLETE,g)};this.onTime=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_TIME,g)};this.onVolume=function(g){return this.eventListener(e.api.events.JWPLAYER_MEDIA_VOLUME,g)};this.onBuffer=function(g){return this.stateListener(e.api.events.state.BUFFERING,g)};this.onPause=function(g){return this.stateListener(e.api.events.state.PAUSED,g)};this.onPlay=function(g){return this.stateListener(e.api.events.state.PLAYING,g)};this.onIdle=function(g){return this.stateListener(e.api.events.state.IDLE,g)};this.remove=function(){v={};y=[];if(e.utils.getOuterHTML(this.container)!=r){e.api.destroyPlayer(this.id,r)}};this.setup=function(h){if(e.embed){var j=this.id;this.remove();var g=e(j);g.config=h;return new e.embed(g)}return this};this.registerPlugin=function(g,h,j){e.plugins.registerPlugin(g,h,j)};this.setPlayer=function(h,g){z=h;this.renderingMode=g};this.stateListener=function(h,g){if(!a[h]){a[h]=[];this.eventListener(e.api.events.JWPLAYER_PLAYER_STATE,A(h))}a[h].push(g);return this};function A(g){return function(l){var m=l.newstate,j=l.oldstate;if(m==g){var k=a[m];if(k){for(var h=0;h<k.length;h++){if(typeof k[h]=="function"){k[h].call(this,{oldstate:j,newstate:m})}}}}}}this.addInternalListener=function(h,g){h.jwAddEventListener(g,'function(dat) { jwplayer("'+this.id+'").dispatchEvent("'+g+'", dat); }')};this.eventListener=function(h,g){if(!v[h]){v[h]=[];if(z&&w){this.addInternalListener(z,h)}}v[h].push(g);return this};this.dispatchEvent=function(g){if(v[g]){var h=B(g,arguments[1]);for(var j=0;j<v[g].length;j++){if(typeof v[g][j]=="function"){v[g][j].call(this,h)}}}};function B(j,l){var g=e.utils.extend({},l);if(j==e.api.events.JWPLAYER_FULLSCREEN&&!g.fullscreen){g.fullscreen=g.message=="true"?true:false;delete g.message}else{if(typeof g.data=="object"){g=e.utils.extend(g,g.data);delete g.data}}var k=["position","duration","offset"];for(var h in k){if(g[k[h]]){g[k[h]]=Math.round(g[k[h]]*1000)/1000}}return g}this.callInternal=function(g,h){if(w){if(typeof z!="undefined"&&typeof z[g]=="function"){if(h!==undefined){return(z[g])(h)}else{return(z[g])()}}return null}else{y.push({method:g,parameters:h})}};this.playerReady=function(g){w=true;if(!z){this.setPlayer(document.getElementById(g.id))}this.container=document.getElementById(this.id);for(var j in v){this.addInternalListener(z,j)}this.eventListener(e.api.events.JWPLAYER_PLAYLIST_ITEM,function(k){if(k.index!==undefined){u=k.index}b={}});this.eventListener(e.api.events.JWPLAYER_MEDIA_META,function(k){e.utils.extend(b,k.metadata)});this.dispatchEvent(e.api.events.API_READY);while(y.length>0){var h=y.shift();this.callInternal(h.method,h.parameters)}};this.getItemMeta=function(){return b};this.getCurrentItem=function(){return u};function s(j,g,h){var l=[];if(!g){g=0}if(!h){h=j.length-1}for(var k=g;k<=h;k++){l.push(j[k])}return l}return this};e.api.selectPlayer=function(b){var g;if(b===undefined){b=0}if(b.nodeType){g=b}else{if(typeof b=="string"){g=document.getElementById(b)}}if(g){var a=e.api.playerById(g.id);if(a){return a}else{return e.api.addPlayer(new e.api(g))}}else{if(typeof b=="number"){return e.getPlayers()[b]}}return null};e.api.events={API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem"};e.api.events.state={BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"};e.api.playerById=function(a){for(var b=0;b<f.length;b++){if(f[b].id==a){return f[b]}}return null};e.api.addPlayer=function(b){for(var a=0;a<f.length;a++){if(f[a]==b){return b}}f.push(b);return b};e.api.destroyPlayer=function(j,m){var k=-1;for(var a=0;a<f.length;a++){if(f[a].id==j){k=a;continue}}if(k>=0){var o=document.getElementById(f[k].id);if(document.getElementById(f[k].id+"_wrapper")){o=document.getElementById(f[k].id+"_wrapper")}if(o){if(m){e.utils.setOuterHTML(o,m)}else{var b=document.createElement("div");var l=o.id;if(o.id.indexOf("_wrapper")==o.id.length-8){newID=o.id.substring(0,o.id.length-8)}b.setAttribute("id",l);o.parentNode.replaceChild(b,o)}}f.splice(k,1)}return null};e.getPlayers=function(){return f.slice(0)}})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(e){var f=jwplayer.api.playerById(e.id);if(f){f.playerReady(e)}if(_userPlayerReady){_userPlayerReady.call(this,e)}};(function(f){f.embed=function(j){var a={width:400,height:300,components:{controlbar:{position:"over"}}};var k=f.utils.mediaparser.parseMedia(j.container);var l=new f.embed.config(f.utils.extend(a,k,j.config),this);var b=f.plugins.loadPlugins(j.id,l.plugins);function o(g,h){for(var p in h){if(typeof g[p]=="function"){(g[p]).call(g,h[p])}}}function m(){if(b.getStatus()==f.utils.loaderstatus.COMPLETE){for(var g=0;g<l.modes.length;g++){if(l.modes[g].type&&f.embed[l.modes[g].type]){var p=l;if(l.modes[g].config){p=f.utils.extend(f.utils.clone(l),l.modes[g].config)}var h=new f.embed[l.modes[g].type](document.getElementById(j.id),l.modes[g],p,b,j);if(h.supportsConfig()){h.embed();o(j,l.events);return j}}}f.utils.log("No suitable players found");new f.embed.logo(f.utils.extend({hide:true},l.components.logo),"none",j.id)}}b.addEventListener(f.events.COMPLETE,m);b.addEventListener(f.events.ERROR,m);b.load();return j};function e(){if(!document.body){return setTimeout(e,15)}var g=f.utils.selectors.getElementsByTagAndClass("video","jwplayer");for(var b=0;b<g.length;b++){var a=g[b];f(a.id).setup({})}}e()})(jwplayer);(function(f){function e(){return[{type:"flash",src:"/jwplayer/player.swf"},{type:"html5"},{type:"download"}]}function g(a){var b=a.toLowerCase();var j=["left","right","top","bottom"];for(var k=0;k<j.length;k++){if(b==j[k]){return true}}return false}function h(a){var b=false;b=(a instanceof Array)||(typeof a=="object"&&!a.position&&!a.size);return b}f.embed.config=function(D,s){var u=f.utils.extend({},D);var w;if(h(u.playlist)){w=u.playlist;delete u.playlist}for(var A in u){if(A.indexOf(".")>-1){var b=A.split(".");var a=u;for(var E=0;E<b.length;E++){if(E==b.length-1){if(f.utils.typeOf(a)=="object"){a[b[E]]=u[A];delete u[A]}}else{if(a[b[E]]===undefined){a[b[E]]={}}a=a[b[E]]}}}}if(typeof u.plugins=="string"){var C=u.plugins.split(",");if(typeof u.plugins!="object"){u.plugins={}}for(var y=0;y<C.length;y++){var x=f.utils.getPluginName(C[y]);if(typeof u[x]=="object"){u.plugins[C[y]]=u[x];delete u[x]}else{u.plugins[C[y]]={}}}}var z=["playlist","dock","controlbar"];for(var v=0;v<z.length;v++){if(typeof u[z[v]]=="string"){if(!u.components[z[v]]){u.components[z[v]]={}}u.components[z[v]].position=u[z[v]];delete u[z[v]]}else{if(u[z[v]]){u.components[z[v]]=u[z[v]];delete u[z[v]]}}if(typeof u[z[v]+"size"]!="undefined"){if(!u.components[z[v]]){u.components[z[v]]={}}u.components[z[v]].size=u[z[v]+"size"];delete u[z[v]+"size"]}}if(typeof u.icons!="undefined"){if(!u.components.display){u.components.display={}}u.components.display.icons=u.icons;delete u.icons}if(u.players){u.modes=u.players;delete u.players}var B;if(u.flashplayer&&!u.modes){B=e();B[0].src=u.flashplayer;delete u.flashplayer}else{if(u.modes){if(typeof u.modes=="string"){B=e();B[0].src=u.modes}else{if(u.modes instanceof Array){B=u.modes}else{if(typeof u.modes=="object"&&u.modes.type){B=[u.modes]}}}delete u.modes}else{B=e()}}u.modes=B;if(w){u.playlist=w}return u}})(jwplayer);(function(b){b.embed.download=function(m,h,a,l,j){this.embed=function(){var z=b.utils.extend({},a);var g={};var A=a.width?a.width:480;if(typeof A!="number"){A=parseInt(A,10)}var x=a.height?a.height:320;if(typeof x!="number"){x=parseInt(x,10)}var C,v,w;var e={};if(a.playlist&&a.playlist.length){e.file=a.playlist[0].file;v=a.playlist[0].image;e.levels=a.playlist[0].levels}else{e.file=a.file;v=a.image;e.levels=a.levels}if(e.file){C=e.file}else{if(e.levels&&e.levels.length){C=e.levels[0].file}}w=C?"pointer":"auto";var y={display:{style:{cursor:w,width:A,height:x,backgroundColor:"#000",position:"relative",textDecoration:"none",border:"none",display:"block"}},display_icon:{style:{cursor:w,position:"absolute",display:C?"block":"none",top:0,left:0,border:0,margin:0,padding:0,zIndex:3,width:50,height:50,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"}},display_iconBackground:{style:{cursor:w,position:"absolute",display:C?"block":"none",top:((x-50)/2),left:((A-50)/2),border:0,width:50,height:50,margin:0,padding:0,zIndex:2,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"}},display_image:{style:{width:A,height:x,display:v?"block":"none",position:"absolute",cursor:w,left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1,border:"none"}}};var B=function(r,p,o){var q=document.createElement(r);if(o){q.id=o}else{q.id=m.id+"_jwplayer_"+p}b.utils.css(q,y[p].style);return q};g.display=B("a","display",m.id);if(C){g.display.setAttribute("href",b.utils.getAbsolutePath(C))}g.display_image=B("img","display_image");g.display_image.setAttribute("alt","Click to download...");if(v){g.display_image.setAttribute("src",b.utils.getAbsolutePath(v))}if(true){g.display_icon=B("div","display_icon");g.display_iconBackground=B("div","display_iconBackground");g.display.appendChild(g.display_image);g.display_iconBackground.appendChild(g.display_icon);g.display.appendChild(g.display_iconBackground)}_css=b.utils.css;_hide=function(o){_css(o,{display:"none"})};function f(o){_imageWidth=g.display_image.naturalWidth;_imageHeight=g.display_image.naturalHeight;D()}function D(){b.utils.stretch(b.utils.stretching.UNIFORM,g.display_image,A,x,_imageWidth,_imageHeight)}g.display_image.onerror=function(o){_hide(g.display_image)};g.display_image.onload=f;m.parentNode.replaceChild(g.display,m);var u=(a.plugins&&a.plugins.logo)?a.plugins.logo:{};g.display.appendChild(new b.embed.logo(a.components.logo,"download",m.id));j.container=document.getElementById(j.id);j.setPlayer(g.display,"download")};this.supportsConfig=function(){if(a){var e=b.utils.getFirstPlaylistItemFromConfig(a);if(typeof e.file=="undefined"&&typeof e.levels=="undefined"){return true}else{if(e.file){return k(e.file,e.provider,e.playlistfile)}else{if(e.levels&&e.levels.length){for(var f=0;f<e.levels.length;f++){if(e.levels[f].file&&k(e.levels[f].file,e.provider,e.playlistfile)){return true}}}}}}else{return true}};function k(o,f,p){if(p){return false}var g=["image","sound","youtube","http"];if(f&&(g.toString().indexOf(f)>-1)){return true}if(!f||(f&&f=="video")){var e=b.utils.extension(o);if(e&&b.utils.extensionmap[e]){return true}}return false}}})(jwplayer);(function(b){b.embed.flash=function(u,s,o,v,q){function a(g,h,f){var e=document.createElement("param");e.setAttribute("name",h);e.setAttribute("value",f);g.appendChild(e)}function p(f,e,g){return function(k){if(g){document.getElementById(q.id+"_wrapper").appendChild(e)}var h=document.getElementById(q.id).getPluginConfig("display");f.resize(h.width,h.height);var j={left:h.x,top:h.y};b.utils.css(e,j)}}function w(g){if(!g){return{}}var e={};for(var h in g){var j=g[h];for(var f in j){e[h+"."+f]=j[f]}}return e}function r(g,h){if(g[h]){var e=g[h];for(var j in e){var k=e[j];if(typeof k=="string"){if(!g[j]){g[j]=k}}else{for(var f in k){if(!g[j+"."+f]){g[j+"."+f]=k[f]}}}}delete g[h]}}function y(h){if(!h){return{}}var e={},f=[];for(var l in h){var j=b.utils.getPluginName(l);var k=h[l];f.push(l);for(var g in k){e[j+"."+g]=k[g]}}e.plugins=f.join(",");return e}function x(e){var g=e.netstreambasepath?"":"netstreambasepath="+encodeURIComponent(window.location.href)+"&";for(var f in e){g+=f+"="+encodeURIComponent(e[f])+"&"}return g.substring(0,g.length-1)}function z(e){return function(f){if(e.playlist){this.load(e.playlist)}else{if(e.levels){var g=this.getPlaylistItem(0);if(!g){g=e}if(!g.image){g.image=e.image}if(!g.levels){g.levels=e.levels}this.load(g)}}}}this.embed=function(){if(o.levels||o.playlist){q.onReady(z(o))}o.id=q.id;var k;if(u.id+"_wrapper"==u.parentNode.id){k=document.getElementById(u.id+"_wrapper")}else{k=document.createElement("div");k.id=u.id+"_wrapper";b.utils.wrap(u,k);k.style.position="relative"}var f=b.utils.extend({},o);var h=v.setupPlugins(q,f,p);if(h.length>0){b.utils.extend(f,y(h.plugins))}else{delete f.plugins}var j=f.width;var m=f.height;var e=["height","width","levels","playlist","modes","events"];for(var B=0;B<e.length;B++){delete f[e[B]]}var g="opaque";if(f.wmode){g=f.wmode}r(f,"components");r(f,"providers");var l="#000000";var C;if(b.utils.isIE()){var A='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+l+'" width="'+j+'" height="'+m+'" id="'+u.id+'" name="'+u.id+'">';A+='<param name="movie" value="'+s.src+'">';A+='<param name="allowfullscreen" value="true">';A+='<param name="allowscriptaccess" value="always">';A+='<param name="seamlesstabbing" value="true">';A+='<param name="wmode" value="'+g+'">';A+='<param name="flashvars" value="'+x(f)+'">';A+="</object>";b.utils.setOuterHTML(u,A);C=document.getElementById(u.id)}else{var D=document.createElement("object");D.setAttribute("type","application/x-shockwave-flash");D.setAttribute("data",s.src);D.setAttribute("width",j);D.setAttribute("height",m);D.setAttribute("bgcolor","#000000");D.setAttribute("id",u.id);D.setAttribute("name",u.id);a(D,"allowfullscreen","true");a(D,"allowscriptaccess","always");a(D,"seamlesstabbing","true");a(D,"wmode",g);a(D,"flashvars",x(f));u.parentNode.replaceChild(D,u);C=D}q.container=C;q.setPlayer(C,"flash")};this.supportsConfig=function(){if(b.utils.hasFlash()){if(o){var e=b.utils.getFirstPlaylistItemFromConfig(o);if(typeof e.file=="undefined"&&typeof e.levels=="undefined"){return true}else{if(e.file){return flashCanPlay(e.file,e.provider)}else{if(e.levels&&e.levels.length){for(var f=0;f<e.levels.length;f++){if(e.levels[f].file&&flashCanPlay(e.levels[f].file,e.provider)){return true}}}}}}else{return true}}return false};flashCanPlay=function(h,f){var g=["video","http","sound","image"];if(f&&(g.toString().indexOf(f<0))){return true}var e=b.utils.extension(h);if(!e){return true}if(b.utils.extensionmap[e]!==undefined&&b.utils.extensionmap[e].flash===undefined){return false}return true}}})(jwplayer);(function(b){b.embed.html5=function(m,h,a,l,j){function k(f,e,g){return function(q){var p=document.getElementById(m.id+"_displayarea");if(g){p.appendChild(e)}var o=p.style;f.resize(parseInt(o.width.replace("px","")),parseInt(o.height.replace("px","")));e.left=o.left;e.top=o.top}}this.embed=function(){if(b.html5){l.setupPlugins(j,a,k);m.innerHTML="";var g=b.utils.extend({screencolor:"0x000000"},a);var o=["plugins","modes","events"];for(var f=0;f<o.length;f++){delete g[o[f]]}if(g.levels&&!g.sources){g.sources=a.levels}if(g.skin&&g.skin.toLowerCase().indexOf(".zip")>0){g.skin=g.skin.replace(/\.zip/i,".xml")}var e=new (b.html5(m)).setup(g);j.container=document.getElementById(j.id);j.setPlayer(e,"html5")}else{return null}};this.supportsConfig=function(){var g=document.createElement("video");if(!!g.canPlayType){if(a){var e=b.utils.getFirstPlaylistItemFromConfig(a);if(typeof e.file=="undefined"&&typeof e.levels=="undefined"){return true}else{if(e.file){return html5CanPlay(g,e.file,e.provider,e.playlistfile)}else{if(e.levels&&e.levels.length){for(var f=0;f<e.levels.length;f++){if(e.levels[f].file&&html5CanPlay(g,e.levels[f].file,e.provider,e.playlistfile)){return true}}}}}}else{return true}}return false};html5CanPlay=function(g,o,f,p){if(p){return false}if(f&&f=="youtube"){return true}if(f&&f!="video"&&f!="http"){return false}var e=b.utils.extension(o);if(!e||b.utils.extensionmap[e]===undefined){return true}if(b.utils.extensionmap[e].html5===undefined){return false}if(b.utils.isLegacyAndroid()&&e.match(/m4v|mp4/)){return true}return browserCanPlay(g,b.utils.extensionmap[e].html5)};browserCanPlay=function(e,f){if(!f){return true}return e.canPlayType(f)}}})(jwplayer);(function(b){b.embed.logo=function(r,s,A){var v={prefix:"http://l.longtailvideo.com/"+s+"/",file:"",link:"",margin:8,out:0.5,over:1,timeout:3,hide:false,position:"bottom-left"};_css=b.utils.css;var C;var w;u();function u(){p();B();y()}function p(){if(v.prefix){var e=b.version.split(/\W/).splice(0,2).join("/");if(v.prefix.indexOf(e)<0){v.prefix+=e+"/"}}w=b.utils.extend({},v,r)}function a(){var e={border:"none",textDecoration:"none",position:"absolute",cursor:"pointer",zIndex:10};e.display=w.hide?"none":"block";var f=w.position.toLowerCase().split("-");for(var g in f){e[f[g]]=w.margin}return e}function B(){C=document.createElement("img");C.id=A+"_jwplayer_logo";C.style.display="none";C.onload=function(e){_css(C,a());z()};if(!w.file){return}if(w.file.indexOf("http://")===0){C.src=w.file}else{C.src=w.prefix+w.file}}if(!w.file){return}function y(){if(w.link){C.onmouseover=x;C.onmouseout=z;C.onclick=q}else{this.mouseEnabled=false}}function q(e){if(typeof e!="undefined"){e.preventDefault();e.stopPropagation()}if(w.link){window.open(w.link,"_blank")}return}function z(e){if(w.link){C.style.opacity=w.out}return}function x(e){if(w.hide){C.style.opacity=w.over}return}return C}})(jwplayer);(function(b){b.html5=function(a){var e=a;this.setup=function(f){b.utils.extend(this,new b.html5.api(e,f));return this};return this}})(jwplayer);(function(e){var g=e.utils.css;e.html5.view=function(K,L,V){var G=K;var O=L;var D=V;var E;var U;var a;var I;var J;var M;function B(){E=document.createElement("div");E.id=O.id;E.className=O.className;_videowrapper=document.createElement("div");_videowrapper.id=E.id+"_video_wrapper";O.id=E.id+"_video";g(E,{position:"relative",height:D.height,width:D.width,padding:0,backgroundColor:h(),zIndex:0});function h(){if(G.skin.getComponentSettings("display")&&G.skin.getComponentSettings("display").backgroundcolor){return G.skin.getComponentSettings("display").backgroundcolor}return parseInt("000000",16)}g(O,{width:D.width,height:D.height,top:0,left:0,zIndex:1,margin:"auto",display:"block"});g(_videowrapper,{overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0});e.utils.wrap(O,E);e.utils.wrap(O,_videowrapper);I=document.createElement("div");I.id=E.id+"_displayarea";E.appendChild(I)}function Q(){for(var j=0;j<D.plugins.order.length;j++){var h=D.plugins.order[j];if(D.plugins.object[h].getDisplayElement!==undefined){D.plugins.object[h].height=S(D.plugins.object[h].getDisplayElement().style.height);D.plugins.object[h].width=S(D.plugins.object[h].getDisplayElement().style.width);D.plugins.config[h].currentPosition=D.plugins.config[h].position}}F()}function F(j){if(D.getMedia()!==undefined){for(var k=0;k<D.plugins.order.length;k++){var h=D.plugins.order[k];if(D.plugins.object[h].getDisplayElement!==undefined){if(D.getMedia().hasChrome()){D.plugins.config[h].currentPosition=e.html5.view.positions.NONE}else{D.plugins.config[h].currentPosition=D.plugins.config[h].position}}}}R(D.width,D.height)}function S(h){if(typeof h=="string"){if(h===""){return 0}else{if(h.lastIndexOf("%")>-1){return h}else{return parseInt(h.replace("px",""),10)}}}return h}this.setup=function(j){O=j;B();Q();G.jwAddEventListener(e.api.events.JWPLAYER_MEDIA_LOADED,F);G.jwAddEventListener(e.api.events.JWPLAYER_MEDIA_META,function(){C()});var h;if(window.onresize!==null){h=window.onresize}window.onresize=function(m){if(h!==undefined){try{h(m)}catch(k){}}if(G.jwGetFullscreen()){var l=document.body.getBoundingClientRect();D.width=Math.abs(l.left)+Math.abs(l.right);D.height=window.innerHeight}R(D.width,D.height)}};function T(h){switch(h.keyCode){case 27:if(G.jwGetFullscreen()){G.jwSetFullscreen(false)}break;case 32:if(G.jwGetState()!=e.api.events.state.IDLE&&G.jwGetState()!=e.api.events.state.PAUSED){G.jwPause()}else{G.jwPlay()}break}}function R(h,l){if(E.style.display=="none"){return}var j=[].concat(D.plugins.order);j.reverse();J=j.length+2;if(!D.fullscreen){D.width=h;D.height=l;U=h;a=l;g(I,{top:0,bottom:0,left:0,right:0,width:h,height:l});g(E,{height:a,width:U});var k=N(H,j);if(k.length>0){J+=k.length;N(P,k,true)}}else{if(navigator.vendor.indexOf("Apple")!==0){N(b,j,true)}}C()}function N(j,m,l){var o=[];for(var p=0;p<m.length;p++){var h=m[p];if(D.plugins.object[h].getDisplayElement!==undefined){if(D.plugins.config[h].currentPosition!=e.html5.view.positions.NONE){var k=j(h,J--);if(!k){o.push(h)}else{D.plugins.object[h].resize(k.width,k.height);if(l){delete k.width;delete k.height}g(D.plugins.object[h].getDisplayElement(),k)}}else{g(D.plugins.object[h].getDisplayElement(),{display:"none"})}}}return o}function H(j,h){if(D.plugins.object[j].getDisplayElement!==undefined){if(D.plugins.config[j].position&&f(D.plugins.config[j].position)){if(D.plugins.object[j].getDisplayElement().parentNode===null){E.appendChild(D.plugins.object[j].getDisplayElement())}var k=W(j);k.zIndex=h;return k}}return false}function P(j,h){if(D.plugins.object[j].getDisplayElement().parentNode===null){I.appendChild(D.plugins.object[j].getDisplayElement())}var l=D.width,k=D.height;if(typeof D.width=="string"&&D.width.lastIndexOf("%")>-1){percentage=parseFloat(D.width.substring(0,D.width.lastIndexOf("%")))/100;l=Math.round(window.innerWidth*percentage)}if(typeof D.height=="string"&&D.height.lastIndexOf("%")>-1){percentage=parseFloat(D.height.substring(0,D.height.lastIndexOf("%")))/100;k=Math.round(window.innerHeight*percentage)}return{position:"absolute",width:(l-S(I.style.left)-S(I.style.right)),height:(k-S(I.style.top)-S(I.style.bottom)),zIndex:h}}function b(j,h){return{position:"fixed",width:D.width,height:D.height,zIndex:h}}function C(){I.style.position="absolute";D.getMedia().getDisplayElement().style.position="absolute";if(D.getMedia().getDisplayElement().videoWidth==0||D.getMedia().getDisplayElement().videoHeight==0){return}var k,h;if(I.style.width.toString().lastIndexOf("%")>-1||I.style.width.toString().lastIndexOf("%")>-1){var j=I.getBoundingClientRect();k=Math.abs(j.left)+Math.abs(j.right);h=Math.abs(j.top)+Math.abs(j.bottom)}else{k=S(I.style.width);h=S(I.style.height)}e.utils.stretch(G.jwGetStretching(),D.getMedia().getDisplayElement(),k,h,D.getMedia().getDisplayElement().videoWidth,D.getMedia().getDisplayElement().videoHeight)}function W(j){var h={position:"absolute",margin:0,padding:0,top:null};var k=D.plugins.config[j].currentPosition.toLowerCase();switch(k.toUpperCase()){case e.html5.view.positions.TOP:h.top=S(I.style.top);h.left=S(I.style.left);h.width=U-S(I.style.left)-S(I.style.right);h.height=D.plugins.object[j].height;I.style[k]=S(I.style[k])+D.plugins.object[j].height+"px";I.style.height=S(I.style.height)-h.height+"px";break;case e.html5.view.positions.RIGHT:h.top=S(I.style.top);h.right=S(I.style.right);h.width=h.width=D.plugins.object[j].width;h.height=a-S(I.style.top)-S(I.style.bottom);I.style[k]=S(I.style[k])+D.plugins.object[j].width+"px";I.style.width=S(I.style.width)-h.width+"px";break;case e.html5.view.positions.BOTTOM:h.bottom=S(I.style.bottom);h.left=S(I.style.left);h.width=U-S(I.style.left)-S(I.style.right);h.height=D.plugins.object[j].height;I.style[k]=S(I.style[k])+D.plugins.object[j].height+"px";I.style.height=S(I.style.height)-h.height+"px";break;case e.html5.view.positions.LEFT:h.top=S(I.style.top);h.left=S(I.style.left);h.width=D.plugins.object[j].width;h.height=a-S(I.style.top)-S(I.style.bottom);I.style[k]=S(I.style[k])+D.plugins.object[j].width+"px";I.style.width=S(I.style.width)-h.width+"px";break;default:break}return h}this.resize=R;this.fullscreen=function(h){if(navigator.vendor.indexOf("Apple")===0){if(D.getMedia().getDisplayElement().webkitSupportsFullscreen){if(h){try{D.getMedia().getDisplayElement().webkitEnterFullscreen()}catch(j){}}else{try{D.getMedia().getDisplayElement().webkitExitFullscreen()}catch(j){}}}}else{if(h){document.onkeydown=T;clearInterval(M);var k=document.body.getBoundingClientRect();D.width=Math.abs(k.left)+Math.abs(k.right);D.height=window.innerHeight;var l={position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:2147483000};g(E,l);l.zIndex=1;g(D.getMedia().getDisplayElement(),l);l.zIndex=2;g(I,l)}else{document.onkeydown="";D.width=U;D.height=a;g(E,{position:"relative",height:D.height,width:D.width,zIndex:0})}R(D.width,D.height)}}};function f(a){return([e.html5.view.positions.TOP,e.html5.view.positions.RIGHT,e.html5.view.positions.BOTTOM,e.html5.view.positions.LEFT].toString().indexOf(a.toUpperCase())>-1)}e.html5.view.positions={TOP:"TOP",RIGHT:"RIGHT",BOTTOM:"BOTTOM",LEFT:"LEFT",OVER:"OVER",NONE:"NONE"}})(jwplayer);(function(f){var e={backgroundcolor:"",margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",buttoncolor:parseInt("ffffff",16),position:f.html5.view.positions.BOTTOM,idlehide:false,layout:{left:{position:"left",elements:[{name:"play",type:"button"},{name:"divider",type:"divider"},{name:"prev",type:"button"},{name:"divider",type:"divider"},{name:"next",type:"button"},{name:"divider",type:"divider"},{name:"elapsed",type:"text"}]},center:{position:"center",elements:[{name:"time",type:"slider"}]},right:{position:"right",elements:[{name:"duration",type:"text"},{name:"blank",type:"button"},{name:"divider",type:"divider"},{name:"mute",type:"button"},{name:"volume",type:"slider"},{name:"divider",type:"divider"},{name:"fullscreen",type:"button"}]}}};_css=f.utils.css;_hide=function(a){_css(a,{display:"none"})};_show=function(a){_css(a,{display:"block"})};f.html5.controlbar=function(aF,ac){var aG=aF;var an=f.utils.extend({},e,aG.skin.getComponentSettings("controlbar"),ac);if(an.position==f.html5.view.positions.NONE||typeof f.html5.view.positions[an.position]=="undefined"){return}if(f.utils.mapLength(aG.skin.getComponentLayout("controlbar"))>0){an.layout=aG.skin.getComponentLayout("controlbar")}var Y;var af;var Z;var am;var av="none";var aJ;var aH;var X;var aK;var aL;var ar;var aw;var ae={};var aB=false;var aM={};function ag(){Z=0;am=0;af=0;if(!aB){var h={height:aG.skin.getSkinElement("controlbar","background").height,backgroundColor:an.backgroundcolor};Y=document.createElement("div");Y.id=aG.id+"_jwplayer_controlbar";_css(Y,h)}at("capLeft","left",false,Y);var g={position:"absolute",height:aG.skin.getSkinElement("controlbar","background").height,left:aG.skin.getSkinElement("controlbar","capLeft").width,zIndex:0};aa("background",Y,g,"img");if(aG.skin.getSkinElement("controlbar","background")){ae.background.src=aG.skin.getSkinElement("controlbar","background").src}g.zIndex=1;aa("elements",Y,g);at("capRight","right",false,Y)}this.getDisplayElement=function(){return Y};this.resize=function(j,h){f.utils.cancelAnimation(Y);document.getElementById(aG.id).onmousemove=aq;aL=j;ar=h;aq();var g=au();ak({id:aG.id,duration:X,position:aH});ax({id:aG.id,bufferPercent:aK});return g};function aA(){var g=["timeSlider","volumeSlider","timeSliderRail","volumeSliderRail"];for(var j in g){var h=g[j];if(typeof ae[h]!="undefined"){aM[h]=ae[h].getBoundingClientRect()}}}function aq(){f.utils.cancelAnimation(Y);if(aI()){f.utils.fadeTo(Y,1,0,1,0)}else{f.utils.fadeTo(Y,0,0.1,1,2)}}function aI(){if(aG.jwGetState()==f.api.events.state.IDLE||aG.jwGetState()==f.api.events.state.PAUSED){if(an.idlehide){return false}return true}if(aG.jwGetFullscreen()){return false}if(an.position==f.html5.view.positions.OVER){return false}return true}function aa(j,k,l,h){var g;if(!aB){if(!h){h="div"}g=document.createElement(h);ae[j]=g;g.id=Y.id+"_"+j;k.appendChild(g)}else{g=document.getElementById(Y.id+"_"+j)}if(l!==undefined){_css(g,l)}return g}function ah(){a(an.layout.left);a(an.layout.right,-1);a(an.layout.center)}function a(k,h){var j=k.position=="right"?"right":"left";var l=f.utils.extend([],k.elements);if(h!==undefined){l.reverse()}for(var g=0;g<l.length;g++){ao(l[g],j)}}function aj(){return af++}function ao(h,q){var j,l,k,m,o;switch(h.name){case"play":at("playButton",q,false);at("pauseButton",q,true);ad("playButton","jwPlay");ad("pauseButton","jwPause");break;case"divider":at("divider"+aj(),q,true,undefined,undefined,h.width);break;case"prev":at("prevButton",q,true);ad("prevButton","jwPlaylistPrev");break;case"next":at("nextButton",q,true);ad("nextButton","jwPlaylistNext");break;case"elapsed":at("elapsedText",q,true);break;case"time":l=aG.skin.getSkinElement("controlbar","timeSliderCapLeft")===undefined?0:aG.skin.getSkinElement("controlbar","timeSliderCapLeft").width;k=aG.skin.getSkinElement("controlbar","timeSliderCapRight")===undefined?0:aG.skin.getSkinElement("controlbar","timeSliderCapRight").width;j=q=="left"?l:k;m=aG.skin.getSkinElement("controlbar","timeSliderRail").width+l+k;o={height:aG.skin.getSkinElement("controlbar","background").height,position:"absolute",top:0,width:m};o[q]=q=="left"?Z:am;var g=aa("timeSlider",ae.elements,o);at("timeSliderCapLeft",q,true,g,q=="left"?0:j);at("timeSliderRail",q,false,g,j);at("timeSliderBuffer",q,false,g,j);at("timeSliderProgress",q,false,g,j);at("timeSliderThumb",q,false,g,j);at("timeSliderCapRight",q,true,g,q=="right"?0:j);ab("time");break;case"fullscreen":at("fullscreenButton",q,false);at("normalscreenButton",q,true);ad("fullscreenButton","jwSetFullscreen",true);ad("normalscreenButton","jwSetFullscreen",false);break;case"volume":l=aG.skin.getSkinElement("controlbar","volumeSliderCapLeft")===undefined?0:aG.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;k=aG.skin.getSkinElement("controlbar","volumeSliderCapRight")===undefined?0:aG.skin.getSkinElement("controlbar","volumeSliderCapRight").width;j=q=="left"?l:k;m=aG.skin.getSkinElement("controlbar","volumeSliderRail").width+l+k;o={height:aG.skin.getSkinElement("controlbar","background").height,position:"absolute",top:0,width:m};o[q]=q=="left"?Z:am;var p=aa("volumeSlider",ae.elements,o);at("volumeSliderCapLeft",q,true,p,q=="left"?0:j);at("volumeSliderRail",q,true,p,j);at("volumeSliderProgress",q,false,p,j);at("volumeSliderCapRight",q,true,p,q=="right"?0:j);ab("volume");break;case"mute":at("muteButton",q,false);at("unmuteButton",q,true);ad("muteButton","jwSetMute",true);ad("unmuteButton","jwSetMute",false);break;case"duration":at("durationText",q,true);break}}function at(k,g,l,p,j,m){if((aG.skin.getSkinElement("controlbar",k)!==undefined||k.indexOf("Text")>0||k.indexOf("divider")===0)&&!(k.indexOf("divider")===0&&aw.indexOf("divider")===0)){aw=k;var h={height:aG.skin.getSkinElement("controlbar","background").height,position:"absolute",display:"block",top:0};if((k.indexOf("next")===0||k.indexOf("prev")===0)&&aG.jwGetPlaylist().length<2){l=false;h.display="none"}var o;if(k.indexOf("Text")>0){k.innerhtml="00:00";h.font=an.fontsize+"px/"+(aG.skin.getSkinElement("controlbar","background").height+1)+"px "+an.font;h.color=an.fontcolor;h.textAlign="center";h.fontWeight=an.fontweight;h.fontStyle=an.fontstyle;h.cursor="default";o=14+3*an.fontsize}else{if(k.indexOf("divider")===0){if(m){if(!isNaN(parseInt(m))){o=parseInt(m)}}else{h.background="url("+aG.skin.getSkinElement("controlbar","divider").src+") repeat-x center left";o=aG.skin.getSkinElement("controlbar","divider").width}}else{h.background="url("+aG.skin.getSkinElement("controlbar",k).src+") repeat-x center left";o=aG.skin.getSkinElement("controlbar",k).width}}if(g=="left"){h.left=isNaN(j)?Z:j;if(l){Z+=o}}else{if(g=="right"){h.right=isNaN(j)?am:j;if(l){am+=o}}}if(f.utils.typeOf(p)=="undefined"){p=ae.elements}h.width=o;if(aB){_css(ae[k],h)}else{var q=aa(k,p,h);if(aG.skin.getSkinElement("controlbar",k+"Over")!==undefined){q.onmouseover=function(r){q.style.backgroundImage=["url(",aG.skin.getSkinElement("controlbar",k+"Over").src,")"].join("")};q.onmouseout=function(r){q.style.backgroundImage=["url(",aG.skin.getSkinElement("controlbar",k).src,")"].join("")}}}}}function al(){aG.jwAddEventListener(f.api.events.JWPLAYER_PLAYLIST_LOADED,ap);aG.jwAddEventListener(f.api.events.JWPLAYER_MEDIA_BUFFER,ax);aG.jwAddEventListener(f.api.events.JWPLAYER_PLAYER_STATE,az);aG.jwAddEventListener(f.api.events.JWPLAYER_MEDIA_TIME,ak);aG.jwAddEventListener(f.api.events.JWPLAYER_MEDIA_MUTE,b);aG.jwAddEventListener(f.api.events.JWPLAYER_MEDIA_VOLUME,aE);aG.jwAddEventListener(f.api.events.JWPLAYER_MEDIA_COMPLETE,ai)}function ap(){ag();ah();au();W()}function W(){ak({id:aG.id,duration:aG.jwGetDuration(),position:0});ax({id:aG.id,bufferProgress:0});b({id:aG.id,mute:aG.jwGetMute()});az({id:aG.id,newstate:f.api.events.state.IDLE});aE({id:aG.id,volume:aG.jwGetVolume()})}function ad(k,j,g){if(aB){return}if(aG.skin.getSkinElement("controlbar",k)!==undefined){var h=ae[k];if(h!==null){_css(h,{cursor:"pointer"});if(j=="fullscreen"){h.onmouseup=function(l){l.stopPropagation();aG.jwSetFullscreen(!aG.jwGetFullscreen())}}else{h.onmouseup=function(l){l.stopPropagation();if(g!==null){aG[j](g)}else{aG[j]()}}}}}}function ab(h){if(aB){return}var g=ae[h+"Slider"];_css(ae.elements,{cursor:"pointer"});_css(g,{cursor:"pointer"});g.onmousedown=function(j){av=h};g.onmouseup=function(j){j.stopPropagation();V(j.pageX)};g.onmousemove=function(k){if(av=="time"){aJ=true;var j=k.pageX-aM[h+"Slider"].left-window.pageXOffset;_css(ae.timeSliderThumb,{left:j})}}}function V(g){aJ=false;var h;if(av=="time"){h=g-aM.timeSliderRail.left+window.pageXOffset;var j=h/aM.timeSliderRail.width*X;if(j<0){j=0}else{if(j>X){j=X-3}}aG.jwSeek(j);if(aG.jwGetState()!=f.api.events.state.PLAYING){aG.jwPlay()}}else{if(av=="volume"){h=g-aM.volumeSliderRail.left-window.pageXOffset;var k=Math.round(h/aM.volumeSliderRail.width*100);if(k<0){k=0}else{if(k>100){k=100}}if(aG.jwGetMute()){aG.jwSetMute(false)}aG.jwSetVolume(k)}}av="none"}function ax(g){if(g.bufferPercent!==null){aK=g.bufferPercent}var j=aM.timeSliderRail.width;var h=isNaN(Math.round(j*aK/100))?0:Math.round(j*aK/100);_css(ae.timeSliderBuffer,{width:h})}function b(g){if(g.mute){_hide(ae.muteButton);_show(ae.unmuteButton);_hide(ae.volumeSliderProgress)}else{_show(ae.muteButton);_hide(ae.unmuteButton);_show(ae.volumeSliderProgress)}}function az(g){if(g.newstate==f.api.events.state.BUFFERING||g.newstate==f.api.events.state.PLAYING){_show(ae.pauseButton);_hide(ae.playButton)}else{_hide(ae.pauseButton);_show(ae.playButton)}aq();if(g.newstate==f.api.events.state.IDLE){_hide(ae.timeSliderBuffer);_hide(ae.timeSliderProgress);_hide(ae.timeSliderThumb);ak({id:aG.id,duration:aG.jwGetDuration(),position:0})}else{_show(ae.timeSliderBuffer);if(g.newstate!=f.api.events.state.BUFFERING){_show(ae.timeSliderProgress);_show(ae.timeSliderThumb)}}}function ai(g){ax({bufferPercent:0});ak(f.utils.extend(g,{position:0,duration:X}))}function ak(j){if(j.position!==null){aH=j.position}if(j.duration!==null){X=j.duration}var g=(aH===X===0)?0:aH/X;var h=isNaN(Math.round(aM.timeSliderRail.width*g))?0:Math.round(aM.timeSliderRail.width*g);var k=h;ae.timeSliderProgress.style.width=h+"px";if(!aJ){if(ae.timeSliderThumb){ae.timeSliderThumb.style.left=k+"px"}}if(ae.durationText){ae.durationText.innerHTML=aC(X)}if(ae.elapsedText){ae.elapsedText.innerHTML=aC(aH)}}function aC(g){str="00:00";if(g>0){str=Math.floor(g/60)<10?"0"+Math.floor(g/60)+":":Math.floor(g/60)+":";str+=Math.floor(g%60)<10?"0"+Math.floor(g%60):Math.floor(g%60)}return str}function aD(){var j,g;var k=document.getElementById(Y.id+"_elements").childNodes;for(var h in document.getElementById(Y.id+"_elements").childNodes){if(isNaN(parseInt(h,10))){continue}if(k[h].id.indexOf(Y.id+"_divider")===0&&g.id.indexOf(Y.id+"_divider")===0){k[h].style.display="none"}else{if(k[h].id.indexOf(Y.id+"_divider")===0&&j.style.display!="none"){k[h].style.display="block"}}if(k[h].style.display!="none"){g=k[h]}j=k[h]}}function au(){aD();if(aG.jwGetFullscreen()){_show(ae.normalscreenButton);_hide(ae.fullscreenButton)}else{_hide(ae.normalscreenButton);_show(ae.fullscreenButton)}var g={width:aL};var h={};if(an.position==f.html5.view.positions.OVER||aG.jwGetFullscreen()){g.left=an.margin;g.width-=2*an.margin;g.top=ar-aG.skin.getSkinElement("controlbar","background").height-an.margin;g.height=aG.skin.getSkinElement("controlbar","background").height}else{g.left=0}h.left=aG.skin.getSkinElement("controlbar","capLeft").width;h.width=g.width-aG.skin.getSkinElement("controlbar","capLeft").width-aG.skin.getSkinElement("controlbar","capRight").width;var j=aG.skin.getSkinElement("controlbar","timeSliderCapLeft")===undefined?0:aG.skin.getSkinElement("controlbar","timeSliderCapLeft").width;_css(ae.timeSliderRail,{width:(h.width-Z-am),left:j});if(ae.timeSliderCapRight!==undefined){_css(ae.timeSliderCapRight,{left:j+(h.width-Z-am)})}_css(Y,g);_css(ae.elements,h);_css(ae.background,h);aA();return g}function aE(k){if(ae.volumeSliderRail!==undefined){var m=isNaN(k.volume/100)?1:k.volume/100;var l=parseInt(ae.volumeSliderRail.style.width.replace("px",""),10);var h=isNaN(Math.round(l*m))?0:Math.round(l*m);var j=parseInt(ae.volumeSliderRail.style.right.replace("px",""),10);var g=aG.skin.getSkinElement("controlbar","volumeSliderCapLeft")===undefined?0:aG.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;_css(ae.volumeSliderProgress,{width:h,left:g});if(ae.volumeSliderCapLeft!==undefined){_css(ae.volumeSliderCapLeft,{left:0})}}}function ay(){ag();ah();aA();aB=true;al();W();Y.style.opacity=an.idlehide?0:1}ay();return this}})(jwplayer);(function(e){var f=["width","height","state","playlist","item","position","buffer","duration","volume","mute","fullscreen"];e.html5.controller=function(H,K,Z,M){var E=H;var b=Z;var aa=M;var T=K;var N=true;var ab=-1;var G=(b.config.debug!==undefined)&&(b.config.debug.toString().toLowerCase()=="console");var V=new e.html5.eventdispatcher(T.id,G);e.utils.extend(this,V);function R(g){V.sendEvent(g.type,g)}b.addGlobalListener(R);function O(){try{if(b.playlist[b.item].levels[0].file.length>0){if(N||b.state==e.api.events.state.IDLE){b.addEventListener(e.api.events.JWPLAYER_MEDIA_BUFFER_FULL,function(){b.getMedia().play()});b.addEventListener(e.api.events.JWPLAYER_MEDIA_TIME,function(h){if(h.position>=b.playlist[b.item].start&&ab>=0){b.playlist[b.item].start=ab;ab=-1}});if(b.config.repeat){b.addEventListener(e.api.events.JWPLAYER_MEDIA_COMPLETE,function(h){setTimeout(Q,25)})}b.getMedia().load(b.playlist[b.item]);N=false}else{if(b.state==e.api.events.state.PAUSED){b.getMedia().play()}}}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function L(){try{if(b.playlist[b.item].levels[0].file.length>0){switch(b.state){case e.api.events.state.PLAYING:case e.api.events.state.BUFFERING:b.getMedia().pause();break}}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function D(h){try{if(b.playlist[b.item].levels[0].file.length>0){if(typeof h!="number"){h=parseFloat(h)}switch(b.state){case e.api.events.state.IDLE:if(ab<0){ab=b.playlist[b.item].start;b.playlist[b.item].start=h}O();break;case e.api.events.state.PLAYING:case e.api.events.state.PAUSED:case e.api.events.state.BUFFERING:b.getMedia().seek(h);break}}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function U(){try{if(b.playlist[b.item].levels[0].file.length>0&&b.state!=e.api.events.state.IDLE){b.getMedia().stop()}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function X(){try{if(b.playlist[b.item].levels[0].file.length>0){if(b.config.shuffle){P(I())}else{if(b.item+1==b.playlist.length){P(0)}else{P(b.item+1)}}}if(b.state!=e.api.events.state.PLAYING&&b.state!=e.api.events.state.BUFFERING){O()}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function Y(){try{if(b.playlist[b.item].levels[0].file.length>0){if(b.config.shuffle){P(I())}else{if(b.item===0){P(b.playlist.length-1)}else{P(b.item-1)}}}if(b.state!=e.api.events.state.PLAYING&&b.state!=e.api.events.state.BUFFERING){O()}return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function I(){var g=null;if(b.playlist.length>1){while(g===null){g=Math.floor(Math.random()*b.playlist.length);if(g==b.item){g=null}}}else{g=0}return g}function P(h){b.resetEventListeners();b.addGlobalListener(R);try{if(b.playlist[h].levels[0].file.length>0){var g=b.state;if(g!==e.api.events.state.IDLE){U()}b.item=h;N=true;b.setActiveMediaProvider(b.playlist[b.item]);V.sendEvent(e.api.events.JWPLAYER_PLAYLIST_ITEM,{index:h});if(g==e.api.events.state.PLAYING||g==e.api.events.state.BUFFERING||b.config.chromeless||Z.config.autostart===true){O()}}return true}catch(j){V.sendEvent(e.api.events.JWPLAYER_ERROR,j)}return false}function a(g){try{switch(typeof(g)){case"number":b.getMedia().volume(g);break;case"string":b.getMedia().volume(parseInt(g,10));break}return true}catch(h){V.sendEvent(e.api.events.JWPLAYER_ERROR,h)}return false}function S(g){try{if(typeof g=="undefined"){b.getMedia().mute(!b.mute)}else{if(g.toString().toLowerCase()=="true"){b.getMedia().mute(true)}else{b.getMedia().mute(false)}}return true}catch(h){V.sendEvent(e.api.events.JWPLAYER_ERROR,h)}return false}function W(h,j){try{b.width=h;b.height=j;aa.resize(h,j);V.sendEvent(e.api.events.JWPLAYER_RESIZE,{width:b.width,height:b.height});return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}function F(g){try{if(typeof g=="undefined"){b.fullscreen=!b.fullscreen;aa.fullscreen(!b.fullscreen)}else{if(g.toString().toLowerCase()=="true"){b.fullscreen=true;aa.fullscreen(true)}else{b.fullscreen=false;aa.fullscreen(false)}}V.sendEvent(e.api.events.JWPLAYER_RESIZE,{width:b.width,height:b.height});V.sendEvent(e.api.events.JWPLAYER_FULLSCREEN,{fullscreen:g});return true}catch(h){V.sendEvent(e.api.events.JWPLAYER_ERROR,h)}return false}function J(h){try{U();b.loadPlaylist(h);P(b.item);return true}catch(g){V.sendEvent(e.api.events.JWPLAYER_ERROR,g)}return false}e.html5.controller.repeatoptions={LIST:"LIST",ALWAYS:"ALWAYS",SINGLE:"SINGLE",NONE:"NONE"};function Q(){b.resetEventListeners();b.addGlobalListener(R);switch(b.config.repeat.toUpperCase()){case e.html5.controller.repeatoptions.SINGLE:O();break;case e.html5.controller.repeatoptions.ALWAYS:if(b.item==b.playlist.length-1&&!b.config.shuffle){P(0);O()}else{X()}break;case e.html5.controller.repeatoptions.LIST:if(b.item==b.playlist.length-1&&!b.config.shuffle){P(0)}else{X()}break}}this.play=O;this.pause=L;this.seek=D;this.stop=U;this.next=X;this.prev=Y;this.item=P;this.setVolume=a;this.setMute=S;this.resize=W;this.setFullscreen=F;this.load=J}})(jwplayer);(function(b){b.html5.defaultSkin=function(){this.text='<?xml version="1.0" ?><skin author="LongTail Video" name="Five" version="1.0"><settings><setting name="backcolor" value="0xFFFFFF"/><setting name="frontcolor" value="0x000000"/><setting name="lightcolor" value="0x000000"/><setting name="screencolor" value="0x000000"/></settings><components><component name="controlbar"><settings><setting name="margin" value="20"/><setting name="fontsize" value="11"/></settings><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAIAAABvFaqvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFJJREFUeNrslLENwAAIwxLU/09j5AiOgD5hVQzNAVY8JK4qEfHMIKBnd2+BQlBINaiRtL/aV2rdzYBsM6CIONbI1NZENTr3RwdB2PlnJgJ6BRgA4hwu5Qg5iswAAAAASUVORK5CYII="/><element name="capLeft" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="capRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD5JREFUeNosi8ENACAMAgnuv14H0Z8asI19XEjhOiKCMmibVgJTUt7V6fe9KXOtSQCfctJHu2q3/ot79hNgANc2OTz9uTCCAAAAAElFTkSuQmCC"/><element name="playButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhJREFUeNpiYqABYBo1dNRQ+hr6H4jvA3E8NS39j4SpZvh/LJig4YxEGEqy3kET+w+AOGFQRhTJhrEQkGcczfujhg4CQwECDADpTRWU/B3wHQAAAABJRU5ErkJggg=="/><element name="pauseButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAChJREFUeNpiYBgFo2DwA0YC8v/R1P4nRu+ooaOGUtnQUTAKhgIACDAAFCwQCfAJ4gwAAAAASUVORK5CYII="/><element name="prevButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEtJREFUeNpiYBgFo2Dog/9QDAPyQHweTYwiQ/2B+D0Wi8g2tB+JTdBQRiIMJVkvEy0iglhDF9Aq9uOpHVEwoE+NJDUKRsFgAAABBgDe2hqZcNNL0AAAAABJRU5ErkJggg=="/><element name="nextButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAElJREFUeNpiYBgFo2Dog/9AfB6I5dHE/lNqKAi/B2J/ahsKw/3EGMpIhKEk66WJoaR6fz61IyqemhEFSlL61ExSo2AUDAYAEGAAiG4hj+5t7M8AAAAASUVORK5CYII="/><element name="timeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADxJREFUeNpiYBgFo2AU0Bwwzluw+D8tLWARFhKiqQ9YuLg4aWsBGxs7bS1gZ6e5BWyjSX0UjIKhDgACDABlYQOGh5pYywAAAABJRU5ErkJggg=="/><element name="timeSliderBuffer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYBgFo2AU0Bww1jc0/aelBSz8/Pw09QELOzs7bS1gY2OjrQWsrKy09gHraFIfBaNgqAOAAAMAvy0DChXHsZMAAAAASUVORK5CYII="/><element name="timeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiYBgFo2AU0BwwAvF/WlrARGsfjFow8BaMglEwCugAAAIMAOHfAQunR+XzAAAAAElFTkSuQmCC"/><element name="timeSliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAICAYAAAA870V8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABZJREFUeNpiZICA/yCCiQEJUJcDEGAAY0gBD1/m7Q0AAAAASUVORK5CYII="/><element name="muteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiYBgFIw3MB+L/5Gj8j6yRiRTFyICJXHfTXyMLAXlGati4YDRFDj8AEGAABk8GSqqS4CoAAAAASUVORK5CYII="/><element name="unmuteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYBgFgxz8p7bm+cQa+h8LHy7GhEcjIz4bmAjYykiun/8j0fakGPIfTfPgiSr6aB4FVAcAAQYAWdwR1G1Wd2gAAAAASUVORK5CYII="/><element name="volumeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAYCAYAAADkgu3FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGpJREFUeNpi/P//PwM9ABMDncCoRYPfIqqDZcuW1UPp/6AUDcNM1DQYKtRAlaAj1mCSLSLXYIIWUctgDItoZfDA5aOoqKhGEANIM9LVR7SymGDQUctikuOIXkFNdhHEOFrDjlpEd4sAAgwAriRMub95fu8AAAAASUVORK5CYII="/><element name="volumeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAYCAYAAADkgu3FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFtJREFUeNpi/P//PwM9ABMDncCoRYPfIlqAeij9H5SiYZiqBqPTlFqE02BKLSLaYFItIttgQhZRzWB8FjENiuRJ7aAbsMQwYMl7wDIsWUUQ42gNO2oR3S0CCDAAKhKq6MLLn8oAAAAASUVORK5CYII="/><element name="fullscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE5JREFUeNpiYBgFo2DQA0YC8v/xqP1PjDlMRDrEgUgxkgHIlfZoriVGjmzLsLFHAW2D6D8eA/9Tw7L/BAwgJE90PvhPpNgoGAVDEQAEGAAMdhTyXcPKcAAAAABJRU5ErkJggg=="/><element name="normalscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEZJREFUeNpiYBgFo2DIg/9UUkOUAf8JiFFsyX88fJyAkcQgYMQjNkzBoAgiezyRbE+tFGSPxQJ7auYBmma0UTAKBhgABBgAJAEY6zON61sAAAAASUVORK5CYII="/></elements></component><component name="display"><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC"/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg=="/><element name="muteIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNrs1jEOgCAMBVAg7t5/8qaoIy4uoobyXsLCxA+0NCUAAADGUWvdQoQ41x4ixNBB2hBvBskdD3w5ZCkl3+33VqI0kjBBlh9rp+uTcyOP33TnolfsU85XX3yIRpQph8ZQY3wTZtU5AACASA4BBgDHoVuY1/fvOQAAAABJRU5ErkJggg=="/><element name="errorIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWlJREFUeNrsl+1twjAQhsHq/7BBYQLYIBmBDcoGMAIjtBPQTcII2SDtBDBBwrU6pGsUO7YbO470PtKJkz9iH++d4ywWAAAAAABgljRNsyWr2bZzDuJG1rLdZhcMbTjrBCGDyUKsqQLFciJb9bSvuG/WagRVRUVUI6gqy5HVeKWfSgRyJruKIU//TrZTSn2nmlaXThrloi/v9F2STC1W4+Aw5cBzkquRc09bofFNc6YLxEON0VUZS5FPTftO49vMjRsIF3RhOGr7/D/pJw+FKU+q0vDyq8W42jCunDqI3LC5XxNj2wHLU1XjaRnb0Lhykhqhhd8MtSF5J9tbjCv4mXGvKJz/65FF/qJryyaaIvzP2QRxZTX2nTuXjvV/VPFSwyLnW7mpH99yTh1FEVro6JBSd40/pMrRdV8vPtcKl28T2pT8TnFZ4yNosct3Q0io6JfBiz1FlGdqVQH3VHnepAEAAAAAADDzEGAAcTwB10jWgxcAAAAASUVORK5CYII="/><element name="bufferIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuhJREFUeNrsWr9rU1EUznuNGqvFQh1ULOhiBx0KDtIuioO4pJuik3FxFfUPaAV1FTdx0Q5d2g4FFxehTnEpZHFoBy20tCIWtGq0TZP4HfkeHB5N8m6Sl/sa74XDybvv3vvOd8/Pe4lXrVZT3dD8VJc0B8QBcUAcEAfESktHGeR5XtMfqFQq/f92zPe/NbtGlKTdCY30kuxrpMGO94BlQCXs+rbh3ONgA6BlzP1p20d80gEI5hmA2A92Qua1Q2PtAFISM+bvjMG8U+Q7oA3rQGASwrYCU6WpNdLGYbA+Pq5jjXIiwi8EEa2UDbQSaKOIuV+SlkcCrfjY8XTI9EpKGwP0C2kru2hLtHqa4zoXtZRWyvi4CLwv9Opr6Hkn6A9HKgEANsQ1iqC3Ub/vRUk2JgmRkatK36kVrnt0qObunwUdUUMXMWYpakJsO5Am8tAw2GBIgwWA+G2S2dMpiw0gDioQRQJoKhRb1QiDwlHZUABYbaXWsm5ae6loTE4ZDxN4CZar8foVzOJ2iyZ2kWF3t7YIevffaMT5yJ70kQb2fQ1sE5SHr2wazs2wgMxgbsEKEAgxAvZUJbQLBGTSBMgNrncJbA6AljtS/eKDJ0Ez+DmrQEzXS2h1Ck25kAg0IZcUOaydCy4sYnN2fOA+2AP16gNoHALlQ+fwH7XO4CxLenUpgj4xr6ugY2roPMbMx+Xs18m/E8CVEIhxsNeg83XWOAN6grG3lGbk8uE5fr4B/WH3cJw+co/l9nTYsSGYCJ/lY5/qv0thn6nrIWmjeJcPSnWOeY++AkF8tpJHIMAUs/MaBBpj3znZfQo5psY+ZrG4gv5HickjEOymKjEeRpgyST6IuZcTcWbnjcgdPi5ghxciRKsl1lDSsgwA1i8fssonJgzmTSqfGUkCENndNdAL7PS6QQ7ZYISTo+1qq0LEWjTWcvY4isa4z+yfQB+7ooyHVg5RI7/i1Ijn/vnggDggDogD4oC00P4KMACd/juEHOrS4AAAAABJRU5ErkJggg=="/></elements></component><component name="dock"><elements><element name="button" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFBJREFUeNrs0cEJACAQA8Eofu0fu/W6EM5ZSAFDRpKTBs00CQQEBAQEBAQEBAQEBAQEBATkK8iqbY+AgICAgICAgICAgICAgICAgIC86QowAG5PAQzEJ0lKAAAAAElFTkSuQmCC"/></elements></component><component name="playlist"><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHhJREFUeNrs2NEJwCAMBcBYuv/CFuIE9VN47WWCR7iocXR3pdWdGPqqwIoMjYfQeAiNh9B4JHc6MHQVHnjggQceeOCBBx77TifyeOY0iHi8DqIdEY8dD5cL094eePzINB5CO/LwcOTptNB4CP25L4TIbZzpU7UEGAA5wz1uF5rF9AAAAABJRU5ErkJggg=="/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAA8CAIAAADpFA0BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUeNrsy6ENACAMAMHClp2wYxZLAg5Fcu9e3OjuOKqqfTMzbs14CIZhGIZhGIZhGP4VLwEGAK/BBnVFpB0oAAAAAElFTkSuQmCC"/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAA8CAIAAADpFA0BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNrsy7ENACAMBLE8++8caFFKKiRffU53112SGs3ttOohGIZhGIZhGIZh+Fe8BRgAiaUGde6NOSEAAAAASUVORK5CYII="/></elements></component></components></skin>';this.xml=null;if(window.DOMParser){parser=new DOMParser();this.xml=parser.parseFromString(this.text,"text/xml")}else{this.xml=new ActiveXObject("Microsoft.XMLDOM");this.xml.async="false";this.xml.loadXML(this.text)}return this}})(jwplayer);(function(b){_css=b.utils.css;_hide=function(a){_css(a,{display:"none"})};_show=function(a){_css(a,{display:"block"})};b.html5.display=function(O,a){var J={icons:true};var T=b.utils.extend({},J,a);var E=O;var Z={};var X;var M;var S;var D;var C;var N;var U;var P=E.skin.getComponentSettings("display").bufferrotation===undefined?15:parseInt(E.skin.getComponentSettings("display").bufferrotation,10);var Y=E.skin.getComponentSettings("display").bufferinterval===undefined?100:parseInt(E.skin.getComponentSettings("display").bufferinterval,10);var aa={display:{style:{cursor:"pointer",top:0,left:0,overflow:"hidden"},click:G},display_icon:{style:{cursor:"pointer",position:"absolute",top:((E.skin.getSkinElement("display","background").height-E.skin.getSkinElement("display","playIcon").height)/2),left:((E.skin.getSkinElement("display","background").width-E.skin.getSkinElement("display","playIcon").width)/2),border:0,margin:0,padding:0,zIndex:3}},display_iconBackground:{style:{cursor:"pointer",position:"absolute",top:((M-E.skin.getSkinElement("display","background").height)/2),left:((X-E.skin.getSkinElement("display","background").width)/2),border:0,backgroundImage:(["url(",E.skin.getSkinElement("display","background").src,")"]).join(""),width:E.skin.getSkinElement("display","background").width,height:E.skin.getSkinElement("display","background").height,margin:0,padding:0,zIndex:2}},display_image:{style:{display:"none",width:X,height:M,position:"absolute",cursor:"pointer",left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1}},display_text:{style:{zIndex:4,position:"relative",opacity:0.8,backgroundColor:parseInt("000000",16),color:parseInt("ffffff",16),textAlign:"center",fontFamily:"Arial,sans-serif",padding:"0 5px",fontSize:14}}};E.jwAddEventListener(b.api.events.JWPLAYER_PLAYER_STATE,R);E.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_MUTE,R);E.jwAddEventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,R);E.jwAddEventListener(b.api.events.JWPLAYER_ERROR,H);L();function L(){Z.display=I("div","display");Z.display_text=I("div","display_text");Z.display.appendChild(Z.display_text);Z.display_image=I("img","display_image");Z.display_image.onerror=function(e){_hide(Z.display_image)};Z.display_image.onload=Q;Z.display_icon=I("div","display_icon");Z.display_iconBackground=I("div","display_iconBackground");Z.display.appendChild(Z.display_image);Z.display_iconBackground.appendChild(Z.display_icon);Z.display.appendChild(Z.display_iconBackground);ab()}this.getDisplayElement=function(){return Z.display};this.resize=function(e,f){X=e;M=f;_css(Z.display,{width:e,height:f});_css(Z.display_text,{width:(e-10),top:((M-Z.display_text.getBoundingClientRect().height)/2)});_css(Z.display_iconBackground,{top:((M-E.skin.getSkinElement("display","background").height)/2),left:((X-E.skin.getSkinElement("display","background").width)/2)});V();R({})};function Q(e){S=Z.display_image.naturalWidth;D=Z.display_image.naturalHeight;V()}function V(){b.utils.stretch(E.jwGetStretching(),Z.display_image,X,M,S,D)}function I(g,e){var f=document.createElement(g);f.id=E.id+"_jwplayer_"+e;_css(f,aa[e].style);return f}function ab(){for(var e in Z){if(aa[e].click!==undefined){Z[e].onclick=aa[e].click}}}function G(e){if(typeof e.preventDefault!="undefined"){e.preventDefault()}else{e.returnValue=false}if(E.jwGetState()!=b.api.events.state.PLAYING){E.jwPlay()}else{E.jwPause()}}function W(e){if(U||!T.icons){K();return}_show(Z.display_iconBackground);Z.display_icon.style.backgroundImage=(["url(",E.skin.getSkinElement("display",e).src,")"]).join("");_css(Z.display_icon,{display:"block",width:E.skin.getSkinElement("display",e).width,height:E.skin.getSkinElement("display",e).height,top:(E.skin.getSkinElement("display","background").height-E.skin.getSkinElement("display",e).height)/2,left:(E.skin.getSkinElement("display","background").width-E.skin.getSkinElement("display",e).width)/2});if(E.skin.getSkinElement("display",e+"Over")!==undefined){Z.display_icon.onmouseover=function(f){Z.display_icon.style.backgroundImage=["url(",E.skin.getSkinElement("display",e+"Over").src,")"].join("")};Z.display_icon.onmouseout=function(f){Z.display_icon.style.backgroundImage=["url(",E.skin.getSkinElement("display",e).src,")"].join("")}}else{Z.display_icon.onmouseover=null;Z.display_icon.onmouseout=null}}function K(){_hide(Z.display_icon);_hide(Z.display_iconBackground)}function H(e){U=true;K();Z.display_text.innerHTML=e.error;_show(Z.display_text);Z.display_text.style.top=((M-Z.display_text.getBoundingClientRect().height)/2)+"px"}function F(){var e=Z.display_image;Z.display_image=I("img","display_image");Z.display_image.onerror=function(f){_hide(Z.display_image)};Z.display_image.onload=Q;Z.display.replaceChild(Z.display_image,e)}function R(e){if((e.type==b.api.events.JWPLAYER_PLAYER_STATE||e.type==b.api.events.JWPLAYER_PLAYLIST_ITEM)&&U){U=false;_hide(Z.display_text)}if(N!==undefined){clearInterval(N);N=null;b.utils.animations.rotate(Z.display_icon,0)}switch(E.jwGetState()){case b.api.events.state.BUFFERING:W("bufferIcon");C=0;N=setInterval(function(){C+=P;b.utils.animations.rotate(Z.display_icon,C%360)},Y);W("bufferIcon");break;case b.api.events.state.PAUSED:_css(Z.display_image,{background:"transparent no-repeat center center"});W("playIcon");break;case b.api.events.state.IDLE:if(E.jwGetPlaylist()[E.jwGetItem()].image){_css(Z.display_image,{display:"block"});Z.display_image.src=b.utils.getAbsolutePath(E.jwGetPlaylist()[E.jwGetItem()].image)}else{F()}W("playIcon");break;default:if(E.jwGetMute()){F();W("muteIcon")}else{F();_hide(Z.display_iconBackground);_hide(Z.display_icon)}break}}return this}})(jwplayer);(function(b){b.html5.dock=function(p,u){function q(){return{align:b.html5.view.positions.RIGHT}}var a=b.utils.extend({},q(),u);if(a.align=="FALSE"){return}var o={};var v=[];var s;var r;var l=document.createElement("div");l.id=p.id+"_jwplayer_dock";this.getDisplayElement=function(){return l};this.setButton=function(g,f,e,h){if(!f&&o[g]){b.utils.arrays.remove(v,g);l.removeChild(o[g].div);delete o[g]}else{if(f){if(!o[g]){o[g]={}}o[g].handler=f;o[g].outGraphic=e;o[g].overGraphic=h;if(!o[g].div){v.push(g);o[g].div=document.createElement("div");o[g].div.style.position="relative";l.appendChild(o[g].div);o[g].div.appendChild(document.createElement("img"));o[g].div.childNodes[0].style.position="absolute";o[g].div.childNodes[0].style.left=0;o[g].div.childNodes[0].style.top=0;o[g].div.childNodes[0].style.zIndex=10;o[g].div.childNodes[0].style.cursor="pointer";o[g].div.appendChild(document.createElement("img"));o[g].div.childNodes[1].style.position="absolute";o[g].div.childNodes[1].style.left=0;o[g].div.childNodes[1].style.top=0;if(p.skin.getSkinElement("dock","button")){o[g].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}o[g].div.childNodes[1].style.zIndex=9;o[g].div.childNodes[1].style.cursor="pointer";o[g].div.onmouseover=function(){if(o[g].overGraphic){o[g].div.childNodes[0].src=o[g].overGraphic}if(p.skin.getSkinElement("dock","buttonOver")){o[g].div.childNodes[1].src=p.skin.getSkinElement("dock","buttonOver").src}};o[g].div.onmouseout=function(){if(o[g].outGraphic){o[g].div.childNodes[0].src=o[g].outGraphic}if(p.skin.getSkinElement("dock","button")){o[g].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}};if(o[g].overGraphic){o[g].div.childNodes[0].src=o[g].overGraphic}if(o[g].outGraphic){o[g].div.childNodes[0].src=o[g].outGraphic}if(p.skin.getSkinElement("dock","button")){o[g].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}}if(f){o[g].div.onclick=function(j){j.preventDefault();b(p.id).callback(g);if(o[g].overGraphic){o[g].div.childNodes[0].src=o[g].overGraphic}if(p.skin.getSkinElement("dock","button")){o[g].div.childNodes[1].src=p.skin.getSkinElement("dock","button").src}}}}}m(s,r)};function m(x,f){s=x;r=f;if(v.length>0){var k=10;var h=x-p.skin.getSkinElement("dock","button").width-k;var w=k;var j=-1;if(a.align==b.html5.view.positions.LEFT){j=1;h=k}for(var e=0;e<v.length;e++){var g=Math.floor(w/f);if((w+p.skin.getSkinElement("dock","button").height+k)>((g+1)*f)){w=((g+1)*f)+k;g=Math.floor(w/f)}o[v[e]].div.style.top=(w%f)+"px";o[v[e]].div.style.left=(h+(p.skin.getSkinElement("dock","button").width+k)*g*j)+"px";w+=p.skin.getSkinElement("dock","button").height+k}}}this.resize=m;return this}})(jwplayer);(function(b){b.html5.eventdispatcher=function(e,a){var f=new b.events.eventdispatcher(a);b.utils.extend(this,f);this.sendEvent=function(h,g){if(g===undefined){g={}}b.utils.extend(g,{id:e,version:b.version,type:h});f.sendEvent(h,g)}}})(jwplayer);(function(f){var e={prefix:"",file:"",link:"",margin:8,out:0.5,over:1,timeout:3,hide:true,position:"bottom-left"};_css=f.utils.css;f.html5.logo=function(y,x){var a=y;var w;var B;var H;A();function A(){u();G();E()}function u(){if(e.prefix){var g=y.version.split(/\W/).splice(0,2).join("/");if(e.prefix.indexOf(g)<0){e.prefix+=g+"/"}}if(x.position==f.html5.view.positions.OVER){x.position=e.position}B=f.utils.extend({},e,x)}function G(){H=document.createElement("img");H.id=a.id+"_jwplayer_logo";H.style.display="none";H.onload=function(g){_css(H,b());a.jwAddEventListener(f.api.events.JWPLAYER_PLAYER_STATE,I);F()};if(!B.file){return}if(B.file.indexOf("http://")===0){H.src=B.file}else{H.src=B.prefix+B.file}}if(!B.file){return}this.resize=function(g,h){};this.getDisplayElement=function(){return H};function E(){if(B.link){H.onmouseover=C;H.onmouseout=F;H.onclick=v}else{this.mouseEnabled=false}}function v(g){if(typeof g!="undefined"){g.stopPropagation()}a.jwPause();a.jwSetFullscreen(false);if(B.link){window.open(B.link,"_blank")}return}function F(g){if(B.link){H.style.opacity=B.out}return}function C(g){if(B.hide){H.style.opacity=B.over}return}function b(){var g={textDecoration:"none",position:"absolute",cursor:"pointer"};g.display=B.hide?"none":"block";var h=B.position.toLowerCase().split("-");for(var j in h){g[h[j]]=B.margin}return g}function z(){if(B.hide){H.style.display="block";H.style.opacity=0;f.utils.fadeTo(H,B.out,0.1,parseFloat(H.style.opacity));w=setTimeout(function(){D()},B.timeout*1000)}}function D(){if(B.hide){f.utils.fadeTo(H,0,0.1,parseFloat(H.style.opacity))}}function I(g){if(g.newstate==f.api.events.state.BUFFERING){clearTimeout(w);z()}}return this}})(jwplayer);(function(f){var g={ended:f.api.events.state.IDLE,playing:f.api.events.state.PLAYING,pause:f.api.events.state.PAUSED,buffering:f.api.events.state.BUFFERING};var e=f.utils.css;f.html5.mediavideo=function(av,W){var S={abort:ag,canplay:an,canplaythrough:an,durationchange:aj,emptied:ag,ended:an,error:ao,loadeddata:aj,loadedmetadata:aj,loadstart:an,pause:an,play:P,playing:an,progress:Z,ratechange:ag,seeked:an,seeking:an,stalled:an,suspend:an,timeupdate:P,volumechange:ag,waiting:an,canshowcurrentframe:ag,dataunavailable:ag,empty:ag,load:aw,loadedfirstframe:ag};var R=new f.html5.eventdispatcher();f.utils.extend(this,R);var at=av;var ac=W;var V;var T;var ax=f.api.events.state.IDLE;var Y=null;var am;var au=0;var aa=false;var ai=false;var b;var O;var ar=[];var a;var X=false;function ae(){return ax}function aw(h){}function ag(h){}function an(h){if(g[h.type]){ah(g[h.type])}}function ah(k){if(X){return}if(am){k=f.api.events.state.IDLE}if(k==f.api.events.state.PAUSED&&ax==f.api.events.state.IDLE){return}if(k==f.api.events.state.PLAYING&&ax==f.api.events.state.IDLE){ah(f.api.events.state.BUFFERING);R.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:at.buffer});ab();return}if(ax!=k){var j=ax;at.state=k;ax=k;var h=false;if(k==f.api.events.state.IDLE){ak();if(at.position>=at.duration&&(at.position||at.duration)){h=true}if(ac.style.display!="none"&&!at.config.chromeless){ac.style.display="none"}}R.sendEvent(f.api.events.JWPLAYER_PLAYER_STATE,{oldstate:j,newstate:k});if(h){R.sendEvent(f.api.events.JWPLAYER_MEDIA_COMPLETE)}}am=false}function aj(j){var h={height:j.target.videoHeight,width:j.target.videoWidth,duration:Math.round(j.target.duration*10)/10};if(at.duration===0||isNaN(at.duration)){at.duration=Math.round(j.target.duration*10)/10}at.playlist[at.item]=f.utils.extend(at.playlist[at.item],h);R.sendEvent(f.api.events.JWPLAYER_MEDIA_META,{metadata:h})}function P(h){if(am){return}if(h!==undefined&&h.target!==undefined){if(at.duration===0||isNaN(at.duration)){at.duration=Math.round(h.target.duration*10)/10}if(!aa&&ac.readyState>0){ah(f.api.events.state.PLAYING)}if(ax==f.api.events.state.PLAYING){if(!aa&&ac.readyState>0){aa=true;try{ac.currentTime=at.playlist[at.item].start}catch(j){}ac.volume=at.volume/100;ac.muted=at.mute}at.position=Math.round(h.target.currentTime*10)/10;R.sendEvent(f.api.events.JWPLAYER_MEDIA_TIME,{position:h.target.currentTime,duration:h.target.duration})}}Z(h)}function ab(){if(V===false&&ax==f.api.events.state.BUFFERING){R.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER_FULL);V=true}}function U(){var h=(ar[ar.length-1]-ar[0])/ar.length;a=setTimeout(function(){if(!T){Z({lengthComputable:true,loaded:1,total:1})}},h*10)}function Z(h){var j,k;if(h!==undefined&&h.lengthComputable&&h.total){al();j=h.loaded/h.total*100;k=j/100*(at.duration-ac.currentTime);if(50<j&&!T){clearTimeout(a);U()}}else{if((ac.buffered!==undefined)&&(ac.buffered.length>0)){maxBufferIndex=0;if(maxBufferIndex>=0){j=ac.buffered.end(maxBufferIndex)/ac.duration*100;k=ac.buffered.end(maxBufferIndex)-ac.currentTime}}}ab();if(!T){if(j==100&&T===false){T=true}if(j!==null&&(j>at.buffer)){at.buffer=Math.round(j);R.sendEvent(f.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(j)})}}}function ad(){if(Y===null){Y=setInterval(function(){P()},100)}}function ak(){clearInterval(Y);Y=null}function ao(h){var j="There was an error: ";if((h.target.error&&h.target.tagName.toLowerCase()=="video")||h.target.parentNode.error&&h.target.parentNode.tagName.toLowerCase()=="video"){var k=h.target.error===undefined?h.target.parentNode.error:h.target.error;switch(k.code){case k.MEDIA_ERR_ABORTED:j="You aborted the video playback: ";break;case k.MEDIA_ERR_NETWORK:j="A network error caused the video download to fail part-way: ";break;case k.MEDIA_ERR_DECODE:j="The video playback was aborted due to a corruption problem or because the video used features your browser did not support: ";break;case k.MEDIA_ERR_SRC_NOT_SUPPORTED:j="The video could not be loaded, either because the server or network failed or because the format is not supported: ";break;default:j="An unknown error occurred: ";break}}else{if(h.target.tagName.toLowerCase()=="source"){O--;if(O>0){return}j="The video could not be loaded, either because the server or network failed or because the format is not supported: "}else{f.utils.log("Erroneous error received. Continuing...");return}}af();j+=aq();X=true;R.sendEvent(f.api.events.JWPLAYER_ERROR,{error:j});return}function aq(){var j="";for(var k in b.levels){var l=b.levels[k];var h=ac.ownerDocument.createElement("source");j+=f.utils.getAbsolutePath(l.file);if(k<(b.levels.length-1)){j+=", "}}return j}this.getDisplayElement=function(){return ac};this.play=function(){if(ax!=f.api.events.state.PLAYING){if(ac.style.display!="block"){ac.style.display="block"}ac.play();ad();if(V){ah(f.api.events.state.PLAYING)}}};this.pause=function(){ac.pause();ah(f.api.events.state.PAUSED)};this.seek=function(h){if(!(at.duration===0||isNaN(at.duration))&&!(at.position===0||isNaN(at.position))){ac.currentTime=h;ac.play()}};function af(){ac.pause();ak();at.position=0;am=true;ah(f.api.events.state.IDLE)}this.stop=af;this.volume=function(h){ac.volume=h/100;at.volume=h;R.sendEvent(f.api.events.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(h)})};this.mute=function(h){ac.muted=h;at.mute=h;R.sendEvent(f.api.events.JWPLAYER_MEDIA_MUTE,{mute:h})};this.resize=function(h,j){if(false){e(ac,{width:h,height:j})}R.sendEvent(f.api.events.JWPLAYER_MEDIA_RESIZE,{fullscreen:at.fullscreen,width:h,hieght:j})};this.fullscreen=function(h){if(h===true){this.resize("100%","100%")}else{this.resize(at.config.width,at.config.height)}};this.load=function(h){Q(h);R.sendEvent(f.api.events.JWPLAYER_MEDIA_LOADED);V=false;T=false;aa=false;if(!at.config.chromeless&&!ai){ar=[];al();ah(f.api.events.state.BUFFERING);setTimeout(function(){P()},25)}};function al(){var h=new Date().getTime();ar.push(h)}this.hasChrome=function(){return ai};function Q(h){at.duration=h.duration;ai=false;b=h;var o=document.createElement("video");o.preload="none";X=false;O=0;for(var p=0;p<h.levels.length;p++){var q=h.levels[p];if(f.utils.isYouTube(q.file)){delete o;ap(q.file);return}var m;if(q.type===undefined){var j=f.utils.extension(q.file);if(f.utils.extensionmap[j]!==undefined&&f.utils.extensionmap[j].html5!==undefined){m=f.utils.extensionmap[j].html5}}else{m=q.type}if(!m||o.canPlayType(m)){var k=ac.ownerDocument.createElement("source");k.src=f.utils.getAbsolutePath(q.file);if(m&&!f.utils.isLegacyAndroid()){k.type=m}O++;o.appendChild(k)}}if(O===0){X=true;R.sendEvent(f.api.events.JWPLAYER_ERROR,{error:"The video could not be loaded because the format is not supported by your browser: "+aq()})}if(at.config.chromeless){o.poster=f.utils.getAbsolutePath(h.image);o.controls="controls"}o.style.top=ac.style.top;o.style.left=ac.style.left;o.style.width=ac.style.width;o.style.height=ac.style.height;o.style.zIndex=ac.style.zIndex;o.onload=aw;o.volume=0;ac.parentNode.replaceChild(o,ac);o.id=ac.id;ac=o;for(var l in S){ac.addEventListener(l,function(r){if(r.target.parentNode!==null){S[r.type](r)}},true)}}function ap(l){var p=document.createElement("object");l=["http://www.youtube.com/v/",l.replace(/^[^v]+v.(.{11}).*/,"$1"),"&amp;hl=en_US&amp;fs=1&autoplay=1"].join("");var h={movie:l,allowFullScreen:"true",allowscriptaccess:"always"};for(var q in h){var k=document.createElement("param");k.name=q;k.value=h[q];p.appendChild(k)}var j=document.createElement("embed");var o={src:l,type:"application/x-shockwave-flash",allowscriptaccess:"always",allowfullscreen:"true",width:document.getElementById(av.id).style.width,height:document.getElementById(av.id).style.height};for(var m in o){j[m]=o[m]}p.appendChild(j);p.style.position=ac.style.position;p.style.top=ac.style.top;p.style.left=ac.style.left;p.style.width=document.getElementById(av.id).style.width;p.style.height=document.getElementById(av.id).style.height;p.style.zIndex=2147483000;ac.parentNode.replaceChild(p,ac);p.id=ac.id;ac=p;ai=true}this.embed=Q;return this}})(jwplayer);(function(jwplayer){var _configurableStateVariables=["width","height","start","duration","volume","mute","fullscreen","item","plugins","stretching"];jwplayer.html5.model=function(api,container,options){var _api=api;var _container=container;var _model={id:_container.id,playlist:[],state:jwplayer.api.events.state.IDLE,position:0,buffer:0,config:{width:480,height:320,item:-1,skin:undefined,file:undefined,image:undefined,start:0,duration:0,bufferlength:5,volume:90,mute:false,fullscreen:false,repeat:"none",stretching:jwplayer.utils.stretching.UNIFORM,autostart:false,debug:undefined,screencolor:undefined}};var _media;var _eventDispatcher=new jwplayer.html5.eventdispatcher();var _components=["display","logo","controlbar","dock"];jwplayer.utils.extend(_model,_eventDispatcher);for(var option in options){if(typeof options[option]=="string"){var type=/color$/.test(option)?"color":null;options[option]=jwplayer.utils.typechecker(options[option],type)}var config=_model.config;var path=option.split(".");for(var edge in path){if(edge==path.length-1){config[path[edge]]=options[option]}else{if(config[path[edge]]===undefined){config[path[edge]]={}}config=config[path[edge]]}}}for(var index in _configurableStateVariables){var configurableStateVariable=_configurableStateVariables[index];_model[configurableStateVariable]=_model.config[configurableStateVariable]}var pluginorder=_components.concat([]);if(_model.plugins!==undefined){if(typeof _model.plugins=="string"){var userplugins=_model.plugins.split(",");for(var userplugin in userplugins){if(typeof userplugins[userplugin]=="string"){pluginorder.push(userplugins[userplugin].replace(/^\s+|\s+$/g,""))}}}}if(typeof _model.config.chromeless=="undefined"&&jwplayer.utils.isIOS()){_model.config.chromeless=true}if(_model.config.chromeless){pluginorder=["logo"]}_model.plugins={order:pluginorder,config:{},object:{}};if(typeof _model.config.components!="undefined"){for(var component in _model.config.components){_model.plugins.config[component]=_model.config.components[component]}}for(var pluginIndex in _model.plugins.order){var pluginName=_model.plugins.order[pluginIndex];var pluginConfig=_model.config[pluginName]===undefined?{}:_model.config[pluginName];_model.plugins.config[pluginName]=_model.plugins.config[pluginName]===undefined?pluginConfig:jwplayer.utils.extend(_model.plugins.config[pluginName],pluginConfig);if(typeof _model.plugins.config[pluginName].position=="undefined"){_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.OVER}else{_model.plugins.config[pluginName].position=_model.plugins.config[pluginName].position.toString().toUpperCase()}}if(typeof _model.plugins.config.dock!="undefined"){if(typeof _model.plugins.config.dock!="object"){var position=_model.plugins.config.dock.toString().toUpperCase();_model.plugins.config.dock={position:position}}if(typeof _model.plugins.config.dock.position!="undefined"){_model.plugins.config.dock.align=_model.plugins.config.dock.position;_model.plugins.config.dock.position=jwplayer.html5.view.positions.OVER}}_model.loadPlaylist=function(arg,ready){var input;if(typeof arg=="string"){try{input=eval(arg)}catch(err){input=arg}}else{input=arg}var config;switch(jwplayer.utils.typeOf(input)){case"object":config=input;break;case"array":config={playlist:input};break;default:config={file:input};break}_model.playlist=new jwplayer.html5.playlist(config);if(_model.config.shuffle){_model.item=_getShuffleItem()}else{if(_model.config.item>=_model.playlist.length){_model.config.item=_model.playlist.length-1}else{if(_model.config.item<0){_model.config.item=0}}_model.item=_model.config.item}if(!ready){_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:_model.playlist})}_model.setActiveMediaProvider(_model.playlist[_model.item])};function _getShuffleItem(){var result=null;if(_model.playlist.length>1){while(result===null){result=Math.floor(Math.random()*_model.playlist.length);if(result==_model.item){result=null}}}else{result=0}return result}function forward(evt){if(evt.type==jwplayer.api.events.JWPLAYER_MEDIA_LOADED){_container=_media.getDisplayElement()}_eventDispatcher.sendEvent(evt.type,evt)}_model.setActiveMediaProvider=function(playlistItem){if(_media!==undefined){_media.resetEventListeners()}_media=new jwplayer.html5.mediavideo(_model,_container);_media.addGlobalListener(forward);if(_model.config.chromeless){_media.load(playlistItem)}return true};_model.getMedia=function(){return _media};_model.setupPlugins=function(){for(var plugin in _model.plugins.order){try{var pluginName=_model.plugins.order[plugin];if(jwplayer.html5[pluginName]!==undefined){_model.plugins.object[pluginName]=new jwplayer.html5[pluginName](_api,_model.plugins.config[pluginName])}else{_model.plugins.order.splice(plugin,plugin+1)}}catch(err){jwplayer.utils.log("Could not setup "+pluginName)}}};return _model}})(jwplayer);(function(b){b.html5.playlist=function(a){var e=[];if(a.playlist&&a.playlist instanceof Array&&a.playlist.length>0){for(var f in a.playlist){if(!isNaN(parseInt(f))){e.push(new b.html5.playlistitem(a.playlist[f]))}}}else{e.push(new b.html5.playlistitem(a))}return e}})(jwplayer);(function(b){b.html5.playlistitem=function(f){var a={author:"",date:"",description:"",image:"",link:"",mediaid:"",tags:"",title:"",provider:"",file:"",streamer:"",duration:-1,start:0,currentLevel:-1,levels:[]};for(var e in a){if(f[e]!==undefined){a[e]=f[e]}}if(a.levels.length===0){a.levels[0]=new b.html5.playlistitemlevel(a)}return a}})(jwplayer);(function(b){b.html5.playlistitemlevel=function(a){var e={file:"",streamer:"",bitrate:0,width:0};for(var f in e){if(a[f]!==undefined){e[f]=a[f]}}return e}})(jwplayer);(function(b){b.html5.skin=function(){var a={};var e=false;this.load=function(g,f){new b.html5.skinloader(g,function(h){e=true;a=h;f()},function(){new b.html5.skinloader("",function(h){e=true;a=h;f()})})};this.getSkinElement=function(j,h){if(e){try{return a[j].elements[h]}catch(g){b.utils.log("No such skin component / element: ",[j,h])}}return null};this.getComponentSettings=function(f){if(e){return a[f].settings}return null};this.getComponentLayout=function(f){if(e){return a[f].layout}return null}}})(jwplayer);(function(b){b.html5.skinloader=function(C,u,z){var v={};var F=u;var y=z;var D=true;var A;var w=C;var a=false;function x(){if(typeof w!="string"||w===""){E(b.html5.defaultSkin().xml)}else{b.utils.ajax(b.utils.getAbsolutePath(w),function(f){try{if(f.responseXML!==null){E(f.responseXML);return}}catch(e){}E(b.html5.defaultSkin().xml)},function(e){E(b.html5.defaultSkin().xml)})}}function E(P){var Z=P.getElementsByTagName("component");if(Z.length===0){return}for(var S=0;S<Z.length;S++){var ab=Z[S].getAttribute("name");var k={settings:{},elements:{},layout:{}};v[ab]=k;var V=Z[S].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var X=0;X<V.length;X++){G(V[X],ab)}var p=Z[S].getElementsByTagName("settings")[0];if(p!==undefined&&p.childNodes.length>0){var o=p.getElementsByTagName("setting");for(var f=0;f<o.length;f++){var e=o[f].getAttribute("name");var Q=o[f].getAttribute("value");var R=/color$/.test(e)?"color":null;v[ab].settings[e]=b.utils.typechecker(Q,R)}}var l=Z[S].getElementsByTagName("layout")[0];if(l!==undefined&&l.childNodes.length>0){var j=l.getElementsByTagName("group");for(var T=0;T<j.length;T++){var m=j[T];v[ab].layout[m.getAttribute("position")]={elements:[]};for(var g=0;g<m.attributes.length;g++){var aa=m.attributes[g];v[ab].layout[m.getAttribute("position")][aa.name]=aa.value}var h=m.getElementsByTagName("*");for(var U=0;U<h.length;U++){var Y=h[U];v[ab].layout[m.getAttribute("position")].elements.push({type:Y.tagName});for(var W=0;W<Y.attributes.length;W++){var q=Y.attributes[W];v[ab].layout[m.getAttribute("position")].elements[U][q.name]=q.value}if(v[ab].layout[m.getAttribute("position")].elements[U].name===undefined){v[ab].layout[m.getAttribute("position")].elements[U].name=Y.tagName}}}}D=false;r()}}function r(){clearInterval(A);if(!a){A=setInterval(function(){s()},100)}}function G(f,g){var h=new Image();var l=f.getAttribute("name");var j=f.getAttribute("src");var m;if(j.indexOf("data:image/png;base64,")===0){m=j}else{var k=b.utils.getAbsolutePath(w);var e=k.substr(0,k.lastIndexOf("/"));m=[e,g,j].join("/")}v[g].elements[l]={height:0,width:0,src:"",ready:false};h.onload=function(o){B(h,l,g)};h.onerror=function(o){a=true;r();y()};h.src=m}function s(){for(var f in v){if(f!="properties"){for(var e in v[f].elements){if(!v[f].elements[e].ready){return}}}}if(D===false){clearInterval(A);F(v)}}function B(g,e,f){v[f].elements[e].height=g.height;v[f].elements[e].width=g.width;v[f].elements[e].src=g.src;v[f].elements[e].ready=true;r()}x()}})(jwplayer);(function(b){b.html5.api=function(v,a){var l={};var r=document.createElement("div");v.parentNode.replaceChild(r,v);r.id=v.id;l.version=b.version;l.id=r.id;var m=new b.html5.model(l,r,a);var p=new b.html5.view(l,r,m);var o=new b.html5.controller(l,r,m,p);l.skin=new b.html5.skin();l.jwPlay=function(e){if(typeof e=="undefined"){s()}else{if(e.toString().toLowerCase()=="true"){o.play()}else{o.pause()}}};l.jwPause=function(e){if(typeof e=="undefined"){s()}else{if(e.toString().toLowerCase()=="true"){o.pause()}else{o.play()}}};function s(){if(m.state==b.api.events.state.PLAYING||m.state==b.api.events.state.BUFFERING){o.pause()}else{o.play()}}l.jwStop=o.stop;l.jwSeek=o.seek;l.jwPlaylistItem=o.item;l.jwPlaylistNext=o.next;l.jwPlaylistPrev=o.prev;l.jwResize=o.resize;l.jwLoad=o.load;function q(e){return function(){return m[e]}}l.jwGetItem=q("item");l.jwGetPosition=q("position");l.jwGetDuration=q("duration");l.jwGetBuffer=q("buffer");l.jwGetWidth=q("width");l.jwGetHeight=q("height");l.jwGetFullscreen=q("fullscreen");l.jwSetFullscreen=o.setFullscreen;l.jwGetVolume=q("volume");l.jwSetVolume=o.setVolume;l.jwGetMute=q("mute");l.jwSetMute=o.setMute;l.jwGetStretching=q("stretching");l.jwGetState=q("state");l.jwGetVersion=function(){return l.version};l.jwGetPlaylist=function(){return m.playlist};l.jwAddEventListener=o.addEventListener;l.jwRemoveEventListener=o.removeEventListener;l.jwSendEvent=o.sendEvent;l.jwDockSetButton=function(g,f,e,h){if(m.plugins.object.dock&&m.plugins.object.dock.setButton){m.plugins.object.dock.setButton(g,f,e,h)}};l.jwGetLevel=function(){};l.jwGetBandwidth=function(){};l.jwGetLockState=function(){};l.jwLock=function(){};l.jwUnlock=function(){};function u(g,e,f){return function(){g.loadPlaylist(g.config,true);g.setupPlugins();e.setup(g.getMedia().getDisplayElement());var h={id:l.id,version:l.version};f.sendEvent(b.api.events.JWPLAYER_READY,h);if(playerReady!==undefined){playerReady(h)}if(window[g.config.playerReady]!==undefined){window[g.config.playerReady](h)}g.sendEvent(b.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:g.playlist});f.item(g.item)}}if(m.config.chromeless){setTimeout(u(m,p,o),25)}else{l.skin.load(m.config.skin,u(m,p,o))}return l}})(jwplayer);(function(z,x,w){function u(f,g){var e=(f[0]||0)-(g[0]||0);return e>0||!e&&f.length>0&&u(f.slice(1),g.slice(1))}function s(f){if(typeof f!=y){return f}var h=[],e="";for(var g in f){e=typeof f[g]==y?s(f[g]):[g,r?encodeURI(f[g]):f[g]].join("=");h.push(e)}return h.join("&")}function q(f){var g=[];for(var e in f){f[e]&&g.push([e,'="',f[e],'"'].join(""))}return g.join(" ")}function b(f){var g=[];for(var e in f){g.push(['<param name="',e,'" value="',s(f[e]),'" />'].join(""))}return g.join("")}var y="object",r=true;try{var v=w.description||function(){return(new w("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(a){v="Unavailable"}var A=v.match(/\d+/g)||[0];z[x]={available:A[0]>0,activeX:w&&!w.name,version:{original:v,array:A,string:A.join("."),major:parseInt(A[0],10)||0,minor:parseInt(A[1],10)||0,release:parseInt(A[2],10)||0},hasVersion:function(e){e=/string|number/.test(typeof e)?e.toString().split("."):/object/.test(typeof e)?[e.major,e.minor]:e||[0,0];return u(A,e)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(e){if(!e.swf||this.expressInstallIsActive||!this.available&&!e.hasVersionFail){return false}if(!this.hasVersion(e.hasVersion||1)){this.expressInstallIsActive=true;if(typeof e.hasVersionFail=="function"){if(!e.hasVersionFail.apply(e)){return false}}e={swf:e.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:e.swf,type:"application/x-shockwave-flash",id:e.id||"flash_"+Math.floor(Math.random()*999999999),width:e.width||320,height:e.height||180,style:e.style||""};r=typeof e.useEncode!=="undefined"?e.useEncode:this.encodeParams;e.movie=e.swf;e.wmode=e.wmode||"opaque";delete e.fallback;delete e.hasVersion;delete e.hasVersionFail;delete e.height;delete e.id;delete e.swf;delete e.useEncode;delete e.width;var f=document.createElement("div");f.innerHTML=["<object ",q(attrs),">",b(e),"</object>"].join("");return f.firstChild}};z.fn[x]=function(e){var f=this.find(y).andSelf().filter(y);/string|object/.test(typeof e)&&this.each(function(){var g=z(this),h;e=typeof e==y?e:{swf:e};e.fallback=this;if(h=z[x].create(e)){g.children().remove();g.html(h)}});typeof e=="function"&&f.each(function(){var g=this;g.jsInteractionTimeoutMs=g.jsInteractionTimeoutMs||0;if(g.jsInteractionTimeoutMs<660){g.clientWidth||g.clientHeight?e.call(g):setTimeout(function(){z(g)[x](e)},g.jsInteractionTimeoutMs+66)}});return f}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */
(function(a){var f={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},e=false;a(window).bind("load.jcarousel",function(){e=true});a.jcarousel=function(u,r){this.options=a.extend({},f,r||{});this.autoStopped=this.locked=false;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!r||r.rtl===undefined){this.options.rtl=(a(u).attr("dir")||a("html").attr("dir")||"").toLowerCase()=="rtl"}this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl?"right":"left":"top";for(var s="",q=u.className.split(" "),o=0;o<q.length;o++){if(q[o].indexOf("jcarousel-skin")!=-1){a(u).removeClass(q[o]);s=q[o];break}}if(u.nodeName.toUpperCase()=="UL"||u.nodeName.toUpperCase()=="OL"){this.list=a(u);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container")){this.container=this.container.wrap("<div></div>")}this.container=this.container.parent()}else{if(!this.container.hasClass("jcarousel-container")){this.container=this.list.wrap("<div></div>").parent()}}}else{this.container=a(u);this.list=this.container.find("ul,ol").eq(0)}s!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+s+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()}this.buttonNext=a(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=this.clip.after(this.options.buttonNextHTML).next()}this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=a(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next()}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var l=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;s=this.list.children("li");var p=this;if(s.size()>0){var m=0,h=this.options.offset;s.each(function(){p.format(this,h++);m+=p.dimension(this,l)});this.list.css(this.wh,m+100+"px");if(!r||r.size===undefined){this.options.size=s.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){p.next()};this.funcPrev=function(){p.prev()};this.funcResize=function(){p.reload()};this.options.initCallback!==null&&this.options.initCallback(this,"init");if(!e&&a.browser.safari){this.buttons(false,false);a(window).bind("load.jcarousel",function(){p.setup()})}else{this.setup()}};var b=a.jcarousel;b.fn=b.prototype={jcarousel:"0.2.7"};b.fn.extend=b.extend=a.extend;b.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var g=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(g,false);a(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,b.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var h=this,k=Math.ceil(this.clipping()/this.options.visible),g=0,j=0;this.list.children("li").each(function(l){g+=h.dimension(this,k);if(l+1<h.first){j=g}});this.list.css(this.wh,g+"px");this.list.css(this.lt,-j+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(g){if(g!==undefined){this.options.size=g;this.locked||this.buttons()}return this.options.size},has:function(h,k){if(k===undefined||!k){k=h}if(this.options.size!==null&&k>this.options.size){k=this.options.size}for(var g=h;g<=k;g++){var j=this.get(g);if(!j.length||j.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(g){return a(".jcarousel-item-"+g,this.list)},add:function(h,p){var g=this.get(h),o=0,l=a(p);if(g.length===0){var k,m=b.intval(h);for(g=this.create(h);;){k=this.get(--m);if(m<=0||k.length){m<=0?this.list.prepend(g):k.after(g);break}}}else{o=this.dimension(g)}if(l.get(0).nodeName.toUpperCase()=="LI"){g.replaceWith(l);g=l}else{g.empty().append(p)}this.format(g.removeClass(this.className("jcarousel-item-placeholder")),h);l=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;o=this.dimension(g,l)-o;h>0&&h<this.first&&this.list.css(this.lt,b.intval(this.list.css(this.lt))-o+"px");this.list.css(this.wh,b.intval(this.list.css(this.wh))+o+"px");return g},remove:function(h){var j=this.get(h);if(!(!j.length||h>=this.first&&h<=this.last)){var g=this.dimension(j);h<this.first&&this.list.css(this.lt,b.intval(this.list.css(this.lt))+g+"px");j.remove();this.list.css(this.wh,b.intval(this.list.css(this.wh))-g+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(true):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(g){if(!(this.locked||this.animating||!this.tail)){this.pauseAuto();var h=b.intval(this.list.css(this.lt));h=!g?h-this.tail:h+this.tail;this.inTail=!g;this.prevFirst=this.first;this.prevLast=this.last;this.animate(h)}},scroll:function(g,h){if(!(this.locked||this.animating)){this.pauseAuto();this.animate(this.pos(g),h)}},pos:function(D,B){var C=b.intval(this.list.css(this.lt));if(this.locked||this.animating){return C}if(this.options.wrap!="circular"){D=D<1?1:this.options.size&&D>this.options.size?this.options.size:D}for(var A=this.first>D,y=this.options.wrap!="circular"&&this.first<=1?1:this.first,w=A?this.get(y):this.get(this.last),z=A?y:y-1,x=null,v=0,u=false,s=0;A?--z>=D:++z<D;){x=this.get(z);u=!x.length;if(x.length===0){x=this.create(z).addClass(this.className("jcarousel-item-placeholder"));w[A?"before":"after"](x);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(z<=0||z>this.options.size)){w=this.get(this.index(z));if(w.length){x=this.add(z,w.clone(true))}}}w=x;s=this.dimension(x);if(u){v+=s}if(this.first!==null&&(this.options.wrap=="circular"||z>=1&&(this.options.size===null||z<=this.options.size))){C=A?C+s:C-s}}y=this.clipping();var h=[],q=0,r=0;w=this.get(D-1);for(z=D;++q;){x=this.get(z);u=!x.length;if(x.length===0){x=this.create(z).addClass(this.className("jcarousel-item-placeholder"));w.length===0?this.list.prepend(x):w[A?"before":"after"](x);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(z<=0||z>this.options.size)){w=this.get(this.index(z));if(w.length){x=this.add(z,w.clone(true))}}}w=x;s=this.dimension(x);if(s===0){throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")}if(this.options.wrap!="circular"&&this.options.size!==null&&z>this.options.size){h.push(x)}else{if(u){v+=s}}r+=s;if(r>=y){break}z++}for(x=0;x<h.length;x++){h[x].remove()}if(v>0){this.list.css(this.wh,this.dimension(this.list)+v+"px");if(A){C-=v;this.list.css(this.lt,b.intval(this.list.css(this.lt))-v+"px")}}v=D+q-1;if(this.options.wrap!="circular"&&this.options.size&&v>this.options.size){v=this.options.size}if(z>v){q=0;z=v;for(r=0;++q;){x=this.get(z--);if(!x.length){break}r+=this.dimension(x);if(r>=y){break}}}z=v-q+1;if(this.options.wrap!="circular"&&z<1){z=1}if(this.inTail&&A){C+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&v==this.options.size&&v-q+1>=1){A=b.margin(this.get(v),!this.options.vertical?"marginRight":"marginBottom");if(r-A>y){this.tail=r-y-A}}if(B&&D===this.options.size&&this.tail){C-=this.tail;this.inTail=true}for(;D-->z;){C+=this.dimension(this.get(D))}this.prevFirst=this.first;this.prevLast=this.last;this.first=z;this.last=v;return C},animate:function(h,k){if(!(this.locked||this.animating)){this.animating=true;var g=this,j=function(){g.animating=false;h===0&&g.list.css(g.lt,0);if(!g.autoStopped&&(g.options.wrap=="circular"||g.options.wrap=="both"||g.options.wrap=="last"||g.options.size===null||g.last<g.options.size||g.last==g.options.size&&g.tail!==null&&!g.inTail)){g.startAuto()}g.buttons();g.notify("onAfterAnimation");if(g.options.wrap=="circular"&&g.options.size!==null){for(var l=g.prevFirst;l<=g.prevLast;l++){if(l!==null&&!(l>=g.first&&l<=g.last)&&(l<1||l>g.options.size)){g.remove(l)}}}};this.notify("onBeforeAnimation");if(!this.options.animation||k===false){this.list.css(this.lt,h+"px");j()}else{this.list.animate(!this.options.vertical?this.options.rtl?{right:h}:{left:h}:{top:h},this.options.animation,this.options.easing,j)}}},startAuto:function(g){if(g!==undefined){this.options.auto=g}if(this.options.auto===0){return this.stopAuto()}if(this.timer===null){this.autoStopped=false;var h=this;this.timer=window.setTimeout(function(){h.next()},this.options.auto*1000)}},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null}},buttons:function(h,j){if(h==null){h=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&&this.last>=this.options.size){h=this.tail!==null&&!this.inTail}}if(j==null){j=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1){j=this.tail!==null&&this.inTail}}var g=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);h&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext);this.buttonNext[h?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",h?false:true);this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=h&&this.buttonNext.each(function(){g.options.buttonNextCallback(g,this,h)}).data("jcarouselstate",h)}else{this.options.buttonNextCallback!==null&&this.buttonNextState!=h&&this.options.buttonNextCallback(g,null,h)}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);j&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[j?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",j?false:true);this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=j&&this.buttonPrev.each(function(){g.options.buttonPrevCallback(g,this,j)}).data("jcarouselstate",j)}else{this.options.buttonPrevCallback!==null&&this.buttonPrevState!=j&&this.options.buttonPrevCallback(g,null,j)}this.buttonNextState=h;this.buttonPrevState=j},notify:function(g){var h=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",g,h);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",g,h,this.first);this.callback("itemFirstOutCallback",g,h,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",g,h,this.last);this.callback("itemLastOutCallback",g,h,this.prevLast)}this.callback("itemVisibleInCallback",g,h,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",g,h,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(w,u,v,s,q,o,r){if(!(this.options[w]==null||typeof this.options[w]!="object"&&u!="onAfterAnimation")){var p=typeof this.options[w]=="object"?this.options[w][u]:this.options[w];if(a.isFunction(p)){var m=this;if(s===undefined){p(m,v,u)}else{if(q===undefined){this.get(s).each(function(){p(m,this,s,v,u)})}else{w=function(g){m.get(g).each(function(){p(m,this,g,v,u)})};for(var h=s;h<=q;h++){h!==null&&!(h>=o&&h<=r)&&w(h)}}}}}},create:function(g){return this.format("<li></li>",g)},format:function(h,k){h=a(h);for(var g=h.get(0).className.split(" "),j=0;j<g.length;j++){g[j].indexOf("jcarousel-")!=-1&&h.removeClass(g[j])}h.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+k)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",k);return h},className:function(g){return g+" "+g+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(h,k){var g=h.jquery!==undefined?h[0]:h,j=!this.options.vertical?(g.offsetWidth||b.intval(this.options.itemFallbackDimension))+b.margin(g,"marginLeft")+b.margin(g,"marginRight"):(g.offsetHeight||b.intval(this.options.itemFallbackDimension))+b.margin(g,"marginTop")+b.margin(g,"marginBottom");if(k==null||j==k){return j}j=!this.options.vertical?k-b.margin(g,"marginLeft")-b.margin(g,"marginRight"):k-b.margin(g,"marginTop")-b.margin(g,"marginBottom");a(g).css(this.wh,j+"px");return this.dimension(g)},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-b.intval(this.clip.css("borderLeftWidth"))-b.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-b.intval(this.clip.css("borderTopWidth"))-b.intval(this.clip.css("borderBottomWidth"))},index:function(g,h){if(h==null){h=this.options.size}return Math.round(((g-1)/h-Math.floor((g-1)/h))*h)+1}});b.extend({defaults:function(g){return a.extend(f,g||{})},margin:function(h,o){if(!h){return 0}var g=h.jquery!==undefined?h[0]:h;if(o=="marginRight"&&a.browser.safari){var m={display:"block","float":"none",width:"auto"},l,k;a.swap(g,m,function(){l=g.offsetWidth});m.marginRight=0;a.swap(g,m,function(){k=g.offsetWidth});return k-l}return b.intval(a.css(g,o))},intval:function(g){g=parseInt(g,10);return isNaN(g)?0:g}});a.fn.jcarousel=function(h){if(typeof h=="string"){var j=a(this).data("jcarousel"),g=Array.prototype.slice.call(arguments,1);return j[h].apply(j,g)}else{return this.each(function(){a(this).data("jcarousel",new b(this,h))})}}})(jQuery);(function(a){a.fn.nivoZoom=function(b){var g=a.extend({},a.fn.nivoZoom.defaults,b);if(g.overlay){if(!(a.browser.msie&&a.browser.version.substr(0,1)<8)){a("body").prepend('<div id="nivoOverlay" />');a("#nivoOverlay").css({position:"fixed",top:0,left:0,width:"100%",height:"100%",background:g.overlayColor,opacity:g.overlayOpacity,"z-index":90,display:"none"})}}return this.each(function(){var j=a(this);var k=a("a.nivoZoom",j);k.each(function(){var o=a(this);if(o.is("a")){var m=a(this).find("img:first");o.css({position:"relative",display:"inline-block"});o.attr("title","Click to zoom");o.append('<div class="nivoZoomHover" />');var l=a(".nivoZoomHover",o);l.css("opacity","0");o.hover(function(){if(!o.hasClass("zoomed")){l.stop().animate({opacity:g.zoomHoverOpacity},300)}},function(){if(!l.hasClass("loading")){l.stop().animate({opacity:0},300)}});o.bind("click",function(){if(a("img.nivoLarge",o).length==0){l.addClass("loading");e(m,o,function(){l.removeClass("loading");h(m,o,l)})}else{h(m,o,l)}return false})}})});function h(l,m,j){var k=a("img.nivoLarge",m);if(m.hasClass("zoomed")){if(g.overlay){a("#nivoOverlay").fadeOut(g.speed/2)}if(a(".nivoCaption",m).length>0){a(".nivoCaption",m).fadeOut(g.speed/2);a(".nivoClose").hide()}k.fadeOut(g.speed/2,function(){l.animate({opacity:1},g.speed/2)});m.removeClass("zoomed")}else{if(g.overlay){a("#nivoOverlay").fadeIn(g.speed/2)}j.css("opacity","0");l.animate({opacity:0},g.speed/2,function(){k.fadeIn(g.speed/2,function(){f(l,k,m)})});m.addClass("zoomed")}}function f(o,m,q){if(a(".nivoCaption",q).length>0){var r=a(".nivoCaption:first",q);if(!r.hasClass("nivo-processed")){var l=o.width();if(l==0){l=o.attr("width")}var j=o.height();if(j==0){j=o.attr("height")}var p=m.width();if(p==0){p=m.attr("width")}var k=m.height();if(k==0){k=m.attr("height")}r.css({width:p,opacity:g.captionOpacity});if(q.hasClass("topRight")){r.css({top:(k-r.outerHeight())+"px",right:"0px"})}else{if(q.hasClass("bottomRight")){r.css({bottom:"0px",right:"0px"})}else{if(q.hasClass("bottomLeft")){r.css({bottom:"0px",left:"0px"})}else{if(q.hasClass("center")){r.css({top:Math.ceil(j/2-k/2)+(k-r.outerHeight())+"px",left:(l/2-p/2)+"px"})}else{r.css({top:(k-r.outerHeight())+"px",left:"0px"})}}}}r.addClass("nivo-processed")}a(".nivoClose").show().css("left",p+"px");r.fadeIn(g.speed/2)}}function e(j,k,m){var l=new Image();a(l).load(function(){a(this).addClass("nivoLarge");a(this).css({position:"absolute",display:"none","z-index":99});if(navigator.userAgent.match(/MSIE \d\.\d+/)){k.css("z-index","100")}if(k.hasClass("topRight")){a(this).css({top:"0px",right:"0px"})}else{if(k.hasClass("bottomRight")){a(this).css({bottom:"0px",right:"0px"})}else{if(k.hasClass("bottomLeft")){a(this).css({bottom:"0px",left:"0px"})}else{if(k.hasClass("center")){var q=j.width();if(q==0){q=j.attr("width")}var o=j.height();if(o==0){o=j.attr("height")}var r=a(this).width();if(r==0){r=a(this).attr("width")}var p=a(this).height();if(p==0){p=a(this).attr("height")}a(this).css({top:(o/2-p/2)+"px",left:(q/2-r/2)+"px"})}else{a(this).css({top:"0px",left:"0px"})}}}}a(this).attr("title","Click to close");k.append(a(this));m.call(this)}).attr("src",k.attr("href"))}};a.fn.nivoZoom.defaults={speed:500,zoomHoverOpacity:0.8,overlay:false,overlayColor:"#333",overlayOpacity:0.5,captionOpacity:0.8}})(jQuery);
/*! Fotorama 1.5 (v1236) | http://fotoramajs.com/license.txt */
window.Mdrnzr=function(u,f,y){function a(g,m){var h=g.charAt(0).toUpperCase()+g.substr(1),h=(g+" "+o.join(h+" ")+h).split(" ");return v(h,m)}function v(g,m){for(var h in g){if(x[g[h]]!==y){return"pfx"==m?g[h]:!0}}return !1}var p={},k=f.documentElement;f.head||f.getElementsByTagName("head");var r=f.createElement("Mdrnzr"),x=r.style,u=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),o="Webkit Moz O ms Khtml".split(" "),r={},l=[],j=function(B,G,F,C){var D,E,m=f.createElement("div");if(parseInt(F,10)){for(;F--;){E=f.createElement("div"),E.id=C?C[F]:"Mdrnzr"+(F+1),m.appendChild(E)}}D=["&shy;<style>",B,"</style>"].join("");m.id="Mdrnzr";m.innerHTML+=D;k.appendChild(m);B=G(m,B);m.parentNode.removeChild(m);return !!B},e,s={}.hasOwnProperty,w;typeof s!==y&&typeof s.call!==y?w=function(g,h){return s.call(g,h)}:w=function(g,h){return h in g&&typeof g.constructor.prototype[h]===y};(function(g,A){var z=g.join(""),m=A.length;j(z,function(h){for(var h=h.childNodes,B={};m--;){B[h[m].id]=h[m]}p.csstransforms3d=9===B.csstransforms3d.offsetLeft},m,A)})([,["@media (",u.join("transform-3d),("),"Mdrnzr){#csstransforms3d{left:9px;position:absolute}}"].join("")],[,"csstransforms3d"]);r.canvas=function(){var g=f.createElement("canvas");return !!g.getContext&&!!g.getContext("2d")};r.csstransforms3d=function(){var g=!!v(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);g&&"webkitPerspective" in k.style&&(g=p.csstransforms3d);return g};r.csstransitions=function(){return a("transitionProperty")};for(var q in r){w(r,q)&&(e=q.toLowerCase(),p[e]=r[q](),l.push((p[e]?"":"no-")+e))}x.cssText="";r=null;p._version="2.0.6";p._prefixes=u;p._domPrefixes=o;p.testProp=function(g){return v([g])};p.testAllProps=a;p.testStyles=j;return p}(this,this.document);jQuery.extend({bez:function(e){var a="bez_"+$.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof jQuery.easing[a]){var b=function(o,l){var j=[null,null],f=[null,null],k=[null,null],h=function(m,g){return k[g]=3*o[g],f[g]=3*(l[g]-o[g])-k[g],j[g]=1-k[g]-f[g],m*(k[g]+m*(f[g]+m*j[g]))};return function(q){for(var m=q,g=0,p;14>++g;){p=h(m,0)-q;if(0.001>Math.abs(p)){break}m-=p/(k[0]+m*(2*f[0]+3*j[0]*m))}return h(m,1)}};jQuery.easing[a]=function(h,l,j,f,k){return f*b([e[0],e[1]],[e[2],e[3]])(l/k)+j}}return a}});(function(H){function B(m){for(var z={},K=0;K<o.length;K++){var I=o[K][0],A=o[K][1];if(m){var G=m.attr("data-"+I);G&&("number"==A?(G=Number(G),isNaN(G)||(z[I]=G)):"boolean"==A?(console.log(I,A,G),z[I]="true"==G?!0:!1):"string"==A&&(z[I]=G))}else{z[I]=o[K][2]}}return z}function w(g,h){for(var z={},m=0;m<q.length;m++){z[q[m]+g]=h}return z}function y(g,h){if(v){return w("transform",h?"translate3d(0,"+g+"px,0)":"translate3d("+g+"px,0,0)")}var m={};m[h?"top":"left"]=g;return m}function s(g){return w("transition-duration",g+"ms")}function E(g){g.mousemove(function(b){b.preventDefault()}).mousedown(function(b){b.preventDefault()})}function j(at,aF){function az(){aV.css({backgroundPosition:"24px "+(24-56*aG)+"px"});aG++;7<aG&&(aG=0)}function a1(){aM||(bf=aM=1000*(ar/aq));aF.thumbs&&!aX&&(aX=aF.vertical?a8.width():a8.height());if(aF.resize){aM=bf;var m=p.height();ar=at.width()-(aF.vertical&&aX?aX:0);aq=Math.round(1000*(ar/aM));if(aq>m-0-(!aF.vertical&&aX?aX:0)){aq=m-0-(!aF.vertical&&aX?aX:0),aM=1000*(ar/aq)}}}function aT(K,m){if(ar&&aq&&(!ak||K)){m||a1();aF.vertical?(ay=aq,U=ar):(ay=ar,U=aq);au.add(ap).css({width:ar,height:aq});aF.vertical&&aF.thumbs&&(aF.verticalThumbsRight?a8.css({left:ar}):au.css({left:aX}));if(aF.touchStyle){bn=(ay+aF.margin)*ao-aF.margin;aK=U;var M={};M[a6]=bn;M[aL]=aK;a0.css(M).data(M).data({minPos:-(bn-ay),maxPos:0})}else{a0.css({width:ar,height:aq})}aF.thumbs&&((aF.thumbsPreview||!aF.vertical)&&a8.css(a6,ay),a8.css({visibility:"visible"}));k&&!aF.vertical&&(aF.arrows&&bt.css({top:aq/2}),aV.css(bq,U/2));A();aQ&&aF.touchStyle&&a5(a0,-aJ*(ay+aF.margin),0);ak=!0}if(K){a7(aQ,aJ);var G=0;H(aE).each(function(){clearTimeout(this)});aE=[];ap.each(function(O){if(O!=aJ){var Q=H(this),N=setTimeout(function(){a7(Q,O)},50*G+50);aE.push(N);G++}})}}function bm(K,m,M){function G(){ak&&(aF.touchStyle||(m=0),aV.css(aW,m*(ay+aF.margin)+ay/2),an=setTimeout(function(){aV.stop().show().fadeTo(0,1)},100))}clearTimeout(an);switch(K){case"loading":G();at.addClass(J+"_loading").removeClass(J+"_error");clearInterval(be);a?(aV.css({backgroundImage:"url("+l+")"}),be=setInterval(az,100)):aV.html("<span>&middot;&middot;&middot;</span>");break;case"error":G();at.addClass(J+"_error").removeClass(J+"_loading");clearInterval(be);a?aV.css({backgroundImage:"url("+x+")",backgroundPosition:"24px 24px"}):aV.text("?");break;case"loaded":at.removeClass(J+"_loading "+J+"_error"),aV.stop().fadeTo(M,0,function(){aV.hide()}),clearInterval(be)}ac=K}function a5(K,m,N,G){var M=isNaN(m)?0:m;clearTimeout(K.data("backAnimate"));G&&(M=G,K.data({backAnimate:setTimeout(function(){a5(K,m,Math.max(r,N/2))},N)}));N&&(clearTimeout(g),bu=!0);v?(K.css(s(N)),setTimeout(function(){K.css(y(M,aF.vertical))},1)):K.stop().animate(y(M,aF.vertical),N,e);g=setTimeout(function(){bu=!1},N)}function aN(O,T,S){if(a4){if(!S||a4<ay){bk=!1}var G=aI.position()[aW];if(S=aI.data()[a6]){ax.show();if(a4>ay){var Q=G+S/2,R=ay/2,m=a3.index(aI),M=m-br;void 0==aP&&(aP=av.position()[aW]);if(aj&&T&&T>Math.max(36,2*aF.thumbMargin)&&T<ay-Math.max(36,2*aF.thumbMargin)&&(0<M&&T>0.75*R||0>M&&T<1.25*R)){var K;K=0<M?m+1:m-1;0>K?K=0:K>ao-1&&(K=ao-1);m!=K&&(Q=a3.eq(K),Q=Q.position()[aW]+Q.data()[a6]/2,R=T)}T=-(a4-ay);Q=Math.round(-(Q-R)+aF.thumbMargin);if(0<M&&Q>aP||0>M&&Q<aP){Q=G+aP<aF.thumbMargin?-(G-aF.thumbMargin):G+aP+S>ay?-(2*G-ay+S+aF.thumbMargin):aP}if(Q<=T){Q=T}else{if(Q>=aF.thumbMargin){Q=aF.thumbMargin}}av.data({minPos:T});aZ(Q);ae||av.data({maxPos:aF.thumbMargin})}else{Q=ay/2-a4/2,av.data({minPos:Q}),ae||av.data({maxPos:Q})}!bk&&!ae?(a5(av,Q,O),aC&&(bk=!0),aP=Q):aC=!0;var N=S-(D?0:2*aF.thumbBorderWidth);v?(ax.css(s(O)),setTimeout(function(){ax.css(y(G,aF.vertical)).css(a6,N)},1)):aF.vertical?ax.stop().animate({top:G,height:N},O,e):ax.stop().animate({left:G,width:N},O,e)}else{ax.hide()}}}function aZ(m){aF.shadows&&a4>ay&&(a8.addClass(J+"__thumbs_shadow"),m&&(m<=av.data("minPos")?a8.removeClass(J+"__thumbs_shadow_no-left").addClass(J+"__thumbs_shadow_no-right"):m>=aF.thumbMargin?a8.removeClass(J+"__thumbs_shadow_no-right").addClass(J+"__thumbs_shadow_no-left"):a8.removeClass(J+"__thumbs_shadow_no-left "+J+"__thumbs_shadow_no-right")))}function A(){!bj&&!ae&&!aD&&!bu&&(aZ(),aN(0,!1,!0))}function a7(N,S){S||(S=ap.index(N));var R=N.data("img");if(R){var G=N.data("srcKey"),O=am[G].imgWidth,Q=am[G].imgHeight,m=am[G].imgRatio,M=G=0;aF.touchStyle&&N.css(aF.vertical?"top":"left",S*(ay+aF.margin));if(O!=ar||Q!=aq||aF.alwaysPadding){var K=0;if(Math.round(m)!=Math.round(aM)||aF.alwaysPadding){K=2*aF.minPadding}m>=aM?aF.cropToFit?(Q=aq,O=Math.round(Q*m/1000)):(O=Math.round(ar-K)<O||aF.zoomToFit?Math.round(ar-K):O,Q=Math.round(1000*(O/m))):aF.cropToFit?(O=ar,Q=Math.round(1000*(O/m))):(Q=Math.round(aq-K)<Q||aF.zoomToFit?Math.round(aq-K):Q,O=Math.round(Q*m/1000))}R.css({visibility:"visible"});O&&Q&&(m={width:O,height:Q},R.attr(m).css(m),Q!=aq&&(G=Math.round((aq-Q)/2)),O!=ar&&(M=Math.round((ar-O)/2)),R.css({top:G,left:M}))}}function bw(W,Z,Y,O){function X(bz){function bb(){R.css({visibility:"hidden"});K.src=bz;0==T&&(R.appendTo(Z),"thumb"==O&&(a4+=bc+aF.thumbMargin,av.css(a6,a4).data(a6,a4),Z.css(a6,bc).data(a6,bc)))}function aa(){aY[bz]="loaded";Z.trigger("load."+J).data({state:"loaded"});setTimeout(function(){if(!am[bz]){am[bz]=[],am[bz].imgWidth=R.width(),am[bz].imgHeight=R.height(),am[bz].imgRatio=1000*(am[bz].imgWidth/am[bz].imgHeight)}Y(K,am[bz].imgWidth,am[bz].imgHeight,am[bz].imgRatio,bz,W)},100);"thumb"==O&&(ah++,ah==ao&&(aj=!0))}function ba(m){aY[bz]="error";R.unbind("error load");T<Q.length&&m?(X(Q[T]),T++):(Z.trigger("error."+J).data({state:"error"}),"thumb"==O&&(ah++,ah==ao&&(aj=!0)))}if(aY[bz]){var ab=function(){"error"==aY[bz]?ba(!1):"loaded"==aY[bz]?aa():setTimeout(ab,100)};bb();ab()}else{aY[bz]="loading",S.data({loading:!0}),R.unbind("error load").error(function(){ba(!0)}).load(aa),bb()}}var S=ap.eq(W),K=new Image,R=H(K),Q=[],T=0,M=am[W].imgHref,N=am[W].imgSrc,G=am[W].thumbSrc;"img"==O?(M&&(Q.push(M),Q.push(M+"?"+aB)),N&&(Q.push(N),Q.push(N+"?"+aB)),G&&(Q.push(G),Q.push(G+"?"+aB))):(G&&(Q.push(G),Q.push(G+"?"+aB)),N&&(Q.push(N),Q.push(N+"?"+aB)),M&&(Q.push(M),Q.push(M+"?"+aB)));X(Q[T]);T++}function P(G,m){m||(m=ap.index(G));if(G.data("wraped")){aF.detachSiblings&&G.data("detached")&&G.data({detached:!1}).appendTo(a0)}else{if(a0.append(G),G.data({wraped:!0}),bw(m,G,function(K,Q,N,M,O){K=H(K);K.addClass(J+"__img");G.data({img:K,srcKey:O});if((!ar||!aq)&&!ak){ar=Q,aq=N,a1()}G.css({visibility:"visible"});a7(G,m);aT()},"img"),by&&aO[m].html&&aO[m].html.length||aF.html&&aF.html[m]&&aF.html[m].length){G.append(aO[m].html||aF.html[m])}}}function aA(M,m){m||(m=ap.index(M));var O=0,G=!1,N=[];for(i=0;i<2*aF.preload+1;i++){var K=m-aF.preload+i;if(0<=K&&K<ao){if(!ap.eq(K).data("wraped")||ap.eq(K).data("detached")){O++,N.push(K)}}else{G=!0}}if(O>=aF.preload||G){H(N).each(function(Q){setTimeout(function(){P(ap.eq(N[Q]),N[Q])},50*Q)}),aF.detachSiblings&&(O=m-aF.preload,0>O&&(O=0),G=m+aF.preload+1,G>ao-1&&(G=ao-1),ap.slice(0,O).add(ap.slice(G,ao-1)).data({detached:!0}).detach())}}function ag(X,Z,W,Q,Y,T){function N(){if(aF.caption){(ab=aO[G].caption)?bp.html(ab).show():bp.html("").hide()}}function S(){if(aF.shadows||!aF.touchStyle){R.removeClass(J+"__frame_active"),X.addClass(J+"__frame_active")}}var R,O,ab,K,G=ap.index(X);ap.each(function(){H(this).unbind("load."+J+" error."+J)});Y||(Y=Q?0:aF.transitionDuration);!Q&&Z&&Z.altKey&&(Y*=10);Z=X.data("state");"loading"==Z||!Z?(bm("loading",G,Y),X.one("load."+J,function(){bm("loaded",G,Y);N()}),X.one("error."+J,function(){bm("error",G,Y);N()})):"error"==Z?bm("error",G,Y):Z!=ac&&bm("loaded",G,0);N();aQ?(R=aQ,K=aJ,aF.thumbs&&(O=aI)):(R=ap.not(X),aF.thumbs&&(O=a3.not(a3.eq(G))));aF.thumbs&&(aI=a3.eq(G),K&&(br=K),O.removeClass(J+"__thumb_selected").data("disabled",!1),aI.addClass(J+"__thumb_selected").data("disabled",!0));aF.thumbs&&aF.thumbsPreview&&K!=G&&aN(Y,W);if(aF.touchStyle){W=-G*(ay+aF.margin),S(),a5(a0,W,Y,T)}else{var M=function(ba){if(K!=G){var m=Y,bb=0;ba&&(m=0,bb=Y);ap.not(R.stop()).stop().fadeTo(0,0);setTimeout(function(){S();X.stop().fadeTo(m,1,function(){R.stop().fadeTo(bb,0)})},10)}};"loaded"==Z?M():"error"==Z?M("error"):(X.one("load."+J,function(){M()}),X.one("error."+J,function(){M("error")}))}aQ=X;aJ=G;aF.arrows&&((0==aJ||2>ao)&&!aF.loop?ai.addClass(J+"__arr_disabled").data("disabled",!0):ai.removeClass(J+"__arr_disabled").data("disabled",!1),(aJ==ao-1||2>ao)&&!aF.loop?L.addClass(J+"__arr_disabled").data("disabled",!0):L.removeClass(J+"__arr_disabled").data("disabled",!1));var aa=X.data("detached")||X.data("wraped");clearTimeout(a9);a9=setTimeout(function(){if(!aa&&G!=aF.startImg&&(P(X,G),aF.onShowImg)){aF.onShowImg({index:G,img:aQ,thumb:aI,caption:ab})}aA(X,G)},Y+10);if(aa||G==aF.startImg){if(P(X,G),aF.onShowImg){aF.onShowImg({index:G,img:aQ,thumb:aI,caption:ab})}}}function bh(G,m){m.stopPropagation();m.preventDefault();var K=aJ+G;0>K&&(K=aF.loop?ao-1:0);K>ao-1&&(K=aF.loop?0:ao-1);ag(ap.eq(K),m,!1)}function af(){z||(clearTimeout(bd),bd=setTimeout(function(){aT(!0)},100))}function bg(){at.css({overflow:aF.resize?"hidden":""});p[aF.resize?"bind":"unbind"]("resize",af)}at.data({ini:!0});var ac,aB=(new Date).getTime();H("a",at).live("click",function(m){m.preventDefault()});var aO,by=aF.data&&"object"==typeof aF.data;aO=by?H(aF.data).filter(function(){return this.img}):at.children().filter(function(){var m=H(this);return(m.is("a")&&m.children("img").size()||m.is("img"))&&(m.attr("href")||m.attr("src")||m.children().attr("src"))});var ao=aO.size();at.data({size:ao});if(aF.startImg>ao-1||"number"!=typeof aF.startImg){aF.startImg=0}var am=[];aO.each(function(m){if(by){am[m]={imgHref:this.img,thumbSrc:this.thumb}}else{var G=H(this);am[m]={imgHref:G.attr("href"),imgSrc:G.attr("src"),thumbSrc:G.children().attr("src")};if(aF.caption){this.caption=G.attr("alt")||G.children().attr("alt")}}});at.html("").addClass(J+" "+(aF.vertical?J+"_vertical":J+"_horizontal"));if(aF.touchStyle){aF.loop=!1}else{if(!aF.arrows){aF.loop=!0}}var aY=[],ay,U,ar=aF.width,aq=aF.height,aM,bf,ak=!1,a9,z=!1,bu=!1,g;if(aF.touchStyle){var bn=0,aK,bx=!1,aD=!1,aR}if(aF.thumbs&&aF.thumbsPreview){var ae=!1,bk=!1,aC=!1,bj=!1,aw,aj=!1,ah=0}var aW,bq,aU,I,a6,aL;aF.vertical?(aW="top",bq="left",aU="pageY",I="pageX",a6="height",aL="width"):(aW="left",bq="top",aU="pageX",I="pageY",a6="width",aL="height");var au=H('<div class="'+J+'__wrap"></div>').appendTo(at),a0=H('<div class="'+J+'__shaft"></div>').appendTo(au);E(au);E(a0);var aV=H('<div class="'+J+'__state"></div>').appendTo(a0),be,aG=0,an;if(F){at.addClass(J+"_touch"),aF.shadows=!1}aF.touchStyle?(au.addClass(J+"__wrap_style_touch"),aF.shadows&&au.append('<i class="'+J+"__shadow "+J+'__shadow_prev"></i><i class="'+J+"__shadow "+J+'__shadow_next"></i>')):au.addClass(J+"__wrap_style_fade");v&&at.addClass(J+"_csstransitions");if(aF.arrows){var bo,aS;aF.vertical?(bo="&#9650;",aS="&#9660;"):(bo="&#9668;",aS="&#9658;");var bt=H('<i class="'+J+"__arr "+J+'__arr_prev">'+bo+'</i><i class="'+J+"__arr "+J+'__arr_next">'+aS+"</i>").appendTo(au),ai=bt.eq(0),L=bt.eq(1);if(!F){if(aF.touchStyle&&aF.pseudoClick&&aF.arrows||!aF.touchStyle&&aF.arrows){var ad,h,bv=function(){clearTimeout(h);h=setTimeout(function(){var m=ad>=ay/2;L[!m?"removeClass":"addClass"](J+"__arr_hover");ai[m?"removeClass":"addClass"](J+"__arr_hover");aF.touchStyle||a0.css({cursor:m&&L.data("disabled")||!m&&ai.data("disabled")?"default":""})},10)};au.mousemove(function(m){ad=m[aU]-au.offset()[aW];bv()})}var aH=!1,al,bl=function(){aH=!0;clearTimeout(al);bt.css(s(0));au.removeClass(J+"__wrap_mouseout");setTimeout(function(){bt.css(s(aF.transitionDuration));setTimeout(function(){au.addClass(J+"__wrap_mouseover")},1)},1)},bs=function(){clearTimeout(al);al=setTimeout(function(){!bx&&!aH&&au.removeClass(J+"__wrap_mouseover").addClass(J+"__wrap_mouseout")},3*aF.transitionDuration)};au.mouseenter(function(){bl()});au.mouseleave(function(){aH=!1;bs()})}}var aQ,aJ,ap=H();aO.each(function(){var m=H('<div class="'+J+'__frame" style="visibility: hidden;"></div>');ap=ap.add(m)});if(aF.thumbs){var bc=aF.thumbSize;bc||(bc=aF.vertical?64:48);var aI,br=0,a8=H('<div class="'+J+'__thumbs" style="visibility: hidden;"></div>').appendTo(at),aX;aF.thumbsPreview&&(aX=bc+2*aF.thumbMargin,a8.addClass(J+"__thumbs_previews").css(aL,aX));var av=H('<div class="'+J+'__thumbs-shaft"></div>').appendTo(a8);if(aF.thumbsPreview){var a4=0,aP=void 0;aF.shadows&&H('<i class="'+J+"__shadow "+J+'__shadow_prev"></i><i class="'+J+"__shadow "+J+'__shadow_next"></i>').appendTo(a8);bo=aF.thumbMargin;aS={};aS[aL]=bc-(D?0:2*aF.thumbBorderWidth);aS[bq]=bo;aS.borderWidth=aF.thumbBorderWidth;var ax=H('<i class="'+J+'__thumb-border"></i>').hide().css(aS).appendTo(av)}aO.each(function(){var m;if(aF.thumbsPreview){m=H('<div class="'+J+'__thumb"></div>');var G={};G[aL]=bc;G.margin=aF.thumbMargin;m.css(G)}else{m=H('<i class="'+J+'__thumb"><i class="'+J+'__thumb__dot"></i></i>')}m.appendTo(av)});var a3=H("."+J+"__thumb",at);if(aF.thumbsPreview){var a2=function(M,O,K,m,N,G){O=H(M);m=aF.vertical?Math.round(1000*(bc/m)):Math.round(bc*m/1000);Mdrnzr.canvas?(O.remove(),O=H('<canvas class="'+J+'__thumb__img"></canvas>'),O.appendTo(a3.eq(G))):O.addClass(J+"__thumb__img");K={};K[a6]=m;K[aL]=bc;O.attr(K).css(K).css({visibility:"visible"});Mdrnzr.canvas&&(O[0].getContext("2d"),O[0].getContext("2d").drawImage(M,0,0,aF.vertical?bc:m,aF.vertical?m:bc));a4+=m+aF.thumbMargin-(bc+aF.thumbMargin);av.css(a6,a4);K[aL]=null;a3.eq(G).css(K).data(K);A()},V=function(m){!bj&&!ae&&!aD&&!bu?(m||(m=0),bw(m,a3.eq(m),a2,"thumb"),setTimeout(function(){m+1<ao&&V(m+1)},50)):setTimeout(function(){V(m)},100)}}}if(aF.caption){var bp=H('<p class="'+J+'__caption"></p>');bp.appendTo(at)}var aE=[];ar&&aq&&aT();ag(ap.eq(aF.startImg),!1,!1,!0);aF.thumbs&&aF.thumbsPreview&&V(0);aF.thumbs&&(aF.thumbColor&&!aF.thumbsPreview&&a3.children().css({backgroundColor:aF.thumbColor}),aF.thumbsBackgroundColor&&a8.css({backgroundColor:aF.thumbsBackgroundColor}),aF.thumbsPreview&&aF.thumbBorderColor&&ax.css({borderColor:aF.thumbBorderColor}));aF.backgroundColor&&au.add(ap).css({backgroundColor:aF.backgroundColor});aF.arrowsColor&&aF.arrows&&bt.css({color:aF.arrowsColor});var bd=!1;bg();at.bind("showimg",function(m,G){if(G>ao-1||"number"!=typeof G){G=0}(!aF.touchStyle||!aD)&&ag(ap.eq(G),m,!1)});at.bind("rescale",function(m,M,K,G){M&&(ar=M);K&&(aq=K);aM=1000*(ar/aq);aF.resize=G;aT(!0,!G);bg();clearTimeout(bd)});if(aF.thumbs){var b=function(G){G.stopPropagation();if(!H(this).data("disabled")){var m=a3.index(H(this)),K=G[aU]-a8.offset()[aW];ag(ap.eq(m),G,K)}};a3.bind("click",b)}aF.arrows&&(ai.click(function(m){H(this).data("disabled")||bh(-1,m)}),L.click(function(m){H(this).data("disabled")||bh(1,m)}));!aF.touchStyle&&!F&&au.click(function(m){var G=m[aU]-au.offset()[aW]>=ay/2;!m.shiftKey&&G&&aF.arrows||m.shiftKey&&!G&&aF.arrows||!aF.arrows&&!m.shiftKey?bh(1,m):bh(-1,m)});if(aF.touchStyle||F||aF.thumbs&&aF.thumbsPreview){var bi=function(bD,bC,bA,ab){function bB(bE){if((F||2>bE.which)&&aQ){var m=function(){W=(new Date).getTime();Z=ba;Q=aa;X=[[W,ba]];clearTimeout(bD.data("backAnimate"));v?bD.css(s(0)):bD.stop();bb=bD.position()[aW];bD.css(y(bb,aF.vertical));S=bb;bC()};if(F){if(F&&1==bE.targetTouches.length){ba=bE.targetTouches[0][aU],aa=bE.targetTouches[0][I],m(),bD[0].addEventListener("touchmove",bz,!1),bD[0].addEventListener("touchend",Y,!1)}else{if(F&&1<bE.targetTouches.length){return !1}}}else{ba=bE[aU],bE.preventDefault(),m(),u.mousemove(bz),u.mouseup(Y)}}}function bz(bE){function m(){bE.preventDefault();N=(new Date).getTime();X.push([N,ba]);var bF=Z-ba;bb=S-bF;bb>bD.data("maxPos")?(bb=Math.round(bb+(bD.data("maxPos")-bb)/1.5),T="left"):bb<bD.data("minPos")?(bb=Math.round(bb+(bD.data("minPos")-bb)/1.5),T="right"):T=!1;aF.touchStyle&&bD.css(y(bb,aF.vertical));bA(bb,bF,T)}F?F&&1==bE.targetTouches.length&&(ba=bE.targetTouches[0][aU],aa=bE.targetTouches[0][I],R?G&&m():(-5<=Math.abs(ba-Z)-Math.abs(aa-Q)&&(G=!0,bE.preventDefault()),R=!0)):(ba=bE[aU],m())}function Y(bG){if(!F||!bG.targetTouches.length){R=G=!1;F?(bD[0].removeEventListener("touchmove",bz,!1),bD[0].removeEventListener("touchend",Y,!1)):(u.unbind("mouseup"),u.unbind("mousemove"));O=(new Date).getTime();var bK=-bb,bI=O-f,bH,bF,bJ,bE;for(i=0;i<X.length;i++){bH=Math.abs(bI-X[i][0]),0==i&&(bF=bH,bJ=O-X[i][0],bE=X[i][1]),bH<=bF&&(bF=bH,bJ=X[i][0],bE=X[i][1])}bI=bE-ba;bH=0<=bI;bJ=O-bJ;ab(bK,bJ,bJ<=f,O-K,bH===M,bI,bG);K=O;M=bH}}var bb,ba,aa,Z,Q,S,W,X=[],N,M,O,K=0,G=!1,R=!1,T=!1;F?bD[0].addEventListener("touchstart",bB,!1):bD.mousedown(bB)}}if(aF.touchStyle||F){bi(a0,function(){aD=!0},function(K,G,m){clearTimeout(aR);bx||(aF.shadows&&au.addClass(J+"__wrap_shadow"),F||a0.addClass(J+"__shaft_grabbing"),bx=!0);aF.shadows&&(m?(K="left"==m?"right":"left",au.addClass(J+"__wrap_shadow_no-"+m).removeClass(J+"__wrap_shadow_no-"+K)):aF.shadows&&au.removeClass(J+"__wrap_shadow_no-left "+J+"__wrap_shadow_no-right"))},function(S,R,Q,M,T,K,G){aD=!1;aR=setTimeout(function(){bx=!1;F||bs()},f);F||a0.removeClass(J+"__shaft_grabbing");aF.shadows&&au.removeClass(J+"__wrap_shadow");var T=M=!1,O=H(G.target),O=O.filter("a")||O.parents("a");if(aF.touchStyle){if(bx){Q&&(-10>=K?M=!0:10<=K&&(T=!0));Q=r;O=Math.round(S/(ay+aF.margin));if(M||T){var R=-K/R,K=Math.round(-S+250*R),N;M?(O=Math.ceil(S/(ay+aF.margin))-1,S=-O*(ay+aF.margin),K>S&&(N=Math.abs(K-S),Q=Math.abs(Q/(250*R/(Math.abs(250*R)-0.97*N))),N=S+0.03*N)):T&&(O=Math.floor(S/(ay+aF.margin))+1,S=-O*(ay+aF.margin),K<S&&(N=Math.abs(K-S),Q=Math.abs(Q/(250*R/(Math.abs(250*R)-0.97*N))),N=S-0.03*N))}0>O&&(O=0,N=!1,Q=r);O>ao-1&&(O=ao-1,N=!1,Q=r);ag(ap.eq(O),G,!1,!1,Q,N)}else{O.length?document.location=O.attr("href"):aF.pseudoClick&&!F&&R<f?(N=G[aU]-au.offset()[aW]>=ay/2,!G.shiftKey&&N&&aF.arrows||G.shiftKey&&!N&&aF.arrows||!aF.arrows&&!G.shiftKey?bh(1,G):bh(-1,G)):ag(aQ,G)}}else{0==K&&O.length?document.location=O.attr("href"):0<=K?bh(1,G):0>K&&bh(-1,G)}}),aF.touchStyle&&aF.thumbs&&aF.thumbsPreview&&bi(av,function(){bk=ae=!0},function(G,m){!bj&&5<=Math.abs(m)&&(a3.unbind("click",b),clearTimeout(aw),bj=!0);aZ(G)},function(G,m,R,Q,O,N,M){ae=!1;aw=setTimeout(function(){bj=!1;a3.bind("click",b)},f);var Q=G=-G,K,O=2*r;aC&&bj&&(aN(0,!1,!1),aC=!1);G>av.data("maxPos")?(Q=av.data("maxPos"),O/=2):G<av.data("minPos")?(Q=av.data("minPos"),O/=2):R&&(m=-N/m,Q=Math.round(G+250*m),Q>av.data("maxPos")?(K=Math.abs(Q-av.data("maxPos")),O=Math.abs(O/(250*m/(Math.abs(250*m)-0.96*K))),Q=av.data("maxPos"),K=Q+0.04*K):Q<av.data("minPos")&&(K=Math.abs(Q-av.data("minPos")),O=Math.abs(O/(250*m/(Math.abs(250*m)-0.96*K))),Q=av.data("minPos"),K=Q-0.04*K));M.altKey&&(O*=10);aP=Q;Q!=G&&(a5(av,Q,O,K),aZ(Q))})}}var F="ontouchstart" in document,v=Mdrnzr.csstransforms3d&&Mdrnzr.csstransitions,k=H.browser.msie,D="CSS1Compat"!=document.compatMode&&k,f=300,e=H.bez([0.1,0,0.25,1]),r=333,J="fotorama",p=H(window),u=H(document),o=[["data","array",null],["width","number",null],["height","number",null],["startImg","number",0],["transitionDuration","number",r],["touchStyle","boolean",!0],["pseudoClick","boolean",!0],["loop","boolean",!1],["backgroundColor","string",null],["margin","number",5],["minPadding","number",10],["alwaysPadding","boolean",!1],["preload","number",3],["resize","boolean",!1],["zoomToFit","boolean",!0],["cropToFit","boolean",!1],["vertical","boolean",!1],["verticalThumbsRight","boolean",!1],["arrows","boolean",!0],["arrowsColor","string",null],["thumbs","boolean",!0],["thumbsBackgroundColor","string",null],["thumbColor","string",null],["thumbsPreview","boolean",!0],["thumbSize","number",null],["thumbMargin","number",5],["thumbBorderWidth","number",3],["thumbBorderColor","string",null],["caption","boolean",!1],["html","array",null],["onShowImg","function",null],["shadows","boolean",!0],["detachSiblings","boolean",!0]];H.fn[J]=function(g){var h=H.extend(B(),g);this.each(function(){var m=H(this);m.data("ini")||j(m,h)});return this};H(function(){H("."+J+"_auto").each(function(){var b=H(this);b[J](B(b))})});var q=["-webkit-","-moz-","-o-","-ms-",""],l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAGoCAMAAAAQMBfHAAABtlBMVEX///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8cWrVBAAAAkXRSTlMAKUfghaPCZkAlPw7nsHiUy1w3VBcoLEoiNsAw/EbdoYNlGSYIFEUdDEgS2yENIMi9CnfkLhUnkhutW5/5gGSCAgsyaZlEsVA4yQQfAxM9Khh/AWEPm7nVEfNCtB4kNDnGSU+JM5dznmAtXkuQO3JnTlhiWp2nIwf2rtgcPha7UYxf4avt0DUGpjp1eXwvTBBjhUW/zwAABtxJREFUeF7tmtlXE0kUxm/2zr5gwhI3QiAsCXtCQFED4gKCIKIgoo7ruI0zOjNuo7Pva/7jqTq3iy9dOc05eclT/94434/qk6fbt74mK6GLF0N0EJF6PXKgUBcgAJfLzcJyHvkjz/VOXQhXXAWVX/Z4PCOdViHsEqgz1q+zAYHzyjKZdB4VxtEbIpiq16dEPuiShEkCIyGSoUhkSAh7Ik6bOYwx/BlUORhIJNYg1ILBErWP7Fm/5GzWGgxfcEsuDFPUz0StguFmDJo1hVmrEDKFEKX4iGjKKvTzEUY/tY/pjY00gkLy+z1r3n3M54tD+CIQ6O3Tc9+MSIqLi0UWlIH8WFYkMa83Jh9xymKUtkR+oluqXgEJRqVxqkbMCucQlNFPzJmHvi85h0BdLwP/XCFFcZt0gWr9yAEEGya93skDhb5YrI9aw8HBIXXuXOpAIcFzxR6PAAEIDjcL61nk9/zXDF3o2KnvqjwoxsG4YRU6DosBqc4oX2MDAuc7VTIxeoTRc1sEYzz8nsr8cAcRDHOkhBKJkBB+EPlJzmE0jpQplYPn0egtCAORyOfUPtLzPsl82hpMjLokoxMU9zFxDjD/mSDNmMKMnTDNR8SnrcIgG8FBah99L14UGyf3jZw1zxzncWey5nYfqWo5T5Lc+fM5FpSB/HhFJMlAICkfMWAxahsiP52RakBAgkPSGMgTk+McgjLCam4+8c5nCAIbS+5fMBeryoVA+TByAMGGuUBg7kChkEwWyMHBodV9hVcVW6I8V+zxCxCAlavNQvky8oe+rW5d6LzueUT6qzsLWA/VGdtbbEDg/Pp68/owy8PvhsyPdhLBMEdKKir3KbqDJRdG40gZUzlYiMczENYSiQFqH8VFr2SxqF8j1CUXQxTzMjH9GoGJ0CTn+mIyZQpT1MdH6IvJEB8RGaL2Ubh7N9c4ufu01b+rl8edyddirl/Vcp4kwxcuDLOgDOS9N3kfN+Qj0hYjvymXyy6pugUkKEkjvUzMKucQlJEn5spQ4CXnECicdt0kLPI1goCLGh0I9oTkfcFB9Bst3xc4ODik53lVsSXOc8UenwAByJWaheEg8ifejYwuGNf890h/dWcB66E6I7zBBgTOr5Wb14cZHn63Zd5jEMEwR8p0XO5T9COWXBiNI2VW5cAVi+1BuBWNPqf2kTsfkJzP6dcIHsm5FCUDTFK/RmASNMe5vpiMmcIYFfgIfTEJ8RGJELWP/lRquHFy//TKmh86wuPOZERcLnyq5TxJJkZHJ1hQBvIjZV63g/IRJy3Gr0siHzgkVZeABN9K42SVmBLnEJRxX83NBfcS5xCo4019/BIpwnnSBareRw4gAIBfYc9gsLX7AgcHBxQ99nDRo2ihZFmdaBauriAfCmx26UL3lu8h6a/uLGA9VGfUNtmAwPnWtrY+oOjJyvwYL7Ewkih6nmHJhdE4UmZUDlaSyfcQMvH4ArUNFJl2tSeKTAuoPVFkWkDtaVNkovZsH4Ny3BEm9893kal+OwihR7TbHVrOAtf6QmADuWQQtX5oxGJcqpj9Nyp1tzRG1onJcw5BGY/JpKByCNT5zvMb5mJ+mXSB1h8jBxAAQK1vC9f6LeDg4ICixx4uehQtlCyl181CKYccL94QMhveJ6S/urOA9VCdkV9iAwLnG2FtfUDRU5H58Yy2YBgoev7AkgujcaRMqhx8MIxVCHuxmIvaBopMu9oTPaUF1J42AmpPmyITtWf7GLpzJ9Q4uXeXkKl+OwLhK9Fuf6Ln9SnU+kJQBvLDT1Hrp8YtRnnH7L9RqX8jjfEyMVnOISijoibvbv0N5xDI+Oh/doYU96ukC1SuIAcQAECtbwNq/RZwcHDgoscWFD1MKyVLfrlZmFhFXnBVwrrQtRkYIv3VnQWsh+qM5QobEDjfrGnrA4qemzLv7dIXEBQ9r3iFtV9h5lQOSsFgDcL7ZHKF2gaKTLvaE0WmBdSeKDItoPa0KTJRe7aP0Nu3qcbJ/eB3ZKrfTkD4TrTba3ruGUOtLwQY+AAbtf70CYsxrD7hRqV+SxontvWPwCGwUVRz85HnHecQqPtL35+Yi4/XSRdou4gcQAAAtb4tXOu3goODAxc9LVQkLZQs2fVm4XUJ+W59pwPC/oeFC6S/urOA9VCdUd1hAwLnS3ltfcCvKMv8CC+xMCIoekJYcmFgpAhB5eDzSGQAwqphfKC2gSLTrvZEkWkBtSeKTAuoPW2KTNSe7SP14EG2cXL/9Tcy1W9HIXwm2u0FPffPotYXAgx8gI1av++0xfhXfcKNSv2yNE6H9Y/AIbBRJebMPf9HziFQZt77H+ZipUy6QOEqcgABANT6NqDWB/Q/YZc7Ll94G0kAAAAASUVORK5CYII=",x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAAAAABWESUoAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAEQHIkixAAABv0lEQVQYGWXBQWcjcRzH4d+L+xpDRVRYETGXqt5W9FI9xFIVvfae64i11IgosfoGeqtaZawcwlgrlxE1Qvx99j+zk5lUn8fU6N48pmtc+vpwrZapNkgKGtvFUDVTJYgdH+xnJ6qYStEbn6wGKpm8wYZSHl+fS9Hl9w2l7bk8k9TP8HZ3oQ4mG7w8kmRSuKIyU6uzxHsLJZOm1CY6kuDFkqlfAE9vwH6kI0vADWRaAH86/Q2QR2p1MiCRdQrgVrrYAauuWjdAcWoTIAskjfGeAzWCDBjbHJipNMWbqxUDc/sFjFRZ4t2rMQJSy4EvqoQvgLvSQQ/IbQ8u0H+9DHg/Uy1w4MyBC1Q7eweynmp72FsO9HRw5YCXUJUusLUUGKlxj/dTlRGQ2hyI1UrwpirNgIWNgXWgRvCMN5a3BiZ2WgDf1OqugN2FNAaKjikBso5aUQ5s+p01sJBp4IBHHfm6B9InoOjLpBjvQUcm1KaSSWGKtzxRa0ZlFUomKcrx1mMdhHc7vKwvyeRdbCn9jS+H0vl1nFPaDOWZStGaT35HKpkqJz8cH7g4VMVUGz4WNHbJUDVTo3uTvKaOLF3enqrxD+aQUnwgKhDtAAAAAElFTkSuQmCC",C=new Image,a=!0;C.onerror=function(){if(1!=this.width||1!=this.height){a=!1}};C.src=x})(jQuery);
