function trim(n){return n.replace(/^\s+|\s+$/g,"")}function ltrim(n){return n.replace(/^\s+/,"")}function rtrim(n){return n.replace(/\s+$/,"")}function closePopupInterstitial(){var n=jQuery(".popup-interstitial");jQuery(n).fadeOut()}function showInterstitial(){jQuery(".popup-interstitial-wide").css("display","block");setTimeout(function(){closePopupInterstitial()},1e4)}function showInterstitialTall(){jQuery(".popup-interstitial-tall").css("display","block");setTimeout(function(){closePopupInterstitial()},1e4)}function showInterstitialTallWithOutTimeOut(){jQuery(".popup-interstitial-tall").css("display","block")}var SetupNavForInteriorSection,usoc,USOC,getCookie,setCookie;jQuery(document).ready(function(){function u(){var n=jQuery("#slide-nav").hasClass("slide-active");n?(jQuery("#slide-nav #slide-menu").removeAttr("style"),jQuery("#slide-nav #main-hamburger").removeAttr("style")):(jQuery("#slide-nav #slide-menu").height(jQuery(document).height()),jQuery("#slide-nav #main-hamburger").css("visibility","hidden"));jQuery("#slide-menu").stop().animate({left:n?"-290px":"0px"});jQuery("#navbar-height-col").stop().animate({left:n?"290px":"0px"});jQuery(i).stop().animate({left:n?"0px":"290px"});jQuery(r).toggleClass("slide-active");jQuery("nav.navbar-collapse").removeClass("in")}function f(){var n=jQuery("#secondary-slide-nav").hasClass("slide-active");n?(jQuery("#secondary-slide-nav #secondary-slide-menu").removeAttr("style"),jQuery("#secondary-slide-nav #secondary-hamburger").removeAttr("style")):(jQuery("#secondary-slide-nav #secondary-slide-menu").height(jQuery(document).height()),jQuery("#secondary-slide-nav #secondary-hamburger").css("visibility","hidden"));jQuery("#secondary-slide-menu").stop().animate({left:n?"-291px":"0px"});jQuery("#navbar-height-col").stop().animate({left:n?"291px":"0px"});jQuery(i).stop().animate({left:n?"0px":"291px"});jQuery(s).toggleClass("slide-active");jQuery("#NgbHeaderMenu").removeClass("in")}function e(n){return n&&n.which===32&&jQuery(n.target).siblings(".dropdown-menu").first().is(":visible")}function n(n,t){n.preventDefault();n.stopPropagation();var i=jQuery(t);i.parent().siblings().removeClass("open");i.parent().siblings().find("[aria-expanded='true']").attr("aria-expanded","false");i.parent().toggleClass("open");i.attr("aria-expanded",i.parent().hasClass("open")?"true":"false");window.matchMedia("(max-width: 1200px)").matches&&(i.parent().siblings().find("*").removeClass("fa-angle-down"),i.children().toggleClass("fa-angle-down"))}function o(){jQuery(window).width()>767&&jQuery(".navbar-toggle").is(":hidden")&&jQuery(r).removeClass("slide-active");window.matchMedia("(max-width: 1200px)").matches?jQuery(".chevron-down-desktop").each(function(){jQuery(this).removeClass("fa-angle-down")}):jQuery(".chevron-down-desktop").each(function(){jQuery(this).addClass("fa-angle-down")})}jQuery("#slide-nav.navbar-inverse").after(jQuery('<div class="inverse" id="navbar-height-col"><\/div>'));jQuery("#slide-nav.navbar-default").after(jQuery('<div id="navbar-height-col"><\/div>'));var t=".navbar-toggle",i=".slide-content",r="#slide-nav, #slide-menu, .slide-content, body, .navbar, #main-hamburger",s=".slide-content, body, .navbar, #secondary-hamburger, #secondary-slide-nav, #secondary-slide-menu";jQuery(window).resize(function(){jQuery(window).width()>1200&&(jQuery("#slide-nav").hasClass("slide-active")&&u(),jQuery("#secondary-slide-nav").hasClass("slide-active")&&f())});jQuery("#secondary-slide-nav").on("click",t,function(){f()});jQuery("#slide-nav").on("click",t,function(){u()});jQuery("ul.dropdown-menu [data-toggle=dropdown]").on("click",function(t){n(t,this)});jQuery(".rotate").on("click",function(){if(window.matchMedia("(max-width: 1200px)").matches){var n=jQuery(this);n.parent().siblings().find("*").removeClass("fa-angle-down");n.siblings().find("*").removeClass("fa-angle-down");n.children().toggleClass("fa-angle-down")}});jQuery("ul.nav [data-toggle=dropdown]").on("keydown.bs.dropdown.data-api",function(t){e(t)&&n(t,t.target)});jQuery("ul.dropdown-menu [data-toggle=dropdown]").on("keydown.bs.dropdown.data-api",function(t){e(t)&&n(t,t.target)});jQuery("footer .navbar-nav ul li.dropdown [data-toggle=dropdown]").on("click",function(){jQuery(this).children(".chevron").toggleClass("fa-angle-down");jQuery("[data-toggle=dropdown]").not(this).children().removeClass("fa-angle-down")});jQuery(window).on("resize",function(){o()});o()});SetupNavForInteriorSection=function(){jQuery("#main-container").removeClass("slide-content");jQuery("#main-container-subcontainer").addClass("slide-content")};usoc=usoc||{};try{c=console.log}catch(e){}jQuery.expr[":"].regex=function(n,t,i){var r=i[3].split(","),u=/^(data|css):/,f={method:r[0].match(u)?r[0].split(":")[0]:"attr",property:r.shift().replace(u,"")},e=new RegExp(r.join("").replace(/^\s+|\s+$/g,""),"ig");return e.test(jQuery(n)[f.method](f.property))};USOC={SPEED:{fast:200,normal:500,slow:1e3},TRANSPARENCY:.7,PAGESCROLL:{top:750,middle:1875,bottom:2625},CURRENT_PAGE:jQuery("body").attr("class"),IE:!1};jQuery.noConflict(),function(n){n(document).ready(function(){jQuery.browser={};jQuery.browser.mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.opera=/opera/.test(navigator.userAgent.toLowerCase());jQuery.browser.msie=/msie/.test(navigator.userAgent.toLowerCase());(jQuery.browser.msie&&jQuery.browser.version==7||jQuery.browser.msie&&document.documentMode&&document.documentMode==7)&&n("#compatibility-mode-msg").css("display","block");switch(USOC.IE){case 9:n("html").addClass("ie9");break;case 8:n("html").addClass("ie8");break;case 7:n("html").addClass("ie7")}navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad|android|webos)/)&&n("body").addClass("mobile");n(".module").css("opacity",0);n(".module").each(function(){n(this).delay(Math.ceil(Math.random()*1500)).animate({opacity:1},USOC.SPEED.normal,function(){n(this).has(".blind")&&n(this).find(".blind").blinds({})})});n(".main-nav > li.sports").bind("mouseenter",function(){n(this).find(".sub-nav.level-1 li.summer").addClass("selected")});n(".main-nav > li.sports > .sub-nav.level-1 > li").bind("mouseenter",function(){n(this).addClass("selected")});n(".main-nav > li.sports > .sub-nav.level-1 > li").bind("mouseleave",function(t){n(t.relatedTarget).hasClass("sub-nav")||n(this).removeClass("selected")});n(".content-area .pct75 .content-area-container").find("*").filter(function(){return n(this).width()>750}).css("width","100%");n(".content-area .pct50 .content-area-container").find("*").filter(function(){return n(this).width()>550}).css("width","100%");n(".content-area .pct50 .content-area-container").find("*").filter(function(){return n(this).width()>520}).css("width","100%");n(".sign-up, .search-input-wrapper, .search-box, .video-search").fieldReset({"class":"gray"});n("select.replace").replaceSelect();n(".carousel").carousel();n(".datepicker-from, .datepicker-to").datepicker({dateFormat:"mm/dd/y",dayNamesMin:["S","M","T","W","T","F","S"],showOtherMonths:!0,selectOtherMonths:!0});n("a.image-gallery").each(function(){var t=n(this);t.lox({speed:500,onLoad:function(){},onShow:function(){t.find(".play").show();t.find(".loading").hide()},onHide:function(){},type:"ajax",url:"/gallery/slideshow?sid="+t.attr("sid")})})}),function(n){n.fn.accordion=function(t){var t=n.extend({},t);return this.each(function(){$triggers=n(".accordion li span.accordion-trigger");$content=n(".accordion li span.accordion-trigger + .accordion-content");n('<div class="blocker" />').appendTo($triggers.parent());$triggers.each(function(){n(this).click(function(t){if($content.filter(":animated").length>0)return!1;$content.filter(":visible").length==0?(n(this).next(".accordion-content").slideDown(USOC.SPEED.normal),n(this).parent().addClass("selected"),$triggers.not(n(this)).parent().find(".blocker").show().animate({opacity:.6},USOC.SPEED.normal)):($content.filter(":visible:not(:animated)").slideUp(USOC.SPEED.normal),n(this).parent().removeClass("selected"),$triggers.not(n(this)).parent().find(".blocker").animate({opacity:0},USOC.SPEED.normal,function(){n(this).hide()}));t.preventDefault()})})})}}(jQuery),function(n){n.fn.pageScrollBar=function(t){var i={top:USOC.PAGESCROLL.top,middle:USOC.PAGESCROLL.middle,bottom:USOC.PAGESCROLL.bottom,content:n("#content-wrapper"),"reveal-bar":n(this)},t=n.extend(i,t);t.content.height(t.top);n(t["reveal-bar"]).bind("click",function(){if(n(t.content).filter(":animated").length>0)return!1;switch(t.content.height()){case t.top:n(t.content).animate({height:t.middle},USOC.SPEED.normal);break;case t.middle:n(t.content).animate({height:t.bottom},USOC.SPEED.normal,function(){n(t["reveal-bar"]).find("a").attr("class","return-to-top")});break;default:n("html,body").animate({scrollTop:0},1e3)}})}}(jQuery),function(n){n.fn.fieldReset=function(t){var t=n.extend({"class":!1},t);return this.each(function(){var i=n(this),r=i.find("input[type=text]");r.each(function(){n(this).data({"default":n(this).val()});n(this).focus(function(){n(this).val()===n(this).data("default")&&(n(this).val(""),t["class"]&&n(this).removeClass(t["class"]))});n(this).blur(function(){n(this).val()==""&&(n(this).val(n(this).data("default")),t["class"]&&n(this).addClass(t["class"]))})})})}}(jQuery),function(n){n.fn.blinds=function(t){var i={hasTitle:!1,animationDuration:USOC.SPEED.fast,special:{}},t=n.extend(i,t);return this.each(function(i,r){var u=n(r),f=u.parent(),e=f.find(".rollover-overlay"),o=0,s=u.find(".title"),h=u.find(".detail"),l=u.outerHeight(),a=f.outerHeight(),v=s.outerHeight(),y=h.outerHeight(),c;t.special=t.special||!1;USOC.IE&&USOC.IE<9&&(c=n('<div class="blind-gradient"><\/div>').prependTo(n(r)));e.find("> *").each(function(){o+=n(this).outerHeight(!0)});e.css({paddingTop:(f.outerHeight()-o)/2});u.animate({bottom:0},USOC.SPEED.normal)})}}(jQuery),function(n){n.fn.carousel=function(t){var i={animationDuration:USOC.SPEED.normal,orientation:"h",pagination:!1,visibleNodes:!1,autoscroll:!1,autoscrollTimeout:USOC.SPEED.normal*5,onNavigate:null},t=n.extend(i,t);return this.each(function(i,r){var nt=n(r),rt=t,o=nt,s,tt,ut,ft,et,l,f=o.find("ul:eq(0)")||{},p=o.find(".next")||{},w=o.find(".prev")||{},a=o.find(".status")||{},b=o.find(".captions li"),ct=f.width(),lt=f.height(),v=t.animationDuration,k=t.pagination,at=t.visibleNodes,st=t.autoscroll,ht=t.autoscrollTimeout,y=[],u=0,it=0,h=!1,e=[],d=0,c=0,ot=0,g;for(this.left=0,this.top=0,n.fn.carousel.goto=function(n){n<0||n>e.length-1||isNaN(n)||s({direction:"jump",duration:0,jumpTo:n})},n.fn.carousel.getPosition=function(){return u},tt=function(){nt.left=f.position().left;nt.top=f.position().top;h=u+1>it?"next":u-1<0?"prev":!1;h==="next"?p.addClass("inactive"):p.removeClass("inactive");h==="prev"?w.addClass("inactive"):w.removeClass("inactive")},ut=function(){a!=={}&&a.find(".current").text(parseInt(u)+1)},ft=function(){n(".placeholder").fadeOut(t.animationDuration/2,function(){var i=n(this).prev(".captions").find("li:eq("+u+") span.photo-credit"),t=n(this).prev(".captions").find("li:eq("+u+") a.high-res");n(this).find("span.photo-credit").text(i.text());n(this).find("a.high-res").text(t.text()).attr("href",t.attr("href"))});b.filter(":visible").fadeOut(t.animationDuration/2,function(){n(this).addClass("hidden");b.eq(u).removeClass("hidden").fadeIn(t.animationDuration/2);n(".placeholder").fadeIn(t.animationDuration/2);n.fn.lox.resize()})},l=function(n){if(!k)return!1;n==="add"?y[u].obj.addClass("selected"):y[u].obj.removeClass("selected")},et=function(n){n=ht;window.setInterval(function(){u+1>it?s({direction:"jump",duration:v,jumpTo:0}):s({direction:"next",duration:v})},n)},s=function(n){var c=n.direction,o=n.duration,i=n.jumpTo,t=0,p=this,s,a,v,r;if(offset={},offset.top="0",offset.left="0",dimension="width",f.filter(":animated").length>0)return!1;s=e[u].obj.find("iframe");s.length>0&&s.remove();switch(c){case"next":if(t=h=="next"?30:e[u][dimension],offset.left="-="+t,h=="next")return f.animate(offset,USOC.SPEED.fast),offset.left=offset.left.replace("-","+"),offset.top=offset.top.replace("-","+"),f.animate(offset,USOC.SPEED.fast),!1;l("remove");f.animate(offset,o,function(){});u++;l("add");break;case"prev":if(t=h=="prev"?30:e[u-1][dimension],offset.left="+="+t,h=="prev")return f.animate(offset,USOC.SPEED.fast),offset.left=offset.left.replace("+","-"),offset.top=offset.top.replace("+","-"),f.animate(offset,USOC.SPEED.fast),!1;l("remove");u--;f.animate(offset,o,function(){});l("add");break;case"jump":if(i==u)return!1;for(k&&y[u].obj.removeClass("selected"),a=i>u?u:i,v=i>u?i:u,r=a;r<v;r++)t+=e[r].width;i<u&&(t="-"+t);f.animate({left:"-="+t},o,function(){});u=i;k&&y[u].obj.addClass("selected")}if(ut(),ft(),tt(),typeof rt.onNavigate=="function")rt.onNavigate(u,c)},k&&o.find(".pagination a").each(function(t){y.push({obj:n(this),index:t});n(this).click(function(n){s({direction:"jump",duration:v,jumpTo:t});n.preventDefault()})}),f.find("> li").each(function(t){e.push({obj:n(this),index:t,width:n(this).outerWidth(),height:n(this).outerHeight()})}),g=0;g<e.length;g++)ot+=e[g].width;f.width(ot);c=e[0].width;o.width(c);c=c!=0?c+="px":"auto";d=d!=0?d+="px":"auto";it=e.length-1;f.wrap('<div style="width: '+c+"; height: "+d+';  overflow: hidden; position: relative;" />');w.appendTo(f.parent());p.appendTo(f.parent());b.each(function(){n(this).addClass("hidden")});b.eq(0).removeClass("hidden");a!={}&&(a.find(".current").text(u+1),a.find(".total").text(e.length));st&&et();tt();p.click(function(n){s({direction:"next",duration:v});n.preventDefault()});w.click(function(n){s({direction:"prev",duration:v});n.preventDefault()})})}}(jQuery),function(n){n.fn.replaceSelect=function(t){var r=10,i=!1,t=n.extend({},t);return this.each(function(u,f){var e=n(f),c=e.innerWidth(),s=n('<div class="select-replace" id="'+e.attr("id")+'-replaced" rel="'+e.attr("id")+'" />'),l="",a=n('<a href="javascript:void(0)">'+e.find("option:selected").text()+'<span class="fa fa-2x fa-angle-down"><\/span><\/a>').appendTo(s),o=n("<ul />").appendTo(s),h,v;e.after(s);s.css("width",c+r);o.css("width",c+r);e.find("option").each(function(){l+='<li><a href="javascript:void(0)" rel="'+n(this).val()+'">'+n(this).text()+"<\/a><\/li>"});e.hide();o.append(l);s.find("> a").click(function(n){if(o.filter(":animated").length>0)return!1;i?(i=!1,h()):(i=!0,v());n.preventDefault();n.stopPropagation()});o.find("a").click(function(t){t.preventDefault();s.find("> a").text(n(this).text());e.val(n(this).attr("rel"));h();e.trigger("change")});v=function(){var t=0;o.addClass("dropdown-selected");e.attr("data-dropdown-height")!=undefined?t=e.attr("data-dropdown-height"):o.find("li").each(function(){t+=n(this).outerHeight(!0)});e.attr("data-dropdown-scroll")!=undefined&&new Boolean(e.attr("data-dropdown-scroll")).valueOf()==!0&&o.css("overflow-y","scroll");o.animate({height:t,opacity:1},USOC.SPEED.fast);a.addClass("selected")};h=function(){o.animate({height:0,opacity:0},USOC.SPEED.fast);a.removeClass("selected")};n("body").click(function(){o.height()!=0&&h()});t.debug===!0&&(e.show(),e.css({position:"absolute",right:0,top:-40}),e.change(function(){alert("changed value")}))})}}(jQuery),function(n){n.fn.lox=function(t){var t=n.extend({selector:null,speed:500,type:"inline"},t),o=n(this),c=t.selector===null?n(o.attr("href")):n(t.selector),v=!1,s=!1,u=n("#lox").length>0?n("#lox"):n('<div id="lox" class="off-screen" />').appendTo("body"),f,y,i,l,e,p,a,r,h,w;return w=function(){e={w:c.outerWidth(),h:c.outerHeight()}},p=function(){n("#lox>.lox-content").length===0?(f=n('<div class="lox-overlay" />').appendTo(u),y=n('<div class="lox-content-wrapper" />').appendTo(u),i=n('<div class="lox-content" />').appendTo(u),l=n('<a href="#" class="lox-close" />').appendTo(i)):(f=n("#lox>.lox-overlay"),y=n("#lox>.lox-content-wrapper"),i=n("#lox>.lox-content"),l=n("#lox>.lox-content>.lox-close"));t.type==="ajax"?o.unbind("click").bind("click",function(u){o.find(".play").hide();o.find(".loading").show();n.ajax({url:t.url,success:function(u){i.empty();l=n('<a href="#" class="lox-close" />').appendTo(i);c=n(u).appendTo(i);t.onLoad&&t.onLoad();h();i.css("visibility","visible");n(window).unbind("resize").bind("resize",function(){if(!s&&v)return!1;h()});f.unbind("click").bind("click",function(){r()});l.unbind("click").bind("click",function(n){r();n.preventDefault()});n(document).unbind("keydown").bind("keydown",function(n){s&&v&&n.which==27&&r()});a()},complete:function(){},error:function(n,t,i){alert("Gallery could not be loaded: "+i+". Please try again later.")}});u.preventDefault()}):o.unbind("click").bind("click",function(u){c.appendTo(i);t.onLoad&&t.onLoad();h();i.css("visibility","visible");c.removeClass("off-screen");n(window).unbind("resize").bind("resize",function(){if(!s&&v)return!1;h()});f.unbind("click").bind("click",function(){r()});l.unbind("click").bind("click",function(n){r();n.preventDefault()});o.unbind("click").bind("click",function(n){a();n.preventDefault()});n(document).unbind("keydown").bind("keydown",function(n){s&&v&&n.which==27&&r()});a();u.preventDefault()})},r=function(){var n=i.find("iframe");n.length>0&&n.remove();f.animate({opacity:0},t.speed);i.animate({opacity:0},t.speed,function(){u.addClass("off-screen");t.onHide&&t.onHide()});s=!1},a=function(){u.removeClass("off-screen");f.css({width:n("body").hasClass("mobile")?n("body").width():n(window).outerWidth(),height:n("body").hasClass("mobile")?n("body").height():n(document).outerHeight()}).animate({opacity:USOC.TRANSPARENCY},t.speed);i.animate({opacity:1},t.speed,function(){t.onShow&&t.onShow()});s=!0},h=function(){w();f.css({width:n("body").hasClass("mobile")?n("body").width():n(window).outerWidth(),height:n("body").hasClass("mobile")?n("body").height():n(document).outerHeight()});n(window).height()<e.h?u.css("position","absolute"):u.css("position","fixed");i.animate({width:e.w,height:e.h,left:((n("body").hasClass("mobile")?n("body").width():n(window).width())-e.w)/2,top:n(window).height()>e.h?(n(window).height()-e.h)/2:n(document).scrollTop()})},n.fn.lox.show=function(){a()},n.fn.lox.hide=function(){r()},n.fn.lox.resize=function(){h()},p(),this}}(jQuery),function(n){n.fn.validator=function(){var t=n.extend({},t);return this.each(function(){var t=n(this),f,i={text:t.find("input[type=text].required, input[type=password].required, textarea.required"),select:t.find("select.required"),checkbox:t.find("input[type=checkbox].required"),radio:t.find("input[type=radio].required")},e,r,u;for(name in i)i[name].each(function(){name=="radio"||name=="checkbox"?t.find(".label[group="+n(this).attr("name")+"] .required-mark").length==0&&t.find(".label[group="+n(this).attr("name")+"]").prepend(n('<span class="required-mark">*<\/span>')):(n(this).parent().prepend(n('<span class="required-mark">*<\/span>')),n(this).attr("original",n(this).val()))});t.find("input[type=image]").bind("click",function(){return e()});r=function(i,r){var u;switch(r){case"text":i.addClass("error");break;case"select":u=i.attr("err")==undefined?"Please select one":i.attr("err");i.next("span.error").length==0&&n('<span class="error">'+u+"<\/span>").insertAfter(i).fadeIn(300);break;case"checkbox":u=i.attr("err")==undefined?"Please check off at least one box":i.attr("err");t.find(".label[group="+i.attr("name")+"]").siblings("span.error").length==0&&n('<span class="error">'+u+"<\/span>").insertAfter(t.find(".label[group="+i.attr("name")+"]")).fadeIn(300);break;case"radio":u=i.attr("err")==undefined?"Please select one":i.attr("err");t.find(".label[group="+i.attr("name")+"]").siblings("span.error").length==0&&n('<span class="error">'+u+"<\/span>").insertAfter(t.find(".label[group="+i.attr("name")+"]")).fadeIn(300)}};u=function(i,r){switch(r){case"text":case"select":i.removeClass("error");break;case"checkbox":case"radio":t.find(".label[group="+i.attr("name")+"]").siblings("span.error").fadeOut(300,function(){n(this).remove()})}};e=function(){return f=0,i.text.each(function(){var t=n(this);t.val()===t.attr("original")||t.hasClass("email")&&!/.+@.+\..+/.test(t.val())||t.hasClass("confirm")&&t.val()!=i.text.filter(t.attr("with")).val()?(f++,r(t,"text")):u(t,"text")}),i.select.each(function(){var t=n(this);n(this).val()==""?(f++,r(t,"select")):u(t,"select")}),i.checkbox.each(function(){var t=n(this);name=t.attr("name");filter=i.checkbox.filter("[name="+name+"]:checked");filter.length===0?r(t,"checkbox"):u(t,"checkbox")}),i.radio.each(function(){var t=n(this);name=t.attr("name");filter=i.radio.filter("[name="+name+"]:checked");filter.length===0?r(t,"radio"):u(t,"radio")}),f===0}})}}(jQuery)}(jQuery);getCookie=function(n){var t;return(t=new RegExp("(?:^|; )"+encodeURIComponent(n)+"=([^;]*)").exec(document.cookie))?t[1]:null};setCookie=function(n,t,i){var r=new Date,u;r.setDate(r.getDate()+i);u=escape(t)+(i===null?"":"; expires="+r.toUTCString());document.cookie=[n,"=",u].join("")};usoc.helpers={setHeightToParent:function(n,t){var i=jQuery(n),r=i.innerHeight();return jQuery(t).height(r),i.height(r),null}};var desktopScreenWidth=1200,phoneScreenWidth=767,showdesktopAds=!1,showtabletAds=!1,showphoneAds=!1,currentScreenWidth=jQuery(window).width();currentScreenWidth?currentScreenWidth<=phoneScreenWidth?showphoneAds=!0:currentScreenWidth>phoneScreenWidth&&currentScreenWidth<desktopScreenWidth?showtabletAds=!0:showdesktopAds=!0:showdesktopAds=!0;!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof exports?require("jquery"):jQuery)}(function(n,t){function u(){return new Date(Date.UTC.apply(Date,arguments))}function h(){var n=new Date;return u(n.getFullYear(),n.getMonth(),n.getDate())}function y(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function c(n){return function(){return this[n].apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function o(n,t){return t.toLowerCase()}var u,f=n(t).data(),e={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in f)i.test(r)&&(u=r.replace(s,o),e[u]=f[r]);return e}function b(t){var u={},i;if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(v,function(n,t){t in i&&(u[t]=i[t])}),u}var l=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;r>t;t++)if(this[t].valueOf()===i)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(t){t&&(n.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var n=new l;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),f=function(t,r){n(t).data("datepicker",this);this._process_options(r);this.dates=new l;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInline=!1;this.isInput=this.element.is("input");this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1;this.hasInput=this.component&&this.element.find("input").length;this.component&&0===this.component.length&&(this.component=!1);this.picker=n(i.template);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.viewMode=this.o.startView;this.o.calendarWeeks&&this.picker.find("thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(n,t){return parseInt(t)+1});this._allow_update=!1;this.setStartDate(this._o.startDate);this.setEndDate(this._o.endDate);this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted);this.setDatesDisabled(this.o.datesDisabled);this.fillDow();this.fillMonths();this._allow_update=!0;this.update();this.showMode();this.isInline&&this.show()},o,a,e,s,v,r,i;f.prototype={constructor:f,_process_options:function(t){var f,o,l,a,e,c;this._o=n.extend({},this._o,t);f=this.o=n.extend({},this._o);o=f.language;switch(r[o]||(o=o.split("-")[0],r[o]||(o=s.language)),f.language=o,f.startView){case 2:case"decade":f.startView=2;break;case 1:case"year":f.startView=1;break;default:f.startView=0}switch(f.minViewMode){case 1:case"months":f.minViewMode=1;break;case 2:case"years":f.minViewMode=2;break;default:f.minViewMode=0}switch(f.maxViewMode){case 0:case"days":f.maxViewMode=0;break;case 1:case"months":f.maxViewMode=1;break;default:f.maxViewMode=2}if(f.startView=Math.min(f.startView,f.maxViewMode),f.startView=Math.max(f.startView,f.minViewMode),f.multidate!==!0&&(f.multidate=Number(f.multidate)||!1,f.multidate!==!1&&(f.multidate=Math.max(0,f.multidate))),f.multidateSeparator=String(f.multidateSeparator),f.weekStart%=7,f.weekEnd=(f.weekStart+6)%7,l=i.parseFormat(f.format),(f.startDate!==-(1/0)&&(f.startDate=f.startDate?f.startDate instanceof Date?this._local_to_utc(this._zero_time(f.startDate)):i.parseDate(f.startDate,l,f.language):-(1/0)),f.endDate!==1/0&&(f.endDate=f.endDate?f.endDate instanceof Date?this._local_to_utc(this._zero_time(f.endDate)):i.parseDate(f.endDate,l,f.language):1/0),f.daysOfWeekDisabled=f.daysOfWeekDisabled||[],n.isArray(f.daysOfWeekDisabled)||(f.daysOfWeekDisabled=f.daysOfWeekDisabled.split(/[,\s]*/)),f.daysOfWeekDisabled=n.map(f.daysOfWeekDisabled,function(n){return parseInt(n,10)}),f.daysOfWeekHighlighted=f.daysOfWeekHighlighted||[],n.isArray(f.daysOfWeekHighlighted)||(f.daysOfWeekHighlighted=f.daysOfWeekHighlighted.split(/[,\s]*/)),f.daysOfWeekHighlighted=n.map(f.daysOfWeekHighlighted,function(n){return parseInt(n,10)}),f.datesDisabled=f.datesDisabled||[],n.isArray(f.datesDisabled))||(a=[],a.push(i.parseDate(f.datesDisabled,l,f.language)),f.datesDisabled=a),f.datesDisabled=n.map(f.datesDisabled,function(n){return i.parseDate(n,l,f.language)}),e=String(f.orientation).toLowerCase().split(/\s+/g),c=f.orientation.toLowerCase(),e=n.grep(e,function(n){return/^auto|left|right|top|bottom$/.test(n)}),f.orientation={x:"auto",y:"auto"},c&&"auto"!==c)if(1===e.length)switch(e[0]){case"top":case"bottom":f.orientation.y=e[0];break;case"left":case"right":f.orientation.x=e[0]}else c=n.grep(e,function(n){return/^left|right$/.test(n)}),f.orientation.x=c[0]||"auto",c=n.grep(e,function(n){return/^top|bottom$/.test(n)}),f.orientation.y=c[0]||"auto";if(f.defaultViewDate){var v=f.defaultViewDate.year||(new Date).getFullYear(),y=f.defaultViewDate.month||0,p=f.defaultViewDate.day||1;f.defaultViewDate=u(v,y,p)}else f.defaultViewDate=h()},_events:[],_secondaryEvents:[],_applyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(r=t,u=n[i][1]):3===n[i].length&&(r=n[i][1],u=n[i][2]),f.on(u,r)},_unapplyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(u=t,r=n[i][1]):3===n[i].length&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){-1===n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:n.proxy(this.keydown,this),paste:n.proxy(this.paste,this)};this.o.showOnFocus===!0&&(t.focus=n.proxy(this.show,this));this.isInput?this._events=[[this.element,t]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),t],[this.component,{click:n.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:n.proxy(this.show,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":n.proxy(function(n){this.update(n.date)},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{mousedown:n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.picker.hasClass("datepicker-inline")||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){0===arguments.length?(n=this.dates.length-1,t=this.o.format):"string"==typeof n&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){var t=this.component?this.element.find("input"):this.element;if(!t.attr("readonly")||this.o.enableOnReadonly!==!1)return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline?this:this.picker.is(":visible")?(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"),this):this},remove:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==n.inArray("text/plain",t.originalEvent.clipboardData.types))i=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i);this.update();t.preventDefault()},_utc_to_local:function(n){return n&&new Date(n.getTime()+6e4*n.getTimezoneOffset())},_local_to_utc:function(n){return n&&new Date(n.getTime()-6e4*n.getTimezoneOffset())},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return"undefined"!=typeof n?new Date(n):null},clearDates:function(){var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input"));n&&n.val("");this.update();this._trigger("changeDate");this.o.autoclose&&this.hide()},setDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,n.map(t,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:c("setDates"),setUTCDate:c("setUTCDates"),setValue:function(){var n=this.getFormattedDate();return this.isInput?this.element.val(n):this.component&&this.element.find("input").val(n),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekHighlighted:function(n){return this._process_options({daysOfWeekHighlighted:n}),this.update(),this},setDatesDisabled:function(n){this._process_options({datesDisabled:n});this.update();this.updateNavArrows()},place:function(){var y,r,p;if(this.isInline)return this;var f=this.picker.outerWidth(),s=this.picker.outerHeight(),e=n(this.o.container),h=e.width(),c="body"===this.o.container?n(document).scrollTop():e.scrollTop(),l=e.offset(),a=[];this.element.parents().each(function(){var t=n(this).css("z-index");"auto"!==t&&0!==t&&a.push(parseInt(t))});var v=Math.max.apply(Math,a)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),w=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=u.left-l.left,i=u.top-l.top;return"body"!==this.o.container&&(i+=c),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(t-=f-o)):u.left<0?(this.picker.addClass("datepicker-orient-left"),t-=u.left-10):t+f>h?(this.picker.addClass("datepicker-orient-right"),t+=o-f):this.picker.addClass("datepicker-orient-left"),r=this.o.orientation.y,("auto"===r&&(y=-c+i-s,r=0>y?"bottom":"top"),this.picker.addClass("datepicker-orient-"+r),"top"===r?i-=s+parseInt(this.picker.css("padding-top")):i+=w,this.o.rtl)?(p=h-(t+o),this.picker.css({top:i,right:p,zIndex:v})):this.picker.css({top:i,left:t,zIndex:v}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var r=this.dates.copy(),t=[],u=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),u=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language)},this)),t=n.grep(t,n.proxy(function(n){return!this.dateWithinRange(n)||!n},this),!0),this.dates.replace(t),this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate,u?this.setValue():t.length&&String(r)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&r.length&&this._trigger("clearDate"),this.fill(),this.element.change(),this},fillDow:function(){var t=this.o.weekStart,n="<tr>";for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days .datepicker-switch").attr("colspan",function(n,t){return parseInt(t)+1}),n+='<th class="cw">&#160;<\/th>');t<this.o.weekStart+7;)n+='<th class="dow">'+r[this.o.language].daysMin[t++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",t=0;12>t;)n+='<span class="month">'+r[this.o.language].monthsShort[t++]+"<\/span>";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),u=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<f?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>f)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&t.getUTCFullYear()===u.getFullYear()&&t.getUTCMonth()===u.getMonth()&&t.getUTCDate()===u.getDate()&&i.push("today"),-1!==this.dates.contains(t)&&i.push("active"),(!this.dateWithinRange(t)||this.dateIsDisabled(t))&&i.push("disabled"),-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),-1!==n.inArray(t.valueOf(),this.range)&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},fill:function(){var l,nt=new Date(this.viewDate),f=nt.getUTCFullYear(),w=nt.getUTCMonth(),b=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),ot=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,st=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,ht=r[this.o.language].today||r.en.today||"",ct=r[this.o.language].clear||r.en.clear||"",lt=r[this.o.language].titleFormat||r.en.titleFormat,e,d,v,a,h,o,rt,y,ut,ft,c,et,p,s;if(!isNaN(f)&&!isNaN(w)){for(this.picker.find(".datepicker-days thead .datepicker-switch").text(i.formatDate(new u(f,w),lt,this.o.language)),this.picker.find("tfoot .today").text(ht).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(ct).toggle(this.o.clearBtn!==!1),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths(),e=u(f,w-1,28),d=i.getDaysInMonth(e.getUTCFullYear(),e.getUTCMonth()),e.setUTCDate(d),e.setUTCDate(d-(e.getUTCDay()-this.o.weekStart+7)%7),v=new Date(e),e.getUTCFullYear()<100&&v.setUTCFullYear(e.getUTCFullYear()),v.setUTCDate(v.getUTCDate()+42),v=v.valueOf(),h=[];e.valueOf()<v;){if(e.getUTCDay()===this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)){var tt=new Date(+e+(this.o.weekStart-e.getUTCDay()-7)%7*864e5),it=new Date(Number(tt)+(11-tt.getUTCDay())%7*864e5),g=new Date(Number(g=u(it.getUTCFullYear(),0,1))+(11-g.getUTCDay())%7*864e5),at=(it-g)/6048e5+1;h.push('<td class="cw">'+at+"<\/td>")}(a=this.getClassNames(e),a.push("day"),this.o.beforeShowDay!==n.noop)&&(o=this.o.beforeShowDay(this._utc_to_local(e)),o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),o.enabled===!1&&a.push("disabled"),o.classes&&(a=a.concat(o.classes.split(/\s+/))),o.tooltip&&(l=o.tooltip));a=n.unique(a);h.push('<td class="'+a.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+e.getUTCDate()+"<\/td>");l=null;e.getUTCDay()===this.o.weekEnd&&h.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}for(this.picker.find(".datepicker-days tbody").empty().append(h.join("")),rt=r[this.o.language].monthsTitle||r.en.monthsTitle||"Months",y=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?rt:f).end().find("span").removeClass("active"),(n.each(this.dates,function(n,t){t.getUTCFullYear()===f&&y.eq(t.getUTCMonth()).addClass("active")}),(b>f||f>k)&&y.addClass("disabled"),f===b&&y.slice(0,ot).addClass("disabled"),f===k&&y.slice(st+1).addClass("disabled"),this.o.beforeShowMonth!==n.noop)&&(ut=this,n.each(y,function(t,i){if(!n(i).hasClass("disabled")){var r=new Date(f,t,1),u=ut.o.beforeShowMonth(r);u===!1&&n(i).addClass("disabled")}})),h="",f=10*parseInt(f/10,10),ft=this.picker.find(".datepicker-years").find(".datepicker-switch").text(f+"-"+(f+9)).end().find("td"),f-=1,et=n.map(this.dates,function(n){return n.getUTCFullYear()}),p=-1;11>p;p++)(c=["year"],l=null,-1===p?c.push("old"):10===p&&c.push("new"),-1!==n.inArray(f,et)&&c.push("active"),(b>f||f>k)&&c.push("disabled"),this.o.beforeShowYear!==n.noop)&&(s=this.o.beforeShowYear(new Date(f,0,1)),s===t?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),s.enabled===!1&&c.push("disabled"),s.classes&&(c=c.concat(s.classes.split(/\s+/))),s.tooltip&&(l=s.tooltip)),h+='<span class="'+c.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+f+"<\/span>",f+=1;ft.html(h)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&n<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==1/0&&n>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-(1/0)&&n<=this.o.startDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==1/0&&n>=this.o.endDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){var e,f,o,r,s,c;if(t.preventDefault(),t.stopPropagation(),r=n(t.target).closest("span, td, th"),1===r.length)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":s=i.modes[this.viewMode].navStep*("prev"===r[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,s);this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,s);1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":this.showMode(-2);c="linked"===this.o.todayBtn?null:"view";this._setDate(h(),c);break;case"clear":this.clearDates()}break;case"span":r.hasClass("disabled")||(this.viewDate.setUTCDate(1),r.hasClass("month")?(o=1,f=r.parent().find("span").index(r),e=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(f),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode?(this._setDate(u(e,f,o)),this.showMode()):this.showMode(-1)):(o=1,f=0,e=parseInt(r.text(),10)||0,this.viewDate.setUTCFullYear(e),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(u(e,f,o)),this.showMode(-1)),this.fill());break;case"td":r.hasClass("day")&&!r.hasClass("disabled")&&(o=parseInt(r.text(),10)||1,e=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),r.hasClass("old")?0===f?(f=11,e-=1):f-=1:r.hasClass("new")&&(11===f?(f=0,e+=1):f+=1),this._setDate(u(e,f,o)))}this.picker.is(":visible")&&this._focused_from&&n(this._focused_from).focus();delete this._focused_from},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),-1!==t?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(n,t){t&&"date"!==t||this._toggle_multidate(n&&new Date(n));t&&"view"!==t||(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&"view"===t||this._trigger("changeDate");var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input"));i&&i.change();!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,7*t)},moveMonth:function(n,t){var f;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var r,u,i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t);if(t=t>0?1:-1,1===s)u=-1===t?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth(r),(0>r||r>11)&&(r=(r+12)%12);else{for(f=0;s>f;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!==i.getUTCMonth()}}for(;u();)i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,12*t)},moveAvailableDate:function(n,t,i){do{if(n=this[i](n,t),!this.dateWithinRange(n))return!1;i="moveDay"}while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return y(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){var r,t,f,i,u;if(!this.picker.is(":visible"))return void((40===n.keyCode||27===n.keyCode)&&(this.show(),n.stopPropagation()));f=!1;i=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;r=37===n.keyCode||38===n.keyCode?-1:1;n.ctrlKey?(t=this.moveAvailableDate(i,r,"moveYear"),t&&this._trigger("changeYear",this.viewDate)):n.shiftKey?(t=this.moveAvailableDate(i,r,"moveMonth"),t&&this._trigger("changeMonth",this.viewDate)):37===n.keyCode||39===n.keyCode?t=this.moveAvailableDate(i,r,"moveDay"):this.weekOfDateIsDisabled(i)||(t=this.moveAvailableDate(i,r,"moveWeek"));t&&(this.focusDate=this.viewDate=t,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;i=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(i),f=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}f&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change())},showMode:function(n){n&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,this.viewMode+n)));this.picker.children("div").hide().filter(".datepicker-"+i.modes[this.viewMode].clsName).show();this.updateNavArrows()}};o=function(t,i){n(t).data("datepicker",this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;e.call(n(this.inputs),i).on("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n(t).data("datepicker")});this.updateDates()};o.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(t){var f;if(!this.updating&&(this.updating=!0,f=n(t.target).data("datepicker"),"undefined"!=typeof f)){var i=f.getUTCDate(),e=n.inArray(t.target,this.inputs),r=e-1,u=e+1,o=this.inputs.length;if(-1!==e){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t.setUTCDate(i)}),i<this.dates[r])for(;r>=0&&i<this.dates[r];)this.pickers[r--].setUTCDate(i);else if(i>this.dates[u])for(;o>u&&i>this.dates[u];)this.pickers[u++].setUTCDate(i);this.updateDates();delete this.updating}}},remove:function(){n.map(this.pickers,function(n){n.remove()});delete this.element.data().datepicker}};a=n.fn.datepicker;e=function(i){var u=Array.apply(null,arguments),r;if(u.shift(),this.each(function(){var h=n(this),t=h.data("datepicker"),c="object"==typeof i&&i;if(!t){var l=w(this,"date"),a=n.extend({},s,l,c),v=b(a.language),e=n.extend({},s,v,l,c);h.hasClass("input-daterange")||e.inputs?(n.extend(e,{inputs:e.inputs||h.find("input").toArray()}),t=new o(this,e)):t=new f(this,e);h.data("datepicker",t)}"string"==typeof i&&"function"==typeof t[i]&&(r=t[i].apply(t,u))}),r===t||r instanceof f||r instanceof o)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return r};n.fn.datepicker=e;s=n.fn.datepicker.defaults={autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:2,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:""};v=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=f;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};i={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,t){return[31,i.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(n){if("function"==typeof n.toValue&&"function"==typeof n.toDisplay)return n;var t=n.replace(this.validParts,"\x00").split("\x00"),i=n.match(this.validParts);if(!t||!t.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(e,o,s){function nt(){var n=this.slice(0,l[c].length),t=l[c].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var v,rt,d,w;if(!e)return t;if(e instanceof Date)return e;if("string"==typeof o&&(o=i.parseFormat(o)),o.toValue)return o.toValue(e,o,s);var y,tt,c,it,l=e.match(/([\-+]\d+)([dmwy])/g),ut={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"};if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)){for(e=new Date,c=0;c<l.length;c++)y=/([\-+]\d+)([dmwy])/.exec(l[c]),tt=parseInt(y[1]),it=ut[y[2]],e=f.prototype[it](e,tt);return u(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}l=e&&e.match(this.nonpunctuation)||[];e=new Date;var p,b,k={},g=["yyyy","yy","M","MM","m","mm","d","dd"],a={yyyy:function(n,t){return n.setUTCFullYear(t)},yy:function(n,t){return n.setUTCFullYear(2e3+t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;0>t;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}};if(a.M=a.MM=a.mm=a.m,a.dd=a.d,e=h(),v=o.parts.slice(),l.length!==v.length&&(v=n(v).filter(function(t,i){return-1!==n.inArray(i,g)}).toArray()),l.length===v.length){for(c=0,rt=v.length;rt>c;c++){if(p=parseInt(l[c],10),y=v[c],isNaN(p))switch(y){case"MM":b=n(r[s].months).filter(nt);p=n.inArray(b[0],r[s].months)+1;break;case"M":b=n(r[s].monthsShort).filter(nt);p=n.inArray(b[0],r[s].monthsShort)+1}k[y]=p}for(c=0;c<g.length;c++)w=g[c],w in k&&!isNaN(k[w])&&(d=new Date(e),a[w](d,k[w]),isNaN(d)||(e=d))}return e},formatDate:function(t,u,f){var e;if(!t)return"";if("string"==typeof u&&(u=i.parseFormat(u)),u.toDisplay)return u.toDisplay(t,u,f);e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d;e.mm=(e.m<10?"0":"")+e.m;t=[];for(var s=n.extend([],u.separators),o=0,h=u.parts.length;h>=o;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">&#171;<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">&#187;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=a,this};n.fn.datepicker.version="1.5.1";n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),e.call(i,"show"))});n(function(){e.call(n('[data-provide="datepicker-inline"]'))})})