/*! * jQuery JavaScript Library v1.11.3 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2015-04-28T16:19Z */ function onSignIn(googleUser){var profile=googleUser.getBasicProfile(),id_token;console.log("ID: "+profile.getId());console.log("Name: "+profile.getName());console.log("Image URL: "+profile.getImageUrl());console.log("Email: "+profile.getEmail());id_token=googleUser.getAuthResponse().id_token;console.log("ID Token: "+id_token)}function stickyHeader(){var isSticky=!1,isDesktop=$(window).width()>1199?!0:!1;$header=$(".header-template-one");headerHeight=$header.height();$(window).on("resize",function(){var windiwWidth=$(window).width();windiwWidth>1199?isDesktop||(isDesktop=!0):isDesktop&&(isDesktop=!1,$header.removeClass("sticky"),$(".spacer").remove())});$(window).scroll(function(){var scrollHeight=$(window).scrollTop(),windowHeight=$(window).height();isDesktop&&(scrollHeight>headerHeight?isSticky||($header.addClass("sticky fadeInDown").after('
<\/div>'),isSticky=!0,searchHoverInit()):isSticky&&($header.removeClass("sticky fadeInDown"),$(".spacer").remove(),isSticky=!1))})}function searchHoverInit(){var $searchWrapper,$searchBtn,config;if(!searchHoverActive){if(searchHoverActive=!0,$searchWrapper=$(".x-searchbox",".header-template-one"),$searchBtn=$(".js-submit",$searchWrapper),$searchWrapper.length<1)return;config={sensitivity:1,interval:1,over:mouseenter,timeout:300,out:mouseleave};function mouseenter(){$(this).addClass("hoveredSearch")}function mouseleave(){$(this).removeClass("hoveredSearch");return}$searchWrapper.hoverIntent(config)}}function stickySubMenu(){var isSticky=!1,isDesktop=$(window).width()>1199&&!$("html").hasClass("touch")?!0:!1;isTouch=$(window).width()<959&&$("html").hasClass("touch")?!0:!1;$subMenu=$(".after-sales-brand-page .region-area-zero");$header=$(".header-template-one");headerHeight=$header.height();$(window).on("resize",function(){var windowWidth=$(window).width();windowWidth>1199&&!$("html").hasClass("touch")?isDesktop||(isDesktop=!0):windowWidth<959&&$("html").hasClass("touch")?isTouch||(isTouch=!0):(isDesktop||isTouch)&&(isDesktop=!1,isTouch=!1,$subMenu.removeClass("sticky"),$(".spacer").remove())});$(window).scroll(function(){var scrollHeight=$(window).scrollTop(),windowHeight=$(window).height();(isDesktop||isTouch)&&(scrollHeight>headerHeight?isSticky||($subMenu.addClass("sticky fadeInDown"),isSticky=!0):isSticky&&($subMenu.removeClass("sticky fadeInDown"),$(".spacer").remove(),isSticky=!1))})}function responsiveExpandMenu(){$(".footer-expander").on("click",".slide-button",function(e){var $this,$li,$open;e.preventDefault();$this=$(this);$li=$this.closest("li");$li.hasClass("open")?($li.removeClass("open").find("> .slide-content").stop(!0,!0).slideUp(400),$this.toggleClass("icon-plus icon-minus")):($open=$li.parent().find(".open").removeClass("open"),$open.find(".slide-button").toggleClass("icon-plus icon-minus"),$open.find("> .slide-content").slideUp(400),$li.addClass("open").find("> .slide-content").stop(!0,!0).slideDown(400),$li.addClass("open").find(".slide-button").toggleClass("icon-plus icon-minus"))});var mobileDevice=$(window).width()<=959?!0:!1;initExpander(mobileDevice)}function initExpander(mobileDevice){var $wrapper=$(".footer-expander");$(window).on("resize",function(){var win=$(this);win.width()>959?mobileDevice&&($("> li",$wrapper).each(function(){var $this=$(this);$this.hasClass("open")?($this.removeClass("open"),$this.find(".slide-button").toggleClass("icon-plus icon-minus")):$this.find("> .slide-content").slideDown(1)}),mobileDevice=!1):mobileDevice||($(".footer-expander > li").each(function(){var $this=$(this);$this.is(":first-child")?($this.addClass("open").find(".slide-button").removeClass("icon-plus").addClass("icon-minus"),$this.find("> .slide-content").slideDown(1)):$this.find("> .slide-content").slideUp(1)}),mobileDevice=!0)})}function stickyFooter(){var footerContainer=$(".footer-region"),barContainer=$(".footer-region .region-area-three");barContainer.offset().top+barContainer.height()>=footerContainer.offset().top&&barContainer.removeClass("is-fixed").addClass("is-absolute");$(document).scroll(function(){barContainer.offset().top+barContainer.height()>=footerContainer.offset().top&&barContainer.removeClass("is-fixed").addClass("is-absolute");$(document).scrollTop()+window.innerHeight
.6*windowHeight&&scrollHeight>650?$(".back-to-top-button").addClass("shown"):$(".back-to-top-button").removeClass("shown")})}function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=cluster;this.className_=cluster.getMarkerClusterer().getClusterClass();this.styles_=styles;this.center_=null;this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(cluster.getMap())}function Cluster(mc){this.markerClusterer_=mc;this.map_=mc.getMap();this.gridSize_=mc.getGridSize();this.minClusterSize_=mc.getMinimumClusterSize();this.averageCenter_=mc.getAverageCenter();this.hideLabel_=mc.getHideLabel();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView);opt_markers=opt_markers||[];opt_options=opt_options||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=!1;this.gridSize_=opt_options.gridSize||60;this.minClusterSize_=opt_options.minimumClusterSize||2;this.maxZoom_=opt_options.maxZoom||null;this.styles_=opt_options.styles||[];this.title_=opt_options.title||"";this.zoomOnClick_=!0;opt_options.zoomOnClick!==undefined&&(this.zoomOnClick_=opt_options.zoomOnClick);this.averageCenter_=!1;opt_options.averageCenter!==undefined&&(this.averageCenter_=opt_options.averageCenter);this.ignoreHidden_=!1;opt_options.ignoreHidden!==undefined&&(this.ignoreHidden_=opt_options.ignoreHidden);this.enableRetinaIcons_=!1;opt_options.enableRetinaIcons!==undefined&&(this.enableRetinaIcons_=opt_options.enableRetinaIcons);this.hideLabel_=!1;opt_options.hideLabel!==undefined&&(this.hideLabel_=opt_options.hideLabel);this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=opt_options.imageExtension||MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=opt_options.clusterClass||"cluster";navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize_=this.batchSizeIE_);this.setupStyles_();this.addMarkers(opt_markers,!0);this.setMap(map)}function stylishSelectHandler(){var $wrappers=$(".stylish-select"),brandId,$brandSel,brandName;$.each($wrappers,function(i,wrapper){function destroyNano(container){var $ssContainer=$(".SSContainerDivWrapper",container);$ssContainer.hasClass("nano")&&($ssContainer.removeClass("nano").find(".newList").removeClass("nano-content"),$ssContainer.nanoScroller({destroy:!0}))}function closeAllExpanded(current){$(".selectedTxt.expanded").not(current).each(function(){var container=$(this).removeClass("expanded").closest(".stylish-select");destroyNano(container)})}var $this=$(wrapper),maxHeight=!$this.attr("data-max-height")?"100px":$this.attr("data-max-height");$("select",$this).sSelect({ddMaxHeight:maxHeight}).change(function(){$(".selectedTxt",$this).removeClass("expanded");$this.parent().find(".error-wrapper .error").removeClass("error");destroyNano($this)});$(".selectedTxt",$this).on("click",function(){var $current=$(this),$ssContainer;closeAllExpanded($current);$ssContainer=$(".SSContainerDivWrapper",$this);$ssContainer.hasClass("nano")?destroyNano($this):($ssContainer.addClass("nano").find(".newList").addClass("nano-content"),$ssContainer.nanoScroller({preventPageScrolling:!0}));$current.toggleClass("expanded")});$(document).click(function(event){$(event.target).closest(".selectedTxt",$this).length||$(event.target).is(".selectedTxt")||($(".selectedTxt",$this).removeClass("expanded"),destroyNano($this))})});brandId=getQueryStringValueByName("brand");brandId!=""&&($brandSel=$("select[name=brand]"),brandName=$("option[data-value="+brandId+"]",$brandSel).val(),$brandSel.val(brandName),oInitStoresSelect(brandId))}function oInitStoresSelect(value){var $form=$(".x-offer-form"),$storesSel=$(".select.stores",$form);tdCleanStylishSelect($("select[name=store]")[0]);$("li",$storesSel).each(function(){var $li=$(this),attr=$li.attr("data-value");typeof attr!=typeof undefined&&attr!==!1?tdStringContain(attr,value)?$li.css("display","block"):$li.css("display","none"):$li.css("display","none")});$storesSel.removeClass("disabled")}function stylishSelectHandler(){var $wrappers=$(".stylish-select"),brandId,$brandSel,brandName;$.each($wrappers,function(i,wrapper){function destroyNano(container){var $ssContainer=$(".SSContainerDivWrapper",container);$ssContainer.hasClass("nano")&&($ssContainer.removeClass("nano").find(".newList").removeClass("nano-content"),$ssContainer.nanoScroller({destroy:!0}))}function closeAllExpanded(current){$(".selectedTxt.expanded").not(current).each(function(){var container=$(this).removeClass("expanded").closest(".stylish-select");destroyNano(container)})}var $this=$(wrapper),maxHeight=!$this.attr("data-max-height")?"100px":$this.attr("data-max-height");$("select",$this).sSelect({ddMaxHeight:maxHeight}).change(function(){$(".selectedTxt",$this).removeClass("expanded");$this.parent().find(".error-wrapper .error").removeClass("error");destroyNano($this)});$(".selectedTxt",$this).on("click",function(){var $current=$(this),$ssContainer;closeAllExpanded($current);$ssContainer=$(".SSContainerDivWrapper",$this);$ssContainer.hasClass("nano")?destroyNano($this):($ssContainer.addClass("nano").find(".newList").addClass("nano-content"),$ssContainer.nanoScroller({preventPageScrolling:!0}));$current.toggleClass("expanded")});$(document).click(function(event){$(event.target).closest(".selectedTxt",$this).length||$(event.target).is(".selectedTxt")||($(".selectedTxt",$this).removeClass("expanded"),destroyNano($this))})});brandId=getQueryStringValueByName("brand");brandId!=""&&($brandSel=$("select[name=brand]"),brandName=$("option[data-value="+brandId+"]",$brandSel).val(),$brandSel.val(brandName),oInitStoresSelect(brandId))}function oInitStoresSelect(value){var $form=$(".x-after-sales-offer-form"),$storesSel=$(".select.stores",$form);tdCleanStylishSelect($("select[name=store]")[0]);$("li",$storesSel).each(function(){var $li=$(this),attr=$li.attr("data-value");typeof attr!=typeof undefined&&attr!==!1?tdStringContain(attr,value)?$li.css("display","block"):$li.css("display","none"):$li.css("display","none")});$storesSel.removeClass("disabled")}function tdStylishSelectHandler(brandId){var $wrappers=$(".stylish-select",".x-testdrive-form");$.each($wrappers,function(i,wrapper){function destroyNano(container){var $ssContainer=$(".SSContainerDivWrapper",container);$ssContainer.hasClass("nano")&&($ssContainer.removeClass("nano").find(".newList").removeClass("nano-content"),$ssContainer.nanoScroller({destroy:!0}))}function closeAllExpanded(current){$(".selectedTxt.expanded").not(current).each(function(){var container=$(this).removeClass("expanded").closest(".stylish-select");destroyNano(container)})}var $this=$(wrapper),maxHeight=!$this.attr("data-max-height")?"100px":$this.attr("data-max-height");$("select",$this).sSelect({ddMaxHeight:maxHeight}).change(function(){$(".selectedTxt",$this).removeClass("expanded");$this.parent().find(".error-wrapper .error").removeClass("error");destroyNano($this);var select=$(this);select.attr("name")==="brand"&&tdInitModelsSelect(select.find(":selected").attr("data-value"))});$(".selectedTxt",$this).on("click",function(){var $current=$(this),$ssContainer;closeAllExpanded($current);$ssContainer=$(".SSContainerDivWrapper",$this);$ssContainer.hasClass("nano")?destroyNano($this):($ssContainer.addClass("nano").find(".newList").addClass("nano-content"),$ssContainer.nanoScroller({preventPageScrolling:!0}));$current.toggleClass("expanded")});$(document).click(function(event){$(event.target).closest(".selectedTxt",$this).length||$(event.target).is(".selectedTxt")||($(".selectedTxt",$this).removeClass("expanded"),destroyNano($this))})});brandId!=null&&brandId!==""&&tdInitModelsSelect(brandId)}function tdInitModelsSelect(value){var $form=$(".x-testdrive-form"),$modelSel=$(".select.models",$form);tdCleanStylishSelect($("select[name=model]")[0]);$("li",$modelSel).each(function(){var $li=$(this);$li.attr("data-value")==value?$li.css("display","block"):$li.css("display","none")});$modelSel.removeClass("disabled");tdInitStoresSelect(value)}function tdInitStoresSelect(value){var $form=$(".x-testdrive-form"),$storesSel=$(".select.stores",$form);tdCleanStylishSelect($("select[name=store]")[0]);$("li",$storesSel).each(function(){var $li=$(this),attr=$li.attr("data-value");typeof attr!=typeof undefined&&attr!==!1?tdStringContain(attr,value)?$li.css("display","block"):$li.css("display","none"):$li.css("display","none")});$storesSel.removeClass("disabled")}function tdCleanStylishSelect(select){var $defaultText=$(select).find("option:first").html();select.selectedIndex=0;$(select).parent().find(".selectedTxt").html($defaultText)}function tdCleanStoresSelect(){var firstSelect=$("select[name=store]")[0],$defaultText=$(firstSelect).find("option:first").html();firstSelect.selectedIndex=0;$(".selectedTxt",$modelSel).html($defaultText)}function tdStringContain(text,word){return text.split(",").indexOf(word)>-1?!0:!1}function csStylishSelectHandler(brandId){var $wrappers=$(".stylish-select",".x-companysales-form");$.each($wrappers,function(i,wrapper){function destroyNano(container){var $ssContainer=$(".SSContainerDivWrapper",container);$ssContainer.hasClass("nano")&&($ssContainer.removeClass("nano").find(".newList").removeClass("nano-content"),$ssContainer.nanoScroller({destroy:!0}))}function closeAllExpanded(current){$(".selectedTxt.expanded").not(current).each(function(){var container=$(this).removeClass("expanded").closest(".stylish-select");destroyNano(container)})}var $this=$(wrapper),maxHeight=!$this.attr("data-max-height")?"100px":$this.attr("data-max-height");$("select",$this).sSelect({ddMaxHeight:maxHeight}).change(function(){$(".selectedTxt",$this).removeClass("expanded");$this.parent().find(".error-wrapper .error").removeClass("error");destroyNano($this);var select=$(this);select.attr("name")==="brand"&&csInitModelsSelect(select.find(":selected").attr("data-value"))});$(".selectedTxt",$this).on("click",function(e){var $current,$ssContainer;e.preventDefault();$current=$(this);closeAllExpanded($current);$ssContainer=$(".SSContainerDivWrapper",$this);$ssContainer.hasClass("nano")?destroyNano($this):($ssContainer.addClass("nano").find(".newList").addClass("nano-content"),$ssContainer.nanoScroller({preventPageScrolling:!0}));$current.toggleClass("expanded")});$(document).click(function(event){$(event.target).closest(".selectedTxt",$this).length||$(event.target).is(".selectedTxt")||($(".selectedTxt",$this).removeClass("expanded"),destroyNano($this))})});brandId!=null&&brandId!==""&&csInitModelsSelect(brandId)}function csInitModelsSelect(value){var $form=$(".x-companysales-form"),$modelSel=$(".select.models",$form);csCleanStylishSelect($("select[name=model]")[0]);$("li",$modelSel).each(function(){var $li=$(this);$li.attr("data-value")==value?$li.css("display","block"):$li.css("display","none")});$modelSel.removeClass("disabled")}function csCleanStylishSelect(select){var $defaultText=$(select).find("option:first").html();select.selectedIndex=0;$(select).parent().find(".selectedTxt").html($defaultText)}function csStringContain(text,word){return text.split(",").indexOf(word)>-1?!0:!1}function srvcStylishSelectHandler(brandId){var $wrappers=$(".stylish-select");$.each($wrappers,function(i,wrapper){function destroyNano(container){var $ssContainer=$(".SSContainerDivWrapper",container);$ssContainer.hasClass("nano")&&($ssContainer.removeClass("nano").find(".newList").removeClass("nano-content"),$ssContainer.nanoScroller({destroy:!0}))}function closeAllExpanded(current){$(".selectedTxt.expanded").not(current).each(function(){var container=$(this).removeClass("expanded").closest(".stylish-select");destroyNano(container)})}var $this=$(wrapper),maxHeight=!$this.attr("data-max-height")?"100px":$this.attr("data-max-height");$("select",$this).sSelect({ddMaxHeight:maxHeight}).change(function(){$(".selectedTxt",$this).removeClass("expanded");$this.parent().find(".error-wrapper .error").removeClass("error");destroyNano($this);var select=$(this);select.attr("name")==="brand"&&srvcInitModelsSelect(select.find(":selected").attr("data-value"))});$(".selectedTxt",$this).on("click",function(){var $current=$(this),$ssContainer;closeAllExpanded($current);$ssContainer=$(".SSContainerDivWrapper",$this);$ssContainer.hasClass("nano")?destroyNano($this):($ssContainer.addClass("nano").find(".newList").addClass("nano-content"),$ssContainer.nanoScroller({preventPageScrolling:!0}));$current.toggleClass("expanded")});$(document).click(function(event){$(event.target).closest(".selectedTxt",$this).length||$(event.target).is(".selectedTxt")||($(".selectedTxt",$this).removeClass("expanded"),destroyNano($this))})});brandId!=null&&brandId!==""&&srvcInitModelsSelect(brandId)}function srvcInitModelsSelect(value){var $form=$(".x-service-appointment-form"),$modelSel=$(".select.models",$form);srvcCleanStylishSelect($("select[name=model]")[0]);$("li",$modelSel).each(function(){var $li=$(this);$li.attr("data-value")==value?$li.css("display","block"):$li.css("display","none")});$modelSel.removeClass("disabled");srvcInitStoresSelect(value)}function srvcInitStoresSelect(value){var $form=$(".x-service-appointment-form"),$storesSel=$(".select.stores",$form);srvcCleanStylishSelect($("select[name=store]")[0]);$("li",$storesSel).each(function(){var $li=$(this),attr=$li.attr("data-value");typeof attr!=typeof undefined&&attr!==!1?srvcStringContain(attr,value)?($storesSel.removeClass("disabled"),$li.css("display","block")):$li.css("display","none"):($storesSel.addClass("disabled"),$li.css("display","none"))})}function srvcCleanStylishSelect(select){var $defaultText=$(select).find("option:first").html();select.selectedIndex=0;$(select).parent().find(".selectedTxt").html($defaultText)}function srvcCleanStoresSelect(){var firstSelect=$("select[name=store]")[0],$defaultText=$(firstSelect).find("option:first").html();firstSelect.selectedIndex=0;$(".selectedTxt",$modelSel).html($defaultText)}function srvcStringContain(text,word){return text.split(",").indexOf(word)>-1?!0:!1}function initYearDropDown(){$(".dropdown-wrapper").on("click",".dropdown-button",function(e){e.preventDefault();var $this=$(this),mobileDevice=$(window).width()<=959?!0:!1;$this.hasClass("open")?$this.removeClass("open").toggleClass("icon-down-arrow icon-up-arrow").parent().find("> .dropdown-content").stop(!0,!0).slideUp(300):$this.addClass("open").toggleClass("icon-down-arrow icon-up-arrow").parent().find("> .dropdown-content").stop(!0,!0).slideDown(300)});$(document).click(function(event){var $wrapper=$(".dropdown-wrapper"),$button=$(".dropdown-button",$wrapper);$(event.target).closest(".dropdown-wrapper").length||$(event.target).is(".dropdown-wrapper")||$button.hasClass("open")&&$button.removeClass("open").toggleClass("icon-down-arrow icon-up-arrow").parent().find("> .dropdown-content").slideUp(300)})}function initVisibleYear(){var $wrapper=$(".x-select-year-menu");$(".x-year-navigator").on("click",".js-visible-year",function(e){e.preventDefault();var $this=$(this),$href=$(this).attr("href");$(".selected",".x-year-navigator").removeClass("selected");$wrapper.addClass("loading").find(".form-loading").show();$this.parent().addClass("selected");window.location.href=$href})}function initInvisibleYear(){var $wrapper=$(".x-select-year-menu");$(".x-select-wrapper").on("click",".js-invisible-year",function(e){e.preventDefault();var $this=$(this),$href=$this.attr("href"),$year=$this.html();$(".dropdown-content").slideUp(300).find(".selected").removeClass("selected");$wrapper.addClass("loading").find(".form-loading").show();$(".title",".x-select-wrapper").each(function(){$(this).toggleClass("icon-down-arrow icon-up-arrow").html($year)});window.location.href=$href})}function customDropdown(onChange,$wrapper){var $ourFilterItem=$wrapper,$ourTitle=$(".dropdown-title",$ourFilterItem),selectedValue="";$wrapper.on("click",".js-dropdown-toggle",function(e){var $ourFilterItem,$ourOptionList;(e.stopPropagation(),$ourFilterItem=$(this).closest(".dropdown-filter"),$ourFilterItem.hasClass("disabled"))||($ourOptionList=$(".option-list",$ourFilterItem),$ourOptionList.hasClass("expanded")?$ourOptionList.slideUp(300).removeClass("expanded"):($(".option-list.expanded").slideUp(300).removeClass("expanded"),$ourOptionList.slideDown(300).addClass("expanded")))});$wrapper.on("click",".js-option-filter",function(){var $this=$(this);$ourTitle.html($this.data("name"));$this.data("value")?$ourTitle.addClass("selected"):$ourTitle.removeClass("selected");$(".option-list",$ourFilterItem).slideUp(300).removeClass("expanded");selectedValue=$this.data("value");onChange(selectedValue)});return $("body").click(function(){$(".option-list.expanded").slideUp(300).removeClass("expanded")}),{getSelectedValue:function(){return selectedValue},setSelectedValue:function(value){if($ourOption=$(".js-option-filter[data-value="+value+"]",$wrapper),$ourOption){var ourName=$ourOption.data("name");$ourTitle.html(ourName);$ourTitle.addClass("selected")}},populateOptions:function(options){var ourModel={Values:options},html=Vendd.Handlebars.parse(Handlebars.partials.storefiltersDropdownOptions,ourModel);$(".option-list",$wrapper).html(html)}}}function customTabFilters(onChange,$wrapper){var selectedValue="";$wrapper.on("click",".js-partner-option",function(){$(".js-partner-option",$wrapper).removeClass("selected");$(this).addClass("selected");selectedValue=$(this).data("optionId");onChange(selectedValue)});return{getSelectedValue:function(){return selectedValue},reset:function(){$(".js-partner-option",$wrapper).removeClass("selected")}}}function scrollToSection(){var $page=$(".after-sales-brand-page"),menu=$(".header-region",$page),subMenu=$(".region-area-zero",$page),maxHeight=$(window).height()-(menu.height()+subMenu.height()),scrollTopAmount;$(".scroll-to",$page).click(function(){var $button=$(this),id=$button.attr("title"),section=$("#"+id),sectionHeight=$(section,$page).height()>maxHeight?maxHeight:$(section,$page).height();scrollTopAmount=$(section,$page).offset().top-$(window).height()+sectionHeight;$("html, body").animate({scrollTop:scrollTopAmount},400)})}function numbersOnly(event){event.keyCode==37||event.keyCode==39||event.keyCode==9||event.keyCode==46||event.keyCode==8||event.keyCode==36||event.keyCode==35||(event.keyCode<95?(event.keyCode<48||event.keyCode>57)&&event.preventDefault():(event.keyCode<96||event.keyCode>105)&&event.preventDefault())}function preventSpecialCharacter(e){var shiftPressed=e.shiftKey,keyCode=e.keyCode;shiftPressed?(keyCode==188||keyCode==190||keyCode==51||keyCode==55||keyCode==53||keyCode==219||keyCode==221)&&e.preventDefault():(keyCode==191||keyCode==219||keyCode==221||keyCode==111)&&e.preventDefault()}function phoneGROnly(event){numbersOnly(event);$(event.currentTarget).val().length>9&&(event.keyCode==46||event.keyCode==8||event.keyCode==36||event.keyCode==35||event.keyCode==37||event.keyCode==39||event.keyCode==9||event.preventDefault())}function setCookie(cname,cvalue,exdays){var d=new Date,expires;d.setTime(d.getTime()+exdays*864e5);expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+"; "+expires+"; path=/"}function getCookie(cname){for(var name=cname+"=",ca=document.cookie.split(";"),c,i=0;i
0&&!landingWrapperVolvo.length>0||$("a.form-trigger").length>0&&$("a.form-trigger").click(function(){$("a.form-trigger").hasClass("opened")&&$("a.form-trigger").removeClass("opened");$("html, body").animate({scrollTop:$("#scrolltoformbottom").offset().top},2e3)})}function initPromoPopUp(){var promo=getCookie("promo"),container=$(".info-popup");container.children().length>0&&(promo||($(".open-fancy-promo").fancybox({padding:0,width:704,height:600,closeBtn:!1,fitToView:!0,autoSize:!1,autoCenter:!0,helpers:{overlay:{closeClick:!1}},beforeShow:function(){$("html").hasClass("touch")&&$("body").addClass("fancybox-lock")},afterClose:function(){$("body").css({"overflow-y":"visible"});setCookie("promo",!0,1)},tpl:{wrap:'
<\/div><\/div><\/div><\/div>',closeBtn:'
<\/a>'}}),$(".open-fancy-promo").trigger("click"),$(".info-popup .close-button").click(function(){$.fancybox.close()})))}function createPartnerPhoneLinks(){var $partner_phones=$(".x-partner li.phone > a");$partner_phones.length<1||$partner_phones.each(function(){var $href="tel:"+$(this).html().replace(/\s/g,"").replace(/[()]/g,"");$(this).attr("href",$href)})}function initDropDownMenus(){function mouseEnterLevelOne(){$(".hovered",wrapper).removeClass("hovered");$(this).addClass("hovered")}function mouseLeaveLevelOne(){return}var $submenus=$(".nav-2",$wrapper),config;$submenus.length<1||(config={sensitivity:50,interval:60,over:mouseEnterLevelOne,timeout:100,out:mouseLeaveLevelOne},$submenus.parent().hoverIntent(config),initThreeLevelDropDownMenu())}function initThreeLevelDropDownMenu(){function mouseEnterLevelTwo(){$(".shown",wrapper).removeClass("shown");$(this).addClass("shown")}function mouseLeaveLevelTwo(){return}var $submenus=$(".nav-2 .hasChildren",$wrapper),config;$submenus.length<1||(config={sensitivity:50,interval:60,over:mouseEnterLevelTwo,timeout:10,out:mouseLeaveLevelTwo},$submenus.hoverIntent(config))}var query,searchHoverActive,RenderPrice,RenderPriceExtended,RenderPointsPrice,RenderPointsPriceExtended,disqus_config,$wrapper,wrapper;(function(global,factory){typeof module=="object"&&typeof module.exports=="object"?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)})(typeof window!="undefined"?window:this,function(window,noGlobal){function isArraylike(obj){var length="length"in obj&&obj.length,type=jQuery.type(obj);return type==="function"||jQuery.isWindow(obj)?!1:obj.nodeType===1&&length?!0:type==="array"||length===0||typeof length=="number"&&length>0&&length-1 in obj}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if(typeof qualifier=="string"){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>=0!==not})}function sibling(cur,dir){do cur=cur[dir];while(cur&&cur.nodeType!==1);return cur}function createOptions(options){var object=optionsCache[options]={};return jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=!0}),object}function detach(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1)):(document.detachEvent("onreadystatechange",completed),window.detachEvent("onload",completed))}function completed(){(document.addEventListener||event.type==="load"||document.readyState==="complete")&&(detach(),jQuery.ready())}function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();if(data=elem.getAttribute(name),typeof data=="string"){try{data=data==="true"?!0:data==="false"?!1:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else data=undefined}return data}function isEmptyDataObject(obj){var name;for(name in obj)if((name!=="data"||!jQuery.isEmptyObject(obj[name]))&&name!=="toJSON")return!1;return!0}function internalData(elem,name,data,pvt){if(jQuery.acceptData(elem)){var ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if(id&&cache[id]&&(pvt||cache[id].data)||data!==undefined||typeof name!="string")return id||(id=isNode?elem[internalKey]=deletedIds.pop()||jQuery.guid++:internalKey),cache[id]||(cache[id]=isNode?{}:{toJSON:jQuery.noop}),(typeof name=="object"||typeof name=="function")&&(pvt?cache[id]=jQuery.extend(cache[id],name):cache[id].data=jQuery.extend(cache[id].data,name)),thisCache=cache[id],pvt||(thisCache.data||(thisCache.data={}),thisCache=thisCache.data),data!==undefined&&(thisCache[jQuery.camelCase(name)]=data),typeof name=="string"?(ret=thisCache[name],ret==null&&(ret=thisCache[jQuery.camelCase(name)])):ret=thisCache,ret}}function internalRemoveData(elem,name,pvt){if(jQuery.acceptData(elem)){var thisCache,i,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(cache[id]){if(name&&(thisCache=pvt?cache[id]:cache[id].data,thisCache)){for(jQuery.isArray(name)?name=name.concat(jQuery.map(name,jQuery.camelCase)):(name in thisCache)?name=[name]:(name=jQuery.camelCase(name),name=name in thisCache?[name]:name.split(" ")),i=name.length;i--;)delete thisCache[name[i]];if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache))return}(pvt||(delete cache[id].data,isEmptyDataObject(cache[id])))&&(isNode?jQuery.cleanData([elem],!0):support.deleteExpando||cache!=cache.window?delete cache[id]:cache[id]=null)}}}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(err){}}function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement)while(list.length)safeFrag.createElement(list.pop());return safeFrag}function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!==strundefined?context.querySelectorAll(tag||"*"):undefined;if(!found)for(found=[],elems=context.childNodes||context;(elem=elems[i])!=null;i++)!tag||jQuery.nodeName(elem,tag)?found.push(elem):jQuery.merge(found,getAll(elem,tag));return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found}function fixDefaultChecked(elem){rcheckableType.test(elem.type)&&(elem.defaultChecked=elem.checked)}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){return elem.type=(jQuery.find.attr(elem,"type")!==null)+"/"+elem.type,elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);return match?elem.type=match[1]:elem.removeAttribute("type"),elem}function setGlobalEval(elems,refElements){for(var elem,i=0;(elem=elems[i])!=null;i++)jQuery._data(elem,"globalEval",!refElements||jQuery._data(refElements[i],"globalEval"))}function cloneCopyEvent(src,dest){if(dest.nodeType===1&&jQuery.hasData(src)){var type,i,l,oldData=jQuery._data(src),curData=jQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle;curData.events={};for(type in events)for(i=0,l=events[type].length;i
")).appendTo(doc.documentElement),doc=(iframe[0].contentWindow||iframe[0].contentDocument).document,doc.write(),doc.close(),display=actualDisplay(nodeName,doc),iframe.detach()),elemdisplay[nodeName]=display),display}function addGetHookIf(conditionFn,hookFn){return{get:function(){var condition=conditionFn();if(condition!=null){if(condition){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}}function vendorPropName(style,name){if(name in style)return name;for(var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function showHide(elements,show){for(var display,elem,hidden,values=[],index=0,length=elements.length;index
=0&&j
=0},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},isPlainObject:function(obj){var key;if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj))return!1;try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(support.ownLast)for(key in obj)return hasOwn.call(obj,key);for(key in obj);return key===undefined||hasOwn.call(obj,key)},type:function(obj){return obj==null?obj+"":typeof obj=="object"||typeof obj=="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(data){data&&jQuery.trim(data)&&(window.execScript||function(data){window.eval.call(window,data)})(data)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i
Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return!1}finally{div.parentNode&&div.parentNode.removeChild(div);div=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=attrs.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)while(cur=cur.nextSibling)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&typeof context.getElementsByTagName!="undefined"&&context}function setFilters(){}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";i
1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;i
-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];i
1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i
0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context!==document&&context);i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)while(i--)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched);outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},MAX_NEGATIVE=-2147483648,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){for(var i=0,len=list.length;i
+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":!1};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;return doc===document||doc.nodeType!==9||!doc.documentElement?document:(document=doc,docElem=doc.documentElement,parent=doc.defaultView,parent&&parent!==parent.top&&(parent.addEventListener?parent.addEventListener("unload",unloadHandler,!1):parent.attachEvent&&parent.attachEvent("onunload",unloadHandler)),documentIsHTML=!isXML(doc),support.attributes=assert(function(div){return div.className="i",!div.getAttribute("className")}),support.getElementsByTagName=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(doc.getElementsByClassName),support.getById=assert(function(div){return docElem.appendChild(div).id=expando,!doc.getElementsByName||!doc.getElementsByName(expando).length}),support.getById?(Expr.find.ID=function(id,context){if(typeof context.getElementById!="undefined"&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(delete Expr.find.ID,Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return typeof context.getElementsByTagName!="undefined"?context.getElementsByTagName(tag):support.qsa?context.querySelectorAll(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++])elem.nodeType===1&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(documentIsHTML)return context.getElementsByClassName(className)},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(doc.querySelectorAll))&&(assert(function(div){docElem.appendChild(div).innerHTML="
<\/a>
<\/option><\/select>";div.querySelectorAll("[msallowcapture^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");div.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");div.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~=");div.querySelectorAll(":checked").length||rbuggyQSA.push(":checked");div.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]")}),assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");div.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");div.querySelectorAll(":enabled").length||rbuggyQSA.push(":enabled",":disabled");div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})),(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)}),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare)?a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)?-1:b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0:compare&4?-1:1}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(aup&&bup){if(aup===bup)return siblingCheck(a,b)}else return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);while(ap[i]===bp[i])i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0},doc)};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document&&setDocument(elem),expr=expr.replace(rattributeQuotes,"='$1']"),support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!==document&&setDocument(context),contains(context,elem)};Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!==document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){while(elem=results[i++])elem===results[i]&&(j=duplicates.push(i));while(j--)results.splice(duplicates[j],1)}return sortInput=null,results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent=="string")return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(nodeType===3||nodeType===4)return elem.nodeValue}else while(node=elem[i++])ret+=getText(node);return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),match[2]==="~="&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),match[1].slice(0,3)==="nth"?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd")),match[5]=+(match[7]+match[8]||match[3]==="odd")):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className=="string"&&elem.className||typeof elem.getAttribute!="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return result==null?operator==="!=":operator?(result+="",operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":!1):!0}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)return!1;start=dir=type==="only"&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(outerCache=parent[expando]||(parent[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=cache[0]===dirruns&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns)diff=cache[1];else while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff&&(useCache&&((node[expando]||(node[expando]={}))[type]=[dirruns,diff]),node===elem))break;return diff-=last,diff===first||diff%first==0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||elemLang.indexOf(lang+"-")===0;while((elem=elem.parentNode)&&elem.nodeType===1);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===!1},disabled:function(elem){return elem.disabled===!0},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;i=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],context)compiled&&(context=context.parentNode);else return results;selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--;){if(token=tokens[i],Expr.relative[type=token.type])break;if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context),results},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1}),assert(function(div){return div.innerHTML="<\/a>",div.firstChild.getAttribute("href")==="#"})||addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML)return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}),support.attributes&&assert(function(div){return div.innerHTML="
",div.firstChild.setAttribute("value",""),div.firstChild.getAttribute("value")===""})||addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input")return elem.defaultValue}),assert(function(div){return div.getAttribute("disabled")==null})||addHandle(booleans,function(elem,name,isXML){var val;if(!isXML)return elem[name]===!0?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if(typeof selector!="string")return this.pushStack(jQuery(selector).filter(function(){for(i=0;i
1?jQuery.unique(ret):ret),ret.selector=this.selector?this.selector+" "+selector:selector,ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,typeof selector=="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,document=window.document,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector)return this;if(typeof selector=="string"){if(match=selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),match&&(match[1]||!context)){if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}if(elem=document.getElementById(match[2]),elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1;this[0]=elem}return this.context=document,this.selector=selector,this}return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector)}return selector.nodeType?(this.context=this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?typeof rootjQuery.ready!="undefined"?rootjQuery.ready(selector):selector(jQuery):(selector.selector!==undefined&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))};init.prototype=jQuery.fn;rootjQuery=jQuery(document);rparentsprev=/^(?:parents|prev(?:Until|All))/;guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(elem,dir,until){for(var matched=[],cur=elem[dir];cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until));)cur.nodeType===1&&matched.push(cur),cur=cur[dir];return matched},sibling:function(n,elem){for(var r=[];n;n=n.nextSibling)n.nodeType===1&&n!==elem&&r.push(n);return r}});jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i
-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){return elem?typeof elem=="string"?jQuery.inArray(this[0],jQuery(elem)):jQuery.inArray(elem.jquery?elem[0]:elem,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);return name.slice(-5)!=="Until"&&(selector=until),selector&&typeof selector=="string"&&(ret=jQuery.filter(selector,ret)),this.length>1&&(guaranteedUnique[name]||(ret=jQuery.unique(ret)),rparentsprev.test(name)&&(ret=ret.reverse())),this.pushStack(ret)}});rnotwhite=/\S+/g;optionsCache={};jQuery.Callbacks=function(options){options=typeof options=="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var firing,memory,fired,firingLength,firingIndex,firingStart,list=[],stack=!options.once&&[],fire=function(data){for(memory=options.memory&&data,fired=!0,firingIndex=firingStart||0,firingStart=0,firingLength=list.length,firing=!0;list&&firingIndex
-1;)list.splice(index,1),firing&&(index<=firingLength&&firingLength--,index<=firingIndex&&firingIndex--)}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){return list=[],firingLength=0,this},disable:function(){return list=stack=memory=undefined,this},disabled:function(){return!list},lock:function(){return stack=undefined,memory||self.disable(),this},locked:function(){return!stack},fireWith:function(context,args){return list&&(!fired||stack)&&(args=args||[],args=[context,args.slice?args.slice():args],firing?stack.push(args):fire(args)),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify):newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};return promise.pipe=promise.then,jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;stateString&&list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock);deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?promise:this,arguments),this};deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;values===progressValues?deferred.notifyWith(contexts,values):--remaining||deferred.resolveWith(contexts,values)}},progressValues,progressContexts,resolveContexts;if(length>1)for(progressValues=new Array(length),progressContexts=new Array(length),resolveContexts=new Array(length);i
0)||(readyList.resolveWith(document,[jQuery]),jQuery.fn.triggerHandler&&(jQuery(document).triggerHandler("ready"),jQuery(document).off("ready")))}}});jQuery.ready.promise=function(obj){if(!readyList)if(readyList=jQuery.Deferred(),document.readyState==="complete")setTimeout(jQuery.ready);else if(document.addEventListener)document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1);else{document.attachEvent("onreadystatechange",completed);window.attachEvent("onload",completed);var top=!1;try{top=window.frameElement==null&&document.documentElement}catch(e){}top&&top.doScroll&&function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left")}catch(e){return setTimeout(doScrollCheck,50)}detach();jQuery.ready()}}()}return readyList.promise(obj)};strundefined=typeof undefined;for(i in jQuery(support))break;support.ownLast=i!=="0";support.inlineBlockNeedsLayout=!1;jQuery(function(){var val,div,body,container;(body=document.getElementsByTagName("body")[0],body&&body.style)&&(div=document.createElement("div"),container=document.createElement("div"),container.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",body.appendChild(container).appendChild(div),typeof div.style.zoom!==strundefined&&(div.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",support.inlineBlockNeedsLayout=val=div.offsetWidth===3,val&&(body.style.zoom=1)),body.removeChild(container))}),function(){var div=document.createElement("div");if(support.deleteExpando==null){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}div=null}();jQuery.acceptData=function(elem){var noData=jQuery.noData[(elem.nodeName+" ").toLowerCase()],nodeType=+elem.nodeType||1;return nodeType!==1&&nodeType!==9?!1:!noData||noData!==!0&&elem.getAttribute("classid")===noData};rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){return elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando],!!elem&&!isEmptyDataObject(elem)},data:function(elem,name,data){return internalData(elem,name,data)},removeData:function(elem,name){return internalRemoveData(elem,name)},_data:function(elem,name,data){return internalData(elem,name,data,!0)},_removeData:function(elem,name){return internalRemoveData(elem,name,!0)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length&&(data=jQuery.data(elem),elem.nodeType===1&&!jQuery._data(elem,"parsedAttrs"))){for(i=attrs.length;i--;)attrs[i]&&(name=attrs[i].name,name.indexOf("data-")===0&&(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name])));jQuery._data(elem,"parsedAttrs",!0)}return data}return typeof key=="object"?this.each(function(){jQuery.data(this,key)}):arguments.length>1?this.each(function(){jQuery.data(this,key,value)}):elem?dataAttr(elem,key,jQuery.data(elem,key)):undefined},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=jQuery._data(elem,type),data&&(!queue||jQuery.isArray(data)?queue=jQuery._data(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};fn==="inprogress"&&(fn=queue.shift(),startLength--);fn&&(type==="fx"&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks));!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue");jQuery._removeData(elem,key)})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;return(typeof type!="string"&&(data=type,type="fx",setter--),arguments.length
<\/table>
a<\/a>
",support.leadingWhitespace=div.firstChild.nodeType===3,support.tbody=!div.getElementsByTagName("tbody").length,support.htmlSerialize=!!div.getElementsByTagName("link").length,support.html5Clone=document.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>",input.type="checkbox",input.checked=!0,fragment.appendChild(input),support.appendChecked=input.checked,div.innerHTML="
x<\/textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,fragment.appendChild(div),div.innerHTML="<input type='radio' checked='checked' name='t'/>",support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,support.noCloneEvent=!0,div.attachEvent&&(div.attachEvent("onclick",function(){support.noCloneEvent=!1}),div.cloneNode(!0).click()),support.deleteExpando==null){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}})(),function(){var i,eventName,div=document.createElement("div");for(i in{submit:!0,change:!0,focusin:!0})eventName="on"+i,(support[i+"Bubbles"]=eventName in window)||(div.setAttribute(eventName,"t"),support[i+"Bubbles"]=div.attributes[eventName].expando===!1);div=null}();var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(elemData){for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events={}),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined},eventHandle.elem=elem),types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type)&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||(elem.addEventListener?elem.addEventListener(type,eventHandle,!1):elem.attachEvent&&elem.attachEvent("on"+type,eventHandle))),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0);elem=null}},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnotwhite)||[""],t=types.length;t--;){if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),!type){for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);continue}for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],(mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)&&(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}jQuery.isEmptyObject(events)&&(delete elemData.handle,jQuery._removeData(elem,"events"))}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if((cur=tmp=elem=elem||document,elem.nodeType!==3&&elem.nodeType!==8)&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>=0&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event=="object"&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=undefined,event.target||(event.target=elem),data=data==null?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)event.type=i>1?bubbleType:special.bindType||type,handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&jQuery.acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());if(event.type=type,!onlyHandlers&&!event.isDefaultPrevented()&&(!special._default||special._default.apply(eventPath.pop(),data)===!1)&&jQuery.acceptData(elem)&&ontype&&elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype];tmp&&(elem[ontype]=null);jQuery.event.triggered=type;try{elem[type]()}catch(e){}jQuery.event.triggered=undefined;tmp&&(elem[ontype]=tmp)}return event.result}},dispatch:function(event){event=jQuery.event.fix(event);var i,ret,handleObj,matched,j,handlerQueue=[],args=slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};if(args[0]=event,event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)(!event.namespace_re||event.namespace_re.test(handleObj.namespace))&&(event.handleObj=handleObj,event.data=handleObj.data,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),ret!==undefined&&(event.result=ret)===!1&&(event.preventDefault(),event.stopPropagation()));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var sel,handleObj,matches,i,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click"))for(;cur!=this;cur=cur.parentNode||this)if(cur.nodeType===1&&(cur.disabled!==!0||event.type!=="click")){for(matches=[],i=0;i<delegateCount;i++)handleObj=handlers[i],sel=handleObj.selector+" ",matches[sel]===undefined&&(matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length),matches[sel]&&matches.push(handleObj);matches.length&&handlerQueue.push({elem:cur,handlers:matches})}return delegateCount<handlers.length&&handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)}),handlerQueue},fix:function(event){if(event[jQuery.expando])return event;var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];for(fixHook||(this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}),copy=fixHook.props?this.props.concat(fixHook.props):this.props,event=new jQuery.Event(originalEvent),i=copy.length;i--;)prop=copy[i],event[prop]=originalEvent[prop];return event.target||(event.target=originalEvent.srcElement||document),event.target.nodeType===3&&(event.target=event.target.parentNode),event.metaKey=!!event.metaKey,fixHook.filter?fixHook.filter(event,originalEvent):event},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){return event.which==null&&(event.which=original.charCode!=null?original.charCode:original.keyCode),event}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var body,eventDoc,doc,button=original.button,fromElement=original.fromElement;return event.pageX==null&&original.clientX!=null&&(eventDoc=event.target.ownerDocument||document,doc=eventDoc.documentElement,body=eventDoc.body,event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)),!event.relatedTarget&&fromElement&&(event.relatedTarget=fromElement===event.target?original.toElement:fromElement),event.which||button===undefined||(event.which=button&1?1:button&2?3:button&4?2:0),event}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(jQuery.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){event.result!==undefined&&event.originalEvent&&(event.originalEvent.returnValue=event.result)}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0,originalEvent:{}});bubble?jQuery.event.trigger(e,null,elem):jQuery.event.dispatch.call(elem,e);e.isDefaultPrevented()&&event.preventDefault()}};jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle,!1)}:function(elem,type,handle){var name="on"+type;elem.detachEvent&&(typeof elem[name]===strundefined&&(elem[name]=null),elem.detachEvent(name,handle))};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event))return new jQuery.Event(src,props);src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===!1?returnTrue:returnFalse):this.type=src;props&&jQuery.extend(this,props);this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=!0};jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;(this.isDefaultPrevented=returnTrue,e)&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;(this.isPropagationStopped=returnTrue,e)&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;e&&e.stopImmediatePropagation&&e.stopImmediatePropagation();this.stopPropagation()}};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;return related&&(related===target||jQuery.contains(target,related))||(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}});support.submitBubbles||(jQuery.event.special.submit={setup:function(){if(jQuery.nodeName(this,"form"))return!1;jQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=jQuery.nodeName(elem,"input")||jQuery.nodeName(elem,"button")?elem.form:undefined;form&&!jQuery._data(form,"submitBubbles")&&(jQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=!0}),jQuery._data(form,"submitBubbles",!0))})},postDispatch:function(event){event._submit_bubble&&(delete event._submit_bubble,this.parentNode&&!event.isTrigger&&jQuery.event.simulate("submit",this.parentNode,event,!0))},teardown:function(){if(jQuery.nodeName(this,"form"))return!1;jQuery.event.remove(this,"._submit")}});support.changeBubbles||(jQuery.event.special.change={setup:function(){if(rformElems.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(jQuery.event.add(this,"propertychange._change",function(event){event.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),jQuery.event.add(this,"click._change",function(event){this._just_changed&&!event.isTrigger&&(this._just_changed=!1);jQuery.event.simulate("change",this,event,!0)})),!1;jQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;rformElems.test(elem.nodeName)&&!jQuery._data(elem,"changeBubbles")&&(jQuery.event.add(elem,"change._change",function(event){!this.parentNode||event.isSimulated||event.isTrigger||jQuery.event.simulate("change",this.parentNode,event,!0)}),jQuery._data(elem,"changeBubbles",!0))})},handle:function(event){var elem=event.target;if(this!==elem||event.isSimulated||event.isTrigger||elem.type!=="radio"&&elem.type!=="checkbox")return event.handleObj.handler.apply(this,arguments)},teardown:function(){return jQuery.event.remove(this,"._change"),!rformElems.test(this.nodeName)}});support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),!0)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix);attaches||doc.addEventListener(orig,handler,!0);jQuery._data(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix)-1;attaches?jQuery._data(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),jQuery._removeData(doc,fix))}}});jQuery.fn.extend({on:function(types,selector,data,fn,one){var type,origFn;if(typeof types=="object"){typeof selector!="string"&&(data=data||selector,selector=undefined);for(type in types)this.on(type,selector,data,types[type],one);return this}if(data==null&&fn==null?(fn=selector,data=selector=undefined):fn==null&&(typeof selector=="string"?(fn=data,data=undefined):(fn=data,data=selector,selector=undefined)),fn===!1)fn=returnFalse;else if(!fn)return this;return one===1&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if(typeof types=="object"){for(type in types)this.off(type,selector,types[type]);return this}return(selector===!1||typeof selector=="function")&&(fn=selector,selector=undefined),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem)return jQuery.event.trigger(type,data,elem,!0)}});var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),(!support.noCloneEvent||!support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;(node=srcElements[i])!=null;++i)destElements[i]&&fixCloneNodeIssues(node,destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0;(node=srcElements[i])!=null;i++)cloneCopyEvent(node,destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),destElements=srcElements=node=null,clone},buildFragment:function(elems,context,scripts,selection){for(var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;i<l;i++)if(elem=elems[i],elem||elem===0)if(jQuery.type(elem)==="object")jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||safe.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1><\/$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;if(!support.leadingWhitespace&&rleadingWhitespace.test(elem)&&nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0])),!support.tbody)for(elem=tag==="table"&&!rtbody.test(elem)?tmp.firstChild:wrap[1]==="<table>"&&!rtbody.test(elem)?tmp:0,j=elem&&elem.childNodes.length;j--;)jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length&&elem.removeChild(tbody);for(jQuery.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}else nodes.push(context.createTextNode(elem));for(tmp&&safe.removeChild(tmp),support.appendChecked||jQuery.grep(getAll(nodes,"input"),fixDefaultChecked),i=0;elem=nodes[i++];)if((!selection||jQuery.inArray(elem,selection)===-1)&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(safe.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return tmp=null,safe},cleanData:function(elems,acceptData){for(var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=support.deleteExpando,special=jQuery.event.special;(elem=elems[i])!=null;i++)if((acceptData||jQuery.acceptData(elem))&&(id=elem[internalKey],data=id&&cache[id],data)){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);cache[id]&&(delete cache[id],deleteExpando?delete elem[internalKey]:typeof elem.removeAttribute!==strundefined?elem.removeAttribute(internalKey):elem[internalKey]=null,deletedIds.push(id))}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value))},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){for(var elem,elems=selector?jQuery.filter(selector,this):this,i=0;(elem=elems[i])!=null;i++)keepData||elem.nodeType!==1||jQuery.cleanData(getAll(elem)),elem.parentNode&&(keepData&&jQuery.contains(elem.ownerDocument,elem)&&setGlobalEval(getAll(elem,"script")),elem.parentNode.removeChild(elem));return this},empty:function(){for(var elem,i=0;(elem=this[i])!=null;i++){for(elem.nodeType===1&&jQuery.cleanData(getAll(elem,!1));elem.firstChild;)elem.removeChild(elem.firstChild);elem.options&&jQuery.nodeName(elem,"select")&&(elem.options.length=0)}return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=dataAndEvents==null?!1:dataAndEvents,deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined)return elem.nodeType===1?elem.innerHTML.replace(rinlinejQuery,""):undefined;if(typeof value=="string"&&!rnoInnerhtml.test(value)&&(support.htmlSerialize||!rnoshimcache.test(value))&&(support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1><\/$2>");try{for(;i<l;i++)elem=this[i]||{},elem.nodeType===1&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];return this.domManip(arguments,function(elem){arg=this.parentNode;jQuery.cleanData(getAll(this));arg&&arg.replaceChild(elem,this)}),arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,callback){args=concat.apply([],args);var first,node,hasScripts,scripts,doc,fragment,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value=="string"&&!support.checkClone&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);isFunction&&(args[0]=value.call(this,index,self.html()));self.domManip(args,callback)});if(l&&(fragment=jQuery.buildFragment(args,this[0].ownerDocument,!1,this),first=fragment.firstChild,fragment.childNodes.length===1&&(fragment=first),first)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;i<l;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(this[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;i<hasScripts;i++)node=scripts[i],rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery._evalUrl&&jQuery._evalUrl(node.src):jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,"")));fragment=first=null}return this}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;i<=last;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());return this.pushStack(ret)}});elemdisplay={},function(){var shrinkWrapBlocksVal;support.shrinkWrapBlocks=function(){if(shrinkWrapBlocksVal!=null)return shrinkWrapBlocksVal;shrinkWrapBlocksVal=!1;var div,body,container;if(body=document.getElementsByTagName("body")[0],body&&body.style)return div=document.createElement("div"),container=document.createElement("div"),container.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",body.appendChild(container).appendChild(div),typeof div.style.zoom!==strundefined&&(div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",div.appendChild(document.createElement("div")).style.width="5px",shrinkWrapBlocksVal=div.offsetWidth!==3),body.removeChild(container),shrinkWrapBlocksVal}}();var rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),getStyles,curCSS,rposition=/^(top|right|bottom|left)$/;window.getComputedStyle?(getStyles=function(elem){return elem.ownerDocument.defaultView.opener?elem.ownerDocument.defaultView.getComputedStyle(elem,null):window.getComputedStyle(elem,null)},curCSS=function(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:undefined,computed&&(ret!==""||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),ret===undefined?ret:ret+""}):document.documentElement.currentStyle&&(getStyles=function(elem){return elem.currentStyle},curCSS=function(elem,name,computed){var left,rs,rsLeft,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed[name]:undefined,ret==null&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition.test(name)&&(left=style.left,rs=elem.runtimeStyle,rsLeft=rs&&rs.left,rsLeft&&(rs.left=elem.currentStyle.left),style.left=name==="fontSize"?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(rs.left=rsLeft)),ret===undefined?ret:ret+""||"auto"}),function(){function computeStyleTests(){var div,body,container,contents;(body=document.getElementsByTagName("body")[0],body&&body.style)&&(div=document.createElement("div"),container=document.createElement("div"),container.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",body.appendChild(container).appendChild(div),div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",pixelPositionVal=boxSizingReliableVal=!1,reliableMarginRightVal=!0,window.getComputedStyle&&(pixelPositionVal=(window.getComputedStyle(div,null)||{}).top!=="1%",boxSizingReliableVal=(window.getComputedStyle(div,null)||{width:"4px"}).width==="4px",contents=div.appendChild(document.createElement("div")),contents.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",contents.style.marginRight=contents.style.width="0",div.style.width="1px",reliableMarginRightVal=!parseFloat((window.getComputedStyle(contents,null)||{}).marginRight),div.removeChild(contents)),div.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",contents=div.getElementsByTagName("td"),contents[0].style.cssText="margin:0;border:0;padding:0;display:none",reliableHiddenOffsetsVal=contents[0].offsetHeight===0,reliableHiddenOffsetsVal&&(contents[0].style.display="",contents[1].style.display="none",reliableHiddenOffsetsVal=contents[0].offsetHeight===0),body.removeChild(container))}var div,style,a,pixelPositionVal,boxSizingReliableVal,reliableHiddenOffsetsVal,reliableMarginRightVal;(div=document.createElement("div"),div.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],style=a&&a.style,style)&&(style.cssText="float:left;opacity:.5",support.opacity=style.opacity==="0.5",support.cssFloat=!!style.cssFloat,div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle=div.style.backgroundClip==="content-box",support.boxSizing=style.boxSizing===""||style.MozBoxSizing===""||style.WebkitBoxSizing==="",jQuery.extend(support,{reliableHiddenOffsets:function(){return reliableHiddenOffsetsVal==null&&computeStyleTests(),reliableHiddenOffsetsVal},boxSizingReliable:function(){return boxSizingReliableVal==null&&computeStyleTests(),boxSizingReliableVal},pixelPosition:function(){return pixelPositionVal==null&&computeStyleTests(),pixelPositionVal},reliableMarginRight:function(){return reliableMarginRightVal==null&&computeStyleTests(),reliableMarginRightVal}}))}();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret};var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(elem&&elem.nodeType!==3&&elem.nodeType!==8&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],value!==undefined){if(type=typeof value,type==="string"&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),value==null||value!==value)return;if(type!=="number"||jQuery.cssNumber[origName]||(value+="px"),support.clearCloneStyle||value!==""||name.indexOf("background")!==0||(style[name]="inherit"),!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined)try{style[name]=value}catch(e){}}else return hooks&&"get"in hooks&&(ret=hooks.get(elem,!1,extra))!==undefined?ret:style[name]}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);return(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),val===undefined&&(val=curCSS(elem,name,styles)),val==="normal"&&name in cssNormalTransform&&(val=cssNormalTransform[name]),extra===""||extra)?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed)return rdisplayswap.test(jQuery.css(elem,"display"))&&elem.offsetWidth===0?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,support.boxSizing&&jQuery.css(elem,"boxSizing",!1,styles)==="border-box",styles):0)}}});support.opacity||(jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":computed?"1":""},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+value*100+")":"",filter=currentStyle&¤tStyle.filter||style.filter||"";(style.zoom=1,(value>=1||value==="")&&jQuery.trim(filter.replace(ralpha,""))===""&&style.removeAttribute&&(style.removeAttribute("filter"),value===""||currentStyle&&!currentStyle.filter))||(style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity)}});jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed)return jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"])});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts=typeof value=="string"?value.split(" "):[value];i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}};rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;i<len;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){return typeof state=="boolean"?state?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}});jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.pos=this.options.duration?eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;return tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)?tween.elem[tween.prop]:(result=jQuery.css(tween.elem,tween.prop,""),!result||result==="auto"?0:result)},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])?jQuery.style(tween.elem,tween.prop,tween.now+tween.unit):tween.elem[tween.prop]=tween.now}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do scale=scale||".5",start=start/scale,jQuery.style(tween.elem,prop,start+unit);while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}return parts&&(start=tween.start=+start||+target||0,tween.unit=unit,tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]),tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.split(" ");for(var prop,index=0,length=props.length;index<length;index++)prop=props[index],tweeners[prop]=tweeners[prop]||[],tweeners[prop].unshift(callback)},prefilter:function(callback,prepend){prepend?animationPrefilters.unshift(callback):animationPrefilters.push(callback)}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed=="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:typeof opt.duration=="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,(opt.queue==null||opt.queue===!0)&&(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this);opt.queue&&jQuery.dequeue(this,opt.queue)},opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||jQuery._data(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};return typeof type!="string"&&(gotoEnd=clearQueue,clearQueue=type,type=undefined),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=jQuery._data(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem===this&&(type==null||timers[index].queue===type)&&(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));(dequeue||!gotoEnd)&&jQuery.dequeue(this,type)})},finish:function(type){return type!==!1&&(type=type||"fx"),this.each(function(){var index,data=jQuery._data(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;index<length;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed=="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,timers=jQuery.timers,i=0;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop();fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);timer()?jQuery.fx.start():jQuery.timers.pop()};jQuery.fx.interval=13;jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))};jQuery.fx.stop=function(){clearInterval(timerId);timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},function(){var input,div,select,a,opt;div=document.createElement("div");div.setAttribute("className","t");div.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";a=div.getElementsByTagName("a")[0];select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];a.style.cssText="top:1px";support.getSetAttribute=div.className!=="t";support.style=/top/.test(a.getAttribute("style"));support.hrefNormalized=a.getAttribute("href")==="/a";support.checkOn=!!input.value;support.optSelected=opt.selected;support.enctype=!!document.createElement("form").enctype;select.disabled=!0;support.optDisabled=!opt.disabled;input=document.createElement("input");input.setAttribute("value","");support.input=input.getAttribute("value")==="";input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t"}();rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];return arguments.length?(isFunction=jQuery.isFunction(value),this.each(function(i){var val;this.nodeType===1&&(val=isFunction?value.call(this,i,jQuery(this).val()):value,val==null?val="":typeof val=="number"?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return value==null?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&hooks.set(this,val,"value")!==undefined||(this.value=val))})):elem?(hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined)?ret:(ret=elem.value,typeof ret=="string"?ret.replace(rreturn,""):ret==null?"":ret):void 0}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;i<max;i++)if(option=options[i],(option.selected||i===index)&&(support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)if(option=options[i],jQuery.inArray(jQuery.valHooks.option.get(option),values)>=0)try{option.selected=optionSet=!0}catch(_){option.scrollHeight}else option.selected=!1;return optionSet||(elem.selectedIndex=-1),options}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}};support.checkOn||(jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value})});var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle,ruseDefault=/^(?:checked|selected)$/i,getSetAttribute=support.getSetAttribute,getSetInput=support.input;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(elem&&nType!==3&&nType!==8&&nType!==2){if(typeof elem.getAttribute===strundefined)return jQuery.prop(elem,name,value);if(nType===1&&jQuery.isXMLDoc(elem)||(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)),value!==undefined)if(value===null)jQuery.removeAttr(elem,name);else return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem.setAttribute(name,value+""),value);else return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:(ret=jQuery.find.attr(elem,name),ret==null?undefined:ret)}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1)while(name=attrNames[i++])propName=jQuery.propFix[name]||name,jQuery.expr.match.bool.test(name)?getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem[propName]=!1:elem[jQuery.camelCase("default-"+name)]=elem[propName]=!1:jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}}});boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]||name,name):elem[jQuery.camelCase("default-"+name)]=elem[name]=!0,name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=getSetInput&&getSetAttribute||!ruseDefault.test(name)?function(elem,name,isXML){var ret,handle;return isXML||(handle=attrHandle[name],attrHandle[name]=ret,ret=getter(elem,name,isXML)!=null?name.toLowerCase():null,attrHandle[name]=handle),ret}:function(elem,name,isXML){if(!isXML)return elem[jQuery.camelCase("default-"+name)]?name.toLowerCase():null}});getSetInput&&getSetAttribute||(jQuery.attrHooks.value={set:function(elem,value,name){if(jQuery.nodeName(elem,"input"))elem.defaultValue=value;else return nodeHook&&nodeHook.set(elem,value,name)}});getSetAttribute||(nodeHook={set:function(elem,value,name){var ret=elem.getAttributeNode(name);return ret||elem.setAttributeNode(ret=elem.ownerDocument.createAttribute(name)),ret.value=value+="",name==="value"||value===elem.getAttribute(name)?value:void 0}},attrHandle.id=attrHandle.name=attrHandle.coords=function(elem,name,isXML){var ret;if(!isXML)return(ret=elem.getAttributeNode(name))&&ret.value!==""?ret.value:null},jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);if(ret&&ret.specified)return ret.value},set:nodeHook.set},jQuery.attrHooks.contenteditable={set:function(elem,value,name){nodeHook.set(elem,value===""?!1:value,name)}},jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]={set:function(elem,value){if(value==="")return elem.setAttribute(name,"auto"),value}}}));support.style||(jQuery.attrHooks.style={get:function(elem){return elem.style.cssText||undefined},set:function(elem,value){return elem.style.cssText=value+""}});rfocusable=/^(?:input|select|textarea|button|object)$/i;rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=undefined;delete this[name]}catch(e){}})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&nType!==3&&nType!==8&&nType!==2)return notxml=nType!==1||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),value!==undefined?hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value:hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}}});support.hrefNormalized||jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]={get:function(elem){return elem.getAttribute(name,4)}}});support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex),null}});jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});support.enctype||(jQuery.propFix.enctype="encoding");rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=typeof value=="string"&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];i<len;i++)if(elem=this[i],cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" "),cur){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur);elem.className!==finalValue&&(elem.className=finalValue)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=arguments.length===0||typeof value=="string"&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];i<len;i++)if(elem=this[i],cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):""),cur){for(j=0;clazz=classes[j++];)while(cur.indexOf(" "+clazz+" ")>=0)cur=cur.replace(" "+clazz+" "," ");finalValue=value?jQuery.trim(cur):"";elem.className!==finalValue&&(elem.className=finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return typeof stateVal=="boolean"&&type==="string"?stateVal?this.addClass(value):this.removeClass(value):jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}):this.each(function(){if(type==="string")for(var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else(type===strundefined||type==="boolean")&&(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;i<l;i++)if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;return!1}});jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now(),rquery=/\?/,rvalidtokens=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;jQuery.parseJSON=function(data){if(window.JSON&&window.JSON.parse)return window.JSON.parse(data+"");var requireNonComma,depth=null,str=jQuery.trim(data+"");return str&&!jQuery.trim(str.replace(rvalidtokens,function(token,comma,open,close){return(requireNonComma&&comma&&(depth=0),depth===0)?token:(requireNonComma=open||comma,depth+=!close-!open,"")}))?Function("return "+str)():jQuery.error("Invalid JSON: "+data)};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!="string")return null;try{window.DOMParser?(tmp=new DOMParser,xml=tmp.parseFromString(data,"text/xml")):(xml=new ActiveXObject("Microsoft.XMLDOM"),xml.async="false",xml.loadXML(data))}catch(e){xml=undefined}return xml&&xml.documentElement&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;state!==2&&(state=2,timeoutTimer&&clearTimeout(timeoutTimer),transport=undefined,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&status<300||status===304,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),status===204||s.type==="HEAD"?statusText="nocontent":status===304?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,(status||!statusText)&&(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=undefined,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}typeof url=="object"&&(options=url,url=undefined);options=options||{};var parts,i,cacheURL,responseHeadersString,timeoutTimer,fireGlobals,transport,responseHeaders,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();return state||(name=requestHeadersNames[lname]=requestHeadersNames[lname]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return state||(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(state<2)for(code in map)statusCode[code]=[statusCode[code],map[code]];else jqXHR.always(map[jqXHR.status]);return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR).complete=completeDeferred.add,jqXHR.success=jqXHR.done,jqXHR.error=jqXHR.fail,s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""],s.crossDomain==null&&(parts=rurl.exec(s.url.toLowerCase()),s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))),s.data&&s.processData&&typeof s.data!="string"&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),state===2)return jqXHR;fireGlobals=jQuery.event&&s.global;fireGlobals&&jQuery.active++==0&&jQuery.event.trigger("ajaxStart");s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;s.hasContent||(s.data&&(cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++));s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]));(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType);jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||state===2))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]);if(transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR),transport){jqXHR.readyState=1;fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]);s.async&&s.timeout>0&&(timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2)done(-1,e);else throw e;}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=undefined),jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};jQuery.fn.extend({wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&wrap.insertBefore(this[0]);wrap.map(function(){for(var elem=this;elem.firstChild&&elem.firstChild.nodeType===1;)elem=elem.firstChild;return elem}).append(this)}return this},wrapInner:function(html){return jQuery.isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0||!support.reliableHiddenOffsets()&&(elem.style&&elem.style.display||jQuery.css(elem,"display"))==="none"};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined&&(traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional),jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=window.ActiveXObject!==undefined?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&createStandardXHR()||createActiveXHR()}:createStandardXHR;var xhrId=0,xhrCallbacks={},xhrSupported=jQuery.ajaxSettings.xhr();return window.attachEvent&&window.attachEvent("onunload",function(){for(var key in xhrCallbacks)xhrCallbacks[key](undefined,!0)}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,xhrSupported=support.ajax=!!xhrSupported,xhrSupported&&jQuery.ajaxTransport(function(options){if(!options.crossDomain||support.cors){var callback;return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType);options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)headers[i]!==undefined&&xhr.setRequestHeader(i,headers[i]+"");xhr.send(options.hasContent&&options.data||null);callback=function(_,isAbort){var status,statusText,responses;if(callback&&(isAbort||xhr.readyState===4))if(delete xhrCallbacks[id],callback=undefined,xhr.onreadystatechange=jQuery.noop,isAbort)xhr.readyState!==4&&xhr.abort();else{responses={};status=xhr.status;typeof xhr.responseText=="string"&&(responses.text=xhr.responseText);try{statusText=xhr.statusText}catch(e){statusText=""}status||!options.isLocal||options.crossDomain?status===1223&&(status=204):status=responses.text?200:404}responses&&complete(status,statusText,responses,xhr.getAllResponseHeaders())};options.async?xhr.readyState===4?setTimeout(callback):xhr.onreadystatechange=xhrCallbacks[id]=callback:callback()},abort:function(){callback&&callback(undefined,!0)}}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){s.cache===undefined&&(s.cache=!1);s.crossDomain&&(s.type="GET",s.global=!1)}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||jQuery("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script");script.async=!0;s.scriptCharset&&(script.charset=s.scriptCharset);script.src=s.url;script.onload=script.onreadystatechange=function(_,isAbort){(isAbort||!script.readyState||/loaded|complete/.test(script.readyState))&&(script.onload=script.onreadystatechange=null,script.parentNode&&script.parentNode.removeChild(script),script=null,isAbort||callback(200,"success"))};head.insertBefore(script,head.firstChild)},abort:function(){if(script)script.onload(undefined,!0)}}}}),oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/,jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==!1&&(rjsonp.test(s.url)?"url":typeof s.data=="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp")return callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):s.jsonp!==!1&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){window[callbackName]=overwritten;s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName));responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]);responseContainer=overwritten=undefined}),"script"}),jQuery.parseHTML=function(data,context,keepScripts){if(!data||typeof data!="string")return null;typeof context=="boolean"&&(keepScripts=context,context=!1);context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];return parsed?[context.createElement(parsed[1])]:(parsed=jQuery.buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes))},_load=jQuery.fn.load,jQuery.fn.load=function(url,params,callback){if(typeof url!="string"&&_load)return _load.apply(this,arguments);var selector,response,type,self=this,off=url.indexOf(" ");return off>=0&&(selector=jQuery.trim(url.slice(off,url.length)),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=undefined):params&&typeof params=="object"&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])}),this},jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}}),jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length},docElem=window.document.documentElement,jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};position==="static"&&(elem.style.position="relative");curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1;calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0);jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset));options.top!=null&&(props.top=options.top-curOffset.top+curTop);options.left!=null&&(props.left=options.left-curOffset.left+curLeft);"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({offset:function(options){if(arguments.length)return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(doc)return(docElem=doc.documentElement,!jQuery.contains(docElem,elem))?box:(typeof elem.getBoundingClientRect!==strundefined&&(box=elem.getBoundingClientRect()),win=getWindow(doc),{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)})},position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return jQuery.css(elem,"position")==="fixed"?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||docElem;offsetParent&&!jQuery.nodeName(offsetParent,"html")&&jQuery.css(offsetParent,"position")==="static";)offsetParent=offsetParent.offsetParent;return offsetParent||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined)return win?prop in win?win[prop]:win.document.documentElement[method]:elem[method];win?win.scrollTo(top?jQuery(win).scrollLeft():val,top?val:jQuery(win).scrollTop()):elem[method]=val},method,val,arguments.length,null)}}),jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed)return computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!="boolean"),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:elem.nodeType===9?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,typeof define=="function"&&define.amd&&define("jquery",[],function(){return jQuery}),_jQuery=window.jQuery,_$=window.$,jQuery.noConflict=function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},typeof noGlobal===strundefined&&(window.jQuery=window.$=jQuery),jQuery}),function(){var root=this,previousUnderscore=root._,breaker={},ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype,push=ArrayProto.push,slice=ArrayProto.slice,concat=ArrayProto.concat,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,_=function(obj){if(obj instanceof _)return obj;if(!(this instanceof _))return new _(obj);this._wrapped=obj},each,reduceError,any,lookupIterator,group,flatten,eq,entityMap,entityRegexes,idCounter,result;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=_),exports._=_):root._=_;_.VERSION="1.4.4";each=_.each=_.forEach=function(obj,iterator,context){var i,l,key;if(obj!=null)if(nativeForEach&&obj.forEach===nativeForEach)obj.forEach(iterator,context);else if(obj.length===+obj.length){for(i=0,l=obj.length;i<l;i++)if(iterator.call(context,obj[i],i,obj)===breaker)return}else for(key in obj)if(_.has(obj,key)&&iterator.call(context,obj[key],key,obj)===breaker)return};_.map=_.collect=function(obj,iterator,context){var results=[];return obj==null?results:nativeMap&&obj.map===nativeMap?obj.map(iterator,context):(each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list)}),results)};reduceError="Reduce of empty array with no initial value";_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=arguments.length>2;if(obj==null&&(obj=[]),nativeReduce&&obj.reduce===nativeReduce)return context&&(iterator=_.bind(iterator,context)),initial?obj.reduce(iterator,memo):obj.reduce(iterator);if(each(obj,function(value,index,list){initial?memo=iterator.call(context,memo,value,index,list):(memo=value,initial=!0)}),!initial)throw new TypeError(reduceError);return memo};_.reduceRight=_.foldr=function(obj,iterator,memo,context){var initial=arguments.length>2,length,keys;if(obj==null&&(obj=[]),nativeReduceRight&&obj.reduceRight===nativeReduceRight)return context&&(iterator=_.bind(iterator,context)),initial?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);if(length=obj.length,length!==+length&&(keys=_.keys(obj),length=keys.length),each(obj,function(value,index,list){index=keys?keys[--length]:--length;initial?memo=iterator.call(context,memo,obj[index],index,list):(memo=obj[index],initial=!0)}),!initial)throw new TypeError(reduceError);return memo};_.find=_.detect=function(obj,iterator,context){var result;return any(obj,function(value,index,list){if(iterator.call(context,value,index,list))return result=value,!0}),result};_.filter=_.select=function(obj,iterator,context){var results=[];return obj==null?results:nativeFilter&&obj.filter===nativeFilter?obj.filter(iterator,context):(each(obj,function(value,index,list){iterator.call(context,value,index,list)&&(results[results.length]=value)}),results)};_.reject=function(obj,iterator,context){return _.filter(obj,function(value,index,list){return!iterator.call(context,value,index,list)},context)};_.every=_.all=function(obj,iterator,context){iterator||(iterator=_.identity);var result=!0;return obj==null?result:nativeEvery&&obj.every===nativeEvery?obj.every(iterator,context):(each(obj,function(value,index,list){if(!(result=result&&iterator.call(context,value,index,list)))return breaker}),!!result)};any=_.some=_.any=function(obj,iterator,context){iterator||(iterator=_.identity);var result=!1;return obj==null?result:nativeSome&&obj.some===nativeSome?obj.some(iterator,context):(each(obj,function(value,index,list){if(result||(result=iterator.call(context,value,index,list)))return breaker}),!!result)};_.contains=_.include=function(obj,target){return obj==null?!1:nativeIndexOf&&obj.indexOf===nativeIndexOf?obj.indexOf(target)!=-1:any(obj,function(value){return value===target})};_.invoke=function(obj,method){var args=slice.call(arguments,2),isFunc=_.isFunction(method);return _.map(obj,function(value){return(isFunc?method:value[method]).apply(value,args)})};_.pluck=function(obj,key){return _.map(obj,function(value){return value[key]})};_.where=function(obj,attrs,first){return _.isEmpty(attrs)?first?null:[]:_[first?"find":"filter"](obj,function(value){for(var key in attrs)if(attrs[key]!==value[key])return!1;return!0})};_.findWhere=function(obj,attrs){return _.where(obj,attrs,!0)};_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0]&&obj.length<65535)return Math.max.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return-Infinity;var result={computed:-Infinity,value:-Infinity};return each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed})}),result.value};_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0]&&obj.length<65535)return Math.min.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return Infinity;var result={computed:Infinity,value:Infinity};return each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed<result.computed&&(result={value:value,computed:computed})}),result.value};_.shuffle=function(obj){var rand,index=0,shuffled=[];return each(obj,function(value){rand=_.random(index++);shuffled[index-1]=shuffled[rand];shuffled[rand]=value}),shuffled};lookupIterator=function(value){return _.isFunction(value)?value:function(obj){return obj[value]}};_.sortBy=function(obj,value,context){var iterator=lookupIterator(value);return _.pluck(_.map(obj,function(value,index,list){return{value:value,index:index,criteria:iterator.call(context,value,index,list)}}).sort(function(left,right){var a=left.criteria,b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)return-1}return left.index<right.index?-1:1}),"value")};group=function(obj,value,context,behavior){var result={},iterator=lookupIterator(value||_.identity);return each(obj,function(value,index){var key=iterator.call(context,value,index,obj);behavior(result,key,value)}),result};_.groupBy=function(obj,value,context){return group(obj,value,context,function(result,key,value){(_.has(result,key)?result[key]:result[key]=[]).push(value)})};_.countBy=function(obj,value,context){return group(obj,value,context,function(result,key){_.has(result,key)||(result[key]=0);result[key]++})};_.sortedIndex=function(array,obj,iterator,context){var mid;iterator=iterator==null?_.identity:lookupIterator(iterator);for(var value=iterator.call(context,obj),low=0,high=array.length;low<high;)mid=low+high>>>1,iterator.call(context,array[mid])<value?low=mid+1:high=mid;return low};_.toArray=function(obj){return obj?_.isArray(obj)?slice.call(obj):obj.length===+obj.length?_.map(obj,_.identity):_.values(obj):[]};_.size=function(obj){return obj==null?0:obj.length===+obj.length?obj.length:_.keys(obj).length};_.first=_.head=_.take=function(array,n,guard){if(array!=null)return n!=null&&!guard?slice.call(array,0,n):array[0]};_.initial=function(array,n,guard){return slice.call(array,0,array.length-(n==null||guard?1:n))};_.last=function(array,n,guard){if(array!=null)return n==null||guard?array[array.length-1]:slice.call(array,Math.max(array.length-n,0))};_.rest=_.tail=_.drop=function(array,n,guard){return slice.call(array,n==null||guard?1:n)};_.compact=function(array){return _.filter(array,_.identity)};flatten=function(input,shallow,output){return each(input,function(value){_.isArray(value)?shallow?push.apply(output,value):flatten(value,shallow,output):output.push(value)}),output};_.flatten=function(array,shallow){return flatten(array,shallow,[])};_.without=function(array){return _.difference(array,slice.call(arguments,1))};_.uniq=_.unique=function(array,isSorted,iterator,context){_.isFunction(isSorted)&&(context=iterator,iterator=isSorted,isSorted=!1);var initial=iterator?_.map(array,iterator,context):array,results=[],seen=[];return each(initial,function(value,index){(isSorted?index&&seen[seen.length-1]===value:_.contains(seen,value))||(seen.push(value),results.push(array[index]))}),results};_.union=function(){return _.uniq(concat.apply(ArrayProto,arguments))};_.intersection=function(array){var rest=slice.call(arguments,1);return _.filter(_.uniq(array),function(item){return _.every(rest,function(other){return _.indexOf(other,item)>=0})})};_.difference=function(array){var rest=concat.apply(ArrayProto,slice.call(arguments,1));return _.filter(array,function(value){return!_.contains(rest,value)})};_.zip=function(){for(var args=slice.call(arguments),length=_.max(_.pluck(args,"length")),results=new Array(length),i=0;i<length;i++)results[i]=_.pluck(args,""+i);return results};_.object=function(list,values){var result,i,l;if(list==null)return{};for(result={},i=0,l=list.length;i<l;i++)values?result[list[i]]=values[i]:result[list[i][0]]=list[i][1];return result};_.indexOf=function(array,item,isSorted){if(array==null)return-1;var i=0,l=array.length;if(isSorted)if(typeof isSorted=="number")i=isSorted<0?Math.max(0,l+isSorted):isSorted;else return i=_.sortedIndex(array,item),array[i]===item?i:-1;if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item,isSorted);for(;i<l;i++)if(array[i]===item)return i;return-1};_.lastIndexOf=function(array,item,from){var hasIndex,i;if(array==null)return-1;if(hasIndex=from!=null,nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return hasIndex?array.lastIndexOf(item,from):array.lastIndexOf(item);for(i=hasIndex?from:array.length;i--;)if(array[i]===item)return i;return-1};_.range=function(start,stop,step){arguments.length<=1&&(stop=start||0,start=0);step=arguments[2]||1;for(var len=Math.max(Math.ceil((stop-start)/step),0),idx=0,range=new Array(len);idx<len;)range[idx++]=start,start+=step;return range};_.bind=function(func,context){if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));var args=slice.call(arguments,2);return function(){return func.apply(context,args.concat(slice.call(arguments)))}};_.partial=function(func){var args=slice.call(arguments,1);return function(){return func.apply(this,args.concat(slice.call(arguments)))}};_.bindAll=function(obj){var funcs=slice.call(arguments,1);return funcs.length===0&&(funcs=_.functions(obj)),each(funcs,function(f){obj[f]=_.bind(obj[f],obj)}),obj};_.memoize=function(func,hasher){var memo={};return hasher||(hasher=_.identity),function(){var key=hasher.apply(this,arguments);return _.has(memo,key)?memo[key]:memo[key]=func.apply(this,arguments)}};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args)},wait)};_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)))};_.throttle=function(func,wait){var context,args,timeout,result,previous=0,later=function(){previous=new Date;timeout=null;result=func.apply(context,args)};return function(){var now=new Date,remaining=wait-(now-previous);return context=this,args=arguments,remaining<=0?(clearTimeout(timeout),timeout=null,previous=now,result=func.apply(context,args)):timeout||(timeout=setTimeout(later,remaining)),result}};_.debounce=function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later=function(){timeout=null;immediate||(result=func.apply(context,args))},callNow=immediate&&!timeout;return clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&(result=func.apply(context,args)),result}};_.once=function(func){var ran=!1,memo;return function(){return ran?memo:(ran=!0,memo=func.apply(this,arguments),func=null,memo)}};_.wrap=function(func,wrapper){return function(){var args=[func];return push.apply(args,arguments),wrapper.apply(this,args)}};_.compose=function(){var funcs=arguments;return function(){for(var args=arguments,i=funcs.length-1;i>=0;i--)args=[funcs[i].apply(this,args)];return args[0]}};_.after=function(times,func){return times<=0?func():function(){if(--times<1)return func.apply(this,arguments)}};_.keys=nativeKeys||function(obj){var keys,key;if(obj!==Object(obj))throw new TypeError("Invalid object");keys=[];for(key in obj)_.has(obj,key)&&(keys[keys.length]=key);return keys};_.values=function(obj){var values=[],key;for(key in obj)_.has(obj,key)&&values.push(obj[key]);return values};_.pairs=function(obj){var pairs=[],key;for(key in obj)_.has(obj,key)&&pairs.push([key,obj[key]]);return pairs};_.invert=function(obj){var result={},key;for(key in obj)_.has(obj,key)&&(result[obj[key]]=key);return result};_.functions=_.methods=function(obj){var names=[],key;for(key in obj)_.isFunction(obj[key])&&names.push(key);return names.sort()};_.extend=function(obj){return each(slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]=source[prop]}),obj};_.pick=function(obj){var copy={},keys=concat.apply(ArrayProto,slice.call(arguments,1));return each(keys,function(key){key in obj&&(copy[key]=obj[key])}),copy};_.omit=function(obj){var copy={},keys=concat.apply(ArrayProto,slice.call(arguments,1)),key;for(key in obj)_.contains(keys,key)||(copy[key]=obj[key]);return copy};_.defaults=function(obj){return each(slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]==null&&(obj[prop]=source[prop])}),obj};_.clone=function(obj){return _.isObject(obj)?_.isArray(obj)?obj.slice():_.extend({},obj):obj};_.tap=function(obj,interceptor){return interceptor(obj),obj};eq=function(a,b,aStack,bStack){var className,length,size,result,aCtor,bCtor,key;if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a instanceof _&&(a=a._wrapped),b instanceof _&&(b=b._wrapped),className=toString.call(a),className!=toString.call(b))return!1;switch(className){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if(typeof a!="object"||typeof b!="object")return!1;for(length=aStack.length;length--;)if(aStack[length]==a)return bStack[length]==b;if(aStack.push(a),bStack.push(b),size=0,result=!0,className=="[object Array]"){if(size=a.length,result=size==b.length,result)while(size--)if(!(result=eq(a[size],b[size],aStack,bStack)))break}else{if(aCtor=a.constructor,bCtor=b.constructor,aCtor!==bCtor&&!(_.isFunction(aCtor)&&aCtor instanceof aCtor&&_.isFunction(bCtor)&&bCtor instanceof bCtor))return!1;for(key in a)if(_.has(a,key)&&(size++,!(result=_.has(b,key)&&eq(a[key],b[key],aStack,bStack))))break;if(result){for(key in b)if(_.has(b,key)&&!size--)break;result=!size}}return aStack.pop(),bStack.pop(),result};_.isEqual=function(a,b){return eq(a,b,[],[])};_.isEmpty=function(obj){if(obj==null)return!0;if(_.isArray(obj)||_.isString(obj))return obj.length===0;for(var key in obj)if(_.has(obj,key))return!1;return!0};_.isElement=function(obj){return!!(obj&&obj.nodeType===1)};_.isArray=nativeIsArray||function(obj){return toString.call(obj)=="[object Array]"};_.isObject=function(obj){return obj===Object(obj)};each(["Arguments","Function","String","Number","Date","RegExp"],function(name){_["is"+name]=function(obj){return toString.call(obj)=="[object "+name+"]"}});_.isArguments(arguments)||(_.isArguments=function(obj){return!!(obj&&_.has(obj,"callee"))});typeof/./!="function"&&(_.isFunction=function(obj){return typeof obj=="function"});_.isFinite=function(obj){return isFinite(obj)&&!isNaN(parseFloat(obj))};_.isNaN=function(obj){return _.isNumber(obj)&&obj!=+obj};_.isBoolean=function(obj){return obj===!0||obj===!1||toString.call(obj)=="[object Boolean]"};_.isNull=function(obj){return obj===null};_.isUndefined=function(obj){return obj===void 0};_.has=function(obj,key){return hasOwnProperty.call(obj,key)};_.noConflict=function(){return root._=previousUnderscore,this};_.identity=function(value){return value};_.times=function(n,iterator,context){for(var accum=Array(n),i=0;i<n;i++)accum[i]=iterator.call(context,i);return accum};_.random=function(min,max){return max==null&&(max=min,min=0),min+Math.floor(Math.random()*(max-min+1))};entityMap={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};entityMap.unescape=_.invert(entityMap.escape);entityRegexes={escape:new RegExp("["+_.keys(entityMap.escape).join("")+"]","g"),unescape:new RegExp("("+_.keys(entityMap.unescape).join("|")+")","g")};_.each(["escape","unescape"],function(method){_[method]=function(string){return string==null?"":(""+string).replace(entityRegexes[method],function(match){return entityMap[method][match]})}});_.result=function(object,property){if(object==null)return null;var value=object[property];return _.isFunction(value)?value.call(object):value};_.mixin=function(obj){each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];return push.apply(args,arguments),result.call(this,func.apply(_,args))}})};idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+"";return prefix?prefix+id:id};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/,escapes={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},escaper=/\\|'|\r|\n|\t|\u2028|\u2029/g;_.template=function(text,data,settings){var render,template;settings=_.defaults({},settings,_.templateSettings);var matcher=new RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join("|")+"|$","g"),index=0,source="__p+='";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){return source+=text.slice(index,offset).replace(escaper,function(match){return"\\"+escapes[match]}),escape&&(source+="'+\n((__t=("+escape+"))==null?'':_.escape(__t))+\n'"),interpolate&&(source+="'+\n((__t=("+interpolate+"))==null?'':__t)+\n'"),evaluate&&(source+="';\n"+evaluate+"\n__p+='"),index=offset+match.length,match});source+="';\n";settings.variable||(source="with(obj||{}){\n"+source+"}\n");source="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+source+"return __p;\n";try{render=new Function(settings.variable||"obj","_",source)}catch(e){e.source=source;throw e;}return data?render(data,_):(template=function(data){return render.call(this,data,_)},template.source="function("+(settings.variable||"obj")+"){\n"+source+"}",template)};_.chain=function(obj){return _(obj).chain()};result=function(obj){return this._chain?_(obj).chain():obj};_.mixin(_);each(["pop","push","reverse","shift","sort","splice","unshift"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;return method.apply(obj,arguments),(name=="shift"||name=="splice")&&obj.length===0&&delete obj[0],result.call(this,obj)}});each(["concat","join","slice"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result.call(this,method.apply(this._wrapped,arguments))}});_.extend(_.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this);query=$.noConflict(!0); /*! handlebars v2.0.0 Copyright (C) 2011-2014 by Yehuda Katz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @license */ (function(root,factory){typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?module.exports=factory():root.Handlebars=root.Handlebars||factory()})(this,function(){var __module4__=function(){"use strict";function SafeString(string){this.string=string}return SafeString.prototype.toString=function(){return""+this.string},SafeString}(),__module3__=function(__dependency1__){"use strict";function escapeChar(chr){return escape[chr]}function extend(obj){for(var key,i=1;i<arguments.length;i++)for(key in arguments[i])Object.prototype.hasOwnProperty.call(arguments[i],key)&&(obj[key]=arguments[i][key]);return obj}function escapeExpression(string){return string instanceof SafeString?string.toString():string==null?"":string?(string=""+string,!possible.test(string))?string:string.replace(badChars,escapeChar):string+""}function isEmpty(value){return value||value===0?isArray(value)&&value.length===0?!0:!1:!0}function appendContextPath(contextPath,id){return(contextPath?contextPath+".":"")+id}var __exports__={},SafeString=__dependency1__,escape={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},badChars=/[&<>"'`]/g,possible=/[&<>"'`]/,toString,isFunction,isArray;return __exports__.extend=extend,toString=Object.prototype.toString,__exports__.toString=toString,isFunction=function(value){return typeof value=="function"},isFunction(/x/)&&(isFunction=function(value){return typeof value=="function"&&toString.call(value)==="[object Function]"}),__exports__.isFunction=isFunction,isArray=Array.isArray||function(value){return value&&typeof value=="object"?toString.call(value)==="[object Array]":!1},__exports__.isArray=isArray,__exports__.escapeExpression=escapeExpression,__exports__.isEmpty=isEmpty,__exports__.appendContextPath=appendContextPath,__exports__}(__module4__),__module5__=function(){"use strict";function Exception(message,node){var line,tmp,idx;for(node&&node.firstLine&&(line=node.firstLine,message+=" - "+line+":"+node.firstColumn),tmp=Error.prototype.constructor.call(this,message),idx=0;idx<errorProps.length;idx++)this[errorProps[idx]]=tmp[errorProps[idx]];line&&(this.lineNumber=line,this.column=node.firstColumn)}var errorProps=["description","fileName","lineNumber","message","name","number","stack"];return Exception.prototype=new Error,Exception}(),__module2__=function(__dependency1__,__dependency2__){"use strict";function HandlebarsEnvironment(helpers,partials){this.helpers=helpers||{};this.partials=partials||{};registerDefaultHelpers(this)}function registerDefaultHelpers(instance){instance.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;throw new Exception("Missing helper: '"+arguments[arguments.length-1].name+"'");});instance.registerHelper("blockHelperMissing",function(context,options){var inverse=options.inverse,fn=options.fn,data;return context===!0?fn(this):context===!1||context==null?inverse(this):isArray(context)?context.length>0?(options.ids&&(options.ids=[options.name]),instance.helpers.each(context,options)):inverse(this):(options.data&&options.ids&&(data=createFrame(options.data),data.contextPath=Utils.appendContextPath(options.data.contextPath,options.name),options={data:data}),fn(context,options))});instance.registerHelper("each",function(context,options){var j,key;if(!options)throw new Exception("Must pass iterator to #each");var fn=options.fn,inverse=options.inverse,i=0,ret="",data,contextPath;if(options.data&&options.ids&&(contextPath=Utils.appendContextPath(options.data.contextPath,options.ids[0])+"."),isFunction(context)&&(context=context.call(this)),options.data&&(data=createFrame(options.data)),context&&typeof context=="object")if(isArray(context))for(j=context.length;i<j;i++)data&&(data.index=i,data.first=i===0,data.last=i===context.length-1,contextPath&&(data.contextPath=contextPath+i)),ret=ret+fn(context[i],{data:data});else for(key in context)context.hasOwnProperty(key)&&(data&&(data.key=key,data.index=i,data.first=i===0,contextPath&&(data.contextPath=contextPath+key)),ret=ret+fn(context[key],{data:data}),i++);return i===0&&(ret=inverse(this)),ret});instance.registerHelper("if",function(conditional,options){return isFunction(conditional)&&(conditional=conditional.call(this)),(options.hash.includeZero||conditional)&&!Utils.isEmpty(conditional)?options.fn(this):options.inverse(this)});instance.registerHelper("unless",function(conditional,options){return instance.helpers["if"].call(this,conditional,{fn:options.inverse,inverse:options.fn,hash:options.hash})});instance.registerHelper("with",function(context,options){var fn,data;return isFunction(context)&&(context=context.call(this)),fn=options.fn,Utils.isEmpty(context)?options.inverse(this):(options.data&&options.ids&&(data=createFrame(options.data),data.contextPath=Utils.appendContextPath(options.data.contextPath,options.ids[0]),options={data:data}),fn(context,options))});instance.registerHelper("log",function(message,options){var level=options.data&&options.data.level!=null?parseInt(options.data.level,10):1;instance.log(level,message)});instance.registerHelper("lookup",function(obj,field){return obj&&obj[field]})}var __exports__={},Utils=__dependency1__,Exception=__dependency2__,COMPILER_REVISION,REVISION_CHANGES,logger,log,createFrame;__exports__.VERSION="2.0.0";COMPILER_REVISION=6;__exports__.COMPILER_REVISION=COMPILER_REVISION;REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};__exports__.REVISION_CHANGES=REVISION_CHANGES;var isArray=Utils.isArray,isFunction=Utils.isFunction,toString=Utils.toString,objectType="[object Object]";return __exports__.HandlebarsEnvironment=HandlebarsEnvironment,HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:logger,log:log,registerHelper:function(name,fn){if(toString.call(name)===objectType){if(fn)throw new Exception("Arg not supported with multiple helpers");Utils.extend(this.helpers,name)}else this.helpers[name]=fn},unregisterHelper:function(name){delete this.helpers[name]},registerPartial:function(name,partial){toString.call(name)===objectType?Utils.extend(this.partials,name):this.partials[name]=partial},unregisterPartial:function(name){delete this.partials[name]}},logger={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(level,message){if(logger.level<=level){var method=logger.methodMap[level];typeof console!="undefined"&&console[method]&&console[method].call(console,message)}}},__exports__.logger=logger,log=logger.log,__exports__.log=log,createFrame=function(object){var frame=Utils.extend({},object);return frame._parent=object,frame},__exports__.createFrame=createFrame,__exports__}(__module3__,__module5__),__module6__=function(__dependency1__,__dependency2__,__dependency3__){"use strict";function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]||1,currentRevision=COMPILER_REVISION,runtimeVersions,compilerVersions;if(compilerRevision!==currentRevision)if(compilerRevision<currentRevision){runtimeVersions=REVISION_CHANGES[currentRevision];compilerVersions=REVISION_CHANGES[compilerRevision];throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");}else throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+compilerInfo[1]+").");}function template(templateSpec,env){if(!env)throw new Exception("No environment passed to template");if(!templateSpec||!templateSpec.main)throw new Exception("Unknown template object: "+typeof templateSpec);env.VM.checkRevision(templateSpec.compiler);var invokePartialWrapper=function(partial,indent,name,context,hash,helpers,partials,data,depths){var result,options,lines,i,l;if(hash&&(context=Utils.extend({},context,hash)),result=env.VM.invokePartial.call(this,partial,name,context,helpers,partials,data,depths),result==null&&env.compile&&(options={helpers:helpers,partials:partials,data:data,depths:depths},partials[name]=env.compile(partial,{data:data!==undefined,compat:templateSpec.compat},env),result=partials[name](context,options)),result!=null){if(indent){for(lines=result.split("\n"),i=0,l=lines.length;i<l;i++){if(!lines[i]&&i+1===l)break;lines[i]=indent+lines[i]}result=lines.join("\n")}return result}throw new Exception("The partial "+name+" could not be compiled when running in runtime-only mode");},container={lookup:function(depths,name){for(var len=depths.length,i=0;i<len;i++)if(depths[i]&&depths[i][name]!=null)return depths[i][name]},lambda:function(current,context){return typeof current=="function"?current.call(context):current},escapeExpression:Utils.escapeExpression,invokePartial:invokePartialWrapper,fn:function(i){return templateSpec[i]},programs:[],program:function(i,data,depths){var programWrapper=this.programs[i],fn=this.fn(i);return data||depths?programWrapper=program(this,i,fn,data,depths):programWrapper||(programWrapper=this.programs[i]=program(this,i,fn)),programWrapper},data:function(data,depth){while(data&&depth--)data=data._parent;return data},merge:function(param,common){var ret=param||common;return param&&common&¶m!==common&&(ret=Utils.extend({},common,param)),ret},noop:env.VM.noop,compilerInfo:templateSpec.compiler},ret=function(context,options){var data,depths;return options=options||{},data=options.data,ret._setup(options),!options.partial&&templateSpec.useData&&(data=initData(context,data)),templateSpec.useDepths&&(depths=options.depths?[context].concat(options.depths):[context]),templateSpec.main.call(container,context,container.helpers,container.partials,data,depths)};return ret.isTop=!0,ret._setup=function(options){options.partial?(container.helpers=options.helpers,container.partials=options.partials):(container.helpers=container.merge(options.helpers,env.helpers),templateSpec.usePartial&&(container.partials=container.merge(options.partials,env.partials)))},ret._child=function(i,data,depths){if(templateSpec.useDepths&&!depths)throw new Exception("must pass parent depths");return program(container,i,templateSpec[i],data,depths)},ret}function program(container,i,fn,data,depths){var prog=function(context,options){return options=options||{},fn.call(container,context,container.helpers,container.partials,options.data||data,depths&&[context].concat(depths))};return prog.program=i,prog.depth=depths?depths.length:0,prog}function invokePartial(partial,name,context,helpers,partials,data,depths){var options={partial:!0,helpers:helpers,partials:partials,data:data,depths:depths};if(partial===undefined)throw new Exception("The partial "+name+" could not be found");else if(partial instanceof Function)return partial(context,options)}function noop(){return""}function initData(context,data){return data&&"root"in data||(data=data?createFrame(data):{},data.root=context),data}var __exports__={},Utils=__dependency1__,Exception=__dependency2__,COMPILER_REVISION=__dependency3__.COMPILER_REVISION,REVISION_CHANGES=__dependency3__.REVISION_CHANGES,createFrame=__dependency3__.createFrame;return __exports__.checkRevision=checkRevision,__exports__.template=template,__exports__.program=program,__exports__.invokePartial=invokePartial,__exports__.noop=noop,__exports__}(__module3__,__module5__,__module2__),__module1__=function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__){"use strict";var base=__dependency1__,SafeString=__dependency2__,Exception=__dependency3__,Utils=__dependency4__,runtime=__dependency5__,create=function(){var hb=new base.HandlebarsEnvironment;return Utils.extend(hb,base),hb.SafeString=SafeString,hb.Exception=Exception,hb.Utils=Utils,hb.escapeExpression=Utils.escapeExpression,hb.VM=runtime,hb.template=function(spec){return runtime.template(spec,hb)},hb},Handlebars=create();return Handlebars.create=create,Handlebars["default"]=Handlebars,Handlebars}(__module2__,__module4__,__module5__,__module3__,__module6__),__module7__=function(__dependency1__){"use strict";function LocationInfo(locInfo){locInfo=locInfo||{};this.firstLine=locInfo.first_line;this.firstColumn=locInfo.first_column;this.lastColumn=locInfo.last_column;this.lastLine=locInfo.last_line}var Exception=__dependency1__,AST={ProgramNode:function(statements,strip,locInfo){LocationInfo.call(this,locInfo);this.type="program";this.statements=statements;this.strip=strip},MustacheNode:function(rawParams,hash,open,strip,locInfo){if(LocationInfo.call(this,locInfo),this.type="mustache",this.strip=strip,open!=null&&open.charAt){var escapeFlag=open.charAt(3)||open.charAt(2);this.escaped=escapeFlag!=="{"&&escapeFlag!=="&"}else this.escaped=!!open;this.sexpr=rawParams instanceof AST.SexprNode?rawParams:new AST.SexprNode(rawParams,hash);this.id=this.sexpr.id;this.params=this.sexpr.params;this.hash=this.sexpr.hash;this.eligibleHelper=this.sexpr.eligibleHelper;this.isHelper=this.sexpr.isHelper},SexprNode:function(rawParams,hash,locInfo){LocationInfo.call(this,locInfo);this.type="sexpr";this.hash=hash;var id=this.id=rawParams[0],params=this.params=rawParams.slice(1);this.isHelper=!!(params.length||hash);this.eligibleHelper=this.isHelper||id.isSimple},PartialNode:function(partialName,context,hash,strip,locInfo){LocationInfo.call(this,locInfo);this.type="partial";this.partialName=partialName;this.context=context;this.hash=hash;this.strip=strip;this.strip.inlineStandalone=!0},BlockNode:function(mustache,program,inverse,strip,locInfo){LocationInfo.call(this,locInfo);this.type="block";this.mustache=mustache;this.program=program;this.inverse=inverse;this.strip=strip;inverse&&!program&&(this.isInverse=!0)},RawBlockNode:function(mustache,content,close,locInfo){if(LocationInfo.call(this,locInfo),mustache.sexpr.id.original!==close)throw new Exception(mustache.sexpr.id.original+" doesn't match "+close,this);content=new AST.ContentNode(content,locInfo);this.type="block";this.mustache=mustache;this.program=new AST.ProgramNode([content],{},locInfo)},ContentNode:function(string,locInfo){LocationInfo.call(this,locInfo);this.type="content";this.original=this.string=string},HashNode:function(pairs,locInfo){LocationInfo.call(this,locInfo);this.type="hash";this.pairs=pairs},IdNode:function(parts,locInfo){var i,l,part;LocationInfo.call(this,locInfo);this.type="ID";var original="",dig=[],depth=0,depthString="";for(i=0,l=parts.length;i<l;i++)if(part=parts[i].part,original+=(parts[i].separator||"")+part,part===".."||part==="."||part==="this")if(dig.length>0)throw new Exception("Invalid path: "+original,this);else part===".."?(depth++,depthString+="../"):this.isScoped=!0;else dig.push(part);this.original=original;this.parts=dig;this.string=dig.join(".");this.depth=depth;this.idName=depthString+this.string;this.isSimple=parts.length===1&&!this.isScoped&&depth===0;this.stringModeValue=this.string},PartialNameNode:function(name,locInfo){LocationInfo.call(this,locInfo);this.type="PARTIAL_NAME";this.name=name.original},DataNode:function(id,locInfo){LocationInfo.call(this,locInfo);this.type="DATA";this.id=id;this.stringModeValue=id.stringModeValue;this.idName="@"+id.stringModeValue},StringNode:function(string,locInfo){LocationInfo.call(this,locInfo);this.type="STRING";this.original=this.string=this.stringModeValue=string},NumberNode:function(number,locInfo){LocationInfo.call(this,locInfo);this.type="NUMBER";this.original=this.number=number;this.stringModeValue=Number(number)},BooleanNode:function(bool,locInfo){LocationInfo.call(this,locInfo);this.type="BOOLEAN";this.bool=bool;this.stringModeValue=bool==="true"},CommentNode:function(comment,locInfo){LocationInfo.call(this,locInfo);this.type="comment";this.comment=comment;this.strip={inlineStandalone:!0}}};return AST}(__module5__),__module9__=function(){"use strict";return function(){function Parser(){this.yy={}}var parser={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(yytext,yyleng,yylineno,yy,yystate,$$){var $0=$$.length-1;switch(yystate){case 1:return yy.prepareProgram($$[$0-1].statements,!0),$$[$0-1];case 2:this.$=new yy.ProgramNode(yy.prepareProgram($$[$0]),{},this._$);break;case 3:this.$=$$[$0];break;case 4:this.$=$$[$0];break;case 5:this.$=$$[$0];break;case 6:this.$=$$[$0];break;case 7:this.$=new yy.ContentNode($$[$0],this._$);break;case 8:this.$=new yy.CommentNode($$[$0],this._$);break;case 9:this.$=new yy.RawBlockNode($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 10:this.$=new yy.MustacheNode($$[$0-1],null,"","",this._$);break;case 11:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!1,this._$);break;case 12:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!0,this._$);break;case 13:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 14:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 15:this.$={strip:yy.stripFlags($$[$0-1],$$[$0-1]),program:$$[$0]};break;case 16:this.$={path:$$[$0-1],strip:yy.stripFlags($$[$0-2],$$[$0])};break;case 17:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 18:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 19:this.$=new yy.PartialNode($$[$0-3],$$[$0-2],$$[$0-1],yy.stripFlags($$[$0-4],$$[$0]),this._$);break;case 20:this.$=new yy.PartialNode($$[$0-2],undefined,$$[$0-1],yy.stripFlags($$[$0-3],$$[$0]),this._$);break;case 21:this.$=new yy.SexprNode([$$[$0-2]].concat($$[$0-1]),$$[$0],this._$);break;case 22:this.$=new yy.SexprNode([$$[$0]],null,this._$);break;case 23:this.$=$$[$0];break;case 24:this.$=new yy.StringNode($$[$0],this._$);break;case 25:this.$=new yy.NumberNode($$[$0],this._$);break;case 26:this.$=new yy.BooleanNode($$[$0],this._$);break;case 27:this.$=$$[$0];break;case 28:$$[$0-1].isHelper=!0;this.$=$$[$0-1];break;case 29:this.$=new yy.HashNode($$[$0],this._$);break;case 30:this.$=[$$[$0-2],$$[$0]];break;case 31:this.$=new yy.PartialNameNode($$[$0],this._$);break;case 32:this.$=new yy.PartialNameNode(new yy.StringNode($$[$0],this._$),this._$);break;case 33:this.$=new yy.PartialNameNode(new yy.NumberNode($$[$0],this._$));break;case 34:this.$=new yy.DataNode($$[$0],this._$);break;case 35:this.$=new yy.IdNode($$[$0],this._$);break;case 36:$$[$0-2].push({part:$$[$0],separator:$$[$0-1]});this.$=$$[$0-2];break;case 37:this.$=[{part:$$[$0]}];break;case 38:this.$=[];break;case 39:$$[$0-1].push($$[$0]);break;case 48:this.$=[];break;case 49:$$[$0-1].push($$[$0]);break;case 52:this.$=[$$[$0]];break;case 53:$$[$0-1].push($$[$0])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(str){throw new Error(str);},parse:function(input){function lex(){var token;return token=self.lexer.lex()||1,typeof token!="number"&&(token=self.symbols_[token]||token),token}var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,yyloc,ranges,symbol,preErrorSymbol,state,action,r,yyval,p,len,newState,expected,errStr;for(this.lexer.setInput(input),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={}),yyloc=this.lexer.yylloc,lstack.push(yyloc),ranges=this.lexer.options&&this.lexer.options.ranges,typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError),yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol=="undefined")&&(symbol=lex()),action=table[state]&&table[state][symbol]),(typeof action=="undefined"||!action.length||!action[0])&&(errStr="",!recovering)){expected=[];for(p in table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=this.lexer.showPosition?"Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==1?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'");this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);symbol=null;preErrorSymbol?(symbol=preErrorSymbol,preErrorSymbol=null):(yyleng=this.lexer.yyleng,yytext=this.lexer.yytext,yylineno=this.lexer.yylineno,yyloc=this.lexer.yylloc,recovering>0&&recovering--);break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack),typeof r!="undefined")return r;len&&(stack=stack.slice(0,-2*len),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len));stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return!0}}return!0}},lexer=function(){var lexer={EOF:1,parseError:function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str);},setInput:function(input){return this._input=input,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ch=this._input[0],lines;return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,lines=ch.match(/(?:\r\n?|\n).*/g),lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},unput:function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g),oldLines,r;return this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len-1),this.offset-=len,oldLines=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1),r=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this},more:function(){return this._more=!0,this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},next:function(){var token,match,tempMatch,index,lines,rules,i;if(this.done)return this.EOF;for(this._input||(this.done=!0),this._more||(this.yytext="",this.match=""),rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)&&(match=tempMatch,index=i,!this.options.flex))break;return match?(lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,rules[index],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)?token:void 0:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return typeof r!="undefined"?r:this.lex()},begin:function(condition){this.conditionStack.push(condition)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(condition){this.begin(condition)}};return lexer.options={},lexer.performAction=function(yy,yy_,$avoiding_name_collisions,YY_START){function strip(start,end){return yy_.yytext=yy_.yytext.substr(start,yy_.yyleng-end)}var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:if(yy_.yytext.slice(-2)==="\\\\"?(strip(0,1),this.begin("mu")):yy_.yytext.slice(-1)==="\\"?(strip(0,1),this.begin("emu")):this.begin("mu"),yy_.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return yy_.yytext=yy_.yytext.substr(5,yy_.yyleng-9),this.popState(),15;case 4:return 12;case 5:return strip(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState();this.begin("com");break;case 20:return strip(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return yy_.yytext=strip(1,2).replace(/\\"/g,'"'),42;case 30:return yy_.yytext=strip(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return yy_.yytext=strip(1,2),50;case 37:return"INVALID";case 38:return 5}},lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],lexer.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},lexer}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}()}(),__module10__=function(__dependency1__){"use strict";function stripFlags(open,close){return{left:open.charAt(2)==="~",right:close.charAt(close.length-3)==="~"}}function prepareBlock(mustache,program,inverseAndProgram,close,inverted,locInfo){var inverse,strip,inverseStrip;if(mustache.sexpr.id.original!==close.path.original)throw new Exception(mustache.sexpr.id.original+" doesn't match "+close.path.original,mustache);return inverse=inverseAndProgram&&inverseAndProgram.program,strip={left:mustache.strip.left,right:close.strip.right,openStandalone:isNextWhitespace(program.statements),closeStandalone:isPrevWhitespace((inverse||program).statements)},mustache.strip.right&&omitRight(program.statements,null,!0),inverse?(inverseStrip=inverseAndProgram.strip,inverseStrip.left&&omitLeft(program.statements,null,!0),inverseStrip.right&&omitRight(inverse.statements,null,!0),close.strip.left&&omitLeft(inverse.statements,null,!0),isPrevWhitespace(program.statements)&&isNextWhitespace(inverse.statements)&&(omitLeft(program.statements),omitRight(inverse.statements))):close.strip.left&&omitLeft(program.statements,null,!0),inverted?new this.BlockNode(mustache,inverse,program,strip,locInfo):new this.BlockNode(mustache,program,inverse,strip,locInfo)}function prepareProgram(statements,isRoot){for(var current,strip,i=0,l=statements.length;i<l;i++)if(current=statements[i],strip=current.strip,strip){var _isPrevWhitespace=isPrevWhitespace(statements,i,isRoot,current.type==="partial"),_isNextWhitespace=isNextWhitespace(statements,i,isRoot),openStandalone=strip.openStandalone&&_isPrevWhitespace,closeStandalone=strip.closeStandalone&&_isNextWhitespace,inlineStandalone=strip.inlineStandalone&&_isPrevWhitespace&&_isNextWhitespace;strip.right&&omitRight(statements,i,!0);strip.left&&omitLeft(statements,i,!0);inlineStandalone&&(omitRight(statements,i),omitLeft(statements,i)&¤t.type==="partial"&&(current.indent=/([ \t]+$)/.exec(statements[i-1].original)?RegExp.$1:""));openStandalone&&(omitRight((current.program||current.inverse).statements),omitLeft(statements,i));closeStandalone&&(omitRight(statements,i),omitLeft((current.inverse||current.program).statements))}return statements}function isPrevWhitespace(statements,i,isRoot){i===undefined&&(i=statements.length);var prev=statements[i-1],sibling=statements[i-2];return prev?prev.type==="content"?(sibling||!isRoot?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(prev.original):void 0:isRoot}function isNextWhitespace(statements,i,isRoot){i===undefined&&(i=-1);var next=statements[i+1],sibling=statements[i+2];return next?next.type==="content"?(sibling||!isRoot?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(next.original):void 0:isRoot}function omitRight(statements,i,multiple){var current=statements[i==null?0:i+1],original;current&¤t.type==="content"&&(multiple||!current.rightStripped)&&(original=current.string,current.string=current.string.replace(multiple?/^\s+/:/^[ \t]*\r?\n?/,""),current.rightStripped=current.string!==original)}function omitLeft(statements,i,multiple){var current=statements[i==null?statements.length-1:i-1],original;if(current&¤t.type==="content"&&(multiple||!current.leftStripped))return original=current.string,current.string=current.string.replace(multiple?/\s+$/:/[ \t]+$/,""),current.leftStripped=current.string!==original,current.leftStripped}var __exports__={},Exception=__dependency1__;return __exports__.stripFlags=stripFlags,__exports__.prepareBlock=prepareBlock,__exports__.prepareProgram=prepareProgram,__exports__}(__module5__),__module8__=function(__dependency1__,__dependency2__,__dependency3__,__dependency4__){"use strict";function parse(input){return input.constructor===AST.ProgramNode?input:(parser.yy=yy,parser.parse(input))}var __exports__={},parser=__dependency1__,AST=__dependency2__,Helpers=__dependency3__,extend=__dependency4__.extend,yy;return __exports__.parser=parser,yy={},extend(yy,Helpers,AST),__exports__.parse=parse,__exports__}(__module9__,__module7__,__module10__,__module3__),__module11__=function(__dependency1__,__dependency2__){"use strict";function Compiler(){}function precompile(input,options,env){if(input==null||typeof input!="string"&&input.constructor!==env.AST.ProgramNode)throw new Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+input);options=options||{};"data"in options||(options.data=!0);options.compat&&(options.useDepths=!0);var ast=env.parse(input),environment=(new env.Compiler).compile(ast,options);return(new env.JavaScriptCompiler).compile(environment,options)}function compile(input,options,env){function compileInput(){var ast=env.parse(input),environment=(new env.Compiler).compile(ast,options),templateSpec=(new env.JavaScriptCompiler).compile(environment,options,undefined,!0);return env.template(templateSpec)}var compiled,ret;if(input==null||typeof input!="string"&&input.constructor!==env.AST.ProgramNode)throw new Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+input);return options=options||{},"data"in options||(options.data=!0),options.compat&&(options.useDepths=!0),ret=function(context,options){return compiled||(compiled=compileInput()),compiled.call(this,context,options)},ret._setup=function(options){return compiled||(compiled=compileInput()),compiled._setup(options)},ret._child=function(i,data,depths){return compiled||(compiled=compileInput()),compiled._child(i,data,depths)},ret}function argEquals(a,b){if(a===b)return!0;if(isArray(a)&&isArray(b)&&a.length===b.length){for(var i=0;i<a.length;i++)if(!argEquals(a[i],b[i]))return!1;return!0}}var __exports__={},Exception=__dependency1__,isArray=__dependency2__.isArray,slice=[].slice;return __exports__.Compiler=Compiler,Compiler.prototype={compiler:Compiler,equals:function(other){var len=this.opcodes.length,i,opcode,otherOpcode;if(other.opcodes.length!==len)return!1;for(i=0;i<len;i++)if(opcode=this.opcodes[i],otherOpcode=other.opcodes[i],opcode.opcode!==otherOpcode.opcode||!argEquals(opcode.args,otherOpcode.args))return!1;for(len=this.children.length,i=0;i<len;i++)if(!this.children[i].equals(other.children[i]))return!1;return!0},guid:0,compile:function(program,options){var knownHelpers,name;if(this.opcodes=[],this.children=[],this.depths={list:[]},this.options=options,this.stringParams=options.stringParams,this.trackIds=options.trackIds,knownHelpers=this.options.knownHelpers,this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},knownHelpers)for(name in knownHelpers)this.options.knownHelpers[name]=knownHelpers[name];return this.accept(program)},accept:function(node){return this[node.type](node)},program:function(program){for(var statements=program.statements,i=0,l=statements.length;i<l;i++)this.accept(statements[i]);return this.isSimple=l===1,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(program){var result=(new this.compiler).compile(program,this.options),guid=this.guid++,depth,i,l;for(this.usePartial=this.usePartial||result.usePartial,this.children[guid]=result,i=0,l=result.depths.list.length;i<l;i++)if(depth=result.depths.list[i],depth<2)continue;else this.addDepth(depth-1);return guid},block:function(block){var mustache=block.mustache,program=block.program,inverse=block.inverse,sexpr,type;program&&(program=this.compileProgram(program));inverse&&(inverse=this.compileProgram(inverse));sexpr=mustache.sexpr;type=this.classifySexpr(sexpr);type==="helper"?this.helperSexpr(sexpr,program,inverse):type==="simple"?(this.simpleSexpr(sexpr),this.opcode("pushProgram",program),this.opcode("pushProgram",inverse),this.opcode("emptyHash"),this.opcode("blockValue",sexpr.id.original)):(this.ambiguousSexpr(sexpr,program,inverse),this.opcode("pushProgram",program),this.opcode("pushProgram",inverse),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},hash:function(hash){var pairs=hash.pairs,i,l;for(this.opcode("pushHash"),i=0,l=pairs.length;i<l;i++)this.pushParam(pairs[i][1]);while(i--)this.opcode("assignToHash",pairs[i][0]);this.opcode("popHash")},partial:function(partial){var partialName=partial.partialName;this.usePartial=!0;partial.hash?this.accept(partial.hash):this.opcode("push","undefined");partial.context?this.accept(partial.context):(this.opcode("getContext",0),this.opcode("pushContext"));this.opcode("invokePartial",partialName.name,partial.indent||"");this.opcode("append")},content:function(content){content.string&&this.opcode("appendContent",content.string)},mustache:function(mustache){this.sexpr(mustache.sexpr);mustache.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(sexpr,program,inverse){var id=sexpr.id,name=id.parts[0],isBlock=program!=null||inverse!=null;this.opcode("getContext",id.depth);this.opcode("pushProgram",program);this.opcode("pushProgram",inverse);this.ID(id);this.opcode("invokeAmbiguous",name,isBlock)},simpleSexpr:function(sexpr){var id=sexpr.id;id.type==="DATA"?this.DATA(id):id.parts.length?this.ID(id):(this.addDepth(id.depth),this.opcode("getContext",id.depth),this.opcode("pushContext"));this.opcode("resolvePossibleLambda")},helperSexpr:function(sexpr,program,inverse){var params=this.setupFullMustacheParams(sexpr,program,inverse),id=sexpr.id,name=id.parts[0];if(this.options.knownHelpers[name])this.opcode("invokeKnownHelper",params.length,name);else if(this.options.knownHelpersOnly)throw new Exception("You specified knownHelpersOnly, but used the unknown helper "+name,sexpr);else id.falsy=!0,this.ID(id),this.opcode("invokeHelper",params.length,id.original,id.isSimple)},sexpr:function(sexpr){var type=this.classifySexpr(sexpr);type==="simple"?this.simpleSexpr(sexpr):type==="helper"?this.helperSexpr(sexpr):this.ambiguousSexpr(sexpr)},ID:function(id){this.addDepth(id.depth);this.opcode("getContext",id.depth);var name=id.parts[0];name?this.opcode("lookupOnContext",id.parts,id.falsy,id.isScoped):this.opcode("pushContext")},DATA:function(data){this.options.data=!0;this.opcode("lookupData",data.id.depth,data.id.parts)},STRING:function(string){this.opcode("pushString",string.string)},NUMBER:function(number){this.opcode("pushLiteral",number.number)},BOOLEAN:function(bool){this.opcode("pushLiteral",bool.bool)},comment:function(){},opcode:function(name){this.opcodes.push({opcode:name,args:slice.call(arguments,1)})},addDepth:function(depth){depth!==0&&(this.depths[depth]||(this.depths[depth]=!0,this.depths.list.push(depth)))},classifySexpr:function(sexpr){var isHelper=sexpr.isHelper,isEligible=sexpr.eligibleHelper,options=this.options,name;return isEligible&&!isHelper&&(name=sexpr.id.parts[0],options.knownHelpers[name]?isHelper=!0:options.knownHelpersOnly&&(isEligible=!1)),isHelper?"helper":isEligible?"ambiguous":"simple"},pushParams:function(params){for(var i=0,l=params.length;i<l;i++)this.pushParam(params[i])},pushParam:function(val){this.stringParams?(val.depth&&this.addDepth(val.depth),this.opcode("getContext",val.depth||0),this.opcode("pushStringParam",val.stringModeValue,val.type),val.type==="sexpr"&&this.sexpr(val)):(this.trackIds&&this.opcode("pushId",val.type,val.idName||val.stringModeValue),this.accept(val))},setupFullMustacheParams:function(sexpr,program,inverse){var params=sexpr.params;return this.pushParams(params),this.opcode("pushProgram",program),this.opcode("pushProgram",inverse),sexpr.hash?this.hash(sexpr.hash):this.opcode("emptyHash"),params}},__exports__.precompile=precompile,__exports__.compile=compile,__exports__}(__module5__,__module3__),__module12__=function(__dependency1__,__dependency2__){"use strict";function Literal(value){this.value=value}function JavaScriptCompiler(){}var COMPILER_REVISION=__dependency1__.COMPILER_REVISION,REVISION_CHANGES=__dependency1__.REVISION_CHANGES,Exception=__dependency2__,reservedWords,compilerWords,i,l;for(JavaScriptCompiler.prototype={nameLookup:function(parent,name){return JavaScriptCompiler.isValidJavaScriptVariableName(name)?parent+"."+name:parent+"['"+name+"']"},depthedLookup:function(name){return this.aliases.lookup="this.lookup",'lookup(depths, "'+name+'")'},compilerInfo:function(){var revision=COMPILER_REVISION,versions=REVISION_CHANGES[revision];return[revision,versions]},appendToBuffer:function(string){return this.environment.isSimple?"return "+string+";":{appendToBuffer:!0,content:string,toString:function(){return"buffer += "+string+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(environment,options,context,asObject){var opcodes,opcode,i,l,fn,ret,programs;for(this.environment=environment,this.options=options,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!asObject,this.name=this.environment.name,this.isChild=!!context,this.context=context||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(environment,options),this.useDepths=this.useDepths||environment.depths.list.length||this.options.compat,opcodes=environment.opcodes,i=0,l=opcodes.length;i<l;i++)opcode=opcodes[i],this[opcode.opcode].apply(this,opcode.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Exception("Compile completed with content left on stack");if(fn=this.createFunctionContext(asObject),this.isChild)return fn;for(ret={compiler:this.compilerInfo(),main:fn},programs=this.context.programs,i=0,l=programs.length;i<l;i++)programs[i]&&(ret[i]=programs[i]);return this.environment.usePartial&&(ret.usePartial=!0),this.options.data&&(ret.useData=!0),this.useDepths&&(ret.useDepths=!0),this.options.compat&&(ret.compat=!0),asObject||(ret.compiler=JSON.stringify(ret.compiler),ret=this.objectLiteral(ret)),ret},preamble:function(){this.lastContext=0;this.source=[]},createFunctionContext:function(asObject){var varDeclarations="",locals=this.stackVars.concat(this.registers.list),alias,params,source;locals.length>0&&(varDeclarations+=", "+locals.join(", "));for(alias in this.aliases)this.aliases.hasOwnProperty(alias)&&(varDeclarations+=", "+alias+"="+this.aliases[alias]);return params=["depth0","helpers","partials","data"],this.useDepths&¶ms.push("depths"),source=this.mergeSource(varDeclarations),asObject?(params.push(source),Function.apply(this,params)):"function("+params.join(",")+") {\n "+source+"}"},mergeSource:function(varDeclarations){for(var source="",buffer,appendOnly=!this.forceBuffer,appendFirst,line,i=0,len=this.source.length;i<len;i++)line=this.source[i],line.appendToBuffer?buffer=buffer?buffer+"\n + "+line.content:line.content:(buffer&&(source?source+="buffer += "+buffer+";\n ":(appendFirst=!0,source=buffer+";\n "),buffer=undefined),source+=line+"\n ",this.environment.isSimple||(appendOnly=!1));return appendOnly?(buffer||!source)&&(source+="return "+(buffer||'""')+";\n"):(varDeclarations+=", buffer = "+(appendFirst?"":this.initializeBuffer()),source+=buffer?"return buffer + "+buffer+";\n":"return buffer;\n"),varDeclarations&&(source="var "+varDeclarations.substring(2)+(appendFirst?"":";\n ")+source),source},blockValue:function(name){var params,blockName;this.aliases.blockHelperMissing="helpers.blockHelperMissing";params=[this.contextName(0)];this.setupParams(name,0,params);blockName=this.popStack();params.splice(1,0,blockName);this.push("blockHelperMissing.call("+params.join(", ")+")")},ambiguousBlockValue:function(){var params,current;this.aliases.blockHelperMissing="helpers.blockHelperMissing";params=[this.contextName(0)];this.setupParams("",0,params,!0);this.flushInline();current=this.topStack();params.splice(1,0,current);this.pushSource("if (!"+this.lastHelper+") { "+current+" = blockHelperMissing.call("+params.join(", ")+"); }")},appendContent:function(content){this.pendingContent&&(content=this.pendingContent+content);this.pendingContent=content},append:function(){this.flushInline();var local=this.popStack();this.pushSource("if ("+local+" != null) { "+this.appendToBuffer(local)+" }");this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(depth){this.lastContext=depth},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(parts,falsy,scoped){var i=0,len=parts.length;for(scoped||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(parts[i++]));i<len;i++)this.replaceStack(function(current){var lookup=this.nameLookup(current,parts[i],"context");return falsy?" && "+lookup:" != null ? "+lookup+" : "+current})},lookupData:function(depth,parts){var len,i;for(depth?this.pushStackLiteral("this.data(data, "+depth+")"):this.pushStackLiteral("data"),len=parts.length,i=0;i<len;i++)this.replaceStack(function(current){return" && "+this.nameLookup(current,parts[i],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda";this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(string,type){this.pushContext();this.pushString(type);type!=="sexpr"&&(typeof string=="string"?this.pushString(string):this.pushStackLiteral(string))},emptyHash:function(){this.pushStackLiteral("{}");this.trackIds&&this.push("{}");this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash);this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var hash=this.hash;this.hash=this.hashes.pop();this.trackIds&&this.push("{"+hash.ids.join(",")+"}");this.stringParams&&(this.push("{"+hash.contexts.join(",")+"}"),this.push("{"+hash.types.join(",")+"}"));this.push("{\n "+hash.values.join(",\n ")+"\n }")},pushString:function(string){this.pushStackLiteral(this.quotedString(string))},push:function(expr){return this.inlineStack.push(expr),expr},pushLiteral:function(value){this.pushStackLiteral(value)},pushProgram:function(guid){guid!=null?this.pushStackLiteral(this.programExpression(guid)):this.pushStackLiteral(null)},invokeHelper:function(paramSize,name,isSimple){this.aliases.helperMissing="helpers.helperMissing";var nonHelper=this.popStack(),helper=this.setupHelper(paramSize,name),lookup=(isSimple?helper.name+" || ":"")+nonHelper+" || helperMissing";this.push("(("+lookup+").call("+helper.callParams+"))")},invokeKnownHelper:function(paramSize,name){var helper=this.setupHelper(paramSize,name);this.push(helper.name+".call("+helper.callParams+")")},invokeAmbiguous:function(name,helperCall){var nonHelper,helper,helperName;this.aliases.functionType='"function"';this.aliases.helperMissing="helpers.helperMissing";this.useRegister("helper");nonHelper=this.popStack();this.emptyHash();helper=this.setupHelper(0,name,helperCall);helperName=this.lastHelper=this.nameLookup("helpers",name,"helper");this.push("((helper = (helper = "+helperName+" || "+nonHelper+") != null ? helper : helperMissing"+(helper.paramsInit?"),("+helper.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+helper.callParams+") : helper))")},invokePartial:function(name,indent){var params=[this.nameLookup("partials",name,"partial"),"'"+indent+"'","'"+name+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?params.push("data"):this.options.compat&¶ms.push("undefined");this.options.compat&¶ms.push("depths");this.push("this.invokePartial("+params.join(", ")+")")},assignToHash:function(key){var value=this.popStack(),context,type,id,hash;this.trackIds&&(id=this.popStack());this.stringParams&&(type=this.popStack(),context=this.popStack());hash=this.hash;context&&hash.contexts.push("'"+key+"': "+context);type&&hash.types.push("'"+key+"': "+type);id&&hash.ids.push("'"+key+"': "+id);hash.values.push("'"+key+"': ("+value+")")},pushId:function(type,name){type==="ID"||type==="DATA"?this.pushString(name):type==="sexpr"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:JavaScriptCompiler,compileChildren:function(environment,options){for(var children=environment.children,child,compiler,index,i=0,l=children.length;i<l;i++)child=children[i],compiler=new this.compiler,index=this.matchExistingProgram(child),index==null?(this.context.programs.push(""),index=this.context.programs.length,child.index=index,child.name="program"+index,this.context.programs[index]=compiler.compile(child,options,this.context,!this.precompile),this.context.environments[index]=child,this.useDepths=this.useDepths||compiler.useDepths):(child.index=index,child.name="program"+index)},matchExistingProgram:function(child){for(var environment,i=0,len=this.context.environments.length;i<len;i++)if(environment=this.context.environments[i],environment&&environment.equals(child))return i},programExpression:function(guid){var child=this.environment.children[guid],depths=child.depths.list,useDepths=this.useDepths,programParams=[child.index,"data"];return useDepths&&programParams.push("depths"),"this.program("+programParams.join(", ")+")"},useRegister:function(name){this.registers[name]||(this.registers[name]=!0,this.registers.list.push(name))},pushStackLiteral:function(item){return this.push(new Literal(item))},pushSource:function(source){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=undefined);source&&this.source.push(source)},pushStack:function(item){this.flushInline();var stack=this.incrStack();return this.pushSource(stack+" = "+item+";"),this.compileStack.push(stack),stack},replaceStack:function(callback){var prefix="",inline=this.isInline(),stack,createdStack,usedLiteral,top,name,item;if(!this.isInline())throw new Exception("replaceStack on non-inline");top=this.popStack(!0);top instanceof Literal?(prefix=stack=top.value,usedLiteral=!0):(createdStack=!this.stackSlot,name=createdStack?this.incrStack():this.topStackName(),prefix="("+this.push(name)+" = "+top+")",stack=this.topStack());item=callback.call(this,stack);usedLiteral||this.popStack();createdStack&&this.stackSlot--;this.push("("+prefix+item+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var inlineStack=this.inlineStack,i,len,entry;if(inlineStack.length)for(this.inlineStack=[],i=0,len=inlineStack.length;i<len;i++)entry=inlineStack[i],entry instanceof Literal?this.compileStack.push(entry):this.pushStack(entry)},isInline:function(){return this.inlineStack.length},popStack:function(wrapped){var inline=this.isInline(),item=(inline?this.inlineStack:this.compileStack).pop();if(!wrapped&&item instanceof Literal)return item.value;if(!inline){if(!this.stackSlot)throw new Exception("Invalid stack pop");this.stackSlot--}return item},topStack:function(){var stack=this.isInline()?this.inlineStack:this.compileStack,item=stack[stack.length-1];return item instanceof Literal?item.value:item},contextName:function(context){return this.useDepths&&context?"depths["+context+"]":"depth"+context},quotedString:function(str){return'"'+str.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(obj){var pairs=[],key;for(key in obj)obj.hasOwnProperty(key)&&pairs.push(this.quotedString(key)+":"+obj[key]);return"{"+pairs.join(",")+"}"},setupHelper:function(paramSize,name,blockHelper){var params=[],paramsInit=this.setupParams(name,paramSize,params,blockHelper),foundHelper=this.nameLookup("helpers",name,"helper");return{params:params,paramsInit:paramsInit,name:foundHelper,callParams:[this.contextName(0)].concat(params).join(", ")}},setupOptions:function(helper,paramSize,params){var options={},contexts=[],types=[],ids=[],param,inverse,program,i;for(options.name=this.quotedString(helper),options.hash=this.popStack(),this.trackIds&&(options.hashIds=this.popStack()),this.stringParams&&(options.hashTypes=this.popStack(),options.hashContexts=this.popStack()),inverse=this.popStack(),program=this.popStack(),(program||inverse)&&(program||(program="this.noop"),inverse||(inverse="this.noop"),options.fn=program,options.inverse=inverse),i=paramSize;i--;)param=this.popStack(),params[i]=param,this.trackIds&&(ids[i]=this.popStack()),this.stringParams&&(types[i]=this.popStack(),contexts[i]=this.popStack());return this.trackIds&&(options.ids="["+ids.join(",")+"]"),this.stringParams&&(options.types="["+types.join(",")+"]",options.contexts="["+contexts.join(",")+"]"),this.options.data&&(options.data="data"),options},setupParams:function(helperName,paramSize,params,useRegister){var options=this.objectLiteral(this.setupOptions(helperName,paramSize,params));return useRegister?(this.useRegister("options"),params.push("options"),"options="+options):(params.push(options),"")}},reservedWords="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),compilerWords=JavaScriptCompiler.RESERVED_WORDS={},i=0,l=reservedWords.length;i<l;i++)compilerWords[reservedWords[i]]=!0;return JavaScriptCompiler.isValidJavaScriptVariableName=function(name){return!JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)},JavaScriptCompiler}(__module2__,__module5__);return function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__){"use strict";var Handlebars=__dependency1__,AST=__dependency2__,Parser=__dependency3__.parser,parse=__dependency3__.parse,Compiler=__dependency4__.Compiler,compile=__dependency4__.compile,precompile=__dependency4__.precompile,JavaScriptCompiler=__dependency5__,_create=Handlebars.create,create=function(){var hb=_create();return hb.compile=function(input,options){return compile(input,options,hb)},hb.precompile=function(input,options){return precompile(input,options,hb)},hb.AST=AST,hb.Compiler=Compiler,hb.JavaScriptCompiler=JavaScriptCompiler,hb.Parser=Parser,hb.parse=parse,hb};return Handlebars=create(),Handlebars.create=create,Handlebars["default"]=Handlebars,Handlebars}(__module1__,__module7__,__module8__,__module11__,__module12__)}); /*! * URI.js - Mutating URLs * * Version: 1.14.1 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * GPL v3 http://opensource.org/licenses/GPL-3.0 * */ (function(root,factory){"use strict";typeof exports=="object"?module.exports=factory(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],factory):root.URI=factory(root.punycode,root.IPv6,root.SecondLevelDomains,root)})(this,function(punycode,IPv6,SLD,root){"use strict";function URI(url,base){return(this instanceof URI)?(url===undefined&&(url=typeof location!="undefined"?location.href+"":""),this.href(url),base!==undefined)?this.absoluteTo(base):this:new URI(url,base)}function escapeRegEx(string){return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function getType(value){return value===undefined?"Undefined":String(Object.prototype.toString.call(value)).slice(8,-1)}function isArray(obj){return getType(obj)==="Array"}function filterArrayValues(data,value){var lookup={},i,length;if(isArray(value))for(i=0,length=value.length;i<length;i++)lookup[value[i]]=!0;else lookup[value]=!0;for(i=0,length=data.length;i<length;i++)lookup[data[i]]!==undefined&&(data.splice(i,1),length--,i--);return data}function arrayContains(list,value){var i,length,_type;if(isArray(value)){for(i=0,length=value.length;i<length;i++)if(!arrayContains(list,value[i]))return!1;return!0}for(_type=getType(value),i=0,length=list.length;i<length;i++)if(_type==="RegExp"){if(typeof list[i]=="string"&&list[i].match(value))return!0}else if(list[i]===value)return!0;return!1}function arraysEqual(one,two){if(!isArray(one)||!isArray(two)||one.length!==two.length)return!1;one.sort();two.sort();for(var i=0,l=one.length;i<l;i++)if(one[i]!==two[i])return!1;return!0}function escapeForDumbFirefox36(value){return escape(value)}function strictEncodeURIComponent(string){return encodeURIComponent(string).replace(/[!'()*]/g,escapeForDumbFirefox36).replace(/\*/g,"%2A")}function generateSimpleAccessor(_part){return function(v,build){return v===undefined?this._parts[_part]||"":(this._parts[_part]=v||null,this.build(!build),this)}}function generatePrefixAccessor(_part,_key){return function(v,build){return v===undefined?this._parts[_part]||"":(v!==null&&(v=v+"",v.charAt(0)===_key&&(v=v.substring(1))),this._parts[_part]=v,this.build(!build),this)}}var _URI=root&&root.URI,p,hasOwn,_parts,_part,generateAccessor,q;URI.version="1.14.1";p=URI.prototype;hasOwn=Object.prototype.hasOwnProperty;URI._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:URI.duplicateQueryParameters,escapeQuerySpace:URI.escapeQuerySpace}};URI.duplicateQueryParameters=!1;URI.escapeQuerySpace=!0;URI.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;URI.idn_expression=/[^a-z0-9\.-]/i;URI.punycode_expression=/(xn--)/i;URI.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;URI.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;URI.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;URI.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/};URI.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};URI.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/;URI.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};URI.getDomAttribute=function(node){if(!node||!node.nodeName)return undefined;var nodeName=node.nodeName.toLowerCase();return nodeName==="input"&&node.type!=="image"?undefined:URI.domAttributes[nodeName]};URI.encode=strictEncodeURIComponent;URI.decode=decodeURIComponent;URI.iso8859=function(){URI.encode=escape;URI.decode=unescape};URI.unicode=function(){URI.encode=strictEncodeURIComponent;URI.decode=decodeURIComponent};URI.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}};URI.encodeQuery=function(string,escapeQuerySpace){var escaped=URI.encode(string+"");return escapeQuerySpace===undefined&&(escapeQuerySpace=URI.escapeQuerySpace),escapeQuerySpace?escaped.replace(/%20/g,"+"):escaped};URI.decodeQuery=function(string,escapeQuerySpace){string+="";escapeQuerySpace===undefined&&(escapeQuerySpace=URI.escapeQuerySpace);try{return URI.decode(escapeQuerySpace?string.replace(/\+/g,"%20"):string)}catch(e){return string}};URI.recodePath=function(string){for(var segments=(string+"").split("/"),i=0,length=segments.length;i<length;i++)segments[i]=URI.encodePathSegment(URI.decode(segments[i]));return segments.join("/")};URI.decodePath=function(string){for(var segments=(string+"").split("/"),i=0,length=segments.length;i<length;i++)segments[i]=URI.decodePathSegment(segments[i]);return segments.join("/")};_parts={encode:"encode",decode:"decode"};generateAccessor=function(_group,_part){return function(string){try{return URI[_part](string+"").replace(URI.characters[_group][_part].expression,function(c){return URI.characters[_group][_part].map[c]})}catch(e){return string}}};for(_part in _parts)URI[_part+"PathSegment"]=generateAccessor("pathname",_parts[_part]);URI.encodeReserved=generateAccessor("reserved","encode");URI.parse=function(string,parts){var pos;return parts||(parts={}),pos=string.indexOf("#"),pos>-1&&(parts.fragment=string.substring(pos+1)||null,string=string.substring(0,pos)),pos=string.indexOf("?"),pos>-1&&(parts.query=string.substring(pos+1)||null,string=string.substring(0,pos)),string.substring(0,2)==="//"?(parts.protocol=null,string=string.substring(2),string=URI.parseAuthority(string,parts)):(pos=string.indexOf(":"),pos>-1&&(parts.protocol=string.substring(0,pos)||null,parts.protocol&&!parts.protocol.match(URI.protocol_expression)?parts.protocol=undefined:string.substring(pos+1,pos+3)==="//"?(string=string.substring(pos+3),string=URI.parseAuthority(string,parts)):(string=string.substring(pos+1),parts.urn=!0))),parts.path=string,parts};URI.parseHost=function(string,parts){var pos=string.indexOf("/"),bracketPos,t;return pos===-1&&(pos=string.length),string.charAt(0)==="["?(bracketPos=string.indexOf("]"),parts.hostname=string.substring(1,bracketPos)||null,parts.port=string.substring(bracketPos+2,pos)||null,parts.port==="/"&&(parts.port=null)):string.indexOf(":")!==string.lastIndexOf(":")?(parts.hostname=string.substring(0,pos)||null,parts.port=null):(t=string.substring(0,pos).split(":"),parts.hostname=t[0]||null,parts.port=t[1]||null),parts.hostname&&string.substring(pos).charAt(0)!=="/"&&(pos++,string="/"+string),string.substring(pos)||"/"};URI.parseAuthority=function(string,parts){return string=URI.parseUserinfo(string,parts),URI.parseHost(string,parts)};URI.parseUserinfo=function(string,parts){var firstSlash=string.indexOf("/"),pos=string.lastIndexOf("@",firstSlash>-1?firstSlash:string.length-1),t;return pos>-1&&(firstSlash===-1||pos<firstSlash)?(t=string.substring(0,pos).split(":"),parts.username=t[0]?URI.decode(t[0]):null,t.shift(),parts.password=t[0]?URI.decode(t.join(":")):null,string=string.substring(pos+1)):(parts.username=null,parts.password=null),string};URI.parseQuery=function(string,escapeQuerySpace){var i;if(!string)return{};if(string=string.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!string)return{};var items={},splits=string.split("&"),length=splits.length,v,name,value;for(i=0;i<length;i++)v=splits[i].split("="),name=URI.decodeQuery(v.shift(),escapeQuerySpace),value=v.length?URI.decodeQuery(v.join("="),escapeQuerySpace):null,hasOwn.call(items,name)?(typeof items[name]=="string"&&(items[name]=[items[name]]),items[name].push(value)):items[name]=value;return items};URI.build=function(parts){var t="";return parts.protocol&&(t+=parts.protocol+":"),!parts.urn&&(t||parts.hostname)&&(t+="//"),t+=URI.buildAuthority(parts)||"",typeof parts.path=="string"&&(parts.path.charAt(0)!=="/"&&typeof parts.hostname=="string"&&(t+="/"),t+=parts.path),typeof parts.query=="string"&&parts.query&&(t+="?"+parts.query),typeof parts.fragment=="string"&&parts.fragment&&(t+="#"+parts.fragment),t};URI.buildHost=function(parts){var t="";if(parts.hostname)t+=URI.ip6_expression.test(parts.hostname)?"["+parts.hostname+"]":parts.hostname;else return"";return parts.port&&(t+=":"+parts.port),t};URI.buildAuthority=function(parts){return URI.buildUserinfo(parts)+URI.buildHost(parts)};URI.buildUserinfo=function(parts){var t="";return parts.username&&(t+=URI.encode(parts.username),parts.password&&(t+=":"+URI.encode(parts.password)),t+="@"),t};URI.buildQuery=function(data,duplicateQueryParameters,escapeQuerySpace){var t="",unique,key,i,length;for(key in data)if(hasOwn.call(data,key)&&key)if(isArray(data[key]))for(unique={},i=0,length=data[key].length;i<length;i++)data[key][i]!==undefined&&unique[data[key][i]+""]===undefined&&(t+="&"+URI.buildQueryParameter(key,data[key][i],escapeQuerySpace),duplicateQueryParameters!==!0&&(unique[data[key][i]+""]=!0));else data[key]!==undefined&&(t+="&"+URI.buildQueryParameter(key,data[key],escapeQuerySpace));return t.substring(1)};URI.buildQueryParameter=function(name,value,escapeQuerySpace){return URI.encodeQuery(name,escapeQuerySpace)+(value!==null?"="+URI.encodeQuery(value,escapeQuerySpace):"")};URI.addQuery=function(data,name,value){if(typeof name=="object")for(var key in name)hasOwn.call(name,key)&&URI.addQuery(data,key,name[key]);else if(typeof name=="string"){if(data[name]===undefined){data[name]=value;return}typeof data[name]=="string"&&(data[name]=[data[name]]);isArray(value)||(value=[value]);data[name]=(data[name]||[]).concat(value)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};URI.removeQuery=function(data,name,value){var i,length,key;if(isArray(name))for(i=0,length=name.length;i<length;i++)data[name[i]]=undefined;else if(typeof name=="object")for(key in name)hasOwn.call(name,key)&&URI.removeQuery(data,key,name[key]);else if(typeof name=="string")value!==undefined?data[name]===value?data[name]=undefined:isArray(data[name])&&(data[name]=filterArrayValues(data[name],value)):data[name]=undefined;else throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");};URI.hasQuery=function(data,name,value,withinArray){var key,_booly,op;if(typeof name=="object"){for(key in name)if(hasOwn.call(name,key)&&!URI.hasQuery(data,key,name[key]))return!1;return!0}if(typeof name!="string")throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(getType(value)){case"Undefined":return name in data;case"Boolean":return _booly=Boolean(isArray(data[name])?data[name].length:data[name]),value===_booly;case"Function":return!!value(data[name],name,data);case"Array":return isArray(data[name])?(op=withinArray?arrayContains:arraysEqual,op(data[name],value)):!1;case"RegExp":return isArray(data[name])?withinArray?arrayContains(data[name],value):!1:Boolean(data[name]&&data[name].match(value));case"Number":value=String(value);case"String":return isArray(data[name])?withinArray?arrayContains(data[name],value):!1:data[name]===value;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};URI.commonPath=function(one,two){for(var length=Math.min(one.length,two.length),pos=0;pos<length;pos++)if(one.charAt(pos)!==two.charAt(pos)){pos--;break}return pos<1?one.charAt(0)===two.charAt(0)&&one.charAt(0)==="/"?"/":"":((one.charAt(pos)!=="/"||two.charAt(pos)!=="/")&&(pos=one.substring(0,pos).lastIndexOf("/")),one.substring(0,pos+1))};URI.withinString=function(string,callback,options){var match,start,attributeOpen,end,slice,result;options||(options={});var _start=options.start||URI.findUri.start,_end=options.end||URI.findUri.end,_trim=options.trim||URI.findUri.trim;for(_start.lastIndex=0;;){if(match=_start.exec(string),!match)break;(start=match.index,options.ignoreHtml&&(attributeOpen=string.slice(Math.max(start-3,0),start),attributeOpen&&/[a-z0-9-]=["']?$/i.test(attributeOpen)))||(end=start+string.slice(start).search(_end),slice=string.slice(start,end).replace(_trim,""),options.ignore&&options.ignore.test(slice))||(end=start+slice.length,result=callback(slice,start,end,string),string=string.slice(0,start)+result+string.slice(end),_start.lastIndex=start+result.length)}return _start.lastIndex=0,string};URI.ensureValidHostname=function(v){if(v.match(URI.invalid_hostname_characters)){if(!punycode)throw new TypeError('Hostname "'+v+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(punycode.toASCII(v).match(URI.invalid_hostname_characters))throw new TypeError('Hostname "'+v+'" contains characters other than [A-Z0-9.-]');}};URI.noConflict=function(removeAll){if(removeAll){var unconflicted={URI:this.noConflict()};return root.URITemplate&&typeof root.URITemplate.noConflict=="function"&&(unconflicted.URITemplate=root.URITemplate.noConflict()),root.IPv6&&typeof root.IPv6.noConflict=="function"&&(unconflicted.IPv6=root.IPv6.noConflict()),root.SecondLevelDomains&&typeof root.SecondLevelDomains.noConflict=="function"&&(unconflicted.SecondLevelDomains=root.SecondLevelDomains.noConflict()),unconflicted}return root.URI===this&&(root.URI=_URI),this};p.build=function(deferBuild){return deferBuild===!0?this._deferred_build=!0:(deferBuild===undefined||this._deferred_build)&&(this._string=URI.build(this._parts),this._deferred_build=!1),this};p.clone=function(){return new URI(this)};p.valueOf=p.toString=function(){return this.build(!1)._string};p.protocol=generateSimpleAccessor("protocol");p.username=generateSimpleAccessor("username");p.password=generateSimpleAccessor("password");p.hostname=generateSimpleAccessor("hostname");p.port=generateSimpleAccessor("port");p.query=generatePrefixAccessor("query","?");p.fragment=generatePrefixAccessor("fragment","#");p.search=function(v,build){var t=this.query(v,build);return typeof t=="string"&&t.length?"?"+t:t};p.hash=function(v,build){var t=this.fragment(v,build);return typeof t=="string"&&t.length?"#"+t:t};p.pathname=function(v,build){if(v===undefined||v===!0){var res=this._parts.path||(this._parts.hostname?"/":"");return v?URI.decodePath(res):res}return this._parts.path=v?URI.recodePath(v):"/",this.build(!build),this};p.path=p.pathname;p.href=function(href,build){var key,_URI,_object,attribute,src;if(href===undefined)return this.toString();if(this._string="",this._parts=URI._parts(),_URI=href instanceof URI,_object=typeof href=="object"&&(href.hostname||href.path||href.pathname),href.nodeName&&(attribute=URI.getDomAttribute(href),href=href[attribute]||"",_object=!1),!_URI&&_object&&href.pathname!==undefined&&(href=href.toString()),typeof href=="string"||href instanceof String)this._parts=URI.parse(String(href),this._parts);else if(_URI||_object){src=_URI?href._parts:href;for(key in src)hasOwn.call(this._parts,key)&&(this._parts[key]=src[key])}else throw new TypeError("invalid input");return this.build(!build),this};p.is=function(what){var ip=!1,ip4=!1,ip6=!1,name=!1,sld=!1,idn=!1,punycode=!1,relative=!this._parts.urn;this._parts.hostname&&(relative=!1,ip4=URI.ip4_expression.test(this._parts.hostname),ip6=URI.ip6_expression.test(this._parts.hostname),ip=ip4||ip6,name=!ip,sld=name&&SLD&&SLD.has(this._parts.hostname),idn=name&&URI.idn_expression.test(this._parts.hostname),punycode=name&&URI.punycode_expression.test(this._parts.hostname));switch(what.toLowerCase()){case"relative":return relative;case"absolute":return!relative;case"domain":case"name":return name;case"sld":return sld;case"ip":return ip;case"ip4":case"ipv4":case"inet4":return ip4;case"ip6":case"ipv6":case"inet6":return ip6;case"idn":return idn;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return punycode}return null};var _protocol=p.protocol,_port=p.port,_hostname=p.hostname;return p.protocol=function(v,build){if(v!==undefined&&v&&(v=v.replace(/:(\/\/)?$/,""),!v.match(URI.protocol_expression)))throw new TypeError('Protocol "'+v+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return _protocol.call(this,v,build)},p.scheme=p.protocol,p.port=function(v,build){if(this._parts.urn)return v===undefined?"":this;if(v!==undefined&&(v===0&&(v=null),v&&(v+="",v.charAt(0)===":"&&(v=v.substring(1)),v.match(/[^0-9]/))))throw new TypeError('Port "'+v+'" contains characters other than [0-9]');return _port.call(this,v,build)},p.hostname=function(v,build){if(this._parts.urn)return v===undefined?"":this;if(v!==undefined){var x={};URI.parseHost(v,x);v=x.hostname}return _hostname.call(this,v,build)},p.host=function(v,build){return this._parts.urn?v===undefined?"":this:v===undefined?this._parts.hostname?URI.buildHost(this._parts):"":(URI.parseHost(v,this._parts),this.build(!build),this)},p.authority=function(v,build){return this._parts.urn?v===undefined?"":this:v===undefined?this._parts.hostname?URI.buildAuthority(this._parts):"":(URI.parseAuthority(v,this._parts),this.build(!build),this)},p.userinfo=function(v,build){if(this._parts.urn)return v===undefined?"":this;if(v===undefined){if(!this._parts.username)return"";var t=URI.buildUserinfo(this._parts);return t.substring(0,t.length-1)}return v[v.length-1]!=="@"&&(v+="@"),URI.parseUserinfo(v,this._parts),this.build(!build),this},p.resource=function(v,build){var parts;return v===undefined?this.path()+this.search()+this.hash():(parts=URI.parse(v),this._parts.path=parts.path,this._parts.query=parts.query,this._parts.fragment=parts.fragment,this.build(!build),this)},p.subdomain=function(v,build){var end;if(this._parts.urn)return v===undefined?"":this;if(v===undefined)return!this._parts.hostname||this.is("IP")?"":(end=this._parts.hostname.length-this.domain().length-1,this._parts.hostname.substring(0,end)||"");var e=this._parts.hostname.length-this.domain().length,sub=this._parts.hostname.substring(0,e),replace=new RegExp("^"+escapeRegEx(sub));return v&&v.charAt(v.length-1)!=="."&&(v+="."),v&&URI.ensureValidHostname(v),this._parts.hostname=this._parts.hostname.replace(replace,v),this.build(!build),this},p.domain=function(v,build){var t,end,replace;if(this._parts.urn)return v===undefined?"":this;if(typeof v=="boolean"&&(build=v,v=undefined),v===undefined)return!this._parts.hostname||this.is("IP")?"":(t=this._parts.hostname.match(/\./g),t&&t.length<2)?this._parts.hostname:(end=this._parts.hostname.length-this.tld(build).length-1,end=this._parts.hostname.lastIndexOf(".",end-1)+1,this._parts.hostname.substring(end)||"");if(!v)throw new TypeError("cannot set domain empty");return URI.ensureValidHostname(v),!this._parts.hostname||this.is("IP")?this._parts.hostname=v:(replace=new RegExp(escapeRegEx(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(replace,v)),this.build(!build),this},p.tld=function(v,build){var pos,tld,replace;if(this._parts.urn)return v===undefined?"":this;if(typeof v=="boolean"&&(build=v,v=undefined),v===undefined)return!this._parts.hostname||this.is("IP")?"":(pos=this._parts.hostname.lastIndexOf("."),tld=this._parts.hostname.substring(pos+1),build!==!0&&SLD&&SLD.list[tld.toLowerCase()])?SLD.get(this._parts.hostname)||tld:tld;if(v)if(v.match(/[^a-zA-Z0-9-]/))if(SLD&&SLD.is(v))replace=new RegExp(escapeRegEx(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(replace,v);else throw new TypeError('TLD "'+v+'" contains characters other than [A-Z0-9]');else if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");else replace=new RegExp(escapeRegEx(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(replace,v);else throw new TypeError("cannot set TLD empty");return this.build(!build),this},p.directory=function(v,build){var end,res;if(this._parts.urn)return v===undefined?"":this;if(v===undefined||v===!0)return!this._parts.path&&!this._parts.hostname?"":this._parts.path==="/"?"/":(end=this._parts.path.length-this.filename().length-1,res=this._parts.path.substring(0,end)||(this._parts.hostname?"/":""),v?URI.decodePath(res):res);var e=this._parts.path.length-this.filename().length,directory=this._parts.path.substring(0,e),replace=new RegExp("^"+escapeRegEx(directory));return this.is("relative")||(v||(v="/"),v.charAt(0)!=="/"&&(v="/"+v)),v&&v.charAt(v.length-1)!=="/"&&(v+="/"),v=URI.recodePath(v),this._parts.path=this._parts.path.replace(replace,v),this.build(!build),this},p.filename=function(v,build){var pos,res,mutatedDirectory,replace;return this._parts.urn?v===undefined?"":this:v===undefined||v===!0?!this._parts.path||this._parts.path==="/"?"":(pos=this._parts.path.lastIndexOf("/"),res=this._parts.path.substring(pos+1),v?URI.decodePathSegment(res):res):(mutatedDirectory=!1,v.charAt(0)==="/"&&(v=v.substring(1)),v.match(/\.?\//)&&(mutatedDirectory=!0),replace=new RegExp(escapeRegEx(this.filename())+"$"),v=URI.recodePath(v),this._parts.path=this._parts.path.replace(replace,v),mutatedDirectory?this.normalizePath(build):this.build(!build),this)},p.suffix=function(v,build){var filename,pos,s,res,suffix,replace;if(this._parts.urn)return v===undefined?"":this;if(v===undefined||v===!0)return!this._parts.path||this._parts.path==="/"?"":(filename=this.filename(),pos=filename.lastIndexOf("."),pos===-1)?"":(s=filename.substring(pos+1),res=/^[a-z0-9%]+$/i.test(s)?s:"",v?URI.decodePathSegment(res):res);if(v.charAt(0)==="."&&(v=v.substring(1)),suffix=this.suffix(),suffix)replace=v?new RegExp(escapeRegEx(suffix)+"$"):new RegExp(escapeRegEx("."+suffix)+"$");else{if(!v)return this;this._parts.path+="."+URI.recodePath(v)}return replace&&(v=URI.recodePath(v),this._parts.path=this._parts.path.replace(replace,v)),this.build(!build),this},p.segment=function(segment,v,build){var separator=this._parts.urn?":":"/",path=this.path(),absolute=path.substring(0,1)==="/",segments=path.split(separator),i,l;if(segment!==undefined&&typeof segment!="number"&&(build=v,v=segment,segment=undefined),segment!==undefined&&typeof segment!="number")throw new Error('Bad segment "'+segment+'", must be 0-based integer');if(absolute&&segments.shift(),segment<0&&(segment=Math.max(segments.length+segment,0)),v===undefined)return segment===undefined?segments:segments[segment];if(segment===null||segments[segment]===undefined)if(isArray(v))for(segments=[],i=0,l=v.length;i<l;i++)(v[i].length||segments.length&&segments[segments.length-1].length)&&(segments.length&&!segments[segments.length-1].length&&segments.pop(),segments.push(v[i]));else(v||typeof v=="string")&&(segments[segments.length-1]===""?segments[segments.length-1]=v:segments.push(v));else v?segments[segment]=v:segments.splice(segment,1);return absolute&&segments.unshift(""),this.path(segments.join(separator),build)},p.segmentCoded=function(segment,v,build){var segments,i,l;if(typeof segment!="number"&&(build=v,v=segment,segment=undefined),v===undefined){if(segments=this.segment(segment,v,build),isArray(segments))for(i=0,l=segments.length;i<l;i++)segments[i]=URI.decode(segments[i]);else segments=segments!==undefined?URI.decode(segments):undefined;return segments}if(isArray(v))for(i=0,l=v.length;i<l;i++)v[i]=URI.decode(v[i]);else v=typeof v=="string"||v instanceof String?URI.encode(v):v;return this.segment(segment,v,build)},q=p.query,p.query=function(v,build){if(v===!0)return URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof v=="function"){var data=URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace),result=v.call(this,data);return this._parts.query=URI.buildQuery(result||data,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!build),this}return v!==undefined&&typeof v!="string"?(this._parts.query=URI.buildQuery(v,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!build),this):q.call(this,v,build)},p.setQuery=function(name,value,build){var data=URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace),key;if(typeof name=="string"||name instanceof String)data[name]=value!==undefined?value:null;else if(typeof name=="object")for(key in name)hasOwn.call(name,key)&&(data[key]=name[key]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=URI.buildQuery(data,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof name!="string"&&(build=value),this.build(!build),this},p.addQuery=function(name,value,build){var data=URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return URI.addQuery(data,name,value===undefined?null:value),this._parts.query=URI.buildQuery(data,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof name!="string"&&(build=value),this.build(!build),this},p.removeQuery=function(name,value,build){var data=URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return URI.removeQuery(data,name,value),this._parts.query=URI.buildQuery(data,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof name!="string"&&(build=value),this.build(!build),this},p.hasQuery=function(name,value,withinArray){var data=URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return URI.hasQuery(data,name,value,withinArray)},p.setSearch=p.setQuery,p.addSearch=p.addQuery,p.removeSearch=p.removeQuery,p.hasSearch=p.hasQuery,p.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},p.normalizeProtocol=function(build){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!build)),this},p.normalizeHostname=function(build){return this._parts.hostname&&(this.is("IDN")&&punycode?this._parts.hostname=punycode.toASCII(this._parts.hostname):this.is("IPv6")&&IPv6&&(this._parts.hostname=IPv6.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!build)),this},p.normalizePort=function(build){return typeof this._parts.protocol=="string"&&this._parts.port===URI.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!build)),this},p.normalizePath=function(build){if(this._parts.urn||!this._parts.path||this._parts.path==="/")return this;var _was_relative,_path=this._parts.path,_leadingParents="",_parent,_pos;for(_path.charAt(0)!=="/"&&(_was_relative=!0,_path="/"+_path),_path=_path.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),_was_relative&&(_leadingParents=_path.substring(1).match(/^(\.\.\/)+/)||"",_leadingParents&&(_leadingParents=_leadingParents[0]));;){if(_parent=_path.indexOf("/.."),_parent===-1)break;else if(_parent===0){_path=_path.substring(3);continue}_pos=_path.substring(0,_parent).lastIndexOf("/");_pos===-1&&(_pos=_parent);_path=_path.substring(0,_pos)+_path.substring(_parent+3)}return _was_relative&&this.is("relative")&&(_path=_leadingParents+_path.substring(1)),_path=URI.recodePath(_path),this._parts.path=_path,this.build(!build),this},p.normalizePathname=p.normalizePath,p.normalizeQuery=function(build){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(URI.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!build)),this},p.normalizeFragment=function(build){return this._parts.fragment||(this._parts.fragment=null,this.build(!build)),this},p.normalizeSearch=p.normalizeQuery,p.normalizeHash=p.normalizeFragment,p.iso8859=function(){var e=URI.encode,d=URI.decode;return URI.encode=escape,URI.decode=decodeURIComponent,this.normalize(),URI.encode=e,URI.decode=d,this},p.unicode=function(){var e=URI.encode,d=URI.decode;return URI.encode=strictEncodeURIComponent,URI.decode=unescape,this.normalize(),URI.encode=e,URI.decode=d,this},p.readable=function(){var uri=this.clone(),t,q,kv;if(uri.username("").password("").normalize(),t="",uri._parts.protocol&&(t+=uri._parts.protocol+"://"),uri._parts.hostname&&(uri.is("punycode")&&punycode?(t+=punycode.toUnicode(uri._parts.hostname),uri._parts.port&&(t+=":"+uri._parts.port)):t+=uri.host()),uri._parts.hostname&&uri._parts.path&&uri._parts.path.charAt(0)!=="/"&&(t+="/"),t+=uri.path(!0),uri._parts.query){q="";for(var i=0,qp=uri._parts.query.split("&"),l=qp.length;i<l;i++)kv=(qp[i]||"").split("="),q+="&"+URI.decodeQuery(kv[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),kv[1]!==undefined&&(q+="="+URI.decodeQuery(kv[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"));t+="?"+q.substring(1)}return t+URI.decodeQuery(uri.hash(),!0)},p.absoluteTo=function(base){var resolved=this.clone(),properties=["protocol","username","password","hostname","port"],basedir,i,p;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(base instanceof URI||(base=new URI(base)),resolved._parts.protocol||(resolved._parts.protocol=base._parts.protocol),this._parts.hostname)return resolved;for(i=0;p=properties[i];i++)resolved._parts[p]=base._parts[p];return resolved._parts.path?resolved._parts.path.substring(-2)===".."&&(resolved._parts.path+="/"):(resolved._parts.path=base._parts.path,resolved._parts.query||(resolved._parts.query=base._parts.query)),resolved.path().charAt(0)!=="/"&&(basedir=base.directory(),resolved._parts.path=(basedir?basedir+"/":"")+resolved._parts.path,resolved.normalizePath()),resolved.build(),resolved},p.relativeTo=function(base){var relative=this.clone().normalize(),relativeParts,baseParts,common,relativePath,basePath,parents;if(relative._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(base=new URI(base).normalize(),relativeParts=relative._parts,baseParts=base._parts,relativePath=relative.path(),basePath=base.path(),relativePath.charAt(0)!=="/")throw new Error("URI is already relative");if(basePath.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if((relativeParts.protocol===baseParts.protocol&&(relativeParts.protocol=null),relativeParts.username!==baseParts.username||relativeParts.password!==baseParts.password)||relativeParts.protocol!==null||relativeParts.username!==null||relativeParts.password!==null)return relative.build();if(relativeParts.hostname===baseParts.hostname&&relativeParts.port===baseParts.port)relativeParts.hostname=null,relativeParts.port=null;else return relative.build();return relativePath===basePath?(relativeParts.path="",relative.build()):(common=URI.commonPath(relative.path(),base.path()),!common)?relative.build():(parents=baseParts.path.substring(common.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../"),relativeParts.path=parents+relativeParts.path.substring(common.length),relative.build())},p.equals=function(uri){var one=this.clone(),two=new URI(uri),one_map={},two_map={},checked={},one_query,two_query,key;if(one.normalize(),two.normalize(),one.toString()===two.toString())return!0;if((one_query=one.query(),two_query=two.query(),one.query(""),two.query(""),one.toString()!==two.toString())||one_query.length!==two_query.length)return!1;one_map=URI.parseQuery(one_query,this._parts.escapeQuerySpace);two_map=URI.parseQuery(two_query,this._parts.escapeQuerySpace);for(key in one_map)if(hasOwn.call(one_map,key)){if(isArray(one_map[key])){if(!arraysEqual(one_map[key],two_map[key]))return!1}else if(one_map[key]!==two_map[key])return!1;checked[key]=!0}for(key in two_map)if(hasOwn.call(two_map,key)&&!checked[key])return!1;return!0},p.duplicateQueryParameters=function(v){return this._parts.duplicateQueryParameters=!!v,this},p.escapeQuerySpace=function(v){return this._parts.escapeQuerySpace=!!v,this},URI});var Vendd=function(Vendd){"use strict";return Vendd.Service=function(Service){return Service.call=function(options){var baseUrl,defOpts,opts,rewritedUrl,onErrorInternal;defOpts={async:!0,method:"POST",url:"#",data:{},rawdata:!1,onSuccess:function(response){console.log("response from "+opts.url+":"+response)},onFailure:function(err){throw err;},onUnauthenticated:function(){throw new Error("not implemented: onUnauthenticated(url)");}};opts=_.extend(defOpts,options);baseUrl=document.location.protocol.toLowerCase()+"//"+document.location.host.toLowerCase()+"/";rewritedUrl=baseUrl+"services/";document.location.protocol.toLowerCase()==="https:"&&(rewritedUrl+="secure/");rewritedUrl+=opts.url;this.query&&(rewritedUrl+=this.query);onErrorInternal=function(ex){if(ex&&ex.responseJSON&&ex.responseJSON.ExceptionType){var typeName=ex.responseJSON.ExceptionType.split(".").pop();if(typeName==="AuthenticationServiceException")if(typeof opts.onUnauthenticated=="function")opts.onUnauthenticated(ex.responseJSON.Message);else throw ex;else if(typeof opts.onFailure=="function")opts.onFailure(ex);else throw ex;}else if(typeof opts.onFailure=="function")opts.onFailure(ex);else throw ex;};query.ajax({async:opts.async||!0,type:opts.method,dataType:opts.rawdata?"text":"json",contentType:opts.rawdata?"":"application/json; charset=UTF-8",ContentType:opts.rawdata?"":"application/json; charset=UTF-8",url:rewritedUrl,data:opts.rawdata?opts.data:JSON.stringify(opts.data),success:function(response){if(typeof opts.onSuccess=="function")opts.onSuccess(response.d)},failure:function(ex){onErrorInternal(ex)},error:function(ex){onErrorInternal(ex)}})},Service}(Vendd.Service||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Handlebars=function(obj){var compiledPartials=Object.create({});return obj.register=function(partials){if(typeof partials=="undefined"||partials.length===0)throw new Error("Vendd.Handlebars.registerHandlebarsTemplate: no templates provided.");if(typeof Handlebars!="object")throw new Error("Vendd.Handlebars.registerHandlebarsTemplate: Handlebars is not available.");Array.isArray(partials)?_.each(partials,function(partial){partial.hasOwnProperty("Key")&&partial.hasOwnProperty("Value")&&Handlebars.partials.hasOwnProperty(partial.Key)===!1&&Handlebars.registerPartial(partial.Key,partial.Value)}):partials.hasOwnProperty("Key")&&partials.hasOwnProperty("Value")&&Handlebars.partials.hasOwnProperty(partials.Key)===!1&&Handlebars.registerPartial(partials.Key,partials.Value)},obj.isRegistered=function(partialName){return Handlebars.partials.hasOwnProperty(partialName)?!0:!1},obj.compile=function(partialName){var compiledPartial;if(typeof Handlebars!="object")throw new Error("Vendd.Handlebars.compileHandlebarsPartial: Handlebars is not available.");if(typeof Handlebars.partials[partialName]=="undefined")throw new Error("Vendd.Handlebars.compileHandlebarsPartial: Partial "+partialName+" is not registered.");return compiledPartials.hasOwnProperty(partialName)?compiledPartial=compiledPartials[partialName]:(compiledPartial=Handlebars.compile(Handlebars.partials[partialName]),compiledPartials[partialName]=compiledPartial),compiledPartial},obj.parse=function(partial,model){if(typeof Handlebars!="object")throw new Error("Vendd.Handlebars.parseHandlebarsPartial: Handlebars is not available.");if(typeof partial!="function")throw new Error("Vendd.Handlebars.parseHandlebarsPartial: Partial "+partial+" is not a valid compiled Handlebars partial.");if(typeof model!="object")throw new Error("Vendd.Handlebars.parseHandlebarsPartial: Model is not a valid.");return partial(model)},obj}(Vendd.Handlebars||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus=function(MessageBus){function checkMessage(message){if(!message.className)throw"Message must have a className";}function checkMessageFunction(func){if(typeof func!="function")throw"Func must be a function. Func :"+typeof func;}function locateObserver(observers,observer){for(var i=0;i<observers.length;i++)if(observers[i].Observer===observer)return i;return-1}function sendMessage(func,envelope){func(envelope)}function postMessage(func,envelope){_.defer(function(){func(envelope)},0)}function processMessages(){var localqueue=asyncMessageQueue.slice(),i,envelope,j;for(asyncMessageQueue=[],i=0;i<localqueue.length;i++){var message=localqueue[i].message,sender=localqueue[i].sender,observers=messages[message.className];if(Array.isArray(observers))for(envelope=new MessageBus.Envelope(sender,message,!0),j=0;j<observers.length;j++)postMessage(observers[j].Func,envelope)}}var messages={},asyncMessageQueue;return MessageBus.messages=messages,MessageBus.VenddMessage=function(className,data){this.className=className;this.data=data},MessageBus.Envelope=function(sender,message,isAsync){this.sender=sender;this.message=message;this.isAsync=isAsync},MessageBus.subscribe=function(messageType,observer,func){var observers,msg,pos;checkMessage(messageType);checkMessageFunction(func);observers=messages[messageType.className];Array.isArray(observers)||(observers=[],messages[messageType.className]=observers);msg={Observer:observer,Func:func};pos=locateObserver(observers,observer);pos!=-1?observers[pos]=msg:observers.push(msg)},MessageBus.unsubscribe=function(messageType,observer){var observers,pos;(checkMessage(messageType),observers=messages[messageType.className],Array.isArray(observers))&&(pos=locateObserver(observers,observer),pos!=-1&&observers.splice(pos,1))},MessageBus.unsubscribeAll=function(messageType){checkMessage(messageType);Array.isArray(messages[messageType.className])&&delete messages[messageType.className]},MessageBus.publish=function(sender,message){var observers,envelope,i;if(checkMessage(message),observers=messages[message.className],Array.isArray(observers))for(envelope=new MessageBus.Envelope(sender,message,!1),i=0;i<observers.length;i++)sendMessage(observers[i].Func,envelope)},asyncMessageQueue=[],MessageBus.publishAsync=function(sender,message){checkMessage(message);asyncMessageQueue.push({sender:sender,message:message});_.defer(function(){processMessages()},0)},MessageBus}(Vendd.MessageBus||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Plugins=function(Plugins){return Plugins.Messages=function(Messages){return Messages.RecaptcaLoaded=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Plugins.Messages.RecaptcaLoaded",null)},Messages.RecaptcaLoaded.className="Vendd.Plugins.Messages.RecaptcaLoaded",Messages.GoogleMapsLoaded=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Plugins.Messages.GoogleMapsLoaded",null)},Messages.GoogleMapsLoaded.className="Vendd.Plugins.Messages.GoogleMapsLoaded",Messages}(Plugins.Messages||{}),Plugins}(Vendd.Plugins||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Account=function(Account){return Account.Messages=function(Messages){return Messages.GetUserAccount=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetUserAccount",data)},Messages.GetUserAccount.className="Vendd.Account.Messages.GetUserAccount",Messages.GetUserAccountFailure=function(response){var data={response:response};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetUserAccountFailure",data)},Messages.GetUserAccountFailure.className="Vendd.Account.Messages.GetUserAccountFailure",Messages.GetUserAccountSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetUserAccountSuccess",data)},Messages.GetUserAccountSuccess.className="Vendd.Account.Messages.GetUserAccountSuccess",Messages.EditUser=function(observable,valEngine){var valOptions={ValidationEngine:valEngine,valmodel:observable.model},data;Vendd.DataValidation.ValidateModel(valOptions);data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditUser",data)},Messages.EditUser.className="Vendd.Account.Messages.EditUser",Messages.EditUserSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditUserSuccess",response)},Messages.EditUserSuccess.className="Vendd.Account.Messages.EditUserSuccess",Messages.EditUserFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditUserFailed",response)},Messages.EditUserFailed.className="Vendd.Account.Messages.EditUserFailed",Messages.GetAddresses=function(addressType){var data={addressType:addressType};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAddresses",data)},Messages.GetAddresses.className="Vendd.Account.Messages.GetAddresses",Messages.GetAddressesSuccess=function(model){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAddressesSuccess",model)},Messages.GetAddressesSuccess.className="Vendd.Account.Messages.GetAddressesSuccess",Messages.GetAddressesFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAddressesFailed",response)},Messages.GetAddressesFailed.className="Vendd.Account.Messages.GetAddressesFailed",Messages.EditAddress=function(observable,addressType){var data={model:observable.model,addressType:addressType};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditAddress",data,addressType)},Messages.EditAddress.className="Vendd.Account.Messages.EditAddress",Messages.EditAddressSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditAddressSuccess",data)},Messages.EditAddressSuccess.className="Vendd.Account.Messages.EditAddressSuccess",Messages.EditAddressFailed=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.EditAddressFailed",data)},Messages.EditAddressFailed.className="Vendd.Account.Messages.EditAddressFailed",Messages.DeleteAddress=function(addressId,addressType){var data={addressId:addressId,addressType:addressType};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.DeleteAddress",data)},Messages.DeleteAddress.className="Vendd.Account.Messages.DeleteAddress",Messages.DeleteAddressSuccess=function(adressId){var data={adressId:adressId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.DeleteAddressSuccess",adressId)},Messages.DeleteAddressSuccess.className="Vendd.Account.Messages.DeleteAddressSuccess",Messages.DeleteAddressFailure=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.DeleteAddressFailure",data)},Messages.DeleteAddressFailure.className="Vendd.Account.Messages.DeleteAddressFailure",Messages.SetDefaultAddress=function(addressId,addressType){var data={addressId:addressId,addressType:addressType};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.SetDefaultAddress",data)},Messages.SetDefaultAddress.className="Vendd.Account.Messages.SetDefaultAddress",Messages.SetDefaultAddressSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.SetDefaultAddressSuccess",data)},Messages.SetDefaultAddressSuccess.className="Vendd.Account.SetDefaultAddressSuccess",Messages.SetDefaultAddressFailure=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.SetDefaultAddressFailure",data)},Messages.SetDefaultAddressFailure.className="Vendd.Account.Messages.SetDefaultAddressFailure",Messages.CheckAddressIfExists=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.CheckAddressIfExists",data)},Messages.CheckAddressIfExists.className="Vendd.Account.Messages.CheckAddressIfExists",Messages.CheckAddressIfExistsSuccess=function(response){var data={response:response};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.CheckAddressIfExistsSuccess",response)},Messages.CheckAddressIfExistsSuccess.className="Vendd.Account.Messages.CheckAddressIfExistsSuccess",Messages.CheckAddressIfExistsFailure=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.CheckAddressIfExistsFailure",data)},Messages.CheckAddressIfExistsFailure.className="Vendd.Account.Messages.CheckAddressIfExistsFailure",Messages.OpenAddressEditForm=function(observable){var modelCopy=jQuery.extend(!0,{},observable.model),observableCopy=new Vendd.Observable(modelCopy);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.OpenAddressEditForm",observableCopy)},Messages.OpenAddressEditForm.className="Vendd.Account.Messages.OpenAddressEditForm",Messages.GetAreasForPostCode=function(observable,postCode,validateAfterLoad){var data={country:observable.model.Country,postCode:postCode,area:observable.model.Area,validateAfterLoad:validateAfterLoad};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAreasForPostCode",data)},Messages.GetAreasForPostCode.className="Vendd.Account.Messages.GetAreasForPostCode",Messages.GetAreasForPostCodeSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAreasForPostCodeSuccess",data)},Messages.GetAreasForPostCodeSuccess.className="Vendd.Account.Messages.GetAreasForPostCodeSuccess",Messages.GetAreasForPostCodeFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAreasForPostCodeFailed",response)},Messages.GetAreasForPostCodeFailed.className="Vendd.Account.Messages.GetAreasForPostCodeFailed",Messages.GetCountries=function(observable){var data={selectedCountryCode:observable.model.Country};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetCountries",data)},Messages.GetCountries.className="Vendd.Account.Messages.GetCountries",Messages.GetCountriesSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetCountriesSuccess",data)},Messages.GetCountriesSuccess.className="Vendd.Account.Messages.GetCountriesSuccess",Messages.GetCountriesFailed=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetCountriesFailed",response)},Messages.GetCountriesFailed.className="Vendd.Account.Messages.GetCountriesFailed",Messages.GetAllTaxAgencies=function(observable){var data={countryCode:observable.model.Country};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllTaxAgencies",data)},Messages.GetAllTaxAgencies.className="Vendd.Account.Messages.GetAllTaxAgencies",Messages.GetAllTaxAgenciesSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllTaxAgenciesSuccess",data)},Messages.GetAllTaxAgenciesSuccess.className="Vendd.Account.Messages.GetAllTaxAgenciesSuccess",Messages.GetAllTaxAgenciesFailed=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllTaxAgenciesFailed",response)},Messages.GetAllTaxAgenciesFailed.className="Vendd.Account.Messages.GetAllTaxAgenciesFailed",Messages.GetAllVatStatuses=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllVatStatuses",{})},Messages.GetAllVatStatuses.className="Vendd.Account.Messages.GetAllVatStatuses",Messages.GetAllVatStatusesSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllVatStatusesSuccess",data)},Messages.GetAllVatStatusesSuccess.className="Vendd.Account.Messages.GetAllVatStatusesSuccess",Messages.GetAllVatStatusesFailed=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.GetAllVatStatusesFailed",response)},Messages.GetAllVatStatusesFailed.className="Vendd.Account.Messages.GetAllVatStatusesFailed",Messages.AddressModelChanged=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.AddressModelChanged",response)},Messages.AddressModelChanged.className="Vendd.Account.Messages.AddressModelChanged",Messages.ConvertPointsToCoupons=function(accountId){var data={accountId:accountId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.ConvertPointsToCoupons",data)},Messages.ConvertPointsToCoupons.className="Vendd.Account.Messages.ConvertPointsToCoupons",Messages.ConvertPointsToCouponsFailure=function(response){var data={response:response};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.ConvertPointsToCouponsFailure",response)},Messages.ConvertPointsToCouponsFailure.className="Vendd.Account.Messages.ConvertPointsToCouponsFailure",Messages.ConvertPointsToCouponsSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Account.Messages.ConvertPointsToCouponsSuccess",data)},Messages.ConvertPointsToCouponsSuccess.className="Vendd.Account.Messages.ConvertPointsToCouponsSuccess",Messages}(Account.Messages||{}),Account}(Vendd.Account||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Article=function(Article){return Article.Messages=function(Messages){return Messages.ReviewSubmit=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewSubmit",data)},Messages.ReviewSubmit.className="Vendd.Article.Messages.ReviewSubmit",Messages.ReviewSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewSuccess",response)},Messages.ReviewSuccess.className="Vendd.Article.Messages.ReviewSuccess",Messages.ReviewFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewFailure",response)},Messages.ReviewFailure.className="Vendd.Article.Messages.ReviewFailure",Messages.ReviewVote=function(id,positive){var data={helpfullness:{Id:id,IsPositiveVote:positive}};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewVote",data)},Messages.ReviewVote.className="Vendd.Article.Messages.ReviewVote",Messages.ReviewVoteSuccess=function(response,vote){response.data=JSON.parse(response.data);var data={response:response,vote:vote};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewVoteSuccess",data)},Messages.ReviewVoteSuccess.className="Vendd.Article.Messages.ReviewVoteSuccess",Messages.ReviewVoteFailure=function(response,vote){response.data=JSON.parse(response.data);var data={response:response,vote:vote};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Article.Messages.ReviewVoteFailure",data)},Messages.ReviewVoteFailure.className="Vendd.Article.Messages.ReviewVoteFailure",Messages}(Article.Messages||{}),Article}(Vendd.Article||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.CallMeBack=function(CallMeBack){return CallMeBack.Messages=function(Messages){return Messages.Submit=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.CallMeBack.Messages.Submit",data)},Messages.Submit.className="Vendd.CallMeBack.Messages.Submit",Messages.SubmitSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.CallMeBack.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.CallMeBack.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.CallMeBack.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.CallMeBack.Messages.SubmitFailure",Messages}(CallMeBack.Messages||{}),CallMeBack}(Vendd.CallMeBack||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Career=function(Career){return Career.Messages=function(Messages){return Messages.Submit=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Career.Messages.Submit",data)},Messages.Submit.className="Vendd.Career.Messages.Submit",Messages.SubmitSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Career.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.Career.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Career.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.Career.Messages.SubmitFailure",Messages}(Career.Messages||{}),Career}(Vendd.Career||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Cart=function(Cart){return Cart.Messages=function(Messages){return Messages.Add=function(id,skuId,path,qty,extraAttributes,bundleItems,itemInfo){var quantity=qty,data;if(itemInfo){var minQuantity=itemInfo.minQuantity||0,maxQuantity=itemInfo.maxQuantity||0,quanta=itemInfo.quanta||0;quanta>0&&qty%quanta!=0&&(quantity=quanta)}data={id:id,skuId:skuId,path:path,qty:quantity,extraAttributes:extraAttributes,bundleItems:bundleItems,itemInfo:itemInfo};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.Add",data)},Messages.Add.className="Vendd.Cart.Messages.Add",Messages.MultipleAdd=function(data){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.MultipleAdd",data)},Messages.MultipleAdd.className="Vendd.Cart.Messages.MultipleAdd",Messages.MultipleAddSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.MultipleAddSuccess",data)},Messages.MultipleAddSuccess.className="Vendd.Cart.Messages.MultipleAddSuccess",Messages.Remove=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.Remove",data)},Messages.Remove.className="Vendd.Cart.Messages.Remove",Messages.SetQuantity=function(id,qty){var data={id:id,qty:qty};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.SetQuantity",data)},Messages.SetQuantity.className="Vendd.Cart.Messages.SetQuantity",Messages.SetQuantities=function(items){var data={};data.items=items;Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.SetQuantities",data)},Messages.SetQuantities.className="Vendd.Cart.Messages.SetQuantities",Messages.UpdateBundleItems=function(id,bundleItems){var data={id:id,bundleItems:bundleItems};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.UpdateBundleItems",data)},Messages.UpdateBundleItems.className="Vendd.Cart.Messages.UpdateBundleItems",Messages.Clear=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.Clear",{})},Messages.Clear.className="Vendd.Cart.Messages.Clear",Messages.ApplyCoupon=function(code){var data={code:code};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ApplyCoupon",data)},Messages.ApplyCoupon.className="Vendd.Cart.Messages.ApplyCoupon",Messages.ClearCoupon=function(code){var data={code:code};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ClearCoupon",data)},Messages.ClearCoupon.className="Vendd.Cart.Messages.ClearCoupon",Messages.ClearCoupons=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ClearCoupons")},Messages.ClearCoupons.className="Vendd.Cart.Messages.ClearCoupons",Messages.GetModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.GetModel")},Messages.GetModel.className="Vendd.Cart.Messages.GetModel",Messages.Changed=function(model){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.Changed",model)},Messages.Changed.className="Vendd.Cart.Messages.Changed",Messages.Failed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.Failed",response)},Messages.Failed.className="Vendd.Cart.Messages.Failed",Messages.GiftCardApplyFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.GiftCardApplyFailed",response)},Messages.GiftCardApplyFailed.className="Vendd.Cart.Messages.GiftCardApplyFailed",Messages.ApplyShippingData=function(countryCode,postCode,areaId,shippingMethodId,shippingCompanyId){var data={countryCode:countryCode,postCode:postCode,areaId:areaId,shippingMethodId:shippingMethodId,shippingCompanyId:shippingCompanyId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ApplyShippingData",data)},Messages.ApplyShippingData.className="Vendd.Cart.Messages.ApplyShippingData",Messages.ApplyShippingDataSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ApplyShippingDataSuccess",data)},Messages.ApplyShippingDataSuccess.className="Vendd.Cart.Messages.ApplyShippingDataSuccess",Messages.ApplyShippingDataFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ApplyShippingDataFailed",response)},Messages.ApplyShippingDataFailed.className="Vendd.Cart.Messages.ApplyShippingDataFailed",Messages.GetShippingModel=function(countryCode,postCode,areaId,shippingMethodId,shippingCompanyId){var data={countryCode:countryCode,postCode:postCode,areaId:areaId,shippingMethodId:shippingMethodId,shippingCompanyId:shippingCompanyId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.GetShippingModel",data)},Messages.GetShippingModel.className="Vendd.Cart.Messages.GetShippingModel",Messages.GetShippingModelSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.GetShippingModelSuccess",data)},Messages.GetShippingModelSuccess.className="Vendd.Cart.Messages.GetShippingModelSuccess",Messages.GetShippingModelFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.GetShippingModelFailed",response)},Messages.GetShippingModelFailed.className="Vendd.Cart.Messages.GetShippingModelFailed",Messages.SetGiftwrap=function(id,wrapId,message){var data={id:id,wrapId:wrapId,message:message};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.SetGiftwrap",data)},Messages.SetGiftwrap.className="Vendd.Cart.Messages.SetGiftwrap",Messages.SetGiftwraps=function(items){var data={};data.items=items;Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.SetGiftwraps",data)},Messages.SetGiftwraps.className="Vendd.Cart.Messages.SetGiftwraps",Messages.ApplyExtraAllowanceOrCharge=function(itemId,shopAllowanceorChargeId){var data={itemId:itemId,shopAllowanceorChargeId:shopAllowanceorChargeId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ApplyExtraAllowanceOrCharge",data)},Messages.ApplyExtraAllowanceOrCharge.className="Vendd.Cart.Messages.ApplyExtraAllowanceOrCharge",Messages.DisableExtraAllowanceOrCharge=function(itemId,shopAllowanceorChargeId){var data={itemId:itemId,shopAllowanceorChargeId:shopAllowanceorChargeId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.DisableExtraAllowanceOrCharge",data)},Messages.DisableExtraAllowanceOrCharge.className="Vendd.Cart.Messages.DisableExtraAllowanceOrCharge",Messages.AddOrderItemsToCart=function(data){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.AddOrderItemsToCart",data)},Messages.AddOrderItemsToCart.className="Vendd.Cart.Messages.AddOrderItemsToCart",Messages.SetGiftCard=function(code,amount){var data={code:code,amount:amount};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.SetGiftCard",data)},Messages.SetGiftCard.className="Vendd.Cart.Messages.SetGiftCard",Messages.AddGiftCartEmailAddress=function(observableList){var itemsList=[],data;$.each(observableList,function(k,observable){var valOptions={ValidationEngine:observable.valEngine,valmodel:observable.model};Vendd.DataValidation.ValidateModel(valOptions);itemsList.push(observable.model)});data={items:itemsList};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.AddGiftCartEmailAddress",data)},Messages.AddGiftCartEmailAddress.className="Vendd.Cart.Messages.AddGiftCartEmailAddress",Messages.ClearAllGiftCards=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ClearAllGiftCards",{})},Messages.ClearAllGiftCards.className="Vendd.Cart.Messages.ClearAllGiftCards",Messages.ClearGiftCard=function(code){var data={};data.code=code;Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ClearGiftCard",data)},Messages.ClearGiftCard.className="Vendd.Cart.Messages.ClearGiftCard",Messages.AddOrderItemsToCartSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.AddOrderItemsToCartSuccess",data)},Messages.AddOrderItemsToCartSuccess.className="Vendd.Cart.Messages.AddOrderItemsToCartSuccess",Messages.AddOrderItemsToCartFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.AddOrderItemsToCartFailed",response)},Messages.AddOrderItemsToCartFailed.className="Vendd.Cart.Messages.AddOrderItemsToCartFailed",Messages.ShowMessages=function(response){var messages=[],responseData,data;response.data&&(responseData=JSON.parse(response.data||{}),messages=responseData.Messages||[]);response.Messages&&(messages=response.Messages||[]);data={resultMessages:messages};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Cart.Messages.ShowMessages",data)},Messages.ShowMessages.className="Vendd.Cart.Messages.ShowMessages",Messages}(Cart.Messages||{}),Cart}(Vendd.Cart||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Contact=function(Contact){return Contact.Messages=function(Messages){return Messages.Submit=function(email,firstname,lastname,message,newsletter,address,phones,mobiles,fax,gender,customxml,reCaptchaCode,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,firstName:firstname,lastName:lastname,message:message,newsletter:newsletter,address:address,phones:phones,mobiles:mobiles,fax:fax,gender:gender,customxml:customxml,reCaptchaCode:reCaptchaCode,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Contact.Messages.Submit",data)},Messages.Submit.className="Vendd.Contact.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Contact.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.Contact.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Contact.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.Contact.Messages.SubmitFailure",Messages}(Contact.Messages||{}),Contact}(Vendd.Contact||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.DataValidation=function(DataValidation){return DataValidation.Messages=function(Messages){return Messages.ValidationError=function(errors){var data={errors:errors};Vendd.MessageBus.VenddMessage.call(this,"Vendd.DataValidation.Messages.ValidationError",data)},Messages.ValidationError.className="Vendd.DataValidation.Messages.ValidationError",Messages}(DataValidation.Messages||{}),DataValidation}(Vendd.DataValidation||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Newsletter=function(Newsletter){return Newsletter.Messages=function(Messages){return Messages.Subscribe=function(email,brand,mailparams,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,brand:brand,mailparams:mailparams||{},sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Newsletter.Messages.Subscribe",data)},Messages.Subscribe.className="Vendd.Newsletter.Messages.Subscribe",Messages.SubscribeSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Newsletter.Messages.SubscribeSuccess",response)},Messages.SubscribeSuccess.className="Vendd.Newsletter.Messages.SubscribeSuccess",Messages.SubscribeFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Newsletter.Messages.SubscribeFailure",response)},Messages.SubscribeFailure.className="Vendd.Newsletter.Messages.SubscribeFailure",Messages}(Newsletter.Messages||{}),Newsletter}(Vendd.Newsletter||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Order=function(Order){return Order.Messages=function(Messages){return Messages.CancelUncompletedOrder=function(orderId){var data={orderId:orderId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.CancelUncompletedOrder",data)},Messages.CancelUncompletedOrder.className="Vendd.Order.Messages.CancelUncompletedOrder",Messages.CancelUncompletedOrderSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.CancelUncompletedOrderSuccess",data)},Messages.CancelUncompletedOrderSuccess.className="Vendd.Order.Messages.CancelUncompletedOrderSuccess",Messages.CancelUncompletedOrderFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.CancelUncompletedOrderFailed",response)},Messages.CancelUncompletedOrderFailed.className="Vendd.Order.Messages.CancelUncompletedOrderFailed",Messages.ReturnOrderItem=function(orderItemId){var data={orderItemId:orderItemId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.ReturnOrderItem",data)},Messages.ReturnOrderItem.className="Vendd.Order.Messages.ReturnOrderItem",Messages.ReturnOrderItemSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.ReturnOrderItemSuccess",data)},Messages.ReturnOrderItemSuccess.className="Vendd.Order.Messages.ReturnOrderItemSuccess",Messages.ReturnOrderItemFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.ReturnOrderItemFailed",response)},Messages.ReturnOrderItemFailed.className="Vendd.Order.Messages.ReturnOrderItemFailed",Messages.SubmitRequestOrderChange=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.SubmitRequestOrderChange",data)},Messages.SubmitRequestOrderChange.className="Vendd.Order.Messages.SubmitRequestOrderChange",Messages.SubmitRequestOrderChangeSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.SubmitRequestOrderChangeSuccess",response)},Messages.SubmitRequestOrderChangeSuccess.className="Vendd.Order.Messages.SubmitRequestOrderChangeSuccess",Messages.SubmitRequestOrderChangeFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Order.Messages.SubmitRequestOrderChangeFailure",response)},Messages.SubmitRequestOrderChangeFailure.className="Vendd.Order.Messages.SubmitRequestOrderChangeFailure",Messages}(Order.Messages||{}),Order}(Vendd.Order||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Product=function(Product){return Product.Messages=function(Messages){return Messages.BindControl=function(context){var data={context:context};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.BindControl",data)},Messages.BindControl.className="Vendd.Product.Messages.BindControl",Messages.SetQuantity=function(qty){var data={qty:qty};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.SetQuantity",data)},Messages.SetQuantity.className="Vendd.Product.Messages.SetQuantity",Messages.SetSelected=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.SetSelected",data)},Messages.SetSelected.className="Vendd.Product.Messages.SetSelected",Messages.SetBundleItems=function(bundleItems){var data={bundleItems:bundleItems};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.SetBundleItems",data)},Messages.SetBundleItems.className="Vendd.Product.Messages.SetBundleItems",Messages.Changed=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.Changed",data)},Messages.Changed.className="Vendd.Product.Messages.Changed",Messages.Notify=function(email){var data={email:email};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.Notify",data)},Messages.Notify.className="Vendd.Product.Messages.Notify",Messages.NotifySuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.NotifySuccess",response)},Messages.NotifySuccess.className="Vendd.Product.Messages.NotifySuccess",Messages.NotifyFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.NotifyFailure",response)},Messages.NotifyFailure.className="Vendd.Product.Messages.NotifyFailure",Messages.Review=function(title,description,rating,id){var data={productid:id,title:title,description:description,rating:rating};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.Review",data)},Messages.Review.className="Vendd.Product.Messages.Review",Messages.ReviewSuccess=function(response,config){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.ReviewSuccess",response,config)},Messages.ReviewSuccess.className="Vendd.Product.Messages.ReviewSuccess",Messages.ReviewFailure=function(response,config){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.ReviewFailure",response,config)},Messages.ReviewFailure.className="Vendd.Product.Messages.ReviewFailure",Messages.ReviewVote=function(id,positive){var data={helpfullness:{id:id,ispositivevote:positive}};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.ReviewVote",data)},Messages.ReviewVote.className="Vendd.Product.Messages.ReviewVote",Messages.ReviewVoteSuccess=function(response,vote){response.data=JSON.parse(response.data);var data={response:response,vote:vote};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.ReviewVoteSuccess",data)},Messages.ReviewVoteSuccess.className="Vendd.Product.Messages.ReviewVoteSuccess",Messages.ReviewVoteFailure=function(response,vote){response.data=JSON.parse(response.data);var data={response:response,vote:vote};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Product.Messages.ReviewVoteFailure",data)},Messages.ReviewVoteFailure.className="Vendd.Product.Messages.ReviewVoteFailure",Messages}(Product.Messages||{}),Product}(Vendd.Product||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.ProductCompare=function(ProductCompare){return ProductCompare.Messages=function(Messages){return Messages.Add=function(id,skuId){var data={id:id,skuId:skuId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.Add",data)},Messages.Add.className="Vendd.ProductCompare.Messages.Add",Messages.Remove=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.Remove",data)},Messages.Remove.className="Vendd.ProductCompare.Messages.Remove",Messages.Clear=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.Clear",null)},Messages.Clear.className="Vendd.ProductCompare.Messages.Clear",Messages.Changed=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.Changed",null)},Messages.Changed.className="Vendd.ProductCompare.Messages.Changed",Messages.GetModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.GetModel",null)},Messages.GetModel.className="Vendd.ProductCompare.Messages.GetModel",Messages.GetModelSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.GetModelSuccess",data)},Messages.GetModelSuccess.className="Vendd.ProductCompare.Messages.GetModelSuccess",Messages.GetWidgetModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.GetWidgetModel")},Messages.GetWidgetModel.className="Vendd.ProductCompare.Messages.GetWidgetModel",Messages.GetWidgetModelSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.GetWidgetModelSuccess",data)},Messages.GetWidgetModelSuccess.className="Vendd.ProductCompare.Messages.GetWidgetModelSuccess",Messages.Failed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.ProductCompare.Messages.Failed",response)},Messages.Failed.className="Vendd.ProductCompare.Messages.Failed",Messages}(ProductCompare.Messages||{}),ProductCompare}(Vendd.ProductCompare||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.ScrollList=function(ScrollList){return ScrollList.Messages=function(Messages){return Messages.GetNextPage=function(list,serviceConfiguration){var data={list:list,serviceConfiguration:serviceConfiguration};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetNextPage",data)},Messages.GetNextPage.className="Vendd.ScrollList.Messages.GetNextPage",Messages.GetNextPageSuccess=function(list,model){var data={list:list,model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetNextPageSuccess",data)},Messages.GetNextPageSuccess.className="Vendd.ScrollList.Messages.GetNextPageSuccess",Messages.GetNextPageFailure=function(list,response){response.data=JSON.parse(response.data);var data={list:list,response:response};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetNextPageFailure",data)},Messages.GetNextPageFailure.className="Vendd.ScrollList.Messages.GetNextPageFailure",Messages.GetClientProductListData=function(request){var data={itemIds:request.itemIds,fetchPrices:request.fetchPrices,fetchAvailabilities:request.fetchAvailabilities,fetchStock:request.fetchStock};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetClientProductListData",data)},Messages.GetClientProductListData.className="Vendd.ScrollList.Messages.GetClientProductListData",Messages.GetClientProductListDataSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetClientProductListDataSuccess",response)},Messages.GetClientProductListDataSuccess.className="Vendd.ScrollList.Messages.GetClientProductListDataSuccess",Messages.GetClientProductListDataFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetClientProductListDataFailure",response)},Messages.GetClientProductListDataFailure.className="Vendd.ScrollList.Messages.GetClientProductListDataFailure",Messages}(ScrollList.Messages||{}),ScrollList}(Vendd.ScrollList||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Search=function(Search){return Search.Messages=function(Messages){return Messages.GetSuggestiveResults=function(searchTerm,category){var data={searchTerm:searchTerm,category:category};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetSuggestiveResults",data)},Messages.GetSuggestiveResults.className="Vendd.Search.Messages.GetSuggestiveResults",Messages.GetSuggestiveResultsSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetSuggestiveResultsSuccess",data)},Messages.GetSuggestiveResultsSuccess.className="Vendd.Search.Messages.GetSuggestiveResultsSuccess",Messages.GetSuggestiveResultsFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetSuggestiveResultsFailed",response)},Messages.GetSuggestiveResultsFailed.className="Vendd.Search.Messages.GetSuggestiveResultsFailed",Messages.GetProductSuggestiveResults=function(searchTerm,maxResults){var data={searchTerm:searchTerm,maxResults:maxResults};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetProductSuggestiveResults",data)},Messages.GetProductSuggestiveResults.className="Vendd.Search.Messages.GetProductSuggestiveResults",Messages.GetProductSuggestiveResultsSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetProductSuggestiveResultsSuccess",data)},Messages.GetProductSuggestiveResultsSuccess.className="Vendd.Search.Messages.GetProductSuggestiveResultsSuccess",Messages.GetProductSuggestiveResultsFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Search.Messages.GetProductSuggestiveResultsFailed",response)},Messages.GetProductSuggestiveResultsFailed.className="Vendd.Search.Messages.GetProductSuggestiveResultsFailed",Messages}(Search.Messages||{}),Search}(Vendd.Search||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Store=function(Store){return Store.Messages=function(Messages){return Messages.BindControl=function(context){var data={context:context};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Store.Messages.BindControl",data)},Messages.BindControl.className="Vendd.Store.Messages.BindControl",Messages.SetState=function(state){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Store.Messages.SetState",state)},Messages.SetState.className="Vendd.Store.Messages.SetState",Messages.Refine=function(data){var data={state:data};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Store.Messages.Refine",data)},Messages.Refine.className="Vendd.Store.Messages.Refine",Messages.UpdateForm=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Store.Messages.UpdateForm",data)},Messages.UpdateForm.className="Vendd.Store.Messages.UpdateForm",Messages.UpdateStores=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Store.Messages.UpdateStores",data)},Messages.UpdateStores.className="Vendd.Store.Messages.UpdateStores",Messages}(Store.Messages||{}),Store}(Vendd.Store||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.User=function(User){return User.Messages=function(Messages){return Messages.Login=function(loginName,password,rememberMe,loginRedirectUrl,logoutRedirectUrl,reCaptchaCode){var data={loginName:loginName,password:password,rememberMe:rememberMe,loginRedirectUrl:loginRedirectUrl,logoutRedirectUrl:logoutRedirectUrl,reCaptchaCode:reCaptchaCode};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.Login",data)},Messages.Login.className="Vendd.User.Messages.Login",Messages.LoginSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LoginSuccess",response)},Messages.LoginSuccess.className="Vendd.User.Messages.LoginSuccess",Messages.LoginFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LoginFailure",response)},Messages.LoginFailure.className="Vendd.User.Messages.LoginFailure",Messages.Logout=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.Logout",{})},Messages.Logout.className="Vendd.User.Messages.Logout",Messages.LogoutAuthProviders=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LogoutAuthProviders",{})},Messages.LogoutAuthProviders.className="Vendd.User.Messages.LogoutAuthProviders",Messages.LogoutUser=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LogoutUser",{})},Messages.LogoutUser.className="Vendd.User.Messages.LogoutUser",Messages.LogoutSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LogoutSuccess",response)},Messages.LogoutSuccess.className="Vendd.User.Messages.LogoutSuccess",Messages.LogoutFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LogoutFailure",response)},Messages.LogoutFailure.className="Vendd.User.Messages.LogoutFailure",Messages.ForgotPassword=function(email){var data={email:email};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ForgotPassword",data)},Messages.ForgotPassword.className="Vendd.User.Messages.ForgotPassword",Messages.ForgotPasswordSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ForgotPasswordSuccess",response)},Messages.ForgotPasswordSuccess.className="Vendd.User.Messages.ForgotPasswordSuccess",Messages.ForgotPasswordFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ForgotPasswordFailure",response)},Messages.ForgotPasswordFailure.className="Vendd.User.Messages.ForgotPasswordFailure",Messages.ResetPassword=function(code,password,passwordConfirmation){var data={code:code,password:password,passwordConfirmation:passwordConfirmation};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ResetPassword",data)},Messages.ResetPassword.className="Vendd.User.Messages.ResetPassword",Messages.ResetPasswordSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ResetPasswordSuccess",response)},Messages.ResetPasswordSuccess.className="Vendd.User.Messages.ResetPasswordSuccess",Messages.ResetPasswordFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.ResetPasswordFailure",response)},Messages.ResetPasswordFailure.className="Vendd.User.Messages.ResetPasswordFailure",Messages.Register=function(firstName,lastName,email,username,password,passwordConfirmation,newsletter,reCaptchaCode,redirectUrl,b2buser,b2bcompanyname,b2boccupation,b2btaxegency,b2btaxidentifier,b2bvatstatus){var data={firstName:firstName,lastName:lastName,email:email,username:username,password:password,passwordConfirmation:passwordConfirmation,newsletter:newsletter,reCaptchaCode:reCaptchaCode,redirectUrl:redirectUrl,b2buser:b2buser,b2bcompanyname:b2bcompanyname,b2boccupation:b2boccupation,b2btaxegency:b2btaxegency,b2btaxidentifier:b2btaxidentifier,b2bvatstatus:b2bvatstatus};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.Register",data)},Messages.Register.className="Vendd.User.Messages.Register",Messages.RegisterSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.RegisterSuccess",response)},Messages.RegisterSuccess.className="Vendd.User.Messages.RegisterSuccess",Messages.RegisterFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.RegisterFailure",response)},Messages.RegisterFailure.className="Vendd.User.Messages.RegisterFailure",Messages.CreateUser=function(firstName,lastName,email,username,redirectUrl){var data={firstName:firstName,lastName:lastName,email:email,username:username,redirectUrl:redirectUrl};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.CreateUser",data)},Messages.CreateUser.className="Vendd.User.Messages.CreateUser",Messages.CreateUserSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.CreateUserSuccess",response)},Messages.CreateUserSuccess.className="Vendd.User.Messages.CreateUserSuccess",Messages.CreateUserFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.CreateUserFailure",response)},Messages.CreateUserFailure.className="Vendd.User.Messages.CreateUserFailure",Messages.UserInitialized=function(isAuthenticated){Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.UserInitialized",{isAuthenticated:isAuthenticated})},Messages.UserInitialized.className="Vendd.User.Messages.UserInitialized",Messages.GetUserViewModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.GetUserViewModel",{})},Messages.GetUserViewModel.className="Vendd.User.Messages.GetUserViewModel",Messages.GetUserViewModelSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.GetUserViewModelSuccess",data)},Messages.GetUserViewModelSuccess.className="Vendd.User.Messages.GetUserViewModelSuccess",Messages.GetUserViewModelFailed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.GetUserViewModelFailed",response)},Messages.GetUserViewModelFailed.className="Vendd.User.Messages.GetUserViewModelFailed",Messages.QuoteSubmit=function(email,userName,message,skuId){var data={email:email,userName:userName,message:message,skuId:skuId};Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.QuoteSubmit",data)},Messages.QuoteSubmit.className="Vendd.User.Messages.QuoteSubmit",Messages.QuoteSubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.QuoteSubmitSuccess",response)},Messages.QuoteSubmitSuccess.className="Vendd.User.Messages.QuoteSubmitSuccess",Messages.QuoteSubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.QuoteSubmitFailure",response)},Messages.QuoteSubmitFailure.className="Vendd.User.Messages.QuoteSubmitFailure",Messages.LoginRedirect=function(envelope){var data=envelope.message.data;Vendd.MessageBus.VenddMessage.call(this,"Vendd.User.Messages.LoginRedirect",data)},Messages.LoginRedirect.className="Vendd.User.Messages.LoginRedirect",Messages}(User.Messages||{}),User}(Vendd.User||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.UserSelect=function(UserSelect){return UserSelect.Messages=function(Messages){return Messages.SubmitSetInterfaceUser=function(observable){var valOptions={ValidationEngine:observable.valEngine,valmodel:observable.model},data;Vendd.DataValidation.ValidateModel(valOptions);data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SubmitSetInterfaceUser",data)},Messages.SubmitSetInterfaceUser.className="Vendd.UserSelect.Messages.SubmitSetInterfaceUser",Messages.SubmitSetInterfaceUserSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SubmitSetInterfaceUserSuccess",response)},Messages.SubmitSetInterfaceUserSuccess.className="Vendd.UserSelect.Messages.SubmitSetInterfaceUserSuccess",Messages.SubmitSetInterfaceUserFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SubmitSetInterfaceUserFailure",response)},Messages.SubmitSetInterfaceUserFailure.className="Vendd.UserSelect.Messages.SubmitSetInterfaceUserFailure",Messages.ClearInterfaceUser=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.ClearInterfaceUser",data)},Messages.ClearInterfaceUser.className="Vendd.UserSelect.Messages.ClearInterfaceUser",Messages.ClearInterfaceUserSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.ClearInterfaceUserSuccess",response)},Messages.ClearInterfaceUserSuccess.className="Vendd.UserSelect.Messages.ClearInterfaceUserSuccess",Messages.ClearInterfaceUserFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.ClearInterfaceUserFailure",response)},Messages.ClearInterfaceUserFailure.className="Vendd.UserSelect.Messages.ClearInterfaceUserFailure",Messages.SearchUsers=function(observable){var data={model:observable.model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SearchUsers",data)},Messages.SearchUsers.className="Vendd.UserSelect.Messages.SearchUsers",Messages.SearchUsersSuccess=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SearchUsersSuccess",response)},Messages.SearchUsersSuccess.className="Vendd.UserSelect.Messages.SearchUsersSuccess",Messages.SearchUsersFailure=function(response){Vendd.MessageBus.VenddMessage.call(this,"Vendd.UserSelect.Messages.SearchUsersFailure",response)},Messages.SearchUsersFailure.className="Vendd.UserSelect.Messages.SearchUsersFailure",Messages}(UserSelect.Messages||{}),UserSelect}(Vendd.UserSelect||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Widget=function(Widget){return Widget.Messages=function(Messages){return Messages.BindControl=function(context){var data={context:context};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Widget.Messages.BindControl",data)},Messages.BindControl.className="Vendd.Widget.Messages.BindControl",Messages.OpenWidget=function(widgetName,immediate){var data={widgetName:widgetName,immediate:immediate};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Widget.Messages.OpenWidget",data)},Messages.OpenWidget.className="Vendd.Widget.Messages.OpenWidget",Messages.WidgetOpened=function(widgetName){var data={widgetName:widgetName};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Widget.Messages.WidgetOpened",data)},Messages.WidgetOpened.className="Vendd.Widget.Messages.WidgetOpened",Messages}(Widget.Messages||{}),Widget}(Vendd.Widget||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Wishlist=function(Wishlist){return Wishlist.Messages=function(Messages){return Messages.Add=function(id,skuId,path,qty,extraAttributes,bundleItems){var data={id:id,skuId:skuId,path:path,qty:qty||1,extraAttributes:extraAttributes,bundleItems:bundleItems};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.Add",data)},Messages.Add.className="Vendd.Wishlist.Messages.Add",Messages.Remove=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.Remove",data)},Messages.Remove.className="Vendd.Wishlist.Messages.Remove",Messages.MoveAllToCart=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.MoveAllToCart")},Messages.MoveAllToCart.className="Vendd.Wishlist.Messages.MoveAllToCart",Messages.MoveToCart=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.MoveToCart",data)},Messages.MoveToCart.className="Vendd.Wishlist.Messages.MoveToCart",Messages.Clear=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.Clear")},Messages.Clear.className="Vendd.Wishlist.Messages.Clear",Messages.Changed=function(model){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.Changed",model)},Messages.Changed.className="Vendd.Wishlist.Messages.Changed",Messages.GetModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.GetModel")},Messages.GetModel.className="Vendd.Wishlist.Messages.GetModel",Messages.Failed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Wishlist.Messages.Failed",response)},Messages.Failed.className="Vendd.Wishlist.Messages.Failed",Messages}(Wishlist.Messages||{}),Wishlist}(Vendd.Wishlist||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.WishlistArticle=function(WishlistArticle){return WishlistArticle.Messages=function(Messages){return Messages.Add=function(id,path,extraAttributes,bundleItems){var data={id:id,path:path,extraAttributes:extraAttributes,bundleItems:bundleItems};Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.Add",data)},Messages.Add.className="Vendd.WishlistArticle.Messages.Add",Messages.Remove=function(id){var data={id:id};Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.Remove",data)},Messages.Remove.className="Vendd.WishlistArticle.Messages.Remove",Messages.Clear=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.Clear")},Messages.Clear.className="Vendd.WishlistArticle.Messages.Clear",Messages.Changed=function(model){Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.Changed",model)},Messages.Changed.className="Vendd.WishlistArticle.Messages.Changed",Messages.GetModel=function(){Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.GetModel")},Messages.GetModel.className="Vendd.WishlistArticle.Messages.GetModel",Messages.Failed=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.WishlistArticle.Messages.Failed",response)},Messages.Failed.className="Vendd.WishlistArticle.Messages.Failed",Messages}(WishlistArticle.Messages||{}),WishlistArticle}(Vendd.WishlistArticle||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.ProducRecentlyViewList=function(ProducRecentlyViewList){return ProducRecentlyViewList.Messages=function(Messages){return Messages.GetRecentlyViewedList=function(serviceConfiguration){var data={serviceConfiguration:serviceConfiguration};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.GetRecentlyViewedList",data)},Messages.GetRecentlyViewedList.className="Vendd.ScrollList.Messages.GetRecentlyViewedList",Messages.RecentlyViewedSuccess=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.RecentlyViewedSuccess",data)},Messages.RecentlyViewedSuccess.className="Vendd.ScrollList.Messages.RecentlyViewedSuccess",Messages.RecentlyViewedFailure=function(model){var data={model:model};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ScrollList.Messages.RecentlyViewedFailure",data)},Messages.RecentlyViewedFailure.className="Vendd.ScrollList.Messages.RecentlyViewedFailure",Messages}(ProducRecentlyViewList.Messages||{}),ProducRecentlyViewList}(Vendd.ProducRecentlyViewList||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Newsletter.Messages.Subscribe,Vendd.Newsletter,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Newsletter,new Vendd.Newsletter.Messages.SubscribeSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Newsletter,new Vendd.Newsletter.Messages.SubscribeFailure(response))}console.log(envelope);var serviceOpts={url:"CustomOfferForms.svc/CustomSubscribe",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(serviceOpts)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Contact.Messages.Submit,Vendd.Contact,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Contact,new Vendd.Contact.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Contact,new Vendd.Contact.Messages.SubmitFailure(response))}var options={url:"CustomOfferForms.svc/ContactSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var state={id:LhApp.Context.Item.Id,path:LhApp.Context.Item.Path},getStoresForm=function(data){function onSuccess(response){var model=response;state=_.extend(state,data);Vendd.MessageBus.publishAsync(Vendd.Store,new Vendd.Store.Messages.UpdateForm(model))}function onFailure(response){console.log(response)}var request={},options;request=_.extend(state,data);options={url:"CustomStoresService.svc/GetStoresForm",data:request,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)},getStores=function(data){function onSuccess(response){var model=response;Vendd.MessageBus.publishAsync(Vendd.Store,new Vendd.Store.Messages.UpdateStores(model))}function onFailure(response){console.log(response)}var request={},options;request=_.extend(state,data);options={url:"CustomStoresService.svc/GetStores",data:request,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)};return Vendd.MessageBus.subscribe(Vendd.Store.Messages.SetState,Vendd.SetState,function(envelope){var data=envelope.message.data;getStoresForm(data)}),Vendd.MessageBus.subscribe(Vendd.Store.Messages.Refine,Vendd.Store,function(envelope){getStores(envelope.message.data.state)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var getVisitorState=function(){function onSuccess(response){return cookie=$.cookie("VisitorState"),response.success&&cookie?cookie:void 0}function onFailure(response){console.log(response)}var cookie=$.cookie("VisitorState"),options={url:"CmsService.svc/InitVisitorState",onSuccess:onSuccess,onFailure:onFailure};if(cookie)return cookie;Vendd.Service.Call(options)},setVisitorState=function(cookie){if(console.log(cookie),cookie)var oldUrl=window.location.href,cookieValueAsUrl="?"+cookieValue},_logoutRedirectUrl;return Vendd.User.AuthProviders=function(AuthProviders){return AuthProviders}(Vendd.User.AuthProviders||{}),_logoutRedirectUrl="",Vendd.MessageBus.subscribe(Vendd.User.Messages.Login,Vendd.User,function(envelope){function onSuccess(response){var redirectUrl,shoppingCartJoinCoockie,baseUrl;response.success?(redirectUrl=envelope.message.data.loginRedirectUrl,_logoutRedirectUrl=envelope.message.data.logoutRedirectUrl,shoppingCartJoinCoockie=$.cookie("Vendd:UserAndVisitorShoppingCartJoin"),shoppingCartJoinCoockie!=undefined&&shoppingCartJoinCoockie=="true"&&(redirectUrl=LhApp.Url.Page.Cart),redirectUrl&&URI(redirectUrl).equals(document.location.pathname)===!0?Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LoginSuccess(response)):redirectUrl?document.location=redirectUrl:(baseUrl=document.location.protocol.toLowerCase()+"//"+document.location.host.toLowerCase()+"/",document.location=baseUrl)):Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LoginSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LoginFailure(response))}var options={url:"AuthService.svc/Login",data:{loginName:envelope.message.data.loginName,password:envelope.message.data.password,rememberMe:envelope.message.data.rememberMe,reCaptchaCode:envelope.message.data.reCaptchaCode},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.ForgotPassword,Vendd.User,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.ForgotPasswordSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.ForgotPasswordFailure(response))}var options={url:"AuthService.svc/ForgotPassword",data:envelope.message.data.email,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.ResetPassword,Vendd.User,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.ResetPasswordSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.ResetPasswordFailure(response))}var options={url:"AuthService.svc/ResetPassword",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.Logout,Vendd.User,function(){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LogoutAuthProviders)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LogoutAuthProviders,Vendd.User,function(){var logoutPromises=[];_.each(Vendd.User.AuthProviders,function(provider){if(typeof provider.logout=="function"){var promise=$.Deferred(function(defer){provider.logout(function(){return defer.resolve(),defer.promise()})});logoutPromises.push(promise)}});$.when.apply($,logoutPromises).then(function(){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LogoutUser)})}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LogoutUser,Vendd.User,function(){function onSuccess(response){var redirectUrl,baseUrl;response.success&&(redirectUrl=_logoutRedirectUrl,redirectUrl&&URI(redirectUrl).equals(document.location.pathname)===!0?Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LogoutSuccess(response)):redirectUrl?document.location=redirectUrl:(baseUrl=document.location.protocol.toLowerCase()+"//"+document.location.host.toLowerCase()+"/",document.location=baseUrl))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LogoutFailure(response))}var options={url:"AuthService.svc/Logout",data:{},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.Register,Vendd.User,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.RegisterSuccess(response));Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.LoginRedirect(envelope))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.RegisterFailure(response))}var options={url:"AuthService.svc/Register",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.CreateUser,Vendd.User,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.CreateUserSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.CreateUserFailure(response))}var options={url:"AuthService.svc/CreateUser",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.GetUserViewModel,Vendd.User,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.GetUserViewModelSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.GetUserViewModelFailed(response))}var options={url:"UserService.svc/GetUserViewModel",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.QuoteSubmit,Vendd.User,function(envelope){function onSuccess(response){response.success&&Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.QuoteSubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.User,new Vendd.User.Messages.QuoteSubmitFailure(response))}var options={url:"AuthService.svc/QuoteSubmit",data:{email:envelope.message.data.email,userName:envelope.message.data.userName,message:envelope.message.data.message,skuId:envelope.message.data.skuId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LoginRedirect,Vendd.User,function(envelope){var loginName=envelope.message.data.loginName||envelope.message.data.email||envelope.message.data.username,loginmessage=new Vendd.User.Messages.Login(loginName,envelope.message.data.password,!1,envelope.message.data.redirectUrl);Vendd.MessageBus.publishAsync(Vendd.User,loginmessage)}),Vendd}(Vendd||{});var Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Search.Messages.GetSuggestiveResults,Vendd.Search,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Search,new Vendd.Search.Messages.GetSuggestiveResultsSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Search,new Vendd.Search.Messages.GetSuggestiveResultsFailed(response))}var options={url:"SearchService.svc/GetSuggestiveResultsViewModel",data:{searchTerm:envelope.message.data.searchTerm,category:envelope.message.data.category},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Search.Messages.GetProductSuggestiveResults,Vendd.Search,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Search,new Vendd.Search.Messages.GetProductSuggestiveResultsSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Search,new Vendd.Search.Messages.GetProductSuggestiveResultsFailed(response))}var options={url:"SearchService.svc/GetProductSuggestiveResultsViewModel",data:{searchTerm:envelope.message.data.searchTerm,maxResults:envelope.message.data.maxResults},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewSubmit,Vendd.Article,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Article,new Vendd.Article.Messages.ReviewSuccess(response,envelope.message.data))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Article,new Vendd.Article.Messages.ReviewFailure(response,envelope.message.data))}var options={url:"ArticleService.svc/ArticleReviewSubmit",data:{info:envelope.message.data.model},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewVote,Vendd.Article,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Article,new Vendd.Article.Messages.ReviewVoteSuccess(response,envelope.message.data.helpfullness.IsPositiveVote))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Article,new Vendd.Article.Messages.ReviewVoteFailure(response,envelope.message.data.helpfullness.IsPositiveVote))}var options={url:"ArticleService.svc/ArticleReviewHelpfullnessVote",data:{info:envelope.message.data.helpfullness},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.Article.CreateArticleReviewInfo=function(articleId){var articleReviewInfo={ReviewArticleId:articleId,ReviewTitle:"",ReviewDescription:"",ReviewRating:""};return new Vendd.Observable(articleReviewInfo)},Vendd.Article.CreateArticleReviewInfoValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({ReviewTitle:[{rule:"required"}],ReviewDescription:[{rule:"required"}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("ReviewTitle",propertyChanging),observable.AddListenerToPropertyChanging("ReviewDescription",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var model=null,widgetModel=null,pending=!1,widgetModelPending=!1;return Vendd.MessageBus.subscribe(Vendd.ProductCompare.Messages.GetModel,Vendd.ProductCompare,function(){function onSuccess(response){model=response;Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.GetModelSuccess(model));pending=!1}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Failed(response))}if(pending===!0)return!1;pending=!0;var options={url:"ProductCompareService.svc/GetProductCompareViewModel",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.ProductCompare.Messages.GetWidgetModel,Vendd.ProductCompare,function(){function onSuccess(response){widgetModel=response;Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.GetWidgetModelSuccess(widgetModel));widgetModelPending=!1}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Failed(response))}if(widgetModelPending===!0)return!1;widgetModelPending=!0;var options={url:"ProductCompareService.svc/GetProductCompareWidgetViewModel",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.ProductCompare.Messages.Add,Vendd.ProductCompare,function(envelope){function onSuccess(response){response.success&&Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Changed)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Failed(response))}var data={},options;data.item=envelope.message.data;options={url:"EcomService.svc/AddToProductCompare",data:data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.ProductCompare.Messages.Remove,Vendd.ProductCompare,function(envelope){function onSuccess(response){response.success&&Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Changed)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Failed(response))}var options={url:"EcomService.svc/RemoveFromProductCompare",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.ProductCompare.Messages.Clear,Vendd.ProductCompare,function(){function onSuccess(response){response.success&&Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Changed)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProductCompare,new Vendd.ProductCompare.Messages.Failed(response))}var options={url:"EcomService.svc/ClearProductCompare",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.User=function(User){return User.AuthProviders=function(AuthProviders){var fb={getStatus:function(onSuccess,onError){FB.getLoginStatus(onSuccess,onError)},getUser:function(onSuccess,onError){FB.api("/me/permissions",function(response){if(response&&response.data){var emailPermission=_.find(response.data,function(x){return x.permission==="email"});emailPermission&&emailPermission.status==="granted"?FB.api("/me?fields=id,name,email,first_name,last_name",onError,onSuccess):onError(new Error("email permission doesn't exist"))}else onError(new Error("response is undefined"))})},connect:function(loginId,email,onSuccess,onError){Vendd.Service.call({url:"AuthService.svc/ConnectAuthenticationProvider",data:{provider:"facebook",loginId:loginId,email:email},onSuccess:onSuccess,onFailure:onError})},login:function(){window.open(AuthProviders.facebook.Configuration.AuthUrl,"fbLogin","status=1,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=265,width=600")},logout:function(cb){FB.logout(cb)}},deleteFbCookie=function(){for(var theCookies=document.cookie.split(";"),c,cparts,name,i=0;i<theCookies.length;i++){for(c=theCookies[i];c.charAt(0)==" ";)c=c.substring(1);cparts=c.split("=");cparts.length==2&&(name=cparts[0]);(name&&name.indexOf("fblo_")==0||name.indexOf("fbsr_")==0)&&(document.cookie=name+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC")}},throwEx=function(ex){if(typeof ex==typeof Error)throw ex;else console.log(ex)};return AuthProviders.facebook={isAvailable:!0,initiating:!1,initiated:!1,Configuration:{AppId:"",AuthUrl:""},init:function(){var me=this;me.initiating||me.initiated||(me.initiating=!0,Vendd.Service.call({url:"Auth/FacebookLoginService.svc/GetConfiguration",data:{},onSuccess:function(res){me.Configuration.AppId=res.appId;me.Configuration.AuthUrl=res.authUrl;window.fbAsyncInit=function(){FB.init({appId:me.Configuration.AppId,cookie:!1,xfbml:!0,version:"v2.2"});me.initiated=!0},function(d,s,id){var fjs=d.getElementsByTagName(s)[0],js;d.getElementById(id)||(js=d.createElement(s),js.id=id,js.src="//connect.facebook.net/en_US/sdk.js",js.onload=function(){me.isAvailable=!0},js.onerror=function(){me.isAvailable=!1;console.warn("Facebook authentication provider is not available via this network! All FB calls will be ignored..")},fjs.parentNode.insertBefore(js,fjs))}(document,"script","facebook-jssdk")},onFailure:function(ex){throw ex;}}))},statusChanged:function(statusResponse){var me=this,facebookid;me.isAvailable&&statusResponse.status==="connected"&&(facebookid=statusResponse.authResponse.userID,fb.getUser(function(userResponse){fb.connect(facebookid,userResponse.email,function(connectedResponse){connectedResponse!=="Connected"&&(connectedResponse==="Authenticated"?document.location=document.location:connectedResponse==="CreatedAndAuthenticated"?document.location=document.location:connectedResponse==="Disconnected"&&fb.login())},function(connectedEx){throwEx(connectedEx)})},function(userEx){throwEx(userEx)}))},checkLoginState:function(){var me=this;me.isAvailable&&fb.getStatus(function(response){me.statusChanged(response)},function(ex){throw ex;})},login:function(){var me=this;me.isAvailable&&fb.login()},logout:function(cb){var me=this;if(!me.isAvailable){cb();return}fb.getStatus(function(statusResponse){statusResponse.status==="connected"?fb.logout(function(){deleteFbCookie();cb()}):cb()},function(){cb()})}},AuthProviders}(User.AuthProviders||{}),User}(Vendd.User||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.User=function(User){return User.AuthProviders=function(AuthProviders){var gg={connect:function(loginId,email,onSuccess,onError){Vendd.Service.call({url:"AuthService.svc/ConnectAuthenticationProvider",data:{provider:"google",loginId:loginId,email:email},onSuccess:onSuccess,onFailure:onError})},login:function(){window.open(AuthProviders.google.Configuration.AuthUrl,"googleLogin","status=1,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=550,width=600")},logout:function(cb){cb()}};return AuthProviders.google={initiating:!1,initiated:!1,Configuration:{ClientId:"",AuthUrl:""},init:function(){var me=this;this.initiating||this.initiated||(this.initiating=!0,function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];d.getElementById(id)||(js=d.createElement(s),js.id=id,js.src="https://apis.google.com/js/platform.js",fjs.parentNode.insertBefore(js,fjs))}(document,"script","google-jssdk"),Vendd.Service.call({url:"Auth/GoogleLoginService.svc/GetConfiguration",data:{},onSuccess:function(res){me.Configuration.ClientId=res.clientId;me.Configuration.AuthUrl=res.authUrl;me.initiated=!0},onFailure:function(ex){throw ex;}}))},login:function(){gg.login()},logout:function(cb){gg.logout(cb)}},AuthProviders}(User.AuthProviders||{}),User}(Vendd.User||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Widget.CartWidget="CartWidget",Vendd.Widget.WishlistWidget="WishlistWidget",Vendd.Widget.WishlistArticleWidget="WishlistArticleWidget",Vendd.Widget.LoginWidget="LoginWidget",Vendd.Widget.ProductCompareWidget="ProductCompareWidget",Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.ScrollList.Messages.GetNextPage,Vendd.ScrollList,function(envelope){function onSuccess(response){var model=JSON.parse(response);Vendd.MessageBus.publishAsync(Vendd.ScrollList,new Vendd.ScrollList.Messages.GetNextPageSuccess(envelope.message.data.list,model))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ScrollList,new Vendd.ScrollList.Messages.GetNextPageFailure(envelope.message.data.list,response))}var configuration=JSON.parse(envelope.message.data.serviceConfiguration),options;configuration.LoaderOptions.PageNumber=configuration.LoaderOptions.PageNumber+1;options={url:"AdapterService.svc/GetData"+location.search,data:{serviceConfiguration:JSON.stringify(configuration)},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.ScrollList.Messages.GetClientProductListData,Vendd.ScrollList,function(envelope){LhApp.Function.wcf("EcomService.svc/GetProductListData",{itemIds:envelope.message.data.itemIds,fetchPrices:envelope.message.data.fetchPrices,fetchAvailabilities:envelope.message.data.fetchAvailabilities,fetchStock:envelope.message.data.fetchStock},function(request,response){response.success?Vendd.MessageBus.publishAsync(Vendd.ScrollList,new Vendd.ScrollList.Messages.GetClientProductListDataSuccess(response.data)):Vendd.MessageBus.publishAsync(Vendd.ScrollList,new Vendd.ScrollList.Messages.GetClientProductListDataFailure(response.data))})}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var state={},getViewModel=function(id,bundleItems){function onFailure(response){console.log(response)}function onSuccess(response){var model=JSON.parse(response);state.serviceConfiguration=model.Configuration;state.path=model.PathChecksum;state.qty=1;id&&(state.selectedId=id);bundleItems&&(state.bundleItems=bundleItems);Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.Changed(model))}var data=_.extend({},state),configuration=JSON.parse(data.serviceConfiguration),options;id&&(configuration.LoaderOptions.SkuId=id);bundleItems&&(configuration.LoaderOptions.BundleItems=bundleItems);options={url:"AdapterService.svc/GetData"+location.search,data:{serviceConfiguration:JSON.stringify(configuration)},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)};return Vendd.Product.Controller=function(){var initialized=!1;return{initState:function(initialState){if(initialized===!0)return state;var data={serviceConfiguration:initialState.serviceConfiguration,selectedId:initialState.selectedId,parentId:initialState.parentId,languageId:initialState.languageId,qty:initialState.qty,path:initialState.path,minQuantity:initialState.minQuantity,maxQuantity:initialState.maxQuantity,quanta:initialState.quanta,bundleItems:initialState.bundleItems};return state=_.extend({},data),initialized=!0,state},getState:function(){return state}}}(),Vendd.MessageBus.subscribe(Vendd.Product.Messages.SetQuantity,Vendd.Product,function(envelope){state.qty=envelope.message.data.qty}),Vendd.MessageBus.subscribe(Vendd.Product.Messages.SetSelected,Vendd.Product,function(envelope){var skuId=envelope.message.data.id;getViewModel(skuId,null)}),Vendd.MessageBus.subscribe(Vendd.Product.Messages.SetBundleItems,Vendd.Product,function(envelope){var bundleItems=envelope.message.data.bundleItems||[];getViewModel(null,bundleItems)}),Vendd.MessageBus.subscribe(Vendd.Product.Messages.Notify,Vendd.Product,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.NotifySuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.NotifyFailure(response))}$.extend(!0,envelope.message.data,{productId:state.selectedId,languageId:state.languageId});var options={url:"EcomService.svc/SendAvailabityNotification",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Product.Messages.Review,Vendd.Product,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.ReviewSuccess(response,envelope.message.data))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.ReviewFailure(response,envelope.message.data))}var options={url:"CommonService.svc/ProductReviewSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Product.Messages.ReviewVote,Vendd.Product,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.ReviewVoteSuccess(response,envelope.message.data.helpfullness.ispositivevote))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Product,new Vendd.Product.Messages.ReviewVoteFailure(response,envelope.message.data.helpfullness.ispositivevote))}var options={url:"CommonService.svc/ProductReviewHelpfullnessVote",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var model=null,pending=!1;return Vendd.MessageBus.subscribe(Vendd.Cart.Messages.GetModel,Vendd.Cart,function(){function onSuccess(response){model=response;Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ShowMessages(response));Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Changed(model));pending=!1}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}if(pending===!0)return!1;pending=!0;var options={url:"CartService.svc/GetCartViewModel",onSuccess:onSuccess,onFailure:onFailure};return Vendd.Service.call(options),!0}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.Add,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/AddToCart",data:{item:{id:envelope.message.data.id,skuId:envelope.message.data.skuId,path:envelope.message.data.path,qty:envelope.message.data.qty,extraAttributes:envelope.message.data.extraAttributes,bundleItems:envelope.message.data.bundleItems}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.MultipleAdd,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.MultipleAddSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var data={items:envelope.message.data},options={url:"EcomService.svc/MultipleAddToCart",data:data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.MultipleAddSuccess,Vendd.Cart,function(){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.Remove,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/RemoveFromCart",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.SetQuantity,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/SetCartItemQty",data:{item:{id:envelope.message.data.id,qty:envelope.message.data.qty}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.SetQuantities,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed)}function onFailure(){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed)}var options={url:"EcomService.svc/SetCartItemsQty",data:{items:envelope.message.data.items},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.UpdateBundleItems,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/UpdateBundleItems",data:{item:{id:envelope.message.data.id,bundleItems:envelope.message.data.bundleItems}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ApplyExtraAllowanceOrCharge,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/SetAllowanceOrCharge",data:{item:{itemId:envelope.message.data.itemId,shopAllowanceorChargeId:envelope.message.data.shopAllowanceorChargeId}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.DisableExtraAllowanceOrCharge,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/RemoveAllowanceOrCharge",data:{item:{itemId:envelope.message.data.itemId,shopAllowanceorChargeId:envelope.message.data.shopAllowanceorChargeId}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.SetGiftwrap,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/SetCartItemGiftWrap",data:{item:{id:envelope.message.data.id,wrapId:envelope.message.data.wrapId,message:envelope.message.data.message}},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.SetGiftwraps,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed)}var options={url:"EcomService.svc/SetCartItemsGiftWrap",data:{items:envelope.message.data.items},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.SetGiftCard,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GiftCardApplyFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GiftCardApplyFailed(response))}var options={url:"EcomService.svc/SetGiftCard",data:{code:envelope.message.data.code,amount:envelope.message.data.amount},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.AddGiftCartEmailAddress,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/AddGiftCartEmailAddress",data:{items:envelope.message.data.items},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ClearAllGiftCards,Vendd.Cart,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearAllGiftCards",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ClearGiftCard,Vendd.Cart,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearGiftCard",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.Clear,Vendd.Cart,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearCart",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ApplyCoupon,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/SetCoupon",data:{code:envelope.message.data.code},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ClearCoupon,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearCoupon",data:{code:envelope.message.data.code},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ClearCoupons,Vendd.Cart,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearCoupons",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ClearGiftCard,Vendd.Cart,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.Failed(response))}var options={url:"EcomService.svc/ClearGiftCard",data:{code:envelope.message.data.code},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LoginSuccess,Vendd.Cart,function(){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LogoutSuccess,Vendd.Cart,function(){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.ApplyShippingData,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ApplyShippingDataSuccess(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ApplyShippingDataFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.ApplyShippingDataFailed(response))}var options={url:"CartService.svc/ApplyShippingData",data:{countryCode:envelope.message.data.countryCode,postCode:envelope.message.data.postCode,areaId:envelope.message.data.areaId,shippingMethodId:envelope.message.data.shippingMethodId,shippingCompanyId:envelope.message.data.shippingCompanyId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.GetShippingModel,Vendd.Cart,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetShippingModelSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetShippingModelFailed(response))}var options={url:"CartService.svc/GetShippingViewModel",data:{countryCode:envelope.message.data.countryCode,postCode:envelope.message.data.postCode,areaId:envelope.message.data.areaId,shippingMethodId:envelope.message.data.shippingMethodId,shippingCompanyId:envelope.message.data.shippingCompanyId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Cart.Messages.AddOrderItemsToCart,Vendd.Cart,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.AddOrderItemsToCartSuccess(response)),Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.AddOrderItemsToCartFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Cart,new Vendd.Cart.Messages.AddOrderItemsToCartFailed(response))}var options={url:"EcomService.svc/AddOrderItemsToCart",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.Cart.GetNewGiftCardEmail=function(cartItem,literals){var newGiftCardEmail={FromName:"",ToName:"",Email:"",CustomText:"",Title:cartItem.Title,ProductId:cartItem.ProductId,VariantId:cartItem.VariantId},literals={Literals:literals},observable;return $.extend(newGiftCardEmail,literals),observable=new Vendd.Observable(newGiftCardEmail),observable.valEngine=Vendd.Cart.CreateGiftCardEmailValidationModel(observable),observable},Vendd.Cart.CreateGiftCardEmailValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({FromName:[{rule:"required"}],ToName:[{rule:"required"}],Email:[{rule:"required"},{rule:"isEmail"}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("FromName",propertyChanging),observable.AddListenerToPropertyChanging("ToName",propertyChanging),observable.AddListenerToPropertyChanging("Email",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var model=null,pending=!1;return Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.GetModel,Vendd.Wishlist,function(){function onSuccess(response){model=response;Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Changed(model));pending=!1}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}if(pending===!0)return!1;pending=!0;var options={url:"WishlistService.svc/GetWishlistViewModel",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.Add,Vendd.Wishlist,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}var data={},options;data.item=envelope.message.data;options={url:"EcomService.svc/AddToWishlist",data:data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.Remove,Vendd.Wishlist,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}var options={url:"EcomService.svc/RemoveFromWishlist",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.MoveToCart,Vendd.Wishlist,function(envelope){function onSuccess(response){response.success?(Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel),Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Cart.Messages.GetModel)):Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(envelope.sender,new Vendd.Wishlist.Messages.Failed(response))}var options={url:"EcomService.svc/MoveWishlistProductToCart",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.MoveAllToCart,Vendd.Wishlist,function(envelope){function onSuccess(response){response.success&&(Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel),Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Cart.Messages.ShowMessages(response)),Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Cart.Messages.GetModel))}function onFailure(response){Vendd.MessageBus.publishAsync(envelope.sender,new Vendd.Wishlist.Messages.Failed(response))}var options={url:"EcomService.svc/MoveWishlistToCart",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Wishlist.Messages.Clear,Vendd.Wishlist,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.Failed(response))}var options={url:"EcomService.svc/ClearWishlist",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LoginSuccess,Vendd.Wishlist,function(){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LogoutSuccess,Vendd.Wishlist,function(){Vendd.MessageBus.publishAsync(Vendd.Wishlist,new Vendd.Wishlist.Messages.GetModel)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var model=null,pending=!1;return Vendd.MessageBus.subscribe(Vendd.WishlistArticle.Messages.GetModel,Vendd.WishlistArticle,function(){function onSuccess(response){model=response;Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Changed(model));pending=!1}function onFailure(response){console.log("Vendd.MessageBus.subscribe fail");Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}if(pending===!0)return!1;pending=!0;var options={url:"WishlistService.svc/GetWishlistArticleViewModel",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.WishlistArticle.Messages.Add,Vendd.WishlistArticle,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}function onFailure(response){console.log("fail response:"+JSON.stringify(response));Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}var data={},options;data.item=envelope.message.data;options={url:"EcomService.svc/AddToWishlistArticle",data:data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.WishlistArticle.Messages.Remove,Vendd.WishlistArticle,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}function onFailure(response){console.log("fail response:"+JSON.stringify(response));Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}var options={url:"EcomService.svc/RemoveFromWishlistArticle",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.WishlistArticle.Messages.Clear,Vendd.WishlistArticle,function(){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.GetModel):Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.Failed(response))}var options={url:"EcomService.svc/ClearWishlistArticle",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LoginSuccess,Vendd.WishlistArticle,function(){Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.GetModel)}),Vendd.MessageBus.subscribe(Vendd.User.Messages.LogoutSuccess,Vendd.WishlistArticle,function(){Vendd.MessageBus.publishAsync(Vendd.WishlistArticle,new Vendd.WishlistArticle.Messages.GetModel)}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var tempPostCode="",tempAreas="",countries="",taxAgencies="",vatStatuses="",validateAreas=!1,addressValEngine="";return Vendd.MessageBus.subscribe(Vendd.Account.Messages.ConvertPointsToCoupons,Vendd.Account,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.ConvertPointsToCouponsSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.ConvertPointsToCouponsFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.ConvertPointsToCouponsFailed(response))}var options={url:"EcomService.svc/ConvertPointsToCoupons",data:{accountId:envelope.message.data.accountId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetAddresses,Vendd.Account,function(envelope){function onSuccess(response){for(var model=response,observableAddresses=[],address,observable,i=0;i<model.Addresses.length;i++)address=model.Addresses[i],observable=new Vendd.Observable(address),observableAddresses.push(observable);model.Addresses=observableAddresses;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAddressesSuccess(model))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAddressesFailed(response))}var url=envelope.message.data.addressType==="shipping"?"AccountService.svc/GetShippingAddressesViewModel":"AccountService.svc/GetBillingAddressesViewModel",options={url:url,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.EditUser,Vendd.Account,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.EditUserSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.EditUserFailed(response))}var options={url:"AuthService.svc/EditUser",data:{firstName:envelope.message.data.model.FirstName,lastName:envelope.message.data.model.LastName,userName:envelope.message.data.model.UserName,email:envelope.message.data.model.Email,oldPassword:envelope.message.data.model.OldPassword,password:envelope.message.data.model.Password,passwordConfirmation:envelope.message.data.model.PasswordConfirmation,newsletter:envelope.message.data.model.Newsletter},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.SetDefaultAddress,Vendd.Account,function(envelope){function onSuccess(){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.AddressModelChanged)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.SetDefaultAddressFailure(response))}var url=envelope.message.data.addressType==="shipping"?"CommonService.svc/SetDefaultShippingAddress":"CommonService.svc/SetDefaultBillingAddress",options={url:url,data:{addressId:envelope.message.data.addressId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.DeleteAddress,Vendd.Account,function(envelope){function onSuccess(){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.AddressModelChanged)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.DeleteAddressFailure(response))}var url=envelope.message.data.addressType==="shipping"?"CommonService.svc/DeleteShippingAddress":"CommonService.svc/DeleteBillingAddress",options={url:url,data:{addressId:envelope.message.data.addressId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.EditAddress,Vendd.Account,function(envelope){function onSuccess(){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.EditAddressSuccess)}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.EditAddressFailed(response))}var options={url:"AccountService.svc/EditUserAddress",data:{addressType:envelope.message.data.addressType,address:envelope.message.data.model},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.CheckAddressIfExists,Vendd.Account,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.CheckAddressIfExistsSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.CheckAddressIfExistsFailure(response))}var options={url:"CommonService.svc/CheckAddressIfExists",data:{addressId:envelope.message.data.model.Id,firstName:envelope.message.data.model.FirstName,lastName:envelope.message.data.model.LastName,addressLine1:envelope.message.data.model.AddressLine1,addressLine2:envelope.message.data.model.AddressLine2,city:envelope.message.data.model.City,postCode:envelope.message.data.model.PostCode,country:envelope.message.data.model.Country},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetAreasForPostCode,Vendd.Account,function(envelope){function onSuccess(response){if(tempAreas=response,envelope.message.data.validateAfterLoad===!0){var valOptions={ValidationEngine:addressValEngine,PropertyName:"PostCode",PropertyValue:tempPostCode};validateAreas=!1;Vendd.DataValidation.Validate(valOptions)}Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAreasForPostCodeSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.EditAddressFailed(response))}var options={url:"AccountService.svc/AreaLookUp",data:{countryCode:envelope.message.data.country,postalCode:envelope.message.data.postCode,selectedAreaCode:envelope.message.data.area},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetCountries,Vendd.Account,function(envelope){function onSuccess(response){countries=response;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetCountriesSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetCountriesFailed(response))}var options={url:"AccountService.svc/GetCountries",data:{selectedCountryCode:envelope.message.data.selectedCountryCode},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetAllTaxAgencies,Vendd.Account,function(envelope){function onSuccess(response){taxAgencies=response;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAllTaxAgenciesSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAllTaxAgenciesFailed(response))}var options={url:"AccountService.svc/GetAllTaxAgencies",data:{countryCode:envelope.message.data.countryCode},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetAllVatStatuses,Vendd.Account,function(){function onSuccess(response){vatStatuses=response;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAllVatStatusesSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAllVatStatusesFailed(response))}var options={url:"AccountService.svc/GetAllVatStatuses",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Account.Messages.GetUserAccount,Vendd.Account,function(){function onSuccess(response){var model=response,observable=new Vendd.Observable(model);Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetUserAccountSuccess(observable))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetUserAccountFailure(response))}var options={url:"AccountService.svc/GetUserAccountViewModel",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.Account.SelectedCountryChanged=function(observable){observable.Area="";observable.PostCode="";observable.IsFirstAccess=!0;countries.forEach(function(country){country.Selected=!1});var currentCountry=_.where(countries,{Code:observable.Country});currentCountry[0].Selected=!0;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAllTaxAgencies(observable))},Vendd.Account.SelectedPostCodeChanged=function(observable){observable.Area=""},Vendd.Account.GetNewAccount=function(observable){var newaddress={IsInvoiceEnabled:observable.IsInvoiceEnabled,IsDefault:!1,FirstName:"",LastName:"",Title:"",Bell:"",AddressLine1:"",AddressLine2:"",Area:"",City:"",PostCode:"",Country:"",CountryDescription:"",Phones:"",Mobiles:"",Fax:"",IsInvoice:!1,InvoiceText:"",CompanyName:"",Occupation:"",TaxIdentifier:"",TaxAgency:"",VatStatus:0,IsFirstAccess:!0},literals={Literals:observable.Literals},observable;return $.extend(newaddress,literals),new Vendd.Observable(newaddress)},Vendd.Account.CreateDefaultAccountUserValidationModel=function(observable){var useEmailAsLoginName=observable.model.UseEmailAsLoginName,defaultValidationModel={FirstName:[{rule:"required"}],LastName:[{rule:"required"}],Email:[{rule:"required"},{rule:"isEmail"}]};useEmailAsLoginName||(defaultValidationModel.UserName=[{rule:"required"}]);var valEngine=Vendd.DataValidation.BuildValidationModel(defaultValidationModel),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)},isOldPasswordProperlySetPW=function(value){return value.length==0?!0:value.length>0&&observable.OldPassword.length>0?!0:!1},isOldPasswordProperlySetOP=function(value){return value.length>0&&observable.Password.length>0?!0:observable.Password.length==0?!0:!1},isEqualWithPassword=function(value){return value.length>0&&observable.Password===value?!0:value.length==0&&observable.Password===value?!0:!1},isNotWeak=function(value){if(value.length==0&&observable.PasswordConfirmation.length==0)return!0;var score=Vendd.Helpers.textStrength(value);return score>2?!0:!1};return valEngine.addOrUpdateValidationRule("isOldPasswordProperlySetPW",isOldPasswordProperlySetPW,"Old password must be completed if a new password is requested"),valEngine.addOrUpdateValidationRule("isOldPasswordProperlySetOP",isOldPasswordProperlySetOP,"Complete old password"),valEngine.addOrUpdateValidationRule("isEqualWithPassword",isEqualWithPassword,"Confirmation must be equal with Password"),valEngine.addOrUpdateValidationRule("isNotWeak",isNotWeak,"Password must not be weak"),valEngine.updateValidationModel({PasswordConfirmation:[{rule:"isEqualWithPassword"}],Password:[{rule:"isNotWeak"},{rule:"isOldPasswordProperlySetPW"}],OldPassword:[{rule:"isOldPasswordProperlySetOP"}]}),observable.AddListenerToPropertyChanging("FirstName",propertyChanging),observable.AddListenerToPropertyChanging("LastName",propertyChanging),observable.AddListenerToPropertyChanging("Email",propertyChanging),observable.AddListenerToPropertyChanging("Password",propertyChanging),observable.AddListenerToPropertyChanging("OldPassword",propertyChanging),observable.AddListenerToPropertyChanging("LastName",propertyChanging),observable.AddListenerToPropertyChanging("PasswordConfirmation",propertyChanging),valEngine},Vendd.Account.CreateDefaultAdressValidationModel=function(observable){var isValidPostCode,isValidPhoneNumber,isAreaProperlySet,customAccountValidationModel,isValidCompanyName,isValidOccupation,isValidTaxAgency,isValidVatStatus,isValidTaxIdentifier,customAccountInvoiceValidationModel,propertyChanging;return addressValEngine=Vendd.DataValidation.BuildValidationModel({FirstName:[{rule:"required"}],LastName:[{rule:"required"}],Phones:[{rule:"required"},{rule:"isNumeric"}],Mobile:[{rule:"required"},{rule:"isNumeric"}],AddressLine1:[{rule:"required"}],City:[{rule:"required"}],Country:[{rule:"required"}]}),isValidPostCode=function(){var selectedCounries=_.where(countries,{Code:observable.Country});return selectedCounries.length<=0?!0:selectedCounries.length>0&&observable.PostCode==""&&observable.IsFirstAccess===!0?(observable.IsFirstAccess=!1,!0):selectedCounries[0].HasAreas===!1&&observable.PostCode?!0:tempAreas.length>0&&selectedCounries[0].HasAreas?!0:!1},addressValEngine.addOrUpdateValidationRule("isValidPostCode",isValidPostCode,"This Property must be a valid Postal Code"),isValidPhoneNumber=function(value){return/^[\+]?[\d]+$/g.test(value)},addressValEngine.addOrUpdateValidationRule("isValidPhoneNumber",isValidPhoneNumber,"This Property must be a valid Phone Number"),isAreaProperlySet=function(value){return observable.PostCode.length>0&&isValidPostCode(observable.PostCode)&&value.length>0?!0:observable.PostCode.length<=0?!0:!1},addressValEngine.addOrUpdateValidationRule("isAreaProperlySet",isAreaProperlySet,"Area not completed"),customAccountValidationModel={PostCode:[{rule:"isValidPostCode"}],Phones:[{rule:"isValidPhoneNumber"}],Mobile:[{rule:"isValidPhoneNumber"}],Area:[{rule:"isAreaProperlySet"}]},addressValEngine.updateValidationModel(customAccountValidationModel),isValidCompanyName=function(value){return observable.IsInvoice===!0&&value.length>0?!0:observable.IsInvoice!==!0?!0:!1},addressValEngine.addOrUpdateValidationRule("isValidCompanyName",isValidCompanyName,"Please insert Company Name"),isValidOccupation=function(value){return observable.IsInvoice===!0&&value.length>0?!0:observable.IsInvoice!==!0?!0:!1},addressValEngine.addOrUpdateValidationRule("isValidOccupation",isValidOccupation,"Please insert Occupation"),isValidTaxAgency=function(value){return observable.IsInvoice===!0&&value.length>0?!0:observable.IsInvoice!==!0?!0:!1},addressValEngine.addOrUpdateValidationRule("isValidTaxAgency",isValidTaxAgency,"Please insert a valid Tax Agency"),isValidVatStatus=function(value){return observable.IsInvoice===!0&&value.length>0?!0:observable.IsInvoice!==!0?!0:!1},addressValEngine.addOrUpdateValidationRule("isValidVatStatus",isValidVatStatus,"Please insert a valid Vat Status"),isValidTaxIdentifier=function(value){return observable.IsInvoice!==!0?!0:LhApp.Function.validateTaxIdentifier(observable.IsInvoice,observable.Country,value)},addressValEngine.addOrUpdateValidationRule("isValidTaxIdentifier",isValidTaxIdentifier,"Please insert a valid Tax Identifier"),customAccountInvoiceValidationModel={CompanyName:[{rule:"isValidCompanyName"}],Occupation:[{rule:"isValidOccupation"}],TaxAgency:[{rule:"isValidTaxAgency"}],TaxIdentifier:[{rule:"isValidTaxIdentifier"}]},addressValEngine.updateValidationModel(customAccountInvoiceValidationModel),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:addressValEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)},observable.AddListenerToPropertyChanging("FirstName",propertyChanging),observable.AddListenerToPropertyChanging("LastName",propertyChanging),observable.AddListenerToPropertyChanging("Mobile",propertyChanging),observable.AddListenerToPropertyChanging("Phones",propertyChanging),observable.AddListenerToPropertyChanging("AddressLine1",propertyChanging),observable.AddListenerToPropertyChanging("City",propertyChanging),observable.AddListenerToPropertyChanging("IsInvoice",propertyChanging),observable.AddListenerToPropertyChanging("CompanyName",propertyChanging),observable.AddListenerToPropertyChanging("Occupation",propertyChanging),observable.AddListenerToPropertyChanging("TaxIdentifier",propertyChanging),observable.AddListenerToPropertyChanging("TaxAgency",propertyChanging),observable.AddListenerToPropertyChanging("VatStatus",propertyChanging),observable.AddListenerToPropertyChanging("PostCode",function(data,propertyName,value){tempPostCode=value;validateAreas=!0;Vendd.MessageBus.publishAsync(Vendd.Account,new Vendd.Account.Messages.GetAreasForPostCode(observable,value,!0))}),addressValEngine},Vendd.Account.EmptyAreasOnClose=function(){},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Helpers=function(Helpers){return Helpers.textStrength=function(value){var score=0,variations,variationCount,check,transformScore;if(!value)return 0;score+=value.length*5;variations={digits:/\d/.test(value),lower:/[a-z]/.test(value),upper:/[A-Z]/.test(value),nonWords:/\W/.test(value)};variationCount=0;for(check in variations)variationCount+=variations[check]==!0?1:0;return score+=(variationCount-1)*10,score.toString()==="NaN"&&(score=0),transformScore=function(s){var matched=0,StrengthWeakValue=28,StrengthNormalValue=43,StrengthStrongValue=68,StrengthVeryStrongValue=108;return s>=5&&s<StrengthWeakValue?matched=1:s>=StrengthWeakValue&&s<StrengthNormalValue?matched=2:s>=StrengthNormalValue&&s<StrengthStrongValue?matched=3:s>=StrengthStrongValue&&s<StrengthVeryStrongValue?matched=4:s>=StrengthVeryStrongValue&&(matched=5),matched},transformScore(parseInt(score))},Helpers.IsHTML=function(string){var a=document.createElement("div"),c,i;for(a.innerHTML=string,c=a.childNodes,i=c.length;i--;)if(c[i].nodeType===1)return!0;return!1},Helpers.ValidateNumbers=function(evt){var theEvent=evt||window.event,key=theEvent.keyCode||theEvent.which,regex;key=String.fromCharCode(key);regex=/[0-9]|\./;regex.test(key)||(theEvent.returnValue=!1,theEvent.preventDefault&&theEvent.preventDefault())},Helpers}(Vendd.Helpers||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Validations=function(Validations){return Validations.passwordStrength=function(){var value=arguments[0],config=arguments[1],score;return(config&&(score=Vendd.Helpers.textStrength(value)),score>=config.limit)?!0:!1},Validations}(Vendd.Validations||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";var ValidationEngine=function(){var self=this,base,property,propertiesList=[];return self.Errors=[],self.processProperties=function(options){$.each(options,function(k,v){var prop=self.searchProperybyName(k);prop===!1?(property={validations:"",name:""},property.validations=[],property.name=k,self.processValidations(v,property),propertiesList.push(property)):self.processValidations(v,prop)})},self.processValidations=function(validations,property){$.each(validations,function(i,v){property.validations[v.rule]={};property.validations[v.rule].Parameters=v.hasOwnProperty("Parameters")?v.Parameters:[]})},self.searchProperybyName=function(name){var prop=_.findWhere(propertiesList,{name:name});return prop===undefined?!1:prop},self.validatePropertybyName=function(name,val){var result=!0,p=self.searchProperybyName(name),validationType,parameters,error;for(validationType in p.validations)if(parameters=p.validations[validationType].Parameters,result=parameters===[]?self.validations[validationType](val):self.validations[validationType](val,parameters),result===!1)return error=self.validationErrors[validationType],self.Errors.push({Property:name,Error:error,Rule:validationType}),result;return result},self.validateAllProperties=function(model){var result=!0,property,currentProp;for(property in model)currentProp=self.searchProperybyName(property),currentProp!==!1&&(result=self.validatePropertybyName(property,model[property]));return self.Errors.length>0?!1:result},self.validations={optional:function(value){return $.trim(value).length===0?!1:!0},required:function(value){return $.trim(value).length>0?!0:!1},checkboxRequired:function(value){return value},isEmail:function(value){return/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i.test(value)},isNumeric:function(value){return/^\d+$/.test(value)},isAlphaNumeric:function(){return!0},match:function(value,parameters){return value===parameters[0]},length:function(value,parameters){return value.length===parameters[0]},maxLength:function(value,parameters){return value.length<=parameters[0]},minLength:function(value,parameters){return value.length>=parameters[0]}},self.validationErrors={optional:"This Property is Optional",required:"This Property must have a value",checkboxRequired:"This Property must have a value",isEmail:"This Property must be a Valid e-mail address",isNumeric:"This Property Must Be Numeric",isAlphaNumeric:"This Property Must Be AlphaNumeric",match:"This Property Must match a value",length:"This Property Must must have specified length",maxLength:"This Property Must must have max length",minLength:"This Property Must must have min length"},{init:function(options){base=this;base.options=options;self.processProperties(base.options)},resetValidationModel:function(){propertiesList.empty()},updateValidationModel:function(options){self.processProperties(options)},removePropertybyName:function(propName){return $.each(propertiesList,function(i,prop){if(prop.Name===propName)return propertiesList.pop(prop),!0}),!1},validateProperty:function(name,value){return self.validatePropertybyName(name,value)},validateAllProperties:function(model){return self.validateAllProperties(model)},getErrors:function(){return self.Errors},addOrUpdateValidationRule:function(validationName,validationFunction,validationErrorMessage){self.validations[validationName]=validationFunction;self.validationErrors[validationName]=validationErrorMessage},clearErrors:function(){self.Errors=[]}}};return Vendd.DataValidation.Validate=function(options){var validationEngine=options.ValidationEngine,result=validationEngine.validateProperty(options.PropertyName,options.PropertyValue),errors;if(result===!1){errors=validationEngine.getErrors();Vendd.MessageBus.publishAsync(Vendd.DataValidation,new Vendd.DataValidation.Messages.ValidationError(errors));validationEngine.clearErrors();throw errors[0].Property+" Property Error: "+errors[0].Error;}},Vendd.DataValidation.ValidateModel=function(configOptions){var validationEngine=configOptions.ValidationEngine,result=validationEngine.validateAllProperties(configOptions.valmodel),errors;if(result===!1){errors=validationEngine.getErrors();Vendd.MessageBus.publishAsync(Vendd.DataValidation,new Vendd.DataValidation.Messages.ValidationError(errors));validationEngine.clearErrors();throw errors[0].Property+" Property Error: "+errors[0].Error;}},Vendd.DataValidation.BuildValidationModel=function(model){var vaEng=new ValidationEngine;return vaEng.init(model),vaEng},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Scripts=function(){var scripts=[];return{load:function(fn){scripts.push(fn)},init:function(){_.each(scripts,function(fn){fn()});callback_vendd()}}}(),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Observable=function(Observable){return Observable=function(model){if(typeof model!="object")throw new Error("The model must be type of object.");this.model=model;this.children={};this.propertyChangingEvents={};this.propertyChangedEvents={};this.DefineProperties()},Observable.prototype.GetNotificationList=function(events,propName){var propertyNotifiers=events[propName];return propertyNotifiers||(propertyNotifiers=[],events[propName]=propertyNotifiers),propertyNotifiers},Observable.prototype.FindEvent=function(notificationList,event){for(var i=0,n=notificationList.length;i<n;i++)if(notificationList[i]===event)return i;return-1},Observable.prototype.GetChildObservable=function(propName){for(var child in this.children)if(this.children.hasOwnProperty(child)&&child===propName)return this.children[propName];return null},Observable.prototype.GetChildObservableByPath=function(propertyPath){var innerData=this,propertyPathParts=propertyPath.split("."),j;if(propertyPathParts.length>1)for(j=0;j<propertyPathParts.length-1;j++)innerData=innerData.GetChildObservable(propertyPathParts[j]);return innerData},Observable.prototype.GetModel=function(){return this.model},Observable.prototype.DefineProperties=function(){var propName,propValue,propType;for(propName in this.model)if(this.model.hasOwnProperty(propName))if(propValue=this.model[propName],propType=typeof propValue,Array.isArray(propValue))throw new Error("DefineProperties for array is not implemented yet!");else propType==="string"||propType==="number"||propType==="boolean"?this.DefineProperty(propName,propValue):propType==="object"&&(this.children[propName]=new Vendd.Observable(propValue))},Observable.prototype.DefineProperty=function(propName){Object.defineProperty(this,propName,{set:function(value){this.NotifyPropertyChanging(propName,value);this.model[propName]=value;this.NotifyPropertyChanged(propName,value)},get:function(){return this.model[propName]}})},Observable.prototype.NotifyPropertyChanging=function(propName,value){for(var propertyNotifiers=this.GetNotificationList(this.propertyChangingEvents,propName),i=0,n=propertyNotifiers.length;i<n;i++)propertyNotifiers[i](this,propName,value)},Observable.prototype.NotifyPropertyChanged=function(propName,value){for(var propertyNotifiers=this.GetNotificationList(this.propertyChangedEvents,propName),i=0,n=propertyNotifiers.length;i<n;i++)propertyNotifiers[i](this,propName,value)},Observable.prototype.SetModel=function(model){var propName,propValue,propType;this.model=model;for(propName in this.model)this.model.hasOwnProperty(propName)&&(propValue=this.model[propName],propType=typeof propValue,Array.isArray(propValue)?this.NotifyPropertyChanged(propName,propValue):propType==="string"||propType==="number"||propType==="boolean"?this.NotifyPropertyChanged(propName,propValue):propType==="object"&&this.children[propName].SetModel(propValue))},Observable.prototype.AddListenerToPropertyChanging=function(propName,eventListenerFn){if(typeof eventListenerFn=="function"){var propertyNotifiers=this.GetNotificationList(this.propertyChangingEvents,propName),pos=this.FindEvent(propertyNotifiers,eventListenerFn);pos===-1&&propertyNotifiers.push(eventListenerFn)}},Observable.prototype.AddListenerToPropertyChanged=function(propName,eventListenerFn){if(typeof eventListenerFn=="function"){var propertyNotifiers=this.GetNotificationList(this.propertyChangedEvents,propName),pos=this.FindEvent(propertyNotifiers,eventListenerFn);pos===-1&&propertyNotifiers.push(eventListenerFn)}},Observable.prototype.RemoveListenerToPropertyChanging=function(propName,eventListenerFn){if(typeof eventListenerFn=="function"){var propertyNotifiers=this.GetNotificationList(this.propertyChangingEvents,propName),pos=this.FindEvent(propertyNotifiers,eventListenerFn);pos===-1&&propertyNotifiers.splice(pos,1)}},Observable.prototype.RemoveListenerToPropertyChanged=function(propName,eventListenerFn){if(typeof eventListenerFn=="function"){var propertyNotifiers=this.GetNotificationList(this.propertyChangedEvents,propName),pos=this.FindEvent(propertyNotifiers,eventListenerFn);pos===-1&&propertyNotifiers.splice(pos,1)}},Observable}(Vendd.Observable||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Offer=function(Offer){return Offer.Messages=function(Messages){return Messages.Submit=function(firstname,lastName,email,phone,stores,offertitle,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,firstName:firstname,lastName:lastName,phone:phone,stores:stores,offertitle:offertitle,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Offer.Messages.Submit",data)},Messages.Submit.className="Vendd.Offer.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Offer.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.Offer.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Offer.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.Offer.Messages.SubmitFailure",Messages}(Offer.Messages||{}),Vendd.MessageBus.subscribe(Offer.Messages.Submit,Offer,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Offer,new Offer.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Offer,new Offer.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/OfferSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Offer}(Vendd.Offer||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.AfterSalesOffer=function(AfterSalesOffer){return AfterSalesOffer.Messages=function(Messages){return Messages.Submit=function(firstname,lastName,email,phone,stores,offertitle,currentItemId,currentItemTemplate,currentItemSfakinakaisBrandValue,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,firstName:firstname,lastName:lastName,phone:phone,stores:stores,offertitle:offertitle,currentItemId:currentItemId,currentItemTemplate:currentItemTemplate,currentItemSfakinakaisBrandValue:currentItemSfakinakaisBrandValue,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.AfterSalesOffer.Messages.Submit",data)},Messages.Submit.className="Vendd.AfterSalesOffer.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.AfterSalesOffer.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.AfterSalesOffer.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.AfterSalesOffer.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.AfterSalesOffer.Messages.SubmitFailure",Messages}(AfterSalesOffer.Messages||{}),Vendd.MessageBus.subscribe(AfterSalesOffer.Messages.Submit,AfterSalesOffer,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(AfterSalesOffer,new AfterSalesOffer.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(AfterSalesOffer,new AfterSalesOffer.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/AfterSalesOfferSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),AfterSalesOffer}(Vendd.AfterSalesOffer||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.CompanySales=function(CompanySales){return CompanySales.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,phone,message,brand,model,customerType,company,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,phone:phone,message:message,brand:brand,model:model,customerType:customerType,company:company,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.CompanySales.Messages.Submit",data)},Messages.Submit.className="Vendd.CompanySales.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.CompanySales.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.CompanySales.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.CompanySales.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.CompanySales.Messages.SubmitFailure",Messages}(CompanySales.Messages||{}),Vendd.MessageBus.subscribe(CompanySales.Messages.Submit,CompanySales,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(CompanySales,new CompanySales.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(CompanySales,new CompanySales.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/CompanySalesSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),CompanySales}(Vendd.CompanySales||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Control=function(Control){return Control.GetType=function(control){return control.nodeName.toLowerCase()+"."+control.type},Control.GetValue=function(control,dataType){var controlType=Control.GetType(control);if(control&&typeof dataType=="string")switch(dataType){case"string":return control.value;case"number":return isNaN(control.value)?"":Number(control.value);case"boolean":return control.checked;case"object":return control.value;default:return control.value}},Control.SetValue=function(control,value){var controlType=Control.GetType(control),isChecked;if(value===undefined){if(control.type)switch(controlType){case"input.radio":case"input.file":control.filename="";break;case"input.checkbox":isChecked=!1;break;default:control.value=""}else control.innerText="";return}if(control.type)switch(controlType){case"input.radio":break;case"input.file":break;case"input.checkbox":isChecked=!1;typeof value=="string"&&(isChecked=control.value===value);typeof value=="boolean"&&(isChecked=value);control.checked=isChecked;break;default:control.value=value}else Vendd.Helpers.IsHTML(value)?control.innerHTML=value:control.innerText?control.innerText=value:control.innerHTML=value},Control.SetVisibility=function(control,value){var $control=$(control);if(value===undefined){$control.hide();return}if(typeof value=="boolean"){value?$control.show():$control.hide();return}if(typeof value=="string"){value.length>0?$control.show():$control.hide();return}},Control}(Vendd.Control||{}),Vendd.ControlHelpers=function(ControlHelpers){return ControlHelpers.HandleError=function(control,observableOldValue,exception){control.value=observableOldValue;control.focus();control.select();throw exception;},ControlHelpers}(Vendd.ControlHelpers||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.DatabindingTypes=function(DatabindingTypes){return DatabindingTypes.DataMember="dataMember",DatabindingTypes.DataShow="dataShow",DatabindingTypes}(Vendd.DatabindingTypes||{}),Vendd.Databinding=function(Databinding){var bindings=[];return Databinding.CreateControlDatabindings=function(wrapper,data){var controlDatabindings=Vendd.DatabindingHelpers.ResolveControlDatabinding(wrapper,data);Databinding.BindControls(controlDatabindings)},Databinding.DestroyControlDatabindings=function(wrapper,data){var controlDatabindings=Vendd.DatabindingHelpers.ResolveControlDatabinding(wrapper,data);Databinding.UnbindControls(controlDatabindings)},Databinding.BindControls=function(controlDataProperty){var i;if(controlDataProperty&&Array.isArray(controlDataProperty))for(i=0;i<controlDataProperty.length;i++){var cdp=controlDataProperty[i],control=cdp.Control,data=cdp.Data,propertyName=cdp.PropertyName,type=cdp.Type;(control||data||propertyName)&&Databinding.BindControl(control,data,propertyName,type)}},Databinding.UnbindControls=function(controlDataProperty){var i;if(controlDataProperty&&Array.isArray(controlDataProperty))for(i=0;i<controlDataProperty.length;i++){var cdp=controlDataProperty[i],control=cdp.Control,data=cdp.Data,propertyName=cdp.PropertyName,type=cdp.Type;(control||data||propertyName)&&Databinding.UnbindControl(control,data,propertyName,type)}},Databinding.BindControl=function(control,data,propertyName,type){var pos,binding,eventCode,value;if(control&&typeof control=="object"){pos=Vendd.DatabindingHelpers.FindBinding(control,data,propertyName,type);binding=pos===-1?Vendd.DatabindingHelpers.CreateBinding(control,data,propertyName,type,bindings):bindings[pos];binding.Event=Vendd.DatabindingEvents.ControlChanged;data instanceof Vendd.Observable&&data.AddListenerToPropertyChanged(propertyName,Vendd.DatabindingEvents.PropertyChanged);eventCode=Vendd.DatabindingHelpers.GetEventCode(control);value=data[propertyName];switch(binding.Type){case Vendd.DatabindingTypes.DataMember:$(control).unbind(eventCode,binding.Event);Vendd.Control.SetValue(control,value);$(control).bind(eventCode,binding.Event);break;case Vendd.DatabindingTypes.DataShow:Vendd.Control.SetVisibility(control,value)}}},Databinding.UnbindControl=function(control,data,propertyName,type){var pos,event,indexes,eventCode;if(control&&typeof control=="object"){if(pos=Vendd.DatabindingHelpers.FindBinding(control,data,propertyName,type),pos===-1)return;event=bindings[pos].Event;bindings.splice(pos,1);indexes=Vendd.DatabindingHelpers.FindControlBindings(control);indexes.length===0&&(eventCode=Vendd.DatabindingHelpers.GetEventCode(control),control.addEventListener?control.removeEventListener(eventCode,event):control.detachEvent(eventCode,event))}},Databinding.GetCurrentBindings=function(){return bindings},Databinding}(Vendd.Databinding||{}),Vendd.DatabindingHelpers=function(DatabindingHelpers){return DatabindingHelpers.GetEventCode=function(control){var controlType=Vendd.Control.GetType(control);switch(controlType){default:return"change"}},DatabindingHelpers.FindBinding=function(control,data,propertyName,type){var bindings=Vendd.Databinding.GetCurrentBindings(),i;if(typeof control=="object")for(i=0;i<bindings.length;i++)if(bindings[i].Control===control&&bindings[i].Data===data&&bindings[i].Type===type&&bindings[i].PropertyName===propertyName)return i;return-1},DatabindingHelpers.FindControlBindings=function(control){var res=[],bindings=Vendd.Databinding.GetCurrentBindings(),i;if(typeof control=="object")for(i=0;i<bindings.length;i++)bindings[i].Control===control&&res.push(i);return res},DatabindingHelpers.FindPropertyBindings=function(data,propertyName){var bindings=Vendd.Databinding.GetCurrentBindings(),res=[],i;if(typeof data=="object"&&typeof propertyName=="string")for(i=0;i<bindings.length;i++)bindings[i].Data===data&&bindings[i].PropertyName===propertyName&&res.push(i);return res},DatabindingHelpers.CreateBinding=function(control,data,propertyName,type,bindings){var binding={Control:control,Data:data,PropertyName:propertyName,Type:type,Event:null};return bindings.push(binding),binding},DatabindingHelpers.ResolveControlDatabinding=function(wrapper,data){var controlDatabindings=[];return data?($("*[data-member]",wrapper).each(function(i,dataMemberControl){var $dataMemberControl=$(dataMemberControl),dataMemberPath=$dataMemberControl.data("member"),propertyName=dataMemberPath.split(".").pop(),innerData=data.GetChildObservableByPath(dataMemberPath),controlDatabinding={Control:dataMemberControl,Data:innerData,PropertyName:propertyName,Type:Vendd.DatabindingTypes.DataMember};controlDatabindings.push(controlDatabinding)}),$("*[data-show]",wrapper).each(function(i,dataShowControl){var $dataShowControl=$(dataShowControl),dataShowPath=$dataShowControl.data("show"),propertyName=dataShowPath.split(".").pop(),innerData=data.GetChildObservableByPath(dataShowPath),controlDatabinding={Control:dataShowControl,Data:innerData,PropertyName:propertyName,Type:Vendd.DatabindingTypes.DataShow};controlDatabindings.push(controlDatabinding)}),controlDatabindings):controlDatabindings},DatabindingHelpers}(Vendd.DatabindingHelpers||{}),Vendd.DatabindingEvents=function(DatabindingEvents){return DatabindingEvents.ControlChanged=function(event){var target=event.target||event.srcElement,indexes=Vendd.DatabindingHelpers.FindControlBindings(target),bindings,i;if(indexes.length!==0)for(bindings=Vendd.Databinding.GetCurrentBindings(),i=0;i<indexes.length;i++){var binding=bindings[indexes[i]],control=binding.Control,data=binding.Data,propertyName=binding.PropertyName;try{data[propertyName]=Vendd.Control.GetValue(control,typeof data[propertyName])}catch(ex){Vendd.ControlHelpers.HandleError(target,data[propertyName],ex)}}},DatabindingEvents.PropertyChanged=function(data,propertyName,value){var bindings=Vendd.Databinding.GetCurrentBindings(),indexes=Vendd.DatabindingHelpers.FindPropertyBindings(data,propertyName),i,binding,control;if(indexes.length!==0)for(i=0;i<indexes.length;i++){binding=bindings[indexes[i]];control=binding.Control;switch(binding.Type){case Vendd.DatabindingTypes.DataMember:Vendd.Control.SetValue(control,value);break;case Vendd.DatabindingTypes.DataShow:Vendd.Control.SetVisibility(control,value)}}},DatabindingEvents}(Vendd.DatabindingEvents||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Career.Messages.Submit,Vendd.Career,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Career,new Vendd.Career.Messages.SubmitSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Career,new Vendd.Career.Messages.SubmitFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Career,new Vendd.Career.Messages.SubmitFailure(response))}var options={url:"JobApplicationService.svc/SubmitCv",data:{info:envelope.message.data.model},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.Career.CreateApplicantInfo=function(selectedJob){var newApplicantInfo={Email:"",FirstName:"",LastName:"",Phone:"",Message:"",JobTitle:selectedJob,CvFileUploaded:"",Agreement:!1};return new Vendd.Observable(newApplicantInfo)},Vendd.Career.CreateDefaultJobInfoValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({FirstName:[{rule:"required"}],LastName:[{rule:"required"}],Email:[{rule:"required"},{rule:"isEmail"}],Phone:[{rule:"required"},{rule:"isNumeric"}],JobTitle:[{rule:"required"}],CvFileUploaded:[{rule:"required"}],Agreement:[{rule:"required"},{rule:"match",Parameters:[!0]}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("FirstName",propertyChanging),observable.AddListenerToPropertyChanging("LastName",propertyChanging),observable.AddListenerToPropertyChanging("Email",propertyChanging),observable.AddListenerToPropertyChanging("Phone",propertyChanging),observable.AddListenerToPropertyChanging("Message",propertyChanging),observable.AddListenerToPropertyChanging("JobTitle",propertyChanging),observable.AddListenerToPropertyChanging("Agreement",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.CallMeBack.Messages.Submit,Vendd.CallMeBack,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.CallMeBack,new Vendd.CallMeBack.Messages.SubmitSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.CallMeBack,new Vendd.CallMeBack.Messages.SubmitFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.CallMeBack,new Vendd.CallMeBack.Messages.SubmitFailure(response))}var options={url:"CallMeBackService.svc/SubmitCallMeBackRequest",data:{info:envelope.message.data.model},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.CallMeBack.CreateCallMeBackInfo=function(){return new Vendd.Observable({FirstName:"",Phone:"",CallBackSfakianakis:"",CallMeBackFormConsent:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1})},Vendd.CallMeBack.CreateDefaultCallMeBackInfoValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({FirstName:[{rule:"required"}],Phone:[{rule:"required"},{rule:"isNumeric"}],CallBackSfakianakis:[{rule:"checkboxRequired"}],CallMeBackFormConsent:[{rule:"checkboxRequired"}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("FirstName",propertyChanging),observable.AddListenerToPropertyChanging("Phone",propertyChanging),observable.AddListenerToPropertyChanging("CallMeBackFormConsent",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.Order.Messages.SubmitRequestOrderChange,Vendd.Order,function(envelope){function onSuccess(response){response.success===!0?Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.SubmitRequestOrderChangeSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.SubmitRequestOrderChangeFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.SubmitRequestOrderChangeFailure(response))}var options={url:"AuthService.svc/RequestOrderChange",data:{email:envelope.message.data.model.Email,code:envelope.message.data.model.OrderCode},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Order.Messages.CancelUncompletedOrder,Vendd.Order,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.CancelUncompletedOrderSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.CancelUncompletedOrderFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.CancelUncompletedOrderFailed(response))}var options={url:"EcomService.svc/CancelUncompletedOrder",data:{orderId:envelope.message.data.orderId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.Order.Messages.ReturnOrderItem,Vendd.Order,function(envelope){function onSuccess(response){response.success?Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.ReturnOrderItemSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.ReturnOrderItemFailed(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.Order,new Vendd.Order.Messages.ReturnOrderItemFailed(response))}var options={url:"EcomService.svc/ReturnOrderItem",data:{orderItemId:envelope.message.data.orderItemId},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.Order.CreateChangeOrder=function(){return new Vendd.Observable({Email:"",OrderCode:""})},Vendd.Order.CreateDefaultChangeOrderValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({Email:[{rule:"required"},{rule:"isEmail"}],OrderCode:[{rule:"required"}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("Email",propertyChanging),observable.AddListenerToPropertyChanging("OrderCode",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.UserSelect.Messages.SubmitSetInterfaceUser,Vendd.UserSelect,function(envelope){function onSuccess(response){response.success===!0?Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SubmitSetInterfaceUserSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SubmitSetInterfaceUserFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SubmitSetInterfaceUserFailure(response))}var options={url:"AuthService.svc/SetInterfaceUser",data:{loginName:envelope.message.data.model.LoginName},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.UserSelect.Messages.ClearInterfaceUser,Vendd.UserSelect,function(){function onSuccess(response){response.success===!0?Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.ClearInterfaceUserSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.ClearInterfaceUserFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.ClearInterfaceUserFailure(response))}var options={url:"AuthService.svc/ClearInterfaceUser",data:{},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.MessageBus.subscribe(Vendd.UserSelect.Messages.SearchUsers,Vendd.UserSelect,function(envelope){function onSuccess(response){response.success===!0?Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SearchUsersSuccess(response)):Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SearchUsersFailure(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.UserSelect,new Vendd.UserSelect.Messages.SearchUsersFailure(response))}var options={url:"AuthService.svc/SearchUsers",data:{minChars:envelope.message.data.model.MinChars,maxHeight:envelope.message.data.model.MaxHeight,zIndex:envelope.message.data.model.ZIndex,deferRequestBy:envelope.message.data.model.DeferRequestBy,noCache:envelope.message.data.model.NoCache,onSelect:envelope.message.data.model.OnSelect},onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Vendd.UserSelect.CreateUserSelect=function(wrapper){var observable=new Vendd.Observable({LoginName:""});return Vendd.Databinding.CreateControlDatabindings(wrapper,observable),observable.valEngine=Vendd.UserSelect.CreateDefaultSetInterfaceUserValidationModel(observable),observable},Vendd.UserSelect.CreateDefaultSetInterfaceUserValidationModel=function(observable){var valEngine=Vendd.DataValidation.BuildValidationModel({LoginName:[{rule:"required"},{rule:"isEmail"}]}),propertyChanging=function(data,propertyName,value){var valOptions={ValidationEngine:valEngine,PropertyName:propertyName,PropertyValue:value};Vendd.DataValidation.Validate(valOptions)};return observable.AddListenerToPropertyChanging("LoginName",propertyChanging),valEngine},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.MessageBus.subscribe(Vendd.ProducRecentlyViewList.Messages.GetRecentlyViewedList,Vendd.ProducRecentlyViewList,function(){function onSuccess(response){Vendd.MessageBus.publishAsync(Vendd.ProducRecentlyViewList,new Vendd.ProducRecentlyViewList.Messages.RecentlyViewedSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Vendd.ProducRecentlyViewList,new Vendd.ProducRecentlyViewList.Messages.RecentlyViewedFailure(response))}var options={url:"RecentlyViewedProductsService.svc/GetRecentlyViewedIds",onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options);return}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.HandleItemStatistics=function(){function onSuccess(){}function onFailure(){}var itemStatisticsDataArray=[],options;$('.x-control[data-manipulate-stats="true"]').each(function(i,control){var $control=$(control),itemId=$control.data("stats-itemid"),action=$control.data("stats-action"),data={ItemId:itemId,Action:action};$.inArray(data,itemStatisticsDataArray)==-1&&itemStatisticsDataArray.push(data)});itemStatisticsDataArray.length>0&&(options={url:"StatsService.svc/ManipulateItemStatistics",data:{data:itemStatisticsDataArray},onSuccess:onSuccess,onFailure:onFailure},Vendd.Service.call(options))},Vendd.HandleProductStatistics=function(){function onSuccess(){}function onFailure(){}var productStatisticsDataArray=[],options;$('.x-control[data-manipulate-stats="true"]').each(function(i,control){var $control=$(control),productId=$control.data("stats-productid"),action=$control.data("stats-action"),data={SkuId:productId,Action:action};$.inArray(data,productStatisticsDataArray)==-1&&productStatisticsDataArray.push(data)});productStatisticsDataArray.length>0&&(options={url:"StatsService.svc/ManipulateProductStatistics",data:{data:productStatisticsDataArray},onSuccess:onSuccess,onFailure:onFailure},Vendd.Service.call(options))},Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.TestDrive=function(TestDrive){return TestDrive.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,stores,brands,models,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,email:email,phone:phone,stores:stores,brands:brands,models:models,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};console.log(data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.TestDrive.Messages.Submit",data)},Messages.Submit.className="Vendd.TestDrive.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.TestDrive.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.TestDrive.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.TestDrive.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.TestDrive.Messages.SubmitFailure",Messages}(TestDrive.Messages||{}),Vendd.MessageBus.subscribe(TestDrive.Messages.Submit,TestDrive,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(TestDrive,new TestDrive.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(TestDrive,new TestDrive.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/TestDriveSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),TestDrive}(Vendd.TestDrive||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.ServiceForm=function(ServiceForm){return ServiceForm.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,message,service,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,firstName:firstName,lastName:lastName,phone:phone,message:message,service:service,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.ServiceForm.Messages.Submit",data)},Messages.Submit.className="Vendd.ServiceForm.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.ServiceForm.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.ServiceForm.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.ServiceForm.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.ServiceForm.Messages.SubmitFailure",Messages}(ServiceForm.Messages||{}),Vendd.MessageBus.subscribe(ServiceForm.Messages.Submit,ServiceForm,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(ServiceForm,new ServiceForm.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(ServiceForm,new ServiceForm.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/ServiceFormSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),ServiceForm}(Vendd.ServiceForm||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.Insurance=function(Insurance){return Insurance.Messages=function(Messages){return Messages.Submit=function(email,firstName,lastName,phone,address,fax,age,horsePower,vehicleValue,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={email:email,firstName:firstName,lastName:lastName,phone:phone,address:address,fax:fax,age:age,horsePower:horsePower,vehicleValue:vehicleValue,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.Insurance.Messages.Submit",data)},Messages.Submit.className="Vendd.Insurance.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Insurance.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.Insurance.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.Insurance.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.Insurance.Messages.SubmitFailure",Messages}(Insurance.Messages||{}),Vendd.MessageBus.subscribe(Insurance.Messages.Submit,Insurance,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(Insurance,new Insurance.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(Insurance,new Insurance.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/InsuranceSubmit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),Insurance}(Vendd.Insurance||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.LandingOffer=function(LandingOffer){return LandingOffer.Messages=function(Messages){return Messages.Submit=function(email,firstName,lastName,phone,model,area,terms,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,phone:phone,email:email,model:model,area:area,terms:terms,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOffer.Messages.Submit",data)},Messages.Submit.className="Vendd.LandingOffer.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOffer.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.LandingOffer.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOffer.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.LandingOffer.Messages.SubmitFailure",Messages}(LandingOffer.Messages||{}),Vendd.MessageBus.subscribe(LandingOffer.Messages.Submit,LandingOffer,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(LandingOffer,new LandingOffer.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(LandingOffer,new LandingOffer.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/Landing_Offer_Submit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),LandingOffer}(Vendd.LandingOffer||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.LandingOfferVolvoV40=function(LandingOfferVolvoV40){return LandingOfferVolvoV40.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,offer,area,terms,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,phone:phone,email:email,offer:offer,area:area,terms:terms,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferVolvoV40.Messages.Submit",data)},Messages.Submit.className="Vendd.LandingOfferVolvoV40.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferVolvoV40.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.LandingOfferVolvoV40.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferVolvoV40.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.LandingOfferVolvoV40.Messages.SubmitFailure",Messages}(LandingOfferVolvoV40.Messages||{}),Vendd.MessageBus.subscribe(LandingOfferVolvoV40.Messages.Submit,LandingOfferVolvoV40,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(LandingOfferVolvoV40,new LandingOfferVolvoV40.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(LandingOfferVolvoV40,new LandingOfferVolvoV40.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/Landing_Offer_VolvoV40_Submit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),LandingOfferVolvoV40}(Vendd.LandingOfferVolvoV40||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.LandingOfferMiniInnovationBonus=function(LandingOfferMiniInnovationBonus){return LandingOfferMiniInnovationBonus.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,sex,terms,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,phone:phone,email:email,sex:sex,terms:terms,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniInnovationBonus.Messages.Submit",data)},Messages.Submit.className="Vendd.LandingOfferMiniInnovationBonus.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitFailure",Messages}(LandingOfferMiniInnovationBonus.Messages||{}),Vendd.MessageBus.subscribe(LandingOfferMiniInnovationBonus.Messages.Submit,LandingOfferMiniInnovationBonus,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(LandingOfferMiniInnovationBonus,new LandingOfferMiniInnovationBonus.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(LandingOfferMiniInnovationBonus,new LandingOfferMiniInnovationBonus.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/Landing_MiniInnovationBonus_Submit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),LandingOfferMiniInnovationBonus}(Vendd.LandingOfferMiniInnovationBonus||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.LandingOfferMini=function(LandingOfferMini){return LandingOfferMini.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,title,terms,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,phone:phone,email:email,title:title,terms:terms,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMini.Messages.Submit",data)},Messages.Submit.className="Vendd.LandingOfferMini.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMini.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.LandingOfferMini.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMini.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.LandingOfferMini.Messages.SubmitFailure",Messages}(LandingOfferMini.Messages||{}),Vendd.MessageBus.subscribe(LandingOfferMini.Messages.Submit,LandingOfferMini,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(LandingOfferMini,new LandingOfferMini.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(LandingOfferMini,new LandingOfferMini.Messages.SubmitFailure(response))}console.log(envelope);var options={url:"CustomOfferForms.svc/Landing_Mini2017_Submit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),LandingOfferMini}(Vendd.LandingOfferMini||{}),Vendd}(Vendd||{}),Vendd=function(Vendd){"use strict";return Vendd.LandingOfferMiniStock=function(LandingOfferMiniStock){return LandingOfferMiniStock.Messages=function(Messages){return Messages.Submit=function(firstName,lastName,email,phone,title,store,model,terms,sfakianakisAEBE,sfakianakisAEBEGroup,emailcheckbox,phonecheckbox,postcheckbox,smscheckbox){var data={firstName:firstName,lastName:lastName,email:email,phone:phone,title:title,store:store,model:model,terms:terms,sfakianakisAEBE:sfakianakisAEBE,sfakianakisAEBEGroup:sfakianakisAEBEGroup,emailcheckbox:emailcheckbox,phonecheckbox:phonecheckbox,postcheckbox:postcheckbox,smscheckbox:smscheckbox};Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniStock.Messages.Submit",data)},Messages.Submit.className="Vendd.LandingOfferMiniStock.Messages.Submit",Messages.SubmitSuccess=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniStock.Messages.SubmitSuccess",response)},Messages.SubmitSuccess.className="Vendd.LandingOfferMiniStock.Messages.SubmitSuccess",Messages.SubmitFailure=function(response){response.data=JSON.parse(response.data);Vendd.MessageBus.VenddMessage.call(this,"Vendd.LandingOfferMiniStock.Messages.SubmitFailure",response)},Messages.SubmitFailure.className="Vendd.LandingOfferMiniStock.Messages.SubmitFailure",Messages}(LandingOfferMiniStock.Messages||{}),Vendd.MessageBus.subscribe(LandingOfferMiniStock.Messages.Submit,LandingOfferMiniStock,function(envelope){function onSuccess(response){Vendd.MessageBus.publishAsync(LandingOfferMiniStock,new LandingOfferMiniStock.Messages.SubmitSuccess(response))}function onFailure(response){Vendd.MessageBus.publishAsync(LandingOfferMiniStock,new LandingOfferMiniStock.Messages.SubmitFailure(response))}var options={url:"CustomOfferForms.svc/Landing_MiniStockOffer_Submit",data:envelope.message.data,onSuccess:onSuccess,onFailure:onFailure};Vendd.Service.call(options)}),LandingOfferMiniStock}(Vendd.LandingOfferMiniStock||{}),Vendd}(Vendd||{}); /*! * jQuery JavaScript Library v1.8.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) */ (function(window,undefined){function createOptions(options){var object=optionsCache[options]={};return jQuery.each(options.split(core_rspace),function(_,flag){object[flag]=!0}),object}function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();if(data=elem.getAttribute(name),typeof data=="string"){try{data=data==="true"?!0:data==="false"?!1:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else data=undefined}return data}function isEmptyDataObject(obj){var name;for(name in obj)if((name!=="data"||!jQuery.isEmptyObject(obj[name]))&&name!=="toJSON")return!1;return!0}function returnFalse(){return!1}function returnTrue(){return!0}function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11}function sibling(cur,dir){do cur=cur[dir];while(cur&&cur.nodeType!==1);return cur}function winnow(elements,qualifier,keep){if(qualifier=qualifier||0,jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier===keep});if(typeof qualifier=="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1});if(isSimple.test(qualifier))return jQuery.filter(qualifier,filtered,!keep);qualifier=jQuery.filter(qualifier,filtered)}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>=0===keep})}function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement)while(list.length)safeFrag.createElement(list.pop());return safeFrag}function findOrAppend(elem,tag){return elem.getElementsByTagName(tag)[0]||elem.appendChild(elem.ownerDocument.createElement(tag))}function cloneCopyEvent(src,dest){if(dest.nodeType===1&&jQuery.hasData(src)){var type,i,l,oldData=jQuery._data(src),curData=jQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle;curData.events={};for(type in events)for(i=0,l=events[type].length;i<l;i++)jQuery.event.add(dest,type,events[type][i])}curData.data&&(curData.data=jQuery.extend({},curData.data))}}function cloneFixAttributes(src,dest){var nodeName;dest.nodeType===1&&(dest.clearAttributes&&dest.clearAttributes(),dest.mergeAttributes&&dest.mergeAttributes(src),nodeName=dest.nodeName.toLowerCase(),nodeName==="object"?(dest.parentNode&&(dest.outerHTML=src.outerHTML),jQuery.support.html5Clone&&src.innerHTML&&!jQuery.trim(dest.innerHTML)&&(dest.innerHTML=src.innerHTML)):nodeName==="input"&&rcheckableType.test(src.type)?(dest.defaultChecked=dest.checked=src.checked,dest.value!==src.value&&(dest.value=src.value)):nodeName==="option"?dest.selected=src.defaultSelected:nodeName==="input"||nodeName==="textarea"?dest.defaultValue=src.defaultValue:nodeName==="script"&&dest.text!==src.text&&(dest.text=src.text),dest.removeAttribute(jQuery.expando))}function getAll(elem){return typeof elem.getElementsByTagName!="undefined"?elem.getElementsByTagName("*"):typeof elem.querySelectorAll!="undefined"?elem.querySelectorAll("*"):[]}function fixDefaultChecked(elem){rcheckableType.test(elem.type)&&(elem.defaultChecked=elem.checked)}function vendorPropName(style,name){if(name in style)return name;for(var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function isHidden(elem,el){return elem=el||elem,jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)}function showHide(elements,show){for(var elem,display,values=[],index=0,length=elements.length;index<length;index++)(elem=elements[index],elem.style)&&(values[index]=jQuery._data(elem,"olddisplay"),show?(values[index]||elem.style.display!=="none"||(elem.style.display=""),elem.style.display===""&&isHidden(elem)&&(values[index]=jQuery._data(elem,"olddisplay",css_defaultDisplay(elem.nodeName)))):(display=curCSS(elem,"display"),values[index]||display==="none"||jQuery._data(elem,"olddisplay",display)));for(index=0;index<length;index++)(elem=elements[index],elem.style)&&(show&&elem.style.display!=="none"&&elem.style.display!==""||(elem.style.display=show?values[index]||"":"none"));return elements}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox){for(var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;i<4;i+=2)extra==="margin"&&(val+=jQuery.css(elem,extra+cssExpand[i],!0)),isBorderBox?(extra==="content"&&(val-=parseFloat(curCSS(elem,"padding"+cssExpand[i]))||0),extra!=="margin"&&(val-=parseFloat(curCSS(elem,"border"+cssExpand[i]+"Width"))||0)):(val+=parseFloat(curCSS(elem,"padding"+cssExpand[i]))||0,extra!=="padding"&&(val+=parseFloat(curCSS(elem,"border"+cssExpand[i]+"Width"))||0));return val}function getWidthOrHeight(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,valueIsBorderBox=!0,isBorderBox=jQuery.support.boxSizing&&jQuery.css(elem,"boxSizing")==="border-box";if(val<=0||val==null){if(val=curCSS(elem,name),(val<0||val==null)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(jQuery.support.boxSizingReliable||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox)+"px"}function css_defaultDisplay(nodeName){if(elemdisplay[nodeName])return elemdisplay[nodeName];var elem=jQuery("<"+nodeName+">").appendTo(document.body),display=elem.css("display");return elem.remove(),(display==="none"||display==="")&&(iframe=document.body.appendChild(iframe||jQuery.extend(document.createElement("iframe"),{frameBorder:0,width:0,height:0})),iframeDoc&&iframe.createElement||(iframeDoc=(iframe.contentWindow||iframe.contentDocument).document,iframeDoc.write("<!doctype html><html><body>"),iframeDoc.close()),elem=iframeDoc.body.appendChild(iframeDoc.createElement(nodeName)),display=curCSS(elem,"display"),document.body.removeChild(iframe)),elemdisplay[nodeName]=display,display}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+(typeof v=="object"?i:"")+"]",v,traditional,add)});else if(traditional||jQuery.type(obj)!=="object")add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){typeof dataTypeExpression!="string"&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,list,placeBefore,dataTypes=dataTypeExpression.toLowerCase().split(core_rspace),i=0,length=dataTypes.length;if(jQuery.isFunction(func))for(;i<length;i++)dataType=dataTypes[i],placeBefore=/^\+/.test(dataType),placeBefore&&(dataType=dataType.substr(1)||"*"),list=structure[dataType]=structure[dataType]||[],list[placeBefore?"unshift":"push"](func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,dataType,inspected){dataType=dataType||options.dataTypes[0];inspected=inspected||{};inspected[dataType]=!0;for(var selection,list=structure[dataType],i=0,length=list?list.length:0,executeOnly=structure===prefilters;i<length&&(executeOnly||!selection);i++)selection=list[i](options,originalOptions,jqXHR),typeof selection=="string"&&(!executeOnly||inspected[selection]?selection=undefined:(options.dataTypes.unshift(selection),selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,selection,inspected)));return!executeOnly&&selection||inspected["*"]||(selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,"*",inspected)),selection}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)src[key]!==undefined&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);deep&&jQuery.extend(!0,target,deep)}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields;for(type in responseFields)type in responses&&(jqXHR[responseFields[type]]=responses[type]);while(dataTypes[0]==="*")dataTypes.shift(),ct===undefined&&(ct=s.mimeType||jqXHR.getResponseHeader("content-type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}if(finalDataType)return finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]}function ajaxConvert(s,response){var conv,conv2,current,tmp,dataTypes=s.dataTypes.slice(),prev=dataTypes[0],converters={},i=0;if(s.dataFilter&&(response=s.dataFilter(response,s.dataType)),dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(;current=dataTypes[++i];)if(current!=="*"){if(prev!=="*"&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]],conv)){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.splice(i--,0,current));break}if(conv!==!0)if(conv&&s.throws)response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}prev=current}return{state:"success",data:response}}function createStandardXHR(){try{return new window.XMLHttpRequest}catch(e){}}function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function createFxNow(){return setTimeout(function(){fxNow=undefined},0),fxNow=jQuery.now()}function createTweens(animation,props){jQuery.each(props,function(prop,value){for(var collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;index<length;index++)if(collection[index].call(animation,prop,value))return})}function Animation(elem,properties,options){var result,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),percent=1-(remaining/animation.duration||0),index=0,length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),percent<1&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){for(var index=0,length=gotoEnd?animation.tweens.length:0;index<length;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);index<length;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts),result)return result;return createTweens(animation,props),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{anim:animation,queue:animation.opts.queue,elem:elem})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function defaultPrefilter(elem,props,opts){var index,prop,value,length,dataShow,tween,hooks,oldfire,anim=this,style=elem.style,orig={},handled=[],hidden=elem.nodeType&&isHidden(elem);opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),hooks.unqueued==null&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--;jQuery.queue(elem,"fx").length||hooks.empty.fire()})}));elem.nodeType===1&&("height"in props||"width"in props)&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],jQuery.css(elem,"display")==="inline"&&jQuery.css(elem,"float")==="none"&&(jQuery.support.inlineBlockNeedsLayout&&css_defaultDisplay(elem.nodeName)!=="inline"?style.zoom=1:style.display="inline-block"));opts.overflow&&(style.overflow="hidden",jQuery.support.shrinkWrapBlocks||anim.done(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]}));for(index in props)if(value=props[index],rfxtypes.exec(value)){if(delete props[index],value===(hidden?"hide":"show"))continue;handled.push(index)}if(length=handled.length,length)for(dataShow=jQuery._data(elem,"fxshow")||jQuery._data(elem,"fxshow",{}),hidden?jQuery(elem).show():anim.done(function(){jQuery(elem).hide()}),anim.done(function(){var prop;jQuery.removeData(elem,"fxshow",!0);for(prop in orig)jQuery.style(elem,prop,orig[prop])}),index=0;index<length;index++)prop=handled[index],tween=anim.createTween(prop,hidden?dataShow[prop]:0),orig[prop]=dataShow[prop]||jQuery.style(elem,prop),prop in dataShow||(dataShow[prop]=tween.start,hidden&&(tween.end=tween.start,tween.start=prop==="width"||prop==="height"?1:0))}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function genFx(type,includeWidth){var which,attrs={height:type},i=0;for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:!1}var rootjQuery,readyList,document=window.document,location=window.location,navigator=window.navigator,_jQuery=window.jQuery,_$=window.$,core_push=Array.prototype.push,core_slice=Array.prototype.slice,core_indexOf=Array.prototype.indexOf,core_toString=Object.prototype.toString,core_hasOwn=Object.prototype.hasOwnProperty,core_trim=String.prototype.trim,jQuery=function(selector,context){return new jQuery.fn.init(selector,context,rootjQuery)},core_pnum=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,core_rnotwhite=/\S/,core_rspace=/\s+/,rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rquickExpr=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rvalidchars=/^[\],:{}\s]*$/,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rvalidescape=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,rvalidtokens=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return(letter+"").toUpperCase()},DOMContentLoaded=function(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",DOMContentLoaded,!1),jQuery.ready()):document.readyState==="complete"&&(document.detachEvent("onreadystatechange",DOMContentLoaded),jQuery.ready())},class2type={},optionsCache,rbrace,rmultiDash,xhrCallbacks,xhrOnUnloadAbort,xhrId,rroot;jQuery.fn=jQuery.prototype={constructor:jQuery,init:function(selector,context,rootjQuery){var match,elem,doc;if(!selector)return this;if(selector.nodeType)return this.context=this[0]=selector,this.length=1,this;if(typeof selector=="string"){if(match=selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),match&&(match[1]||!context)){if(match[1])return context=context instanceof jQuery?context[0]:context,doc=context&&context.nodeType?context.ownerDocument||context:document,selector=jQuery.parseHTML(match[1],doc,!0),rsingleTag.test(match[1])&&jQuery.isPlainObject(context)&&this.attr.call(selector,context,!0),jQuery.merge(this,selector);if(elem=document.getElementById(match[2]),elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1;this[0]=elem}return this.context=document,this.selector=selector,this}return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector)}return jQuery.isFunction(selector)?rootjQuery.ready(selector):(selector.selector!==undefined&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return core_slice.call(this)},get:function(num){return num==null?this.toArray():num<0?this[this.length+num]:this[num]},pushStack:function(elems,name,selector){var ret=jQuery.merge(this.constructor(),elems);return ret.prevObject=this,ret.context=this.context,name==="find"?ret.selector=this.selector+(this.selector?" ":"")+selector:name&&(ret.selector=this.selector+"."+name+"("+selector+")"),ret},each:function(callback,args){return jQuery.each(this,callback,args)},ready:function(fn){return jQuery.ready.promise().done(fn),this},eq:function(i){return i=+i,i===-1?this.slice(i):this.slice(i,i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(core_slice.apply(this,arguments),"slice",core_slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},end:function(){return this.prevObject||this.constructor(null)},push:core_push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;for(typeof target=="boolean"&&(deep=target,target=arguments[1]||{},i=2),typeof target=="object"||jQuery.isFunction(target)||(target={}),length===i&&(target=this,--i);i<length;i++)if((options=arguments[i])!=null)for(name in options)(src=target[name],copy=options[name],target!==copy)&&(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))?(copyIsArray?(copyIsArray=!1,clone=src&&jQuery.isArray(src)?src:[]):clone=src&&jQuery.isPlainObject(src)?src:{},target[name]=jQuery.extend(deep,clone,copy)):copy!==undefined&&(target[name]=copy));return target};jQuery.extend({noConflict:function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},isReady:!1,readyWait:1,holdReady:function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},ready:function(wait){if(wait===!0?!--jQuery.readyWait:!jQuery.isReady){if(!document.body)return setTimeout(jQuery.ready,1);(jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0)||(readyList.resolveWith(document,[jQuery]),jQuery.fn.trigger&&jQuery(document).trigger("ready").off("ready"))}},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray||function(obj){return jQuery.type(obj)==="array"},isWindow:function(obj){return obj!=null&&obj==obj.window},isNumeric:function(obj){return!isNaN(parseFloat(obj))&&isFinite(obj)},type:function(obj){return obj==null?String(obj):class2type[core_toString.call(obj)]||"object"},isPlainObject:function(obj){if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj))return!1;try{if(obj.constructor&&!core_hasOwn.call(obj,"constructor")&&!core_hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var key;for(key in obj);return key===undefined||core_hasOwn.call(obj,key)},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},error:function(msg){throw new Error(msg);},parseHTML:function(data,context,scripts){var parsed;return!data||typeof data!="string"?null:(typeof context=="boolean"&&(scripts=context,context=0),context=context||document,parsed=rsingleTag.exec(data))?[context.createElement(parsed[1])]:(parsed=jQuery.buildFragment([data],context,scripts?null:[]),jQuery.merge([],(parsed.cacheable?jQuery.clone(parsed.fragment):parsed.fragment).childNodes))},parseJSON:function(data){if(!data||typeof data!="string")return null;if(data=jQuery.trim(data),window.JSON&&window.JSON.parse)return window.JSON.parse(data);if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,"")))return new Function("return "+data)();jQuery.error("Invalid JSON: "+data)},parseXML:function(data){var xml,tmp;if(!data||typeof data!="string")return null;try{window.DOMParser?(tmp=new DOMParser,xml=tmp.parseFromString(data,"text/xml")):(xml=new ActiveXObject("Microsoft.XMLDOM"),xml.async="false",xml.loadXML(data))}catch(e){xml=undefined}return xml&&xml.documentElement&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml},noop:function(){},globalEval:function(data){data&&core_rnotwhite.test(data)&&(window.execScript||function(data){window.eval.call(window,data)})(data)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var name,i=0,length=obj.length,isObj=length===undefined||jQuery.isFunction(obj);if(args){if(isObj){for(name in obj)if(callback.apply(obj[name],args)===!1)break}else for(;i<length;)if(callback.apply(obj[i++],args)===!1)break}else if(isObj){for(name in obj)if(callback.call(obj[name],name,obj[name])===!1)break}else for(;i<length;)if(callback.call(obj[i],i,obj[i++])===!1)break;return obj},trim:core_trim&&!core_trim.call(" ")?function(text){return text==null?"":core_trim.call(text)}:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var type,ret=results||[];return arr!=null&&(type=jQuery.type(arr),arr.length==null||type==="string"||type==="function"||type==="regexp"||jQuery.isWindow(arr)?core_push.call(ret,arr):jQuery.merge(ret,arr)),ret},inArray:function(elem,arr,i){var len;if(arr){if(core_indexOf)return core_indexOf.call(arr,elem,i);for(len=arr.length,i=i?i<0?Math.max(0,len+i):i:0;i<len;i++)if(i in arr&&arr[i]===elem)return i}return-1},merge:function(first,second){var l=second.length,i=first.length,j=0;if(typeof l=="number")for(;j<l;j++)first[i++]=second[j];else while(second[j]!==undefined)first[i++]=second[j++];return first.length=i,first},grep:function(elems,callback,inv){var retVal,ret=[],i=0,length=elems.length;for(inv=!!inv;i<length;i++)retVal=!!callback(elems[i],i),inv!==retVal&&ret.push(elems[i]);return ret},map:function(elems,callback,arg){var value,key,ret=[],i=0,length=elems.length,isArray=elems instanceof jQuery||length!==undefined&&typeof length=="number"&&(length>0&&elems[0]&&elems[length-1]||length===0||jQuery.isArray(elems));if(isArray)for(;i<length;i++)value=callback(elems[i],i,arg),value!=null&&(ret[ret.length]=value);else for(key in elems)value=callback(elems[key],key,arg),value!=null&&(ret[ret.length]=value);return ret.concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;return(typeof context=="string"&&(tmp=fn[context],context=fn,fn=tmp),!jQuery.isFunction(fn))?undefined:(args=core_slice.call(arguments,2),proxy=function(){return fn.apply(context,args.concat(core_slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy)},access:function(elems,fn,key,value,chainable,emptyGet,pass){var exec,bulk=key==null,i=0,length=elems.length;if(key&&typeof key=="object"){for(i in key)jQuery.access(elems,fn,i,key[i],1,emptyGet,value);chainable=1}else if(value!==undefined){if(exec=pass===undefined&&jQuery.isFunction(value),bulk&&(exec?(exec=fn,fn=function(elem,key,value){return exec.call(jQuery(elem),value)}):(fn.call(elems,value),fn=null)),fn)for(;i<length;i++)fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);chainable=1}return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet},now:function(){return(new Date).getTime()}});jQuery.ready.promise=function(obj){if(!readyList)if(readyList=jQuery.Deferred(),document.readyState==="complete")setTimeout(jQuery.ready,1);else if(document.addEventListener)document.addEventListener("DOMContentLoaded",DOMContentLoaded,!1),window.addEventListener("load",jQuery.ready,!1);else{document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var top=!1;try{top=window.frameElement==null&&document.documentElement}catch(e){}top&&top.doScroll&&function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left")}catch(e){return setTimeout(doScrollCheck,50)}jQuery.ready()}}()}return readyList.promise(obj)};jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});rootjQuery=jQuery(document);optionsCache={};jQuery.Callbacks=function(options){options=typeof options=="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){for(memory=options.memory&&data,fired=!0,firingIndex=firingStart||0,firingStart=0,firingLength=list.length,firing=!0;list&&firingIndex<firingLength;firingIndex++)if(list[firingIndex].apply(data[0],data[1])===!1&&options.stopOnFalse){memory=!1;break}firing=!1;list&&(stack?stack.length&&fire(stack.shift()):memory?list=[]:self.disable())},self={add:function(){if(list){var start=list.length;(function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);type!=="function"||options.unique&&self.has(arg)?arg&&arg.length&&type!=="string"&&add(arg):list.push(arg)})})(arguments);firing?firingLength=list.length:memory&&(firingStart=start,fire(memory))}return this},remove:function(){return list&&jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),firing&&(index<=firingLength&&firingLength--,index<=firingIndex&&firingIndex--)}),this},has:function(fn){return jQuery.inArray(fn,list)>-1},empty:function(){return list=[],this},disable:function(){return list=stack=memory=undefined,this},disabled:function(){return!list},lock:function(){return stack=undefined,memory||self.disable(),this},locked:function(){return!stack},fireWith:function(context,args){return args=args||[],args=[context,args.slice?args.slice():args],list&&(!fired||stack)&&(firing?stack.push(args):fire(args)),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var action=tuple[0],fn=fns[i];deferred[tuple[1]](jQuery.isFunction(fn)?function(){var returned=fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify):newDefer[action+"With"](this===deferred?newDefer:this,[returned])}:newDefer[action])});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};return promise.pipe=promise.then,jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;stateString&&list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock);deferred[tuple[0]]=list.fire;deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(subordinate){var i=0,resolveValues=core_slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?core_slice.call(arguments):value;values===progressValues?deferred.notifyWith(contexts,values):--remaining||deferred.resolveWith(contexts,values)}},progressValues,progressContexts,resolveContexts;if(length>1)for(progressValues=new Array(length),progressContexts=new Array(length),resolveContexts=new Array(length);i<length;i++)resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)?resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues)):--remaining;return remaining||deferred.resolveWith(resolveContexts,resolveValues),deferred.promise()}});jQuery.support=function(){var support,all,a,select,opt,input,fragment,eventName,i,isSupported,clickFn,div=document.createElement("div");if(div.setAttribute("className","t"),div.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0],a.style.cssText="top:1px;float:left;opacity:.5",!all||!all.length)return{};select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.5/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:input.value==="on",optSelected:opt.selected,getSetAttribute:div.className!=="t",enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>",boxModel:document.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};input.checked=!0;support.noCloneChecked=input.cloneNode(!0).checked;select.disabled=!0;support.optDisabled=!opt.disabled;try{delete div.test}catch(e){support.deleteExpando=!1}if(!div.addEventListener&&div.attachEvent&&div.fireEvent&&(div.attachEvent("onclick",clickFn=function(){support.noCloneEvent=!1}),div.cloneNode(!0).fireEvent("onclick"),div.detachEvent("onclick",clickFn)),input=document.createElement("input"),input.value="t",input.setAttribute("type","radio"),support.radioValue=input.value==="t",input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),fragment=document.createDocumentFragment(),fragment.appendChild(div.lastChild),support.checkClone=fragment.cloneNode(!0).cloneNode(!0).lastChild.checked,support.appendChecked=input.checked,fragment.removeChild(input),fragment.appendChild(div),div.attachEvent)for(i in{submit:!0,change:!0,focusin:!0})eventName="on"+i,isSupported=eventName in div,isSupported||(div.setAttribute(eventName,"return;"),isSupported=typeof div[eventName]=="function"),support[i+"Bubbles"]=isSupported;return jQuery(function(){var container,div,tds,marginDiv,divReset="padding:0;margin:0;border:0;display:block;overflow:hidden;",body=document.getElementsByTagName("body")[0];body&&(container=document.createElement("div"),container.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",body.insertBefore(container,body.firstChild),div=document.createElement("div"),container.appendChild(div),div.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",tds=div.getElementsByTagName("td"),tds[0].style.cssText="padding:0;margin:0;border:0;display:none",isSupported=tds[0].offsetHeight===0,tds[0].style.display="",tds[1].style.display="none",support.reliableHiddenOffsets=isSupported&&tds[0].offsetHeight===0,div.innerHTML="",div.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",support.boxSizing=div.offsetWidth===4,support.doesNotIncludeMarginInBodyOffset=body.offsetTop!==1,window.getComputedStyle&&(support.pixelPosition=(window.getComputedStyle(div,null)||{}).top!=="1%",support.boxSizingReliable=(window.getComputedStyle(div,null)||{width:"4px"}).width==="4px",marginDiv=document.createElement("div"),marginDiv.style.cssText=div.style.cssText=divReset,marginDiv.style.marginRight=marginDiv.style.width="0",div.style.width="1px",div.appendChild(marginDiv),support.reliableMarginRight=!parseFloat((window.getComputedStyle(marginDiv,null)||{}).marginRight)),typeof div.style.zoom!="undefined"&&(div.innerHTML="",div.style.cssText=divReset+"width:1px;padding:1px;display:inline;zoom:1",support.inlineBlockNeedsLayout=div.offsetWidth===3,div.style.display="block",div.style.overflow="visible",div.innerHTML="<div><\/div>",div.firstChild.style.width="5px",support.shrinkWrapBlocks=div.offsetWidth!==3,container.style.zoom=1),body.removeChild(container),container=div=tds=marginDiv=null)}),fragment.removeChild(div),all=a=select=opt=input=fragment=div=null,support}();rbrace=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(jQuery.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(elem){return elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando],!!elem&&!isEmptyDataObject(elem)},data:function(elem,name,data,pvt){if(jQuery.acceptData(elem)){var thisCache,ret,internalKey=jQuery.expando,getByName=typeof name=="string",isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if(id&&cache[id]&&(pvt||cache[id].data)||!getByName||data!==undefined)return id||(isNode?elem[internalKey]=id=jQuery.deletedIds.pop()||jQuery.guid++:id=internalKey),cache[id]||(cache[id]={},isNode||(cache[id].toJSON=jQuery.noop)),(typeof name=="object"||typeof name=="function")&&(pvt?cache[id]=jQuery.extend(cache[id],name):cache[id].data=jQuery.extend(cache[id].data,name)),thisCache=cache[id],pvt||(thisCache.data||(thisCache.data={}),thisCache=thisCache.data),data!==undefined&&(thisCache[jQuery.camelCase(name)]=data),getByName?(ret=thisCache[name],ret==null&&(ret=thisCache[jQuery.camelCase(name)])):ret=thisCache,ret}},removeData:function(elem,name,pvt){if(jQuery.acceptData(elem)){var thisCache,i,l,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(cache[id]){if(name&&(thisCache=pvt?cache[id]:cache[id].data,thisCache)){for(jQuery.isArray(name)||(name in thisCache?name=[name]:(name=jQuery.camelCase(name),name=name in thisCache?[name]:name.split(" "))),i=0,l=name.length;i<l;i++)delete thisCache[name[i]];if(!(pvt?isEmptyDataObject:jQuery.isEmptyObject)(thisCache))return}(pvt||(delete cache[id].data,isEmptyDataObject(cache[id])))&&(isNode?jQuery.cleanData([elem],!0):jQuery.support.deleteExpando||cache!=cache.window?delete cache[id]:cache[id]=null)}}},_data:function(elem,name,data){return jQuery.data(elem,name,data,!0)},acceptData:function(elem){var noData=elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()];return!noData||noData!==!0&&elem.getAttribute("classid")===noData}});jQuery.fn.extend({data:function(key,value){var parts,part,attr,name,l,elem=this[0],i=0,data=null;if(key===undefined){if(this.length&&(data=jQuery.data(elem),elem.nodeType===1&&!jQuery._data(elem,"parsedAttrs"))){for(attr=elem.attributes,l=attr.length;i<l;i++)name=attr[i].name,name.indexOf("data-")||(name=jQuery.camelCase(name.substring(5)),dataAttr(elem,name,data[name]));jQuery._data(elem,"parsedAttrs",!0)}return data}return typeof key=="object"?this.each(function(){jQuery.data(this,key)}):(parts=key.split(".",2),parts[1]=parts[1]?"."+parts[1]:"",part=parts[1]+"!",jQuery.access(this,function(value){if(value===undefined)return data=this.triggerHandler("getData"+part,[parts[0]]),data===undefined&&elem&&(data=jQuery.data(elem,key),data=dataAttr(elem,key,data)),data===undefined&&parts[1]?this.data(parts[0]):data;parts[1]=value;this.each(function(){var self=jQuery(this);self.triggerHandler("setData"+part,parts);jQuery.data(this,key,value);self.triggerHandler("changeData"+part,parts)})},null,value,arguments.length>1,null,!1))},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=jQuery._data(elem,type),data&&(!queue||jQuery.isArray(data)?queue=jQuery._data(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};fn==="inprogress"&&(fn=queue.shift(),startLength--);fn&&(type==="fx"&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks));!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery.removeData(elem,type+"queue",!0);jQuery.removeData(elem,key,!0)})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;return(typeof type!="string"&&(data=type,type="fx",setter--),arguments.length<setter)?jQuery.queue(this[0],type):data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);type==="fx"&&queue[0]!=="inprogress"&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},delay:function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for(typeof type!="string"&&(obj=type,type=undefined),type=type||"fx";i--;)tmp=jQuery._data(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var nodeHook,boolHook,fixSpecified,rclass=/[\t\r\n]/g,rreturn=/\r/g,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,rclickable=/^a(?:rea|)$/i,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,getSetAttribute=jQuery.support.getSetAttribute;jQuery.fn.extend({attr:function(name,value){return jQuery.access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})},prop:function(name,value){return jQuery.access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=undefined;delete this[name]}catch(e){}})},addClass:function(value){var classNames,i,l,elem,setClass,c,cl;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(value&&typeof value=="string")for(classNames=value.split(core_rspace),i=0,l=this.length;i<l;i++)if(elem=this[i],elem.nodeType===1)if(elem.className||classNames.length!==1){for(setClass=" "+elem.className+" ",c=0,cl=classNames.length;c<cl;c++)setClass.indexOf(" "+classNames[c]+" ")<0&&(setClass+=classNames[c]+" ");elem.className=jQuery.trim(setClass)}else elem.className=value;return this},removeClass:function(value){var removes,className,elem,c,cl,i,l;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(value&&typeof value=="string"||value===undefined)for(removes=(value||"").split(core_rspace),i=0,l=this.length;i<l;i++)if(elem=this[i],elem.nodeType===1&&elem.className){for(className=(" "+elem.className+" ").replace(rclass," "),c=0,cl=removes.length;c<cl;c++)while(className.indexOf(" "+removes[c]+" ")>=0)className=className.replace(" "+removes[c]+" "," ");elem.className=value?jQuery.trim(className):""}return this},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal=="boolean";return jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}):this.each(function(){if(type==="string")for(var className,i=0,self=jQuery(this),state=stateVal,classNames=value.split(core_rspace);className=classNames[i++];)state=isBool?state:!self.hasClass(className),self[state?"addClass":"removeClass"](className);else(type==="undefined"||type==="boolean")&&(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;i<l;i++)if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;return!1},val:function(value){var hooks,ret,isFunction,elem=this[0];return arguments.length?(isFunction=jQuery.isFunction(value),this.each(function(i){var val,self=jQuery(this);this.nodeType===1&&(val=isFunction?value.call(this,i,self.val()):value,val==null?val="":typeof val=="number"?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return value==null?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&hooks.set(this,val,"value")!==undefined||(this.value=val))})):elem?(hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined)?ret:(ret=elem.value,typeof ret=="string"?ret.replace(rreturn,""):ret==null?"":ret):void 0}});jQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text}},select:{get:function(elem){var value,i,max,option,index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0)return null;for(i=one?index:0,max=one?index+1:options.length;i<max;i++)if(option=options[i],option.selected&&(jQuery.support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return one&&!values.length&&options.length?jQuery(options[index]).val():values},set:function(elem,value){var values=jQuery.makeArray(value);return jQuery(elem).find("option").each(function(){this.selected=jQuery.inArray(jQuery(this).val(),values)>=0}),values.length||(elem.selectedIndex=-1),values}}},attrFn:{},attr:function(elem,name,value,pass){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&nType!==3&&nType!==8&&nType!==2){if(pass&&jQuery.isFunction(jQuery.fn[name]))return jQuery(elem)[name](value);if(typeof elem.getAttribute=="undefined")return jQuery.prop(elem,name,value);if(notxml=nType!==1||!jQuery.isXMLDoc(elem),notxml&&(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook)),value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return}return hooks&&"set"in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem.setAttribute(name,value+""),value)}return hooks&&"get"in hooks&¬xml&&(ret=hooks.get(elem,name))!==null?ret:(ret=elem.getAttribute(name),ret===null?undefined:ret)}},removeAttr:function(elem,value){var propName,attrNames,name,isBool,i=0;if(value&&elem.nodeType===1)for(attrNames=value.split(core_rspace);i<attrNames.length;i++)name=attrNames[i],name&&(propName=jQuery.propFix[name]||name,isBool=rboolean.test(name),isBool||jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName),isBool&&propName in elem&&(elem[propName]=!1))},attrHooks:{type:{set:function(elem,value){if(rtype.test(elem.nodeName)&&elem.parentNode)jQuery.error("type property can't be changed");else if(!jQuery.support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}},value:{get:function(elem,name){return nodeHook&&jQuery.nodeName(elem,"button")?nodeHook.get(elem,name):name in elem?elem.value:null},set:function(elem,value,name){if(nodeHook&&jQuery.nodeName(elem,"button"))return nodeHook.set(elem,value,name);elem.value=value}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&nType!==3&&nType!==8&&nType!==2)return notxml=nType!==1||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),value!==undefined?hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value:hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined}}}});boolHook={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===!0||typeof property!="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==!1?name.toLowerCase():undefined},set:function(elem,value,name){var propName;return value===!1?jQuery.removeAttr(elem,name):(propName=jQuery.propFix[name]||name,propName in elem&&(elem[propName]=!0),elem.setAttribute(name,name.toLowerCase())),name}};getSetAttribute||(fixSpecified={name:!0,id:!0,coords:!0},nodeHook=jQuery.valHooks.button={get:function(elem,name){var ret;return ret=elem.getAttributeNode(name),ret&&(fixSpecified[name]?ret.value!=="":ret.specified)?ret.value:undefined},set:function(elem,value,name){var ret=elem.getAttributeNode(name);return ret||(ret=document.createAttribute(name),elem.setAttributeNode(ret)),ret.value=value+""}},jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{set:function(elem,value){if(value==="")return elem.setAttribute(name,"auto"),value}})}),jQuery.attrHooks.contenteditable={get:nodeHook.get,set:function(elem,value,name){value===""&&(value="false");nodeHook.set(elem,value,name)}});jQuery.support.hrefNormalized||jQuery.each(["href","src","width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{get:function(elem){var ret=elem.getAttribute(name,2);return ret===null?undefined:ret}})});jQuery.support.style||(jQuery.attrHooks.style={get:function(elem){return elem.style.cssText.toLowerCase()||undefined},set:function(elem,value){return elem.style.cssText=value+""}});jQuery.support.optSelected||(jQuery.propHooks.selected=jQuery.extend(jQuery.propHooks.selected,{get:function(elem){var parent=elem.parentNode;return parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex),null}}));jQuery.support.enctype||(jQuery.propFix.enctype="encoding");jQuery.support.checkOn||jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={get:function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]=jQuery.extend(jQuery.valHooks[this],{set:function(elem,value){if(jQuery.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}})});var rformElems=/^(?:textarea|input|select)$/i,rtypenamespace=/^([^\.]*|)(?:\.(.+)|)$/,rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,hoverHack=function(events){return jQuery.event.special.hover?events:events.replace(rhoverHack,"mouseenter$1 mouseleave$1")};jQuery.event={add:function(elem,types,handler,data,selector){var elemData,eventHandle,events,t,tns,type,namespaces,handleObj,handleObjIn,handlers,special;if(elem.nodeType!==3&&elem.nodeType!==8&&types&&handler&&(elemData=jQuery._data(elem))){for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),handler.guid||(handler.guid=jQuery.guid++),events=elemData.events,events||(elemData.events=events={}),eventHandle=elemData.handle,eventHandle||(elemData.handle=eventHandle=function(e){return typeof jQuery!="undefined"&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined},eventHandle.elem=elem),types=jQuery.trim(hoverHack(types)).split(" "),t=0;t<types.length;t++)tns=rtypenamespace.exec(types[t])||[],type=tns[1],namespaces=(tns[2]||"").split(".").sort(),special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:tns[1],data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),handlers=events[type],handlers||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||(elem.addEventListener?elem.addEventListener(type,eventHandle,!1):elem.attachEvent&&elem.attachEvent("on"+type,eventHandle))),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0;elem=null}},global:{},remove:function(elem,types,handler,selector,mappedTypes){var t,tns,type,origType,namespaces,origCount,j,events,special,eventType,handleObj,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(elemData&&(events=elemData.events)){for(types=jQuery.trim(hoverHack(types||"")).split(" "),t=0;t<types.length;t++){if(tns=rtypenamespace.exec(types[t])||[],type=origType=tns[1],namespaces=tns[2],!type){for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);continue}for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,eventType=events[type]||[],origCount=eventType.length,namespaces=namespaces?new RegExp("(^|\\.)"+namespaces.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,j=0;j<eventType.length;j++)handleObj=eventType[j],(mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!namespaces||namespaces.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)&&(eventType.splice(j--,1),handleObj.selector&&eventType.delegateCount--,special.remove&&special.remove.call(elem,handleObj));eventType.length===0&&origCount!==eventType.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}jQuery.isEmptyObject(events)&&(delete elemData.handle,jQuery.removeData(elem,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(event,data,elem,onlyHandlers){if(!elem||elem.nodeType!==3&&elem.nodeType!==8){var cache,exclusive,i,cur,old,ontype,special,handle,eventPath,bubbleType,type=event.type||event,namespaces=[];if(!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf("!")>=0&&(type=type.slice(0,-1),exclusive=!0),type.indexOf(".")>=0&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),elem&&!jQuery.event.customEvent[type]||jQuery.event.global[type])){if(event=typeof event=="object"?event[jQuery.expando]?event:new jQuery.Event(type,event):new jQuery.Event(type),event.type=type,event.isTrigger=!0,event.exclusive=exclusive,event.namespace=namespaces.join("."),event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,ontype=type.indexOf(":")<0?"on"+type:"",!elem){cache=jQuery.cache;for(i in cache)cache[i].events&&cache[i].events[type]&&jQuery.event.trigger(event,data,cache[i].handle.elem,!0);return}if(event.result=undefined,event.target||(event.target=elem),data=data!=null?jQuery.makeArray(data):[],data.unshift(event),special=jQuery.event.special[type]||{},!special.trigger||special.trigger.apply(elem,data)!==!1){if(eventPath=[[elem,special.bindType||type]],!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,cur=rfocusMorph.test(bubbleType+type)?elem:elem.parentNode,old=elem;cur;cur=cur.parentNode)eventPath.push([cur,bubbleType]),old=cur;old===(elem.ownerDocument||document)&&eventPath.push([old.defaultView||old.parentWindow||window,bubbleType])}for(i=0;i<eventPath.length&&!event.isPropagationStopped();i++)cur=eventPath[i][0],event.type=eventPath[i][1],handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&jQuery.acceptData(cur)&&handle.apply&&handle.apply(cur,data)===!1&&event.preventDefault();return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&special._default.apply(elem.ownerDocument,data)!==!1||type==="click"&&jQuery.nodeName(elem,"a")||!jQuery.acceptData(elem)||ontype&&elem[type]&&(type!=="focus"&&type!=="blur"||event.target.offsetWidth!==0)&&!jQuery.isWindow(elem)&&(old=elem[ontype],old&&(elem[ontype]=null),jQuery.event.triggered=type,elem[type](),jQuery.event.triggered=undefined,old&&(elem[ontype]=old)),event.result}}}},dispatch:function(event){event=jQuery.event.fix(event||window.event);var i,j,cur,ret,selMatch,matched,matches,handleObj,sel,handlers=(jQuery._data(this,"events")||{})[event.type]||[],delegateCount=handlers.delegateCount,args=core_slice.call(arguments),run_all=!event.exclusive&&!event.namespace,special=jQuery.event.special[event.type]||{},handlerQueue=[];if(args[0]=event,event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){if(delegateCount&&!(event.button&&event.type==="click"))for(cur=event.target;cur!=this;cur=cur.parentNode||this)if(cur.disabled!==!0||event.type!=="click"){for(selMatch={},matches=[],i=0;i<delegateCount;i++)handleObj=handlers[i],sel=handleObj.selector,selMatch[sel]===undefined&&(selMatch[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length),selMatch[sel]&&matches.push(handleObj);matches.length&&handlerQueue.push({elem:cur,matches:matches})}for(handlers.length>delegateCount&&handlerQueue.push({elem:this,matches:handlers.slice(delegateCount)}),i=0;i<handlerQueue.length&&!event.isPropagationStopped();i++)for(matched=handlerQueue[i],event.currentTarget=matched.elem,j=0;j<matched.matches.length&&!event.isImmediatePropagationStopped();j++)handleObj=matched.matches[j],(run_all||!event.namespace&&!handleObj.namespace||event.namespace_re&&event.namespace_re.test(handleObj.namespace))&&(event.data=handleObj.data,event.handleObj=handleObj,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),ret!==undefined&&(event.result=ret,ret===!1&&(event.preventDefault(),event.stopPropagation())));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){return event.which==null&&(event.which=original.charCode!=null?original.charCode:original.keyCode),event}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button,fromElement=original.fromElement;return event.pageX==null&&original.clientX!=null&&(eventDoc=event.target.ownerDocument||document,doc=eventDoc.documentElement,body=eventDoc.body,event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)),!event.relatedTarget&&fromElement&&(event.relatedTarget=fromElement===event.target?original.toElement:fromElement),event.which||button===undefined||(event.which=button&1?1:button&2?3:button&4?2:0),event}},fix:function(event){if(event[jQuery.expando])return event;var i,prop,originalEvent=event,fixHook=jQuery.event.fixHooks[event.type]||{},copy=fixHook.props?this.props.concat(fixHook.props):this.props;for(event=jQuery.Event(originalEvent),i=copy.length;i;)prop=copy[--i],event[prop]=originalEvent[prop];return event.target||(event.target=originalEvent.srcElement||document),event.target.nodeType===3&&(event.target=event.target.parentNode),event.metaKey=!!event.metaKey,fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(data,namespaces,eventHandle){jQuery.isWindow(this)&&(this.onbeforeunload=eventHandle)},teardown:function(namespaces,eventHandle){this.onbeforeunload===eventHandle&&(this.onbeforeunload=null)}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0,originalEvent:{}});bubble?jQuery.event.trigger(e,null,elem):jQuery.event.dispatch.call(elem,e);e.isDefaultPrevented()&&event.preventDefault()}};jQuery.event.handle=jQuery.event.dispatch;jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle,!1)}:function(elem,type,handle){var name="on"+type;elem.detachEvent&&(typeof elem[name]=="undefined"&&(elem[name]=null),elem.detachEvent(name,handle))};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event))return new jQuery.Event(src,props);src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||src.returnValue===!1||src.getPreventDefault&&src.getPreventDefault()?returnTrue:returnFalse):this.type=src;props&&jQuery.extend(this,props);this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=!0};jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj,selector=handleObj.selector;return related&&(related===target||jQuery.contains(target,related))||(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}});jQuery.support.submitBubbles||(jQuery.event.special.submit={setup:function(){if(jQuery.nodeName(this,"form"))return!1;jQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=jQuery.nodeName(elem,"input")||jQuery.nodeName(elem,"button")?elem.form:undefined;form&&!jQuery._data(form,"_submit_attached")&&(jQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=!0}),jQuery._data(form,"_submit_attached",!0))})},postDispatch:function(event){event._submit_bubble&&(delete event._submit_bubble,this.parentNode&&!event.isTrigger&&jQuery.event.simulate("submit",this.parentNode,event,!0))},teardown:function(){if(jQuery.nodeName(this,"form"))return!1;jQuery.event.remove(this,"._submit")}});jQuery.support.changeBubbles||(jQuery.event.special.change={setup:function(){if(rformElems.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(jQuery.event.add(this,"propertychange._change",function(event){event.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),jQuery.event.add(this,"click._change",function(event){this._just_changed&&!event.isTrigger&&(this._just_changed=!1);jQuery.event.simulate("change",this,event,!0)})),!1;jQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;rformElems.test(elem.nodeName)&&!jQuery._data(elem,"_change_attached")&&(jQuery.event.add(elem,"change._change",function(event){!this.parentNode||event.isSimulated||event.isTrigger||jQuery.event.simulate("change",this.parentNode,event,!0)}),jQuery._data(elem,"_change_attached",!0))})},handle:function(event){var elem=event.target;if(this!==elem||event.isSimulated||event.isTrigger||elem.type!=="radio"&&elem.type!=="checkbox")return event.handleObj.handler.apply(this,arguments)},teardown:function(){return jQuery.event.remove(this,"._change"),!rformElems.test(this.nodeName)}});jQuery.support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var attaches=0,handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),!0)};jQuery.event.special[fix]={setup:function(){attaches++==0&&document.addEventListener(orig,handler,!0)},teardown:function(){--attaches==0&&document.removeEventListener(orig,handler,!0)}}});jQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if(typeof types=="object"){typeof selector!="string"&&(data=data||selector,selector=undefined);for(type in types)this.on(type,selector,data,types[type],one);return this}if(data==null&&fn==null?(fn=selector,data=selector=undefined):fn==null&&(typeof selector=="string"?(fn=data,data=undefined):(fn=data,data=selector,selector=undefined)),fn===!1)fn=returnFalse;else if(!fn)return this;return one===1&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if(typeof types=="object"){for(type in types)this.off(type,selector,types[type]);return this}return(selector===!1||typeof selector=="function")&&(fn=selector,selector=undefined),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},live:function(types,data,fn){jQuery(this.context).on(types,this.selector,data,fn);return this},die:function(types,fn){return jQuery(this.context).off(types,this.selector||"**",fn),this},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0])return jQuery.event.trigger(type,data,this[0],!0)},toggle:function(fn){var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;return jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1),event.preventDefault(),args[lastToggle].apply(this,arguments)||!1};for(toggler.guid=guid;i<args.length;)args[i++].guid=guid;return this.click(toggler)},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}});jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return fn==null&&(fn=data,data=null),arguments.length>0?this.on(name,null,data,fn):this.trigger(name)};rkeyEvent.test(name)&&(jQuery.event.fixHooks[name]=jQuery.event.keyHooks);rmouseEvent.test(name)&&(jQuery.event.fixHooks[name]=jQuery.event.mouseHooks)}); /*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ (function(window,undefined){function Sizzle(selector,context,results,seed){results=results||[];context=context||document;var match,elem,xml,m,nodeType=context.nodeType;if(!selector||typeof selector!="string")return results;if(nodeType!==1&&nodeType!==9)return[];if(xml=isXML(context),!xml&&!seed&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(nodeType===9)if(elem=context.getElementById(m),elem&&elem.parentNode){if(elem.id===m)return results.push(elem),results}else return results;else if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,slice.call(context.getElementsByTagName(selector),0)),results;if((m=match[3])&&assertUsableClassName&&context.getElementsByClassName)return push.apply(results,slice.call(context.getElementsByClassName(m),0)),results}return select(selector.replace(rtrim,"$1"),context,results,seed,xml)}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function siblingCheck(a,b,ret){if(a===b)return ret;for(var cur=a.nextSibling;cur;){if(cur===b)return-1;cur=cur.nextSibling}return 1}function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[expando][selector];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){(!matched||(match=rcomma.exec(soFar)))&&(match&&(soFar=soFar.slice(match[0].length)),groups.push(tokens=[]));matched=!1;(match=rcombinators.exec(soFar))&&(tokens.push(matched=new Token(match.shift())),soFar=soFar.slice(matched.length),matched.type=match[0].replace(rtrim," "));for(type in Expr.filter)(match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match,document,!0)))&&(tokens.push(matched=new Token(match.shift())),soFar=soFar.slice(matched.length),matched.type=type,matched.matches=match);if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&combinator.dir==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir])if(checkNonElements||elem.nodeType===1)return matcher(elem,context,xml)}:function(elem,context,xml){if(xml){while(elem=elem[dir])if((checkNonElements||elem.nodeType===1)&&matcher(elem,context,xml))return elem}else for(var cache,dirkey=dirruns+" "+doneName+" ",cachedkey=dirkey+cachedruns;elem=elem[dir];)if(checkNonElements||elem.nodeType===1){if((cache=elem[expando])===cachedkey)return elem.sizset;if(typeof cache=="string"&&cache.indexOf(dirkey)===0){if(elem.sizset)return elem}else{if(elem[expando]=cachedkey,matcher(elem,context,xml))return elem.sizset=!0,elem;elem.sizset=!1}}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;i<len;i++)(elem=unmatched[i])&&(!filter||filter(elem,context,xml))&&(newUnmatched.push(elem),mapped&&map.push(i));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){if(!seed||!postFinder){var i,elem,postFilterIn,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[],seed),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(postFilterIn=condense(matcherOut,postMap),postFilter(postFilterIn,[],context,xml),i=postFilterIn.length;i--;)(elem=postFilterIn[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed)for(i=preFilter&&matcherOut.length;i--;)(elem=matcherOut[i])&&(seed[preMap[i]]=!(results[preMap[i]]=elem));else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)}})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){return!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];i<len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;j<len;j++)if(Expr.relative[tokens[j].type])break;return setMatcher(i>1&&elementMatcher(matchers),i>1&&tokens.slice(0,i-1).join("").replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&tokens.join(""))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,expandContext){var elem,j,matcher,setMatched=[],matchedCount=0,i="0",unmatched=seed&&[],outermost=expandContext!=null,contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",expandContext&&context.parentNode||context),dirrunsUnique=dirruns+=contextBackup==null?1:Math.E;for(outermost&&(outermostContext=context!==document&&context,cachedruns=superMatcher.el);(elem=elems[i])!=null;i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j];j++)if(matcher(elem,context,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique,cachedruns=++superMatcher.el)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j];j++)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)while(i--)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched);outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return superMatcher.el=0,bySet?markFunction(superMatcher):superMatcher}function multipleContexts(selector,contexts,results,seed){for(var i=0,len=contexts.length;i<len;i++)Sizzle(selector,contexts[i],results,seed);return results}function select(selector,context,results,seed,xml){var i,tokens,token,type,find,match=tokenize(selector),j=match.length;if(!seed&&match.length===1){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&!xml&&Expr.relative[tokens[1].type]){if(context=Expr.find.ID(token.matches[0].replace(rbackslash,""),context,xml)[0],!context)return results;selector=selector.slice(tokens.shift().length)}for(i=matchExpr.POS.test(selector)?-1:tokens.length-1;i>=0;i--){if(token=tokens[i],Expr.relative[type=token.type])break;if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(rbackslash,""),rsibling.test(tokens[0].type)&&context.parentNode||context,xml))){if(tokens.splice(i,1),selector=seed.length&&tokens.join(""),!selector)return push.apply(results,slice.call(seed,0)),results;break}}}return compile(selector,match)(seed,context,xml,results,rsibling.test(selector)),results}function setFilters(){}var cachedruns,assertGetIdNotName,Expr,getText,isXML,contains,compile,sortOrder,hasDuplicate,outermostContext,baseHasDuplicate=!0,strundefined="undefined",expando=("sizcache"+Math.random()).replace(".",""),Token=String,document=window.document,docElem=document.documentElement,dirruns=0,done=0,pop=[].pop,push=[].push,slice=[].slice,indexOf=[].indexOf||function(elem){for(var i=0,len=this.length;i<len;i++)if(this[i]===elem)return i;return-1},markFunction=function(fn,value){return fn[expando]=value==null||value,fn},createCache=function(){var cache={},keys=[];return markFunction(function(key,value){return keys.push(key)>Expr.cacheLength&&delete cache[keys.shift()],cache[key]=value},cache)},classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")"+whitespace+"*(?:([*^$|!~]?=)"+whitespace+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+identifier+")|)|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+attributes+")|[^:]|\\\\.)*|.*))\\)|)",pos=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([\\x20\\t\\r\\n\\f>+~])"+whitespace+"*"),rpseudo=new RegExp(pseudos),rquickExpr=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,rsibling=/[\x20\t\r\n\f]*[+~]/,rheader=/h\d/i,rinputs=/input|select|textarea|button/i,rbackslash=/\\(?!\\)/g,matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),NAME:new RegExp("^\\[name=['\"]?("+characterEncoding+")['\"]?\\]"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),POS:new RegExp(pos,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|"+pos,"i")},assert=function(fn){var div=document.createElement("div");try{return fn(div)}catch(e){return!1}finally{div=null}},assertTagNameNoComments=assert(function(div){return div.appendChild(document.createComment("")),!div.getElementsByTagName("*").length}),assertHrefNotNormalized=assert(function(div){return div.innerHTML="<a href='#'><\/a>",div.firstChild&&typeof div.firstChild.getAttribute!==strundefined&&div.firstChild.getAttribute("href")==="#"}),assertAttributes=assert(function(div){div.innerHTML="<select><\/select>";var type=typeof div.lastChild.getAttribute("multiple");return type!=="boolean"&&type!=="string"}),assertUsableClassName=assert(function(div){return(div.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",!div.getElementsByClassName||!div.getElementsByClassName("e").length)?!1:(div.lastChild.className="e",div.getElementsByClassName("e").length===2)}),assertUsableName=assert(function(div){div.id=expando+0;div.innerHTML="<a name='"+expando+"'><\/a><div name='"+expando+"'><\/div>";docElem.insertBefore(div,docElem.firstChild);var pass=document.getElementsByName&&document.getElementsByName(expando).length===2+document.getElementsByName(expando+0).length;return assertGetIdNotName=!document.getElementById(expando),docElem.removeChild(div),pass});try{slice.call(docElem.childNodes,0)[0].nodeType}catch(e){slice=function(i){for(var elem,results=[];elem=this[i];i++)results.push(elem);return results}}Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){return Sizzle(expr,null,null,[elem]).length>0};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent=="string")return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(nodeType===3||nodeType===4)return elem.nodeValue}else for(;node=elem[i];i++)ret+=getText(node);return ret};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":!1};contains=Sizzle.contains=docElem.contains?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&adown.contains&&adown.contains(bup))}:docElem.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1};Sizzle.attr=function(elem,name){var val,xml=isXML(elem);return(xml||(name=name.toLowerCase()),val=Expr.attrHandle[name])?val(elem):xml||assertAttributes?elem.getAttribute(name):(val=elem.getAttributeNode(name),val?typeof elem[name]=="boolean"?elem[name]?name:null:val.specified?val.value:null:null)};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:assertHrefNotNormalized?{}:{href:function(elem){return elem.getAttribute("href",2)},type:function(elem){return elem.getAttribute("type")}},find:{ID:assertGetIdNotName?function(id,context,xml){if(typeof context.getElementById!==strundefined&&!xml){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}}:function(id,context,xml){if(typeof context.getElementById!==strundefined&&!xml){var m=context.getElementById(id);return m?m.id===id||typeof m.getAttributeNode!==strundefined&&m.getAttributeNode("id").value===id?[m]:undefined:[]}},TAG:assertTagNameNoComments?function(tag,context){if(typeof context.getElementsByTagName!==strundefined)return context.getElementsByTagName(tag)}:function(tag,context){var results=context.getElementsByTagName(tag),elem,tmp,i;if(tag==="*"){for(tmp=[],i=0;elem=results[i];i++)elem.nodeType===1&&tmp.push(elem);return tmp}return results},NAME:assertUsableName&&function(tag,context){if(typeof context.getElementsByName!==strundefined)return context.getElementsByName(name)},CLASS:assertUsableClassName&&function(className,context,xml){if(typeof context.getElementsByClassName!==strundefined&&!xml)return context.getElementsByClassName(className)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(rbackslash,""),match[3]=(match[4]||match[5]||"").replace(rbackslash,""),match[2]==="~="&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),match[1]==="nth"?(match[2]||Sizzle.error(match[0]),match[3]=+(match[3]?match[4]+(match[5]||1):2*(match[2]==="even"||match[2]==="odd")),match[4]=+(match[6]+match[7]||match[2]==="odd")):match[2]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var unquoted,excess;return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[3]:(unquoted=match[4])&&(rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(unquoted=unquoted.slice(0,excess),match[0]=match[0].slice(0,excess)),match[2]=unquoted),match.slice(0,3))}},filter:{ID:assertGetIdNotName?function(id){return id=id.replace(rbackslash,""),function(elem){return elem.getAttribute("id")===id}}:function(id){return id=id.replace(rbackslash,""),function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===id}},TAG:function(nodeName){return nodeName==="*"?function(){return!0}:(nodeName=nodeName.replace(rbackslash,"").toLowerCase(),function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName})},CLASS:function(className){var pattern=classCache[expando][className];return pattern||(pattern=classCache(className,new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))),function(elem){return pattern.test(elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")}},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return result==null?operator==="!=":operator?(result+="",operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.substr(result.length-check.length)===check:operator==="~="?(" "+result+" ").indexOf(check)>-1:operator==="|="?result===check||result.substr(0,check.length+1)===check+"-":!1):!0}},CHILD:function(type,argument,first,last){return type==="nth"?function(elem){var node,diff,parent=elem.parentNode;if(first===1&&last===0)return!0;if(parent)for(diff=0,node=parent.firstChild;node;node=node.nextSibling)if(node.nodeType===1&&(diff++,elem===node))break;return diff-=last,diff===first||diff%first==0&&diff/first>=0}:function(elem){var node=elem;switch(type){case"only":case"first":while(node=node.previousSibling)if(node.nodeType===1)return!1;if(type==="first")return!0;node=elem;case"last":while(node=node.nextSibling)if(node.nodeType===1)return!1;return!0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf.call(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),enabled:function(elem){return elem.disabled===!1},disabled:function(elem){return elem.disabled===!0},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},parent:function(elem){return!Expr.pseudos.empty(elem)},empty:function(elem){var nodeType;for(elem=elem.firstChild;elem;){if(elem.nodeName>"@"||(nodeType=elem.nodeType)===3||nodeType===4)return!1;elem=elem.nextSibling}return!0},header:function(elem){return rheader.test(elem.nodeName)},text:function(elem){var type,attr;return elem.nodeName.toLowerCase()==="input"&&(type=elem.type)==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()===type)},radio:createInputPseudo("radio"),checkbox:createInputPseudo("checkbox"),file:createInputPseudo("file"),password:createInputPseudo("password"),image:createInputPseudo("image"),submit:createButtonPseudo("submit"),reset:createButtonPseudo("reset"),button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},input:function(elem){return rinputs.test(elem.nodeName)},focus:function(elem){var doc=elem.ownerDocument;return elem===doc.activeElement&&(!doc.hasFocus||doc.hasFocus())&&!!(elem.type||elem.href)},active:function(elem){return elem===elem.ownerDocument.activeElement},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}};sortOrder=docElem.compareDocumentPosition?function(a,b){return a===b?(hasDuplicate=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){var i;if(a===b)return hasDuplicate=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var al,bl,ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup;if(aup===bup)return siblingCheck(a,b);if(aup){if(!bup)return 1}else return-1;while(cur)ap.unshift(cur),cur=cur.parentNode;for(cur=bup;cur;)bp.unshift(cur),cur=cur.parentNode;for(al=ap.length,bl=bp.length,i=0;i<al&&i<bl;i++)if(ap[i]!==bp[i])return siblingCheck(ap[i],bp[i]);return i===al?siblingCheck(a,bp[i],-1):siblingCheck(ap[i],b,1)};[0,0].sort(sortOrder);baseHasDuplicate=!hasDuplicate;Sizzle.uniqueSort=function(results){var elem,i=1;if(hasDuplicate=baseHasDuplicate,results.sort(sortOrder),hasDuplicate)for(;elem=results[i];i++)elem===results[i-1]&&results.splice(i--,1);return results};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};compile=Sizzle.compile=function(selector,group){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[expando][selector];if(!cached){for(group||(group=tokenize(selector)),i=group.length;i--;)cached=matcherFromTokens(group[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers))}return cached};document.querySelectorAll&&function(){var disconnectedMatch,oldSelect=select,rescape=/'|\\/g,rattributeQuotes=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,rbuggyQSA=[":focus"],rbuggyMatches=[":active",":focus"],matches=docElem.matchesSelector||docElem.mozMatchesSelector||docElem.webkitMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector;assert(function(div){div.innerHTML="<select><option selected=''><\/option><\/select>";div.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");div.querySelectorAll(":checked").length||rbuggyQSA.push(":checked")});assert(function(div){div.innerHTML="<p test=''><\/p>";div.querySelectorAll("[test^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:\"\"|'')");div.innerHTML="<input type='hidden'/>";div.querySelectorAll(":enabled").length||rbuggyQSA.push(":enabled",":disabled")});rbuggyQSA=new RegExp(rbuggyQSA.join("|"));select=function(selector,context,results,seed,xml){if(!seed&&!xml&&(!rbuggyQSA||!rbuggyQSA.test(selector))){var groups,i,old=!0,nid=expando,newContext=context,newSelector=context.nodeType===9&&selector;if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){for(groups=tokenize(selector),(old=context.getAttribute("id"))?nid=old.replace(rescape,"\\$&"):context.setAttribute("id",nid),nid="[id='"+nid+"'] ",i=groups.length;i--;)groups[i]=nid+groups[i].join("");newContext=rsibling.test(selector)&&context.parentNode||context;newSelector=groups.join(",")}if(newSelector)try{return push.apply(results,slice.call(newContext.querySelectorAll(newSelector),0)),results}catch(qsaError){}finally{old||context.removeAttribute("id")}}return oldSelect(selector,context,results,seed,xml)};matches&&(assert(function(div){disconnectedMatch=matches.call(div,"div");try{matches.call(div,"[test!='']:sizzle");rbuggyMatches.push("!=",pseudos)}catch(e){}}),rbuggyMatches=new RegExp(rbuggyMatches.join("|")),Sizzle.matchesSelector=function(elem,expr){if(expr=expr.replace(rattributeQuotes,"='$1']"),!isXML(elem)&&!rbuggyMatches.test(expr)&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||disconnectedMatch||elem.document&&elem.document.nodeType!==11)return ret}catch(e){}return Sizzle(expr,null,null,[elem]).length>0})}();Expr.pseudos.nth=Expr.pseudos.eq;Expr.filters=setFilters.prototype=Expr.pseudos;Expr.setFilters=new setFilters;Sizzle.attr=jQuery.attr;jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains})(window);var runtil=/Until$/,rparentsprev=/^(?:parents|prev(?:Until|All))/,isSimple=/^.[^:#\[\.,]*$/,rneedsContext=jQuery.expr.match.needsContext,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.fn.extend({find:function(selector){var i,l,length,n,r,ret,self=this;if(typeof selector!="string")return jQuery(selector).filter(function(){for(i=0,l=self.length;i<l;i++)if(jQuery.contains(self[i],this))return!0});for(ret=this.pushStack("","find",selector),i=0,l=this.length;i<l;i++)if(length=ret.length,jQuery.find(selector,this[i],ret),i>0)for(n=length;n<ret.length;n++)for(r=0;r<length;r++)if(ret[r]===ret[n]){ret.splice(n--,1);break}return ret},has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i<len;i++)if(jQuery.contains(this,targets[i]))return!0})},not:function(selector){return this.pushStack(winnow(this,selector,!1),"not",selector)},filter:function(selector){return this.pushStack(winnow(this,selector,!0),"filter",selector)},is:function(selector){return!!selector&&(typeof selector=="string"?rneedsContext.test(selector)?jQuery(selector,this.context).index(this[0])>=0:jQuery.filter(selector,this).length>0:this.filter(selector).length>0)},closest:function(selectors,context){for(var cur,i=0,l=this.length,ret=[],pos=rneedsContext.test(selectors)||typeof selectors!="string"?jQuery(selectors,context||this.context):0;i<l;i++)for(cur=this[i];cur&&cur.ownerDocument&&cur!==context&&cur.nodeType!==11;){if(pos?pos.index(cur)>-1:jQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break}cur=cur.parentNode}return ret=ret.length>1?jQuery.unique(ret):ret,this.pushStack(ret,"closest",selectors)},index:function(elem){return elem?typeof elem=="string"?jQuery.inArray(this[0],jQuery(elem)):jQuery.inArray(elem.jquery?elem[0]:elem,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(selector,context){var set=typeof selector=="string"?jQuery(selector,context):jQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=jQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});jQuery.fn.andSelf=jQuery.fn.addBack;jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);return runtil.test(name)||(selector=until),selector&&typeof selector=="string"&&(ret=jQuery.filter(selector,ret)),ret=this.length>1&&!guaranteedUnique[name]?jQuery.unique(ret):ret,this.length>1&&rparentsprev.test(name)&&(ret=ret.reverse()),this.pushStack(ret,name,core_slice.call(arguments).join(","))}});jQuery.extend({filter:function(expr,elems,not){return not&&(expr=":not("+expr+")"),elems.length===1?jQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:jQuery.find.matches(expr,elems)},dir:function(elem,dir,until){for(var matched=[],cur=elem[dir];cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until));)cur.nodeType===1&&matched.push(cur),cur=cur[dir];return matched},sibling:function(n,elem){for(var r=[];n;n=n.nextSibling)n.nodeType===1&&n!==elem&&r.push(n);return r}});var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rnocache=/<(?:script|object|embed|option|style)/i,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rcheckableType=/^(?:checkbox|radio)$/,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/\/(java|ecma)script/i,rcleanScript=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],area:[1,"<map>","<\/map>"],_default:[0,"",""]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;jQuery.support.htmlSerialize||(wrapMap._default=[1,"X<div>","<\/div>"]);jQuery.fn.extend({text:function(value){return jQuery.access(this,function(value){return value===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value))},null,value,arguments.length)},wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&wrap.insertBefore(this[0]);wrap.map(function(){for(var elem=this;elem.firstChild&&elem.firstChild.nodeType===1;)elem=elem.firstChild;return elem}).append(this)}return this},wrapInner:function(html){return jQuery.isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(elem){(this.nodeType===1||this.nodeType===11)&&this.appendChild(elem)})},prepend:function(){return this.domManip(arguments,!0,function(elem){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(elem,this.firstChild)})},before:function(){if(!isDisconnected(this[0]))return this.domManip(arguments,!1,function(elem){this.parentNode.insertBefore(elem,this)});if(arguments.length){var set=jQuery.clean(arguments);return this.pushStack(jQuery.merge(set,this),"before",this.selector)}},after:function(){if(!isDisconnected(this[0]))return this.domManip(arguments,!1,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)});if(arguments.length){var set=jQuery.clean(arguments);return this.pushStack(jQuery.merge(this,set),"after",this.selector)}},remove:function(selector,keepData){for(var elem,i=0;(elem=this[i])!=null;i++)(!selector||jQuery.filter(selector,[elem]).length)&&(keepData||elem.nodeType!==1||(jQuery.cleanData(elem.getElementsByTagName("*")),jQuery.cleanData([elem])),elem.parentNode&&elem.parentNode.removeChild(elem));return this},empty:function(){for(var elem,i=0;(elem=this[i])!=null;i++)for(elem.nodeType===1&&jQuery.cleanData(elem.getElementsByTagName("*"));elem.firstChild;)elem.removeChild(elem.firstChild);return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=dataAndEvents==null?!1:dataAndEvents,deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return jQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined)return elem.nodeType===1?elem.innerHTML.replace(rinlinejQuery,""):undefined;if(typeof value=="string"&&!rnoInnerhtml.test(value)&&(jQuery.support.htmlSerialize||!rnoshimcache.test(value))&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1><\/$2>");try{for(;i<l;i++)elem=this[i]||{},elem.nodeType===1&&(jQuery.cleanData(elem.getElementsByTagName("*")),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(value){return isDisconnected(this[0])?this.length?this.pushStack(jQuery(jQuery.isFunction(value)?value():value),"replaceWith",value):this:jQuery.isFunction(value)?this.each(function(i){var self=jQuery(this),old=self.html();self.replaceWith(value.call(this,i,old))}):(typeof value!="string"&&(value=jQuery(value).detach()),this.each(function(){var next=this.nextSibling,parent=this.parentNode;jQuery(this).remove();next?jQuery(next).before(value):jQuery(parent).append(value)}))},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,table,callback){args=[].concat.apply([],args);var results,first,fragment,iNoClone,i=0,value=args[0],scripts=[],l=this.length;if(!jQuery.support.checkClone&&l>1&&typeof value=="string"&&rchecked.test(value))return this.each(function(){jQuery(this).domManip(args,table,callback)});if(jQuery.isFunction(value))return this.each(function(i){var self=jQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback)});if(this[0]){if(results=jQuery.buildFragment(args,this,scripts),fragment=results.fragment,first=fragment.firstChild,fragment.childNodes.length===1&&(fragment=first),first)for(table=table&&jQuery.nodeName(first,"tr"),iNoClone=results.cacheable||l-1;i<l;i++)callback.call(table&&jQuery.nodeName(this[i],"table")?findOrAppend(this[i],"tbody"):this[i],i===iNoClone?fragment:jQuery.clone(fragment,!0,!0));fragment=first=null;scripts.length&&jQuery.each(scripts,function(i,elem){elem.src?jQuery.ajax?jQuery.ajax({url:elem.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):jQuery.error("no ajax"):jQuery.globalEval((elem.text||elem.textContent||elem.innerHTML||"").replace(rcleanScript,""));elem.parentNode&&elem.parentNode.removeChild(elem)})}return this}});jQuery.buildFragment=function(args,context,scripts){var fragment,cacheable,cachehit,first=args[0];return context=context||document,context=!context.nodeType&&context[0]||context,context=context.ownerDocument||context,args.length===1&&typeof first=="string"&&first.length<512&&context===document&&first.charAt(0)==="<"&&!rnocache.test(first)&&(jQuery.support.checkClone||!rchecked.test(first))&&(jQuery.support.html5Clone||!rnoshimcache.test(first))&&(cacheable=!0,fragment=jQuery.fragments[first],cachehit=fragment!==undefined),fragment||(fragment=context.createDocumentFragment(),jQuery.clean(args,context,fragment,scripts),cacheable&&(jQuery.fragments[first]=cachehit&&fragment)),{fragment:fragment,cacheable:cacheable}};jQuery.fragments={};jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,i=0,ret=[],insert=jQuery(selector),l=insert.length,parent=this.length===1&&this[0].parentNode;if((parent==null||parent&&parent.nodeType===11&&parent.childNodes.length===1)&&l===1)return insert[original](this[0]),this;for(;i<l;i++)elems=(i>0?this.clone(!0):this).get(),jQuery(insert[i])[original](elems),ret=ret.concat(elems);return this.pushStack(ret,name,insert.selector)}});jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var srcElements,destElements,i,clone;if(jQuery.support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),(!jQuery.support.noCloneEvent||!jQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem))for(cloneFixAttributes(elem,clone),srcElements=getAll(elem),destElements=getAll(clone),i=0;srcElements[i];++i)destElements[i]&&cloneFixAttributes(srcElements[i],destElements[i]);if(dataAndEvents&&(cloneCopyEvent(elem,clone),deepDataAndEvents))for(srcElements=getAll(elem),destElements=getAll(clone),i=0;srcElements[i];++i)cloneCopyEvent(srcElements[i],destElements[i]);return srcElements=destElements=null,clone},clean:function(elems,context,fragment,scripts){var i,j,elem,tag,wrap,depth,div,hasBody,tbody,handleScript,jsTags,safe=context===document&&safeFragment,ret=[];for(context&&typeof context.createDocumentFragment!="undefined"||(context=document),i=0;(elem=elems[i])!=null;i++)if(typeof elem=="number"&&(elem+=""),elem){if(typeof elem=="string")if(rhtml.test(elem)){for(safe=safe||createSafeFragment(context),div=context.createElement("div"),safe.appendChild(div),elem=elem.replace(rxhtmlTag,"<$1><\/$2>"),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div.innerHTML=wrap[1]+elem+wrap[2];depth--;)div=div.lastChild;if(!jQuery.support.tbody)for(hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[],j=tbody.length-1;j>=0;--j)jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length&&tbody[j].parentNode.removeChild(tbody[j]);!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)&&div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);elem=div.childNodes;div.parentNode.removeChild(div)}else elem=context.createTextNode(elem);elem.nodeType?ret.push(elem):jQuery.merge(ret,elem)}if(div&&(elem=div=safe=null),!jQuery.support.appendChecked)for(i=0;(elem=ret[i])!=null;i++)jQuery.nodeName(elem,"input")?fixDefaultChecked(elem):typeof elem.getElementsByTagName!="undefined"&&jQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);if(fragment)for(handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type))return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem)},i=0;(elem=ret[i])!=null;i++)jQuery.nodeName(elem,"script")&&handleScript(elem)||(fragment.appendChild(elem),typeof elem.getElementsByTagName!="undefined"&&(jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript),ret.splice.apply(ret,[i+1,0].concat(jsTags)),i+=jsTags.length));return ret},cleanData:function(elems,acceptData){for(var data,id,elem,type,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=jQuery.support.deleteExpando,special=jQuery.event.special;(elem=elems[i])!=null;i++)if((acceptData||jQuery.acceptData(elem))&&(id=elem[internalKey],data=id&&cache[id],data)){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);cache[id]&&(delete cache[id],deleteExpando?delete elem[internalKey]:elem.removeAttribute?elem.removeAttribute(internalKey):elem[internalKey]=null,jQuery.deletedIds.push(id))}}}),function(){var matched,browser;jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};matched=jQuery.uaMatch(navigator.userAgent);browser={};matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version);browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0);jQuery.browser=browser;jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context)}jQuery.extend(!0,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function(selector,context){return context&&context instanceof jQuery&&!(context instanceof jQuerySub)&&(context=jQuerySub(context)),jQuery.fn.init.call(this,selector,context,rootjQuerySub)};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);return jQuerySub}}();var curCSS,iframe,iframeDoc,ralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rposition=/^(top|right|bottom|left)$/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rmargin=/^margin/,rnumsplit=new RegExp("^("+core_pnum+")(.*)$","i"),rnumnonpx=new RegExp("^("+core_pnum+")(?!px)[a-z%]+$","i"),rrelNum=new RegExp("^([-+])=("+core_pnum+")","i"),elemdisplay={},cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssExpand=["Top","Right","Bottom","Left"],cssPrefixes=["Webkit","O","Moz","ms"],eventsToggle=jQuery.fn.toggle;jQuery.fn.extend({css:function(name,value){return jQuery.access(this,function(elem,name,value){return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state,fn2){var bool=typeof state=="boolean";return jQuery.isFunction(state)&&jQuery.isFunction(fn2)?eventsToggle.apply(this,arguments):this.each(function(){(bool?state:isHidden(this))?jQuery(this).show():jQuery(this).hide()})}});jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:jQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(elem&&elem.nodeType!==3&&elem.nodeType!==8&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],value!==undefined){if(type=typeof value,type==="string"&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),value==null||type==="number"&&isNaN(value))return;if(type!=="number"||jQuery.cssNumber[origName]||(value+="px"),!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined)try{style[name]=value}catch(e){}}else return hooks&&"get"in hooks&&(ret=hooks.get(elem,!1,extra))!==undefined?ret:style[name]}},css:function(elem,name,numeric,extra){var val,num,hooks,origName=jQuery.camelCase(name);return(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),val===undefined&&(val=curCSS(elem,name)),val==="normal"&&name in cssNormalTransform&&(val=cssNormalTransform[name]),numeric||extra!==undefined)?(num=parseFloat(val),numeric||jQuery.isNumeric(num)?num||0:val):val},swap:function(elem,options,callback){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.call(elem);for(name in options)elem.style[name]=old[name];return ret}});window.getComputedStyle?curCSS=function(elem,name){var ret,width,minWidth,maxWidth,computed=window.getComputedStyle(elem,null),style=elem.style;return computed&&(ret=computed[name],ret!==""||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),ret}:document.documentElement.currentStyle&&(curCSS=function(elem,name){var left,rsLeft,ret=elem.currentStyle&&elem.currentStyle[name],style=elem.style;return ret==null&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition.test(name)&&(left=style.left,rsLeft=elem.runtimeStyle&&elem.runtimeStyle.left,rsLeft&&(elem.runtimeStyle.left=elem.currentStyle.left),style.left=name==="fontSize"?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(elem.runtimeStyle.left=rsLeft)),ret===""?"auto":ret});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed)return elem.offsetWidth===0&&rdisplayswap.test(curCSS(elem,"display"))?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)},set:function(elem,value,extra){return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,jQuery.support.boxSizing&&jQuery.css(elem,"boxSizing")==="border-box"):0)}}});jQuery.support.opacity||(jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":computed?"1":""},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+value*100+")":"",filter=currentStyle&¤tStyle.filter||style.filter||"";(style.zoom=1,value>=1&&jQuery.trim(filter.replace(ralpha,""))===""&&style.removeAttribute&&(style.removeAttribute("filter"),currentStyle&&!currentStyle.filter))||(style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity)}});jQuery(function(){jQuery.support.reliableMarginRight||(jQuery.cssHooks.marginRight={get:function(elem,computed){return jQuery.swap(elem,{display:"inline-block"},function(){if(computed)return curCSS(elem,"marginRight")})}});!jQuery.support.pixelPosition&&jQuery.fn.position&&jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]={get:function(elem,computed){if(computed){var ret=curCSS(elem,prop);return rnumnonpx.test(ret)?jQuery(elem).position()[prop]+"px":ret}}}})});jQuery.expr&&jQuery.expr.filters&&(jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth===0&&elem.offsetHeight===0||!jQuery.support.reliableHiddenOffsets&&(elem.style&&elem.style.display||curCSS(elem,"display"))==="none"},jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var parts=typeof value=="string"?value.split(" "):[value],expanded={},i=0;i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}};rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rselectTextarea=/^(?:select|textarea)/i;jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined&&(traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional),jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&").replace(r20,"+")};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,_load=jQuery.fn.load,prefilters={},transports={},allTypes=["*/"]+["*"];try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];jQuery.fn.load=function(url,params,callback){if(typeof url!="string"&&_load)return _load.apply(this,arguments);if(!this.length)return this;var selector,type,response,self=this,off=url.indexOf(" ");return off>=0&&(selector=url.slice(off,url.length),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=undefined):params&&typeof params=="object"&&(type="POST"),jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(jqXHR,status){callback&&self.each(callback,response||[jqXHR.responseText,status,jqXHR])}}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(responseText.replace(rscript,"")).find(selector):responseText)}),this};jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.on(o,f)}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=undefined),jQuery.ajax({type:method,url:url,data:data,success:callback,dataType:type})}});jQuery.extend({getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},ajaxSetup:function(target,settings){return settings?ajaxExtend(target,jQuery.ajaxSettings):(settings=target,target=jQuery.ajaxSettings),ajaxExtend(target,settings),target},ajaxSettings:{url:ajaxLocation,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocParts[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":allTypes},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;state!==2&&(state=2,timeoutTimer&&clearTimeout(timeoutTimer),transport=undefined,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),status>=200&&status<300||status===304?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[ifModifiedKey]=modified),modified=jqXHR.getResponseHeader("Etag"),modified&&(jQuery.etag[ifModifiedKey]=modified)),status===304?(statusText="notmodified",isSuccess=!0):(isSuccess=ajaxConvert(s,response),statusText=isSuccess.state,success=isSuccess.data,error=isSuccess.error,isSuccess=!error)):(error=statusText,(!statusText||status)&&(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=undefined,fireGlobals&&globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"),[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}var ts,ret;typeof url=="object"&&(options=url,url=undefined);options=options||{};var ifModifiedKey,responseHeadersString,responseHeaders,transport,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=callbackContext!==s&&(callbackContext.nodeType||callbackContext instanceof jQuery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,setRequestHeader:function(name,value){if(!state){var lname=name.toLowerCase();name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return match===undefined?null:match},overrideMimeType:function(type){return state||(s.mimeType=type),this},abort:function(statusText){return statusText=statusText||strAbort,transport&&transport.abort(statusText),done(0,statusText),this}};if(deferred.promise(jqXHR),jqXHR.success=jqXHR.done,jqXHR.error=jqXHR.fail,jqXHR.complete=completeDeferred.add,jqXHR.statusCode=function(map){if(map){var tmp;if(state<2)for(tmp in map)statusCode[tmp]=[statusCode[tmp],map[tmp]];else tmp=map[jqXHR.status],jqXHR.always(tmp)}return this},s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().split(core_rspace),s.crossDomain==null&&(parts=rurl.exec(s.url.toLowerCase())||!1,s.crossDomain=parts&&parts.join(":")+(parts[3]?"":parts[1]==="http:"?80:443)!==ajaxLocParts.join(":")+(ajaxLocParts[3]?"":ajaxLocParts[1]==="http:"?80:443)),s.data&&s.processData&&typeof s.data!="string"&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),state===2)return jqXHR;fireGlobals=s.global;s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);fireGlobals&&jQuery.active++==0&&jQuery.event.trigger("ajaxStart");s.hasContent||(s.data&&(s.url+=(rquery.test(s.url)?"&":"?")+s.data,delete s.data),ifModifiedKey=s.url,s.cache===!1&&(ts=jQuery.now(),ret=s.url.replace(rts,"$1_="+ts),s.url=ret+(ret===s.url?(rquery.test(s.url)?"&":"?")+"_="+ts:"")));(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType);s.ifModified&&(ifModifiedKey=ifModifiedKey||s.url,jQuery.lastModified[ifModifiedKey]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[ifModifiedKey]),jQuery.etag[ifModifiedKey]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[ifModifiedKey]));jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||state===2))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]);if(transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR),transport){jqXHR.readyState=1;fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]);s.async&&s.timeout>0&&(timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2)done(-1,e);else throw e;}}else done(-1,"No Transport");return jqXHR},active:0,lastModified:{},etag:{}});var oldCallbacks=[],rquestion=/\?/,rjsonp=/(=)\?(?=&|$)|\?\?/,nonce=jQuery.now();jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,data=s.data,url=s.url,hasCallback=s.jsonp!==!1,replaceInUrl=hasCallback&&rjsonp.test(url),replaceInData=hasCallback&&!replaceInUrl&&typeof data=="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(data);if(s.dataTypes[0]==="jsonp"||replaceInUrl||replaceInData)return callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,overwritten=window[callbackName],replaceInUrl?s.url=url.replace(rjsonp,"$1"+callbackName):replaceInData?s.data=data.replace(rjsonp,"$1"+callbackName):hasCallback&&(s.url+=(rquestion.test(url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){window[callbackName]=overwritten;s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName));responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]);responseContainer=overwritten=undefined}),"script"});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}});jQuery.ajaxPrefilter("script",function(s){s.cache===undefined&&(s.cache=!1);s.crossDomain&&(s.type="GET",s.global=!1)});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script");script.async="async";s.scriptCharset&&(script.charset=s.scriptCharset);script.src=s.url;script.onload=script.onreadystatechange=function(_,isAbort){(isAbort||!script.readyState||/loaded|complete/.test(script.readyState))&&(script.onload=script.onreadystatechange=null,head&&script.parentNode&&head.removeChild(script),script=undefined,isAbort||callback(200,"success"))};head.insertBefore(script,head.firstChild)},abort:function(){if(script)script.onload(0,1)}}}});xhrOnUnloadAbort=window.ActiveXObject?function(){for(var key in xhrCallbacks)xhrCallbacks[key](0,1)}:!1;xhrId=0;jQuery.ajaxSettings.xhr=window.ActiveXObject?function(){return!this.isLocal&&createStandardXHR()||createActiveXHR()}:createStandardXHR,function(xhr){jQuery.extend(jQuery.support,{ajax:!!xhr,cors:!!xhr&&"withCredentials"in xhr})}(jQuery.ajaxSettings.xhr());jQuery.support.ajax&&jQuery.ajaxTransport(function(s){if(!s.crossDomain||jQuery.support.cors){var callback;return{send:function(headers,complete){var handle,i,xhr=s.xhr();if(s.username?xhr.open(s.type,s.url,s.async,s.username,s.password):xhr.open(s.type,s.url,s.async),s.xhrFields)for(i in s.xhrFields)xhr[i]=s.xhrFields[i];s.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(s.mimeType);s.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");try{for(i in headers)xhr.setRequestHeader(i,headers[i])}catch(_){}xhr.send(s.hasContent&&s.data||null);callback=function(_,isAbort){var status,statusText,responseHeaders,responses,xml;try{if(callback&&(isAbort||xhr.readyState===4))if(callback=undefined,handle&&(xhr.onreadystatechange=jQuery.noop,xhrOnUnloadAbort&&delete xhrCallbacks[handle]),isAbort)xhr.readyState!==4&&xhr.abort();else{status=xhr.status;responseHeaders=xhr.getAllResponseHeaders();responses={};xml=xhr.responseXML;xml&&xml.documentElement&&(responses.xml=xml);try{responses.text=xhr.responseText}catch(_){}try{statusText=xhr.statusText}catch(e){statusText=""}status||!s.isLocal||s.crossDomain?status===1223&&(status=204):status=responses.text?200:404}}catch(firefoxAccessException){isAbort||complete(-1,firefoxAccessException)}responses&&complete(status,statusText,responses,responseHeaders)};s.async?xhr.readyState===4?setTimeout(callback,0):(handle=++xhrId,xhrOnUnloadAbort&&(xhrCallbacks||(xhrCallbacks={},jQuery(window).unload(xhrOnUnloadAbort)),xhrCallbacks[handle]=callback),xhr.onreadystatechange=callback):callback()},abort:function(){callback&&callback(0,1)}}}});var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([-+])=|)("+core_pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var end,unit,tween=this.createTween(prop,value),parts=rfxnum.exec(value),target=tween.cur(),start=+target||0,scale=1,maxIterations=20;if(parts){if(end=+parts[2],unit=parts[3]||(jQuery.cssNumber[prop]?"":"px"),unit!=="px"&&start){start=jQuery.css(tween.elem,prop,!0)||end||1;do scale=scale||".5",start=start/scale,jQuery.style(tween.elem,prop,start+unit);while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}tween.unit=unit;tween.start=start;tween.end=parts[1]?start+(parts[1]+1)*end:end}return tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.split(" ");for(var prop,index=0,length=props.length;index<length;index++)prop=props[index],tweeners[prop]=tweeners[prop]||[],tweeners[prop].unshift(callback)},prefilter:function(callback,prepend){prepend?animationPrefilters.unshift(callback):animationPrefilters.push(callback)}});jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.pos=this.options.duration?eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;return tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)?tween.elem[tween.prop]:(result=jQuery.css(tween.elem,tween.prop,!1,""),!result||result==="auto"?0:result)},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])?jQuery.style(tween.elem,tween.prop,tween.now+tween.unit):tween.elem[tween.prop]=tween.now}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}};jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed=="boolean"||!i&&jQuery.isFunction(speed)&&jQuery.isFunction(easing)?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}});jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);empty&&anim.stop(!0)};return empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};return typeof type!="string"&&(gotoEnd=clearQueue,clearQueue=type,type=undefined),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=jQuery._data(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem===this&&(type==null||timers[index].queue===type)&&(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));(dequeue||!gotoEnd)&&jQuery.dequeue(this,type)})}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed=="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:typeof opt.duration=="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,(opt.queue==null||opt.queue===!0)&&(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this);opt.queue&&jQuery.dequeue(this,opt.queue)},opt};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.timers=[];jQuery.fx=Tween.prototype.init;jQuery.fx.tick=function(){for(var timer,timers=jQuery.timers,i=0;i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop()};jQuery.fx.timer=function(timer){timer()&&jQuery.timers.push(timer)&&!timerId&&(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))};jQuery.fx.interval=13;jQuery.fx.stop=function(){clearInterval(timerId);timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fx.step={};jQuery.expr&&jQuery.expr.filters&&(jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length});rroot=/^(?:body|html)$/i;jQuery.fn.offset=function(options){if(arguments.length)return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,body,win,clientTop,clientLeft,scrollTop,scrollLeft,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(doc)return(body=doc.body)===elem?jQuery.offset.bodyOffset(elem):(docElem=doc.documentElement,!jQuery.contains(docElem,elem))?box:(typeof elem.getBoundingClientRect!="undefined"&&(box=elem.getBoundingClientRect()),win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||docElem.scrollTop,scrollLeft=win.pageXOffset||docElem.scrollLeft,{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft})};jQuery.offset={bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;return jQuery.support.doesNotIncludeMarginInBodyOffset&&(top+=parseFloat(jQuery.css(body,"marginTop"))||0,left+=parseFloat(jQuery.css(body,"marginLeft"))||0),{top:top,left:left}},setOffset:function(elem,options,i){var position=jQuery.css(elem,"position");position==="static"&&(elem.style.position="relative");var curElem=jQuery(elem),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0);jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset));options.top!=null&&(props.top=options.top-curOffset.top+curTop);options.left!=null&&(props.left=options.left-curOffset.left+curLeft);"using"in options?options.using.call(elem,props):curElem.css(props)}};jQuery.fn.extend({position:function(){if(this[0]){var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();return offset.top-=parseFloat(jQuery.css(elem,"marginTop"))||0,offset.left-=parseFloat(jQuery.css(elem,"marginLeft"))||0,parentOffset.top+=parseFloat(jQuery.css(offsetParent[0],"borderTopWidth"))||0,parentOffset.left+=parseFloat(jQuery.css(offsetParent[0],"borderLeftWidth"))||0,{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||document.body;offsetParent&&!rroot.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static";)offsetParent=offsetParent.offsetParent;return offsetParent||document.body})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return jQuery.access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined)return win?prop in win?win[prop]:win.document.documentElement[method]:elem[method];win?win.scrollTo(top?jQuery(win).scrollLeft():val,top?val:jQuery(win).scrollTop()):elem[method]=val},method,val,arguments.length,null)}});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!="boolean"),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return jQuery.access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:elem.nodeType===9?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):value===undefined?jQuery.css(elem,type,value,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})});window.jQuery=window.$=jQuery;typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return jQuery})})(window);jQuery.extend({Enumerable:function(){var Enumerable=function(getEnumerator){this.GetEnumerator=getEnumerator},SortContext,ArrayEnumerable;Enumerable.Choice=function(){var args=arguments[0]instanceof Array?arguments[0]:arguments;return new Enumerable(function(){return new IEnumerator(Functions.Blank,function(){return this.Yield(args[Math.floor(Math.random()*args.length)])},Functions.Blank)})};Enumerable.Cycle=function(){var args=arguments[0]instanceof Array?arguments[0]:arguments;return new Enumerable(function(){var index=0;return new IEnumerator(Functions.Blank,function(){return index>=args.length&&(index=0),this.Yield(args[index++])},Functions.Blank)})};Enumerable.Empty=function(){return new Enumerable(function(){return new IEnumerator(Functions.Blank,function(){return!1},Functions.Blank)})};Enumerable.From=function(obj){if(obj==null)return Enumerable.Empty();if(obj instanceof Enumerable)return obj;if(typeof obj==Types.Number||typeof obj==Types.Boolean)return Enumerable.Repeat(obj,1);if(typeof obj==Types.String)return new Enumerable(function(){var index=0;return new IEnumerator(Functions.Blank,function(){return index<obj.length?this.Yield(obj.charAt(index++)):!1},Functions.Blank)});if(typeof obj!=Types.Function){if(typeof obj.length==Types.Number)return new ArrayEnumerable(obj);if(!(obj instanceof Object)&&Utils.IsIEnumerable(obj))return new Enumerable(function(){var isFirst=!0,enumerator;return new IEnumerator(function(){enumerator=new Enumerator(obj)},function(){return isFirst?isFirst=!1:enumerator.moveNext(),enumerator.atEnd()?!1:this.Yield(enumerator.item())},Functions.Blank)})}return new Enumerable(function(){var array=[],index=0;return new IEnumerator(function(){for(var key in obj)obj[key]instanceof Function||array.push({Key:key,Value:obj[key]})},function(){return index<array.length?this.Yield(array[index++]):!1},Functions.Blank)})};Enumerable.Return=function(element){return Enumerable.Repeat(element,1)};Enumerable.Matches=function(input,pattern,flags){return flags==null&&(flags=""),pattern instanceof RegExp&&(flags+=pattern.ignoreCase?"i":"",flags+=pattern.multiline?"m":"",pattern=pattern.source),flags.indexOf("g")===-1&&(flags+="g"),new Enumerable(function(){var regex;return new IEnumerator(function(){regex=new RegExp(pattern,flags)},function(){var match=regex.exec(input);return match?this.Yield(match):!1},Functions.Blank)})};Enumerable.Range=function(start,count,step){return step==null&&(step=1),Enumerable.ToInfinity(start,step).Take(count)};Enumerable.RangeDown=function(start,count,step){return step==null&&(step=1),Enumerable.ToNegativeInfinity(start,step).Take(count)};Enumerable.RangeTo=function(start,to,step){return step==null&&(step=1),start<to?Enumerable.ToInfinity(start,step).TakeWhile(function(i){return i<=to}):Enumerable.ToNegativeInfinity(start,step).TakeWhile(function(i){return i>=to})};Enumerable.Repeat=function(obj,num){return num!=null?Enumerable.Repeat(obj).Take(num):new Enumerable(function(){return new IEnumerator(Functions.Blank,function(){return this.Yield(obj)},Functions.Blank)})};Enumerable.RepeatWithFinalize=function(initializer,finalizer){return initializer=Utils.CreateLambda(initializer),finalizer=Utils.CreateLambda(finalizer),new Enumerable(function(){var element;return new IEnumerator(function(){element=initializer()},function(){return this.Yield(element)},function(){element!=null&&(finalizer(element),element=null)})})};Enumerable.Generate=function(func,count){return count!=null?Enumerable.Generate(func).Take(count):(func=Utils.CreateLambda(func),new Enumerable(function(){return new IEnumerator(Functions.Blank,function(){return this.Yield(func())},Functions.Blank)}))};Enumerable.ToInfinity=function(start,step){return start==null&&(start=0),step==null&&(step=1),new Enumerable(function(){var value;return new IEnumerator(function(){value=start-step},function(){return this.Yield(value+=step)},Functions.Blank)})};Enumerable.ToNegativeInfinity=function(start,step){return start==null&&(start=0),step==null&&(step=1),new Enumerable(function(){var value;return new IEnumerator(function(){value=start+step},function(){return this.Yield(value-=step)},Functions.Blank)})};Enumerable.Unfold=function(seed,func){return func=Utils.CreateLambda(func),new Enumerable(function(){var isFirst=!0,value;return new IEnumerator(Functions.Blank,function(){return isFirst?(isFirst=!1,value=seed,this.Yield(value)):(value=func(value),this.Yield(value))},Functions.Blank)})};Enumerable.prototype={CascadeBreadthFirst:function(func,resultSelector){var source=this;return func=Utils.CreateLambda(func),resultSelector=Utils.CreateLambda(resultSelector),new Enumerable(function(){var enumerator,nestLevel=0,buffer=[];return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){for(;;){if(enumerator.MoveNext())return buffer.push(enumerator.Current()),this.Yield(resultSelector(enumerator.Current(),nestLevel));var next=Enumerable.From(buffer).SelectMany(function(x){return func(x)});if(next.Any())nestLevel++,buffer=[],Utils.Dispose(enumerator),enumerator=next.GetEnumerator();else return!1}},function(){Utils.Dispose(enumerator)})})},CascadeDepthFirst:function(func,resultSelector){var source=this;return func=Utils.CreateLambda(func),resultSelector=Utils.CreateLambda(resultSelector),new Enumerable(function(){var enumeratorStack=[],enumerator;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){for(;;){if(enumerator.MoveNext()){var value=resultSelector(enumerator.Current(),enumeratorStack.length);return enumeratorStack.push(enumerator),enumerator=Enumerable.From(func(enumerator.Current())).GetEnumerator(),this.Yield(value)}if(enumeratorStack.length<=0)return!1;Utils.Dispose(enumerator);enumerator=enumeratorStack.pop()}},function(){try{Utils.Dispose(enumerator)}finally{Enumerable.From(enumeratorStack).ForEach(function(s){s.Dispose()})}})})},Flatten:function(){var source=this;return new Enumerable(function(){var enumerator,middleEnumerator=null;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){for(;;){if(middleEnumerator!=null){if(middleEnumerator.MoveNext())return this.Yield(middleEnumerator.Current());middleEnumerator=null}if(enumerator.MoveNext())if(enumerator.Current()instanceof Array){Utils.Dispose(middleEnumerator);middleEnumerator=Enumerable.From(enumerator.Current()).SelectMany(Functions.Identity).Flatten().GetEnumerator();continue}else return this.Yield(enumerator.Current());return!1}},function(){try{Utils.Dispose(enumerator)}finally{Utils.Dispose(middleEnumerator)}})})},Pairwise:function(selector){var source=this;return selector=Utils.CreateLambda(selector),new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=source.GetEnumerator();enumerator.MoveNext()},function(){var prev=enumerator.Current();return enumerator.MoveNext()?this.Yield(selector(prev,enumerator.Current())):!1},function(){Utils.Dispose(enumerator)})})},Scan:function(seed,func,resultSelector){var isUseSeed,source;return resultSelector!=null?this.Scan(seed,func).Select(resultSelector):(func==null?(func=Utils.CreateLambda(seed),isUseSeed=!1):(func=Utils.CreateLambda(func),isUseSeed=!0),source=this,new Enumerable(function(){var enumerator,value,isFirst=!0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){if(isFirst){if(isFirst=!1,isUseSeed)return this.Yield(value=seed);if(enumerator.MoveNext())return this.Yield(value=enumerator.Current())}return enumerator.MoveNext()?this.Yield(value=func(value,enumerator.Current())):!1},function(){Utils.Dispose(enumerator)})}))},Select:function(selector){var source=this;return selector=Utils.CreateLambda(selector),new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return enumerator.MoveNext()?this.Yield(selector(enumerator.Current(),index++)):!1},function(){Utils.Dispose(enumerator)})})},SelectMany:function(collectionSelector,resultSelector){var source=this;return collectionSelector=Utils.CreateLambda(collectionSelector),resultSelector==null&&(resultSelector=function(a,b){return b}),resultSelector=Utils.CreateLambda(resultSelector),new Enumerable(function(){var enumerator,middleEnumerator=undefined,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){if(middleEnumerator===undefined&&!enumerator.MoveNext())return!1;do{if(middleEnumerator==null){var middleSeq=collectionSelector(enumerator.Current(),index++);middleEnumerator=Enumerable.From(middleSeq).GetEnumerator()}if(middleEnumerator.MoveNext())return this.Yield(resultSelector(enumerator.Current(),middleEnumerator.Current()));Utils.Dispose(middleEnumerator);middleEnumerator=null}while(enumerator.MoveNext());return!1},function(){try{Utils.Dispose(enumerator)}finally{Utils.Dispose(middleEnumerator)}})})},Where:function(predicate){predicate=Utils.CreateLambda(predicate);var source=this;return new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){while(enumerator.MoveNext())if(predicate(enumerator.Current(),index++))return this.Yield(enumerator.Current());return!1},function(){Utils.Dispose(enumerator)})})},OfType:function(type){var typeName;switch(type){case Number:typeName=Types.Number;break;case String:typeName=Types.String;break;case Boolean:typeName=Types.Boolean;break;case Function:typeName=Types.Function;break;default:typeName=null}return typeName===null?this.Where(function(x){return x instanceof type}):this.Where(function(x){return typeof x===typeName})},Zip:function(second,selector){selector=Utils.CreateLambda(selector);var source=this;return new Enumerable(function(){var firstEnumerator,secondEnumerator,index=0;return new IEnumerator(function(){firstEnumerator=source.GetEnumerator();secondEnumerator=Enumerable.From(second).GetEnumerator()},function(){return firstEnumerator.MoveNext()&&secondEnumerator.MoveNext()?this.Yield(selector(firstEnumerator.Current(),secondEnumerator.Current(),index++)):!1},function(){try{Utils.Dispose(firstEnumerator)}finally{Utils.Dispose(secondEnumerator)}})})},Join:function(inner,outerKeySelector,innerKeySelector,resultSelector,compareSelector){outerKeySelector=Utils.CreateLambda(outerKeySelector);innerKeySelector=Utils.CreateLambda(innerKeySelector);resultSelector=Utils.CreateLambda(resultSelector);compareSelector=Utils.CreateLambda(compareSelector);var source=this;return new Enumerable(function(){var outerEnumerator,lookup,innerElements=null,innerCount=0;return new IEnumerator(function(){outerEnumerator=source.GetEnumerator();lookup=Enumerable.From(inner).ToLookup(innerKeySelector,Functions.Identity,compareSelector)},function(){for(var innerElement,key;;){if(innerElements!=null){if(innerElement=innerElements[innerCount++],innerElement!==undefined)return this.Yield(resultSelector(outerEnumerator.Current(),innerElement));innerElement=null;innerCount=0}if(outerEnumerator.MoveNext())key=outerKeySelector(outerEnumerator.Current()),innerElements=lookup.Get(key).ToArray();else return!1}},function(){Utils.Dispose(outerEnumerator)})})},GroupJoin:function(inner,outerKeySelector,innerKeySelector,resultSelector,compareSelector){outerKeySelector=Utils.CreateLambda(outerKeySelector);innerKeySelector=Utils.CreateLambda(innerKeySelector);resultSelector=Utils.CreateLambda(resultSelector);compareSelector=Utils.CreateLambda(compareSelector);var source=this;return new Enumerable(function(){var enumerator=source.GetEnumerator(),lookup=null;return new IEnumerator(function(){enumerator=source.GetEnumerator();lookup=Enumerable.From(inner).ToLookup(innerKeySelector,Functions.Identity,compareSelector)},function(){if(enumerator.MoveNext()){var innerElement=lookup.Get(outerKeySelector(enumerator.Current()));return this.Yield(resultSelector(enumerator.Current(),innerElement))}return!1},function(){Utils.Dispose(enumerator)})})},All:function(predicate){predicate=Utils.CreateLambda(predicate);var result=!0;return this.ForEach(function(x){if(!predicate(x))return result=!1,!1}),result},Any:function(predicate){predicate=Utils.CreateLambda(predicate);var enumerator=this.GetEnumerator();try{if(arguments.length==0)return enumerator.MoveNext();while(enumerator.MoveNext())if(predicate(enumerator.Current()))return!0;return!1}finally{Utils.Dispose(enumerator)}},Concat:function(second){var source=this;return new Enumerable(function(){var firstEnumerator,secondEnumerator;return new IEnumerator(function(){firstEnumerator=source.GetEnumerator()},function(){if(secondEnumerator==null){if(firstEnumerator.MoveNext())return this.Yield(firstEnumerator.Current());secondEnumerator=Enumerable.From(second).GetEnumerator()}return secondEnumerator.MoveNext()?this.Yield(secondEnumerator.Current()):!1},function(){try{Utils.Dispose(firstEnumerator)}finally{Utils.Dispose(secondEnumerator)}})})},Insert:function(index,second){var source=this;return new Enumerable(function(){var firstEnumerator,secondEnumerator,count=0,isEnumerated=!1;return new IEnumerator(function(){firstEnumerator=source.GetEnumerator();secondEnumerator=Enumerable.From(second).GetEnumerator()},function(){return count==index&&secondEnumerator.MoveNext()?(isEnumerated=!0,this.Yield(secondEnumerator.Current())):firstEnumerator.MoveNext()?(count++,this.Yield(firstEnumerator.Current())):!isEnumerated&&secondEnumerator.MoveNext()?this.Yield(secondEnumerator.Current()):!1},function(){try{Utils.Dispose(firstEnumerator)}finally{Utils.Dispose(secondEnumerator)}})})},Alternate:function(value){return value=Enumerable.Return(value),this.SelectMany(function(elem){return Enumerable.Return(elem).Concat(value)}).TakeExceptLast()},Contains:function(value,compareSelector){compareSelector=Utils.CreateLambda(compareSelector);var enumerator=this.GetEnumerator();try{while(enumerator.MoveNext())if(compareSelector(enumerator.Current())===value)return!0;return!1}finally{Utils.Dispose(enumerator)}},DefaultIfEmpty:function(defaultValue){var source=this;return new Enumerable(function(){var enumerator,isFirst=!0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return enumerator.MoveNext()?(isFirst=!1,this.Yield(enumerator.Current())):isFirst?(isFirst=!1,this.Yield(defaultValue)):!1},function(){Utils.Dispose(enumerator)})})},Distinct:function(compareSelector){return this.Except(Enumerable.Empty(),compareSelector)},Except:function(second,compareSelector){compareSelector=Utils.CreateLambda(compareSelector);var source=this;return new Enumerable(function(){var enumerator,keys;return new IEnumerator(function(){enumerator=source.GetEnumerator();keys=new Dictionary(compareSelector);Enumerable.From(second).ForEach(function(key){keys.Add(key)})},function(){while(enumerator.MoveNext()){var current=enumerator.Current();if(!keys.Contains(current))return keys.Add(current),this.Yield(current)}return!1},function(){Utils.Dispose(enumerator)})})},Intersect:function(second,compareSelector){compareSelector=Utils.CreateLambda(compareSelector);var source=this;return new Enumerable(function(){var enumerator,keys,outs;return new IEnumerator(function(){enumerator=source.GetEnumerator();keys=new Dictionary(compareSelector);Enumerable.From(second).ForEach(function(key){keys.Add(key)});outs=new Dictionary(compareSelector)},function(){while(enumerator.MoveNext()){var current=enumerator.Current();if(!outs.Contains(current)&&keys.Contains(current))return outs.Add(current),this.Yield(current)}return!1},function(){Utils.Dispose(enumerator)})})},SequenceEqual:function(second,compareSelector){var firstEnumerator,secondEnumerator;compareSelector=Utils.CreateLambda(compareSelector);firstEnumerator=this.GetEnumerator();try{secondEnumerator=Enumerable.From(second).GetEnumerator();try{while(firstEnumerator.MoveNext())if(!secondEnumerator.MoveNext()||compareSelector(firstEnumerator.Current())!==compareSelector(secondEnumerator.Current()))return!1;return secondEnumerator.MoveNext()?!1:!0}finally{Utils.Dispose(secondEnumerator)}}finally{Utils.Dispose(firstEnumerator)}},Union:function(second,compareSelector){compareSelector=Utils.CreateLambda(compareSelector);var source=this;return new Enumerable(function(){var firstEnumerator,secondEnumerator,keys;return new IEnumerator(function(){firstEnumerator=source.GetEnumerator();keys=new Dictionary(compareSelector)},function(){var current;if(secondEnumerator===undefined){while(firstEnumerator.MoveNext())if(current=firstEnumerator.Current(),!keys.Contains(current))return keys.Add(current),this.Yield(current);secondEnumerator=Enumerable.From(second).GetEnumerator()}while(secondEnumerator.MoveNext())if(current=secondEnumerator.Current(),!keys.Contains(current))return keys.Add(current),this.Yield(current);return!1},function(){try{Utils.Dispose(firstEnumerator)}finally{Utils.Dispose(secondEnumerator)}})})},OrderBy:function(keySelector){return new OrderedEnumerable(this,keySelector,!1)},OrderByDescending:function(keySelector){return new OrderedEnumerable(this,keySelector,!0)},Reverse:function(){var source=this;return new Enumerable(function(){var buffer,index;return new IEnumerator(function(){buffer=source.ToArray();index=buffer.length},function(){return index>0?this.Yield(buffer[--index]):!1},Functions.Blank)})},Shuffle:function(){var source=this;return new Enumerable(function(){var buffer;return new IEnumerator(function(){buffer=source.ToArray()},function(){if(buffer.length>0){var i=Math.floor(Math.random()*buffer.length);return this.Yield(buffer.splice(i,1)[0])}return!1},Functions.Blank)})},GroupBy:function(keySelector,elementSelector,resultSelector,compareSelector){var source=this;return keySelector=Utils.CreateLambda(keySelector),elementSelector=Utils.CreateLambda(elementSelector),resultSelector!=null&&(resultSelector=Utils.CreateLambda(resultSelector)),compareSelector=Utils.CreateLambda(compareSelector),new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=source.ToLookup(keySelector,elementSelector,compareSelector).ToEnumerable().GetEnumerator()},function(){while(enumerator.MoveNext())return resultSelector==null?this.Yield(enumerator.Current()):this.Yield(resultSelector(enumerator.Current().Key(),enumerator.Current()));return!1},function(){Utils.Dispose(enumerator)})})},PartitionBy:function(keySelector,elementSelector,resultSelector,compareSelector){var source=this,hasResultSelector;return keySelector=Utils.CreateLambda(keySelector),elementSelector=Utils.CreateLambda(elementSelector),compareSelector=Utils.CreateLambda(compareSelector),resultSelector==null?(hasResultSelector=!1,resultSelector=function(key,group){return new Grouping(key,group)}):(hasResultSelector=!0,resultSelector=Utils.CreateLambda(resultSelector)),new Enumerable(function(){var enumerator,key,compareKey,group=[];return new IEnumerator(function(){enumerator=source.GetEnumerator();enumerator.MoveNext()&&(key=keySelector(enumerator.Current()),compareKey=compareSelector(key),group.push(elementSelector(enumerator.Current())))},function(){for(var hasNext,result;(hasNext=enumerator.MoveNext())==!0;)if(compareKey===compareSelector(keySelector(enumerator.Current())))group.push(elementSelector(enumerator.Current()));else break;return group.length>0?(result=hasResultSelector?resultSelector(key,Enumerable.From(group)):resultSelector(key,group),hasNext?(key=keySelector(enumerator.Current()),compareKey=compareSelector(key),group=[elementSelector(enumerator.Current())]):group=[],this.Yield(result)):!1},function(){Utils.Dispose(enumerator)})})},BufferWithCount:function(count){var source=this;return new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){for(var array=[],index=0;enumerator.MoveNext();)if(array.push(enumerator.Current()),++index>=count)return this.Yield(array);return array.length>0?this.Yield(array):!1},function(){Utils.Dispose(enumerator)})})},Aggregate:function(seed,func,resultSelector){return this.Scan(seed,func,resultSelector).Last()},Average:function(selector){selector=Utils.CreateLambda(selector);var sum=0,count=0;return this.ForEach(function(x){sum+=selector(x);++count}),sum/count},Count:function(predicate){predicate=predicate==null?Functions.True:Utils.CreateLambda(predicate);var count=0;return this.ForEach(function(x,i){predicate(x,i)&&++count}),count},Max:function(selector){return selector==null&&(selector=Functions.Identity),this.Select(selector).Aggregate(function(a,b){return a>b?a:b})},Min:function(selector){return selector==null&&(selector=Functions.Identity),this.Select(selector).Aggregate(function(a,b){return a<b?a:b})},MaxBy:function(keySelector){return keySelector=Utils.CreateLambda(keySelector),this.Aggregate(function(a,b){return keySelector(a)>keySelector(b)?a:b})},MinBy:function(keySelector){return keySelector=Utils.CreateLambda(keySelector),this.Aggregate(function(a,b){return keySelector(a)<keySelector(b)?a:b})},Sum:function(selector){return selector==null&&(selector=Functions.Identity),this.Select(selector).Aggregate(0,function(a,b){return a+b})},ElementAt:function(index){var value,found=!1;if(this.ForEach(function(x,i){if(i==index)return value=x,found=!0,!1}),!found)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return value},ElementAtOrDefault:function(index,defaultValue){var value,found=!1;return this.ForEach(function(x,i){if(i==index)return value=x,found=!0,!1}),found?value:defaultValue},First:function(predicate){if(predicate!=null)return this.Where(predicate).First();var value,found=!1;if(this.ForEach(function(x){return value=x,found=!0,!1}),!found)throw new Error("First:No element satisfies the condition.");return value},FirstOrDefault:function(defaultValue,predicate){if(predicate!=null)return this.Where(predicate).FirstOrDefault(defaultValue);var value,found=!1;return this.ForEach(function(x){return value=x,found=!0,!1}),found?value:defaultValue},Last:function(predicate){if(predicate!=null)return this.Where(predicate).Last();var value,found=!1;if(this.ForEach(function(x){found=!0;value=x}),!found)throw new Error("Last:No element satisfies the condition.");return value},LastOrDefault:function(defaultValue,predicate){if(predicate!=null)return this.Where(predicate).LastOrDefault(defaultValue);var value,found=!1;return this.ForEach(function(x){found=!0;value=x}),found?value:defaultValue},Single:function(predicate){if(predicate!=null)return this.Where(predicate).Single();var value,found=!1;if(this.ForEach(function(x){if(found)throw new Error("Single:sequence contains more than one element.");else found=!0,value=x}),!found)throw new Error("Single:No element satisfies the condition.");return value},SingleOrDefault:function(defaultValue,predicate){if(predicate!=null)return this.Where(predicate).SingleOrDefault(defaultValue);var value,found=!1;return this.ForEach(function(x){if(found)throw new Error("Single:sequence contains more than one element.");else found=!0,value=x}),found?value:defaultValue},Skip:function(count){var source=this;return new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){for(enumerator=source.GetEnumerator();index++<count&&enumerator.MoveNext(););},function(){return enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},SkipWhile:function(predicate){predicate=Utils.CreateLambda(predicate);var source=this;return new Enumerable(function(){var enumerator,index=0,isSkipEnd=!1;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){while(!isSkipEnd)if(enumerator.MoveNext()){if(!predicate(enumerator.Current(),index++))return isSkipEnd=!0,this.Yield(enumerator.Current());continue}else return!1;return enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},Take:function(count){var source=this;return new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return index++<count&&enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},TakeWhile:function(predicate){predicate=Utils.CreateLambda(predicate);var source=this;return new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return enumerator.MoveNext()&&predicate(enumerator.Current(),index++)?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},TakeExceptLast:function(count){count==null&&(count=1);var source=this;return new Enumerable(function(){if(count<=0)return source.GetEnumerator();var enumerator,q=[];return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){while(enumerator.MoveNext()){if(q.length==count)return q.push(enumerator.Current()),this.Yield(q.shift());q.push(enumerator.Current())}return!1},function(){Utils.Dispose(enumerator)})})},TakeFromLast:function(count){if(count<=0||count==null)return Enumerable.Empty();var source=this;return new Enumerable(function(){var sourceEnumerator,enumerator,q=[];return new IEnumerator(function(){sourceEnumerator=source.GetEnumerator()},function(){while(sourceEnumerator.MoveNext())q.length==count&&q.shift(),q.push(sourceEnumerator.Current());return enumerator==null&&(enumerator=Enumerable.From(q).GetEnumerator()),enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},IndexOf:function(item){var found=null;return this.ForEach(function(x,i){if(x===item)return found=i,!0}),found!==null?found:-1},LastIndexOf:function(item){var result=-1;return this.ForEach(function(x,i){x===item&&(result=i)}),result},ToArray:function(){var array=[];return this.ForEach(function(x){array.push(x)}),array},ToLookup:function(keySelector,elementSelector,compareSelector){keySelector=Utils.CreateLambda(keySelector);elementSelector=Utils.CreateLambda(elementSelector);compareSelector=Utils.CreateLambda(compareSelector);var dict=new Dictionary(compareSelector);return this.ForEach(function(x){var key=keySelector(x),element=elementSelector(x),array=dict.Get(key);array!==undefined?array.push(element):dict.Add(key,[element])}),new Lookup(dict)},ToObject:function(keySelector,elementSelector){keySelector=Utils.CreateLambda(keySelector);elementSelector=Utils.CreateLambda(elementSelector);var obj={};return this.ForEach(function(x){obj[keySelector(x)]=elementSelector(x)}),obj},ToDictionary:function(keySelector,elementSelector,compareSelector){keySelector=Utils.CreateLambda(keySelector);elementSelector=Utils.CreateLambda(elementSelector);compareSelector=Utils.CreateLambda(compareSelector);var dict=new Dictionary(compareSelector);return this.ForEach(function(x){dict.Add(keySelector(x),elementSelector(x))}),dict},ToJSON:function(replacer,space){return JSON.stringify(this.ToArray(),replacer,space)},ToString:function(separator,selector){return separator==null&&(separator=""),selector==null&&(selector=Functions.Identity),this.Select(selector).ToArray().join(separator)},Do:function(action){var source=this;return action=Utils.CreateLambda(action),new Enumerable(function(){var enumerator,index=0;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return enumerator.MoveNext()?(action(enumerator.Current(),index++),this.Yield(enumerator.Current())):!1},function(){Utils.Dispose(enumerator)})})},ForEach:function(action){action=Utils.CreateLambda(action);var index=0,enumerator=this.GetEnumerator();try{while(enumerator.MoveNext())if(action(enumerator.Current(),index++)===!1)break}finally{Utils.Dispose(enumerator)}},Write:function(separator,selector){separator==null&&(separator="");selector=Utils.CreateLambda(selector);var isFirst=!0;this.ForEach(function(item){isFirst?isFirst=!1:document.write(separator);document.write(selector(item))})},WriteLine:function(selector){selector=Utils.CreateLambda(selector);this.ForEach(function(item){document.write(selector(item));document.write("<br />")})},Force:function(){var enumerator=this.GetEnumerator();try{while(enumerator.MoveNext());}finally{Utils.Dispose(enumerator)}},Let:function(func){func=Utils.CreateLambda(func);var source=this;return new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=Enumerable.From(func(source)).GetEnumerator()},function(){return enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){Utils.Dispose(enumerator)})})},Share:function(){var source=this,sharedEnumerator;return new Enumerable(function(){return new IEnumerator(function(){sharedEnumerator==null&&(sharedEnumerator=source.GetEnumerator())},function(){return sharedEnumerator.MoveNext()?this.Yield(sharedEnumerator.Current()):!1},Functions.Blank)})},MemoizeAll:function(){var source=this,cache,enumerator;return new Enumerable(function(){var index=-1;return new IEnumerator(function(){enumerator==null&&(enumerator=source.GetEnumerator(),cache=[])},function(){return(index++,cache.length<=index)?enumerator.MoveNext()?this.Yield(cache[index]=enumerator.Current()):!1:this.Yield(cache[index])},Functions.Blank)})},Catch:function(handler){handler=Utils.CreateLambda(handler);var source=this;return new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){try{return enumerator.MoveNext()?this.Yield(enumerator.Current()):!1}catch(e){return handler(e),!1}},function(){Utils.Dispose(enumerator)})})},Finally:function(finallyAction){finallyAction=Utils.CreateLambda(finallyAction);var source=this;return new Enumerable(function(){var enumerator;return new IEnumerator(function(){enumerator=source.GetEnumerator()},function(){return enumerator.MoveNext()?this.Yield(enumerator.Current()):!1},function(){try{Utils.Dispose(enumerator)}finally{finallyAction()}})})},Trace:function(message,selector){return message==null&&(message="Trace"),selector=Utils.CreateLambda(selector),this.Do(function(){})}};var Functions={Identity:function(x){return x},True:function(){return!0},Blank:function(){}},Types={Boolean:"boolean",Number:"number",String:"string",Object:"object",Undefined:typeof undefined,Function:typeof function(){}},Utils={CreateLambda:function(expression){if(expression==null)return Functions.Identity;if(typeof expression==Types.String){if(expression=="")return Functions.Identity;if(expression.indexOf("=>")==-1)return new Function("$,$$,$$$,$$$$","return "+expression);var expr=expression.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return new Function(expr[1],"return "+expr[2])}return expression},IsIEnumerable:function(obj){if(typeof Enumerator!=Types.Undefined)try{return new Enumerator(obj),!0}catch(e){}return!1},Compare:function(a,b){return a===b?0:a>b?1:-1},Dispose:function(obj){obj!=null&&obj.Dispose()}},State={Before:0,Running:1,After:2},IEnumerator=function(initialize,tryGetNext,dispose){var yielder=new Yielder,state=State.Before;this.Current=yielder.Current;this.MoveNext=function(){try{switch(state){case State.Before:state=State.Running;initialize();case State.Running:return tryGetNext.apply(yielder)?!0:(this.Dispose(),!1);case State.After:return!1}}catch(e){this.Dispose();throw e;}};this.Dispose=function(){if(state==State.Running)try{dispose()}finally{state=State.After}}},Yielder=function(){var current=null;this.Current=function(){return current};this.Yield=function(value){return current=value,!0}},OrderedEnumerable=function(source,keySelector,descending,parent){this.source=source;this.keySelector=Utils.CreateLambda(keySelector);this.descending=descending;this.parent=parent};OrderedEnumerable.prototype=new Enumerable;OrderedEnumerable.prototype.CreateOrderedEnumerable=function(keySelector,descending){return new OrderedEnumerable(this.source,keySelector,descending,this)};OrderedEnumerable.prototype.ThenBy=function(keySelector){return this.CreateOrderedEnumerable(keySelector,!1)};OrderedEnumerable.prototype.ThenByDescending=function(keySelector){return this.CreateOrderedEnumerable(keySelector,!0)};OrderedEnumerable.prototype.GetEnumerator=function(){var self=this,buffer,indexes,index=0;return new IEnumerator(function(){buffer=[];indexes=[];self.source.ForEach(function(item,index){buffer.push(item);indexes.push(index)});var sortContext=SortContext.Create(self,null);sortContext.GenerateKeys(buffer);indexes.sort(function(a,b){return sortContext.Compare(a,b)})},function(){return index<indexes.length?this.Yield(buffer[indexes[index++]]):!1},Functions.Blank)};SortContext=function(keySelector,descending,child){this.keySelector=keySelector;this.descending=descending;this.child=child;this.keys=null};SortContext.Create=function(orderedEnumerable,currentContext){var context=new SortContext(orderedEnumerable.keySelector,orderedEnumerable.descending,currentContext);return orderedEnumerable.parent!=null?SortContext.Create(orderedEnumerable.parent,context):context};SortContext.prototype.GenerateKeys=function(source){for(var len=source.length,keySelector=this.keySelector,keys=new Array(len),i=0;i<len;i++)keys[i]=keySelector(source[i]);this.keys=keys;this.child!=null&&this.child.GenerateKeys(source)};SortContext.prototype.Compare=function(index1,index2){var comparison=Utils.Compare(this.keys[index1],this.keys[index2]);if(comparison==0){if(this.child!=null)return this.child.Compare(index1,index2);comparison=Utils.Compare(index1,index2)}return this.descending?-comparison:comparison};ArrayEnumerable=function(source){this.source=source};ArrayEnumerable.prototype=new Enumerable;ArrayEnumerable.prototype.Any=function(predicate){return predicate==null?this.source.length>0:Enumerable.prototype.Any.apply(this,arguments)};ArrayEnumerable.prototype.Count=function(predicate){return predicate==null?this.source.length:Enumerable.prototype.Count.apply(this,arguments)};ArrayEnumerable.prototype.ElementAt=function(index){return 0<=index&&index<this.source.length?this.source[index]:Enumerable.prototype.ElementAt.apply(this,arguments)};ArrayEnumerable.prototype.ElementAtOrDefault=function(index,defaultValue){return 0<=index&&index<this.source.length?this.source[index]:defaultValue};ArrayEnumerable.prototype.First=function(predicate){return predicate==null&&this.source.length>0?this.source[0]:Enumerable.prototype.First.apply(this,arguments)};ArrayEnumerable.prototype.FirstOrDefault=function(defaultValue,predicate){return predicate!=null?Enumerable.prototype.FirstOrDefault.apply(this,arguments):this.source.length>0?this.source[0]:defaultValue};ArrayEnumerable.prototype.Last=function(predicate){return predicate==null&&this.source.length>0?this.source[this.source.length-1]:Enumerable.prototype.Last.apply(this,arguments)};ArrayEnumerable.prototype.LastOrDefault=function(defaultValue,predicate){return predicate!=null?Enumerable.prototype.LastOrDefault.apply(this,arguments):this.source.length>0?this.source[this.source.length-1]:defaultValue};ArrayEnumerable.prototype.Skip=function(count){var source=this.source;return new Enumerable(function(){var index;return new IEnumerator(function(){index=count<0?0:count},function(){return index<source.length?this.Yield(source[index++]):!1},Functions.Blank)})};ArrayEnumerable.prototype.TakeExceptLast=function(count){return count==null&&(count=1),this.Take(this.source.length-count)};ArrayEnumerable.prototype.TakeFromLast=function(count){return this.Skip(this.source.length-count)};ArrayEnumerable.prototype.Reverse=function(){var source=this.source;return new Enumerable(function(){var index;return new IEnumerator(function(){index=source.length},function(){return index>0?this.Yield(source[--index]):!1},Functions.Blank)})};ArrayEnumerable.prototype.SequenceEqual=function(second,compareSelector){return(second instanceof ArrayEnumerable||second instanceof Array)&&compareSelector==null&&Enumerable.From(second).Count()!=this.Count()?!1:Enumerable.prototype.SequenceEqual.apply(this,arguments)};ArrayEnumerable.prototype.ToString=function(separator,selector){return selector!=null||!(this.source instanceof Array)?Enumerable.prototype.ToString.apply(this,arguments):(separator==null&&(separator=""),this.source.join(separator))};ArrayEnumerable.prototype.GetEnumerator=function(){var source=this.source,index=0;return new IEnumerator(Functions.Blank,function(){return index<source.length?this.Yield(source[index++]):!1},Functions.Blank)};var Dictionary=function(){var HasOwnProperty=function(target,key){return Object.prototype.hasOwnProperty.call(target,key)},ComputeHashCode=function(obj){return obj===null?"null":obj===undefined?"undefined":typeof obj.toString===Types.Function?obj.toString():Object.prototype.toString.call(obj)},HashEntry=function(key,value){this.Key=key;this.Value=value;this.Prev=null;this.Next=null},EntryList=function(){this.First=null;this.Last=null},Dictionary;return EntryList.prototype={AddLast:function(entry){this.Last!=null?(this.Last.Next=entry,entry.Prev=this.Last,this.Last=entry):this.First=this.Last=entry},Replace:function(entry,newEntry){entry.Prev!=null?(entry.Prev.Next=newEntry,newEntry.Prev=entry.Prev):this.First=newEntry;entry.Next!=null?(entry.Next.Prev=newEntry,newEntry.Next=entry.Next):this.Last=newEntry},Remove:function(entry){entry.Prev!=null?entry.Prev.Next=entry.Next:this.First=entry.Next;entry.Next!=null?entry.Next.Prev=entry.Prev:this.Last=entry.Prev}},Dictionary=function(compareSelector){this.count=0;this.entryList=new EntryList;this.buckets={};this.compareSelector=compareSelector==null?Functions.Identity:compareSelector},Dictionary.prototype={Add:function(key,value){var compareKey=this.compareSelector(key),hash=ComputeHashCode(compareKey),entry=new HashEntry(key,value),array,i;if(HasOwnProperty(this.buckets,hash)){for(array=this.buckets[hash],i=0;i<array.length;i++)if(this.compareSelector(array[i].Key)===compareKey){this.entryList.Replace(array[i],entry);array[i]=entry;return}array.push(entry)}else this.buckets[hash]=[entry];this.count++;this.entryList.AddLast(entry)},Get:function(key){var compareKey=this.compareSelector(key),hash=ComputeHashCode(compareKey),array,i,entry;if(!HasOwnProperty(this.buckets,hash))return undefined;for(array=this.buckets[hash],i=0;i<array.length;i++)if(entry=array[i],this.compareSelector(entry.Key)===compareKey)return entry.Value;return undefined},Set:function(key,value){var compareKey=this.compareSelector(key),hash=ComputeHashCode(compareKey),array,i,newEntry;if(HasOwnProperty(this.buckets,hash))for(array=this.buckets[hash],i=0;i<array.length;i++)if(this.compareSelector(array[i].Key)===compareKey)return newEntry=new HashEntry(key,value),this.entryList.Replace(array[i],newEntry),array[i]=newEntry,!0;return!1},Contains:function(key){var compareKey=this.compareSelector(key),hash=ComputeHashCode(compareKey),array,i;if(!HasOwnProperty(this.buckets,hash))return!1;for(array=this.buckets[hash],i=0;i<array.length;i++)if(this.compareSelector(array[i].Key)===compareKey)return!0;return!1},Clear:function(){this.count=0;this.buckets={};this.entryList=new EntryList},Remove:function(key){var compareKey=this.compareSelector(key),hash=ComputeHashCode(compareKey),array,i;if(HasOwnProperty(this.buckets,hash))for(array=this.buckets[hash],i=0;i<array.length;i++)if(this.compareSelector(array[i].Key)===compareKey){this.entryList.Remove(array[i]);array.splice(i,1);array.length==0&&delete this.buckets[hash];this.count--;return}},Count:function(){return this.count},ToEnumerable:function(){var self=this;return new Enumerable(function(){var currentEntry;return new IEnumerator(function(){currentEntry=self.entryList.First},function(){if(currentEntry!=null){var result={Key:currentEntry.Key,Value:currentEntry.Value};return currentEntry=currentEntry.Next,this.Yield(result)}return!1},Functions.Blank)})}},Dictionary}(),Lookup=function(dictionary){this.Count=function(){return dictionary.Count()};this.Get=function(key){return Enumerable.From(dictionary.Get(key))};this.Contains=function(key){return dictionary.Contains(key)};this.ToEnumerable=function(){return dictionary.ToEnumerable().Select(function(kvp){return new Grouping(kvp.Key,kvp.Value)})}},Grouping=function(key,elements){this.Key=function(){return key};ArrayEnumerable.call(this,elements)};return Grouping.prototype=new ArrayEnumerable,Enumerable}()}),function($,Enumerable){$.fn.toEnumerable=function(){return Enumerable.From(this).Select(function(e){return $(e)})};Enumerable.prototype.TojQuery=function(){return $(this.ToArray())}}(jQuery,this.Enumerable||this.jQuery.Enumerable); /*! * jQuery Cookie Plugin v1.4.0 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function(factory){typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)})(function($){function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){s.indexOf('"')===0&&(s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{s=decodeURIComponent(s.replace(pluses," "))}catch(e){return}try{return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var pluses=/\+/g,config={json:!1,raw:!0};$.cookie=function(key,value,options){var days,t,result,cookies,i,l;if(value!==undefined&&!$.isFunction(value))return options=$.extend({},config,options),typeof options.expires=="number"&&(days=options.expires,t=options.expires=new Date,t.setDate(t.getDate()+days)),document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"; path=/",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("");for(result=key?undefined:{},cookies=document.cookie?document.cookie.split("; "):[],i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("="),name=decode(parts.shift()),cookie=parts.join("=");if(key&&key===name){result=read(cookie,value);break}key||(cookie=read(cookie))===undefined||(result[name]=cookie)}return result};$.removeCookie=function(key,options){return $.cookie(key)!==undefined?($.cookie(key,"",$.extend({},options,{expires:-1})),!0):!1}}); /*! * fancyBox - jQuery Plugin * version: 2.1.4 (Thu, 10 Jan 2013) * @requires jQuery v1.6 or later * * Examples at http://fancyapps.com/fancybox/ * License: www.fancyapps.com/fancybox/#license * * Copyright 2012 Janis Skarnelis - janis@fancyapps.com * */ (function(window,document,$,undefined){"use strict";var W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments)},IE=navigator.userAgent.match(/msie/),didUpdate=null,isTouch=document.createTouch!==undefined,isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $},isString=function(str){return str&&$.type(str)==="string"},isPercentage=function(str){return isString(str)&&str.indexOf("%")>0},isScrollable=function(el){return el&&!(el.style.overflow&&el.style.overflow==="hidden")&&(el.clientWidth&&el.scrollWidth>el.clientWidth||el.clientHeight&&el.scrollHeight>el.clientHeight)},getScalar=function(orig,dim){var value=parseInt(orig,10)||0;return dim&&isPercentage(orig)&&(value=F.getViewport()[dim]/100*value),Math.ceil(value)},getValue=function(value,dim){return getScalar(value,dim)+"px"};$.extend(F,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!isTouch,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"><\/div><\/div><\/div><\/div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(IE?' allowtransparency="true"':"")+"><\/iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.<\/p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"><\/a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span><\/span><\/a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span><\/span><\/a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeChange:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(group)return($.isPlainObject(opts)||(opts={}),!1===F.close(!0))?void 0:($.isArray(group)||(group=isQuery(group)?$(group).get():[group]),$.each(group,function(i,element){var obj={},href,title,content,type,rez,hrefParts,selector;$.type(element)==="object"&&(element.nodeType&&(element=$(element)),isQuery(element)?(obj={href:element.data("fancybox-href")||element.attr("href"),title:element.data("fancybox-title")||element.attr("title"),isDom:!0,element:element},$.metadata&&$.extend(!0,obj,element.metadata())):obj=element);href=opts.href||obj.href||(isString(element)?element:null);title=opts.title!==undefined?opts.title:obj.title||"";content=opts.content||obj.content;type=content?"html":opts.type||obj.type;!type&&obj.isDom&&(type=element.data("fancybox-type"),type||(rez=element.prop("class").match(/fancybox\.(\w+)/),type=rez?rez[1]:null));isString(href)&&(type||(F.isImage(href)?type="image":F.isSWF(href)?type="swf":href.charAt(0)==="#"?type="inline":isString(element)&&(type="html",content=element)),type==="ajax"&&(hrefParts=href.split(/\s+/,2),href=hrefParts.shift(),selector=hrefParts.shift()));content||(type==="inline"?href?content=$(isString(href)?href.replace(/.*(?=#[^\s]+$)/,""):href):obj.isDom&&(content=element):type==="html"?content=href:type||href||!obj.isDom||(type="inline",content=element));$.extend(obj,{href:href,type:type,content:content,title:title,selector:selector});group[i]=obj}),F.opts=$.extend(!0,{},F.defaults,opts),opts.keys!==undefined&&(F.opts.keys=opts.keys?$.extend({},F.defaults.keys,opts.keys):!1),F.group=group,F._start(F.opts.index))},cancel:function(){var coming=F.coming;coming&&!1!==F.trigger("onCancel")&&(F.hideLoading(),F.ajaxLoad&&F.ajaxLoad.abort(),F.ajaxLoad=null,F.imgPreload&&(F.imgPreload.onload=F.imgPreload.onerror=null),coming.wrap&&coming.wrap.stop(!0,!0).trigger("onReset").remove(),F.coming=null,F.current||F._afterZoomOut(coming))},close:function(event){(F.cancel(),!1!==F.trigger("beforeClose"))&&(F.unbindEvents(),F.isActive)&&(F.isOpen&&event!==!0?(F.isOpen=F.isOpened=!1,F.isClosing=!0,$(".fancybox-item, .fancybox-nav").remove(),F.wrap.stop(!0,!0).removeClass("fancybox-opened"),F.transitions[F.current.closeMethod]()):($(".fancybox-wrap").stop(!0).trigger("onReset").remove(),F._afterZoomOut()))},play:function(action){var clear=function(){clearTimeout(F.player.timer)},set=function(){clear();F.current&&F.player.isActive&&(F.player.timer=setTimeout(F.next,F.current.playSpeed))},stop=function(){clear();$("body").unbind(".player");F.player.isActive=!1;F.trigger("onPlayEnd")},start=function(){F.current&&(F.current.loop||F.current.index<F.group.length-1)&&(F.player.isActive=!0,$("body").bind({"afterShow.player onUpdate.player":set,"onCancel.player beforeClose.player":stop,"beforeLoad.player":clear}),set(),F.trigger("onPlayStart"))};action!==!0&&(F.player.isActive||action===!1)?stop():start()},next:function(direction){var current=F.current;current&&(isString(direction)||(direction=current.direction.next),F.jumpto(current.index+1,direction,"next"))},prev:function(direction){var current=F.current;current&&(isString(direction)||(direction=current.direction.prev),F.jumpto(current.index-1,direction,"prev"))},jumpto:function(index,direction,router){var current=F.current;current&&(index=getScalar(index),F.direction=direction||current.direction[index>=current.index?"next":"prev"],F.router=router||"jumpto",current.loop&&(index<0&&(index=current.group.length+index%current.group.length),index=index%current.group.length),current.group[index]!==undefined&&(F.cancel(),F._start(index)))},reposition:function(e,onlyAbsolute){var current=F.current,wrap=current?current.wrap:null,pos;wrap&&(pos=F._getPosition(onlyAbsolute),e&&e.type==="scroll"?(delete pos.position,wrap.stop(!0,!0).animate(pos,200)):(wrap.css(pos),current.pos=$.extend({},current.dim,pos)))},update:function(e){var type=e&&e.type,anyway=!type||type==="orientationchange";(anyway&&(clearTimeout(didUpdate),didUpdate=null),F.isOpen&&!didUpdate)&&(didUpdate=setTimeout(function(){var current=F.current;current&&!F.isClosing&&(F.wrap.removeClass("fancybox-tmp"),(anyway||type==="load"||type==="resize"&¤t.autoResize)&&F._setDimension(),type==="scroll"&¤t.canShrink||F.reposition(e),F.trigger("onUpdate"),didUpdate=null)},anyway&&!isTouch?0:300))},toggle:function(action){F.isOpen&&(F.current.fitToView=$.type(action)==="boolean"?action:!F.current.fitToView,isTouch&&(F.wrap.removeAttr("style").addClass("fancybox-tmp"),F.trigger("onUpdate")),F.update())},hideLoading:function(){D.unbind(".loading");$("#fancybox-loading").remove()},showLoading:function(){var el,viewport;F.hideLoading();el=$('<div id="fancybox-loading"><div><\/div><\/div>').click(F.cancel).appendTo("body");D.bind("keydown.loading",function(e){(e.which||e.keyCode)===27&&(e.preventDefault(),F.cancel())});F.defaults.fixed||(viewport=F.getViewport(),el.css({position:"absolute",top:viewport.h*.5+viewport.y,left:viewport.w*.5+viewport.x}))},getViewport:function(){var locked=F.current&&F.current.locked||!1,rez={x:W.scrollLeft(),y:W.scrollTop()};return locked?(rez.w=locked[0].clientWidth,rez.h=locked[0].clientHeight):(rez.w=isTouch&&window.innerWidth?window.innerWidth:W.width(),rez.h=isTouch&&window.innerHeight?window.innerHeight:W.height()),rez},unbindEvents:function(){F.wrap&&isQuery(F.wrap)&&F.wrap.unbind(".fb");D.unbind(".fb");W.unbind(".fb")},bindEvents:function(){var current=F.current,keys;current&&(W.bind("orientationchange.fb"+(isTouch?"":" resize.fb")+(current.autoCenter&&!current.locked?" scroll.fb":""),F.update),keys=current.keys,keys&&D.bind("keydown.fb",function(e){var code=e.which||e.keyCode,target=e.target||e.srcElement;if(code===27&&F.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||target&&(target.type||$(target).is("[contenteditable]"))||$.each(keys,function(i,val){return current.group.length>1&&val[code]!==undefined?(F[i](val[code]),e.preventDefault(),!1):$.inArray(code,val)>-1?(F[i](),e.preventDefault(),!1):void 0})}),$.fn.mousewheel&¤t.mouseWheel&&F.wrap.bind("mousewheel.fb",function(e,delta,deltaX,deltaY){for(var target=e.target||null,parent=$(target),canScroll=!1;parent.length;){if(canScroll||parent.is(".fancybox-skin")||parent.is(".fancybox-wrap"))break;canScroll=isScrollable(parent[0]);parent=$(parent).parent()}delta===0||canScroll||F.group.length>1&&!current.canShrink&&(deltaY>0||deltaX>0?F.prev(deltaY>0?"down":"left"):(deltaY<0||deltaX<0)&&F.next(deltaY<0?"up":"right"),e.preventDefault())}))},trigger:function(event,o){var ret,obj=o||F.coming||F.current;if(obj){if($.isFunction(obj[event])&&(ret=obj[event].apply(obj,Array.prototype.slice.call(arguments,1))),ret===!1)return!1;obj.helpers&&$.each(obj.helpers,function(helper,opts){opts&&F.helpers[helper]&&$.isFunction(F.helpers[helper][event])&&(opts=$.extend(!0,{},F.helpers[helper].defaults,opts),F.helpers[helper][event](opts,obj))});$.event.trigger(event+".fb")}},isImage:function(str){return isString(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(str){return isString(str)&&str.match(/\.(swf)((\?|#).*)?$/i)},_start:function(index){var coming={},obj,href,type,margin,padding;if(index=getScalar(index),obj=F.group[index]||null,!obj)return!1;if(coming=$.extend(!0,{},F.opts,obj),margin=coming.margin,padding=coming.padding,$.type(margin)==="number"&&(coming.margin=[margin,margin,margin,margin]),$.type(padding)==="number"&&(coming.padding=[padding,padding,padding,padding]),coming.modal&&$.extend(!0,coming,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),coming.autoSize&&(coming.autoWidth=coming.autoHeight=!0),coming.width==="auto"&&(coming.autoWidth=!0),coming.height==="auto"&&(coming.autoHeight=!0),coming.group=F.group,coming.index=index,F.coming=coming,!1===F.trigger("beforeLoad")){F.coming=null;return}if(type=coming.type,href=coming.href,!type)return(F.coming=null,F.current&&F.router&&F.router!=="jumpto")?(F.current.index=index,F[F.router](F.direction)):!1;if(F.isActive=!0,(type==="image"||type==="swf")&&(coming.autoHeight=coming.autoWidth=!1,coming.scrolling="visible"),type==="image"&&(coming.aspectRatio=!0),type==="iframe"&&isTouch&&(coming.scrolling="scroll"),coming.wrap=$(coming.tpl.wrap).addClass("fancybox-"+(isTouch?"mobile":"desktop")+" fancybox-type-"+type+" fancybox-tmp "+coming.wrapCSS).appendTo(coming.parent||"body"),$.extend(coming,{skin:$(".fancybox-skin",coming.wrap),outer:$(".fancybox-outer",coming.wrap),inner:$(".fancybox-inner",coming.wrap)}),$.each(["Top","Right","Bottom","Left"],function(i,v){coming.skin.css("padding"+v,getValue(coming.padding[i]))}),F.trigger("onReady"),type==="inline"||type==="html"){if(!coming.content||!coming.content.length)return F._error("content")}else if(!href)return F._error("href");type==="image"?F._loadImage():type==="ajax"?F._loadAjax():type==="iframe"?F._loadIframe():F._afterLoad()},_error:function(type){$.extend(F.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:type,content:F.coming.tpl.error});F._afterLoad()},_loadImage:function(){var img=F.imgPreload=new Image;img.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width;F.coming.height=this.height;F._afterLoad()};img.onerror=function(){this.onload=this.onerror=null;F._error("image")};img.src=F.coming.href;img.complete!==!0&&F.showLoading()},_loadAjax:function(){var coming=F.coming;F.showLoading();F.ajaxLoad=$.ajax($.extend({},coming.ajax,{url:coming.href,error:function(jqXHR,textStatus){F.coming&&textStatus!=="abort"?F._error("ajax",jqXHR):F.hideLoading()},success:function(data,textStatus){textStatus==="success"&&(coming.content=data,F._afterLoad())}}))},_loadIframe:function(){var coming=F.coming,iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",isTouch?"auto":coming.iframe.scrolling).attr("src",coming.href);if($(coming.wrap).bind("onReset",function(){try{$(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}}),coming.iframe.preload){F.showLoading();iframe.one("load",function(){$(this).data("ready",1);isTouch||$(this).bind("load.fb",F.update);$(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();F._afterLoad()})}coming.content=iframe.appendTo(coming.inner);coming.iframe.preload||F._afterLoad()},_preloadImages:function(){for(var group=F.group,current=F.current,len=group.length,cnt=current.preload?Math.min(current.preload,len-1):0,item,i=1;i<=cnt;i+=1)item=group[(current.index+i)%len],item.type==="image"&&item.href&&((new Image).src=item.href)},_afterLoad:function(){var coming=F.coming,previous=F.current,placeholder="fancybox-placeholder",current,content,type,scrolling,href,embed;if(F.hideLoading(),coming&&F.isActive!==!1){if(!1===F.trigger("afterLoad",coming,previous)){coming.wrap.stop(!0).trigger("onReset").remove();F.coming=null;return}previous&&(F.trigger("beforeChange",previous),previous.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());F.unbindEvents();current=coming;content=coming.content;type=coming.type;scrolling=coming.scrolling;$.extend(F,{wrap:current.wrap,skin:current.skin,outer:current.outer,inner:current.inner,current:current,previous:previous});href=current.href;switch(type){case"inline":case"ajax":case"html":current.selector?content=$("<div>").html(content).find(current.selector):isQuery(content)&&(content.data(placeholder)||content.data(placeholder,$('<div class="'+placeholder+'"><\/div>').insertAfter(content).hide()),content=content.show().detach(),current.wrap.bind("onReset",function(){$(this).find(content).length&&content.hide().replaceAll(content.data(placeholder)).data(placeholder,!1)}));break;case"image":content=current.tpl.image.replace("{href}",href);break;case"swf":content='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+href+'"><\/param>';embed="";$.each(current.swf,function(name,val){content+='<param name="'+name+'" value="'+val+'"><\/param>';embed+=" "+name+'="'+val+'"'});content+='<embed src="'+href+'" type="application/x-shockwave-flash" width="100%" height="100%"'+embed+"><\/embed><\/object>"}isQuery(content)&&content.parent().is(current.inner)||current.inner.append(content);F.trigger("beforeShow");current.inner.css("overflow",scrolling==="yes"?"scroll":scrolling==="no"?"hidden":scrolling);F._setDimension();F.reposition();F.isOpen=!1;F.coming=null;F.bindEvents();F.isOpened?previous.prevMethod&&F.transitions[previous.prevMethod]():$(".fancybox-wrap").not(current.wrap).stop(!0).trigger("onReset").remove();F.transitions[F.isOpened?current.nextMethod:current.openMethod]();F._preloadImages()}},_setDimension:function(){var viewport=F.getViewport(),steps=0,canShrink=!1,canExpand=!1,wrap=F.wrap,skin=F.skin,inner=F.inner,current=F.current,width=current.width,height=current.height,minWidth=current.minWidth,minHeight=current.minHeight,maxWidth=current.maxWidth,maxHeight=current.maxHeight,scrolling=current.scrolling,scrollOut=current.scrollOutside?current.scrollbarWidth:0,margin=current.margin,wMargin=getScalar(margin[1]+margin[3]),hMargin=getScalar(margin[0]+margin[2]),wPadding,hPadding,wSpace,hSpace,origWidth,origHeight,origMaxWidth,origMaxHeight,ratio,width_,height_,maxWidth_,maxHeight_,iframe,body;if(wrap.add(skin).add(inner).width("auto").height("auto").removeClass("fancybox-tmp"),wPadding=getScalar(skin.outerWidth(!0)-skin.width()),hPadding=getScalar(skin.outerHeight(!0)-skin.height()),wSpace=wMargin+wPadding,hSpace=hMargin+hPadding,origWidth=isPercentage(width)?(viewport.w-wSpace)*getScalar(width)/100:width,origHeight=isPercentage(height)?(viewport.h-hSpace)*getScalar(height)/100:height,current.type==="iframe"){if(iframe=current.content,current.autoHeight&&iframe.data("ready")===1)try{iframe[0].contentWindow.document.location&&(inner.width(origWidth).height(9999),body=iframe.contents().find("body"),scrollOut&&body.css("overflow-x","hidden"),origHeight=body.height())}catch(e){}}else(current.autoWidth||current.autoHeight)&&(inner.addClass("fancybox-tmp"),current.autoWidth||inner.width(origWidth),current.autoHeight||inner.height(origHeight),current.autoWidth&&(origWidth=inner.width()),current.autoHeight&&(origHeight=inner.height()),inner.removeClass("fancybox-tmp"));if(width=getScalar(origWidth),height=getScalar(origHeight),ratio=origWidth/origHeight,minWidth=getScalar(isPercentage(minWidth)?getScalar(minWidth,"w")-wSpace:minWidth),maxWidth=getScalar(isPercentage(maxWidth)?getScalar(maxWidth,"w")-wSpace:maxWidth),minHeight=getScalar(isPercentage(minHeight)?getScalar(minHeight,"h")-hSpace:minHeight),maxHeight=getScalar(isPercentage(maxHeight)?getScalar(maxHeight,"h")-hSpace:maxHeight),origMaxWidth=maxWidth,origMaxHeight=maxHeight,current.fitToView&&(maxWidth=Math.min(viewport.w-wSpace,maxWidth),maxHeight=Math.min(viewport.h-hSpace,maxHeight)),maxWidth_=viewport.w-wMargin,maxHeight_=viewport.h-hMargin,current.aspectRatio?(width>maxWidth&&(width=maxWidth,height=getScalar(width/ratio)),height>maxHeight&&(height=maxHeight,width=getScalar(height*ratio)),width<minWidth&&(width=minWidth,height=getScalar(width/ratio)),height<minHeight&&(height=minHeight,width=getScalar(height*ratio))):(width=Math.max(minWidth,Math.min(width,maxWidth)),current.autoHeight&¤t.type!=="iframe"&&(inner.width(width),height=inner.height()),height=Math.max(minHeight,Math.min(height,maxHeight))),current.fitToView)if(inner.width(width).height(height),wrap.width(width+wPadding),width_=wrap.width(),height_=wrap.height(),current.aspectRatio)while((width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight){if(steps++>19)break;height=Math.max(minHeight,Math.min(maxHeight,height-10));width=getScalar(height*ratio);width<minWidth&&(width=minWidth,height=getScalar(width/ratio));width>maxWidth&&(width=maxWidth,height=getScalar(width/ratio));inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height()}else width=Math.max(minWidth,Math.min(width,width-(width_-maxWidth_))),height=Math.max(minHeight,Math.min(height,height-(height_-maxHeight_)));scrollOut&&scrolling==="auto"&&height<origHeight&&width+wPadding+scrollOut<maxWidth_&&(width+=scrollOut);inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();canShrink=(width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight;canExpand=current.aspectRatio?width<origMaxWidth&&height<origMaxHeight&&width<origWidth&&height<origHeight:(width<origMaxWidth||height<origMaxHeight)&&(width<origWidth||height<origHeight);$.extend(current,{dim:{width:getValue(width_),height:getValue(height_)},origWidth:origWidth,origHeight:origHeight,canShrink:canShrink,canExpand:canExpand,wPadding:wPadding,hPadding:hPadding,wrapSpace:height_-skin.outerHeight(!0),skinSpace:skin.height()-height});!iframe&¤t.autoHeight&&height>minHeight&&height<maxHeight&&!canExpand&&inner.height("auto")},_getPosition:function(onlyAbsolute){var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:"absolute",top:margin[0],left:margin[3]};return current.autoCenter&¤t.fixed&&!onlyAbsolute&&height<=viewport.h&&width<=viewport.w?rez.position="fixed":current.locked||(rez.top+=viewport.y,rez.left+=viewport.x),rez.top=getValue(Math.max(rez.top,rez.top+(viewport.h-height)*current.topRatio)),rez.left=getValue(Math.max(rez.left,rez.left+(viewport.w-width)*current.leftRatio)),rez},_afterZoomIn:function(){var current=F.current;current&&(F.isOpen=F.isOpened=!0,F.wrap.css("overflow","visible").addClass("fancybox-opened"),F.update(),(current.closeClick||current.nextClick&&F.group.length>1)&&F.inner.css("cursor","pointer").bind("click.fb",function(e){$(e.target).is("a")||$(e.target).parent().is("a")||(e.preventDefault(),F[current.closeClick?"close":"next"]())}),current.closeBtn&&$(current.tpl.closeBtn).appendTo(F.skin).bind("click.fb",function(e){e.preventDefault();F.close()}),current.arrows&&F.group.length>1&&((current.loop||current.index>0)&&$(current.tpl.prev).appendTo(F.outer).bind("click.fb",F.prev),(current.loop||current.index<F.group.length-1)&&$(current.tpl.next).appendTo(F.outer).bind("click.fb",F.next)),F.trigger("afterShow"),current.loop||current.index!==current.group.length-1?F.opts.autoPlay&&!F.player.isActive&&(F.opts.autoPlay=!1,F.play()):F.play(!1))},_afterZoomOut:function(obj){obj=obj||F.current;$(".fancybox-wrap").trigger("onReset").remove();$.extend(F,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});F.trigger("afterClose",obj)}});F.transitions={getOrigPosition:function(){var current=F.current,element=current.element,orig=current.orig,pos={},width=50,height=50,hPadding=current.hPadding,wPadding=current.wPadding,viewport=F.getViewport();return!orig&¤t.isDom&&element.is(":visible")&&(orig=element.find("img:first"),orig.length||(orig=element)),isQuery(orig)?(pos=orig.offset(),orig.is("img")&&(width=orig.outerWidth(),height=orig.outerHeight())):(pos.top=viewport.y+(viewport.h-height)*current.topRatio,pos.left=viewport.x+(viewport.w-width)*current.leftRatio),(F.wrap.css("position")==="fixed"||current.locked)&&(pos.top-=viewport.y,pos.left-=viewport.x),{top:getValue(pos.top-hPadding*current.topRatio),left:getValue(pos.left-wPadding*current.leftRatio),width:getValue(width+wPadding),height:getValue(height+hPadding)}},step:function(now,fx){var ratio,padding,value,prop=fx.prop,current=F.current,wrapSpace=current.wrapSpace,skinSpace=current.skinSpace;(prop==="width"||prop==="height")&&(ratio=fx.end===fx.start?1:(now-fx.start)/(fx.end-fx.start),F.isClosing&&(ratio=1-ratio),padding=prop==="width"?current.wPadding:current.hPadding,value=now-padding,F.skin[prop](getScalar(prop==="width"?value:value-wrapSpace*ratio)),F.inner[prop](getScalar(prop==="width"?value:value-wrapSpace*ratio-skinSpace*ratio)))},zoomIn:function(){var current=F.current,startPos=current.pos,effect=current.openEffect,elastic=effect==="elastic",endPos=$.extend({opacity:1},startPos);delete endPos.position;elastic?(startPos=this.getOrigPosition(),current.openOpacity&&(startPos.opacity=.1)):effect==="fade"&&(startPos.opacity=.1);F.wrap.css(startPos).animate(endPos,{duration:effect==="none"?0:current.openSpeed,easing:current.openEasing,step:elastic?this.step:null,complete:F._afterZoomIn})},zoomOut:function(){var current=F.current,effect=current.closeEffect,elastic=effect==="elastic",endPos={opacity:.1};elastic&&(endPos=this.getOrigPosition(),current.closeOpacity&&(endPos.opacity=.1));F.wrap.animate(endPos,{duration:effect==="none"?0:current.closeSpeed,easing:current.closeEasing,step:elastic?this.step:null,complete:F._afterZoomOut})},changeIn:function(){var current=F.current,effect=current.nextEffect,startPos=current.pos,endPos={opacity:1},direction=F.direction,distance=200,field;startPos.opacity=.1;effect==="elastic"&&(field=direction==="down"||direction==="up"?"top":"left",direction==="down"||direction==="right"?(startPos[field]=getValue(getScalar(startPos[field])-distance),endPos[field]="+="+distance+"px"):(startPos[field]=getValue(getScalar(startPos[field])+distance),endPos[field]="-="+distance+"px"));effect==="none"?F._afterZoomIn():F.wrap.css(startPos).animate(endPos,{duration:current.nextSpeed,easing:current.nextEasing,complete:F._afterZoomIn})},changeOut:function(){var previous=F.previous,effect=previous.prevEffect,endPos={opacity:.1},direction=F.direction;effect==="elastic"&&(endPos[direction==="down"||direction==="up"?"top":"left"]=(direction==="up"||direction==="left"?"-":"+")+"=200px");previous.wrap.animate(endPos,{duration:effect==="none"?0:previous.prevSpeed,easing:previous.prevEasing,complete:function(){$(this).trigger("onReset").remove()}})}};F.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!isTouch,fixed:!0},overlay:null,fixed:!1,create:function(opts){opts=$.extend({},this.defaults,opts);this.overlay&&this.close();this.overlay=$('<div class="fancybox-overlay"><\/div>').appendTo("body");this.fixed=!1;opts.fixed&&F.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(opts){var that=this;opts=$.extend({},this.defaults,opts);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(opts);this.fixed||(W.bind("resize.overlay",$.proxy(this.update,this)),this.update());opts.closeClick&&this.overlay.bind("click.overlay",function(e){$(e.target).hasClass("fancybox-overlay")&&(F.isActive?F.close():that.close())});this.overlay.css(opts.css).show()},close:function(){$(".fancybox-overlay").remove();W.unbind("resize.overlay");this.overlay=null;this.margin!==!1&&($("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var width="100%",offsetWidth;this.overlay.width(width).height("100%");IE?(offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),D.width()>offsetWidth&&(width=D.width())):D.width()>W.width()&&(width=D.width());this.overlay.width(width).height(D.height())},onReady:function(opts,obj){$(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=D.height()>W.height()||$("body").css("overflow-y")==="scroll"?$("body").css("margin-right"):!1,this.el=document.all&&!document.querySelector?$("html"):$("body"),this.create(opts));opts.locked&&this.fixed&&(obj.locked=this.overlay.append(obj.wrap),obj.fixed=!1);opts.showEarly===!0&&this.beforeShow.apply(this,arguments)},beforeShow:function(opts,obj){obj.locked&&(this.el.addClass("fancybox-lock"),this.margin!==!1&&$("body").css("margin-right",getScalar(this.margin)+obj.scrollbarWidth));this.open(opts)},onUpdate:function(){this.fixed||this.update()},afterClose:function(opts){this.overlay&&!F.isActive&&this.overlay.fadeOut(opts.speedOut,$.proxy(this.close,this))}};F.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(opts){var current=F.current,text=current.title,type=opts.type,title,target;if($.isFunction(text)&&(text=text.call(current.element,current)),isString(text)&&$.trim(text)!==""){title=$('<div class="fancybox-title fancybox-title-'+type+'-wrap">'+text+"<\/div>");switch(type){case"inside":target=F.skin;break;case"outside":target=F.wrap;break;case"over":target=F.inner;break;default:target=F.skin;title.appendTo("body");IE&&title.width(title.width());title.wrapInner('<span class="child"><\/span>');F.current.margin[2]+=Math.abs(getScalar(title.css("margin-bottom")))}title[opts.position==="top"?"prependTo":"appendTo"](target)}}};$.fn.fancybox=function(options){var index,that=$(this),selector=this.selector||"",run=function(e){var what=$(this).blur(),idx=index,relType,relVal;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||what.is(".fancybox-wrap")||(relType=options.groupAttr||"data-fancybox-group",relVal=what.attr(relType),relVal||(relType="rel",relVal=what.get(0)[relType]),relVal&&relVal!==""&&relVal!=="nofollow"&&(what=selector.length?$(selector):that,what=what.filter("["+relType+'="'+relVal+'"]'),idx=what.index(this)),options.index=idx,F.open(what,options)!==!1&&e.preventDefault())};return options=options||{},index=options.index||0,selector&&options.live!==!1?D.undelegate(selector,"click.fb-start").delegate(selector+":not('.fancybox-item, .fancybox-nav')","click.fb-start",run):that.unbind("click.fb-start").bind("click.fb-start",run),this.filter("[data-fancybox-start=1]").trigger("click"),this};D.ready(function(){$.scrollbarWidth===undefined&&($.scrollbarWidth=function(){var parent=$('<div style="width:50px;height:50px;overflow:auto"><div/><\/div>').appendTo("body"),child=parent.children(),width=child.innerWidth()-child.height(99).innerWidth();return parent.remove(),width});$.support.fixedPosition===undefined&&($.support.fixedPosition=function(){var elem=$('<div style="position:fixed;top:20px;"><\/div>').appendTo("body"),fixed=elem[0].offsetTop===20||elem[0].offsetTop===15;return elem.remove(),fixed}());$.extend(F.defaults,{scrollbarWidth:$.scrollbarWidth(),fixed:$.support.fixedPosition,parent:$("body")})})})(window,document,jQuery);$(document).ready(function(){});Vendd.Scripts.load(function(){$("html").hasClass("touch")||stickyHeader();stickySubMenu()});searchHoverActive=!1;Vendd.Scripts.load(function(){var $wrapper=$(".footer-expander");$wrapper.length<1||(responsiveExpandMenu(),backToTop())});Vendd.Scripts.load(function(){var valEngine,observable,$wrapper=$(".x-callmeback-form"),wrapper;if(!($wrapper.length<1)){$submitButton=$(".js-submit-button",$wrapper);wrapper=$wrapper.get(0);wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")};wrapper.onSuccess=function(envelope){wrapper.loading(!1);var data=envelope.message.data;data?($(".js-error",$wrapper).hide(),$(".js-content",$wrapper).hide(),$(".js-success",$wrapper).show()):$(".js-error",$wrapper).show()};wrapper.onFailure=function(envelope){wrapper.loading(!1);console.log(envelope.message.data);$(".js-error",$wrapper).show()};wrapper.submit=function(){wrapper.loading(!0);observable.model.sfakianakisAEBE=$("#sfakianakisAEBE_CallBack",$wrapper)[0].checked;observable.model.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup_CallBack",$wrapper)[0].checked;observable.model.emailcheckbox=$("#emailconsent_CallBack",$wrapper)[0].checked;observable.model.phonecheckbox=$("#phoneconsent_CallBack",$wrapper)[0].checked;observable.model.postcheckbox=$("#post_CallBack",$wrapper)[0].checked;observable.model.smscheckbox=$("#sms_CallBack",$wrapper)[0].checked;Vendd.MessageBus.publishAsync(wrapper,new Vendd.CallMeBack.Messages.Submit(observable))};$wrapper.on("click",".js-submit-button",function(e){e.preventDefault();e.stopPropagation();wrapper.validate();wrapper.submit()});$wrapper.on("focusout",".input-wrapper, .textarea-wrapper",function(){$(".error-wrapper",$(this.parentElement)).children().hide()});$("#CallMeBackFormConsent",$wrapper).on("change",function(){var $this=$(this);$this.hasClass("checked")?($this.removeClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","")):($this.addClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","checked"));$this.prop("checked")&&$(this).closest(".form-row").find(".error-wrapper").children().hide()});wrapper.onValidationError=function(envelope){var errors=envelope.message.data.errors;$.each(errors,function(index,error){error.Property==="FirstName"&&$(".firstname-required",$wrapper).show();error.Property==="Phone"&&(error.Rule==="required"&&$(".phone-required",$wrapper).show(),error.Rule==="isNumeric"&&$(".phone-required",$wrapper).show());error.Property==="CallBackSfakianakis"&&error.Rule==="checkboxRequired"&&$(".CallBackSfakianakis-required",$wrapper).show();error.Property==="CallMeBackFormConsent"&&error.Rule==="checkboxRequired"&&$(".CallMeBackFormConsent-required",$wrapper).show()})};wrapper.validate=function(){observable.model.CallMeBackFormConsent=$("[name='CallMeBackFormConsent']",$wrapper).prop("checked");observable.model.CallBackSfakianakis=$("[name='CallBackSfakianakis']",$wrapper).prop("checked");console.log(observable.model);var valOptions={ValidationEngine:valEngine,valmodel:observable.model};Vendd.DataValidation.ValidateModel(valOptions)};observable=Vendd.CallMeBack.CreateCallMeBackInfo();Vendd.Databinding.CreateControlDatabindings(wrapper,observable);valEngine=Vendd.CallMeBack.CreateDefaultCallMeBackInfoValidationModel(observable);Vendd.MessageBus.subscribe(Vendd.CallMeBack.Messages.SubmitSuccess,wrapper,wrapper.onSuccess);Vendd.MessageBus.subscribe(Vendd.CallMeBack.Messages.SubmitFailure,wrapper,wrapper.onFailure);Vendd.MessageBus.subscribe(Vendd.DataValidation.Messages.ValidationError,wrapper,wrapper.onValidationError)}});Vendd.Scripts.load(function(){var documentTitle=document.title.split("|")[0],selectedBrand="",$wrapper=$(".site-container");window.dataLayer=window.dataLayer||[];$wrapper.on("click",".x-stores-button",function(){dataLayer.push({event:"generate_lead_shift_stores",page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.Offer.Messages.SubmitSuccess,"analytics",function(envelope){var brand=$("[data-brand]").attr("data-brand"),success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_offer_form",brand:brand,page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.AfterSalesOffer.Messages.SubmitSuccess,"analytics",function(envelope){var brand=$("[data-brand]").attr("data-brand"),formSpecificity=$("[data-item-template]").attr("data-item-template")?"service_form_brand":"aftersales_form_offer",success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_"+formSpecificity,brand:brand,page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.CompanySales.Messages.SubmitSuccess,"analytics",function(envelope){var success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_companySales_form",brand:"",page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.TestDrive.Messages.Submit,"analytics",function(envelope){selectedBrand=envelope.message.data.brands||""});Vendd.MessageBus.subscribe(Vendd.TestDrive.Messages.SubmitSuccess,"analytics",function(envelope){var success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_testdrive_form",brand:selectedBrand,page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.ServiceForm.Messages.Submit,"analytics",function(envelope){selectedBrand=envelope.message.data.service.brand||""});Vendd.MessageBus.subscribe(Vendd.ServiceForm.Messages.SubmitSuccess,"analytics",function(envelope){var success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_service_form",brand:selectedBrand,page_title:documentTitle})});Vendd.MessageBus.subscribe(Vendd.Contact.Messages.SubmitSuccess,"analytics",function(envelope){var success=envelope.message.data.success;success&&dataLayer.push({event:"generate_lead_contact_form",brand:"",page_title:documentTitle})})}); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.core.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){function c(b,c){var e=b.nodeName.toLowerCase(),f,g,h;return"area"===e?(f=b.parentNode,g=f.name,!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))):(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}(a.ui=a.ui||{},a.ui.version)||(a.extend(a.ui,{version:"1.8.23",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var d=a(this[0]),e,f;d.length&&d[0]!==document;){if(e=d.css("position"),(e==="absolute"||e==="relative"||e==="fixed")&&(f=parseInt(d.css("zIndex"),10),!isNaN(f)&&f!==0))return f;d=d.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0;d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0);f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})};a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight;a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=c.offsetHeight===100;a.support.selectstart="onselectstart"in c;b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype,f;for(f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b],e;if(d&&a.element[0].parentNode)for(e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.widget.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){var c,d;a.cleanData?(c=a.cleanData,a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}):(d=a.fn.remove,a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})});a.widget=function(b,c,d){var e=b.split(".")[0],f,g;b=b.split(".")[1];f=e+"-"+b;d||(d=c,c=a.Widget);a.expr[":"][f]=function(c){return!!a.data(c,b)};a[e]=a[e]||{};a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};g=new c;g.options=a.extend(!0,{},g.options);a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d);a.widget.bridge(b,a[e][b])};a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={};e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent,f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.mouse.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a){var c=!1;a(document).mouseup(function(){c=!1});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;return!e||f||!this._mouseCapture(b)?!0:(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted))?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0)}},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.accordion.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options,d,e;b.running=0;b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");c.navigation&&(d=b.element.find("a").filter(c.navigationFilter).eq(0),d.length&&(e=d.closest(".ui-accordion-header"),b.active=e.length?e:d.closest(".ui-accordion-content").prev()));b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");b.active.next().addClass("ui-accordion-content-active");b._createIcons();b.resize();b.element.attr("role","tablist");b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel");b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0);a.browser.safari||b.headers.find("a").attr("tabIndex",-1);c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this);a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("<span><\/span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options,c;return this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons(),c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled"),(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);b=="active"&&this.activate(c);b=="icons"&&(this._destroyIcons(),c&&this._createIcons());b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(!this.options.disabled&&!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target);b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0}},resize:function(){var b=this.options,c,d;return b.fillSpace?(a.browser.msie&&(d=this.element.parent().css("overflow"),this.element.parent().css("overflow","hidden")),c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)),this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options,h,i;if(!d.disabled){if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}if(h=a(b.currentTarget||c),i=h[0]===this.active[0],d.active=d.collapsible&&i?!1:this.headers.index(h),!this.running&&(d.collapsible||!i)){var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h;this._toggle(g,e,f,i,k);j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return}}},_toggle:function(b,c,d,e,f){var g=this,h=g.options,i,j;if(g.toShow=b,g.toHide=c,g.data=d,i=function(){if(g)return g._completed.apply(g,arguments)},g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size(),h.animated){j={};j=h.collapsible&&e?{toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:{toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace};h.proxied||(h.proxied=h.animated);h.proxiedDuration||(h.proxiedDuration=h.duration);h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied;h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;!m||k[m]||a.easing[m]||(m="slide");k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})});k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){(this.running=a?0:--this.running,this.running)||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}});a.extend(a.ui.accordion,{version:"1.8.23",animations:{slide:function(b,c){if(b=a.extend({easing:"swing",duration:300},b,c),!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},i,j=b.toShow;i=j[0].style.width;j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0));a.each(["height","paddingTop","paddingBottom"],function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}});b.toShow.css({height:0,overflow:"hidden"}).show();b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start==0?0:(c.now-c.start)/(c.end-c.start));b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height","");b.toShow.css({width:i,overflow:d});b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.slider.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),g=d.values&&d.values.length||1,h=[],i;for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div><\/div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:""))),i=e.length;i<g;i+=1)h.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'><\/a>");this.handles=e.add(a(h.join("")).appendTo(b.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d.preventDefault(),!b._keySliding&&(b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e),f===!1))return}i=b.options.step;g=b.options.values&&b.options.values.length?h=b.values(e):h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))});this._refreshValue();this._animateOff=!1},destroy:function(){return 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(),this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a);this._refreshValue();this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(c);this._refreshValue();this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length);a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b),b;for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100;g[d.orientation==="horizontal"?"left":"bottom"]=f+"%";a(this).stop(1,1)[e?"animate":"css"](g,c.animate);d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate})));h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}});a.extend(a.ui.slider,{version:"1.8.23"})})(jQuery); /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.tabs.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div><\/div>",remove:null,select:null,show:null,spinner:"<em>Loading…<\/em>",tabTemplate:"<li><a href='#{href}'><span>#{label}<\/span><\/a><\/li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display","");!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/,g,h,i,j,k,l,n,o;for(this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i,j,k;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);f.test(g)?d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g))):g&&g!=="#"?(a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,"")),j=d._tabId(c),c.href="#"+j,k=d.element.find("#"+j),k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)):e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs");d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie),g=0;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");e.event!=="mouseover"&&(i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)},this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))}));e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active");c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l);d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active");c.removeClass("ui-tabs-hide");d._trigger("show",null,d._ui(b,c[0]))};o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");m(b,k);d.element.dequeue("tabs")})}:function(a,b){d.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;if(e.selected=d.anchors.index(this),d.abort(),e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}if(e.cookie&&d._cookie(e.selected,e.cookie),g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs"),c;b&&(this.href=b);c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){var j;e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");return h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0),j=f.element.find("#"+i),j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a){return a!=b}),function(a){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)!=-1)return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){if(a=this._getIndex(a),a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){var g;b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");if(this.abort(),!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}return this.lis.eq(b).addClass("ui-state-processing"),d.spinner&&(g=a("span",e),g.data("label.tabs",g.html()).html(d.spinner)),this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f);c._cleanup();d.cache&&a.data(e,"cache.tabs",!0);c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f){c._cleanup();c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.23"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation);c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a);b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t+b:-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t*t+b:c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t*t*t+b:-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t*t*t*t+b:c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){return t==0?b:t==d?b+c:(t/=d/2)<1?c/2*Math.pow(2,10*(t-1))+b:c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){return(t/=d/2)<1?-c/2*(Math.sqrt(1-t*t)-1)+b:c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;return t==0?b:(t/=d)==1?b+c:(p||(p=d*.3),a<Math.abs(c)?(a=c,s=p/4):s=p/(2*Math.PI)*Math.asin(c/a),-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p))+b)},easeOutElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;return t==0?b:(t/=d)==1?b+c:(p||(p=d*.3),a<Math.abs(c)?(a=c,s=p/4):s=p/(2*Math.PI)*Math.asin(c/a),a*Math.pow(2,-10*t)*Math.sin((t*d-s)*2*Math.PI/p)+c+b)},easeInOutElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;return t==0?b:(t/=d/2)==2?b+c:(p||(p=d*.3*1.5),a<Math.abs(c)?(a=c,s=p/4):s=p/(2*Math.PI)*Math.asin(c/a),t<1)?-.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)+b:a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){return s==undefined&&(s=1.70158),c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){return s==undefined&&(s=1.70158),c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){return(s==undefined&&(s=1.70158),(t/=d/2)<1)?c/2*t*t*(((s*=1.525)+1)*t-s)+b:c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){return(t/=d)<1/2.75?c*7.5625*t*t+b:t<2/2.75?c*(7.5625*(t-=1.5/2.75)*t+.75)+b:t<2.5/2.75?c*(7.5625*(t-=2.25/2.75)*t+.9375)+b:c*(7.5625*(t-=2.625/2.75)*t+.984375)+b},easeInOutBounce:function(x,t,b,c,d){return t<d/2?jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b:jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}}),function($){Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){var t,len,n,k;if(this===void 0||this===null)throw new TypeError;if((t=Object(this),len=t.length>>>0,len===0)||(n=0,arguments.length>0&&(n=Number(arguments[1]),n!==n?n=0:n!==0&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len))return-1;for(k=n>=0?n:Math.max(len-Math.abs(n),0);k<len;k++)if(k in t&&t[k]===searchElement)return k;return-1});$.fn.extend({getSetSSValue:function(value){return value?($(this).val(value).change(),this):$(this).find(":selected").val()},resetSS:function(){var oldOpts=$(this).data("ssOpts");$this=$(this);$this.next().remove();$this.unbind(".sSelect").sSelect(oldOpts)}});$.fn.sSelect=function(options){return this.each(function(){function addItem(item,container){var option=$(item).text(),key=$(item).val(),isDisabled=$(item).is(":disabled"),dataAttr=getDataAttributes($(item));isDisabled||$(item).parents().is(":disabled")||keys.push(option.charAt(0).toLowerCase());container.append($("<li "+(typeof dataAttr!="undefined"?dataAttr:"")+"><a"+(isDisabled?' class="newListItemDisabled"':"")+' href="JavaScript:void(0);">'+option+"<\/a><\/li>").data({key:key,selected:$(item).is(":selected")}))}function getDataAttributes(object){var ds=object[0].dataset,dataAttr,key;if(Object.keys(ds).length){dataAttr="";for(key in ds)ds.hasOwnProperty(key)&&(dataAttr+=" data-"+key+"='"+ds[key]+"' ");return dataAttr}}function newUlPos(){var containerPosY=$containerDiv.offset().top,docHeight=$(window).height(),scrollTop=$(window).scrollTop();newUlHeight>parseInt(opts.ddMaxHeight)&&(newUlHeight=parseInt(opts.ddMaxHeight));containerPosY=containerPosY-scrollTop;containerPosY+newUlHeight>=docHeight?($newUl.css({height:newUlHeight}),$containerDivWrapper.css({top:"-"+newUlHeight+"px",height:newUlHeight}),$input.onTop=!0):($newUl.css({height:newUlHeight}),$containerDivWrapper.css({top:containerHeight+"px",height:newUlHeight}),$input.onTop=!1)}function positionFix(){$containerDiv.css("position","relative")}function positionHideFix(){$containerDiv.css({position:"static"})}function closeDropDown(fireChange,resetText){fireChange==!0&&(prevIndex=currentIndex,$input.change());resetText==!0&&(currentIndex=prevIndex,navigateList(currentIndex));$containerDivWrapper.hide();positionHideFix()}function navigateList(currentIndex,fireChange){if(currentIndex==-1)$containerDivText.text(opts.defaultText),$newLi.removeClass("hiLite");else{$newLi.removeClass("hiLite").eq(currentIndex).addClass("hiLite");var text=$newLi.eq(currentIndex).text(),val=$newLi.eq(currentIndex).parent().data("key");try{$input.val(val)}catch(ex){$input[0].selectedIndex=currentIndex}if($containerDivText.text(text),fireChange==!0&&(prevIndex=currentIndex,$input.change()),$containerDivWrapper.is(":visible"))try{$newLi.eq(currentIndex).focus()}catch(ex){}}}function keyPress(element){$(element).unbind("keydown.sSelect").bind("keydown.sSelect",function(e){var keycode=e.which,currentKeyIndex;prevented=!0;switch(keycode){case 39:return incrementList(),!1;case 37:return decrementList(),!1;case 33:case 36:return gotoFirst(),!1;case 34:case 35:return gotoLast(),!1;case 13:case 27:return closeDropDown(!0),!1;case 9:return closeDropDown(!0),nextFormElement(),!1}return keyPressed=String.fromCharCode(keycode).toLowerCase(),currentKeyIndex=keys.indexOf(keyPressed),typeof currentKeyIndex!="undefined"?(++currentIndex,currentIndex=keys.indexOf(keyPressed,currentIndex),(currentIndex==-1||currentIndex==null||prevKey!=keyPressed)&&(currentIndex=keys.indexOf(keyPressed)),navigateList(currentIndex),prevKey=keyPressed,!1):void 0})}function incrementList(){currentIndex<newLiLength-1&&(++currentIndex,navigateList(currentIndex))}function decrementList(){currentIndex>0&&(--currentIndex,navigateList(currentIndex))}function gotoFirst(){currentIndex=0;navigateList(currentIndex)}function gotoLast(){currentIndex=newLiLength-1;navigateList(currentIndex)}function nextFormElement(){var fields=$("body").find("button,input,textarea,select"),index=fields.index($input);return index>-1&&index+1<fields.length&&fields.eq(index+1).focus(),!1}var opts=$.extend({defaultText:"Please select",animationSpeed:0,ddMaxHeight:"",containerClass:""},options),$input=$(this),$containerDivText=$('<div class="selectedTxt"><\/div>'),$containerDiv=$('<div class="newListSelected '+opts.containerClass+($input.is(":disabled")?" newListDisabled":"")+'"><\/div>'),$containerDivWrapper=$('<div class="SSContainerDivWrapper" style="visibility:hidden;"><\/div>'),$newUl=$('<ul class="newList"><\/ul>'),currentIndex=-1,prevIndex=-1,keys=[],prevKey=!1,prevented=!1,$newLi;if($(this).data("ssOpts",options),$containerDiv.insertAfter($input),$containerDiv.attr("tabindex",$input.attr("tabindex")||"0"),$containerDivText.prependTo($containerDiv),$newUl.appendTo($containerDiv),$newUl.wrap($containerDivWrapper),$containerDivWrapper=$newUl.parent(),$input.hide(),!$input.is(":disabled")){$containerDivText.data("ssReRender",!$containerDivText.is(":visible"));$input.children().each(function(){if($(this).is("option"))addItem(this,$newUl);else{var optionTitle=$(this).attr("label"),$optGroup=$('<li class="newListOptionTitle '+($(this).is(":disabled")?"newListOptionDisabled":"")+'">'+optionTitle+"<\/li>"),$optGroupList=$("<ul><\/ul>");$optGroup.appendTo($newUl);$optGroupList.appendTo($optGroup);$(this).children().each(function(){addItem(this,$optGroupList)})}});$newLi=$newUl.find("li a:not(.newListItemDisabled)").not(function(){return $(this).parents().hasClass("newListOptionDisabled")});$newLi.each(function(i){$(this).parent().data("selected")&&(opts.defaultText=$(this).html(),currentIndex=prevIndex=i)});var newUlHeight=$newUl.height(),containerHeight=$containerDiv.height(),newLiLength=$newLi.length;currentIndex!=-1?navigateList(currentIndex):$containerDivText.text(opts.defaultText);newUlPos();$(window).bind("resize.sSelect scroll.sSelect",newUlPos);$containerDivText.bind("click.sSelect",function(event){event.stopPropagation();$(this).data("ssReRender")&&(newUlHeight=$newUl.height("").height(),$containerDivWrapper.height(""),containerHeight=$containerDiv.height(),$(this).data("ssReRender",!1),newUlPos());$(".SSContainerDivWrapper").not($(this).next()).hide().parent().css("position","static").removeClass("newListSelFocus");$containerDivWrapper.toggle();positionFix();currentIndex==-1&&(currentIndex=0);try{$newLi.eq(currentIndex).focus()}catch(ex){}});$newLi.bind("click.sSelect",function(e){var $clickedLi=$(e.target);currentIndex=$newLi.index($clickedLi);prevented=!0;navigateList(currentIndex,!0);closeDropDown()});$newLi.bind("mouseenter.sSelect",function(e){var $hoveredLi=$(e.target);$hoveredLi.addClass("newListHover")}).bind("mouseleave.sSelect",function(e){var $hoveredLi=$(e.target);$hoveredLi.removeClass("newListHover")});$input.bind("change.sSelect",function(event){var $targetInput=$(event.target),$currentOpt;if(prevented==!0)return prevented=!1,!1;$currentOpt=$targetInput.find(":selected");currentIndex=$targetInput.find("option").index($currentOpt);navigateList(currentIndex)});$containerDiv.bind("click.sSelect",function(e){e.stopPropagation();keyPress(this)});$containerDiv.bind("focus.sSelect",function(){$(this).addClass("newListSelFocus");keyPress(this)});$containerDiv.bind("blur.sSelect",function(){$(this).removeClass("newListSelFocus")});$(document).bind("click.sSelect",function(){$containerDiv.removeClass("newListSelFocus");$containerDivWrapper.is(":visible")?closeDropDown(!1,!0):closeDropDown(!1)});$input.focus(function(){$input.next().focus()});$containerDivText.bind("mouseenter.sSelect",function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().addClass("newListSelHover")}).bind("mouseleave.sSelect",function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().removeClass("newListSelHover")});$containerDivWrapper.css({left:"0",display:"none",visibility:"visible"})}})}}(jQuery),function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY,track=function(ev){cX=ev.pageX;cY=ev.pageY},compare=function(ev,ob){if(ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t),Math.abs(pX-cX)+Math.abs(pY-cY)<cfg.sensitivity)return $(ob).unbind("mousemove",track),ob.hoverIntent_s=1,cfg.over.apply(ob,[ev]);pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)},delay=function(ev,ob){return ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t),ob.hoverIntent_s=0,cfg.out.apply(ob,[ev])},handleHover=function(e){var ev=jQuery.extend({},e),ob=this;ob.hoverIntent_t&&(ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t));e.type=="mouseenter"?(pX=ev.pageX,pY=ev.pageY,$(ob).bind("mousemove",track),ob.hoverIntent_s!=1&&(ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval))):($(ob).unbind("mousemove",track),ob.hoverIntent_s==1&&(ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)))};return this.bind("mouseenter",handleHover).bind("mouseleave",handleHover)}}(jQuery),function($,window,document,undefined){var $window=$(window);$.fn.lazyload=function(options){function update(){var counter,i,$this;if(!(elements.length<=0))for(counter=0,i=0;i<elements.length;i++){if($this=$(elements[i]),settings.skip_invisible&&!$this.is(":visible"))return;if(!$.abovethetop(elements[i],settings)&&!$.leftofbegin(elements[i],settings))if($.belowthefold(elements[i],settings)||$.rightoffold(elements[i],settings)){if(++counter>settings.failure_limit)return!1}else $this.trigger("appear"),counter=0,elements.splice(i,1),i--}}var elements=this,$container,settings={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"},timeout;return options&&(undefined!==options.failurelimit&&(options.failure_limit=options.failurelimit,delete options.failurelimit),undefined!==options.effectspeed&&(options.effect_speed=options.effectspeed,delete options.effectspeed),$.extend(settings,options)),$container=settings.container===undefined||settings.container===window?$window:$(settings.container),0===settings.event.indexOf("scroll")&&$container.bind(settings.event,function(){return clearTimeout(timeout),timeout=setTimeout(function(){update()},100),!1}),$container.bind("lazyload",function(){return update()}),this.each(function(){var self=this,$self=$(self);self.loaded=!1;($self.attr("src")===undefined||$self.attr("src")===!1)&&$self.is("img")&&$self.attr("src",settings.placeholder);$self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings)}$("<img />").bind("load",function(){var original=$self.attr("data-"+settings.data_attribute),temp,elements_left;$self.hide();$self.is("img")?$self.attr("src",original):$self.css("background-image","url('"+original+"')");$self[settings.effect](settings.effect_speed);self.loaded=!0;temp=$.grep(elements,function(element){return!element.loaded});elements=$(temp);settings.load&&(elements_left=elements.length,settings.load.call(self,elements_left,settings))}).attr("src",$self.attr("data-"+settings.data_attribute))}});0!==settings.event.indexOf("scroll")&&$self.bind(settings.event,function(){self.loaded||$self.trigger("appear")})}),$window.bind("resize",function(){update()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&$window.bind("pageshow",function(event){event.originalEvent&&event.originalEvent.persisted&&elements.each(function(){$(this).trigger("appear")})}),$(document).ready(function(){update()}),this};$.belowthefold=function(element,settings){var fold;return fold=settings.container===undefined||settings.container===window?(window.innerHeight?window.innerHeight:$window.height())+$window.scrollTop():$(settings.container).offset().top+$(settings.container).height(),fold<=$(element).offset().top-settings.threshold};$.rightoffold=function(element,settings){var fold;return fold=settings.container===undefined||settings.container===window?$window.width()+$window.scrollLeft():$(settings.container).offset().left+$(settings.container).width(),fold<=$(element).offset().left-settings.threshold};$.abovethetop=function(element,settings){var fold;return fold=settings.container===undefined||settings.container===window?$window.scrollTop():$(settings.container).offset().top,fold>=$(element).offset().top+settings.threshold+$(element).height()};$.leftofbegin=function(element,settings){var fold;return fold=settings.container===undefined||settings.container===window?$window.scrollLeft():$(settings.container).offset().left,fold>=$(element).offset().left+settings.threshold+$(element).width()};$.inviewport=function(element,settings){return!$.rightoffold(element,settings)&&!$.leftofbegin(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings)};$.extend($.expr[":"],{"below-the-fold":function(a){return $.belowthefold(a,{threshold:0})},"above-the-top":function(a){return!$.belowthefold(a,{threshold:0})},"right-of-screen":function(a){return $.rightoffold(a,{threshold:0})},"left-of-screen":function(a){return!$.rightoffold(a,{threshold:0})},"in-viewport":function(a){return $.inviewport(a,{threshold:0})},"above-the-fold":function(a){return!$.belowthefold(a,{threshold:0})},"right-of-fold":function(a){return $.rightoffold(a,{threshold:0})},"left-of-fold":function(a){return!$.rightoffold(a,{threshold:0})}})}(jQuery,window,document),function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){function g(){function l(){d=+new Date;j.apply(o,n)}function k(){h=c}var o=this,m=+new Date-d,n=arguments;i&&!h&&l();h&&clearTimeout(h);i===c&&m>e?l():f!==!0&&(h=setTimeout(i?k:l,i===c?e-m:e))}var h,d=0;return typeof f!="boolean"&&(i=j,j=f,f=c),$.guid&&(g.guid=j.guid=j.guid||$.guid++),g};$.debounce=function(d,e,f){return f===c?a(d,e,!1):a(d,f,e!==!1)}}(this),function(factory){"use strict";typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){"use strict";function Autocomplete(el,options){var noop=function(){},that=this,defaults={autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:Autocomplete.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:noop,onSearchComplete:noop,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,lookupFilter:function(suggestion,originalQuery,queryLowerCase){return suggestion.value.toLowerCase().indexOf(queryLowerCase)!==-1},paramName:"query",transformResult:function(response){return typeof response=="string"?$.parseJSON(response):response}};that.element=el;that.el=$(el);that.suggestions=[];that.badQueries=[];that.selectedIndex=-1;that.currentValue=that.element.value;that.intervalId=0;that.cachedResponse=[];that.onChangeInterval=null;that.onChange=null;that.isLocal=!1;that.suggestionsContainer=null;that.options=$.extend({},defaults,options);that.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"};that.hint=null;that.hintValue="";that.selection=null;that.initialize();that.setOptions(options)}var utils=function(){return{escapeRegExChars:function(value){return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(html){var div=document.createElement("div");return div.innerHTML=html,div.firstChild}}}(),keys={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};Autocomplete.utils=utils;$.Autocomplete=Autocomplete;Autocomplete.formatResult=function(suggestion,currentValue){var pattern="("+utils.escapeRegExChars(currentValue)+")";return suggestion.value.replace(new RegExp(pattern,"gi"),"<strong>$1<\/strong>")};Autocomplete.prototype={killerFn:null,initialize:function(){var that=this,suggestionSelector="."+that.classes.suggestion,selected=that.classes.selected,options=that.options,container;that.element.setAttribute("autocomplete","off");that.killerFn=function(e){$(e.target).closest("."+that.options.containerClass).length===0&&(that.killSuggestions(),that.disableKillerFn())};that.suggestionsContainer=Autocomplete.utils.createNode('<div class="'+options.containerClass+'" style="position: absolute; display: none;"><\/div>');container=$(that.suggestionsContainer);container.appendTo(options.appendTo);options.width!=="auto"&&container.width(options.width);container.on("mouseover.autocomplete",suggestionSelector,function(){that.activate($(this).data("index"))});container.on("mouseout.autocomplete",function(){that.selectedIndex=-1;container.children("."+selected).removeClass(selected)});container.on("click.autocomplete",suggestionSelector,function(){that.select($(this).data("index"))});that.fixPosition();that.fixPositionCapture=function(){that.visible&&that.fixPosition()};$(window).on("resize",that.fixPositionCapture);that.el.on("keydown.autocomplete",function(e){that.onKeyPress(e)});that.el.on("keyup.autocomplete",function(e){that.onKeyUp(e)});that.el.on("blur.autocomplete",function(){that.onBlur()});that.el.on("focus.autocomplete",function(){that.fixPosition()});that.el.on("change.autocomplete",function(e){that.onKeyUp(e)})},onBlur:function(){this.enableKillerFn()},setOptions:function(suppliedOptions){var that=this,options=that.options;$.extend(options,suppliedOptions);that.isLocal=$.isArray(options.lookup);that.isLocal&&(options.lookup=that.verifySuggestionsFormat(options.lookup));$(that.suggestionsContainer).css({"max-height":options.maxHeight+"px",width:options.width+"px","z-index":options.zIndex})},clearCache:function(){this.cachedResponse=[];this.badQueries=[]},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){this.disabled=!0},enable:function(){this.disabled=!1},fixPosition:function(){var that=this,offset;that.options.appendTo==="body"&&(offset=that.el.offset(),$(that.suggestionsContainer).css({top:offset.top+that.el.outerHeight()+"px",left:offset.left+"px"}))},enableKillerFn:function(){var that=this;$(document).on("click.autocomplete",that.killerFn)},disableKillerFn:function(){var that=this;$(document).off("click.autocomplete",that.killerFn)},killSuggestions:function(){var that=this;that.stopKillSuggestions();that.intervalId=window.setInterval(function(){that.hide();that.stopKillSuggestions()},300)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var that=this,valLength=that.el.val().length,selectionStart=that.element.selectionStart,range;return typeof selectionStart=="number"?selectionStart===valLength:document.selection?(range=document.selection.createRange(),range.moveStart("character",-valLength),valLength===range.text.length):!0},onKeyPress:function(e){var that=this;if(!that.disabled&&!that.visible&&e.which===keys.DOWN&&that.currentValue){that.suggest();return}if(!that.disabled&&that.visible){switch(e.which){case keys.ESC:that.el.val(that.currentValue);that.hide();break;case keys.RIGHT:if(that.hint&&that.options.onHint&&that.isCursorAtEnd()){that.selectHint();break}return;case keys.TAB:if(that.hint&&that.options.onHint){that.selectHint();return}case keys.RETURN:if(that.selectedIndex===-1){that.hide();return}if(that.select(that.selectedIndex),e.which===keys.TAB&&that.options.tabDisabled===!1)return;break;case keys.UP:that.moveUp();break;case keys.DOWN:that.moveDown();break;default:return}e.stopImmediatePropagation();e.preventDefault()}},onKeyUp:function(e){var that=this;if(!that.disabled){switch(e.which){case keys.UP:case keys.DOWN:return}clearInterval(that.onChangeInterval);that.currentValue!==that.el.val()&&(that.findBestHint(),that.options.deferRequestBy>0?that.onChangeInterval=setInterval(function(){that.onValueChange()},that.options.deferRequestBy):that.onValueChange())}},onValueChange:function(){var that=this,q;that.selection&&(that.selection=null,(that.options.onInvalidateSelection||$.noop)());clearInterval(that.onChangeInterval);that.currentValue=that.el.val();q=that.getQuery(that.currentValue);that.selectedIndex=-1;q.length<that.options.minChars?that.hide():that.getSuggestions(q)},getQuery:function(value){var delimiter=this.options.delimiter,parts;return delimiter?(parts=value.split(delimiter),$.trim(parts[parts.length-1])):$.trim(value)},getSuggestionsLocal:function(query){var that=this,queryLowerCase=query.toLowerCase(),filter=that.options.lookupFilter;return{suggestions:$.grep(that.options.lookup,function(suggestion){return filter(suggestion,query,queryLowerCase)})}},getSuggestions:function(q){var response,that=this,options=that.options,serviceUrl=options.serviceUrl;if(response=that.isLocal?that.getSuggestionsLocal(q):that.cachedResponse[q],response&&$.isArray(response.suggestions))that.suggestions=response.suggestions,that.suggest();else if(!that.isBadQuery(q)){if(options.params[options.paramName]=q,options.onSearchStart.call(that.element,options.params)===!1)return;$.isFunction(options.serviceUrl)&&(serviceUrl=options.serviceUrl.call(that.element,q));this.currentRequest!=null&&this.currentRequest.abort();this.currentRequest=$.ajax({url:serviceUrl,data:options.ignoreParams?null:options.params,type:options.type,dataType:options.dataType}).done(function(data){that.processResponse(data,q);options.onSearchComplete.call(that.element,q)})}},isBadQuery:function(q){for(var badQueries=this.badQueries,i=badQueries.length;i--;)if(q.indexOf(badQueries[i])===0)return!0;return!1},hide:function(){var that=this;that.visible=!1;that.selectedIndex=-1;$(that.suggestionsContainer).hide();that.signalHint(null)},suggest:function(){if(this.suggestions.length===0){this.hide();return}var that=this,formatResult=that.options.formatResult,value=that.getQuery(that.currentValue),className=that.classes.suggestion,classSelected=that.classes.selected,container=$(that.suggestionsContainer),html="",width;$.each(that.suggestions,function(i,suggestion){html+='<div class="'+className+'" data-index="'+i+'">'+formatResult(suggestion,value)+"<\/div>"});that.options.width==="auto"&&(width=that.el.outerWidth()-2,container.width(width>0?width:300));container.html(html).show();that.visible=!0;that.options.autoSelectFirst&&(that.selectedIndex=0,container.children().first().addClass(classSelected));that.findBestHint()},findBestHint:function(){var that=this,value=that.el.val().toLowerCase(),bestMatch=null;value&&($.each(that.suggestions,function(i,suggestion){var foundMatch=suggestion.value.toLowerCase().indexOf(value)===0;return foundMatch&&(bestMatch=suggestion),!foundMatch}),that.signalHint(bestMatch))},signalHint:function(suggestion){var hintValue="",that=this;suggestion&&(hintValue=that.currentValue+suggestion.value.substr(that.currentValue.length));that.hintValue!==hintValue&&(that.hintValue=hintValue,that.hint=suggestion,(this.options.onHint||$.noop)(hintValue))},verifySuggestionsFormat:function(suggestions){return suggestions.length&&typeof suggestions[0]=="string"?$.map(suggestions,function(value){return{value:value,data:null}}):suggestions},processResponse:function(response,originalQuery){var that=this,options=that.options,result=options.transformResult(response,originalQuery),suggestions=jQuery.parseJSON(result.d.data);result.suggestions=that.verifySuggestionsFormat(suggestions);options.noCache||(that.cachedResponse[result[options.paramName]]=result,result.suggestions.length===0&&that.badQueries.push(result[options.paramName]));originalQuery===that.getQuery(that.currentValue)&&(that.suggestions=result.suggestions,that.suggest())},activate:function(index){var that=this,activeItem,selected=that.classes.selected,container=$(that.suggestionsContainer),children=container.children();return(container.children("."+selected).removeClass(selected),that.selectedIndex=index,that.selectedIndex!==-1&&children.length>that.selectedIndex)?(activeItem=children.get(that.selectedIndex),$(activeItem).addClass(selected),activeItem):null},selectHint:function(){var that=this,i=$.inArray(that.hint,that.suggestions);that.select(i)},select:function(i){var that=this;that.hide();that.onSelect(i)},moveUp:function(){var that=this;if(that.selectedIndex!==-1){if(that.selectedIndex===0){$(that.suggestionsContainer).children().first().removeClass(that.classes.selected);that.selectedIndex=-1;that.el.val(that.currentValue);that.findBestHint();return}that.adjustScroll(that.selectedIndex-1)}},moveDown:function(){var that=this;that.selectedIndex!==that.suggestions.length-1&&that.adjustScroll(that.selectedIndex+1)},adjustScroll:function(index){var that=this,activeItem=that.activate(index),offsetTop,upperBound,lowerBound,heightDelta=25;activeItem&&(offsetTop=activeItem.offsetTop,upperBound=$(that.suggestionsContainer).scrollTop(),lowerBound=upperBound+that.options.maxHeight-heightDelta,offsetTop<upperBound?$(that.suggestionsContainer).scrollTop(offsetTop):offsetTop>lowerBound&&$(that.suggestionsContainer).scrollTop(offsetTop-that.options.maxHeight+heightDelta),that.el.val(that.getValue(that.suggestions[index].value)),that.signalHint(null))},onSelect:function(index){var that=this,onSelectCallback=that.options.onSelect,suggestion=that.suggestions[index];that.currentValue=that.getValue(suggestion.value);that.el.val(that.currentValue);that.signalHint(null);that.suggestions=[];that.selection=suggestion;$.isFunction(onSelectCallback)&&onSelectCallback.call(that.element,suggestion)},getValue:function(value){var that=this,delimiter=that.options.delimiter,currentValue,parts;return delimiter?(currentValue=that.currentValue,parts=currentValue.split(delimiter),parts.length===1)?value:currentValue.substr(0,currentValue.length-parts[parts.length-1].length)+value:value},dispose:function(){var that=this;that.el.off(".autocomplete").removeData("autocomplete");that.disableKillerFn();$(window).off("resize",that.fixPositionCapture);$(that.suggestionsContainer).remove()}};$.fn.autocomplete=function(options,args){var dataKey="autocomplete";return arguments.length===0?this.first().data(dataKey):this.each(function(){var inputElement=$(this),instance=inputElement.data(dataKey);typeof options=="string"?instance&&typeof instance[options]=="function"&&instance[options](args):(instance&&instance.dispose&&instance.dispose(),instance=new Autocomplete(this,options),inputElement.data(dataKey,instance))})}}),function(factory){typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($,undefined){var uuid=0,slice=Array.prototype.slice,_cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++)try{$(elem).triggerHandler("remove")}catch(e){}_cleanData(elems)};$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];name=name.split(".")[1];fullName=namespace+"-"+name;prototype||(prototype=base,base=$.Widget);$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget)return new constructor(options,element);arguments.length&&this._createWidget(options,element)};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base;basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if(!$.isFunction(value)){proxiedPrototype[prop]=value;return}proxiedPrototype[prop]=function(){var _super=function(){return base.prototype[prop].apply(this,arguments)},_superApply=function(args){return base.prototype[prop].apply(this,args)};return function(){var __super=this._super,__superApply=this._superApply,returnValue;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}}()});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName});existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor);$.widget.bridge(name,constructor)};$.widget.extend=function(target){for(var input=slice.call(arguments,1),inputIndex=0,inputLength=input.length,key,value;inputIndex<inputLength;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&value!==undefined&&(target[key]=$.isPlainObject(value)?$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):value);return target};$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall=typeof options=="string",args=slice.call(arguments,1),returnValue=this;return options=!isMethodCall&&args.length?$.widget.extend.apply(null,[options].concat(args)):options,isMethodCall?this.each(function(){var methodValue,instance=$.data(this,fullName);return instance?!$.isFunction(instance[options])||options.charAt(0)==="_"?$.error("no such method '"+options+"' for "+name+" widget instance"):(methodValue=instance[options].apply(instance,args),methodValue!==instance&&methodValue!==undefined?(returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue,!1):void 0):$.error("cannot call methods on "+name+" prior to initialization; attempted to call method '"+options+"'")}):this.each(function(){var instance=$.data(this,fullName);instance?instance.option(options||{})._init():$.data(this,fullName,new object(options,this))}),returnValue}};$.Widget=function(){};$.Widget._childConstructors=[];$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=uuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this.bindings=$();this.hoverable=$();this.focusable=$();element!==this&&($.data(element,this.widgetFullName,this),this._on(!0,this.element,{remove:function(event){event.target===element&&this.destroy()}}),this.document=$(element.style?element.ownerDocument:element.document||element),this.window=$(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var options=key,parts,curOption,i;if(arguments.length===0)return $.widget.extend({},this.options);if(typeof key=="string")if(options={},parts=key.split("."),key=parts.shift(),parts.length){for(curOption=options[key]=$.widget.extend({},this.options[key]),i=0;i<parts.length-1;i++)curOption[parts[i]]=curOption[parts[i]]||{},curOption=curOption[parts[i]];if(key=parts.pop(),value===undefined)return curOption[key]===undefined?null:curOption[key];curOption[key]=value}else{if(value===undefined)return this.options[key]===undefined?null:this.options[key];options[key]=value}return this._setOptions(options),this},_setOptions:function(options){var key;for(key in options)this._setOption(key,options[key]);return this},_setOption:function(key,value){return this.options[key]=value,key==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!value).attr("aria-disabled",value),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;typeof suppressDisabledCheck!="boolean"&&(handlers=element,element=suppressDisabledCheck,suppressDisabledCheck=!1);handlers?(element=delegateElement=$(element),this.bindings=this.bindings.add(element)):(handlers=element,element=this.element,delegateElement=this.widget());$.each(handlers,function(event,handler){function handlerProxy(){if(suppressDisabledCheck||instance.options.disabled!==!0&&!$(this).hasClass("ui-state-disabled"))return(typeof handler=="string"?instance[handler]:handler).apply(instance,arguments)}typeof handler!="string"&&(handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++);var match=event.match(/^(\w+)\s*(.*)$/),eventName=match[1]+instance.eventNamespace,selector=match[2];selector?delegateElement.delegate(selector,eventName,handlerProxy):element.bind(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;element.unbind(eventName).undelegate(eventName)},_delay:function(handler,delay){function handlerProxy(){return(typeof handler=="string"?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element);this._on(element,{mouseenter:function(event){$(event.currentTarget).addClass("ui-state-hover")},mouseleave:function(event){$(event.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element);this._on(element,{focusin:function(event){$(event.currentTarget).addClass("ui-state-focus")},focusout:function(event){$(event.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];if(data=data||{},event=$.Event(event),event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase(),event.target=this.element[0],orig=event.originalEvent,orig)for(prop in orig)prop in event||(event[prop]=orig[prop]);return this.element.trigger(event,data),!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===!1||event.isDefaultPrevented())}};$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){typeof options=="string"&&(options={effect:options});var hasOptions,effectName=options?options===!0||typeof options=="number"?defaultEffect:options.effect||defaultEffect:method;options=options||{};typeof options=="number"&&(options={duration:options});hasOptions=!$.isEmptyObject(options);options.complete=callback;options.delay&&element.delay(options.delay);hasOptions&&$.effects&&$.effects.effect[effectName]?element[method](options):effectName!==method&&element[effectName]?element[effectName](options.duration,options.easing,callback):element.queue(function(next){$(this)[method]();callback&&callback.call(element[0]);next()})}})}),function(factory){"use strict";typeof define=="function"&&define.amd?define(["jquery","jquery.ui.widget"],factory):factory(window.jQuery)}(function($){"use strict";$.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||$('<input type="file">').prop("disabled"));$.support.xhrFileUpload=!!(window.XMLHttpRequestUpload&&window.FileReader);$.support.xhrFormDataFileUpload=!!window.FormData;$.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);$.widget("blueimp.fileupload",{options:{dropZone:$(document),pasteZone:$(document),fileInput:undefined,replaceFileInput:!0,paramName:undefined,singleFileUploads:!0,limitMultiFileUploads:undefined,sequentialUploads:!1,limitConcurrentUploads:undefined,forceIframeTransport:!1,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:!0,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(message,context){return message=this.messages[message]||message.toString(),context&&$.each(context,function(key,value){message=message.replace("{"+key+"}",value)}),message},formData:function(form){return form.serializeArray()},add:function(e,data){(data.autoUpload||data.autoUpload!==!1&&$(this).fileupload("option","autoUpload"))&&data.process().done(function(){data.submit()})},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:$.support.blobSlice&&function(){var slice=this.slice||this.webkitSlice||this.mozSlice;return slice.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime();this.loaded=0;this.bitrate=0;this.getBitrate=function(now,loaded,interval){var timeDiff=now-this.timestamp;return(!this.bitrate||!interval||timeDiff>interval)&&(this.bitrate=(loaded-this.loaded)*(1e3/timeDiff)*8,this.loaded=loaded,this.timestamp=now),this.bitrate}},_isXHRUpload:function(options){return!options.forceIframeTransport&&(!options.multipart&&$.support.xhrFileUpload||$.support.xhrFormDataFileUpload)},_getFormData:function(options){var formData;return typeof options.formData=="function"?options.formData(options.form):$.isArray(options.formData)?options.formData:$.type(options.formData)==="object"?(formData=[],$.each(options.formData,function(name,value){formData.push({name:name,value:value})}),formData):[]},_getTotal:function(files){var total=0;return $.each(files,function(index,file){total+=file.size||1}),total},_initProgressObject:function(obj){var progress={loaded:0,total:0,bitrate:0};obj._progress?$.extend(obj._progress,progress):obj._progress=progress},_initResponseObject:function(obj){var prop;if(obj._response)for(prop in obj._response)obj._response.hasOwnProperty(prop)&&delete obj._response[prop];else obj._response={}},_onProgress:function(e,data){if(e.lengthComputable){var now=Date.now?Date.now():(new Date).getTime(),loaded;if(data._time&&data.progressInterval&&now-data._time<data.progressInterval&&e.loaded!==e.total)return;data._time=now;loaded=Math.floor(e.loaded/e.total*(data.chunkSize||data._progress.total))+(data.uploadedBytes||0);this._progress.loaded+=loaded-data._progress.loaded;this._progress.bitrate=this._bitrateTimer.getBitrate(now,this._progress.loaded,data.bitrateInterval);data._progress.loaded=data.loaded=loaded;data._progress.bitrate=data.bitrate=data._bitrateTimer.getBitrate(now,loaded,data.bitrateInterval);this._trigger("progress",e,data);this._trigger("progressall",e,this._progress)}},_initProgressListener:function(options){var that=this,xhr=options.xhr?options.xhr():$.ajaxSettings.xhr();xhr.upload&&($(xhr.upload).bind("progress",function(e){var oe=e.originalEvent;e.lengthComputable=oe.lengthComputable;e.loaded=oe.loaded;e.total=oe.total;that._onProgress(e,options)}),options.xhr=function(){return xhr})},_isInstanceOf:function(type,obj){return Object.prototype.toString.call(obj)==="[object "+type+"]"},_initXHRData:function(options){var that=this,formData,file=options.files[0],multipart=options.multipart||!$.support.xhrFileUpload,paramName=options.paramName[0];options.headers=$.extend({},options.headers);options.contentRange&&(options.headers["Content-Range"]=options.contentRange);multipart&&!options.blob&&this._isInstanceOf("File",file)||(options.headers["Content-Disposition"]='attachment; filename="'+encodeURI(file.name)+'"');multipart?$.support.xhrFormDataFileUpload&&(options.postMessage?(formData=this._getFormData(options),options.blob?formData.push({name:paramName,value:options.blob}):$.each(options.files,function(index,file){formData.push({name:options.paramName[index]||paramName,value:file})})):(that._isInstanceOf("FormData",options.formData)?formData=options.formData:(formData=new FormData,$.each(this._getFormData(options),function(index,field){formData.append(field.name,field.value)})),options.blob?formData.append(paramName,options.blob,file.name):$.each(options.files,function(index,file){(that._isInstanceOf("File",file)||that._isInstanceOf("Blob",file))&&formData.append(options.paramName[index]||paramName,file,file.name)})),options.data=formData):(options.contentType=file.type,options.data=options.blob||file);options.blob=null},_initIframeSettings:function(options){var targetHost=$("<a><\/a>").prop("href",options.url).prop("host");options.dataType="iframe "+(options.dataType||"");options.formData=this._getFormData(options);options.redirect&&targetHost&&targetHost!==location.host&&options.formData.push({name:options.redirectParamName||"redirect",value:options.redirect})},_initDataSettings:function(options){this._isXHRUpload(options)?(this._chunkedUpload(options,!0)||(options.data||this._initXHRData(options),this._initProgressListener(options)),options.postMessage&&(options.dataType="postmessage "+(options.dataType||""))):this._initIframeSettings(options)},_getParamName:function(options){var fileInput=$(options.fileInput),paramName=options.paramName;return paramName?$.isArray(paramName)||(paramName=[paramName]):(paramName=[],fileInput.each(function(){for(var input=$(this),name=input.prop("name")||"files[]",i=(input.prop("files")||[1]).length;i;)paramName.push(name),i-=1}),paramName.length||(paramName=[fileInput.prop("name")||"files[]"])),paramName},_initFormSettings:function(options){options.form&&options.form.length||(options.form=$(options.fileInput.prop("form")),options.form.length||(options.form=$(this.options.fileInput.prop("form"))));options.paramName=this._getParamName(options);options.url||(options.url=options.form.prop("action")||location.href);options.type=(options.type||$.type(options.form.prop("method"))==="string"&&options.form.prop("method")||"").toUpperCase();options.type!=="POST"&&options.type!=="PUT"&&options.type!=="PATCH"&&(options.type="POST");options.formAcceptCharset||(options.formAcceptCharset=options.form.attr("accept-charset"))},_getAJAXSettings:function(data){var options=$.extend({},this.options,data);return this._initFormSettings(options),this._initDataSettings(options),options},_getDeferredState:function(deferred){return deferred.state?deferred.state():deferred.isResolved()?"resolved":deferred.isRejected()?"rejected":"pending"},_enhancePromise:function(promise){return promise.success=promise.done,promise.error=promise.fail,promise.complete=promise.always,promise},_getXHRPromise:function(resolveOrReject,context,args){var dfd=$.Deferred(),promise=dfd.promise();return context=context||this.options.context||promise,resolveOrReject===!0?dfd.resolveWith(context,args):resolveOrReject===!1&&dfd.rejectWith(context,args),promise.abort=dfd.promise,this._enhancePromise(promise)},_addConvenienceMethods:function(e,data){var that=this,getPromise=function(data){return $.Deferred().resolveWith(that,[data]).promise()};data.process=function(resolveFunc,rejectFunc){return(resolveFunc||rejectFunc)&&(data._processQueue=this._processQueue=(this._processQueue||getPromise(this)).pipe(resolveFunc,rejectFunc)),this._processQueue||getPromise(this)};data.submit=function(){return this.state()!=="pending"&&(data.jqXHR=this.jqXHR=that._trigger("submit",e,this)!==!1&&that._onSend(e,this)),this.jqXHR||that._getXHRPromise()};data.abort=function(){return this.jqXHR?this.jqXHR.abort():that._getXHRPromise()};data.state=function(){return this.jqXHR?that._getDeferredState(this.jqXHR):this._processQueue?that._getDeferredState(this._processQueue):void 0};data.progress=function(){return this._progress};data.response=function(){return this._response}},_getUploadedBytes:function(jqXHR){var range=jqXHR.getResponseHeader("Range"),parts=range&&range.split("-"),upperBytesPos=parts&&parts.length>1&&parseInt(parts[1],10);return upperBytesPos&&upperBytesPos+1},_chunkedUpload:function(options,testOnly){options.uploadedBytes=options.uploadedBytes||0;var that=this,file=options.files[0],fs=file.size,ub=options.uploadedBytes,mcs=options.maxChunkSize||fs,slice=this._blobSlice,dfd=$.Deferred(),promise=dfd.promise(),jqXHR,upload;return!(this._isXHRUpload(options)&&slice&&(ub||mcs<fs))||options.data?!1:testOnly?!0:ub>=fs?(file.error=options.i18n("uploadedBytes"),this._getXHRPromise(!1,options.context,[null,"error",file.error])):(upload=function(){var o=$.extend({},options),currentLoaded=o._progress.loaded;o.blob=slice.call(file,ub,ub+mcs,file.type);o.chunkSize=o.blob.size;o.contentRange="bytes "+ub+"-"+(ub+o.chunkSize-1)+"/"+fs;that._initXHRData(o);that._initProgressListener(o);jqXHR=(that._trigger("chunksend",null,o)!==!1&&$.ajax(o)||that._getXHRPromise(!1,o.context)).done(function(result,textStatus,jqXHR){ub=that._getUploadedBytes(jqXHR)||ub+o.chunkSize;currentLoaded+o.chunkSize-o._progress.loaded&&that._onProgress($.Event("progress",{lengthComputable:!0,loaded:ub-o.uploadedBytes,total:ub-o.uploadedBytes}),o);options.uploadedBytes=o.uploadedBytes=ub;o.result=result;o.textStatus=textStatus;o.jqXHR=jqXHR;that._trigger("chunkdone",null,o);that._trigger("chunkalways",null,o);ub<fs?upload():dfd.resolveWith(o.context,[result,textStatus,jqXHR])}).fail(function(jqXHR,textStatus,errorThrown){o.jqXHR=jqXHR;o.textStatus=textStatus;o.errorThrown=errorThrown;that._trigger("chunkfail",null,o);that._trigger("chunkalways",null,o);dfd.rejectWith(o.context,[jqXHR,textStatus,errorThrown])})},this._enhancePromise(promise),promise.abort=function(){return jqXHR.abort()},upload(),promise)},_beforeSend:function(e,data){this._active===0&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0);this._initResponseObject(data);this._initProgressObject(data);data._progress.loaded=data.loaded=data.uploadedBytes||0;data._progress.total=data.total=this._getTotal(data.files)||1;data._progress.bitrate=data.bitrate=0;this._active+=1;this._progress.loaded+=data.loaded;this._progress.total+=data.total},_onDone:function(result,textStatus,jqXHR,options){var total=options._progress.total,response=options._response;options._progress.loaded<total&&this._onProgress($.Event("progress",{lengthComputable:!0,loaded:total,total:total}),options);response.result=options.result=result;response.textStatus=options.textStatus=textStatus;response.jqXHR=options.jqXHR=jqXHR;this._trigger("done",null,options)},_onFail:function(jqXHR,textStatus,errorThrown,options){var response=options._response;options.recalculateProgress&&(this._progress.loaded-=options._progress.loaded,this._progress.total-=options._progress.total);response.jqXHR=options.jqXHR=jqXHR;response.textStatus=options.textStatus=textStatus;response.errorThrown=options.errorThrown=errorThrown;this._trigger("fail",null,options)},_onAlways:function(jqXHRorResult,textStatus,jqXHRorError,options){this._trigger("always",null,options)},_onSend:function(e,data){data.submit||this._addConvenienceMethods(e,data);var that=this,jqXHR,aborted,slot,pipe,options=that._getAJAXSettings(data),send=function(){return that._sending+=1,options._bitrateTimer=new that._BitrateTimer,jqXHR=jqXHR||((aborted||that._trigger("send",e,options)===!1)&&that._getXHRPromise(!1,options.context,aborted)||that._chunkedUpload(options)||$.ajax(options)).done(function(result,textStatus,jqXHR){that._onDone(result,textStatus,jqXHR,options)}).fail(function(jqXHR,textStatus,errorThrown){that._onFail(jqXHR,textStatus,errorThrown,options)}).always(function(jqXHRorResult,textStatus,jqXHRorError){if(that._onAlways(jqXHRorResult,textStatus,jqXHRorError,options),that._sending-=1,that._active-=1,options.limitConcurrentUploads&&options.limitConcurrentUploads>that._sending)for(var nextSlot=that._slots.shift();nextSlot;){if(that._getDeferredState(nextSlot)==="pending"){nextSlot.resolve();break}nextSlot=that._slots.shift()}that._active===0&&that._trigger("stop")})};return(this._beforeSend(e,options),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending)?(this.options.limitConcurrentUploads>1?(slot=$.Deferred(),this._slots.push(slot),pipe=slot.pipe(send)):(this._sequence=this._sequence.pipe(send,send),pipe=this._sequence),pipe.abort=function(){return(aborted=[undefined,"abort","abort"],!jqXHR)?(slot&&slot.rejectWith(options.context,aborted),send()):jqXHR.abort()},this._enhancePromise(pipe)):send()},_onAdd:function(e,data){var that=this,result=!0,options=$.extend({},this.options,data),limit=options.limitMultiFileUploads,paramName=this._getParamName(options),paramNameSet,paramNameSlice,fileSet,i;if((options.singleFileUploads||limit)&&this._isXHRUpload(options))if(!options.singleFileUploads&&limit)for(fileSet=[],paramNameSet=[],i=0;i<data.files.length;i+=limit)fileSet.push(data.files.slice(i,i+limit)),paramNameSlice=paramName.slice(i,i+limit),paramNameSlice.length||(paramNameSlice=paramName),paramNameSet.push(paramNameSlice);else paramNameSet=paramName;else fileSet=[data.files],paramNameSet=[paramName];return data.originalFiles=data.files,$.each(fileSet||data.files,function(index,element){var newData=$.extend({},data);return newData.files=fileSet?element:[element],newData.paramName=paramNameSet[index],that._initResponseObject(newData),that._initProgressObject(newData),that._addConvenienceMethods(e,newData),result=that._trigger("add",e,newData)}),result},_replaceFileInput:function(input){var inputClone=input.clone(!0);$("<form><\/form>").append(inputClone)[0].reset();input.after(inputClone).detach();$.cleanData(input.unbind("remove"));this.options.fileInput=this.options.fileInput.map(function(i,el){return el===input[0]?inputClone[0]:el});input[0]===this.element[0]&&(this.element=inputClone)},_handleFileTreeEntry:function(entry,path){var that=this,dfd=$.Deferred(),errorHandler=function(e){e&&!e.entry&&(e.entry=entry);dfd.resolve([e])},dirReader;return path=path||"",entry.isFile?entry._file?(entry._file.relativePath=path,dfd.resolve(entry._file)):entry.file(function(file){file.relativePath=path;dfd.resolve(file)},errorHandler):entry.isDirectory?(dirReader=entry.createReader(),dirReader.readEntries(function(entries){that._handleFileTreeEntries(entries,path+entry.name+"/").done(function(files){dfd.resolve(files)}).fail(errorHandler)},errorHandler)):dfd.resolve([]),dfd.promise()},_handleFileTreeEntries:function(entries,path){var that=this;return $.when.apply($,$.map(entries,function(entry){return that._handleFileTreeEntry(entry,path)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(dataTransfer){dataTransfer=dataTransfer||{};var items=dataTransfer.items;return items&&items.length&&(items[0].webkitGetAsEntry||items[0].getAsEntry)?this._handleFileTreeEntries($.map(items,function(item){var entry;return item.webkitGetAsEntry?(entry=item.webkitGetAsEntry(),entry&&(entry._file=item.getAsFile()),entry):item.getAsEntry()})):$.Deferred().resolve($.makeArray(dataTransfer.files)).promise()},_getSingleFileInputFiles:function(fileInput){fileInput=$(fileInput);var entries=fileInput.prop("webkitEntries")||fileInput.prop("entries"),files,value;if(entries&&entries.length)return this._handleFileTreeEntries(entries);if(files=$.makeArray(fileInput.prop("files")),files.length)files[0].name===undefined&&files[0].fileName&&$.each(files,function(index,file){file.name=file.fileName;file.size=file.fileSize});else{if(value=fileInput.prop("value"),!value)return $.Deferred().resolve([]).promise();files=[{name:value.replace(/^.*\\/,"")}]}return $.Deferred().resolve(files).promise()},_getFileInputFiles:function(fileInput){return!(fileInput instanceof $)||fileInput.length===1?this._getSingleFileInputFiles(fileInput):$.when.apply($,$.map(fileInput,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_onChange:function(e){var that=this,data={fileInput:$(e.target),form:$(e.target.form)};this._getFileInputFiles(data.fileInput).always(function(files){data.files=files;that.options.replaceFileInput&&that._replaceFileInput(data.fileInput);that._trigger("change",e,data)!==!1&&that._onAdd(e,data)})},_onPaste:function(e){var items=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,data={files:[]};items&&items.length&&($.each(items,function(index,item){var file=item.getAsFile&&item.getAsFile();file&&data.files.push(file)}),this._trigger("paste",e,data)!==!1&&this._onAdd(e,data))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var that=this,dataTransfer=e.dataTransfer,data={};dataTransfer&&dataTransfer.files&&dataTransfer.files.length&&(e.preventDefault(),this._getDroppedFiles(dataTransfer).always(function(files){data.files=files;that._trigger("drop",e,data)!==!1&&that._onAdd(e,data)}))},_onDragOver:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var dataTransfer=e.dataTransfer,data={dropEffect:"copy",preventDefault:!0};dataTransfer&&$.inArray("Files",dataTransfer.types)!==-1&&this._trigger("dragover",e,data)!==!1&&(dataTransfer.dropEffect=data.dropEffect,data.preventDefault&&e.preventDefault())},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste}));$.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop");this._off(this.options.pasteZone,"paste");this._off(this.options.fileInput,"change")},_setOption:function(key,value){var reinit=$.inArray(key,this._specialOptions)!==-1;reinit&&this._destroyEventHandlers();this._super(key,value);reinit&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var options=this.options;options.fileInput===undefined?options.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):options.fileInput instanceof $||(options.fileInput=$(options.fileInput));options.dropZone instanceof $||(options.dropZone=$(options.dropZone));options.pasteZone instanceof $||(options.pasteZone=$(options.pasteZone))},_getRegExp:function(str){var parts=str.split("/"),modifiers=parts.pop();return parts.shift(),new RegExp(parts.join("/"),modifiers)},_isRegExpOption:function(key,value){return key!=="url"&&$.type(value)==="string"&&/^\/.*\/[igm]{0,3}$/.test(value)},_initDataAttributes:function(){var that=this,options=this.options;$.each($(this.element[0].cloneNode(!1)).data(),function(key,value){that._isRegExpOption(key,value)&&(value=that._getRegExp(value));options[key]=value})},_create:function(){this._initDataAttributes();this._initSpecialOptions();this._slots=[];this._sequence=this._getXHRPromise(!0);this._sending=this._active=0;this._initProgressObject(this);this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(data){var that=this;data&&!this.options.disabled&&(data.fileInput&&!data.files?this._getFileInputFiles(data.fileInput).always(function(files){data.files=files;that._onAdd(null,data)}):(data.files=$.makeArray(data.files),this._onAdd(null,data)))},send:function(data){if(data&&!this.options.disabled){if(data.fileInput&&!data.files){var that=this,dfd=$.Deferred(),promise=dfd.promise(),jqXHR,aborted;return promise.abort=function(){return(aborted=!0,jqXHR)?jqXHR.abort():(dfd.reject(null,"abort","abort"),promise)},this._getFileInputFiles(data.fileInput).always(function(files){if(!aborted){if(!files.length){dfd.reject();return}data.files=files;jqXHR=that._onSend(null,data).then(function(result,textStatus,jqXHR){dfd.resolve(result,textStatus,jqXHR)},function(jqXHR,textStatus,errorThrown){dfd.reject(jqXHR,textStatus,errorThrown)})}}),this._enhancePromise(promise)}if(data.files=$.makeArray(data.files),data.files.length)return this._onSend(null,data)}return this._getXHRPromise(!1,data&&data.context)}})});typeof Object.create!="function"&&(Object.create=function(obj){function F(){}return F.prototype=obj,new F}),function($,window,document){var Carousel={init:function(options,el){var base=this;base.$elem=$(el);base.options=$.extend({},$.fn.owlCarousel.options,base.$elem.data(),options);base.userOptions=options;base.loadContent()},loadContent:function(){function getData(data){var i,content="";if(typeof base.options.jsonSuccess=="function")base.options.jsonSuccess.apply(this,[data]);else{for(i in data.owl)data.owl.hasOwnProperty(i)&&(content+=data.owl[i].item);base.$elem.html(content)}base.logIn()}var base=this,url;typeof base.options.beforeInit=="function"&&base.options.beforeInit.apply(this,[base.$elem]);typeof base.options.jsonPath=="string"?(url=base.options.jsonPath,$.getJSON(url,getData)):base.logIn()},logIn:function(){var base=this;base.$elem.data({"owl-originalStyles":base.$elem.attr("style"),"owl-originalClasses":base.$elem.attr("class")});base.$elem.css({opacity:0});base.orignalItems=base.options.items;base.checkBrowser();base.wrapperWidth=0;base.checkVisible=null;base.setVars()},setVars:function(){var base=this;if(base.$elem.children().length===0)return!1;base.baseClass();base.eventTypes();base.$userItems=base.$elem.children();base.itemsAmount=base.$userItems.length;base.wrapItems();base.$owlItems=base.$elem.find(".owl-item");base.$owlWrapper=base.$elem.find(".owl-wrapper");base.playDirection="next";base.prevItem=0;base.prevArr=[0];base.currentItem=0;base.customEvents();base.onStartup()},onStartup:function(){var base=this;base.updateItems();base.calculateAll();base.buildControls();base.updateControls();base.response();base.moveEvents();base.stopOnHover();base.owlStatus();base.options.transitionStyle!==!1&&base.transitionTypes(base.options.transitionStyle);base.options.autoPlay===!0&&(base.options.autoPlay=5e3);base.play();base.$elem.find(".owl-wrapper").css("display","block");base.$elem.is(":visible")?base.$elem.css("opacity",1):base.watchVisibility();base.onstartup=!1;base.eachMoveUpdate();typeof base.options.afterInit=="function"&&base.options.afterInit.apply(this,[base.$elem])},eachMoveUpdate:function(){var base=this;base.options.lazyLoad===!0&&base.lazyLoad();base.options.autoHeight===!0&&base.autoHeight();base.onVisibleItems();typeof base.options.afterAction=="function"&&base.options.afterAction.apply(this,[base.$elem])},updateVars:function(){var base=this;typeof base.options.beforeUpdate=="function"&&base.options.beforeUpdate.apply(this,[base.$elem]);base.watchVisibility();base.updateItems();base.calculateAll();base.updatePosition();base.updateControls();base.eachMoveUpdate();typeof base.options.afterUpdate=="function"&&base.options.afterUpdate.apply(this,[base.$elem])},reload:function(){var base=this;window.setTimeout(function(){base.updateVars()},0)},watchVisibility:function(){var base=this;if(base.$elem.is(":visible")===!1)base.$elem.css({opacity:0}),window.clearInterval(base.autoPlayInterval),window.clearInterval(base.checkVisible);else return!1;base.checkVisible=window.setInterval(function(){base.$elem.is(":visible")&&(base.reload(),base.$elem.animate({opacity:1},200),window.clearInterval(base.checkVisible))},500)},wrapItems:function(){var base=this;base.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"><\/div>');base.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');base.wrapperOuter=base.$elem.find(".owl-wrapper-outer");base.$elem.css("display","block")},baseClass:function(){var base=this,hasBaseClass=base.$elem.hasClass(base.options.baseClass),hasThemeClass=base.$elem.hasClass(base.options.theme);hasBaseClass||base.$elem.addClass(base.options.baseClass);hasThemeClass||base.$elem.addClass(base.options.theme)},updateItems:function(){var base=this,width,i;if(base.options.responsive===!1)return!1;if(base.options.singleItem===!0)return base.options.items=base.orignalItems=1,base.options.itemsCustom=!1,base.options.itemsDesktop=!1,base.options.itemsDesktopSmall=!1,base.options.itemsTablet=!1,base.options.itemsTabletSmall=!1,base.options.itemsMobile=!1,!1;if(width=$(base.options.responsiveBaseWidth).width(),width>(base.options.itemsDesktop[0]||base.orignalItems)&&(base.options.items=base.orignalItems),base.options.itemsCustom!==!1)for(base.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),i=0;i<base.options.itemsCustom.length;i+=1)base.options.itemsCustom[i][0]<=width&&(base.options.items=base.options.itemsCustom[i][1]);else width<=base.options.itemsDesktop[0]&&base.options.itemsDesktop!==!1&&(base.options.items=base.options.itemsDesktop[1]),width<=base.options.itemsDesktopSmall[0]&&base.options.itemsDesktopSmall!==!1&&(base.options.items=base.options.itemsDesktopSmall[1]),width<=base.options.itemsTablet[0]&&base.options.itemsTablet!==!1&&(base.options.items=base.options.itemsTablet[1]),width<=base.options.itemsTabletSmall[0]&&base.options.itemsTabletSmall!==!1&&(base.options.items=base.options.itemsTabletSmall[1]),width<=base.options.itemsMobile[0]&&base.options.itemsMobile!==!1&&(base.options.items=base.options.itemsMobile[1]);base.options.items>base.itemsAmount&&base.options.itemsScaleUp===!0&&(base.options.items=base.itemsAmount)},response:function(){var base=this,smallDelay,lastWindowWidth;if(base.options.responsive!==!0)return!1;lastWindowWidth=$(window).width();base.resizer=function(){$(window).width()!==lastWindowWidth&&(base.options.autoPlay!==!1&&window.clearInterval(base.autoPlayInterval),window.clearTimeout(smallDelay),smallDelay=window.setTimeout(function(){lastWindowWidth=$(window).width();base.updateVars()},base.options.responsiveRefreshRate))};$(window).resize(base.resizer)},updatePosition:function(){var base=this;base.jumpTo(base.currentItem);base.options.autoPlay!==!1&&base.checkAp()},appendItemsSizes:function(){var base=this,roundPages=0,lastItem=base.itemsAmount-base.options.items;base.$owlItems.each(function(index){var $this=$(this);$this.css({width:base.itemWidth}).data("owl-item",Number(index));(index%base.options.items==0||index===lastItem)&&(index>lastItem||(roundPages+=1));$this.data("owl-roundPages",roundPages)})},appendWrapperSizes:function(){var base=this,width=base.$owlItems.length*base.itemWidth;base.$owlWrapper.css({width:width*2,left:0});base.appendItemsSizes()},calculateAll:function(){var base=this;base.calculateWidth();base.appendWrapperSizes();base.loops();base.max()},calculateWidth:function(){var base=this;base.itemWidth=Math.round(base.$elem.width()/base.options.items)},max:function(){var base=this,maximum=(base.itemsAmount*base.itemWidth-base.options.items*base.itemWidth)*-1;return base.options.items>base.itemsAmount?(base.maximumItem=0,maximum=0,base.maximumPixels=0):(base.maximumItem=base.itemsAmount-base.options.items,base.maximumPixels=maximum),maximum},min:function(){return 0},loops:function(){var base=this,prev=0,elWidth=0,i,item,roundPageNum;for(base.positionsInArray=[0],base.pagesInArray=[],i=0;i<base.itemsAmount;i+=1)elWidth+=base.itemWidth,base.positionsInArray.push(-elWidth),base.options.scrollPerPage===!0&&(item=$(base.$owlItems[i]),roundPageNum=item.data("owl-roundPages"),roundPageNum!==prev&&(base.pagesInArray[prev]=base.positionsInArray[i],prev=roundPageNum))},buildControls:function(){var base=this;(base.options.navigation===!0||base.options.pagination===!0)&&(base.owlControls=$('<div class="owl-controls"/>').toggleClass("clickable",!base.browser.isTouch).appendTo(base.$elem));base.options.pagination===!0&&base.buildPagination();base.options.navigation===!0&&base.buildButtons()},buildButtons:function(){var base=this,buttonsWrapper=$('<div class="owl-buttons"/>');base.owlControls.append(buttonsWrapper);base.buttonPrev=$("<div/>",{"class":"owl-prev",html:base.options.navigationText[0]||""});base.buttonNext=$("<div/>",{"class":"owl-next",html:base.options.navigationText[1]||""});buttonsWrapper.append(base.buttonPrev).append(base.buttonNext);buttonsWrapper.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(event){event.preventDefault()});buttonsWrapper.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(event){event.preventDefault();$(this).hasClass("owl-next")?base.next():base.prev()})},buildPagination:function(){var base=this;base.paginationWrapper=$('<div class="owl-pagination"/>');base.owlControls.append(base.paginationWrapper);base.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(event){event.preventDefault();Number($(this).data("owl-page"))!==base.currentItem&&base.goTo(Number($(this).data("owl-page")),!0)})},updatePagination:function(){var base=this,counter,lastPage,lastItem,i,paginationButton,paginationButtonInner;if(base.options.pagination===!1)return!1;for(base.paginationWrapper.html(""),counter=0,lastPage=base.itemsAmount-base.itemsAmount%base.options.items,i=0;i<base.itemsAmount;i+=1)i%base.options.items==0&&(counter+=1,lastPage===i&&(lastItem=base.itemsAmount-base.options.items),paginationButton=$("<div/>",{"class":"owl-page"}),paginationButtonInner=$("<span><\/span>",{text:base.options.paginationNumbers===!0?counter:"","class":base.options.paginationNumbers===!0?"owl-numbers":""}),paginationButton.append(paginationButtonInner),paginationButton.data("owl-page",lastPage===i?lastItem:i),paginationButton.data("owl-roundPages",counter),base.paginationWrapper.append(paginationButton));base.checkPagination()},checkPagination:function(){var base=this;if(base.options.pagination===!1)return!1;base.paginationWrapper.find(".owl-page").each(function(){$(this).data("owl-roundPages")===$(base.$owlItems[base.currentItem]).data("owl-roundPages")&&(base.paginationWrapper.find(".owl-page").removeClass("active"),$(this).addClass("active"))})},checkNavigation:function(){var base=this;if(base.options.navigation===!1)return!1;base.options.rewindNav===!1&&(base.currentItem===0&&base.maximumItem===0?(base.buttonPrev.addClass("disabled"),base.buttonNext.addClass("disabled")):base.currentItem===0&&base.maximumItem!==0?(base.buttonPrev.addClass("disabled"),base.buttonNext.removeClass("disabled")):base.currentItem===base.maximumItem?(base.buttonPrev.removeClass("disabled"),base.buttonNext.addClass("disabled")):base.currentItem!==0&&base.currentItem!==base.maximumItem&&(base.buttonPrev.removeClass("disabled"),base.buttonNext.removeClass("disabled")))},updateControls:function(){var base=this;base.updatePagination();base.checkNavigation();base.owlControls&&(base.options.items>=base.itemsAmount?base.owlControls.hide():base.owlControls.show())},destroyControls:function(){var base=this;base.owlControls&&base.owlControls.remove()},next:function(speed){var base=this;if(base.isTransition)return!1;if(base.currentItem+=base.options.scrollPerPage===!0?base.options.items:1,base.currentItem>base.maximumItem+(base.options.scrollPerPage===!0?base.options.items-1:0))if(base.options.rewindNav===!0)base.currentItem=0,speed="rewind";else return base.currentItem=base.maximumItem,!1;base.goTo(base.currentItem,speed)},prev:function(speed){var base=this;if(base.isTransition)return!1;if(base.options.scrollPerPage===!0&&base.currentItem>0&&base.currentItem<base.options.items?base.currentItem=0:base.currentItem-=base.options.scrollPerPage===!0?base.options.items:1,base.currentItem<0)if(base.options.rewindNav===!0)base.currentItem=base.maximumItem,speed="rewind";else return base.currentItem=0,!1;base.goTo(base.currentItem,speed)},goTo:function(position,speed,drag){var base=this,goToPixel;if(base.isTransition)return!1;if(typeof base.options.beforeMove=="function"&&base.options.beforeMove.apply(this,[base.$elem]),position>=base.maximumItem?position=base.maximumItem:position<=0&&(position=0),base.currentItem=base.owl.currentItem=position,base.options.transitionStyle!==!1&&drag!=="drag"&&base.options.items===1&&base.browser.support3d===!0)return base.swapSpeed(0),base.browser.support3d===!0?base.transition3d(base.positionsInArray[position]):base.css2slide(base.positionsInArray[position],1),base.afterGo(),base.singleItemTransition(),!1;goToPixel=base.positionsInArray[position];base.browser.support3d===!0?(base.isCss3Finish=!1,speed===!0?(base.swapSpeed("paginationSpeed"),window.setTimeout(function(){base.isCss3Finish=!0},base.options.paginationSpeed)):speed==="rewind"?(base.swapSpeed(base.options.rewindSpeed),window.setTimeout(function(){base.isCss3Finish=!0},base.options.rewindSpeed)):(base.swapSpeed("slideSpeed"),window.setTimeout(function(){base.isCss3Finish=!0},base.options.slideSpeed)),base.transition3d(goToPixel)):speed===!0?base.css2slide(goToPixel,base.options.paginationSpeed):speed==="rewind"?base.css2slide(goToPixel,base.options.rewindSpeed):base.css2slide(goToPixel,base.options.slideSpeed);base.afterGo()},jumpTo:function(position){var base=this;typeof base.options.beforeMove=="function"&&base.options.beforeMove.apply(this,[base.$elem]);position>=base.maximumItem||position===-1?position=base.maximumItem:position<=0&&(position=0);base.swapSpeed(0);base.browser.support3d===!0?base.transition3d(base.positionsInArray[position]):base.css2slide(base.positionsInArray[position],1);base.currentItem=base.owl.currentItem=position;base.afterGo()},afterGo:function(){var base=this;base.prevArr.push(base.currentItem);base.prevItem=base.owl.prevItem=base.prevArr[base.prevArr.length-2];base.prevArr.shift(0);base.prevItem!==base.currentItem&&(base.checkPagination(),base.checkNavigation(),base.eachMoveUpdate(),base.options.autoPlay!==!1&&base.checkAp());typeof base.options.afterMove=="function"&&base.prevItem!==base.currentItem&&base.options.afterMove.apply(this,[base.$elem])},stop:function(){var base=this;base.apStatus="stop";window.clearInterval(base.autoPlayInterval)},checkAp:function(){var base=this;base.apStatus!=="stop"&&base.play()},play:function(){var base=this;if(base.apStatus="play",base.options.autoPlay===!1)return!1;window.clearInterval(base.autoPlayInterval);base.autoPlayInterval=window.setInterval(function(){base.next(!0)},base.options.autoPlay)},swapSpeed:function(action){var base=this;action==="slideSpeed"?base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed)):action==="paginationSpeed"?base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed)):typeof action!="string"&&base.$owlWrapper.css(base.addCssSpeed(action))},addCssSpeed:function(speed){return{"-webkit-transition":"all "+speed+"ms ease","-moz-transition":"all "+speed+"ms ease","-o-transition":"all "+speed+"ms ease",transition:"all "+speed+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(pixels){return{"-webkit-transform":"translate3d("+pixels+"px, 0px, 0px)","-moz-transform":"translate3d("+pixels+"px, 0px, 0px)","-o-transform":"translate3d("+pixels+"px, 0px, 0px)","-ms-transform":"translate3d("+pixels+"px, 0px, 0px)",transform:"translate3d("+pixels+"px, 0px,0px)"}},transition3d:function(value){var base=this;base.$owlWrapper.css(base.doTranslate(value))},css2move:function(value){var base=this;base.$owlWrapper.css({left:value})},css2slide:function(value,speed){var base=this;base.isCssFinish=!1;base.$owlWrapper.stop(!0,!0).animate({left:value},{duration:speed||base.options.slideSpeed,complete:function(){base.isCssFinish=!0}})},checkBrowser:function(){var base=this,translate3D="translate3d(0px, 0px, 0px)",tempElem=document.createElement("div"),regex,asSupport,support3d,isTouch,style;tempElem.style.cssText=" -moz-transform:"+translate3D+"; -ms-transform:"+translate3D+"; -o-transform:"+translate3D+"; -webkit-transform:"+translate3D+"; transform:"+translate3D;regex=/translate3d\(0px, 0px, 0px\)/g;asSupport=tempElem.style.cssText.match(regex);style=document.documentElement.style;support3d=style.webkitTransition!==undefined||style.MozTransition!==undefined||style.OTransition!==undefined||style.transition!==undefined;isTouch="ontouchstart"in window||window.navigator.msMaxTouchPoints;base.browser={support3d:support3d,isTouch:isTouch}},moveEvents:function(){var base=this;(base.options.mouseDrag!==!1||base.options.touchDrag!==!1)&&(base.gestures(),base.disabledEvents())},eventTypes:function(){var base=this,types=["s","e","x"];base.ev_types={};base.options.mouseDrag===!0&&base.options.touchDrag===!0?types=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:base.options.mouseDrag===!1&&base.options.touchDrag===!0?types=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:base.options.mouseDrag===!0&&base.options.touchDrag===!1&&(types=["mousedown.owl","mousemove.owl","mouseup.owl"]);base.ev_types.start=types[0];base.ev_types.move=types[1];base.ev_types.end=types[2]},disabledEvents:function(){var base=this;base.$elem.on("dragstart.owl",function(event){event.preventDefault()});base.$elem.on("mousedown.disableTextSelect",function(e){return $(e.target).is("input, textarea, select, option")})},gestures:function(){function getTouches(event){if(event.touches!==undefined)return{x:event.touches[0].pageX,y:event.touches[0].pageY};if(event.touches===undefined){if(event.pageX!==undefined)return{x:event.pageX,y:event.pageY};if(event.pageX===undefined)return{x:event.clientX,y:event.clientY}}}function swapEvents(type){if(type==="on"){$(document).on(base.ev_types.move,dragMove);$(document).on(base.ev_types.end,dragEnd)}else type==="off"&&($(document).off(base.ev_types.move),$(document).off(base.ev_types.end))}function dragStart(event){var ev=event.originalEvent||event||window.event,position;if(ev.which===3)return!1;if(!(base.itemsAmount<=base.options.items)){if(base.isCssFinish===!1&&!base.options.dragBeforeAnimFinish||base.isCss3Finish===!1&&!base.options.dragBeforeAnimFinish)return!1;base.options.autoPlay!==!1&&window.clearInterval(base.autoPlayInterval);base.browser.isTouch===!0||base.$owlWrapper.hasClass("grabbing")||base.$owlWrapper.addClass("grabbing");base.newPosX=0;base.newRelativeX=0;$(this).css(base.removeTransition());position=$(this).position();locals.relativePos=position.left;locals.offsetX=getTouches(ev).x-position.left;locals.offsetY=getTouches(ev).y-position.top;swapEvents("on");locals.sliding=!1;locals.targetElement=ev.target||ev.srcElement}}function dragMove(event){var ev=event.originalEvent||event||window.event,minSwipe,maxSwipe;base.newPosX=getTouches(ev).x-locals.offsetX;base.newPosY=getTouches(ev).y-locals.offsetY;base.newRelativeX=base.newPosX-locals.relativePos;typeof base.options.startDragging=="function"&&locals.dragging!==!0&&base.newRelativeX!==0&&(locals.dragging=!0,base.options.startDragging.apply(base,[base.$elem]));(base.newRelativeX>8||base.newRelativeX<-8)&&base.browser.isTouch===!0&&(ev.preventDefault!==undefined?ev.preventDefault():ev.returnValue=!1,locals.sliding=!0);(base.newPosY>10||base.newPosY<-10)&&locals.sliding===!1&&$(document).off("touchmove.owl");minSwipe=function(){return base.newRelativeX/5};maxSwipe=function(){return base.maximumPixels+base.newRelativeX/5};base.newPosX=Math.max(Math.min(base.newPosX,minSwipe()),maxSwipe());base.browser.support3d===!0?base.transition3d(base.newPosX):base.css2move(base.newPosX)}function dragEnd(event){var ev=event.originalEvent||event||window.event,newPosition,handlers,owlStopEvent;if(ev.target=ev.target||ev.srcElement,locals.dragging=!1,base.browser.isTouch!==!0&&base.$owlWrapper.removeClass("grabbing"),base.dragDirection=base.newRelativeX<0?base.owl.dragDirection="left":base.owl.dragDirection="right",base.newRelativeX!==0&&(newPosition=base.getNewPosition(),base.goTo(newPosition,!1,"drag"),locals.targetElement===ev.target&&base.browser.isTouch!==!0)){$(ev.target).on("click.disable",function(ev){ev.stopImmediatePropagation();ev.stopPropagation();ev.preventDefault();$(ev.target).off("click.disable")});handlers=$._data(ev.target,"events").click;owlStopEvent=handlers.pop();handlers.splice(0,0,owlStopEvent)}swapEvents("off")}var base=this,locals={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};base.isCssFinish=!0;base.$elem.on(base.ev_types.start,".owl-wrapper",dragStart)},getNewPosition:function(){var base=this,newPosition=base.closestItem();return newPosition>base.maximumItem?(base.currentItem=base.maximumItem,newPosition=base.maximumItem):base.newPosX>=0&&(newPosition=0,base.currentItem=0),newPosition},closestItem:function(){var base=this,array=base.options.scrollPerPage===!0?base.pagesInArray:base.positionsInArray,goal=base.newPosX,closest=null;return $.each(array,function(i,v){goal-base.itemWidth/20>array[i+1]&&goal-base.itemWidth/20<v&&base.moveDirection()==="left"?(closest=v,base.currentItem=base.options.scrollPerPage===!0?$.inArray(closest,base.positionsInArray):i):goal+base.itemWidth/20<v&&goal+base.itemWidth/20>(array[i+1]||array[i]-base.itemWidth)&&base.moveDirection()==="right"&&(base.options.scrollPerPage===!0?(closest=array[i+1]||array[array.length-1],base.currentItem=$.inArray(closest,base.positionsInArray)):(closest=array[i+1],base.currentItem=i+1))}),base.currentItem},moveDirection:function(){var base=this,direction;return base.newRelativeX<0?(direction="right",base.playDirection="next"):(direction="left",base.playDirection="prev"),direction},customEvents:function(){var base=this;base.$elem.on("owl.next",function(){base.next()});base.$elem.on("owl.prev",function(){base.prev()});base.$elem.on("owl.play",function(event,speed){base.options.autoPlay=speed;base.play();base.hoverStatus="play"});base.$elem.on("owl.stop",function(){base.stop();base.hoverStatus="stop"});base.$elem.on("owl.goTo",function(event,item){base.goTo(item)});base.$elem.on("owl.jumpTo",function(event,item){base.jumpTo(item)})},stopOnHover:function(){var base=this;if(base.options.stopOnHover===!0&&base.browser.isTouch!==!0&&base.options.autoPlay!==!1){base.$elem.on("mouseover",function(){base.stop()});base.$elem.on("mouseout",function(){base.hoverStatus!=="stop"&&base.play()})}},lazyLoad:function(){var base=this,i,$item,itemNumber,$lazyImg,follow;if(base.options.lazyLoad===!1)return!1;for(i=0;i<base.itemsAmount;i+=1)if($item=$(base.$owlItems[i]),$item.data("owl-loaded")!=="loaded"){if(itemNumber=$item.data("owl-item"),$lazyImg=$item.find(".lazyOwl"),typeof $lazyImg.data("src")!="string"){$item.data("owl-loaded","loaded");continue}$item.data("owl-loaded")===undefined&&($lazyImg.hide(),$item.addClass("loading").data("owl-loaded","checked"));follow=base.options.lazyFollow===!0?itemNumber>=base.currentItem:!0;follow&&itemNumber<base.currentItem+base.options.items&&$lazyImg.length&&$lazyImg.each(function(){base.lazyPreload($item,$(this))})}},lazyPreload:function($item,$lazyImg){function showImage(){$item.data("owl-loaded","loaded").removeClass("loading");$lazyImg.removeAttr("data-src");base.options.lazyEffect==="fade"?$lazyImg.fadeIn(400):$lazyImg.show();typeof base.options.afterLazyLoad=="function"&&base.options.afterLazyLoad.apply(this,[base.$elem])}function checkLazyImage(){iterations+=1;base.completeImg($lazyImg.get(0))||isBackgroundImg===!0?showImage():iterations<=100?window.setTimeout(checkLazyImage,100):showImage()}var base=this,iterations=0,isBackgroundImg;$lazyImg.prop("tagName")==="DIV"?($lazyImg.css("background-image","url("+$lazyImg.data("src")+")"),isBackgroundImg=!0):$lazyImg[0].src=$lazyImg.data("src");checkLazyImage()},autoHeight:function(){function addHeight(){var $currentItem=$(base.$owlItems[base.currentItem]).height();base.wrapperOuter.css("height",$currentItem+"px");base.wrapperOuter.hasClass("autoHeight")||window.setTimeout(function(){base.wrapperOuter.addClass("autoHeight")},0)}function checkImage(){iterations+=1;base.completeImg($currentimg.get(0))?addHeight():iterations<=100?window.setTimeout(checkImage,100):base.wrapperOuter.css("height","")}var base=this,$currentimg=$(base.$owlItems[base.currentItem]).find("img"),iterations;$currentimg.get(0)!==undefined?(iterations=0,checkImage()):addHeight()},completeImg:function(img){var naturalWidthType;return img.complete?(naturalWidthType=typeof img.naturalWidth,naturalWidthType!=="undefined"&&img.naturalWidth===0)?!1:!0:!1},onVisibleItems:function(){var base=this,i;for(base.options.addClassActive===!0&&base.$owlItems.removeClass("active"),base.visibleItems=[],i=base.currentItem;i<base.currentItem+base.options.items;i+=1)base.visibleItems.push(i),base.options.addClassActive===!0&&$(base.$owlItems[i]).addClass("active");base.owl.visibleItems=base.visibleItems},transitionTypes:function(className){var base=this;base.outClass="owl-"+className+"-out";base.inClass="owl-"+className+"-in"},singleItemTransition:function(){function transStyles(prevPos){return{position:"relative",left:prevPos+"px"}}var base=this,outClass=base.outClass,inClass=base.inClass,$currentItem=base.$owlItems.eq(base.currentItem),$prevItem=base.$owlItems.eq(base.prevItem),prevPos=Math.abs(base.positionsInArray[base.currentItem])+base.positionsInArray[base.prevItem],origin=Math.abs(base.positionsInArray[base.currentItem])+base.itemWidth/2,animEnd="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";base.isTransition=!0;base.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":origin+"px","-moz-perspective-origin":origin+"px","perspective-origin":origin+"px"});$prevItem.css(transStyles(prevPos,10)).addClass(outClass).on(animEnd,function(){base.endPrev=!0;$prevItem.off(animEnd);base.clearTransStyle($prevItem,outClass)});$currentItem.addClass(inClass).on(animEnd,function(){base.endCurrent=!0;$currentItem.off(animEnd);base.clearTransStyle($currentItem,inClass)})},clearTransStyle:function(item,classToRemove){var base=this;item.css({position:"",left:""}).removeClass(classToRemove);base.endPrev&&base.endCurrent&&(base.$owlWrapper.removeClass("owl-origin"),base.endPrev=!1,base.endCurrent=!1,base.isTransition=!1)},owlStatus:function(){var base=this;base.owl={userOptions:base.userOptions,baseElement:base.$elem,userItems:base.$userItems,owlItems:base.$owlItems,currentItem:base.currentItem,prevItem:base.prevItem,visibleItems:base.visibleItems,isTouch:base.browser.isTouch,browser:base.browser,dragDirection:base.dragDirection}},clearEvents:function(){var base=this;base.$elem.off(".owl owl mousedown.disableTextSelect");$(document).off(".owl owl");$(window).off("resize",base.resizer)},unWrap:function(){var base=this;base.$elem.children().length!==0&&(base.$owlWrapper.unwrap(),base.$userItems.unwrap().unwrap(),base.owlControls&&base.owlControls.remove());base.clearEvents();base.$elem.attr({style:base.$elem.data("owl-originalStyles")||"","class":base.$elem.data("owl-originalClasses")})},destroy:function(){var base=this;base.stop();window.clearInterval(base.checkVisible);base.unWrap();base.$elem.removeData()},reinit:function(newOptions){var base=this,options=$.extend({},base.userOptions,newOptions);base.unWrap();base.init(options,base.$elem)},addItem:function(htmlString,targetPosition){var base=this,position;if(!htmlString)return!1;if(base.$elem.children().length===0)return base.$elem.append(htmlString),base.setVars(),!1;base.unWrap();position=targetPosition===undefined||targetPosition===-1?-1:targetPosition;position>=base.$userItems.length||position===-1?base.$userItems.eq(-1).after(htmlString):base.$userItems.eq(position).before(htmlString);base.setVars()},removeItem:function(targetPosition){var base=this,position;if(base.$elem.children().length===0)return!1;position=targetPosition===undefined||targetPosition===-1?-1:targetPosition;base.unWrap();base.$userItems.eq(position).remove();base.setVars()}};$.fn.owlCarousel=function(options){return this.each(function(){if($(this).data("owl-init")===!0)return!1;$(this).data("owl-init",!0);var carousel=Object.create(Carousel);carousel.init(options,this);$.data(this,"owlCarousel",carousel)})};$.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:window,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document),function(root,factory){typeof exports=="object"?module.exports=factory():typeof define=="function"&&define.amd&&define("GMaps",[],factory);root.GMaps=factory()}(this,function(){ /*! * GMaps.js v0.4.12 * http://hpneo.github.com/gmaps/ * * Copyright 2014, Gustavo Leon * Released under the MIT License. */ var travelMode,unitSystem;if(typeof window.google=="object"&&window.google.maps){var extend_object=function(obj,new_obj){var name;if(obj===new_obj)return obj;for(name in new_obj)obj[name]=new_obj[name];return obj},replace_object=function(obj,replace){var name;if(obj===replace)return obj;for(name in replace)obj[name]!=undefined&&(obj[name]=replace[name]);return obj},array_map=function(array,callback){var original_callback_params=Array.prototype.slice.call(arguments,2),array_return=[],array_length=array.length,i;if(Array.prototype.map&&array.map===Array.prototype.map)array_return=Array.prototype.map.call(array,function(item){return callback_params=original_callback_params,callback_params.splice(0,0,item),callback.apply(this,callback_params)});else for(i=0;i<array_length;i++)callback_params=original_callback_params,callback_params.splice(0,0,array[i]),array_return.push(callback.apply(this,callback_params));return array_return},array_flat=function(array){for(var new_array=[],i=0;i<array.length;i++)new_array=new_array.concat(array[i]);return new_array},coordsToLatLngs=function(coords,useGeoJSON){var first_coord=coords[0],second_coord=coords[1];return useGeoJSON&&(first_coord=coords[1],second_coord=coords[0]),new google.maps.LatLng(first_coord,second_coord)},arrayToLatLng=function(coords,useGeoJSON){for(var i=0;i<coords.length;i++)coords[i]=coords[i].length>0&&typeof coords[i][0]=="object"?arrayToLatLng(coords[i],useGeoJSON):coordsToLatLngs(coords[i],useGeoJSON);return coords},getElementById=function(id,context){var id=id.replace("#","");return"jQuery"in this&&context?$("#"+id,context)[0]:document.getElementById(id)},findAbsolutePosition=function(obj){var curleft=0,curtop=0;if(obj.offsetParent)do curleft+=obj.offsetLeft,curtop+=obj.offsetTop;while(obj=obj.offsetParent);return[curleft,curtop]},GMaps=function(){"use strict";var doc=document,GMaps=function(options){var buildContextMenuHTML,setupListener,ev,name,native_methods,method;if(!this)return new GMaps(options);options.zoom=options.zoom||15;options.mapType=options.mapType||"roadmap";var self=this,i,events_that_hide_context_menu=["bounds_changed","center_changed","click","dblclick","drag","dragend","dragstart","idle","maptypeid_changed","projection_changed","resize","tilesloaded","zoom_changed"],events_that_doesnt_hide_context_menu=["mousemove","mouseout","mouseover"],options_to_be_deleted=["el","lat","lng","mapType","width","height","markerClusterer","enableNewStyle"],container_id=options.el||options.div,markerClustererFunction=options.markerClusterer,mapType=google.maps.MapTypeId[options.mapType.toUpperCase()],map_center=new google.maps.LatLng(options.lat,options.lng),zoomControl=options.zoomControl||!0,zoomControlOpt=options.zoomControlOpt||{style:"DEFAULT",position:"TOP_LEFT"},zoomControlStyle=zoomControlOpt.style||"DEFAULT",zoomControlPosition=zoomControlOpt.position||"TOP_LEFT",panControl=options.panControl||!0,mapTypeControl=options.mapTypeControl||!0,scaleControl=options.scaleControl||!0,streetViewControl=options.streetViewControl||!0,overviewMapControl=overviewMapControl||!0,map_options={},map_base_options={zoom:this.zoom,center:map_center,mapTypeId:mapType},map_controls_options={panControl:panControl,zoomControl:zoomControl,zoomControlOptions:{style:google.maps.ZoomControlStyle[zoomControlStyle],position:google.maps.ControlPosition[zoomControlPosition]},mapTypeControl:mapTypeControl,scaleControl:scaleControl,streetViewControl:streetViewControl,overviewMapControl:overviewMapControl};if(this.el=typeof options.el=="string"||typeof options.div=="string"?getElementById(container_id,options.context):container_id,typeof this.el=="undefined"||this.el===null)throw"No element defined.";for(window.context_menu=window.context_menu||{},window.context_menu[self.el.id]={},this.controls=[],this.overlays=[],this.layers=[],this.singleLayers={},this.markers=[],this.polylines=[],this.routes=[],this.polygons=[],this.infoWindow=null,this.overlay_el=null,this.zoom=options.zoom,this.registered_events={},this.el.style.width=options.width||this.el.scrollWidth||this.el.offsetWidth,this.el.style.height=options.height||this.el.scrollHeight||this.el.offsetHeight,google.maps.visualRefresh=options.enableNewStyle,i=0;i<options_to_be_deleted.length;i++)delete options[options_to_be_deleted[i]];for(options.disableDefaultUI!=!0&&(map_base_options=extend_object(map_base_options,map_controls_options)),map_options=extend_object(map_base_options,options),i=0;i<events_that_hide_context_menu.length;i++)delete map_options[events_that_hide_context_menu[i]];for(i=0;i<events_that_doesnt_hide_context_menu.length;i++)delete map_options[events_that_doesnt_hide_context_menu[i]];for(this.map=new google.maps.Map(this.el,map_options),markerClustererFunction&&(this.markerClusterer=markerClustererFunction.apply(this,[this.map])),buildContextMenuHTML=function(control,e){var html="",options=window.context_menu[self.el.id][control],option,context_menu_element,context_menu_items,context_menu_items_count,i,context_menu_item,assign_menu_item_action;for(i in options)options.hasOwnProperty(i)&&(option=options[i],html+='<li><a id="'+control+"_"+i+'" href="#">'+option.title+"<\/a><\/li>");if(getElementById("gmaps_context_menu")){for(context_menu_element=getElementById("gmaps_context_menu"),context_menu_element.innerHTML=html,context_menu_items=context_menu_element.getElementsByTagName("a"),context_menu_items_count=context_menu_items.length,i=0;i<context_menu_items_count;i++)context_menu_item=context_menu_items[i],assign_menu_item_action=function(ev){ev.preventDefault();options[this.id.replace(control+"_","")].action.apply(self,[e]);self.hideContextMenu()},google.maps.event.clearListeners(context_menu_item,"click"),google.maps.event.addDomListenerOnce(context_menu_item,"click",assign_menu_item_action,!1);var position=findAbsolutePosition.apply(this,[self.el]),left=position[0]+e.pixel.x-15,top=position[1]+e.pixel.y-15;context_menu_element.style.left=left+"px";context_menu_element.style.top=top+"px";context_menu_element.style.display="block"}},this.buildContextMenu=function(control,e){if(control==="marker"){e.pixel={};var overlay=new google.maps.OverlayView;overlay.setMap(self.map);overlay.draw=function(){var projection=overlay.getProjection(),position=e.marker.getPosition();e.pixel=projection.fromLatLngToContainerPixel(position);buildContextMenuHTML(control,e)}}else buildContextMenuHTML(control,e)},this.setContextMenu=function(options){var i,ul,option,context_menu_element;window.context_menu[self.el.id][options.control]={};ul=doc.createElement("ul");for(i in options.options)options.options.hasOwnProperty(i)&&(option=options.options[i],window.context_menu[self.el.id][options.control][option.name]={title:option.title,action:option.action});ul.id="gmaps_context_menu";ul.style.display="none";ul.style.position="absolute";ul.style.minWidth="100px";ul.style.background="white";ul.style.listStyle="none";ul.style.padding="8px";ul.style.boxShadow="2px 2px 6px #ccc";doc.body.appendChild(ul);context_menu_element=getElementById("gmaps_context_menu");google.maps.event.addDomListener(context_menu_element,"mouseout",function(ev){ev.relatedTarget&&this.contains(ev.relatedTarget)||window.setTimeout(function(){context_menu_element.style.display="none"},400)},!1)},this.hideContextMenu=function(){var context_menu_element=getElementById("gmaps_context_menu");context_menu_element&&(context_menu_element.style.display="none")},setupListener=function(object,name){google.maps.event.addListener(object,name,function(e){e==undefined&&(e=this);options[name].apply(this,[e]);self.hideContextMenu()})},ev=0;ev<events_that_hide_context_menu.length;ev++)name=events_that_hide_context_menu[ev],name in options&&setupListener(this.map,name);for(ev=0;ev<events_that_doesnt_hide_context_menu.length;ev++)name=events_that_doesnt_hide_context_menu[ev],name in options&&setupListener(this.map,name);google.maps.event.addListener(this.map,"rightclick",function(e){options.rightclick&&options.rightclick.apply(this,[e]);window.context_menu[self.el.id].map!=undefined&&self.buildContextMenu("map",e)});this.refresh=function(){google.maps.event.trigger(this.map,"resize")};this.fitZoom=function(){for(var latLngs=[],markers_length=this.markers.length,i=0;i<markers_length;i++)typeof this.markers[i].visible=="boolean"&&this.markers[i].visible&&latLngs.push(this.markers[i].getPosition());this.fitLatLngBounds(latLngs)};this.fitLatLngBounds=function(latLngs){for(var total=latLngs.length,bounds=new google.maps.LatLngBounds,i=0;i<total;i++)bounds.extend(latLngs[i]);this.map.fitBounds(bounds)};this.setCenter=function(lat,lng,callback){this.map.panTo(new google.maps.LatLng(lat,lng));callback&&callback()};this.getElement=function(){return this.el};this.zoomIn=function(value){value=value||1;this.zoom=this.map.getZoom()+value;this.map.setZoom(this.zoom)};this.zoomOut=function(value){value=value||1;this.zoom=this.map.getZoom()-value;this.map.setZoom(this.zoom)};native_methods=[];for(method in this.map)typeof this.map[method]!="function"||this[method]||native_methods.push(method);for(i=0;i<native_methods.length;i++)(function(gmaps,scope,method_name){gmaps[method_name]=function(){return scope[method_name].apply(scope,arguments)}})(this,this.map,native_methods[i])};return GMaps}(this);return GMaps.prototype.createControl=function(options){var control=document.createElement("div"),option,ev;control.style.cursor="pointer";options.disableDefaultStyles!==!0&&(control.style.fontFamily="Roboto, Arial, sans-serif",control.style.fontSize="11px",control.style.boxShadow="rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px");for(option in options.style)control.style[option]=options.style[option];options.id&&(control.id=options.id);options.classes&&(control.className=options.classes);options.content&&(control.innerHTML=options.content);for(ev in options.events)(function(object,name){google.maps.event.addDomListener(object,name,function(){options.events[name].apply(this,[this])})})(control,ev);return control.index=1,control},GMaps.prototype.addControl=function(options){var position=google.maps.ControlPosition[options.position.toUpperCase()],control;return delete options.position,control=this.createControl(options),this.controls.push(control),this.map.controls[position].push(control),control},GMaps.prototype.createMarker=function(options){var marker,info_window_events,marker_events,marker_events_with_mouse,ev;if(options.lat==undefined&&options.lng==undefined&&options.position==undefined)throw"No latitude or longitude defined.";var self=this,details=options.details,fences=options.fences,outside=options.outside,base_options={position:new google.maps.LatLng(options.lat,options.lng),map:null},marker_options=extend_object(base_options,options);if(delete marker_options.lat,delete marker_options.lng,delete marker_options.fences,delete marker_options.outside,marker=new google.maps.Marker(marker_options),marker.fences=fences,options.infoWindow)for(marker.infoWindow=new google.maps.InfoWindow(options.infoWindow),info_window_events=["closeclick","content_changed","domready","position_changed","zindex_changed"],ev=0;ev<info_window_events.length;ev++)(function(object,name){options.infoWindow[name]&&google.maps.event.addListener(object,name,function(e){options.infoWindow[name].apply(this,[e])})})(marker.infoWindow,info_window_events[ev]);for(marker_events=["animation_changed","clickable_changed","cursor_changed","draggable_changed","flat_changed","icon_changed","position_changed","shadow_changed","shape_changed","title_changed","visible_changed","zindex_changed"],marker_events_with_mouse=["dblclick","drag","dragend","dragstart","mousedown","mouseout","mouseover","mouseup"],ev=0;ev<marker_events.length;ev++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(){options[name].apply(this,[this])})})(marker,marker_events[ev]);for(ev=0;ev<marker_events_with_mouse.length;ev++)(function(map,object,name){options[name]&&google.maps.event.addListener(object,name,function(me){me.pixel||(me.pixel=map.getProjection().fromLatLngToPoint(me.latLng));options[name].apply(this,[me])})})(this.map,marker,marker_events_with_mouse[ev]);return google.maps.event.addListener(marker,"click",function(){this.details=details;options.click&&options.click.apply(this,[this]);marker.infoWindow&&(self.hideInfoWindows(),marker.infoWindow.open(self.map,marker))}),google.maps.event.addListener(marker,"rightclick",function(e){e.marker=this;options.rightclick&&options.rightclick.apply(this,[e]);window.context_menu[self.el.id].marker!=undefined&&self.buildContextMenu("marker",e)}),marker.fences&&google.maps.event.addListener(marker,"dragend",function(){self.checkMarkerGeofence(marker,function(m,f){outside(m,f)})}),marker},GMaps.prototype.addMarker=function(options){var marker;if(options.hasOwnProperty("gm_accessors_"))marker=options;else if(options.hasOwnProperty("lat")&&options.hasOwnProperty("lng")||options.position)marker=this.createMarker(options);else throw"No latitude or longitude defined.";return marker.setMap(this.map),this.markerClusterer&&this.markerClusterer.addMarker(marker),this.markers.push(marker),GMaps.fire("marker_added",marker,this),marker},GMaps.prototype.addMarkers=function(array){for(var i=0,marker;marker=array[i];i++)this.addMarker(marker);return this.markers},GMaps.prototype.hideInfoWindows=function(){for(var i=0,marker;marker=this.markers[i];i++)marker.infoWindow&&marker.infoWindow.close()},GMaps.prototype.removeMarker=function(marker){for(var i=0;i<this.markers.length;i++)if(this.markers[i]===marker){this.markers[i].setMap(null);this.markers.splice(i,1);this.markerClusterer&&this.markerClusterer.removeMarker(marker);GMaps.fire("marker_removed",marker,this);break}return marker},GMaps.prototype.removeMarkers=function(collection){var new_markers=[],i;if(typeof collection=="undefined"){for(i=0;i<this.markers.length;i++)this.markers[i].setMap(null);this.markers=new_markers}else{for(i=0;i<collection.length;i++)this.markers.indexOf(collection[i])>-1&&this.markers[i].setMap(null);for(i=0;i<this.markers.length;i++)this.markers[i].getMap()!=null&&new_markers.push(this.markers[i]);this.markers=new_markers}},GMaps.prototype.drawOverlay=function(options){var overlay=new google.maps.OverlayView,auto_show=!0;return overlay.setMap(this.map),options.auto_show!=null&&(auto_show=options.auto_show),overlay.onAdd=function(){var el=document.createElement("div"),ev;el.style.borderStyle="none";el.style.borderWidth="0px";el.style.position="absolute";el.style.zIndex=100;el.innerHTML=options.content;overlay.el=el;options.layer||(options.layer="overlayLayer");var panes=this.getPanes(),overlayLayer=panes[options.layer],stop_overlay_events=["contextmenu","DOMMouseScroll","dblclick","mousedown"];for(overlayLayer.appendChild(el),ev=0;ev<stop_overlay_events.length;ev++)(function(object,name){google.maps.event.addDomListener(object,name,function(e){navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all?(e.cancelBubble=!0,e.returnValue=!1):e.stopPropagation()})})(el,stop_overlay_events[ev]);options.click&&google.maps.event.addDomListener(overlay.el,"click",function(){options.click.apply(overlay,[overlay])});google.maps.event.trigger(this,"ready")},overlay.draw=function(){var projection=this.getProjection(),pixel=projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat,options.lng));options.horizontalOffset=options.horizontalOffset||0;options.verticalOffset=options.verticalOffset||0;var el=overlay.el,content=el.children[0],content_height=content.clientHeight,content_width=content.clientWidth;switch(options.verticalAlign){case"top":el.style.top=pixel.y-content_height+options.verticalOffset+"px";break;default:case"middle":el.style.top=pixel.y-content_height/2+options.verticalOffset+"px";break;case"bottom":el.style.top=pixel.y+options.verticalOffset+"px"}switch(options.horizontalAlign){case"left":el.style.left=pixel.x-content_width+options.horizontalOffset+"px";break;default:case"center":el.style.left=pixel.x-content_width/2+options.horizontalOffset+"px";break;case"right":el.style.left=pixel.x+options.horizontalOffset+"px"}el.style.display=auto_show?"block":"none";auto_show||options.show.apply(this,[el])},overlay.onRemove=function(){var el=overlay.el;options.remove?options.remove.apply(this,[el]):(overlay.el.parentNode.removeChild(overlay.el),overlay.el=null)},this.overlays.push(overlay),overlay},GMaps.prototype.removeOverlay=function(overlay){for(var i=0;i<this.overlays.length;i++)if(this.overlays[i]===overlay){this.overlays[i].setMap(null);this.overlays.splice(i,1);break}},GMaps.prototype.removeOverlays=function(){for(var i=0,item;item=this.overlays[i];i++)item.setMap(null);this.overlays=[]},GMaps.prototype.drawPolyline=function(options){var path=[],points=options.path,i,latlng,polyline_options,polyline,polyline_events,ev;if(points.length)if(points[0][0]===undefined)path=points;else for(i=0;latlng=points[i];i++)path.push(new google.maps.LatLng(latlng[0],latlng[1]));for(polyline_options={map:this.map,path:path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight,geodesic:options.geodesic,clickable:!0,editable:!1,visible:!0},options.hasOwnProperty("clickable")&&(polyline_options.clickable=options.clickable),options.hasOwnProperty("editable")&&(polyline_options.editable=options.editable),options.hasOwnProperty("icons")&&(polyline_options.icons=options.icons),options.hasOwnProperty("zIndex")&&(polyline_options.zIndex=options.zIndex),polyline=new google.maps.Polyline(polyline_options),polyline_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],ev=0;ev<polyline_events.length;ev++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(e){options[name].apply(this,[e])})})(polyline,polyline_events[ev]);return this.polylines.push(polyline),GMaps.fire("polyline_added",polyline,this),polyline},GMaps.prototype.removePolyline=function(polyline){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i]===polyline){this.polylines[i].setMap(null);this.polylines.splice(i,1);GMaps.fire("polyline_removed",polyline,this);break}},GMaps.prototype.removePolylines=function(){for(var i=0,item;item=this.polylines[i];i++)item.setMap(null);this.polylines=[]},GMaps.prototype.drawCircle=function(options){var polygon,polygon_events,ev;for(options=extend_object({map:this.map,center:new google.maps.LatLng(options.lat,options.lng)},options),delete options.lat,delete options.lng,polygon=new google.maps.Circle(options),polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],ev=0;ev<polygon_events.length;ev++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(e){options[name].apply(this,[e])})})(polygon,polygon_events[ev]);return this.polygons.push(polygon),polygon},GMaps.prototype.drawRectangle=function(options){var latLngBounds,polygon,polygon_events,ev;for(options=extend_object({map:this.map},options),latLngBounds=new google.maps.LatLngBounds(new google.maps.LatLng(options.bounds[0][0],options.bounds[0][1]),new google.maps.LatLng(options.bounds[1][0],options.bounds[1][1])),options.bounds=latLngBounds,polygon=new google.maps.Rectangle(options),polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],ev=0;ev<polygon_events.length;ev++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(e){options[name].apply(this,[e])})})(polygon,polygon_events[ev]);return this.polygons.push(polygon),polygon},GMaps.prototype.drawPolygon=function(options){var useGeoJSON=!1,polygon,polygon_events,ev;for(options.hasOwnProperty("useGeoJSON")&&(useGeoJSON=options.useGeoJSON),delete options.useGeoJSON,options=extend_object({map:this.map},options),useGeoJSON==!1&&(options.paths=[options.paths.slice(0)]),options.paths.length>0&&options.paths[0].length>0&&(options.paths=array_flat(array_map(options.paths,arrayToLatLng,useGeoJSON))),polygon=new google.maps.Polygon(options),polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],ev=0;ev<polygon_events.length;ev++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(e){options[name].apply(this,[e])})})(polygon,polygon_events[ev]);return this.polygons.push(polygon),GMaps.fire("polygon_added",polygon,this),polygon},GMaps.prototype.removePolygon=function(polygon){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i]===polygon){this.polygons[i].setMap(null);this.polygons.splice(i,1);GMaps.fire("polygon_removed",polygon,this);break}},GMaps.prototype.removePolygons=function(){for(var i=0,item;item=this.polygons[i];i++)item.setMap(null);this.polygons=[]},GMaps.prototype.getFromFusionTables=function(options){var events=options.events,fusion_tables_options,layer,ev;delete options.events;fusion_tables_options=options;layer=new google.maps.FusionTablesLayer(fusion_tables_options);for(ev in events)(function(object,name){google.maps.event.addListener(object,name,function(e){events[name].apply(this,[e])})})(layer,ev);return this.layers.push(layer),layer},GMaps.prototype.loadFromFusionTables=function(options){var layer=this.getFromFusionTables(options);return layer.setMap(this.map),layer},GMaps.prototype.getFromKML=function(options){var url=options.url,events=options.events,kml_options,layer,ev;delete options.url;delete options.events;kml_options=options;layer=new google.maps.KmlLayer(url,kml_options);for(ev in events)(function(object,name){google.maps.event.addListener(object,name,function(e){events[name].apply(this,[e])})})(layer,ev);return this.layers.push(layer),layer},GMaps.prototype.loadFromKML=function(options){var layer=this.getFromKML(options);return layer.setMap(this.map),layer},GMaps.prototype.addLayer=function(layerName,options){var layer,placeSearchRequest,textSearchRequest;options=options||{};switch(layerName){case"weather":this.singleLayers.weather=layer=new google.maps.weather.WeatherLayer;break;case"clouds":this.singleLayers.clouds=layer=new google.maps.weather.CloudLayer;break;case"traffic":this.singleLayers.traffic=layer=new google.maps.TrafficLayer;break;case"transit":this.singleLayers.transit=layer=new google.maps.TransitLayer;break;case"bicycling":this.singleLayers.bicycling=layer=new google.maps.BicyclingLayer;break;case"panoramio":this.singleLayers.panoramio=layer=new google.maps.panoramio.PanoramioLayer;layer.setTag(options.filter);delete options.filter;options.click&&google.maps.event.addListener(layer,"click",function(event){options.click(event);delete options.click});break;case"places":this.singleLayers.places=layer=new google.maps.places.PlacesService(this.map);(options.search||options.nearbySearch||options.radarSearch)&&(placeSearchRequest={bounds:options.bounds||null,keyword:options.keyword||null,location:options.location||null,name:options.name||null,radius:options.radius||null,rankBy:options.rankBy||null,types:options.types||null},options.radarSearch&&layer.radarSearch(placeSearchRequest,options.radarSearch),options.search&&layer.search(placeSearchRequest,options.search),options.nearbySearch&&layer.nearbySearch(placeSearchRequest,options.nearbySearch));options.textSearch&&(textSearchRequest={bounds:options.bounds||null,location:options.location||null,query:options.query||null,radius:options.radius||null},layer.textSearch(textSearchRequest,options.textSearch))}if(layer!==undefined)return typeof layer.setOptions=="function"&&layer.setOptions(options),typeof layer.setMap=="function"&&layer.setMap(this.map),layer},GMaps.prototype.removeLayer=function(layer){if(typeof layer=="string"&&this.singleLayers[layer]!==undefined)this.singleLayers[layer].setMap(null),delete this.singleLayers[layer];else for(var i=0;i<this.layers.length;i++)if(this.layers[i]===layer){this.layers[i].setMap(null);this.layers.splice(i,1);break}},GMaps.prototype.getRoutes=function(options){var base_options,request_options,self,service;switch(options.travelMode){case"bicycling":travelMode=google.maps.TravelMode.BICYCLING;break;case"transit":travelMode=google.maps.TravelMode.TRANSIT;break;case"driving":travelMode=google.maps.TravelMode.DRIVING;break;default:travelMode=google.maps.TravelMode.WALKING}unitSystem=options.unitSystem==="imperial"?google.maps.UnitSystem.IMPERIAL:google.maps.UnitSystem.METRIC;base_options={avoidHighways:!1,avoidTolls:!1,optimizeWaypoints:!1,waypoints:[]};request_options=extend_object(base_options,options);request_options.origin=/string/.test(typeof options.origin)?options.origin:new google.maps.LatLng(options.origin[0],options.origin[1]);request_options.destination=/string/.test(typeof options.destination)?options.destination:new google.maps.LatLng(options.destination[0],options.destination[1]);request_options.travelMode=travelMode;request_options.unitSystem=unitSystem;delete request_options.callback;delete request_options.error;self=this;service=new google.maps.DirectionsService;service.route(request_options,function(result,status){if(status===google.maps.DirectionsStatus.OK){for(var r in result.routes)result.routes.hasOwnProperty(r)&&self.routes.push(result.routes[r]);options.callback&&options.callback(self.routes)}else options.error&&options.error(result,status)})},GMaps.prototype.removeRoutes=function(){this.routes=[]},GMaps.prototype.getElevations=function(options){var callback,service,pathRequest;options=extend_object({locations:[],path:!1,samples:256},options);options.locations.length>0&&options.locations[0].length>0&&(options.locations=array_flat(array_map([options.locations],arrayToLatLng,!1)));callback=options.callback;delete options.callback;service=new google.maps.ElevationService;options.path?(pathRequest={path:options.locations,samples:options.samples},service.getElevationAlongPath(pathRequest,function(result,status){callback&&typeof callback=="function"&&callback(result,status)})):(delete options.path,delete options.samples,service.getElevationForLocations(options,function(result,status){callback&&typeof callback=="function"&&callback(result,status)}))},GMaps.prototype.cleanRoute=GMaps.prototype.removePolylines,GMaps.prototype.drawRoute=function(options){var self=this;this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,unitSystem:options.unitSystem,error:options.error,callback:function(e){e.length>0&&(self.drawPolyline({path:e[e.length-1].overview_path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight}),options.callback&&options.callback(e[e.length-1]))}})},GMaps.prototype.travelRoute=function(options){var steps,i,step;if(options.origin&&options.destination)this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,error:options.error,callback:function(e){var route,steps,i,step;if(e.length>0&&options.start&&options.start(e[e.length-1]),e.length>0&&options.step&&(route=e[e.length-1],route.legs.length>0))for(steps=route.legs[0].steps,i=0;step=steps[i];i++)step.step_number=i,options.step(step,route.legs[0].steps.length-1);e.length>0&&options.end&&options.end(e[e.length-1])}});else if(options.route&&options.route.legs.length>0)for(steps=options.route.legs[0].steps,i=0;step=steps[i];i++)step.step_number=i,options.step(step)},GMaps.prototype.drawSteppedRoute=function(options){var self=this,steps,i,step;if(options.origin&&options.destination)this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,error:options.error,callback:function(e){var route,steps,i,step;if(e.length>0&&options.start&&options.start(e[e.length-1]),e.length>0&&options.step&&(route=e[e.length-1],route.legs.length>0))for(steps=route.legs[0].steps,i=0;step=steps[i];i++)step.step_number=i,self.drawPolyline({path:step.path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight}),options.step(step,route.legs[0].steps.length-1);e.length>0&&options.end&&options.end(e[e.length-1])}});else if(options.route&&options.route.legs.length>0)for(steps=options.route.legs[0].steps,i=0;step=steps[i];i++)step.step_number=i,self.drawPolyline({path:step.path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight}),options.step(step)},GMaps.Route=function(options){this.origin=options.origin;this.destination=options.destination;this.waypoints=options.waypoints;this.map=options.map;this.route=options.route;this.step_count=0;this.steps=this.route.legs[0].steps;this.steps_length=this.steps.length;this.polyline=this.map.drawPolyline({path:new google.maps.MVCArray,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight}).getPath()},GMaps.Route.prototype.getRoute=function(options){var self=this;this.map.getRoutes({origin:this.origin,destination:this.destination,travelMode:options.travelMode,waypoints:this.waypoints||[],error:options.error,callback:function(){self.route=e[0];options.callback&&options.callback.call(self)}})},GMaps.Route.prototype.back=function(){var path,p;if(this.step_count>0){this.step_count--;path=this.route.legs[0].steps[this.step_count].path;for(p in path)path.hasOwnProperty(p)&&this.polyline.pop()}},GMaps.Route.prototype.forward=function(){var path,p;if(this.step_count<this.steps_length){path=this.route.legs[0].steps[this.step_count].path;for(p in path)path.hasOwnProperty(p)&&this.polyline.push(path[p]);this.step_count++}},GMaps.prototype.checkGeofence=function(lat,lng,fence){return fence.containsLatLng(new google.maps.LatLng(lat,lng))},GMaps.prototype.checkMarkerGeofence=function(marker,outside_callback){var i,fence,pos;if(marker.fences)for(i=0;fence=marker.fences[i];i++)pos=marker.getPosition(),this.checkGeofence(pos.lat(),pos.lng(),fence)||outside_callback(marker,fence)},GMaps.prototype.toImage=function(options){var options=options||{},static_map_options={},i,polyline;if(static_map_options.size=options.size||[this.el.clientWidth,this.el.clientHeight],static_map_options.lat=this.getCenter().lat(),static_map_options.lng=this.getCenter().lng(),this.markers.length>0)for(static_map_options.markers=[],i=0;i<this.markers.length;i++)static_map_options.markers.push({lat:this.markers[i].getPosition().lat(),lng:this.markers[i].getPosition().lng()});return this.polylines.length>0&&(polyline=this.polylines[0],static_map_options.polyline={},static_map_options.polyline.path=google.maps.geometry.encoding.encodePath(polyline.getPath()),static_map_options.polyline.strokeColor=polyline.strokeColor,static_map_options.polyline.strokeOpacity=polyline.strokeOpacity,static_map_options.polyline.strokeWeight=polyline.strokeWeight),GMaps.staticMapURL(static_map_options)},GMaps.staticMapURL=function(options){function parseColor(color,opacity){if(color[0]==="#"&&(color=color.replace("#","0x"),opacity)){if(opacity=parseFloat(opacity),opacity=Math.min(1,Math.max(opacity,0)),opacity===0)return"0x00000000";opacity=(opacity*255).toString(16);opacity.length===1&&(opacity+=opacity);color=color.slice(0,8)+opacity}return color}var parameters=[],data,static_root="http://maps.googleapis.com/maps/api/staticmap",markers,styles,polyline,visible,size,sensor,marker,loc,param,i,styleRule,p,ruleArg,rule,color,fillcolor,path,j,pos,dpi;options.url&&(static_root=options.url,delete options.url);static_root+="?";markers=options.markers;delete options.markers;!markers&&options.marker&&(markers=[options.marker],delete options.marker);styles=options.styles;delete options.styles;polyline=options.polyline;delete options.polyline;options.center?(parameters.push("center="+options.center),delete options.center):options.address?(parameters.push("center="+options.address),delete options.address):options.lat?(parameters.push(["center=",options.lat,",",options.lng].join("")),delete options.lat,delete options.lng):options.visible&&(visible=encodeURI(options.visible.join("|")),parameters.push("visible="+visible));size=options.size;size?(size.join&&(size=size.join("x")),delete options.size):size="630x300";parameters.push("size="+size);options.zoom||options.zoom===!1||(options.zoom=15);sensor=options.hasOwnProperty("sensor")?!!options.sensor:!0;delete options.sensor;parameters.push("sensor="+sensor);for(param in options)options.hasOwnProperty(param)&¶meters.push(param+"="+options[param]);if(markers)for(i=0;data=markers[i];i++){marker=[];data.size&&data.size!=="normal"?(marker.push("size:"+data.size),delete data.size):data.icon&&(marker.push("icon:"+encodeURI(data.icon)),delete data.icon);data.color&&(marker.push("color:"+data.color.replace("#","0x")),delete data.color);data.label&&(marker.push("label:"+data.label[0].toUpperCase()),delete data.label);loc=data.address?data.address:data.lat+","+data.lng;delete data.address;delete data.lat;delete data.lng;for(param in data)data.hasOwnProperty(param)&&marker.push(param+":"+data[param]);marker.length||i===0?(marker.push(loc),marker=marker.join("|"),parameters.push("markers="+encodeURI(marker))):(marker=parameters.pop()+encodeURI("|"+loc),parameters.push(marker))}if(styles)for(i=0;i<styles.length;i++){for(styleRule=[],styles[i].featureType&&styles[i].featureType!="all"&&styleRule.push("feature:"+styles[i].featureType),styles[i].elementType&&styles[i].elementType!="all"&&styleRule.push("element:"+styles[i].elementType),j=0;j<styles[i].stylers.length;j++)for(p in styles[i].stylers[j])ruleArg=styles[i].stylers[j][p],(p=="hue"||p=="color")&&(ruleArg="0x"+ruleArg.substring(1)),styleRule.push(p+":"+ruleArg);rule=styleRule.join("|");rule!=""&¶meters.push("style="+rule)}if(polyline){if(data=polyline,polyline=[],data.strokeWeight&&polyline.push("weight:"+parseInt(data.strokeWeight,10)),data.strokeColor&&(color=parseColor(data.strokeColor,data.strokeOpacity),polyline.push("color:"+color)),data.fillColor&&(fillcolor=parseColor(data.fillColor,data.fillOpacity),polyline.push("fillcolor:"+fillcolor)),path=data.path,path.join)for(j=0;pos=path[j];j++)polyline.push(pos.join(","));else polyline.push("enc:"+path);polyline=polyline.join("|");parameters.push("path="+encodeURI(polyline))}return dpi=window.devicePixelRatio||1,parameters.push("scale="+dpi),parameters=parameters.join("&"),static_root+parameters},GMaps.prototype.addMapType=function(mapTypeId,options){if(options.hasOwnProperty("getTileUrl")&&typeof options.getTileUrl=="function"){options.tileSize=options.tileSize||new google.maps.Size(256,256);var mapType=new google.maps.ImageMapType(options);this.map.mapTypes.set(mapTypeId,mapType)}else throw"'getTileUrl' function required.";},GMaps.prototype.addOverlayMapType=function(options){if(options.hasOwnProperty("getTile")&&typeof options.getTile=="function"){var overlayMapTypeIndex=options.index;delete options.index;this.map.overlayMapTypes.insertAt(overlayMapTypeIndex,options)}else throw"'getTile' function required.";},GMaps.prototype.removeOverlayMapType=function(overlayMapTypeIndex){this.map.overlayMapTypes.removeAt(overlayMapTypeIndex)},GMaps.prototype.addStyle=function(options){var styledMapType=new google.maps.StyledMapType(options.styles,{name:options.styledMapName});this.map.mapTypes.set(options.mapTypeId,styledMapType)},GMaps.prototype.setStyle=function(mapTypeId){this.map.setMapTypeId(mapTypeId)},GMaps.prototype.createPanorama=function(streetview_options){return streetview_options.hasOwnProperty("lat")&&streetview_options.hasOwnProperty("lng")||(streetview_options.lat=this.getCenter().lat(),streetview_options.lng=this.getCenter().lng()),this.panorama=GMaps.createPanorama(streetview_options),this.map.setStreetView(this.panorama),this.panorama},GMaps.createPanorama=function(options){var el=getElementById(options.el,options.context),streetview_events,streetview_options,panorama,i;for(options.position=new google.maps.LatLng(options.lat,options.lng),delete options.el,delete options.context,delete options.lat,delete options.lng,streetview_events=["closeclick","links_changed","pano_changed","position_changed","pov_changed","resize","visible_changed"],streetview_options=extend_object({visible:!0},options),i=0;i<streetview_events.length;i++)delete streetview_options[streetview_events[i]];for(panorama=new google.maps.StreetViewPanorama(el,streetview_options),i=0;i<streetview_events.length;i++)(function(object,name){options[name]&&google.maps.event.addListener(object,name,function(){options[name].apply(this)})})(panorama,streetview_events[i]);return panorama},GMaps.prototype.on=function(event_name,handler){return GMaps.on(event_name,this,handler)},GMaps.prototype.off=function(event_name){GMaps.off(event_name,this)},GMaps.custom_events=["marker_added","marker_removed","polyline_added","polyline_removed","polygon_added","polygon_removed","geolocated","geolocation_failed"],GMaps.on=function(event_name,object,handler){if(GMaps.custom_events.indexOf(event_name)==-1)return google.maps.event.addListener(object,event_name,handler);var registered_event={handler:handler,eventName:event_name};return object.registered_events[event_name]=object.registered_events[event_name]||[],object.registered_events[event_name].push(registered_event),registered_event},GMaps.off=function(event_name,object){GMaps.custom_events.indexOf(event_name)==-1?google.maps.event.clearListeners(object,event_name):object.registered_events[event_name]=[]},GMaps.fire=function(event_name,object,scope){var firing_events,i;if(GMaps.custom_events.indexOf(event_name)==-1)google.maps.event.trigger(object,event_name,Array.prototype.slice.apply(arguments).slice(2));else if(event_name in scope.registered_events)for(firing_events=scope.registered_events[event_name],i=0;i<firing_events.length;i++)(function(handler,scope,object){handler.apply(scope,[object])})(firing_events[i].handler,scope,object)},GMaps.geolocate=function(options){var complete_callback=options.always||options.complete;navigator.geolocation?navigator.geolocation.getCurrentPosition(function(position){options.success(position);complete_callback&&complete_callback()},function(error){options.error(error);complete_callback&&complete_callback()},options.options):(options.not_supported(),complete_callback&&complete_callback())},GMaps.geocode=function(options){this.geocoder=new google.maps.Geocoder;var callback=options.callback;options.hasOwnProperty("lat")&&options.hasOwnProperty("lng")&&(options.latLng=new google.maps.LatLng(options.lat,options.lng));delete options.lat;delete options.lng;delete options.callback;this.geocoder.geocode(options,function(results,status){callback(results,status)})},google.maps.Polygon.prototype.getBounds||(google.maps.Polygon.prototype.getBounds=function(){for(var bounds=new google.maps.LatLngBounds,paths=this.getPaths(),path,i,p=0;p<paths.getLength();p++)for(path=paths.getAt(p),i=0;i<path.getLength();i++)bounds.extend(path.getAt(i));return bounds}),google.maps.Polygon.prototype.containsLatLng||(google.maps.Polygon.prototype.containsLatLng=function(latLng){var bounds=this.getBounds(),inPoly,numPaths,p,i,vertex1,vertex2;if(bounds!==null&&!bounds.contains(latLng))return!1;for(inPoly=!1,numPaths=this.getPaths().getLength(),p=0;p<numPaths;p++){var path=this.getPaths().getAt(p),numPoints=path.getLength(),j=numPoints-1;for(i=0;i<numPoints;i++)vertex1=path.getAt(i),vertex2=path.getAt(j),(vertex1.lng()<latLng.lng()&&vertex2.lng()>=latLng.lng()||vertex2.lng()<latLng.lng()&&vertex1.lng()>=latLng.lng())&&vertex1.lat()+(latLng.lng()-vertex1.lng())/(vertex2.lng()-vertex1.lng())*(vertex2.lat()-vertex1.lat())<latLng.lat()&&(inPoly=!inPoly),j=i}return inPoly}),google.maps.LatLngBounds.prototype.containsLatLng=function(latLng){return this.contains(latLng)},google.maps.Marker.prototype.setFences=function(fences){this.fences=fences},google.maps.Marker.prototype.addFence=function(fence){this.fences.push(fence)},google.maps.Marker.prototype.getId=function(){return this.__gm_id},Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){"use strict";var t,len,n,k;if(this==null)throw new TypeError;if((t=Object(this),len=t.length>>>0,len===0)||(n=0,arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:n!=0&&n!=Infinity&&n!=-Infinity&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len))return-1;for(k=n>=0?n:Math.max(len-Math.abs(n),0);k<len;k++)if(k in t&&t[k]===searchElement)return k;return-1}),GMaps}}),function($){"use strict";var ValidationEngine=function(){var self=this,base,field,fields=[],firstTime=!0;return self.processFields=function(options){$.each(options,function(k,v){field={};typeof v=="object"?(field.selector=k,field.enabled=v.enabled!==undefined?v.enabled:!0,delete v.enabled,self.processValidations(v),self.bindValidations(field),fields.push(field)):console.error("ValidationEngine: "+k+" must be of type object. Not "+typeof v+".")})},self.processValidations=function(validations){field.validations={};$.each(validations,function(k,v){field.validations[k]={};typeof v=="object"?$.each(v,function(key,value){field.validations[k][key]=value}):field.validations[k].validator=v})},self.bindValidations=function(f){f.$elem=$('*[name="'+f.selector+'"]',base.$elem);f.$elem.length!==1&&console.error('ValidationEngine: None or multiple results for selector: "'+f.selector+'".')},self.getValue=function(f){var tag=self.getTagName(f);return tag==="select"||tag==="textarea"?f.$elem.val():tag==="input"?f.$elem.attr("type")==="text"||f.$elem.attr("type")==="password"||f.$elem.attr("type")==="date"?f.$elem.val():f.$elem.attr("type")==="radio"?$("input[name="+f.$elem.attr("name")+"]:checked").val():f.$elem.attr("type")==="checkbox"?f.$elem.is(":checked"):null:null},self.getTagName=function(f){return f.$elem.prop("tagName").toLowerCase()},self.searchField=function(selector){var field;return $.each(fields,function(i,f){if(f.selector===selector)return field=f,!1}),field},self.validateField=function(f){var result=!0;return $.each(f.validations,function(fn,opts){if(fn==="match"){var matchField=self.searchField(opts.matchField);matchField?(typeof opts.beforeValidation=="function"&&opts.beforeValidation(f.$elem),opts.optional?$.fn.validationEngine.validations.optional(self.getValue(f))&&($.fn.validationEngine.validations[fn].call(self,self.getValue(f),self.getValue(matchField),opts.config)||(result=opts.validator)):$.fn.validationEngine.validations[fn].call(self,self.getValue(f),self.getValue(matchField),opts.config)||(result=opts.validator)):console.error('ValidationEngine: MatchField was not found for match key : "'+opts.matchField+'".')}else typeof opts.beforeValidation=="function"&&opts.beforeValidation(f.$elem),opts.optional?$.fn.validationEngine.validations.optional(self.getValue(f))&&($.fn.validationEngine.validations[fn].call(self,self.getValue(f),opts.config)||(result=opts.validator)):$.fn.validationEngine.validations[fn].call(self,self.getValue(f),opts.config)||(result=opts.validator);if(result!==!0)return $.each(f.validations,function(f,o){$("."+o.validator,base.$elem).removeClass("error")}),$("."+result,base.$elem).addClass("error"),typeof opts.afterValidation=="function"&&opts.afterValidation(f.$elem,result),!1}),result===!0&&$.each(f.validations,function(fn,opts){$("."+opts.validator,base.$elem).removeClass("error");typeof opts.afterValidation=="function"&&opts.afterValidation(f.$elem,result)}),result},self.validateAll=function(){var result=!0;return $.each(fields,function(i,f){if(f.enabled===!1)return!0;self.validateField(f)!==!0&&(result=!1)}),result},{init:function(options,elem){base=this;base.$elem=$(elem);base.options=options;self.processFields(base.options)},reset:function(){firstTime=!0;$.each(fields,function(i,f){$.each(f.validations,function(j,v){$("."+v.validator,base.$elem).removeClass("error")})})},destroy:function(){base.$elem.removeData();base=undefined;self=undefined},addField:function(options){self.processFields(options)},addFields:function(options){self.processFields(options)},removeField:function(f){$.each(fields,function(i,item){if(item.selector===f)return fields.splice(i,1),!1})},removeFields:function(array){$.each(array,function(i,f){base.removeField(f)})},enable:function(array){$.each(array,function(i,key){var f=self.searchField(key);f?f.enabled=!0:console.error('ValidationEngine: None fields found for key: "'+key+'".')})},disable:function(array){$.each(array,function(i,key){var f=self.searchField(key);f?(f.enabled=!1,$.each(f.validations,function(f,o){$("."+o.validator,base.$elem).removeClass("error")})):console.error('ValidationEngine: None fields found for key: "'+key+'".')})},validate:function(f){if(f){if(firstTime)return;var field=self.searchField(f);if(field&&field.enabled)return self.validateField(field)}else return firstTime&&(firstTime=!1),self.validateAll()}}};$.fn.validationEngine=function(options){return this.each(function(){var va;if($(this).data("va-init")===!0)return!1;$(this).data("va-init",!0);va=new ValidationEngine;va.init(options,this);$.data(this,"validationEngine",va)})};$.fn.validationEngine.validations={optional:function(value){return $.trim(value).length===0?!1:!0},required:function(value){return $.trim(value).length>0?!0:!1},checkboxRequired:function(value){return value},isEmail:function(value){return/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i.test(value)},isNumeric:function(){return!0},isAlphaNumeric:function(){return!0},match:function(value1,value2){return value1===value2},length:function(){var value=arguments[0],config=arguments[1];return config&&config.limit!=="undefined"?value.length===config.limit:!1},maxLength:function(){var value=arguments[0],config=arguments[1];return config&&config.limit!=="undefined"?value.length<=config.limit:!1},minLength:function(){var value=arguments[0],config=arguments[1];return config&&config.limit!=="undefined"?value.length>=config.limit:!1}}}(jQuery); /*! nanoScrollerJS - v0.8.7 - (c) 2015 James Florentino; Licensed MIT */ !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null};u="scrollbar";t="scroll";l="mousedown";m="mouseenter";n="mousemove";p="mousewheel";o="mouseup";s="resize";h="drag";i="enter";w="up";r="panedown";f="DOMMouseScroll";g="down";x="wheel";j="keydown";k="keyup";v="touchmove";d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject;e=null;D=b.requestAnimationFrame;y=b.cancelAnimationFrame;F=c.createElement("div").style;H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}();G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)};E=G("transform");B=E!==!1;A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d};C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1};q=function(){function j(d,f){this.el=d;this.options=f;e||(e=A());this.$el=a(this.el);this.doc=a(this.options.documentContext||c);this.win=a(this.options.windowContext||b);this.body=this.doc.find("body");this.$content=this.$el.children("."+this.options.contentClass);this.$content.attr("tabindex",this.options.tabIndex||0);this.content=this.$content[0];this.previousPosition=0;this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate();this.createEvents();this.addEvents();this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"});this.iOSNativeScrolling=!0;this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content;this.maxScrollTop=a.scrollHeight-a.clientHeight;this.prevScrollTop=this.contentScrollTop||0;this.contentScrollTop=a.scrollTop;b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same";this.previousPosition=this.contentScrollTop;"same"!==b&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:b});this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},j.prototype.setOnScrollStyles=function(){var a;B?(a={},a[E]="translate(0, "+this.sliderTop+"px)"):a={top:this.sliderTop};D?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=D(function(b){return function(){return b.scrollRAF=null,b.slider.css(a)}}(this))):this.slider.css(a)},j.prototype.createEvents=function(){this.events={down:function(a){return function(b){return a.isBeingDragged=!0,a.offsetY=b.pageY-a.slider.offset().top,a.slider.is(b.target)||(a.offsetY=0),a.pane.addClass(a.options.activeClass),a.doc.bind(n,a.events[h]).bind(o,a.events[w]),a.body.bind(m,a.events[i]),!1}}(this),drag:function(a){return function(b){return a.sliderY=b.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(){return a.isBeingDragged=!1,a.pane.removeClass(a.options.activeClass),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues();a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents();a=this.events;this.options.disableResize||this.win.bind(s,a[s]);this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x]));this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events;this.win.unbind(s,a[s]);this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind());this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('<div class="'+h+'"><div class="'+i+'" /><\/div>'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass(f.enabledClass)),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1;this.iOSNativeScrolling||this.pane.show();this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),n<this.options.sliderMinHeight?n=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&n>this.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){if(this.isActive)return(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this)},j.prototype.scrollBottom=function(a){if(this.isActive)return(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this)},j.prototype.scrollTop=function(a){if(this.isActive)return(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this)},j.prototype.scrollTo=function(a){if(this.isActive)return(this.scrollTop(this.$el.find(a).get(0).offsetTop),this)},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},j.prototype.flash=function(){if(!this.iOSNativeScrolling&&this.isActive)return(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(a){return function(){a.pane.removeClass(a.options.flashedClass)}}(this),this.options.flashDelay),this)},j}();a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})};a.fn.nanoScroller.Constructor=q}),function(factory){"use strict";typeof define=="function"&&define.amd?define(["jquery"],factory):typeof exports!="undefined"?module.exports=factory(require("jquery")):factory(jQuery)}(function($){"use strict";function Hoverdir(element,options){this.$el=$(element);this.options=$.extend(!0,{},this.defaults,options);this.isVisible=!1;this.$hoverElem=this.$el.find(this.options.hoverElem);this.transitionProp="all "+this.options.speed+"ms "+this.options.easing;this.support=this._supportsTransitions();this._loadEvents()}Hoverdir.prototype={defaults:{speed:300,easing:"ease",hoverDelay:0,inverse:!1,hoverElem:"div"},constructor:Hoverdir,_supportsTransitions:function(){var v,i;if(typeof Modernizr!="undefined")return Modernizr.csstransitions;var b=document.body||document.documentElement,s=b.style,p="transition";if(typeof s[p]=="string")return!0;for(v=["Moz","webkit","Webkit","Khtml","O","ms"],p=p.charAt(0).toUpperCase()+p.substr(1),i=0;i<v.length;i++)if(typeof s[v[i]+p]=="string")return!0;return!1},_loadEvents:function(){this.$el.on("mouseenter.hoverdir mouseleave.hoverdir",$.proxy(function(event){this.direction=this._getDir({x:event.pageX,y:event.pageY});event.type==="mouseenter"?this._showHover():this._hideHover()},this))},_showHover:function(){var styleCSS=this._getStyle(this.direction);this.support&&this.$hoverElem.css("transition","");this.$hoverElem.hide().css(styleCSS.from);clearTimeout(this.tmhover);this.tmhover=setTimeout($.proxy(function(){this.$hoverElem.show(0,$.proxy(function(){this.support&&this.$hoverElem.css("transition",this.transitionProp);this._applyAnimation(styleCSS.to)},this))},this),this.options.hoverDelay);this.isVisible=!0},_hideHover:function(){var styleCSS=this._getStyle(this.direction);this.support&&this.$hoverElem.css("transition",this.transitionProp);clearTimeout(this.tmhover);this._applyAnimation(styleCSS.from);this.isVisible=!1},_getDir:function(coordinates){var w=this.$el.width(),h=this.$el.height(),x=(coordinates.x-this.$el.offset().left-w/2)*(w>h?h/w:1),y=(coordinates.y-this.$el.offset().top-h/2)*(h>w?w/h:1);return Math.round((Math.atan2(y,x)*(180/Math.PI)+180)/90+3)%4},_getStyle:function(direction){var fromStyle,toStyle,slideFromTop={left:"0",top:"-100%"},slideFromBottom={left:"0",top:"100%"},slideFromLeft={left:"-100%",top:"0"},slideFromRight={left:"100%",top:"0"},slideTop={top:"0"},slideLeft={left:"0"};switch(direction){case 0:case"top":fromStyle=this.options.inverse?slideFromBottom:slideFromTop;toStyle=slideTop;break;case 1:case"right":fromStyle=this.options.inverse?slideFromLeft:slideFromRight;toStyle=slideLeft;break;case 2:case"bottom":fromStyle=this.options.inverse?slideFromTop:slideFromBottom;toStyle=slideTop;break;case 3:case"left":fromStyle=this.options.inverse?slideFromRight:slideFromLeft;toStyle=slideLeft}return{from:fromStyle,to:toStyle}},_applyAnimation:function(styleCSS){$.fn.applyStyle=this.support?$.fn.css:$.fn.animate;this.$hoverElem.stop().applyStyle(styleCSS,$.extend(!0,[],{duration:this.options.speed}))},show:function(direction){this.$el.off("mouseenter.hoverdir mouseleave.hoverdir");this.isVisible||(this.direction=direction||"top",this._showHover())},hide:function(direction){this.rebuild();this.isVisible&&(this.direction=direction||"bottom",this._hideHover())},setOptions:function(options){this.options=$.extend(!0,{},this.defaults,this.options,options)},destroy:function(){this.$el.off("mouseenter.hoverdir mouseleave.hoverdir");this.$el.data("hoverdir",null)},rebuild:function(options){typeof options=="object"&&this.setOptions(options);this._loadEvents()}};$.fn.hoverdir=function(option,parameter){return this.each(function(){var data=$(this).data("hoverdir"),options=typeof option=="object"&&option;data||(data=new Hoverdir(this,options),$(this).data("hoverdir",data));typeof option=="string"&&(data[option](parameter),option==="destroy"&&$(this).data("hoverdir",!1))})};$.fn.hoverdir.Constructor=Hoverdir});ClusterIcon.prototype.onAdd=function(){var cClusterIcon=this,cMouseDownInCluster,cDraggingMapByCluster;this.div_=document.createElement("div");this.div_.className=this.className_;this.visible_&&this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){cDraggingMapByCluster=cMouseDownInCluster});google.maps.event.addDomListener(this.div_,"mousedown",function(){cMouseDownInCluster=!0;cDraggingMapByCluster=!1});google.maps.event.addDomListener(this.div_,"click",function(e){if(cMouseDownInCluster=!1,!cDraggingMapByCluster){var theBounds,mz,mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"click",cClusterIcon.cluster_);google.maps.event.trigger(mc,"clusterclick",cClusterIcon.cluster_);mc.getZoomOnClick()&&(mz=mc.getMaxZoom(),theBounds=cClusterIcon.cluster_.getBounds(),mc.getMap().fitBounds(theBounds),setTimeout(function(){mc.getMap().fitBounds(theBounds);mz!==null&&mc.getMap().getZoom()>mz&&mc.getMap().setZoom(mz+1)},100));e.cancelBubble=!0;e.stopPropagation&&e.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseover",cClusterIcon.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseout",cClusterIcon.cluster_)})};ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)};ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+"px";this.div_.style.left=pos.x+"px"}};ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};ClusterIcon.prototype.show=function(){if(this.div_){var img="",bp=this.backgroundPosition_.split(" "),spriteH=parseInt(bp[0].trim(),10),spriteV=parseInt(bp[1].trim(),10),pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos);img="<img src='"+this.url_+"' style='position: absolute; top: "+spriteV+"px; left: "+spriteH+"px; ";img+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*spriteV+"px, "+(-1*spriteH+this.width_)+"px, "+(-1*spriteV+this.height_)+"px, "+-1*spriteH+"px);";img+="'>";this.div_.innerHTML=img+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0};ClusterIcon.prototype.useStyle=function(sums){var index,style;this.sums_=sums;index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);style=this.styles_[index];this.url_=style.url;this.height_=style.height;this.width_=style.width;this.anchorText_=style.anchorText||[0,0];this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=style.textColor||"black";this.textSize_=style.textSize||11;this.textDecoration_=style.textDecoration||"none";this.fontWeight_=style.fontWeight||"bold";this.fontStyle_=style.fontStyle||"normal";this.fontFamily_=style.fontFamily||"Arial,sans-serif";this.backgroundPosition_=style.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(center){this.center_=center};ClusterIcon.prototype.createCss=function(pos){var style=[];return style.push("cursor: pointer;"),style.push("position: absolute; top: "+pos.y+"px; left: "+pos.x+"px;"),style.push("width: "+this.width_+"px; height: "+this.height_+"px;"),style.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);return pos.x-=this.anchorIcon_[1],pos.y-=this.anchorIcon_[0],pos.x=parseInt(pos.x,10),pos.y=parseInt(pos.y,10),pos};Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){for(var bounds=new google.maps.LatLngBounds(this.center_,this.center_),markers=this.getMarkers(),i=0;i<markers.length;i++)bounds.extend(markers[i].getPosition());return bounds};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};Cluster.prototype.addMarker=function(marker){var i,mCount,mz;if(this.isMarkerAlreadyAdded_(marker))return!1;if(this.center_){if(this.averageCenter_){var l=this.markers_.length+1,lat=(this.center_.lat()*(l-1)+marker.getPosition().lat())/l,lng=(this.center_.lng()*(l-1)+marker.getPosition().lng())/l;this.center_=new google.maps.LatLng(lat,lng);this.calculateBounds_()}}else this.center_=marker.getPosition(),this.calculateBounds_();if(marker.isAdded=!0,this.markers_.push(marker),mCount=this.markers_.length,mz=this.markerClusterer_.getMaxZoom(),mz!==null&&this.map_.getZoom()>mz)marker.getMap()!==this.map_&&marker.setMap(this.map_);else if(mCount<this.minClusterSize_)marker.getMap()!==this.map_&&marker.setMap(this.map_);else if(mCount===this.minClusterSize_)for(i=0;i<mCount;i++)this.markers_[i].setMap(null);else marker.setMap(null);return!0};Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())};Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)};Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length,mz=this.markerClusterer_.getMaxZoom(),numStyles,sums;if(mz!==null&&this.map_.getZoom()>mz){this.clusterIcon_.hide();return}if(mCount<this.minClusterSize_){this.clusterIcon_.hide();return}numStyles=this.markerClusterer_.getStyles().length;sums=this.markerClusterer_.getCalculator()(this.markers_,numStyles);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(sums);this.clusterIcon_.show()};Cluster.prototype.isMarkerAlreadyAdded_=function(marker){for(var i=0,n=this.markers_.length;i<n;i++)if(marker===this.markers_[i])return!0;return!1};MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap();this.ready_=!0;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){cMarkerClusterer.resetViewport_(!1);(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){cMarkerClusterer.redraw_()})]};MarkerClusterer.prototype.onRemove=function(){for(var i=0;i<this.markers_.length;i++)this.markers_[i].getMap()!==this.activeMap_&&this.markers_[i].setMap(this.activeMap_);for(i=0;i<this.clusters_.length;i++)this.clusters_[i].remove();for(this.clusters_=[],i=0;i<this.listeners_.length;i++)google.maps.event.removeListener(this.listeners_[i]);this.listeners_=[];this.activeMap_=null;this.ready_=!1};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var i,size;if(!(this.styles_.length>0))for(i=0;i<this.imageSizes_.length;i++)size=this.imageSizes_[i],this.styles_.push({url:this.imagePath_+(i+1)+"."+this.imageExtension_,height:size,width:size})};MarkerClusterer.prototype.fitMapToMarkers=function(){for(var markers=this.getMarkers(),bounds=new google.maps.LatLngBounds,i=0;i<markers.length;i++)bounds.extend(markers[i].getPosition());this.getMap().fitBounds(bounds)};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(gridSize){this.gridSize_=gridSize};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(minimumClusterSize){this.minClusterSize_=minimumClusterSize};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(maxZoom){this.maxZoom_=maxZoom};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(styles){this.styles_=styles};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(title){this.title_=title};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(zoomOnClick){this.zoomOnClick_=zoomOnClick};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.setAverageCenter=function(averageCenter){this.averageCenter_=averageCenter};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(ignoreHidden){this.ignoreHidden_=ignoreHidden};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(enableRetinaIcons){this.enableRetinaIcons_=enableRetinaIcons};MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(imageExtension){this.imageExtension_=imageExtension};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(imagePath){this.imagePath_=imagePath};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};MarkerClusterer.prototype.setImageSizes=function(imageSizes){this.imageSizes_=imageSizes};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(calculator){this.calculator_=calculator};MarkerClusterer.prototype.setHideLabel=function(hideLabel){this.hideLabel_=hideLabel};MarkerClusterer.prototype.getHideLabel=function(){return this.hideLabel_};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(batchSizeIE){this.batchSizeIE_=batchSizeIE};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};MarkerClusterer.prototype.setClusterClass=function(clusterClass){this.clusterClass_=clusterClass};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(marker,opt_nodraw){this.pushMarkerTo_(marker);opt_nodraw||this.redraw_()};MarkerClusterer.prototype.addMarkers=function(markers,opt_nodraw){var key;for(key in markers)markers.hasOwnProperty(key)&&this.pushMarkerTo_(markers[key]);opt_nodraw||this.redraw_()};MarkerClusterer.prototype.pushMarkerTo_=function(marker){if(marker.getDraggable()){var cMarkerClusterer=this;google.maps.event.addListener(marker,"dragend",function(){cMarkerClusterer.ready_&&(this.isAdded=!1,cMarkerClusterer.repaint())})}marker.isAdded=!1;this.markers_.push(marker)};MarkerClusterer.prototype.removeMarker=function(marker,opt_nodraw,opt_noMapRemove){var removeFromMap=!0&&!opt_noMapRemove,removed=this.removeMarker_(marker,removeFromMap);return!opt_nodraw&&removed&&this.repaint(),removed};MarkerClusterer.prototype.removeMarkers=function(markers,opt_nodraw,opt_noMapRemove){for(var r,removed=!1,removeFromMap=!0&&!opt_noMapRemove,i=0;i<markers.length;i++)r=this.removeMarker_(markers[i],removeFromMap),removed=removed||r;return!opt_nodraw&&removed&&this.repaint(),removed};MarkerClusterer.prototype.removeMarker_=function(marker,removeFromMap){var i,index=-1;if(this.markers_.indexOf)index=this.markers_.indexOf(marker);else for(i=0;i<this.markers_.length;i++)if(marker===this.markers_[i]){index=i;break}return index===-1?!1:(removeFromMap&&marker.setMap(null),this.markers_.splice(index,1),!0)};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=[]};MarkerClusterer.prototype.repaint=function(){var oldClusters=this.clusters_.slice();this.clusters_=[];this.resetViewport_(!1);this.redraw_();setTimeout(function(){for(var i=0;i<oldClusters.length;i++)oldClusters[i].remove()},0)};MarkerClusterer.prototype.getExtendedBounds=function(bounds){var projection=this.getProjection(),tr=new google.maps.LatLng(bounds.getNorthEast().lat(),bounds.getNorthEast().lng()),bl=new google.maps.LatLng(bounds.getSouthWest().lat(),bounds.getSouthWest().lng()),trPix=projection.fromLatLngToDivPixel(tr),blPix,ne,sw;return trPix.x+=this.gridSize_,trPix.y-=this.gridSize_,blPix=projection.fromLatLngToDivPixel(bl),blPix.x-=this.gridSize_,blPix.y+=this.gridSize_,ne=projection.fromDivPixelToLatLng(trPix),sw=projection.fromDivPixelToLatLng(blPix),bounds.extend(ne),bounds.extend(sw),bounds};MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(opt_hide){for(var marker,i=0;i<this.clusters_.length;i++)this.clusters_[i].remove();for(this.clusters_=[],i=0;i<this.markers_.length;i++)marker=this.markers_[i],marker.isAdded=!1,opt_hide&&marker.setMap(null)};MarkerClusterer.prototype.distanceBetweenPoints_=function(p1,p2){var dLat=(p2.lat()-p1.lat())*Math.PI/180,dLon=(p2.lng()-p1.lng())*Math.PI/180,a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(p1.lat()*Math.PI/180)*Math.cos(p2.lat()*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2),c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return 6371*c};MarkerClusterer.prototype.isMarkerInBounds_=function(marker,bounds){return bounds.contains(marker.getPosition())};MarkerClusterer.prototype.addToClosestCluster_=function(marker){for(var d,cluster,center,distance=4e4,clusterToAddTo=null,i=0;i<this.clusters_.length;i++)cluster=this.clusters_[i],center=cluster.getCenter(),center&&(d=this.distanceBetweenPoints_(center,marker.getPosition()),d<distance&&(distance=d,clusterToAddTo=cluster));clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker)?clusterToAddTo.addMarker(marker):(cluster=new Cluster(this),cluster.addMarker(marker),this.clusters_.push(cluster))};MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker,mapBounds,cMarkerClusterer=this,bounds,iLast;if(this.ready_){for(iFirst===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),mapBounds=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625)),bounds=this.getExtendedBounds(mapBounds),iLast=Math.min(iFirst+this.batchSize_,this.markers_.length),i=iFirst;i<iLast;i++)marker=this.markers_[i],!marker.isAdded&&this.isMarkerInBounds_(marker,bounds)&&(!this.ignoreHidden_||this.ignoreHidden_&&marker.getVisible())&&this.addToClosestCluster_(marker);if(iLast<this.markers_.length)this.timerRefStatic=setTimeout(function(){cMarkerClusterer.createClusters_(iLast)},0);else for(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this),i=0;i<this.clusters_.length;i++)this.clusters_[i].updateIcon_()}};MarkerClusterer.prototype.extend=function(obj1,obj2){return function(object){var property;for(property in object.prototype)this.prototype[property]=object.prototype[property];return this}.apply(obj1,[obj2])};MarkerClusterer.CALCULATOR=function(markers,numStyles){for(var index=0,count=markers.length.toString(),dv=count;dv!==0;)dv=parseInt(dv/10,10),index++;return index=Math.min(index,numStyles),{text:count,index:index,title:""}};MarkerClusterer.BATCH_SIZE=2e3;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}); /*! * Masonry PACKAGED v3.3.1 * Cascading grid layout library * http://masonry.desandro.com * MIT License * by David DeSandro */ if(!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){var j,k,l;if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++)if(j=this[h],k=a.data(j,b),k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){if(l=k[e].apply(k,g),void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'");return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b);e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){},e,f;c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)};a.attachEvent("on"+c,a[c+d])});e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b};d.flattenListeners=function(a){for(var c=[],b=0;b<a.length;b+=1)c.push(a[b].listener);return c};d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c};d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this};d.on=c("addListener");d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})};d.once=c("addOnceListener");d.defineEvent=function(a){return this.getListeners(a),this};d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this};d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this};d.off=c("removeListener");d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)};d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)};d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this};d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this};d.removeAllListeners=c("removeEvent");d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this};d.trigger=c("emitEvent");d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)};d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this};d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0};d._getEvents=function(){return this._events||(this._events={})};a.noConflict=function(){return e.EventEmitter=f,a};"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var d,a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++)d=g[b],a[d]=0;return a}function e(c){function e(){var d,e,g,h;m||(m=!0,d=a.getComputedStyle,(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing"))&&(e=document.createElement("div"),e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box",g=document.body||document.documentElement,g.appendChild(e),h=j(e),l=200===b(h.width),g.removeChild(e)))}function h(a){var c,f,o,p,q,z;if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){if(c=j(a),"none"===c.display)return d();f={};f.width=a.offsetWidth;f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++)o=g[m],p=c[o],p=i(a,p),q=parseFloat(p),f[o]=isNaN(q)?0:q;var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);return y!==!1&&(f.width=y+(x?0:r+v)),z=b(c.height),z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){var a,c,d;for(b.isReady=!0,a=0,c=g.length;c>a;a++)d=g[a],d()}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1;"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){var e,f;if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++)if(e=b[c],f=e+"MatchesSelector",a[f])return f}(),h,i;g?(h=document.createElement("div"),i=b(h,"div"),f=i?b:e):f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={},e,f;return d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b},e=Object.prototype.toString,d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[],c,e;if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText");a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){var h;a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++)if(h=a[f],d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h);return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e],b,f;a&&clearTimeout(a);b=arguments;f=this;this[e]=setTimeout(function(){d.apply(f,b);delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()},f=a.console,d.htmlInit=function(c,e){b(function(){for(var k,l,m,o,p,b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){l=g[i];m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}o=new c(l,k);p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var e,f,a={},b=0,c=p.length;c>b;b++)e=p[b],f=d(e),f&&f!==e&&(a[e]=f);return a}(),r,s,t;return e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style,c,d;for(c in a)d=q[c]||c,b[d]=a[c]},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=parseInt(e,10),h=parseInt(f,10),i=this.layout.size;g=-1!=e.indexOf("%")?g/100*i.width:g;h=-1!=f.indexOf("%")?h/100*i.height:h;g=isNaN(g)?0:g;h=isNaN(h)?0:h;g-=c?i.paddingLeft:i.paddingRight;h-=d?i.paddingTop:i.paddingBottom;this.position.x=g;this.position.y=h},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g);c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k);c[j]="";this.css(c);this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i);this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,a=this.getXValue(a),b=this.getYValue(b),n?"translate3d("+a+", "+b+", 0)":"translate("+a+", "+b+")"},g.prototype.goTo=function(a,b){this.setPosition(a,b);this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10);this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to);a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){var b,c,d;if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);b=this._transn;for(c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);a.from&&(this.css(a.from),d=this.element.offsetHeight,d=null);this.enableTransition(a.to);this.css(a.to);this.isTransitioning=!0},r="opacity,"+h(q.transform||"transform"),g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)},s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"},g.prototype.ontransitionend=function(a){var b,c,d;a.target===this.element&&(b=this._transn,c=s[a.propertyName]||a.propertyName,(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd)&&(d=b.onEnd[c],d.call(this),delete b.onEnd[c]),this.emitEvent("transitionEnd",[this]))},g.prototype.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(o,this,!1);this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={},c;for(c in a)b[c]="";this.css(b)},t={transitionProperty:"",transitionDuration:""},g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()});this.hide()},g.prototype.reveal=function(){delete this.isHidden;this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a],c;if(b.opacity)return"opacity";for(c in b)return c},g.prototype.hide=function(){this.isHidden=!0;this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a),d;if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c;i&&(this.$element=i(this.element));this.options=e.extend({},this.constructor.defaults);this.option(b);d=++k;this.element.outlayerGUID=d;l[d]=this;this._create();this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);e.extend(this.element.style,this.options.containerStyle);this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var g,h,b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++)g=b[e],h=new c(g,this),d.push(h);return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout();this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a);this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a);this._layoutItems(a,b);this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var e,b=[],c=0,d=a.length;d>c;c++)e=a[c],e.isIgnored||b.push(e);return b},g.prototype._layoutItems=function(a,b){var f,g;if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++)f=a[d],g=this._getItemLayoutPosition(f),g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g);this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var d,b=0,c=a.length;c>b;b++)d=a[b],this._positionItem(d.item,d.x,d.y,d.isInstant)},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth);a=Math.max(a,0);this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++;g===f&&c()}var e=this,f=b.length,j;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c,e;(this.emitEvent(a,d),i)&&((this.$element=this.$element||i(this.element),b)?(e=i.Event(b),e.type=a,this.$element.trigger(e,c)):this.$element.trigger(a,c))},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){var b,c,d;if(a=this._find(a))for(this.stamps=this.stamps.concat(a),b=0,c=a.length;c>b;b++)d=a[b],this.ignore(d)},g.prototype.unstamp=function(a){var b,c,d;if(a=this._find(a))for(b=0,c=a.length;c>b;b++)d=a[b],e.removeFrom(this.stamps,d),this.unignore(d)},g.prototype._find=function(a){if(a)return("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a))},g.prototype._manageStamps=function(){var a,b,c;if(this.stamps&&this.stamps.length)for(this._getBoundingRect(),a=0,b=this.stamps.length;b>a;a++)c=this.stamps[a],this._manageStamp(c)},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a);return{left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom}},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this);this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize();delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a),c;b.length&&(c=this.items.slice(0),this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c))},g.prototype.reveal=function(a){var b,c,d;for(this._emitCompleteOnItems("reveal",a),b=a&&a.length,c=0;b&&b>c;c++)d=a[c],d.reveal()},g.prototype.hide=function(a){var b,c,d;for(this._emitCompleteOnItems("hide",a),b=a&&a.length,c=0;b&&b>c;c++)d=a[c],d.hide()},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var d,b=0,c=this.items.length;c>b;b++)if(d=this.items[b],d.element===a)return d},g.prototype.getItems=function(a){var f,g;a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++)f=a[c],g=this.getItem(f),g&&b.push(g);return b},g.prototype.remove=function(a){var b=this.getItems(a),c,d,f;if(this._emitCompleteOnItems("remove",b),b&&b.length)for(c=0,d=b.length;d>c;c++)f=b[c],f.remove(),e.removeFrom(this.items,f)},g.prototype.destroy=function(){var a=this.element.style,b,c,d,e;for(a.height="",a.position="",a.width="",b=0,c=this.items.length;c>b;b++)d=this.items[b],d.destroy();this.unbindResize();e=this.element.outlayerGUID;delete l[e];delete this.element.outlayerGUID;i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize();this._getMeasurement("columnWidth","outerWidth");this._getMeasurement("gutter","outerWidth");this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){var a,c;(this.getContainerWidth(),this.columnWidth)||(a=this.items[0],c=a&&a.element,this.columnWidth=c&&b(c).outerWidth||this.containerWidth);var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f);this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){var e;if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++)e=this.colYs.slice(d,d+a),b[d]=Math.max.apply(Math,e);return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth),h,i,j;for(g=Math.max(0,g),h=Math.floor(f/this.columnWidth),h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h),i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),Vendd.Scripts.load(function(){var run=function(){$('.x-control.x-map[data-control="map"]').each(function(i,wrapper){function find_closest_marker(lat1,lon1){var pi=Math.PI,distances=[],closest=-1;for(i=0;i<wrapper.markers.length;i++){var lat2=wrapper.markers[i].position.lat(),lon2=wrapper.markers[i].position.lng(),chLat=lat2-lat1,chLon=lon2-lon1,dLat=chLat*(pi/180),dLon=chLon*(pi/180),rLat1=lat1*(pi/180),rLat2=lat2*(pi/180),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.sin(dLon/2)*Math.sin(dLon/2)*Math.cos(rLat1)*Math.cos(rLat2),c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)),d=6371*c;distances[i]=d;(closest==-1||d<distances[closest])&&(closest=i)}return wrapper.markers[closest]}var $wrapper=$(wrapper),styles;styles=$(".contact-page").length?[{featureType:"landscape",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",stylers:[{saturation:-100},{lightness:51},{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{saturation:-100},{lightness:30},{visibility:"on"}]},{featureType:"road.local",stylers:[{saturation:-100},{lightness:40},{visibility:"on"}]},{featureType:"transit",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"on"},{lightness:-25},{saturation:-100}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]}]:[{featureType:"landscape",stylers:[{hue:"#FFBB00"},{saturation:43.400000000000006},{lightness:37.599999999999994},{gamma:1}]},{featureType:"road.highway",stylers:[{hue:"#FFC200"},{saturation:-61.8},{lightness:45.599999999999994},{gamma:1}]},{featureType:"road.arterial",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:51.199999999999989},{gamma:1}]},{featureType:"road.local",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:52},{gamma:1}]},{featureType:"water",stylers:[{hue:"#0078FF"},{saturation:-13.200000000000003},{lightness:2.4000000000000057},{gamma:1}]},{featureType:"poi",stylers:[{hue:"#00FF6A"},{saturation:-1.0989010989011234},{lightness:11.200000000000017},{gamma:1}]}];wrapper.mapOpts={zoom:15,scrollwheel:!0,styles:styles,disableDefaultUI:!0,zoomControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP};wrapper.infoWinOpts={maxWidth:440};wrapper.markerOpts={title:LhApp.Context.Site.Name,icon:$wrapper.data("marker")};wrapper.map=null;wrapper.markers=[];wrapper.create=function(coordinates){var coords=[],firstLatLng,mapOpts,openedInfoWindow,clusterStyles;if($(coordinates).each(function(c,cc){var existsCoord=_.find(coords,function(x){return x.lat===cc.lat&&x.lng==cc.lng});existsCoord||coords.push(cc)}),coords.length==0)throw new Error("no coordinates");firstLatLng=coords[0];mapOpts={};$.extend(!0,mapOpts,wrapper.mapOpts,{div:"#"+$wrapper.attr("id"),lat:firstLatLng.lat,lng:firstLatLng.lng});wrapper.map=new GMaps(mapOpts);wrapper.cluster=null;$(coords).each(function(i,spot){var infoWindow=null,infoWindowOpts,markerOpts,marker;spot.html&&spot.html!=""&&(infoWindowOpts={},$.extend(!0,infoWindowOpts,wrapper.infoWinOpts,{content:spot.html}),infoWindow=new google.maps.InfoWindow(infoWindowOpts));markerOpts={};$.extend(!0,markerOpts,wrapper.markerOpts,{lat:spot.lat,lng:spot.lng,infoWindow:infoWindow});openedInfoWindow=infoWindow;marker=wrapper.map.addMarker(markerOpts);wrapper.markers.push(marker);google.maps.event.addListener(marker,"click",function(){typeof openedInfoWindow!="undefined"&&openedInfoWindow&&(openedInfoWindow.close(),openedInfoWindow=null);infoWindow.open(wrapper.map.map,marker);wrapper.map.map.setCenter(marker.getPosition());wrapper.map.map.setZoom(18);openedInfoWindow=infoWindow})});wrapper.setCenter();clusterStyles=[{url:"../Sites/sfakianakis2016/Skins/eshop_A/images/map_images/1.png",height:39,width:39,textSize:18,textColor:"white",fontWeight:"400"},{url:"../Sites/sfakianakis2016/Skins/eshop_A/images/map_images/2.png",height:50,width:50,textSize:18,textColor:"white",fontWeight:"400"},{url:"../Sites/sfakianakis2016/Skins/eshop_A/images/map_images/3.png",height:61,width:61,textSize:18,textColor:"white",fontWeight:"400"},];mcOptions={gridSize:40,maxZoom:15,imageExtension:"png",imagePath:"../Sites/sfakianakis2016/Skins/eshop_A/images/map_images/",imageSizes:[39,50,61],styles:clusterStyles};wrapper.cluster=new MarkerClusterer(wrapper.map.map,wrapper.markers,mcOptions);$(".contact-page").length>0&&(openedInfoWindow.open(wrapper.map.map,wrapper.markers[0]),wrapper.map.panBy(0,-120))};wrapper.closeAllInfoWindows=function(){for(var i=0;i<wrapper.infowindows.length;i++)wrapper.infowindows[i].close()};wrapper.setCenter=function(){if(wrapper.markers.length==0){wrapper.map.setZoom(3);return}var bounds=new google.maps.LatLngBounds;for(i=0;i<wrapper.markers.length;i++)bounds.extend(wrapper.markers[i].getPosition());wrapper.map.fitBounds(bounds);wrapper.markers.length==1&&wrapper.map.setZoom(wrapper.mapOpts.zoom)};wrapper.getMarker=function(coordinates){return _.find(wrapper.markers,function(x){return x.position.toString()===new google.maps.LatLng(coordinates.lat,coordinates.lng).toString()})};wrapper.findMarker=function(search,country,callback){var geocoder=new google.maps.Geocoder;geocoder.geocode({address:search+", "+(country||"GR")},function(results,status){if(status==google.maps.GeocoderStatus.OK){var latLng=results[0].geometry.location,closestMarker=find_closest_marker(latLng.lat(),latLng.lng());callback(closestMarker,null)}else callback(null,new Error("closest marker not found"))})};wrapper.removeMarkers=function(){wrapper.map.removeMarkers();wrapper.markers=[]};wrapper.addMarkers=function(coordinates){$.each(coordinates,function(i,spot){var infoWindow=null,markerOpts={},marker;spot.html&&spot.html!=""&&(infoWindow=new google.maps.InfoWindow({content:spot.html}));$.extend(!0,markerOpts,wrapper.markerOpts,{lat:spot.lat,lng:spot.lng,infoWindow:infoWindow});marker=wrapper.map.addMarker(markerOpts);wrapper.markers.push(marker);openedInfoWindow=infoWindow;google.maps.event.addListener(marker,"click",function(){typeof openedInfoWindow!="undefined"&&(openedInfoWindow.close(),openedInfoWindow=null);infoWindow.open(wrapper.map.map,marker);wrapper.map.map.setCenter(marker.getPosition());wrapper.map.map.setZoom(18);openedInfoWindow=infoWindow});$(".contact-page").length&&(infoWindow.open(wrapper.map.map,marker),wrapper.map.panBy(0,-90))});wrapper.cluster?(wrapper.cluster.clearMarkers(),wrapper.cluster.addMarkers(wrapper.map.markers)):wrapper.cluster=new MarkerClusterer(wrapper.map.map,wrapper.markers,mcOptions);wrapper.setCenter();wrapper.cluster.repaint()};wrapper.open=function(marker){google.maps.event.trigger(marker,"click")}})};Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.GoogleMapsLoaded,"mapControl",run)}),Vendd.Scripts.load(function(){$('.x-control.x-map-directions[data-control="map-directions"]').each(function(i,wrapper){var $wrapper=$(wrapper),$searchField=$('*[data-input="postcode"]',$wrapper),$goButton=$('*[data-button="submit"]',$wrapper),$goCarButton=$('*[data-button="bycar"]',$wrapper),$goBusButton=$('*[data-button="bybus"]',$wrapper),$goFootButton=$('*[data-button="byfoot"]',$wrapper),latitude=$wrapper.data("latitude"),longitude=$wrapper.data("longitude"),toLatLng=new google.maps.LatLng(latitude,longitude),connectedMapId=$wrapper.data("map"),$map=$('.x-control.x-map[data-control="map"][data-map="'+connectedMapId+'"]'),directionsDisplay=new google.maps.DirectionsRenderer,directionsService=new google.maps.DirectionsService,$tmplDiv=$('*[data-div="template"]',$wrapper),$tmplDirections=$('*[data-div="directions"]',$wrapper),writeResponse=function(response){var $ul,route,leg;$tmplDirections.html("");$ul=$("<ul />");response.routes.length>0&&(route=response.routes[0],route.legs.length>0&&(leg=route.legs[0],leg.steps.length>0&&$(leg.steps).each(function(r,rr){$ul.append($("<li />").html(rr.instructions))})));$tmplDirections.append($ul)},getDirections=function(type){if($searchField.val()!==""){var geocoder=new google.maps.Geocoder;geocoder.geocode({address:$searchField.val()+" GR"},function(results,status){if(status==google.maps.GeocoderStatus.OK){var latLng=results[0].geometry.location,request={origin:latLng,destination:toLatLng,travelMode:type};directionsDisplay.setMap($map.get(0).map.map);directionsService.route(request,function(response,status){status==google.maps.DirectionsStatus.OK?(directionsDisplay.setDirections(response),writeResponse(response)):status==google.maps.DirectionsStatus.ZERO_RESULTS&&alert("no directions found")})}else throw new Error("could not get directions");})}};$goButton.click(function(){getDirections(google.maps.TravelMode.DRIVING)});$goCarButton.click(function(){getDirections(google.maps.TravelMode.DRIVING)});$goBusButton.click(function(){getDirections(google.maps.TravelMode.TRANSIT)});$goFootButton.click(function(){getDirections(google.maps.TravelMode.WALKING)})})}),Vendd.Scripts.load(function(){function wrapBoxes($boxes,grouping,rowSize,lastItem){var items=[],currentIndex,cssClass,i,li;for(lastItem.removeClass("last"),currentIndex=lastItem.data("index")+1,i=0;i<$boxes.length;i++)li=$("<li>"),cssClass="index"+currentIndex,cssClass+=currentIndex%2?" odd":" even",cssClass+=i===$boxes.length-1?" last":"",cssClass+=rowSize===0?"":currentIndex%rowSize==0?" row-first":"",cssClass+=rowSize===0?"":(currentIndex+1)%rowSize==0?" row-last":"",li.append($boxes.eq(i)).addClass(cssClass).attr("data-index",currentIndex),items.push(li),currentIndex++;return items}var loading,hasNext;wishlistArticleBindClicks=function($control){$control.on("click",".js-add-to-wishlistArticle",function(e){e.preventDefault();e.stopPropagation();articleId=$(this).closest(".x-article-box").data("article-id");articleUrl=$(this).closest(".x-article-box").data("article-url");var id=articleId,path=articleUrl,$removeBox=$(this).closest(".x-article-box").find(".in-wishlistArticle-wrapper");$removeBox.removeClass("disabled");$removeBox.find(".js-remove-from-wishlistArticle").prop("disabled",!1);Vendd.MessageBus.publishAsync($control.get(0),new Vendd.WishlistArticle.Messages.Add(id,path,[],null));Vendd.MessageBus.publishAsync($control.get(0),new Vendd.Widget.Messages.OpenWidget(Vendd.Widget.WishlistArticleWidget,!1))});$control.on("click",".js-remove-from-wishlistArticle",function(e){e.preventDefault();e.stopPropagation();articleId=$(this).closest(".x-article-box").data("article-id");Vendd.MessageBus.publishAsync($control.get(0),new Vendd.WishlistArticle.Messages.Remove(articleId));Vendd.MessageBus.publishAsync($control.get(0),new Vendd.Widget.Messages.OpenWidget(Vendd.Widget.WishlistArticleWidget,!1))});Vendd.MessageBus.subscribe(Vendd.WishlistArticle.Messages.Changed,"x-article-box",function(envelope){var data=envelope.message.data.Items,$boxes;(addEventListener,$boxes=$(".x-article-box"),$boxes.length<1)||$boxes.each(function(i,el){var $el=$(el),id=$el.data("article-id"),j;for($el.find(".js-remove-from-wishlistArticle").attr("disabled","disabled").parent().addClass("disabled"),j=0;j<data.length;j++)id==data[j].ArticleId&&($el.prop("data-article-id",data[j].Id),$el.find(".js-remove-from-wishlistArticle").removeAttr("disabled").parent().removeClass("disabled"))})})};$control=$(".x-article-box");wishlistArticleBindClicks($control);var $wrapper=$(".x-article-list"),wrapper,$configuration,configuration,isScrolled=$wrapper.data("scrolled")===!0,model=null;$wrapper.length<1||($wrapper.hasClass("js-lazyload")&&typeof $.fn.lazyload=="function"&&$("img[data-lazyload]",$wrapper).lazyload({effect:"fadeIn",threshold:50,skip_invisible:!1}).removeAttr("data-lazyload"),$wrapper.data("scrolled")!==!1)&&(wrapper=$wrapper.get(0),$configuration=$("#configuration",$wrapper),configuration=$configuration.text(),$configuration.remove(),loading=!1,hasNext=!0,wrapper.loading=function(){loading===!0?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")},wrapper.onSuccess=function(envelope){if(envelope.message.data.list===wrapper){if(model=envelope.message.data.model,model.Items.length===0){hasNext=!1;return}var html=Vendd.Handlebars.parse(Handlebars.partials.articleList,model),$html=$(html),$list=$("> ul",$wrapper),$boxes,items,lastItem,grouping,rowSize;configuration=$("#configuration",$html).text();$boxes=$(".x-article-box",$html);lastItem=$list.children().last();grouping=$html.data("grouping");rowSize=0;items=wrapBoxes($boxes,grouping,rowSize,lastItem);$list.append(items);$wrapper.hasClass("js-lazyload")&&typeof $.fn.lazyload=="function"&&$("img[data-lazyload]",$wrapper).lazyload({effect:"fadeIn",threshold:50,skip_invisible:!1}).removeAttr("data-lazyload");loading=!1;wrapper.loading();wishlistArticleBindClicks($boxes)}},wrapper.onFailure=function(envelope){envelope.message.data.list===wrapper&&(loading=!1,wrapper.loading())},wrapper.update=function(){loading||hasNext===!1||(loading=!0,wrapper.loading(!0),Vendd.MessageBus.publishAsync(wrapper,new Vendd.ScrollList.Messages.GetNextPage(wrapper,configuration)))},Vendd.MessageBus.subscribe(Vendd.ScrollList.Messages.GetNextPageSuccess,wrapper,wrapper.onSuccess),Vendd.MessageBus.subscribe(Vendd.ScrollList.Messages.GetNextPageFailure,wrapper,wrapper.onFailure),isScrolled===!0&&$(window).scroll($.debounce(300,function(){$(window).scrollTop()>=$(document).height()-$(window).height()-$(".footer-region").height()+100&&(wrapper.update(),$wrapper.removeClass("x-loading"))})))}),Vendd.Scripts.load(function(){function UpdateQueryString(key,value,url){var re,value,pos,separator,hash;return url||(url=window.location.href),url=url.replace(/\/{1}p{1}[0-9]+/,""),re=new RegExp("([?|&])"+key+"=.*?(&|#|$)","gi"),url.match(re)?(value=value?url.replace(re,"$1"+key+"="+value+"$2"):url.replace(re,"$2"),value.indexOf("?")==-1&&(pos=value.indexOf("&"),pos!=-1&&(value=value.substring(0,pos-1)+"?"+value.substring(pos+1,value.length))),value):value?(separator=url.indexOf("?")!==-1?"&":"?",hash=url.split("#"),url=hash[0]+separator+key+"="+value,hash[1]&&(url+="#"+hash[1]),url):url}function getQueryStringValueByName(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS),results=regex.exec(window.location.search);return results==null?"":decodeURIComponent(results[1].replace(/\+/g," "))}function removeValueFromCommaSeparatedString(list,value,separator){var values,i;for(separator=separator||",",values=list.split(separator),i=0;i<values.length;i++)if(values[i]==value.replace(/\s+/g,"-"))return values.splice(i,1),values.join(separator);return list}function loopThrough(){$('.x-control[data-control="filter"][data-type="range"]').each(function(i,rangeFilter){var $wrapper=$(rangeFilter),$slider=$wrapper.find("*[data-slider]"),$text=$wrapper.find("input[data-text]"),isPagerAjax=$wrapper.data("ajax"),connectedList=$wrapper.data("list"),urlMask=$slider.data("mask"),$list;urlMask=urlMask.split("?")[1];var textMask=$text.data("mask"),minValue=Math.floor($slider.data("min")),maxValue=Math.ceil($slider.data("max")),currentMinValue=Math.floor($slider.data("from")),currentMaxValue=Math.ceil($slider.data("to"));if($slider.slider({range:!0,min:minValue,max:maxValue,values:[currentMinValue,currentMaxValue],slide:function(event,ui){$text.val(textMask.replace("((from))",ui.values[0]).replace("((to))",ui.values[1]))},stop:function(event,ui){if(isPagerAjax){if(connectedList===undefined)throw"Connected list not declared for filter "+$wrapper.attr("id");var $connectedList=$('.x-control[data-control="list"][data-list="'+connectedList+'"]').first(),config=$connectedList.get(0).getConfiguration(),filterIdentifier="Price",filter=$.Enumerable.From(config.LoaderData.Filters).Where(function(x){return x.Key==filterIdentifier}).DefaultIfEmpty(null).FirstOrDefault();if(filter===null)throw"Filter not found on connected list: "+filterIdentifier;ui.values[0]===minValue&&ui.values[1]===maxValue?(filter.FromValue=null,filter.ToValue=null):(filter.FromValue=ui.values[0],filter.ToValue=ui.values[1]);$connectedList.get(0).load(config)}else window.location.href=isAjaxLoad?location.origin+location.pathname+"?"+urlMask.replace("((from))",ui.values[0]).replace("((to))",ui.values[1]):urlMask.replace("((from))",ui.values[0]).replace("((to))",ui.values[1])}}),isPagerAjax){if(connectedList===undefined)throw"Connected list not declared for filter "+$wrapper.attr("id");$list=$('.x-control[data-control="list"][data-list="'+connectedList+'"]').first();$list.get(0).bind("dataload",function(){})}$text.val(textMask.replace("((from))",$slider.slider("values",0)).replace("((to))",$slider.slider("values",1)))})}function addClickHandlers(){$(".filters .filter ul.twoColumns li a").click(function(){var queryName=$(this).attr("data-query"),queryValue=$(this).attr("data-value"),items=getQueryStringValueByName(queryName),itemswithoutvalue,urlWithoutItem,itemswithvalue,urlWithItem;return $(this).hasClass("checked")?($(this).removeClass("checked"),itemswithoutvalue=removeValueFromCommaSeparatedString(items,queryValue),urlWithoutItem=UpdateQueryString(queryName,itemswithoutvalue,document.URL),window.location.href=urlWithoutItem):($(this).addClass("checked"),itemswithvalue=items==""?queryValue:items+","+queryValue,urlWithItem=UpdateQueryString(queryName,itemswithvalue,document.URL),window.location.href=urlWithItem),!1});$(".filters .filter .title").click(function(){$(this).parent().hasClass("expanded")?($(this).parent().removeClass("expanded"),$(this).siblings().slideUp()):($(this).parent().addClass("expanded"),$(this).siblings().slideDown())});var dateFilterWrapper=$(".js-datefilter");$(".js-apply-Filter-button",dateFilterWrapper).click(function(){var filterwrap=this.closest(".js-datefilter"),mask=$(".js-datefilterUrlMask",filterwrap)[0].value,dateFrom=$(".js-datefilterdateFrom",filterwrap)[0].value,dateTo=$(".js-datefilterdateTo",filterwrap)[0].value;mask=mask.replace("(date-from)",dateFrom).replace("(date-to)",dateTo).replace("(tag),","");window.location.href=mask});setTimeout(function(){$(".js-filters-wrapper .box-one").find("a").attr("href",window.location.pathname)},100)}var $wrapper=$(".js-filters-wrapper"),wrapper,$configuration,configuration,isAjaxLoad=$wrapper.data("ajax-load")==="True",model;$wrapper.length<1||(wrapper=$wrapper.get(0),$configuration=$("#configuration",$wrapper),configuration=$configuration.text(),$configuration.remove(),isAjaxLoad?(model=null,wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")},wrapper.update=function(){wrapper.loading(!0);var html=Vendd.Handlebars.parse(Handlebars.partials.filters,JSON.parse(model));wrapper.bind(html,model);loopThrough();addClickHandlers();wrapper.loading(!1)},wrapper.bind=function(html){$wrapper.html(html)},Vendd.MessageBus.subscribe(Vendd.FilterProduct.Messages.Changed,wrapper,function(envelope){model=envelope.message.data;wrapper.update()}),Vendd.MessageBus.subscribe(Vendd.FilterProduct.Messages.Failed,wrapper,function(){wrapper.loading(!1)}),Vendd.MessageBus.publishAsync(wrapper,new Vendd.FilterProduct.Messages.GetModel(configuration))):(loopThrough(),addClickHandlers()))}),Vendd.Scripts.load(function(){var $form=$(".x-contact-form"),$submitButton,form,formData,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);formData={firstName:"",lastName:"",email:"",message:"",reCaptchaCode:"",ContactFormConsent:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="contactCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Contact_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.removeRecaptcha()):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.Contact.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.message,!1,"","","","","","",formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="message"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},message:{required:"message-required"},ContactFormConsent:{checkboxRequired:"ContactFormConsent-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){$('input:not([type="checkbox"],[type="file"]), textarea:not([name="g-recaptcha-response"]),select',$form).each(function(){formData[$(this).attr("name")]=$(this).attr("name")==="email"?$(this).val().trim():$(this).val()});formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;e.preventDefault();e.stopPropagation();var val1=cf.validate(),val2=form.validateRecaptcha();val1&&val2&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode===13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$("#ContactFormConsent",$form).on("change",function(){var $this=$(this),fieldName;$this.hasClass("checked")?($this.removeClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","")):($this.addClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","checked"));fieldName=$this.closest(".checkbox.consent").find("input").attr("name");formData[fieldName]=$this.closest(".checkbox.consent").find("input").prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.Contact.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.Contact.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){var $form=$(".x-landing-form"),$submitButton,form,formData,model,area,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);model=$('select[name="model"] option:selected',$form).val();area=$('select[name="area"] option:selected',$form).val();formData={firstName:"",lastName:"",email:"",phone:"",model:model,area:area,chkTerms:"",LandingForm:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};$(".fancylink").fancybox({transitionIn:"elastic",transitionOut:"elastic",speedIn:600,speedOut:200,maxWidth:600,height:550});form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show()):$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.LandingOffer.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.phone,formData.model,formData.area,formData.chkTerms,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('select[name="model"]',$form).val("");$('select[name="area"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},phone:{required:"phone-required"},model:{required:"model-required"},area:{required:"area-required"},LandingForm:{checkboxRequired:"LandingForm-required"},chkTerms:{checkboxRequired:"terms-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){e.preventDefault();e.stopPropagation();formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;cf.validate()&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("change","select",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val()});$form.on("change","input[type='checkbox']",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.LandingOffer.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.LandingOffer.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){var $form=$(".x-landing-form-mini-innovation-bonus"),$submitButton,form,formData,sex,area,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);sex=$('select[name="sex"] option:selected',$form).val();area=$('select[name="area"] option:selected',$form).val();formData={firstName:"",lastName:"",email:"",phone:"",sex:sex,chkTerms:"",LandingForm:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".terms-content").hide(),$(".js-success",$form).show()):$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.LandingOfferMiniInnovationBonus.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.phone,formData.sex,formData.chkTerms,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},phone:{required:"phone-required"},LandingForm:{checkboxRequired:"LandingForm-required"},chkTerms:{checkboxRequired:"terms-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;e.preventDefault();e.stopPropagation();cf.validate()&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("change","select",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val()});$form.on("change","input[type='checkbox']",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.LandingOfferMiniInnovationBonus.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){function gtag_report_conversion(url){function gtag(){window.dataLayer.push(arguments)}var callback=function(){typeof url!="undefined"&&(window.location=url)};return gtag("event","conversion",{send_to:"AW-998795963/uoVnCJunjLcDELvVodwD",event_callback:callback}),!1}var $form=$(".x-landing-form-volvov40"),$submitButton,form,formData,model,area,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);model=$('select[name="model"] option:selected',$form).val();area=$('select[name="area"] option:selected',$form).val();formData={firstName:"",lastName:"",email:"",phone:"",chkTerms:"",LandingForm:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};$(".fancylink").fancybox({transitionIn:"elastic",transitionOut:"elastic",speedIn:600,speedOut:200,maxWidth:600,height:550});form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),gtag_report_conversion()):$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.LandingOfferVolvoV40.Messages.Submit(formData.firstName,formData.lastName,formData.email,formData.phone,formData.model,formData.area,formData.chkTerms,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},phone:{required:"phone-required"},LandingForm:{checkboxRequired:"LandingForm-required"},chkTerms:{checkboxRequired:"terms-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;e.preventDefault();e.stopPropagation();cf.validate()&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("change","select",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val()});$form.on("change","input[type='checkbox']",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.LandingOfferVolvoV40.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.LandingOfferVolvoV40.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){var $form=$(".x-landing-form-mini"),$submitButton,form,formData,title,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);title=$('select[name="title"] option:selected',$form).val();formData={firstName:"",lastName:"",email:"",phone:"",title:title,chkTerms:"",LandingForm:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show()):$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);console.log(formData);Vendd.MessageBus.publishAsync(form,new Vendd.LandingOfferMini.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.phone,formData.title,formData.chkTerms,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('select[name="title"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},phone:{required:"phone-required"},title:{required:"title-required"},LandingForm:{checkboxRequired:"LandingForm-required"},chkTerms:{checkboxRequired:"terms-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){e.preventDefault();e.stopPropagation();cf.validate()&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("change","select",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val()});$form.on("change","input[type='checkbox']",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.LandingOfferMini.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.LandingOfferMini.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){var $form=$(".x-landing-form-mini-stock-offer"),$submitButton,form,formData,title,cf;if(!($form.length<1)){$submitButton=$(".js-submit-button",$form);form=$form.get(0);title=$('select[name="title"] option:selected',$form).val();formData={firstName:"",lastName:"",email:"",phone:"",title:title,store:"",model:"",chkTerms:"",LandingForm:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show()):$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.LandingOfferMiniStock.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.phone,formData.title,formData.store,formData.model,!0,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('select[name="title"]',$form).val("");$('select[name="store"]',$form).val(0);$('select[name="model"]',$form).val(0);cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},email:{required:"email-required",isEmail:"email-invalid"},phone:{required:"phone-required"},title:{required:"title-required"},store:{required:"store-required"},model:{required:"model-required"},LandingForm:{checkboxRequired:"LandingForm-required"},chkTerms:{checkboxRequired:"terms-required"}});cf=$form.data("validationEngine");$form.on("click",".js-submit-button",function(e){formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;e.preventDefault();e.stopPropagation();console.log(formData);cf.validate()&&form.submit()});$form.on("click",".js-reset-button",function(e){e.preventDefault();e.stopPropagation();form.reset()});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){if($(this).prop("tagName").toLowerCase()==="textarea")return!0;e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("change","select",function(){var $this=$(this),fieldName=$this.attr("name");cf.validate(fieldName);formData[fieldName]=$this.val()});$form.on("change","input[type='checkbox']",function(){var $this=$(this),$this=$(this),fieldName;$this.closest(".form-row").find("label").hasClass("checked")?$this.closest(".form-row").find("label").removeClass("checked"):$this.closest(".form-row").find("label").addClass("checked");fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");cf.validate(fieldName)});Vendd.MessageBus.subscribe(Vendd.LandingOfferMiniStock.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.LandingOfferMiniStock.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){var showMap=function(){var $page=$(".store-page"),$partner,$map,opts;$page.length<1||($partner=$(".x-partner-box",$page),$map=$(".x-google-map",$page),$map.length<1||$partner.length<1)||(opts={lat:$partner.data("latitude"),lng:$partner.data("longitude"),html:$(".box-info",$partner).html()},$map.get(0).create([opts]))};Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.GoogleMapsLoaded,"storeMap",showMap)}),Vendd.Scripts.load(function(){var $wrapper=$(".x-store-locator"),$form,$stores,$map,currentState,state,wrapper,form,stores,map,formmodel=null,storemodel=null,run=function(){function getQueryStringValueByName(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS),results=regex.exec(window.location.search);return results==null?"":decodeURIComponent(results[1].replace(/\+/g," "))}var screenHeightWithoutHeader,ourCityDropdown,ourTabFilters,ourBrandsDropdown,ourUrlBrand;if($wrapper.length<1||($form=$(".x-store-locator-form",$wrapper),$stores=$(".x-store-locator-stores",$wrapper),$map=$(".x-google-map",$wrapper),wrapper=$wrapper.get(0),form=$form.get(0),stores=$stores.get(0),map=$map.get(0),screenHeightWithoutHeader=$(window).height()-$(".header-region").height(),$map.css("height",screenHeightWithoutHeader>750?screenHeightWithoutHeader:750),typeof form=="undefined"))return!1;ourCityDropdown=customDropdown(function(selectedValue){var city=selectedValue;currentState.city=city;Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.SetState(currentState));Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))},$(".dropdown-filter.cities"));$form.on("keyup",'input[name="search"]',function(e){e.stopPropagation();var $this=$(this);e.keyCode==13?(e.preventDefault(),currentState.search=$this.val(),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))):(currentState.search=$this.val(),form.propButton())});ourTabFilters=customTabFilters(function(selectedValue){var type=parseInt(selectedValue,10);currentState.type=type;Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.SetState(currentState));Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))},$(".tab-filter.x-partner-type-list"));ourBrandsDropdown=customDropdown(function(selectedValue){var brand=selectedValue;currentState.brand=brand;Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.SetState(currentState));Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))},$(".dropdown-filter.brands"));$form.on("click",".js-clear-filters.active",function(){$('input[name="search"]',$form).val("");ourCityDropdown.setSelectedValue("");ourBrandsDropdown.setSelectedValue(0);ourTabFilters.reset();currentState={languageId:$wrapper.data("language-id"),countinent:"",country:"",city:"",area:"",type:0,brand:0,postalCode:"",search:$('input[name="search"]',$form).val()};Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.SetState(currentState));Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))});$stores.on("click",".js-show-on-map",function(e){if(!$(e.target).is("a")){e.preventDefault();e.stopPropagation();var $this=$(this).closest(".x-partner-box"),coords,marker;$(".x-partner-box").removeClass("active");$this.addClass("active");coords={lat:$this.data("latitude"),lng:$this.data("longitude")};marker=$map.get(0).getMarker(coords);marker&&$map.get(0).open(marker)}});$stores.on("click",".x-partner-box",function(){var $ourPartnerBox=$(this).closest(".x-partner-box");$ourPartnerBox.toggleClass("expanded");$(".sliding-content",$ourPartnerBox).slideToggle()});return currentState={languageId:$wrapper.data("language-id"),countinent:"",country:"",city:ourCityDropdown.getSelectedValue(),area:"",type:0,brand:0,postalCode:"",search:$('input[name="search"]',$form).val()},ourUrlBrand=getQueryStringValueByName("brand"),ourUrlBrand&&(currentState.brand=ourUrlBrand,ourBrandsDropdown.setSelectedValue(ourUrlBrand),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.SetState(currentState)),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState))),currentState.type=0,Vendd.MessageBus.publishAsync(wrapper,new Vendd.Store.Messages.Refine(currentState)),state=$.extend(!0,{},currentState),stores.bind=function(){$(".nano",$stores).nanoScroller({preventPageScrolling:!0});var $list=$(".x-partner-list",$stores),$partners=$(".x-partner-box",$list),coordinates=[];$.each($partners,function(i,partner){var $partner=$(partner),coord={lat:$partner.data("latitude"),lng:$partner.data("longitude"),html:$(".box-info",$partner).html()};coord.lat!==""&&coord.lng!==""&&coordinates.push(coord)});map.markers.length>0?(map.removeMarkers(),map.addMarkers(coordinates)):coordinates.length>0&&map.create(coordinates)},stores.update=function(){var html=Vendd.Handlebars.parse(Handlebars.partials.storeLocatorStores,storemodel);$stores.html(html);stores.bind()},Vendd.MessageBus.subscribe(Vendd.Store.Messages.UpdateForm,wrapper,function(envelope){formmodel=envelope.message.data.model;formmodel.FiltersApplied?$(".js-clear-filters",$form).addClass("active"):$(".js-clear-filters",$form).removeClass("active");ourBrandsDropdown.populateOptions(formmodel.Brands)}),Vendd.MessageBus.subscribe(Vendd.Store.Messages.UpdateStores,wrapper,function(envelope){storemodel=envelope.message.data.model;stores.update()}),!0};Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.GoogleMapsLoaded,"storesMap",function(){run()})}),Vendd.Scripts.load(function(){var valEngine,observable,filedata,$wrapper=$(".x-career-form"),wrapper,selectedJob;if(!($wrapper.length<1)){wrapper=$wrapper.get(0);wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")};wrapper.onSuccess=function(envelope){wrapper.loading(!1);var data=envelope.message.data;data?($(".js-error",$wrapper).hide(),$(".js-content",$wrapper).hide(),$(".js-success",$wrapper).show()):$(".js-error",$wrapper).show()};wrapper.onFailure=function(){wrapper.loading(!1);$(".js-error",$wrapper).show()};wrapper.submit=function(){wrapper.loading(!0);Vendd.MessageBus.publishAsync(wrapper,new Vendd.Career.Messages.Submit(observable))};$wrapper.on("focusout",".input-wrapper,.checkbox-wrapper, .textarea-wrapper, .upload-wrapper, .agreement-wrapper",function(){$(".error-wrapper",$(this.parentElement)).children().hide()});$(".fileupload",$wrapper).fileupload({dataType:"json",url:"/Engine/UploadFiles",autoUpload:!1,replaceFileInput:!1,fileInput:$("input:file"),multiple:!0,done:function(e,data){$(".file_name").html(data.result.name);$(".file_type").html(data.result.type);$(".file_size").html(data.result.size);wrapper.submit()},fail:function(){$(".fileupload-invalid",$wrapper).show()},add:function(e,data){filedata=data}});$(".js-submit-button").on("click",function(){wrapper.validate();filedata&&filedata.submit()});wrapper.onValidationError=function(envelope){var errors=envelope.message.data.errors;$.each(errors,function(index,error){error.Property==="FirstName"&&$(".firstname-required",$wrapper).show();error.Property==="LastName"&&$(".lastname-required",$wrapper).show();error.Property==="Email"&&(error.Rule==="required"&&$(".email-required",$wrapper).show(),error.Rule==="isEmail"&&$(".email-invalid",$wrapper).show());error.Property==="Phone"&&(error.Rule==="required"&&$(".phone-required",$wrapper).show(),error.Rule==="isNumeric"&&$(".phone-required",$wrapper).show());error.Property==="Agreement"&&$(".agreement-required",$wrapper).show();error.Property==="CvFileUploaded"&&$(".fileupload-required",$wrapper).show()})};wrapper.validate=function(){var valOptions={ValidationEngine:valEngine,valmodel:observable.model};Vendd.DataValidation.ValidateModel(valOptions)};selectedJob=$(".js-jobTitleSelect option:selected",$wrapper).text();observable=Vendd.Career.CreateApplicantInfo(selectedJob);Vendd.Databinding.CreateControlDatabindings(wrapper,observable);valEngine=Vendd.Career.CreateDefaultJobInfoValidationModel(observable);Vendd.MessageBus.subscribe(Vendd.Career.Messages.SubmitSuccess,wrapper,wrapper.onSuccess);Vendd.MessageBus.subscribe(Vendd.Career.Messages.SubmitFailure,wrapper,wrapper.onFailure);Vendd.MessageBus.subscribe(Vendd.DataValidation.Messages.ValidationError,wrapper,wrapper.onValidationError)}}),Vendd.Scripts.load(function(){$(".x-control.x-order.x-orderchangeform").each(function(i,wrapper){var $wrapper=$(wrapper),$orderItems=$('[data-container="orderItem"]',$wrapper),$submitButton=$('input[type="button"][data-click="submit"]',$wrapper),itemSelectionCheck=function($orderItems){var oneChecked=!1;$orderItems.each(function(i,item){var $orderItem=$(item),oid=$orderItem.data("id"),$check=$('input[type="checkbox"]#chkChecked'+oid,$orderItem);$check.is(":checked")&&(oneChecked=!0)});oneChecked?$submitButton.show():$submitButton.hide()},isValid=function($valField){var isOk=!0;return($valField.is(":text")||$valField.is(":password")||$valField.get(0).tagName.toLowerCase()=="textarea"||$valField.get(0).tagName.toLowerCase()=="select")&&$valField.val().trim()===""&&(isOk=!1),isOk},checkForm;itemSelectionCheck($orderItems);$orderItems.each(function(i,item){var $orderItem=$(item),oid=$orderItem.data("id"),isReturnable=$orderItem.data("returnable"),isReturned=$orderItem.data("returned"),$check=$('input[type="checkbox"]#chkChecked'+oid,$orderItem),targetContainer=$('[data-id="'+oid+'"][data-section="product-spec"]',$wrapper),$replaceCheck=targetContainer.find('input[type="checkbox"]#rbAction'+oid+"Replace"),$purchaseCheck=targetContainer.find('input[type="checkbox"]#rbAction'+oid+"Purchase"),$refundCheck=targetContainer.find('input[type="checkbox"]#rbAction'+oid+"Refund"),allContainers;item.isChecked=function(){return $check.is(":checked")&&($replaceCheck.is(":checked")||$purchaseCheck.is(":checked")||$refundCheck.is(":checked"))};isReturnable&&!isReturned?($replaceCheck.change(function(){targetContainer.find("[data-container]").hide();$("input, textarea",targetContainer).val("");$("select",targetContainer).val($(this).find("option").eq(0).val());$(this).is(":checked")&&($("[data-validator]").hide(),$purchaseCheck.prop("checked",!1),$refundCheck.prop("checked",!1),targetContainer.find('[data-container="'+$(this).data("target")+'"]').show())}),$purchaseCheck.change(function(){targetContainer.find("[data-container]").hide();$("input, textarea",targetContainer).val("");$("select",targetContainer).val($(this).find("option").eq(0).val());$(this).is(":checked")&&($("[data-validator]").hide(),$replaceCheck.prop("checked",!1),$refundCheck.prop("checked",!1),targetContainer.find('[data-container="'+$(this).data("target")+'"]').show())}),$refundCheck.change(function(){targetContainer.find("[data-container]").hide();$("input, textarea",targetContainer).val("");$("select",targetContainer).val($(this).find("option").eq(0).val());$(this).is(":checked")&&($("[data-validator]").hide(),$replaceCheck.prop("checked",!1),$purchaseCheck.prop("checked",!1),targetContainer.find('[data-container="'+$(this).data("target")+'"]').show())}),allContainers=targetContainer.find("[data-container]"),allContainers.each(function(c,container){var selectBox=$(container).find('select[data-member="returnReason"]'),textAreaContainer=$(container).find('*[data-container="otherReason"]');selectBox.change(function(){$(this).val()==="other"?textAreaContainer.show():textAreaContainer.hide()})}),item.disable=function(){targetContainer.hide()},item.enable=function(){targetContainer.show()},item.getValue=function(){var defaultOpts={id:oid,action:undefined,note:undefined,returnReason:undefined,returnOtherReason:undefined,bankName:undefined,bankHolder:undefined,bankIban:undefined};return $replaceCheck.is(":checked")?(defaultOpts.action="replace",defaultOpts.note=targetContainer.find('[data-container="'+$replaceCheck.data("target")+'"]').find('[data-member="replaceWith"]').val(),defaultOpts.returnReason=targetContainer.find('[data-container="'+$replaceCheck.data("target")+'"]').find('[data-member="returnReason"]').val(),defaultOpts.returnOtherReason=targetContainer.find('[data-container="'+$replaceCheck.data("target")+'"]').find('[data-member="otherReason"]').val()):$purchaseCheck.is(":checked")?(defaultOpts.action="purchase",defaultOpts.returnReason=targetContainer.find('[data-container="'+$purchaseCheck.data("target")+'"]').find('[data-member="returnReason"]').val(),defaultOpts.returnOtherReason=targetContainer.find('[data-container="'+$purchaseCheck.data("target")+'"]').find('[data-member="otherReason"]').val()):$refundCheck.is(":checked")&&(defaultOpts.action="refund",defaultOpts.returnReason=targetContainer.find('[data-container="'+$refundCheck.data("target")+'"]').find('[data-member="returnReason"]').val(),defaultOpts.returnOtherReason=targetContainer.find('[data-container="'+$refundCheck.data("target")+'"]').find('[data-member="otherReason"]').val(),defaultOpts.bankName=targetContainer.find('[data-container="'+$refundCheck.data("target")+'"]').find('[data-member="bankName"]').val(),defaultOpts.bankHolder=targetContainer.find('[data-container="'+$refundCheck.data("target")+'"]').find('[data-member="bankHolder"]').val(),defaultOpts.bankIban=targetContainer.find('[data-container="'+$refundCheck.data("target")+'"]').find('[data-member="bankIban"]').val()),defaultOpts},$check.change(function(){$(this).is(":checked")?(item.enable(),itemSelectionCheck($orderItems)):(item.disable(),itemSelectionCheck($orderItems))})):$check.attr("disabled","disabled")});checkForm=function($items){var oid=$items.data("id"),isOk=!0;return $items.filter("[data-returnable=True]").each(function(){var curOid=$(this).data("id"),$optionChecks=$(".item-options[data-id='"+curOid+"'] input[type=checkbox][data-target]:checked");$optionChecks.length>0&&$optionChecks.each(function(){var $cont=$("[data-container='"+$(this).data("target")+"'] [data-validaterequired]");$cont.each(function(){var check=isValid($(this));check?$("[data-validator='"+$(this).data("member")+"']").hide():($("[data-validator='"+$(this).data("member")+"']").show(),isOk=!1)})})}),isOk};$submitButton.click(function(){var items=[],resultData;checkForm($orderItems)&&($orderItems.each(function(i,orderItem){orderItem.isChecked()&&items.push(orderItem.getValue())}),items.length>0&&(resultData={id:$wrapper.data("id"),items:items},LhApp.Function.wcf("EcomService.svc/ChangeOrder",{data:resultData},function(request,response){response.success&&($('[data-section="content"]',$wrapper).hide(),$('[data-section="content"].form-msg',$wrapper).show())})))})})}),Vendd.Scripts.load(function(){var valEngine,observable,$wrapper=$(".x-requestorderchange-form"),wrapper;if(!($wrapper.length<1)){wrapper=$wrapper.get(0);wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")};wrapper.onSuccess=function(envelope){var data,redirectUrl;wrapper.loading(!1);data=envelope.message.data;data?($(".js-error",$wrapper).hide(),redirectUrl=$(".x-requestorderchange-form").data("redirect"),redirectUrl!=undefined&&redirectUrl!=""&&(document.location=redirectUrl)):$(".js-error",$wrapper).show()};wrapper.onFailure=function(){wrapper.loading(!1);$(".js-error",$wrapper).show()};wrapper.submit=function(){wrapper.loading(!0);Vendd.MessageBus.publishAsync(wrapper,new Vendd.Order.Messages.SubmitRequestOrderChange(observable))};$wrapper.on("focusout",".input-wrapper,.checkbox-wrapper, .textarea-wrapper, .upload-wrapper, .agreement-wrapper",function(){$(".error-wrapper",$(this.parentElement)).children().hide()});$(".js-submit-button").on("click",function(){wrapper.validate();wrapper.submit()});wrapper.onValidationError=function(envelope){var errors=envelope.message.data.errors;$(".email-required",$wrapper).hide();$(".email-invalid",$wrapper).hide();$(".order-code-required",$wrapper).hide();$.each(errors,function(index,error){error.Property==="Email"&&(error.Rule==="required"&&$(".email-required",$wrapper).show(),error.Rule==="isEmail"&&$(".email-invalid",$wrapper).show());error.Property==="OrderCode"&&error.Rule==="required"&&$(".order-code-required",$wrapper).show()})};wrapper.validate=function(){var valOptions={ValidationEngine:valEngine,valmodel:observable.model};Vendd.DataValidation.ValidateModel(valOptions)};observable=Vendd.Order.CreateChangeOrder();Vendd.Databinding.CreateControlDatabindings(wrapper,observable);valEngine=Vendd.Order.CreateDefaultChangeOrderValidationModel(observable);Vendd.MessageBus.subscribe(Vendd.Order.Messages.SubmitRequestOrderChangeSuccess,wrapper,wrapper.onSuccess);Vendd.MessageBus.subscribe(Vendd.Order.Messages.SubmitRequestOrderChangeFailure,wrapper,wrapper.onFailure);Vendd.MessageBus.subscribe(Vendd.DataValidation.Messages.ValidationError,wrapper,wrapper.onValidationError)}}),Vendd.Scripts.load(function(){$('.x-control.x-article-reviews[data-type="reviews"]').each(function(i,wrapper){var $wrapper=$(wrapper),sortKey="",isAjax=$wrapper.data("ajax"),sessionIsAuthenticated=$wrapper.data("session-is-authenticated"),isReviewed,$orderByLtestLink,$orderByHelpfullnessLink,$articleReviewForm,$openFormLink,$closeFormLink,$loginPopup,$showLoginMessageLink;if($wrapper.find('> input[type="hidden"][data-member="isauthenticated"]').length>0&&(sessionIsAuthenticated=$wrapper.find('> input[type="hidden"][data-member="isauthenticated"]').val()==="true"),isReviewed=$wrapper.data("article-reviewed-by-current-user"),$wrapper.find('> input[type="hidden"][data-member="isreviewed"]').length>0&&(isReviewed=$wrapper.find('> input[type="hidden"][data-member="isreviewed"]').val()==="true"),$orderByLtestLink=$('*[data-click="order-by-latest"]',$wrapper),$orderByHelpfullnessLink=$('*[data-click="order-by-helpfullness"]',$wrapper),$orderByLtestLink.click(function(){if(isAjax)$orderByLtestLink.hasClass("x-selected")||($orderByHelpfullnessLink.removeClass("x-selected"),$orderByLtestLink.addClass("x-selected"),sortKey="latest");else{var url=document.location.href;document.location.search.indexOf("page=")>0&&(url=LhApp.Function.Url.setParameterValueOnUrl(url,"page","1"));document.location=LhApp.Function.Url.setParameterValueOnUrl(url,"sort-by","latest")}}),$orderByHelpfullnessLink.click(function(){if(isAjax)$orderByHelpfullnessLink.hasClass("x-selected")||($orderByLtestLink.removeClass("x-selected"),$orderByHelpfullnessLink.addClass("x-selected"),sortKey="helpfullness");else{var url=document.location.href;document.location.search.indexOf("page=")>0&&(url=LhApp.Function.Url.setParameterValueOnUrl(url,"page","1"));document.location=LhApp.Function.Url.setParameterValueOnUrl(url,"sort-by","helpfullness")}}),$articleReviewForm=$('.x-control.x-form.x-article-review-form[data-control="form"]',$wrapper),$articleReviewForm.length==1&&($openFormLink=$('.form-show-hide[data-click="open-article-review-form"]',$wrapper),$closeFormLink=$('.form-show-hide[data-click="close-article-review-form"]',$articleReviewForm),$openFormLink.click(function(){$openFormLink.hasClass("x-closed")&&($openFormLink.removeClass("x-closed").addClass("x-opened"),$closeFormLink.removeClass("x-closed").addClass("x-opened"),$articleReviewForm.removeClass("x-collapsed").removeClass("x-closed").addClass("x-opened"),$articleReviewForm.show())}),$closeFormLink.click(function(){$closeFormLink.hasClass("x-opened")&&($openFormLink.removeClass("x-opened").addClass("x-closed"),$closeFormLink.removeClass("x-opened").addClass("x-closed"),$articleReviewForm.removeClass("x-opened").addClass("x-closed"),$articleReviewForm.hide())})),$loginPopup=$('div[data-type="review-login-popup"]',$wrapper),sessionIsAuthenticated)$loginPopup.remove();else{if($loginPopup.length==0)throw"login popUp does not exist on article review box";$showLoginMessageLink=$('*[data-click="show-login-message"]',$wrapper);$showLoginMessageLink.click(function(){$loginPopup.show()});var $loginLink=$('*[data-click="login"]',$loginPopup),$registerLink=$('*[data-click="register"]',$loginPopup),$closeBtn=$('*[data-click="close-popup"]',$loginPopup),$loginWidget=$('.x-control.x-widget.x-login-widget[data-control="login"][data-type="widget"]').first(),redirectUrl=LhApp.Function.Url.setParameterValue("mode","add-review");$loginLink.click(function(e){if($loginPopup.hide(),$loginWidget.length>0&&$loginWidget.data("expandable")==!0){var $loginForm=$(".x-login-form",$loginWidget);$loginForm.data("redirect",redirectUrl);$("html, body").animate({scrollTop:$loginWidget.offset().top},1500);LhApp.pauseScroll=!0;setTimeout(function(){LhApp.pauseScroll=!1},2e3);$loginWidget.get(0).expand();e.stopPropagation()}else document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Login,"ReturnUrl",encodeURIComponent(redirectUrl))});$registerLink.click(function(){document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Register,"ReturnUrl",encodeURIComponent(redirectUrl))});$closeBtn.click(function(){$loginPopup.hide()})}})}),Vendd.Scripts.load(function(){$('.x-control.x-box.x-article-review-box[data-control="box"][data-type="review"]').each(function(i,wrapper){function yesVoteSuccess(response){response.success?($totalYesVotes.val(parseInt($totalYesVotes.val())+1),$btnVoteYes.prop("disabled",!0),$voteYesInputWrapper.addClass("x-disabled"),$btnVoteNo.prop("disabled",!0),$voteNoInputWrapper.addClass("x-disabled"),$userVotedMessage.show()):($voteError.html(LhApp.Resource.getText("Validation:"+response.code)),$voteError.show())}function noVoteSuccess(response){response.success?($totalNoVotes.val(parseInt($totalNoVotes.val())+1),$btnVoteYes.prop("disabled",!0),$voteYesInputWrapper.addClass("x-disabled"),$btnVoteNo.prop("disabled",!0),$voteNoInputWrapper.addClass("x-disabled"),$userVotedMessage.show()):($voteError.html(LhApp.Resource.getText("Validation:"+response.code)),$voteError.show())}function voteFailure(response){$voteError.html(LhApp.Resource.getText("Validation:"+response.code));$voteError.show()}var $box=$(wrapper),reviewId=$box.data("reviewid"),sessionIsAuthenticated=$box.data("session-is-authenticated"),currentUserVotedForHelpfullness,$loginPopup;if($box.find('> input[type="hidden"][data-member="isauthenticated"]').length>0&&(sessionIsAuthenticated=$box.find('> input[type="hidden"][data-member="isauthenticated"]').val()==="true"),currentUserVotedForHelpfullness=$box.data("current-user-voted-for-helpfullness"),$box.find('> input[type="hidden"][data-member="helpfullness"]').length>0&&(currentUserVotedForHelpfullness=$box.find('> input[type="hidden"][data-member="helpfullness"]').val()==="true"),$loginPopup=$('div[data-type="helpfullness-login-popup"]',$box),$loginPopup.length==0)throw new Error("login popUp does not exist on article review box");var $btnVoteYes=$box.find('*:enabled[data-click="vote-yes"]'),$voteYesInputWrapper=$btnVoteYes.parent(),$btnVoteNo=$box.find('*:enabled[data-click="vote-no"]'),$voteNoInputWrapper=$btnVoteNo.parent(),$totalYesVotes=$box.find('*[data-input="helpfullness-yes-total"]'),$totalNoVotes=$box.find('*[data-input="helpfullness-no-total"]'),$userVotedMessage=$box.find(".user-voted"),$voteError=$box.find(".vote-msg-error");if($btnVoteYes.click(function(){sessionIsAuthenticated?currentUserVotedForHelpfullness||($voteError.hide(),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Article.Messages.ReviewVote(reviewId,!0))):$loginPopup.show()}),$btnVoteNo.click(function(){sessionIsAuthenticated?currentUserVotedForHelpfullness||($voteError.hide(),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Article.Messages.ReviewVote(reviewId,!1))):$loginPopup.show()}),sessionIsAuthenticated)$loginPopup.remove();else{var $loginLink=$('*[data-click="login"]',$loginPopup),$registerLink=$('*[data-click="register"]',$loginPopup),$closeBtn=$('*[data-click="close-popup"]',$loginPopup),$loginWidget=$('.x-control.x-widget.x-login-widget[data-control="login"][data-type="widget"]').first(),redirectUrl=document.location.href+"&mode=view-reviews";$loginLink.click(function(e){if($loginPopup.hide(),$loginWidget.length>0&&$loginWidget.data("expandable")==!0){var $loginForm=$(".x-login-form",$loginWidget);$loginForm.data("redirect",redirectUrl);$("html, body").animate({scrollTop:$loginWidget.offset().top},1500);LhApp.pauseScroll=!0;setTimeout(function(){LhApp.pauseScroll=!1},2e3);$loginWidget.get(0).expand();e.stopPropagation()}else document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Login,"ReturnUrl",encodeURIComponent(redirectUrl))});$registerLink.click(function(){document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Register,"ReturnUrl",encodeURIComponent(redirectUrl))});$closeBtn.click(function(){$loginPopup.hide()})}Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewVoteSuccess,wrapper,function(envelope){envelope.message.data.vote===!0?yesVoteSuccess(envelope.message.data.response):noVoteSuccess(envelope.message.data.response)});Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewVoteFailure,wrapper,function(envelope){voteFailure(envelope.message.data.response)})})}),Vendd.Scripts.load(function(){var valEngine,observable,$wrapper=$('.x-control.x-article-review-form[data-control="form"][data-ajax="true"]'),wrapper;if(!($wrapper.length<1)){wrapper=$wrapper.get(0);wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading"):$wrapper.removeClass("x-loading")};wrapper.onSuccess=function(envelope){wrapper.loading(!1);var data=envelope.message.data,$articleReviewControl=$('.x-control.x-article-reviews[data-type="reviews"]:first');if($articleReviewControl.length==0)throw new Error("Article review control does not exist.");data&&($articleReviewControl.find(".critics.form-show-hide").remove(),$articleReviewControl.find(".already-reviewed-status").show(),$articleReviewControl.find(".critics.review-status").show())};wrapper.onFailure=function(){wrapper.loading(!1);$(".js-error",$wrapper).show()};wrapper.submit=function(){wrapper.loading(!0);Vendd.MessageBus.publishAsync(wrapper,new Vendd.Article.Messages.ReviewSubmit(observable))};$wrapper.on("focusout",".input-wrapper, .textarea-wrapper",function(){$(".error-wrapper",$(this.parentElement)).children().hide()});$(".js-submit-button").on("click",function(){wrapper.validate();wrapper.submit()});wrapper.onValidationError=function(envelope){var errors=envelope.message.data.errors;$.each(errors,function(index,error){error.Property==="ReviewTitle"&&$(".review-title-required",$wrapper).show();error.Property==="ReviewDescription"&&$(".review-description-required",$wrapper).show()})};wrapper.validate=function(){var valOptions={ValidationEngine:valEngine,valmodel:observable.model};Vendd.DataValidation.ValidateModel(valOptions)};observable=Vendd.Article.CreateArticleReviewInfo(parseInt($('input[data-member="ReviewArticleId"]').val()));Vendd.Databinding.CreateControlDatabindings(wrapper,observable);valEngine=Vendd.Article.CreateArticleReviewInfoValidationModel(observable);Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewSuccess,wrapper,wrapper.onSuccess);Vendd.MessageBus.subscribe(Vendd.Article.Messages.ReviewFailure,wrapper,wrapper.onFailure);Vendd.MessageBus.subscribe(Vendd.DataValidation.Messages.ValidationError,wrapper,wrapper.onValidationError)}}),Vendd.Scripts.load(function(){function scrollTo(whereToScroll){var topOffset=0,$articleReviewControl=$('.x-control.x-article-reviews[data-type="reviews"]'),tabIndex,$tabTitle,$openFormLink;if($articleReviewControl.length==0)throw new Error("Article review control does not exist.");$articleReviewControl.hasClass("x-tab-body")&&(tabIndex=$articleReviewControl.closest(".tab-content").data("tab-content-index"),$tabTitle=$articleReviewControl.closest(".x-control.x-tab-panel").find('.tab-title[data-tab-index="'+tabIndex+'"]'),$tabTitle.trigger("click"));topOffset=$articleReviewControl.offset().top-40;whereToScroll=="form"?($openFormLink=$articleReviewControl.find('*[data-click="open-article-review-form"]'),$openFormLink.length>0?$openFormLink.trigger("click"):$articleReviewControl.find('*[data-click="show-login-message"]').trigger("click")):whereToScroll=="reviews";$("html, body").animate({scrollTop:topOffset},1500);LhApp.pauseScroll=!0;setTimeout(function(){LhApp.pauseScroll=!1},2e3)}$('.x-control.x-article-reviews-summary[data-type="reviews-summary"]').each(function(i,wrapper){var $wrapper=$(wrapper),sessionIsAuthenticated=$wrapper.data("session-is-authenticated"),articleReviewdByCurrentUser,$loginPopup,$scrollToReviewsLink,$scrollToFormLink,$showLoginMessageLink;if($wrapper.find('> input[type="hidden"][data-member="isauthenticated"]').length>0&&(articleReviewdByCurrentUser=$wrapper.find('> input[type="hidden"][data-member="isauthenticated"]').val()==="true"),articleReviewdByCurrentUser=$wrapper.data("article-reviewd-by-current-user"),$wrapper.find('> input[type="hidden"][data-member="isreviewed"]').length>0&&(articleReviewdByCurrentUser=$wrapper.find('> input[type="hidden"][data-member="isreviewed"]').val()==="true"),$loginPopup=$('div[data-type="review-login-popup"]',$wrapper),articleReviewdByCurrentUser)$scrollToReviewsLink=$('*[data-click="scrol-to-reviews"]',$wrapper),$scrollToReviewsLink.click(function(){scrollTo("reviews")});else if(sessionIsAuthenticated)$loginPopup.remove(),$scrollToFormLink=$('*[data-click="scrol-to-form"]',$wrapper),$scrollToFormLink.click(function(){scrollTo("form")});else{if($loginPopup.length==0)throw new Error("login popUp does not exist on article review box");$showLoginMessageLink=$('*[data-click="show-login-message"]',$wrapper);$showLoginMessageLink.click(function(){$loginPopup.show()});var $loginLink=$('*[data-click="login"]',$loginPopup),$registerLink=$('*[data-click="register"]',$loginPopup),$closeBtn=$('*[data-click="close-popup"]',$loginPopup),$loginWidget=$('.x-control.x-widget.x-login-widget[data-control="login"][data-type="widget"]').first(),redirectUrl=LhApp.Function.Url.setParameterValue("mode","add-review");$loginLink.click(function(e){if($loginPopup.hide(),$loginWidget.length>0&&$loginWidget.data("expandable")==!0){var $loginForm=$(".x-login-form",$loginWidget);$loginForm.data("redirect",redirectUrl);$("html, body").animate({scrollTop:$loginWidget.offset().top},1500);LhApp.pauseScroll=!0;setTimeout(function(){LhApp.pauseScroll=!1},2e3);$loginWidget.get(0).expand();e.stopPropagation()}else document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Login,"ReturnUrl",encodeURIComponent(redirectUrl))});$registerLink.click(function(){document.location=LhApp.Function.Url.setParameterValueOnUrl(LhApp.Url.Page.Register,"ReturnUrl",encodeURIComponent(redirectUrl))});$closeBtn.click(function(){$loginPopup.hide()})}})}),Vendd.Scripts.load(function(){var $form=$(".x-offer-form"),$submitButton,form,formData,offerVal,cf;if(!($form.length<1)){$(".view-terms",$form).fancybox();$submitButton=$(".js-offer-submit-button",$form);form=$form.get(0);offerVal=$('input[name="offertitle"]').val();formData={firstName:"",lastName:"",email:"",phone:"",store:"",offertitle:offerVal,OfferConsent:"","contact-agreement":"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="offerCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.resetRecaptcha(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):data.code==="Offer_AlreadySubscribed"?($(".js-subscribed",$form).show(),form.resetRecaptcha()):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.Offer.Messages.Submit(formData.firstName,formData.lastName,formData.email,formData.phone,formData.store,formData.offertitle,formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");$('select[name="store"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},store:{required:"store-required"},email:{required:"email-required",isEmail:"email-invalid"},OfferConsent:{checkboxRequired:"OfferConsent-required"},"contact-agreement":{checkboxRequired:"contact-agreement-required"}});cf=$form.data("validationEngine");$form.on("click",".js-Offer-submit-button",function(e){var $errorSpan,val1;if(e.preventDefault(),e.stopPropagation(),$('input:not([type="checkbox"],[type="file"]), textarea:not([name="g-recaptcha-response"]),select',$form).each(function(){formData[$(this).attr("name")]=$(this).attr("name")==="email"?$(this).val().trim():$(this).val()}),formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked,formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked,formData.emailcheckbox=$("#emailconsent",$form)[0].checked,formData.phonecheckbox=$("#phoneconsent",$form)[0].checked,formData.postcheckbox=$("#post",$form)[0].checked,formData.smscheckbox=$("#sms",$form)[0].checked,$errorSpan=$(".form-row.checkbox .error-wrapper span"),val1=form.validateRecaptcha(),cf.validate()&&val1)$errorSpan.removeClass("error"),formData.store=$('select[name="store"]',$form).val(),form.submit();else{var leftColumnFormOffset=$(".control-area-one .form-row .error-wrapper .error").first().closest(".form-row").offset().top,rightColumnFormOffset=$(".control-area-two .form-row .error-wrapper .error").first().closest(".form-row").offset().top,maxTopOffset=leftColumnFormOffset<rightColumnFormOffset?leftColumnFormOffset:rightColumnFormOffset;$(".form-row .error-wrapper .error",$form).length>0&&$("html,body").animate({scrollTop:maxTopOffset-100},400)}});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});$("#OfferConsent",$form).on("change",function(){var $this=$(this),fieldName;$this.hasClass("checked")?($this.removeClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","")):($this.addClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","checked"));fieldName=$this.closest(".checkbox.consent").find("input").attr("name");formData[fieldName]=$this.closest(".checkbox.consent").find("input").prop("checked");cf.validate(fieldName)});stylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.Offer.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.Offer.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){var $form=$(".x-after-sales-offer-form"),$submitButton,form,formData,offerVal,cf;if(!($form.length<1)){$(".view-terms",$form).fancybox();$submitButton=$(".js-After-Sales-Offer-submit-button",$form);form=$form.get(0);offerVal=$('input[name="offertitle"]').val();formData={firstName:"",lastName:"",email:"",phone:"",store:"",offertitle:offerVal,currentItemId:$form.data("item-id")||"",currentItemTemplate:$form.data("item-template")||"",currentItemSfakinakaisBrandValue:$form.data("brand-value")||"",OfferConsent:"","contact-agreement":"",reCaptchaCode:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="afterSalesCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Offer_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.resetRecaptcha(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):data.code==="Offer_AlreadySubscribed"?($(".js-subscribed",$form).show(),form.resetRecaptcha()):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.AfterSalesOffer.Messages.Submit(formData.firstName,formData.lastName,formData.email,formData.phone,formData.store,formData.offertitle,formData.currentItemId,formData.currentItemTemplate,formData.currentItemSfakinakaisBrandValue,formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");$('select[name="store"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},store:{required:"store-required"},email:{required:"email-required",isEmail:"email-invalid"},OfferConsent:{checkboxRequired:"OfferConsent-required"},"contact-agreement":{checkboxRequired:"contact-agreement-required"}});cf=$form.data("validationEngine");$form.on("click",".js-After-Sales-Offer-submit-button",function(e){e.preventDefault();e.stopPropagation();$('input:not([type="checkbox"],[type="file"]), textarea:not([name="g-recaptcha-response"]),select',$form).each(function(){formData[$(this).attr("name")]=$(this).attr("name")==="email"?$(this).val().trim():$(this).val()});formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;var $errorSpan=$(".form-row.checkbox .error-wrapper span"),val1=form.validateRecaptcha();cf.validate()&&val1&&($errorSpan.removeClass("error"),formData.store=$('select[name="store"]',$form).val(),form.submit())});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});$("#OfferConsent",$form).on("change",function(){var $this=$(this),fieldName;$this.hasClass("checked")?($this.removeClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","")):($this.addClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","checked"));fieldName=$this.closest(".checkbox.consent").find("input").attr("name");formData[fieldName]=$this.closest(".checkbox.consent").find("input").prop("checked");cf.validate(fieldName)});stylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.AfterSalesOffer.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.AfterSalesOffer.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){var $form=$(".x-testdrive-form"),$submitButton,form,formData,td,brandId,$brandSel,brandName;if(!($form.length<1)){$(".view-terms",$form).fancybox();$submitButton=$(".js-testdrive-submit-button",$form);form=$form.get(0);formData={firstName:"",lastName:"",email:"",phone:"",store:"",brands:"",models:"","contact-agreement":"",TestDriveConsent:"",reCaptchaCode:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="testDriveCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="TestDrive_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.resetRecaptcha(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):data.code==="TestDrive_AlreadySubscribed"?($(".js-subscribed",$form).show(),form.resetRecaptcha()):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.TestDrive.Messages.Submit(formData.firstName,formData.lastName,formData.email,formData.phone,formData.store,formData.brands,formData.models,formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");$('select[name="store"]',$form).val("");$('select[name="brand"]',$form).val("");$('select[name="model"]',$form).val("");td.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},store:{required:"store-required"},brand:{required:"brand-required"},model:{required:"model-required"},email:{required:"email-required",isEmail:"email-invalid"},TestDriveConsent:{checkboxRequired:"TestDriveConsent-required"},"contact-agreement":{checkboxRequired:"contact-agreement-required"}});td=$form.data("validationEngine");$form.on("click",".js-TestDrive-submit-button",function(e){e.preventDefault();$('input:not([type="checkbox"],[type="file"]), textarea:not([name="g-recaptcha-response"]),select',$form).each(function(){formData[$(this).attr("name")]=$(this).attr("name")==="email"?$(this).val().trim():$(this).val()});formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;var $errorSpan=$(".form-row.checkbox .error-wrapper span"),val1=form.validateRecaptcha();td.validate()&&val1&&($errorSpan.removeClass("error"),formData.brands=$('select[name="brand"]',$form).val(),formData.models=$('select[name="model"]',$form).val(),formData.store=$('select[name="store"]',$form).val(),form.submit())});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();td.validate(fieldName)});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});$form.on("change","input[type='checkbox']",function(){var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.prop("checked");td.validate(fieldName)});brandId=getQueryStringValueByName("brand");brandId!=""?($brandSel=$("select[name=brand]"),brandName=$("option[data-value="+brandId+"]",$brandSel).val(),$brandSel.val(brandName),tdStylishSelectHandler(brandId)):tdStylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.TestDrive.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.TestDrive.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){function changeCustomerType(type){type==="company"?(customerType="company",updateCustomerType(),setCompanyValidationEngine(),form.reset()):type==="person"&&(customerType="person",updateCustomerType(),setPersonValidationEngine(),form.reset())}function setPersonValidationEngine(){cs.destroy();$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},message:{required:"message-required"},brand:{required:"brand-required"},model:{required:"model-required"}});cs=$form.data("validationEngine")}function setCompanyValidationEngine(){cs.destroy();$form.validationEngine({company:{required:"company-required"},phone:{required:"phone-required"},message:{required:"message-required"},brand:{required:"brand-required"},model:{required:"model-required"}});cs=$form.data("validationEngine")}function updateCustomerType(){formData.customerType=$("#"+customerType).val()}function resetAgreementCheckbox(){var $chckBoxWrapp=$("#contact-agreement").closest(".stylish-checkbox"),$label=$("label",$chckBoxWrapp),$errorSpan=$(".error-wrapper span",$chckBoxWrapp);$("#contact-agreement")[0].checked&&($label.removeClass("checked"),$("#contact-agreement")[0].checked=!1);$errorSpan.removeClass("error")}var $form=$(".x-companysales-form"),customerType="person",$submitButton,form,formData,cs,brandId,$brandSel,brandName;if(!($form.length<1)){$(".view-terms",$form).fancybox();$submitButton=$(".js-companysales-submit-button",$form);form=$form.get(0);formData={firstName:" ",lastName:" ",phone:"",message:"",brand:"",model:"",customerType:"",company:" ",CompanySalesConsent:"",reCaptchaCode:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="companySalesCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="CompanySales_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.resetRecaptcha(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):data.code==="CompanySales_AlreadySubscribed"?($(".js-subscribed",$form).show(),form.resetRecaptcha()):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.CompanySales.Messages.Submit(formData.firstName,formData.lastName,formData.phone,formData.message,formData.brand,formData.model,formData.customerType,formData.company,formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();customerType==="person"?($('input[name="company"]',$form).val(" "),$("[data-type='company']",$form).hide(),$("[data-type='person']",$form).show()):customerType==="company"&&($('input[name="firstName"]',$form).val(" "),$('input[name="lastName"]',$form).val(" "),$("[data-type='person']",$form).hide(),$("[data-type='company']",$form).show());$('input[name="phone"]',$form).val("");$('textarea[name="message"]',$form).val("");resetAgreementCheckbox();cs.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},message:{required:"message-required"},brand:{required:"brand-required"},model:{required:"model-required"},CompanySalesConsent:{checkboxRequired:"CompanySalesConsent-required"}});updateCustomerType();$(".form-disable",$form).css("display","none");cs=$form.data("validationEngine");$form.on("click",".js-company-sales-submit-button",function(e){formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;e.preventDefault();var $errorSpan=$(".form-row.checkbox .error-wrapper span"),customrType=$("input[name=customrType]",$form).val(),val1=form.validateRecaptcha();cs.validate()&&val1&&($errorSpan.removeClass("error"),formData.brand=$('select[name="brand"]',$form).val(),formData.model=$('select[name="model"]',$form).val(),form.submit())});$form.on("click",".js-customer-type",function(){var $this=$(this),$button=$this.closest(".stylish-radio-button");$("input",$button).is(":checked")||($(".checked",".stylish-radio-group").removeClass("checked"),$this.addClass("checked"),changeCustomerType($this.attr("for")))});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cs.validate(fieldName)});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});$("#CompanySalesConsent",$form).on("change",function(){var $this=$(this),fieldName;$this.hasClass("checked")?($this.removeClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","")):($this.addClass("checked"),$this.closest(".checkbox.consent").find("input").prop("checked","checked"));fieldName=$this.closest(".checkbox.consent").find("input").attr("name");formData[fieldName]=$this.closest(".checkbox.consent").find("input").prop("checked");cs.validate(fieldName)});brandId=getQueryStringValueByName("brand");brandId!=""?($brandSel=$("select[name=brand]"),brandName=$("option[data-value="+brandId+"]",$brandSel).val(),$brandSel.val(brandName),csStylishSelectHandler(brandId)):csStylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.CompanySales.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.CompanySales.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){function validateDate(){var day=$("input[name=day]",$form).val(),month=$("input[name=month]",$form).val(),year=$("input[name=year]",$form).val(),checkDate;return($(".form-row.date-picker .error-wrapper .error").removeClass("error"),checkDate=validateDay(day),checkDate=validateMonth(month)&&checkDate,checkDate=validateYear(year)&&checkDate,checkDate)?(formData.serviceInfo.date=""+day+"/"+month+"/"+year,!0):!1}function validateDay(day){if(day>=1&&day<=31)return!0;var $errorElement=$(".form-row.date-picker .error-wrapper .invalid-day").addClass("error");return!1}function validateMonth(month){if(month>=1&&month<=12)return!0;var $errorElement=$(".form-row.date-picker .error-wrapper .invalid-month").addClass("error");return!1}function validateYear(year){if(year>=1850&&year<=(new Date).getFullYear())return!0;var $errorElement=$(".form-row.date-picker .error-wrapper .invalid-year").addClass("error");return!1}function checkServiceType(){$(".sertvice-type",$form);$(".sertvice-type-checkbox:checked").each(function(){var $this=$(this),fieldName=$this.attr("name"),value=$this.attr("data-value");formData.serviceInfo[fieldName.replace("-","")]=value})}var $form=$(".x-service-appointment-form"),$submitButton,form,formData,serviceInfo,sf,brandId,$brandSel,brandName;if(!($form.length<1)){!$(".touch").length>0&&$(".service-types-list > li").each(function(){$(this).hoverdir({hoverElem:".service-hover-element"})});$(".view-terms",$form).fancybox();$submitButton=$(".js-service-submit-button",$form);form=$form.get(0);serviceInfo={amortisseur:"",plates:"",brakes:"",brakedisks:"",clutch:"",tyres:"",belt:"",exhaust:"",oils:"",service:"",servicehuge:"",alinement:"",kilometers:"",plate:"",brand:"",model:"",date:"",store:""};formData={firstName:"",lastName:"",email:"",phone:"",serviceInfo:serviceInfo,message:"",reCaptchaCode:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};var captchaId="serviceCaptcha",captchaWidgetId,$captchaElement=$form.find("#"+captchaId),$captchaContainer=$form.find(".recaptcha-container"),captchaEnabled=$captchaElement.length>0?!0:!1;form.initRecaptcha=function(){if(captchaEnabled){var sitekey=$captchaElement.data("sitekey");sitekey&&(captchaEnabled=!0,captchaWidgetId=grecaptcha.render(captchaId,{sitekey:sitekey,callback:form.recaptchaCallback}))}};form.recaptchaCallback=function(){form.validateRecaptcha()};form.resetRecaptcha=function(){captchaEnabled&&grecaptcha.reset(captchaWidgetId)};form.removeRecaptcha=function(){$captchaElement.remove()};form.validateRecaptcha=function(){if(!captchaEnabled)return!0;formData.reCaptchaCode=$captchaElement.find(".g-recaptcha-response").val();var res=!1;return formData.reCaptchaCode?($captchaContainer.find(".error-recaptcha").hide(),res=!0):$captchaContainer.find(".error-recaptcha").show(),res};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Service_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),form.resetRecaptcha(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):($(".js-error",$form).show(),form.resetRecaptcha())};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);Vendd.MessageBus.publishAsync(form,new Vendd.ServiceForm.Messages.Submit(formData.firstName,formData.lastName,formData.email,formData.phone,formData.message,serviceInfo,formData.reCaptchaCode,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");$('textarea[name="message"]',$form).val("");sf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},store:{required:"store-required"},brand:{required:"brand-required"},model:{required:"model-required"},kilometers:{required:"kilometers-required"},plate:{required:"plate-required"},message:{required:"message-required"},day:{required:"date-required"},month:{required:"date-required"},year:{required:"date-required"},email:{required:"email-required",isEmail:"email-invalid"}});sf=$form.data("validationEngine");$form.on("click",".js-service-submit-button",function(e){e.preventDefault();e.stopPropagation();$('input:not([type="checkbox"],[type="file"]), textarea:not([name="g-recaptcha-response"]),select',$form).each(function(){formData[$(this).attr("name")]=$(this).attr("name")==="email"?$(this).val().trim():$(this).val()});formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;var $errorSpan=$(".form-row.checkbox .error-wrapper span"),validDate=validateDate(),val1=form.validateRecaptcha();sf.validate()&&$("#contact-agreement").is(":checked")&&validDate&&val1?($errorSpan.removeClass("error"),formData.serviceInfo.brand=$('select[name="brand"]',$form).val(),formData.serviceInfo.model=$('select[name="model"]',$form).val(),formData.serviceInfo.store=$('select[name="store"]',$form).val(),checkServiceType(),form.submit()):($("#contact-agreement").is(":checked")?$errorSpan.removeClass("error"):$errorSpan.addClass("error"),$(".form-row .error-wrapper .error",$form).length>0&&$("html,body").animate({scrollTop:$(".form-row .error-wrapper .error").first().closest(".form-row").offset().top-100},400))});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});$form.on("keyup blur input propertychange","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");$this.attr("data-type")?$this.attr("data-type")=="service-info"?formData.serviceInfo[fieldName]=$this.val():$this.attr("data-type")=="date"&&($this.val().match(/^\d+$/)||$this.val($this.val().replace(/[^0-9\.]/g,""))):formData[fieldName]=$this.val();$this.attr("data-type")=="date"?sf.validate("day")===!0&&sf.validate("month")===!0&&sf.validate("year")===!0&&validateDate():sf.validate(fieldName)});brandId=getQueryStringValueByName("brand");brandId!=""?($brandSel=$("select[name=brand]"),brandName=$("option[data-value="+brandId+"]",$brandSel).val(),$brandSel.val(brandName),srvcStylishSelectHandler(brandId)):srvcStylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.ServiceForm.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.ServiceForm.Messages.SubmitFailure,form,form.onFailure);Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.RecaptcaLoaded,form,form.initRecaptcha)}}),Vendd.Scripts.load(function(){var $form=$(".x-insurance-form"),$submitButton,form,formData,cf;if(!($form.length<1)){$(".view-terms",$form).fancybox();$submitButton=$(".js-insurance-submit-button",$form);form=$form.get(0);formData={firstName:"",lastName:"",email:"",phone:"",address:"",fax:"",age:"",horsePower:"",vehicleValue:"",sfakianakisAEBE:!1,sfakianakisAEBEGroup:!1,emailcheckbox:!1,phonecheckbox:!1,postcheckbox:!1,smscheckbox:!1};form.loading=function(loading){loading?$form.addClass("x-loading"):$form.removeClass("x-loading")};form.onSuccess=function(envelope){form.loading(!1);var data=envelope.message.data;data.success&&data.code==="Insurance_OperationSuccesful"?($(".js-error",$form).hide(),$(".js-content",$form).hide(),$(".js-success",$form).show(),$(window).width()<=767&&$("html,body").animate({scrollTop:$(".js-success",$form).offset().top})):data.code==="Insurance_AlreadySubscribed"?$(".js-subscribed",$form).show():$(".js-error",$form).show()};form.onFailure=function(){form.loading(!1);$(".js-error",$form).show()};form.submit=function(){form.loading(!0);console.log(formData);Vendd.MessageBus.publishAsync(form,new Vendd.Insurance.Messages.Submit(formData.email,formData.firstName,formData.lastName,formData.phone,formData.address,formData.fax,formData.age,formData.horsePower,formData.vehicleValue,formData.sfakianakisAEBE,formData.sfakianakisAEBEGroup,formData.emailcheckbox,formData.phonecheckbox,formData.postcheckbox,formData.smscheckbox))};form.reset=function(){$(".js-error",$form).hide();$(".js-success",$form).hide();$(".js-content",$form).show();$('input[name="firstName"]',$form).val("");$('input[name="lastName"]',$form).val("");$('input[name="email"]',$form).val("");$('input[name="phone"]',$form).val("");$('input[name="address"]',$form).val("");$('input[name="fax"]',$form).val("");$('input[name="age"]',$form).val("");$('input[name="horsePower"]',$form).val("");$('input[name="vehicleValue"]',$form).val("");cf.reset()};$form.validationEngine({firstName:{required:"firstname-required"},lastName:{required:"lastname-required"},phone:{required:"phone-required"},address:{required:"address-required"},age:{required:"age-required"},horsePower:{required:"horsePower-required"},vehicleValue:{required:"vehicleValue-required"},email:{required:"email-required",isEmail:"email-invalid"}});cf=$form.data("validationEngine");$form.on("click",".js-Insurance-submit-button",function(e){e.preventDefault();e.stopPropagation();formData.sfakianakisAEBE=$("#sfakianakisAEBE",$form)[0].checked;formData.sfakianakisAEBEGroup=$("#sfakianakisAEBEGroup",$form)[0].checked;formData.emailcheckbox=$("#emailconsent",$form)[0].checked;formData.phonecheckbox=$("#phoneconsent",$form)[0].checked;formData.postcheckbox=$("#post",$form)[0].checked;formData.smscheckbox=$("#sms",$form)[0].checked;var $errorSpan=$(".form-row.checkbox .error-wrapper span");cf.validate()&&$("#contact-agreement").is(":checked")?($errorSpan.removeClass("error"),form.submit()):$("#contact-agreement").is(":checked")?$errorSpan.removeClass("error"):$errorSpan.addClass("error")});$form.on("keyup","input[name], textarea[name]",function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();$submitButton.click();return}var $this=$(this),fieldName=$this.attr("name");formData[fieldName]=$this.val();cf.validate(fieldName)});$form.on("click",'label[for="contact-agreement"]',function(){var $this=$(this),$checkbox=$this.closest(".stylish-checkbox"),$errorMsg=$(".error-wrapper span",$checkbox);$("input",$checkbox).is(":checked")?$errorMsg.addClass("error"):$errorMsg.removeClass("error")});stylishSelectHandler();Vendd.MessageBus.subscribe(Vendd.Insurance.Messages.SubmitSuccess,form,form.onSuccess);Vendd.MessageBus.subscribe(Vendd.Insurance.Messages.SubmitFailure,form,form.onFailure)}}),Vendd.Scripts.load(function(){function stylishCheckboxHandler(){$.each($(".stylish-checkbox"),function(i,wrapper){var $checkbox=$(wrapper);$("label",$checkbox).on("click",function(){var $this=$(this);$("input",$checkbox).is(":checked")?$this.removeClass("checked"):$this.addClass("checked")})})}var $wrappers=$(".stylish-checkbox, .stylish-radio-group");$wrappers.length<1||stylishCheckboxHandler()}),Vendd.Scripts.load(function(){var $wrapper=$(".x-select-year-menu");$wrapper.length<1||(initYearDropDown(),initVisibleYear(),initInvisibleYear())}),Vendd.Scripts.load(function(){function initNavBoxWidth(){var count=$(".nav-list li").length,width;count>0&&(width=(100/count).toString()+"%");$("li",".nav-list").each(function(){var $this=$(this);$this.css("width",width)})}function triggerNavBoxClick(){$wrapper.on("click",".js-year",function(e){e.preventDefault();var $this=$(this),$href=$(this).attr("href");$(".selected",$wrapper).removeClass("selected");$wrapper.addClass("loading").find(".form-loading").show();$this.closest("li").addClass("selected");window.location.href=$href})}var $wrapper=$(".x-financial-time-navigator");$wrapper.length<1||(initNavBoxWidth(),triggerNavBoxClick())}),Vendd.Scripts.load(function(){function initOwlSlider(container,options){var countImgs,opts;if($(container).length>0){var $wrapper=$(container).closest(".x-slider"),timeout=$wrapper.data("timeout")?$wrapper.data("timeout"):!1,speed=$wrapper.data("speed")?$wrapper.data("speed"):600;if(!$wrapper.data("init"))return;countImgs=$(container).children("li");countImgs.length>=1&&(owlButtonsWidth=countImgs.length*20+60);countImgs.length>=2&&(opts=$.extend({},defOptions,options),container.owlCarousel(opts))}}function firstInit(){var owlObj=$(this),prev=owlObj[0].buttonPrev,next=owlObj[0].buttonNext;prev.addClass("nav");next.addClass("nav")}function firstInitCentered(){var owlObj=$(this),prev=owlObj[0].buttonPrev,next=owlObj[0].buttonNext;prev.addClass("nav");next.addClass("nav");prev.parent().css("width",owlButtonsWidth+"px")}var defOptions={navigation:!0,pagination:!0,items:3,slideSpeed:600,scrollPerPage:!0,paginationSpeed:600,addClassActive:!0,navigationText:["<span class='icon icon-left-arrow'><\/span>","<span class='icon icon-right-arrow'><\/span>"],autoPlay:!1,lazyLoad:!1};initOwlSlider($(".home-page .x-slider > ul"),{singleItem:!0,rewindSpeed:1500,pagination:!0,navigation:!0,transitionStyle:"fade",autoPlay:6e3,mouseDrag:!0,touchDrag:!0,stopOnHover:!0,rewindNav:!0,addClassActive:!0,afterInit:firstInitCentered});initOwlSlider($(".category-list-page .x-slider > ul"),{singleItem:!0,rewindSpeed:1500,pagination:!0,navigation:!0,transitionStyle:"fade",autoPlay:6e3,mouseDrag:!0,touchDrag:!0,stopOnHover:!0,rewindNav:!0,addClassActive:!0,afterInit:firstInitCentered});initOwlSlider($(".offer-brand-details-page .x-slider > ul"),{singleItem:!0,rewindSpeed:1500,pagination:!0,navigation:!0,transitionStyle:"fade",autoPlay:6e3,mouseDrag:!0,touchDrag:!0,stopOnHover:!0,rewindNav:!0,addClassActive:!0,afterInit:firstInitCentered});initOwlSlider($(".landing-page-volvo-v40 .x-slider > ul"),{singleItem:!0,rewindSpeed:1500,pagination:!0,navigation:!0,transitionStyle:"fade",autoPlay:6e3,mouseDrag:!0,touchDrag:!0,stopOnHover:!0,rewindNav:!0,addClassActive:!0,afterInit:firstInitCentered});initOwlSlider($(".news-slider > ul"),{singleItem:!0,rewindSpeed:1500});initOwlSlider($(".x-slider.pager-like-slider"),{singleItem:!0,afterInit:firstInit,rewindNav:!1,navigationText:['<span class="icm icon-left-arrow"><\/span> <span class="text">'+$(".x-slider.pager-like-slider").data("literal-prev")+"<\/span>",'<span class="text">'+$(".x-slider.pager-like-slider").data("literal-next")+'<\/span> <span class="icm icon-right-arrow"><\/span>']})}),Vendd.Scripts.load(function(){var $wrapper=$(".side-menu"),wrapper,mobileDevice;if(!($wrapper.length<1)){wrapper=$wrapper.get(0);mobileDevice=$(window).width()<=959?!0:!1;wrapper.open=function(){$(".mobile-button",$wrapper).addClass("open").parent().find("> .menu-content").stop(!0,!0).slideDown(400)};wrapper.close=function(){$(".mobile-button",$wrapper).removeClass("open").parent().find("> .menu-content").stop(!0,!0).slideUp(400)};wrapper.toDesktop=function(mobileButton){mobileButton.removeClass("open").parent().find("> .menu-content").slideDown(1)};wrapper.toMobile=function(mobileButton){mobileButton.removeClass("open").parent().find("> .menu-content").slideUp(1)};wrapper.reverseDesktopMobile=function(mobileDevice){$(window).on("resize",function(){var win=$(this);win.width()>959?mobileDevice&&($(".mobile-button",$wrapper).each(function(){wrapper.toDesktop($(this))}),mobileDevice=!1):mobileDevice||($(".mobile-button",$wrapper).each(function(){wrapper.toMobile($(this))}),mobileDevice=!0)})};wrapper.reverseDesktopMobile(mobileDevice);$wrapper.on("click",".mobile-button",function(e){e.preventDefault();var $this=$(this);$this.hasClass("open")?wrapper.close():wrapper.open()});$(document).click(function(event){var $mobileButton=$(".mobile-button",$wrapper);$(window).width()<=959&&($(event.target).closest(".side-menu").length||$(event.target).is(".side-menu")||$mobileButton.hasClass("open")&&wrapper.close())})}}),Vendd.Scripts.load(function(){function loadAddThis(){try{addthis.init()}catch(ex){}}loadAddThis()}),typeof Handlebars!="object")throw new Error("Handlebars.js not included.");if(Handlebars.partials.storeLocatorStores=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='\n<div class="results-counter">\n <span class="label">'+escapeExpression((helper=(helper=helpers.TotalCount||(depth0!=null?depth0.TotalCount:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"TotalCount",hash:{},data:data}):helper))+'<\/span> \n <span class="value">'+escapeExpression((helper=(helper=helpers.ResultsText||(depth0!=null?depth0.ResultsText:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"ResultsText",hash:{},data:data}):helper))+'<\/span>\n<\/div>\n\n<div class="stores-list-container">\n\t<div class="nano stores">\n\t <div class="nano-content">\n';return stack1=helpers["if"].call(depth0,depth0!=null?depth0.TotalCount:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+"\t <\/div>\n\t<\/div>\n<\/div>\n"},"1":function(depth0,helpers,partials,data){var stack1,buffer='\t\t\t<ul class="items-list x-partner-list">\n';return stack1=helpers.each.call(depth0,depth0!=null?depth0.Items:depth0,{name:"each",hash:{},fn:this.program(2,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+"\t\t\t<\/ul>\n"},"2":function(depth0,helpers,partials,data){var stack1,buffer="";return stack1=helpers.each.call(depth0,depth0,{name:"each",hash:{},fn:this.program(3,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer},"3":function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression,buffer='\t\t\t <li class="item item'+escapeExpression(lambda(data&&data.index,depth0))+" ";return stack1=helpers["if"].call(depth0,depth0!=null?depth0.Even:depth0,{name:"if",hash:{},fn:this.program(4,data),inverse:this.program(6,data),data:data}),stack1!=null&&(buffer+=stack1),buffer+=" ",stack1=helpers["if"].call(depth0,data&&data.first,{name:"if",hash:{},fn:this.program(8,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+=" ",stack1=helpers["if"].call(depth0,data&&data.last,{name:"if",hash:{},fn:this.program(10,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+='" data-index="'+escapeExpression(lambda(data&&data.index,depth0))+'">\n',stack1=this.invokePartial(partials.partnerBox,"\t\t\t ","partnerBox",depth0,undefined,helpers,partials,data),stack1!=null&&(buffer+=stack1),buffer+"\t\t\t <\/li>\n"},"4":function(){return"even"},"6":function(){return"odd"},"8":function(){return"first"},"10":function(){return"last"},usePartial:!0,useData:!0}),typeof Handlebars!="object")throw new Error("Handlebars.js not included.");if(Handlebars.partials.partnerBox=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='<article class="x-control x-box x-partner-box"\n data-control="box"\n data-latitude="'+escapeExpression((helper=(helper=helpers.Latitude||(depth0!=null?depth0.Latitude:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Latitude",hash:{},data:data}):helper))+'"\n data-longitude="'+escapeExpression((helper=(helper=helpers.Longitude||(depth0!=null?depth0.Longitude:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Longitude",hash:{},data:data}):helper))+'">\n\n <div style="display: none;" class="box-info" data-latitude="'+escapeExpression((helper=(helper=helpers.Latitude||(depth0!=null?depth0.Latitude:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Latitude",hash:{},data:data}):helper))+'" data-longitude="'+escapeExpression((helper=(helper=helpers.Longitude||(depth0!=null?depth0.Longitude:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Longitude",hash:{},data:data}):helper))+'">\n <div class="x-map-info-box">\n <header class="header">\n';return stack1=helpers["if"].call(depth0,depth0!=null?depth0.Image:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+=' <div class="text-container">\n <h3 class="title">'+escapeExpression((helper=(helper=helpers.Name||(depth0!=null?depth0.Name:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Name",hash:{},data:data}):helper))+'<\/h3>\n <span class="subtitle">'+escapeExpression((helper=(helper=helpers.Subtitle||(depth0!=null?depth0.Subtitle:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Subtitle",hash:{},data:data}):helper))+'<\/span>\n <\/div>\n <\/header>\n <ul>\n <li class="info-item address-one">\n <span class="icm icon-pin"><\/span>\n '+escapeExpression((helper=(helper=helpers.AddressLine1||(depth0!=null?depth0.AddressLine1:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"AddressLine1",hash:{},data:data}):helper))+" "+escapeExpression((helper=(helper=helpers.PostalCode||(depth0!=null?depth0.PostalCode:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"PostalCode",hash:{},data:data}):helper))+"<\/br>\n "+escapeExpression((helper=(helper=helpers.Area||(depth0!=null?depth0.Area:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Area",hash:{},data:data}):helper))+", "+escapeExpression((helper=(helper=helpers.City||(depth0!=null?depth0.City:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"City",hash:{},data:data}):helper))+"\n <\/li>\n\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.OpeningHoursExhibition:depth0,{name:"if",hash:{},fn:this.program(3,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+="\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.OpeningHoursService:depth0,{name:"if",hash:{},fn:this.program(5,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+="\n\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.Phone:depth0,{name:"if",hash:{},fn:this.program(7,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+=' <\/ul>\n <\/div>\n <\/div>\n\n <header class="partner-title-container">\n <h3 class="title">'+escapeExpression((helper=(helper=helpers.Name||(depth0!=null?depth0.Name:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Name",hash:{},data:data}):helper))+'<\/h3>\n\n <span class="js-partner-box-toggle expanded icm icon-minus"><\/span>\n <span class="js-partner-box-toggle no-expanded icm icon-plus"><\/span>\n <\/header>\n\n <ul class="sliding-content">\n <li class="info-item address-one">\n '+escapeExpression((helper=(helper=helpers.AddressLine1||(depth0!=null?depth0.AddressLine1:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"AddressLine1",hash:{},data:data}):helper))+" "+escapeExpression((helper=(helper=helpers.PostalCode||(depth0!=null?depth0.PostalCode:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"PostalCode",hash:{},data:data}):helper))+"<\/br>\n "+escapeExpression((helper=(helper=helpers.Area||(depth0!=null?depth0.Area:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Area",hash:{},data:data}):helper))+", "+escapeExpression((helper=(helper=helpers.City||(depth0!=null?depth0.City:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"City",hash:{},data:data}):helper))+"\n <\/li>\n\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.Phone:depth0,{name:"if",hash:{},fn:this.program(9,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+="\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.Fax:depth0,{name:"if",hash:{},fn:this.program(11,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+="\n",stack1=helpers["if"].call(depth0,depth0!=null?depth0.Email:depth0,{name:"if",hash:{},fn:this.program(13,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer+'\n <li class="info-item clickable highlighted map js-show-on-map"><span class="icm icon-pin"><\/span>'+escapeExpression((helper=(helper=helpers.MapText||(depth0!=null?depth0.MapText:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"MapText",hash:{},data:data}):helper))+"<\/li>\n\n <\/ul>\n<\/article>"},"1":function(depth0,helpers,partials,data){var helper,helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' <figure class="image-container restricted">\n <img src="'+escapeExpression((helper=(helper=helpers.Image||(depth0!=null?depth0.Image:depth0))!=null?helper:helperMissing,typeof helper=="function"?helper.call(depth0,{name:"Image",hash:{},data:data}):helper))+'" />\n <\/figure>\n'},"3":function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer=' <li class="info-item address-one">\n <div>'+escapeExpression((helper=(helper=helpers.ExhibitionText||(depth0!=null?depth0.ExhibitionText:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"ExhibitionText",hash:{},data:data}):helper))+"<\/div>\n <div>";return stack1=(helper=(helper=helpers.OpeningHoursExhibition||(depth0!=null?depth0.OpeningHoursExhibition:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"OpeningHoursExhibition",hash:{},data:data}):helper),stack1!=null&&(buffer+=stack1),buffer+"<\/div>\n <\/li>\n"},"5":function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer=' <li class="info-item address-one">\n <div>'+escapeExpression((helper=(helper=helpers.ServiceText||(depth0!=null?depth0.ServiceText:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"ServiceText",hash:{},data:data}):helper))+"<\/div>\n <div>";return stack1=(helper=(helper=helpers.OpeningHoursService||(depth0!=null?depth0.OpeningHoursService:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"OpeningHoursService",hash:{},data:data}):helper),stack1!=null&&(buffer+=stack1),buffer+"<\/div>\n <\/li>\n"},"7":function(depth0,helpers,partials,data){var helper,helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' <li class="info-item phone">\n <span class="icm icon-phone"><\/span>\n '+escapeExpression((helper=(helper=helpers.Phone||(depth0!=null?depth0.Phone:depth0))!=null?helper:helperMissing,typeof helper=="function"?helper.call(depth0,{name:"Phone",hash:{},data:data}):helper))+"\n <\/li>\n"},"9":function(depth0,helpers,partials,data){var helper,helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' <li class="info-item phone"><span class="icm icon-phone"><\/span>'+escapeExpression((helper=(helper=helpers.Phone||(depth0!=null?depth0.Phone:depth0))!=null?helper:helperMissing,typeof helper=="function"?helper.call(depth0,{name:"Phone",hash:{},data:data}):helper))+"<\/li>\n"},"11":function(depth0,helpers,partials,data){var helper,helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' <li class="info-item fax"><span class="icm icon-print"><\/span>'+escapeExpression((helper=(helper=helpers.Fax||(depth0!=null?depth0.Fax:depth0))!=null?helper:helperMissing,typeof helper=="function"?helper.call(depth0,{name:"Fax",hash:{},data:data}):helper))+"<\/li>\n"},"13":function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' <li class="info-item email"><span class="icm icon-mail"><\/span><a href="mailto:'+escapeExpression((helper=(helper=helpers.Email||(depth0!=null?depth0.Email:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Email",hash:{},data:data}):helper))+'">'+escapeExpression((helper=(helper=helpers.Email||(depth0!=null?depth0.Email:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Email",hash:{},data:data}):helper))+"<\/a><\/li>\n"},useData:!0}),typeof Handlebars!="object")throw new Error("Handlebars.js not included.");Handlebars.partials.storefiltersDropdownOptions=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,buffer="";return stack1=helpers.each.call(depth0,depth0!=null?depth0.Values:depth0,{name:"each",hash:{},fn:this.program(1,data),inverse:this.noop,data:data}),stack1!=null&&(buffer+=stack1),buffer},"1":function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return'<li>\n\t<span data-value="'+escapeExpression((helper=(helper=helpers.Id||(depth0!=null?depth0.Id:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Id",hash:{},data:data}):helper))+'" data-name="'+escapeExpression((helper=(helper=helpers.Name||(depth0!=null?depth0.Name:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Name",hash:{},data:data}):helper))+'" class="option js-option-filter">'+escapeExpression((helper=(helper=helpers.Name||(depth0!=null?depth0.Name:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"Name",hash:{},data:data}):helper))+"<\/span>\n<\/li>\n"},useData:!0});Vendd.Scripts.load(function(){function scrollToMap(){var $wrapper=$(".contact-page");$wrapper.length<1||$(".find-us-on-map",$wrapper).click(function(){$("body, html").animate({scrollTop:$(".js-scroll-to",$wrapper).offset().top},600)})}scrollToMap();var showMap=function(){var $page=$(".contact-page"),$partner,$map,opts;$page.length<1||($partner=$(".x-partner",$page),$map=$(".x-google-map",$page),$map.length<1||$partner.length<1)||(opts={lat:$partner.data("latitude"),lng:$partner.data("longitude"),html:$(".box-info",$partner).html()},$map.get(0).create([opts]))};Vendd.MessageBus.subscribe(Vendd.Plugins.Messages.GoogleMapsLoaded,"contactMap",showMap)});Vendd.Scripts.load(function(){var $wrapper=$(".sitemap-page"),wrapper;$wrapper.length<1||(wrapper=$wrapper.get(0),$(".grid-container").masonry({columnWidth:".grid-sizer",itemSelector:".box"}))});Vendd.Scripts.load(function(){$(".after-sales-brand-page").length<1||scrollToSection()});LhApp=LhApp||{};LhApp.Function={};LhApp.Function.Url={};LhApp.Function.QueryString={};LhApp.Function.String={},function($){$.fn.findUntil=function(itemSelector,innerSelector){var items=this.find(itemSelector),children=this.find(innerSelector),result=[];return $.each($(items),function(i,item){for(var cl=$(item).closest(innerSelector),check=!0,ch,j=0;j<children.length;j++)if(ch=children[j],ch==cl.get()[0]){check=!1;break}check&&result.push(item)}),$(result)}}(jQuery);LhApp.Function.Url.getServiceEndpoint=function(url){var rewritedUrl=LhApp.Context.Request.BaseUrl+"/services/";if(LhApp.Context.Request.IsSecure&&(rewritedUrl+="secure/"),rewritedUrl+=url,LhApp.Context.Request.FriendlyUrl.indexOf("?")!=-1){var queryString="",initialQueryString=LhApp.Context.Request.FriendlyUrl.substring(LhApp.Context.Request.FriendlyUrl.indexOf("?")+1),iid=LhApp.Function.QueryString.getValueOf("iid",LhApp.Context.Request.RawUrl);iid!=""?queryString="iid="+iid:LhApp.Context.Item&&LhApp.Context.Item.Id&&(queryString="iid="+LhApp.Context.Item.Id);initialQueryString.length>0&&(queryString+="&"+initialQueryString);queryString=rewritedUrl.indexOf("?")==-1?"?"+queryString:"&"+queryString;rewritedUrl+=queryString}return rewritedUrl};LhApp.Function.QueryString.getValueOf=function(parameterKey,url){var parameters,i,pair;url=url||window.location.href;var parameterValue="",queryString="",hasQueryString=url.indexOf("?")>-1;if(hasQueryString&&(queryString=url.substring(url.indexOf("?")+1)),parameters=queryString.split("&"),queryString.indexOf(parameterKey)>=0)for(i=0;i<parameters.length;i++)pair=parameters[i].split("="),pair[0]==parameterKey&&(parameterValue=pair[1]);return parameterValue};LhApp.Function.Url.setParameterValue=function(parameterKey,parameterValue){var url=window.location.href;return this.setParameterValueOnUrl(url,parameterKey,parameterValue)};LhApp.Function.Url.setParameterValueOnUrl=function(url,parameterKey,parameterValue){var queryString="",hasQueryString=url.indexOf("?")>-1,parameters,i,pair;if(hasQueryString&&(queryString=url.substring(url.indexOf("?")+1)),parameters=queryString.split("&"),queryString.indexOf(parameterKey)>=0){for(i=0;i<parameters.length;i++)pair=parameters[i].split("="),pair[0]==parameterKey&&(parameters[i]=pair[0]+"="+parameterValue);queryString=parameters.join("&")}else queryString+=hasQueryString?"&"+parameterKey+"="+parameterValue:"?"+parameterKey+"="+parameterValue;return hasQueryString?url.substring(0,url.indexOf("?")+1)+queryString:url+queryString};LhApp.Function.Url.removeParameter=function(parameterKey){var url=window.location.href,parameterKeys=[parameterKey];return this.removeParametersFromUrl(url,parameterKeys)};LhApp.Function.Url.removeParameterFromUrl=function(url,parameterKey){var parameterKeys=[parameterKey];return this.removeParametersFromUrl(url,parameterKeys)};LhApp.Function.Url.removeParameters=function(parameterKeys){var url=window.location.href;return this.removeParametersFromUrl(url,parameterKeys)};LhApp.Function.Url.removeParametersFromUrl=function(url,parameterKeys){var newUrl=url;return $.each(parameterKeys,function(index,parameterKey){var queryString="",hasQueryString=newUrl.indexOf("?")>-1,parameters,i,pair;if(hasQueryString&&(queryString=newUrl.substring(newUrl.indexOf("?")+1),parameters=queryString.split("&"),queryString.indexOf(parameterKey)>=0)){for(i=0;i<parameters.length;i++)pair=parameters[i].split("="),pair[0]==parameterKey&¶meters.splice(i,1);queryString=parameters.join("&");newUrl=queryString!=""?newUrl.substring(0,newUrl.indexOf("?")+1)+queryString:newUrl.substring(0,newUrl.indexOf("?"))+queryString}}),newUrl};LhApp.Function.getResourceText=function(key){var result=key;return $.ajax({async:!1,type:"POST",dataType:"json",contentType:"application/json; charset=UTF-8",ContentType:"application/json; charset=UTF-8",url:LhApp.Function.Url.getServiceEndpoint("commonservice.svc/GetTranslatableResource"),data:JSON.stringify({key:key}),success:function(response){result=response.d}}),result};LhApp.Function.String.isEmail=function(text){return/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,20}$/i.test(text)};LhApp.Function.String.isAlphaNumeric=function(text){return text.match(/^[0-9a-zA-Z]+$/)||!1};LhApp.Function.hideExpandables=function(wrapper){var $expandables=$("*[data-expandablecontainer].x-expanded:not(.x-loading)",$(wrapper));$expandables.each(function(i,item){var $expandable=$(item);$expandable.removeClass("x-expanded");$('*[data-expandabletrigger="'+$expandable.data("expandablecontainer")+'"].x-open',$(wrapper)).removeClass("x-open")})};LhApp.Function.bindUndropables=function(wrapper){var $wrapper=$(wrapper),$undropableElements=$("*[data-undropable]",$wrapper);$undropableElements.on("drop",function(e){typeof e.preventDefault=="function"&&e.preventDefault()})};LhApp.Function.bindExpandables=function(wrapper){var $wrapper=$(wrapper),$expandableContainers=$("*[data-expandablecontainer]",$wrapper),$triggers;$expandableContainers.click(function(e){e.stopPropagation()});$triggers=$("*[data-expandabletrigger]",$wrapper);$triggers.each(function(i,item){var $trigger=$(item),triggerValue=$trigger.data("expandabletrigger"),$expandableContainer=$('*[data-expandablecontainer="'+triggerValue+'"]',$wrapper),$triggers=$('*[data-expandabletrigger="'+triggerValue+'"]',$wrapper);$expandableContainer.length>0&&($triggers.unbind("click"),$triggers.click(function(e){e.preventDefault();e.stopPropagation();$("*[data-expandablecontainer].x-expanded").each(function(w,wItem){var wItemContainer=$(wItem).data("expandablecontainer");wItemContainer!=triggerValue&&($(wItem).removeClass("x-expanded"),$('*[data-expandabletrigger="'+wItemContainer+'"].x-open').removeClass("x-open"))});$expandableContainer.hasClass("x-expanded")?($expandableContainer.removeClass("x-expanded"),$triggers.removeClass("x-open")):($expandableContainer.addClass("x-expanded"),$triggers.addClass("x-open"),EventManager.trigger("lazyload"))}))})};LhApp.Function.isButtonDisabled=function(buttonWrapper){var isDisabled=!1,$internalButton;return $(buttonWrapper).get(0).tagName.toLowerCase()=="input"?$(buttonWrapper).is(":disabled")&&(isDisabled=!0):($internalButton=$(buttonWrapper).find("input:button"),$internalButton.length>0?$internalButton.is(":disabled")&&(isDisabled=!0):$(buttonWrapper).hasClass("x-disabled")&&(isDisabled=!0)),isDisabled};LhApp.Function.bindHrefButtons=function(wrapper){$("*[data-href]",$(wrapper)).click(function(e){e!==undefined&&typeof e.preventDefault=="function"&&e.preventDefault();var isDisabled=LhApp.Function.isButtonDisabled(this);isDisabled?e.preventDefault():document.location=$(this).data("href")})};LhApp.Function.bindScrollable=function(wrapper){$("*[data-scroll-to]",$(wrapper)).click(function(){var $this=$(this),element=$this.data("scroll-to"),time=$this.data("scroll-time"),offset=$this.data("scroll-offset"),time=typeof time=="undefined"||time==""?600:time,offset=typeof offset=="undefined"||offset==""?-10:offset;element!=""&&(element=="top"&&$("html, body").animate({scrollTop:0},time),element=="bottom"&&$("html, body").animate({scrollTop:$("body").height()},time),$(element).length>0&&$("html, body").animate({scrollTop:$(element).offset().top+offset},time))})};LhApp.Function.bindLazyLoadableImages=function(wrapper){var $selectedWrapper;$selectedWrapper=$(wrapper).data("lazy-load-init")?$(wrapper):$("*[data-lazy-load-init]",$(wrapper));$selectedWrapper.each(function(i,innerWrapper){var $innerWrapper=$(innerWrapper),$lazyLoadOptions=$('*[data-input="lazy-load-options"]',$innerWrapper),initLazyLoad=$innerWrapper.data("lazy-load-init"),opts,defOptions,$images;initLazyLoad&&(opts={},defOptions={effect:"fadeIn"},$lazyLoadOptions.length==1?$.extend(!0,opts,defOptions,JSON.parse($lazyLoadOptions.val())):$.extend(!0,opts,defOptions),$images=$("img[data-lazyload]",$innerWrapper),$images.length>0&&typeof $.fn.lazyload=="function"&&$($images,$innerWrapper).lazyload(opts));$lazyLoadOptions.length>0&&$lazyLoadOptions.remove()});$.inArray("lazyload",EventManager.events)==-1&&EventManager.bind("lazyload",function(){$(window).trigger("lazyload")})};LhApp.Function.PageTrackingRequest=function(){var qstr=LhApp.Context.Request.RawUrl.substring(LhApp.Context.Request.RawUrl.indexOf("?")+1),dataItem={querystring:qstr,cookie:document.cookie};LhApp.Function.wcf("MarkService.svc/PageTracking",{query:dataItem},function(request,response){for(var cookies=JSON.parse(response.data.d),i=0;i<cookies.length;i++)document.cookie=cookies[i].Name+"="+cookies[i].Value+"; expires="+cookies[i].Expires+"; path="+cookies[i].Path})};LhApp.Function.MailChimpEcommerce360Tracking=function(cId,eId){LhApp.Function.wcf("MarkService.svc/MailChimpEcommerce360Tracking",{campaignId:cId,emailId:eId},function(request,response){var result=JSON.parse(response.data.d)})};LhApp.Function.wcf=function(url,data,responseFn){var fullUrl=LhApp.Function.Url.getServiceEndpoint(url),internalData={};data!==undefined&&data!=null&&typeof data=="object"&&(internalData=data);$.ajax({async:!0,type:"POST",dataType:"json",contentType:"application/json; charset=UTF-8",ContentType:"application/json; charset=UTF-8",url:fullUrl,data:JSON.stringify(internalData),success:function(response){if(response.d.__type!==undefined&&response.d.__type.startsWith("ServiceResponseOf"))typeof responseFn=="function"&&responseFn(data,response.d);else{var responseD={code:"OperationSuccessful",success:!0,time:0,data:response};typeof responseFn=="function"&&responseFn(internalData,responseD)}},failure:function(ex){var response={code:"GenericError",success:!1,time:0};response.data=ex.responseText?jQuery.parseJSON(ex.responseText):ex;typeof responseFn=="function"&&responseFn(internalData,response)},error:function(ex){var response={code:"GenericError",success:!1,time:0};response.data=ex.responseText?jQuery.parseJSON(ex.responseText):ex;typeof responseFn=="function"&&responseFn(internalData,response)}})};LhApp.Function.applyExchangeRate=function(price){return LhApp.Function.applyExchangeRateExtended(price,LhApp.Context.Currency.ExchangeRate)};LhApp.Function.applyExchangeRateExtended=function(price,rate){return price*rate};LhApp.Function.handleItemStatistics=function(){var itemStatisticsDataArray=[];$('.x-control[data-manipulate-stats="true"]').each(function(i,control){var $control=$(control),itemId=$control.data("stats-itemid"),action=$control.data("stats-action"),data={ItemId:itemId,Action:action};$.inArray(data,itemStatisticsDataArray)==-1&&itemStatisticsDataArray.push(data)});itemStatisticsDataArray.length>0&&LhApp.Function.wcf("StatsService.svc/ManipulateItemStatistics",{data:itemStatisticsDataArray},function(){})};RenderPrice=function(price){return LhApp.Function.renderPriceExtended(price,!1," ","","")};RenderPriceExtended=function(price,isShopDefaultCurrency,separatorSymbol,prefixSymbol,suffixSymbol){return LhApp.Function.renderPriceExtended(price,isShopDefaultCurrency,separatorSymbol,prefixSymbol,suffixSymbol)};LhApp.Function.renderPrice=function(price){return LhApp.Function.renderPriceExtended(price,!1," ","","")};LhApp.Function.renderPriceExtended=function(price,isShopDefaultCurrency,separatorSymbol,prefixSymbol,suffixSymbol){var symbol=LhApp.Context.Currency.Symbol,numberOfDigits=LhApp.Context.Currency.NumberOfDigits,symbolShownFirst=LhApp.Context.Currency.SymbolShownFirst,doShowSymbol=LhApp.Context.Currency.DoShowSymbol,formatedPrice;return isShopDefaultCurrency&&(symbol=LhApp.Context.ShopDefaultCurrency.Symbol,numberOfDigits=LhApp.Context.ShopDefaultCurrency.NumberOfDigits,symbolShownFirst=LhApp.Context.ShopDefaultCurrency.SymbolShownFirst,doShowSymbol=LhApp.Context.ShopDefaultCurrency.DoShowSymbol),formatedPrice=price.toFixed(numberOfDigits).replace(".",","),doShowSymbol&&(formatedPrice=symbolShownFirst?symbol+separatorSymbol+formatedPrice:formatedPrice+separatorSymbol+symbol),prefixSymbol!=""&&(formatedPrice=prefixSymbol+separatorSymbol+formatedPrice),suffixSymbol!=""&&(formatedPrice=formatedPrice+separatorSymbol+suffixSymbol),formatedPrice};RenderPointsPrice=function(pointsPrice){return LhApp.Function.renderPointsPriceExtended(pointsPrice,","," ","","")};RenderPointsPriceExtended=function(pointsPrice,commaSymbol,separatorSymbol,prefixSymbol,suffixSymbol){return LhApp.Function.renderPointsPriceExtended(pointsPrice,commaSymbol,prefixSymbol,suffixSymbol)};LhApp.Function.renderPointsPriceExtended=function(pointsPrice,commaSymbol,separatorSymbol,prefixSymbol,suffixSymbol){suffixSymbol==""&&(suffixSymbol=pointsPrice===1?"point":"points");var innerSuffixSymbol=suffixSymbol.length>1?" "+LhApp.Resource.getText("Common:PointsPriceSymbol_"+suffixSymbol):suffixSymbol,formatedPrice=pointsPrice.toFixed(2).replace(".00","").replace(".",commaSymbol);return prefixSymbol!=""&&(formatedPrice=prefixSymbol+separatorSymbol+formatedPrice),innerSuffixSymbol!=""&&(formatedPrice=formatedPrice+separatorSymbol+innerSuffixSymbol),formatedPrice};LhApp.Function.productAddToCart=function(dataItem){LhApp.Function.wcf("EcomService.svc/AddToCart",{item:dataItem},function(request,response){response.success&&($('.x-cart-widget[data-expandable="true"]').length>0?($("html, body").animate({scrollTop:$(".x-cart-widget:first").offset().top},1500),LhApp.pauseScroll=!0,setTimeout(function(){LhApp.pauseScroll=!1},2e3),$(".x-cart-widget:first").get(0).showLoader(),$(".x-cart-widget:first").get(0).expand(),EventManager.trigger("cartchange")):document.location=LhApp.Url.Page.Cart)})};LhApp.Function.productAddToWishlist=function(dataItem){$.extend(dataItem,{qty:1});LhApp.Function.wcf("EcomService.svc/AddToWishlist",{item:dataItem},function(request,response){response.success&&($('.x-wishlist-widget[data-expandable="true"]').length>0?($("html, body").animate({scrollTop:$(".x-wishlist-widget:first").offset().top},1500),LhApp.pauseScroll=!0,setTimeout(function(){LhApp.pauseScroll=!1},2e3),$(".x-wishlist-widget:first").get(0).showLoader(),$(".x-wishlist-widget:first").get(0).expand(),EventManager.trigger("wishlistchange")):document.location=LhApp.Url.Page.Wishlist)})};LhApp.Function.notifyEndUser=function(message,type,otps){LhApp.Function.notifyEndUser(message,type,"",otps)};LhApp.Function.notifyEndUser=function(message,type,selector,otps){var innerMessage;if(typeof $.notify!="undefined"&&(innerMessage=message||"",innerMessage!="")){var innerSelector=selector||"",innerType=type||"info",innerOtps=$.extend({},otps||{});innerOtps!={}&&$.notify.defaults(innerOtps);typeof innerSelector=="string"&&innerSelector==""?$.notify(message,innerType):typeof innerSelector=="string"?$(innerSelector).notify(message,innerType):typeof innerSelector=="object"&&innerSelector instanceof jQuery&&innerSelector.notify(message,innerType)}};LhApp.Function.validateTaxIdentifier=function(isInvoice,countryCode,taxIdentifier){var result,arrTaxId,i;if(isInvoice===!0&&taxIdentifier.length>0)if(countryCode==="GR"){if(!isNaN(parseInt(taxIdentifier))&&taxIdentifier.length===9){for(result=0,arrTaxId=taxIdentifier.split("").map(function(item){return parseInt(item)}),i=arrTaxId.length-2;i>=0;i--)result=result+arrTaxId[i]*Math.pow(2,8-i);if(result%11%10===arrTaxId[8])return!0}}else return!0;return!1};LhApp.pauseScroll=!1;LhApp.initControl=function(control){LhApp.Function.bindScrollable(control);LhApp.Function.bindExpandables(control);LhApp.Function.bindHrefButtons(control);LhApp.Function.bindUndropables(control);LhApp.Function.bindLazyLoadableImages(control);var $control=$(control);$control.hasClass("x-form")&&$control.data("control")=="form"&&(Forms.HookFormsFn($control),$control.data("ajax")&&Forms.HookAjaxFormsFn($control))};LhApp.init=function(){LhApp.Function.bindScrollable($("body").get(0));LhApp.Function.bindExpandables($("body").get(0));LhApp.Function.bindHrefButtons($("body").get(0));LhApp.Function.bindUndropables($("body").get(0));LhApp.Function.bindLazyLoadableImages($("body").get(0));LhApp.Function.PageTrackingRequest();LhApp.Function.handleItemStatistics();$("body").click(function(){LhApp.Function.hideExpandables(this)});$(document).scroll(function(){LhApp.pauseScroll||LhApp.Function.hideExpandables($("body").get(0))})};disqus_config=function(){LhApp.Context.Item.Id&&LhApp.Context.Request.FriendlyUrl&&(this.page.url=LhApp.Context.Request.BaseUrl+LhApp.Context.Request.FriendlyUrl,this.page.identifier=LhApp.Context.Item.Id)};$(document).ready(function(){Vendd.Scripts.init()});var fancyOverlayColor="#fff",fancyOverlayOpacity=.75,rating=4.3;$(document).ready(function(){function initMyAccountFunctions(){typeof InitMyAccountFunctions=="function"&&InitMyAccountFunctions()}function initCheckoutFunction(){typeof InitCheckoutFunctions=="function"&&InitCheckoutFunctions()}initMyAccountFunctions();initCheckoutFunction();initPromoPopUp();createPartnerPhoneLinks();var version=getCookie("siteVersion");$("html").hasClass("touch")?$(".site-version-container .to-desktop").show():$(".site-version-container .to-mobile").show();$(".version-button").click(function(){$("html").hasClass("touch")?setCookie("siteVersion","Desktop",365):setCookie("siteVersion","Mobile",365);window.location.href=window.location.href});scrollToFormLanding()});Vendd.Scripts.load(function(){$(".x-control.x-tab-panel").each(function(i,wrapper){$("*[data-tab-click]",$(wrapper)).click(function(){var thisTab=$(this),innerWrapper=thisTab.closest(".x-tab-panel"),thisTabIndex=thisTab.data("tab-index");thisTab.addClass("active").siblings().removeClass("active");$("li[data-tab-content-index="+thisTabIndex+"]",innerWrapper).addClass("active").siblings().removeClass("active");$(wrapper).hasClass("js-lazyload")&&typeof $.fn.lazyload=="function"&&$(wrapper).find("img").lazyload({effect:"fadeIn",threshold:50,skip_invisible:!1})})})});Vendd.Scripts.load(function(){function initCarousel(items,pager){function syncPosition(){var current=this.currentItem,owlItems=$(pager).find(".owl-item");owlItems.removeClass("synced").eq(current).addClass("synced");$(pager).data("owlCarousel")!==undefined&¢er(current)}function center(number){var sync2visible=sync2.data("owlCarousel").owl.visibleItems,num=number,found=!1,i;for(i in sync2visible)num===sync2visible[i]&&(found=!0);found===!1?num>sync2visible[sync2visible.length-1]?sync2.trigger("owl.goTo",num-sync2visible.length+2):(num-1==-1&&(num=0),sync2.trigger("owl.goTo",num)):num===sync2visible[sync2visible.length-1]?sync2.trigger("owl.goTo",sync2visible[1]):num===sync2visible[0]&&sync2.trigger("owl.goTo",num-1)}var sync1=$(items),sync2=$(pager),opts,thumbOpts;opts={singleItem:!0,slideSpeed:1e3,navigation:!0,pagination:!0,navigationText:["<span class='icon icon-left-arrow'><\/span>","<span class='icon icon-right-arrow'><\/span>"],rewindNav:!0,transitionStyle:"fade",afterAction:syncPosition,responsiveRefreshRate:200,afterInit:syncPosition};thumbOpts={items:4,itemsDesktop:[1366,4],itemsDesktopSmall:[1200,3],itemsTablet:[960,4],itemsMobile:[479,2],pagination:!1,navigation:!0,scrollPerPage:!0,navigationText:["<span class='icon icon-left-arrow'><\/span>","<span class='icon icon-right-arrow'><\/span>"],rewindNav:!1,responsiveRefreshRate:100,afterInit:function(el){var owlItems=el.find(".owl-item");owlItems.eq(0).addClass("synced")}};sync1.owlCarousel(opts);sync2.owlCarousel(thumbOpts);$(pager).on("click",".owl-item",function(e){e.preventDefault();var number=$(this).data("owlItem");sync1.trigger("owl.goTo",number)})}$(".x-photogallery.x-photogallery-carousel.document-gallery").each(function(i,wrapper){if($(wrapper).data("init")){var $wrapper=$(wrapper),$normalWrapper=$(".photogallery-normal > ul",$wrapper),$thumbsWrapper=$(".photogallery-thumbs > ul",$wrapper);initCarousel($normalWrapper[0],$thumbsWrapper[0]);$(".fancylink",$wrapper).fancybox({padding:0,margin:0,autoSize:!0,nextEffect:"none",prevEffect:"none",tpl:{wrap:'<div class="fancybox-wrap fan-1" tabIndex="-1"><div class="fancybox-skin spacer-container"><div class="fancybox-outer fan-2"><div class="fancybox-inner fan-3"><\/div><\/div><\/div><\/div>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close fancy-close icon-close" href="javascript:;"><\/a>',next:'<a title="Next" class="fancybox-nav fancybox-next fancy-nav icon-arrow-right" href="javascript:;"><span><\/span><\/a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev fancy-nav icon-arrow-left" href="javascript:;"><span><\/span><\/a>'}})}})});Vendd.Scripts.load(function(){$('.x-control.x-sortbyselector[data-control="sorter"]').each(function(i,wrapper){var $wrapper=$(wrapper),isPagerAjax=$wrapper.data("ajax"),sortSelectBox=$wrapper.find("select"),connectedListConnector,$connectedList;if(isPagerAjax){if(connectedListConnector=$wrapper.data("list"),connectedListConnector===undefined)throw"Connected list not declared for list sorter "+$wrapper.attr("id");$connectedList=$('.x-control[data-control="list"][data-list="'+connectedListConnector+'"]').first();sortSelectBox.change(function(){var selectedKey=$(this).find(":selected").data("key"),config,selectedOption;selectedKey&&(config=$connectedList.get(0).getConfiguration(),selectedOption=$.Enumerable.From(config.LoaderData.SortOptions).Where(function(x){return x.Key.toLowerCase()===selectedKey.toLowerCase()}).DefaultIfEmpty(null).FirstOrDefault(),config.LoaderData.SortBy=selectedOption,$connectedList.get(0).load(config))})}else sortSelectBox.change(function(){var targetUrl=$(this).find(":selected").data("url");targetUrl&&(document.location=targetUrl)})})});Vendd.Scripts.load(function(){$('.x-control[data-control="pager"][data-type="pageSize"]').each(function(){var $wrapper=$(this),isPagerAjax=$wrapper.data("ajax"),pageSizeSelectBox=$(this).find("select"),connectedList,$connectedList;if(isPagerAjax){if(connectedList=$wrapper.data("list"),connectedList===undefined)throw"Connected list not declared for pager "+$wrapper.attr("id");$connectedList=$('.x-control[data-control="list"][data-list="'+connectedList+'"]').first();pageSizeSelectBox.change(function(){var config=$connectedList.get(0).getConfiguration();config.LoaderData.PageSize=parseInt($(this).find(":selected").attr("value"));config.LoaderData.PageNumber=1;$connectedList.get(0).load(config)});$connectedList.get(0).bind("dataload",function(){var currentConfig=$connectedList.get(0).getConfiguration(),pageSize=currentConfig.LoaderData.PageSize,$selectBox=$wrapper.find("select");$selectBox.children('option[selected="selected"]').attr("value")!==String(pageSize)&&($selectBox.children("option").removeAttr("selected"),$selectBox.children('option[value="'+pageSize+'"]').attr("selected","selected"))})}else pageSizeSelectBox.change(function(){document.location=$(this).find(":selected").data("url")})})});Vendd.Scripts.load(function(){$('.x-control[data-control="pager"][data-type="info"]').each(function(){var $wrapper=$(this),isPagerAjax=$wrapper.data("ajax"),connectedList,$connectedList;if(isPagerAjax){if(connectedList=$wrapper.data("list"),connectedList===undefined)throw"Connected list not declared for pager "+$wrapper.attr("id");$connectedList=$('.x-control[data-control="list"][data-list="'+connectedList+'"]').first();$connectedList.get(0).bind("dataload",function(control,response){var currentConfig=$connectedList.get(0).getConfiguration(),pageNumber=currentConfig.LoaderData.PageNumber,pageSize=currentConfig.LoaderData.PageSize,pageCount=Math.ceil(response.Data.ItemsCount/pageSize),itemStart=pageNumber*pageSize-pageSize+1,itemStop=itemStart-1+response.Data.Items.length,itemCount=response.Data.ItemsCount;$wrapper.find("*[data-pager-itemstart]").html(itemStart);$wrapper.find("*[data-pager-itemstop]").html(itemStop);$wrapper.find("*[data-pager-itemcount]").html(itemCount);$wrapper.find("*[data-pager-pagenumber]").html(pageNumber);$wrapper.find("*[data-pager-pagesize]").html(pageSize);$wrapper.find("*[data-pager-pagecount]").html(pageCount)})}})});Vendd.Scripts.load(function(){function initMobileMenu(mobileDevice){$(window).on("resize",function(){var win=$(this),$wrapper=$(".mobile-main-menu"),$mobileButton=$(".mobile-button",$wrapper),$menuButton=$(".menu-link.open",$wrapper);win.width()>959?mobileDevice&&($mobileButton.length>0&&($mobileButton.removeClass("open").parent().find("> .mobile-content").show(),$(".menu-link.open",$wrapper).each(function(){$(this).removeClass("open").parent().find("> .menu-content").slideUp(1)})),mobileDevice=!1):mobileDevice||($(".mobile-button",$wrapper).removeClass("open").parent().find("> .mobile-content").hide(),$(".menu-link.open",$wrapper).each(function(){$(this).removeClass("open").parent().find("> .menu-content").slideUp(1)}),mobileDevice=!0)})}var $mobileWrapper=$(".mobile-main-menu"),mobileWrapper=$mobileWrapper.get(0),mobileDevice;if(initDropDownMenus(),!(!$mobileWrapper.length>0)){mobileWrapper.showMenu=function(){$(".mobile-button",$mobileWrapper).addClass("open").parent().find("> .mobile-content").stop(!0,!0).show()};mobileWrapper.hideMenu=function(){$(".mobile-button",$mobileWrapper).removeClass("open").parent().find("> .mobile-content").stop(!0,!0).hide()};mobileWrapper.showChildren=function($this){var mobileDevice=$(window).width()<=959?!0:!1;mobileDevice?($this.closest("ul").find(".open").removeClass("open").next().slideUp(400),$this.addClass("open").parent().find("> .menu-content").stop(!0,!0).slideDown(400)):($this.closest("ul").find(".open").removeClass("open").next().removeClass("visible").hide(),$this.addClass("open").parent().find("> .menu-content").stop(!0,!0).addClass("visible").show())};mobileWrapper.hideChildren=function($this){var mobileDevice=$(window).width()<=959?!0:!1;mobileDevice?$this.removeClass("open").parent().find("> .menu-content").stop(!0,!0).slideUp(400):$this.removeClass("open").parent().find("> .menu-content").stop(!0,!0).hide()};$(".mobile-button").on("click",$mobileWrapper,function(e){e.preventDefault();var $this=$(this);$this.hasClass("open")?mobileWrapper.hideMenu():mobileWrapper.showMenu()});$(".menu-link").on("click",$mobileWrapper,function(e){e.preventDefault();var $this=$(this);$this.hasClass("open")?mobileWrapper.hideChildren($this):mobileWrapper.showChildren($this)});$(document).click(function(event){if(!$(event.target).closest(".mobile-main-menu").length&&!$(event.target).is(".mobile-main-menu")){var $wrapper=$(".mobile-main-menu"),$mobileButton=$(".mobile-button.open",$wrapper),$menuButton=$(".menu-link.open",$wrapper),$firstLinkBtn=$(".first-level-link.open",$wrapper);$(window).width()<=959?$mobileButton.length>0&&($mobileButton.removeClass("open").parent().find("> .mobile-content").hide(),$menuButton.length>0&&$menuButton.removeClass("open").parent().find("> .menu-content").slideUp(400)):$firstLinkBtn.length>0&&$firstLinkBtn.removeClass("open").parent().find("> .nav-2").hide()}});mobileDevice=$(window).width()<=959?!0:!1;initMobileMenu(mobileDevice)}});$wrapper=$(".main-menu");wrapper=$wrapper.get(0);$(".nav-2",$wrapper).mouseleave(function(){$(".shown",wrapper).removeClass("shown")});$(".nav-1",$wrapper).mouseleave(function(){$(".hovered",wrapper).removeClass("hovered")});$(".nav-1 > li ",$wrapper).mouseenter(function(){$(this).hasClass("hasChildren")||$(".hovered",wrapper).removeClass("hovered")});Vendd.Scripts.load(function(){var $wrapper=$(".x-searchbox");$wrapper.length<1||$.each($wrapper,function(i,wrapper){var $wrapper=$(wrapper),lookup=!0,$input=$(".js-keyword",$wrapper),$button=$(".js-submit",$wrapper),minLength=$wrapper.data("min-search-length"),filtered=$wrapper.data("product-categories-filter"),mask=$wrapper.data("mask"),ajax=!1,lazy,$category,$suggestive,model;if(typeof ajax=="string"&&(ajax=$wrapper.data("ajax").toLowerCase()==="true"),lazy=!1,model=null,filtered&&($category=$(".js-search-category",$wrapper),$category.change(function(){ajax&&wrapper.showList(!1);wrapper.clearValue()})),ajax){if($suggestive=$(".x-suggestive-results-list",$wrapper),$suggestive.length<=0)throw"Error: Suggestive List does not exist";lazy=$suggestive.data("lazy-load-init");Vendd.MessageBus.subscribe(Vendd.Search.Messages.GetSuggestiveResultsFailed,wrapper,function(){wrapper.loading(!1)});Vendd.MessageBus.subscribe(Vendd.Search.Messages.GetSuggestiveResultsSuccess,wrapper,function(envelope){model=envelope.message.data.model;var html=Vendd.Handlebars.parse(Handlebars.partials.suggestiveResultList,model);$suggestive.html(html);lazy&&$("img[data-lazyload]",$suggestive).lazyload({effect:"fadeIn",data_attribute:"original"});wrapper.showList(!0);wrapper.loading(!1)})}wrapper.loading=function(loading){loading?$wrapper.addClass("x-loading").addClass("x-disabled"):$wrapper.removeClass("x-loading").removeClass("x-disabled")};wrapper.clearValue=function(){$input.val("")};wrapper.showList=function(show){ajax&&$suggestive.length>0&&(show?$suggestive.addClass("js-visible"):$suggestive.removeClass("js-visible"))};wrapper.submit=function(){var text=$input.val(),targetUrl=mask.replace("((search))",text),categoriesFilter;filtered&&(categoriesFilter=$category.val()?$category.val():"",targetUrl=categoriesFilter!==""?targetUrl.replace("((category))",categoriesFilter):LhApp.Function.Url.removeParameterFromUrl(targetUrl,"Category"));document.location=targetUrl};$button.click(function(e){$input.val().length>=minLength&&lookup&&(e.preventDefault(),wrapper.loading(!0),wrapper.submit())});$input.keyup($.debounce(850,function(){var searchTerm=$input.val(),category=filtered?$category.val():"";$input.val().length>=minLength?ajax&&(wrapper.loading(!0),wrapper.showList(!0),Vendd.MessageBus.publishAsync(wrapper,new Vendd.Search.Messages.GetSuggestiveResults(searchTerm,category))):wrapper.showList(!1)}));$input.keyup(function(e){e.keyCode===13&&(e.stopPropagation(),e.preventDefault(),$button.trigger("click"))});$wrapper.hover(function(){$input.val().length>=minLength&&ajax?wrapper.showList(!0):wrapper.showList(!1)},function(){wrapper.showList(!1)})})})