PageSourceSearch

https://www.visittelemark.info/JsHandlerMin/javascript/404_v639225…/SnapWidgetHeight_v63922556427.js

js visittelemark.info collected 2026-10-09 05:13:36 UTC 372,124 bytes, 212 lines download raw bytes

1(function(){var $404MessageSearchResultsContainer=$(".messageFor404SearchResults");if($404MessageSearchResultsContainer.length===0){return;}var $siteSearchForm=$(".ctl_SiteSearchForm form");if($siteSearchForm.length===0){return;}var arrUrlSegments=top.location.href.split('/');var strLastUrlSegment=arrUrlSegments[arrUrlSegments.length-1];if(!strLastUrlSegment){return;}var arrWords=strLastUrlSegment.split('-');var strLastWord=arrWords[arrWords.length-1];if((arrWords.length<2)||!/^p\d+$/.test(strLastWord)){return;}arrWords.splice(arrWords.length-1,1);$.get($siteSearchForm[0].action+'?search='+encodeURIComponent(arrWords.join(' ')),function(data){var $html=$(data);var $searchResults=$html.find('.ctl_SiteSearchResults');var $resultsTables=$searchResults.find('table.sitesearchresults');if(($searchResults.length===0)||($resultsTables.length===0)){return;}$('body').addClass("is404PageThatPerformedSearchFor");$404MessageSearchResultsContainer.append($searchResults);$searchResults.find('td.seemore a').each(function(){currentSeeMoreLink=$(this).attr('href');$(this).attr("href",$siteSearchForm[0].action+currentSeeMoreLink);console.log(this);});});}());
2NewMind.registerNameSpace("NewMind.Site").BreakPoints=(function(){function getForClassName(strClassName){var strSharedClassName="breakpointCanary";var $ele=$("."+strSharedClassName+"."+strClassName);if($ele.length>0){return $ele;}$ele=$("<div class=\""+strSharedClassName+" "+strClassName+"\" />");$("body").append($ele);return $ele;}return{IsNarrowMobileOnly:function(){return getForClassName("IsNarrowMobileOnly").is(":visible");},IsMobileOnly:function(){return getForClassName("IsMobileOnly").is(":visible");},IsTabletPortraitOnly:function(){return getForClassName("IsTabletPortraitOnly").is(":visible");},IsSmallTabletLandscapeOnly:function(){return getForClassName("IsTabletLandscapeOnly").is(":visible");},IsBigTabletLandscapeOnly:function(){return getForClassName("IsBigTabletLandscapeOnly").is(":visible");},IsSuperDesktopOnly:function(){return getForClassName("IsSuperDesktopOnly").is(":visible");}};}());
3NewMind.registerNameSpace("NewMind.Site");$(document).ready(function(){$("body").addClass("JS");if("ontouchstart" in document.documentElement){$('body').addClass('touchScreen');}else{$('body').addClass('non-touch');}$(".itineraryIdeas tr").each(function(i){$(this).find("img").insertBefore($(this).find("h3"));});$('.ChannelSiteDropdown span').toggle(function(){$(".NavChannelSitesDropdown").slideDown('fast');},function(){$(".NavChannelSitesDropdown").slideUp('fast');});$('.SignUpSiteDropdown span').toggle(function(){$(".SignUpSitesDropdown").slideDown('fast');},function(){$(".SignUpSitesDropdown").slideUp('fast');});$(".consumerLogin .disclaimer ul.options li").eq(1).hide();$(".consumerLogin .disclaimer ul.options li").eq(2).hide();$(".consumerLogin .disclaimer ul.options li").eq(3).hide();$('.megamenu ul li.toplevel:last-child').addClass("toplevelLast");if($('.fourthLevelNav ul.flatlist').length==0){$('.fourthLevelNav').hide();}$('.navigationExplore .exploreRow div.exploreCell:last-child').addClass('last');$('.navigationExplore .exploreRow div.exploreCell:nth-child(2)').addClass('middle');$('.navigationExplore div.exploreRow:last-child').addClass('last');$('div.navigationExplore div.exploreNav div.exploreRow div.exploreCell ul.sub li:last-child').addClass('exploreLastChild');$('.navigationFooter ul li:last-child a').css('border','none');$('.navigationFooter ul li:first-child a').css('padding-left','0');$('div.ctl_BlogPostListControl div.blogpostlist article.blogpost:last-child').css("border-bottom","none").css("margin-bottom","0").css("margin-bottom","0");$("div.blogTitle div.blogWrapper").insertBefore('div.BlogPostListHome div.blogpostlist article.blogpost:first-child');if($('.stage3 #rightCol .recentlyViewed ol.recentlyViewed li').length==0){$('.stage3 #rightCol .recentlyViewed').addClass("hideTitle");}$(".bannerAdColumn").children().each(function(i){$(this).addClass("item"+(i+1));});$(".consumerLogin form.consumerLogin").each(function(i){$(this).addClass("item"+(i+1));});$(".bookingStages img").each(function(i){$(this).addClass("item"+(i+1));});$("div.productListHome ol.productListHome").children().each(function(i){$(this).addClass("item"+(i+1));});$(".flex-direction-nav").children().each(function(i){$(this).addClass("item"+(i+1));});$("div.prodListItemWrapper div.telephone").each(function(i){$(this).find("h3").detach();$(this).wrapInner('<a href="tel:+47'+$(this).text().replace(/ /g,'')+'" />');});NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $(".banners a.BannerAdLoadingPlaceHolder").length==0;},MaxNumberOfAttempts:200,Success:function(){$(".banners a").each(function(i){$(this).wrapAll('<li>').parent().addClass("item"+(i+1));});}});NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $(".bannerAdColumn a.BannerAdLoadingPlaceHolder").length==0;},MaxNumberOfAttempts:200,Success:function(){$(".bannerAdColumn a").each(function(i){$(this).wrapAll('<li>').parent().addClass("item"+(i+1));});}});
3$('a#mapShowHideLink').prepend('<span class="toggle"></span>');if($('body').hasClass('touchScreen')){$('.content p').css("line-height","27px");}$('div.bookingCheckout div.disclaimer ul.options li:nth-child(5) input').attr('checked',false);$('div.bookingCheckout div.disclaimer ul.options li:nth-child(2) input').attr('checked',false).parent().hide();$('div.bookingCheckout div.disclaimer ul.options li:nth-child(3) input').attr('checked',false).parent().hide();$('div.bookingCheckout div.disclaimer ul.options li:nth-child(4) input').attr('checked',false).parent().hide();$('div.consumerLogin div.disclaimer ul.options li input').attr('checked',true);$('div.consumerLogin div.disclaimer ul.options li:nth-child(5) input').attr('checked',false);$('.navigationUtility ul li a').attr('target','_blank');$('.featuredPagesSocial ul li a').attr('target','_blank');$('div.refineBy form#refinesearch fieldset.refineprice div.labelContainer label:nth-child(1)').hide();$("div.form span.field select option[value='Revd'], div.form span.field select option[value='Sister']").remove();$("div.bookingCheckout span.field select option[value='Revd'], div.bookingCheckout span.field select option[value='Sister']").remove();$('body').addClass('clearfix');$('div.bookingAvailSearchCollapse').prepend('<span class="toggle"></span>');$("div.ctl_HighlightedProducts div.HighlightGroup div.Highlight div.Dates").each(function(){$(this).find('div.Opening:first').addClass('firstOpening');});function highlightedProductsShowMore(HighlightedProductsControl){$(HighlightedProductsControl).each(function(){var showMore=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.showMore","Show More");var showLess=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.showLess","Show Less");$(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.ItemWrapper").children(':lt(3)').addClass('showItemAlways');if($(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.ItemWrapper").children().length>3){$(HighlightedProductsControl).find('div.GroupWrapper div.HighlightGroup').append('<div class="showMore">'+showMore+'</div>');$(HighlightedProductsControl).find('div.showMore').toggle(function(){$(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.ItemWrapper > div.Highlight").addClass('showItem');$(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.showMore").text(showLess).addClass('showLess');},function(){$(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.ItemWrapper > div.Highlight").removeClass('showItem');$(HighlightedProductsControl).find("div.GroupWrapper div.HighlightGroup div.showMore").text(showMore).removeClass('showLess');$('html, body').animate({scrollTop:$(HighlightedProductsControl).offset().top},1000);});}});}if($('div.campaignMiddleScroll').length){highlightedProductsShowMore('div.campaignMiddleScrollUpper');highlightedProductsShowMore('div.highlightsScrollMain.campaignLowerScroll');highlightedProductsShowMore('div#hpCustomTemplateUpper');highlightedProductsShowMore('div#hpCustomTemplateLower');highlightedProductsShowMore('div.highlightsScrollMain.campaignBottomScroll');}else if($('body').hasClass('home')){highlightedProductsShowMore('div#homeHighlightsOffers');highlightedProductsShowMore('div#homeHighlightsThingsToDo');}else if($('div#hpCustomTemplateUpper').length){highlightedProductsShowMore('div#hpCustomTemplateUpper');highlightedProductsShowMore('div#hpCustomTemplateLower');}else{highlightedProductsShowMore('div.highlightsScrollMain');highlightedProductsShowMore('div.highlightsScrollMore');}function dropDown(element){$element=$(element);if($element.hasClass('active')){$element.slideUp('slow');$element.removeClass('active');}else{$element.slideDown('slow');$element.addClass('active');}}function resetDropDown(element){$element=$(element);if($element.hasClass('active')){$element.slideUp('slow');$element.removeClass('active');}}$('div#filterAnchor form#refinesearch').hide();$('div#filterAnchor h2.ir').click(function(){resetDropDown('div#again form#refineBySearchForm');dropDown('div#filterAnchor form#refinesearch');});$('div#again form#refineBySearchForm').hide();$('div#again .accommodationSearchImg h2.ir').click(function(){$('div#again').toggleClass('open');resetDropDown('div#filterAnchor form#refinesearch');dropDown('div#again form#refineBySearchForm');});function GoogleMapMobileTabs(){$('div.interactiveMaps .MapWrapper > div').each(function(i){$(this).addClass("item"+i);i++;$(this).prepend('<ul></ul>');});var $TabList=$('div.interactiveMaps .Tabs ol li');$TabList.each(function(i){$(this).clone().appendTo('div.interactiveMaps .MapWrapper > div.item'+i+' ul');i++;});var $mobileTabList=$('div.interactiveMaps .MapWrapper > div > ul > li');$mobileTabList.click(function(event){$(this).find('a').removeAttr('href');event.preventDefault();$mobileTabList.removeClass('selected');$(this).addClass('selected');var firstClass=($(this).attr('class').split(' ')[0]);$('div.interactiveMaps .Tabs ol li.'+firstClass+' a').click();});}NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.StandaloneGoogleMap div.Tabs ol li").length>0;},MaxNumberOfAttempts:200,Success:function(){GoogleMapMobileTabs();}});(function(){var $mediaControl=$("div.mediaHeaderFull");function mediaGalleryWrapping(){if($mediaControl.length>0){var $galItems=$mediaControl.find("div.galItem");var $galControls=$mediaControl.find("ul.galControls");if($galItems.length<1)return;if($galItems.length>1)$($mediaControl).addClass("mediaHeaderFullIcons");NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.mediaHeaderFull div.content").length>0;},MaxNumberOfAttempts:200,Success:function(){$($galControls).insertAfter("div.mediaHeaderFull div.content");var $galItem=$($galControls).wrapAll("<div class='galControlsWrapper' />");}});$galItems.each(function(){var $item=$(this);var $details=$item.find("h3, p");$details.wrapAll("<div class='mediaNoteInner' />");});}}mediaGalleryWrapping();})();if($('div.mediaHeaderFull').length>0){$('div#navigationOutsideWrapper').addClass('hideBorder');}$("div.youtubePlaylist .ytPlaylistWrapper .ytPlaylist ol.ytPlaylist li.video").click(function(){$("html, body").animate({scrollTop:$("div.youtubePlaylist").offset().top-40},"slow");});function mergeFacilitiesToOneFieldset(){var $target=$('div.productSearchWra
3pperFacility fieldset');if($target.length>1){var newFacility="<fieldset class='oneFacilityGroup'><ul class='facility'></ul></fieldset>";$('div.productSearchWrapperFacility span.fieldwide').append(newFacility);$target.each(function(){$(this).find('li').appendTo('fieldset.oneFacilityGroup > ul');$(this).remove();});}}NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.productSearchWrapperFacility fieldset").length>0;},MaxNumberOfAttempts:200,Success:function(){mergeFacilitiesToOneFieldset();}});if($('div.specialOfferDetail.specialOfferDetailLow ol.offersList li.ll1'||'div.specialOfferDetail.specialOfferDetailLow ol.offersList li.ll2').length>0){$('div.specialOfferDetailLow h2.offerSectionTitle').show();}$(window).scroll(function(){var isChannelSite=($("body").hasClass("porsgrunn")||$("body").hasClass("vest-telemark-museum")||$("body").hasClass("kragero")||$("body").hasClass("langesund")||$("body").hasClass("skien"));var pinnedSize=140;if(isChannelSite){pinnedSize=200;}var scroll=$(window).scrollTop();if(scroll>=pinnedSize){$("div#headerWrapper").addClass("pinned");$("div#SocialMediaLinksWrapper div.featuredPagesSocial>ul").addClass("stickyNavActive");$('div.exploreTheRegionTitle').removeClass('active');$('div.exploreTheRegionDropdown').removeClass('showRegions');}else{$("div#headerWrapper").removeClass("pinned");$("div#SocialMediaLinksWrapper div.featuredPagesSocial>ul").removeClass("stickyNavActive");}});function exploreTheRegionMapHover(){var exploreTheRegion=$('div.exploreTheRegionDropdown').find('ul');var mapGraphic=$('div.exploreTheRegionDropdown span.destinationGraphic').find('img');$(exploreTheRegion).find('li.telemark').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/telemark_map_colored.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.skien').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/skien.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.porsgrunn').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/porsgrunn.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.bamble').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/bamble.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.kragero').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/kragero.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.regionbo').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/regionbo.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.nottoden').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/nottoden.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.drangedal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/drangedal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.rjukan').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/rjukan.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.rauland').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/rauland.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.dalen').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/dalen.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.nissedal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/nissedal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.vradal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/vradal.png');}
3).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.kviteseid').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/vradal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.morgedal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/vradal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.selfjord').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/selfjord.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.fyresdal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/fyresdal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.tuddal').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/hjartdal.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.haukeli').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/rauland.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});$(exploreTheRegion).find('li.vinje').mouseenter(function(e){$(mapGraphic).attr('src','/images/map/rauland.png');}).mouseleave(function(e){$(mapGraphic).attr('src','/images/map/map.png');});}function clickCloseExploreTheRegion(){$('html').click(function(){$('div.exploreTheRegionTitle').removeClass('active');$('div.exploreTheRegionDropdown').removeClass('showRegions');});$('div.exploreTheRegionTitle, div.exploreTheRegionDropdown').click(function(e){e.stopPropagation();});}clickCloseExploreTheRegion();$('div.exploreTheRegionTitle').click(function(){$(this).toggleClass('active');$('div.exploreTheRegionDropdown').toggleClass('showRegions');exploreTheRegionMapHover();});var list=["Dr","Ms","Brigadier","Canon","Captain","Cllr","Col","Commander","Count","Countess","Father","Flt Lt","Grp Cpt","Lady","Lord","Lt Col","Lt Cmdr","Major","Mr & Miss","Mr & Mrs","Mr & Ms","Professor","Rev Dr","S/Lt","Sgt","Sir","Squadron Leader","The Rt Hon"];$('div.form form.form div.form div.personaldetails div.title span.field select option, div.consumerLogin form.consumerLogin div.form div.personaldetails div.title span.field select option').filter(function(){return $.inArray(this.value,list)!==-1}).remove();if($('div.hprodsEventCalWide').length>0){var channels=['sykkel','vandretelemark','skien','porsgrunn','kragero','bamble','vest-telemark-museum','dalen','seljord','notodden','telemarksvegen','conference','gautefall','fyresdal'];currentUrl=window.location.href.replace(/\/$/,'');var buttonAppended=false;for(var i=0;i<channels.length;i++){if(currentUrl===window.location.origin||currentUrl===(window.location.origin+'/'+channels[i])){if(!buttonAppended){var calViewAll=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.calViewAll");var calViewURL=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.calViewURL");calViewURL=window.location.href+calViewURL;$('div.hprodsEventCalWide.LowResHideCalendar').append("<a class='viewAllLink' href='"+calViewURL+"'>"+calViewAll+"</a>");buttonAppended=true;}}}}function pdAutoplay(){var videoControls,$videoUnmute,$videoMute,$videoPause,$videoPlay;$('div.productDetailImage div.mediagallery div.mediascroll div.scrollinner div.galleryitem:first-child').addClass('activeItem');function appendVideoControls(){setTimeout(function(){$('div.productDetailImage div.mediagallery div.mediascroll div.scrollinner div.galleryitem.video.activeItem').each(function(){videoControls=$('<div class="videoControls"></div>');$videoUnmute=$('<div class="videoControl videoUnmute"></div>');$videoMute=$('<div class="videoControl videoMute soundOptionHide"></div>');$videoPause=$('<div class="videoControl videoPause"></div>');$videoPlay=$('<div class="videoControl videoPlay soundOptionHide"></div>');videoControls.append($videoUnmute,$videoMute,$videoPause,$videoPlay);$(this).append(videoControls);var obtainIframe=$(this).find('iframe');var obtainVideoMute=$(this).find('div.videoMute');var obtainVideoUnMute=$(this).find('div.videoUnmute');var obtainVideoPause=$(this).find('div.videoPause');var obtainVideoPlay=$(this).find('div.videoPlay');$(obtainVideoMute).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"mute","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"setVolume","value":"0"}','*');$(this).addClass('soundOptionHide');$(obtainVideoUnMute).removeClass('soundOptionHide');});$(obtainVideoUnMute).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"unMute","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"setVolume","value":"1"}','*');$(this).addClass('soundOptionHide');$(obtainVideoMute).removeClass('soundOptionHide');});$(obtainVideoPause).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"pause","value":""}','*');$(this).addClass('soundOptionHide');$(obtainVideoPlay).removeClass('soundOptionHide');});$(obtainVideoPlay).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"play","value":""}','*');$(this).addClass('soundOptionHide');$(obtainVideoPause).removeClass('soundOptionHide');});});$videoMute.click();$videoPlay.click();},1000);}if($('.activeItem').hasClass('video')){appendVideoControls();}function prevNext(){var next=$('.node.mediagallery>.mediascroll>
3.nav-controls>a.next');var prev=$('.node.mediagallery>.mediascroll>.nav-controls>a.prev');var items=$('div.productDetailImage div.mediagallery div.mediascroll div.scrollinner div.galleryitem');var currentItem=items.filter('.activeItem');next.attr('id','next');prev.attr('id','prev');if(document.getElementById("next")!=null){document.getElementById("next").addEventListener("click",function(){var nextItem=currentItem.next();currentItem.removeClass('activeItem');if(nextItem.length){currentItem=nextItem.addClass('activeItem');if(nextItem.hasClass('video')){if($(nextItem).find('div.videoControls').length>0){$('div.videoControls').find('div.videoMute').click();$('div.videoControls').find('div.videoPlay').click();return;}else{appendVideoControls();}}}else{currentItem=items.first().addClass('activeItem');if(currentItem.hasClass('video')){if($(currentItem).find('div.videoControls').length>0){$('div.videoControls').find('div.videoMute').click();$('div.videoControls').find('div.videoPlay').click();return;}else{appendVideoControls();}}}});}if(document.getElementById("next")!=null){document.getElementById("prev").addEventListener("click",function(){var prevItem=currentItem.prev();currentItem.removeClass('activeItem');if(prevItem.length){currentItem=prevItem.addClass('activeItem');if(prevItem.hasClass('video')){if($(prevItem).find('div.videoControls').length>0){$('div.videoControls').find('div.videoMute').click();$('div.videoControls').find('div.videoPlay').click();return;}else{appendVideoControls();}}}else{currentItem=items.last().addClass('activeItem');if(currentItem.hasClass('video')){if($(currentItem).find('div.videoControls').length>0){$('div.videoControls').find('div.videoMute').click();$('div.videoControls').find('div.videoPlay').click();return;}else{appendVideoControls();}}}});}}prevNext();}if($('body').hasClass('stage3')){pdAutoplay();}if($('#todayseventlink').length){var today=new Date();var channelSite="";var todaysEventsLink=NewMind.ETWP.GetResource("NewMind.env.lang.resources.productsearch.todaysEvents.page");if($("body").hasClass("porsgrunn")){channelSite="/porsgrunn"}else if($("body").hasClass("vest-telemark-museum")){channelSite="/vest-telemark-museum"}else if($("body").hasClass("kragero")){channelSite="/kragero"}else if($("body").hasClass("langesund")){channelSite="/langesund"}else if($("body").hasClass("skien")){channelSite="/skien"}else if($("body").hasClass("bamble")){channelSite="/bamble"}else if($("body").hasClass("notodden")){channelSite="/notodden"}var urlForToday=channelSite+"/"+todaysEventsLink+"/searchresults?sr=1&rd=on&stay="+today.getFullYear()+"-"+(today.getMonth()+1)+"-"+today.getDate()+"&end="+today.getFullYear()+"-"+(today.getMonth()+1)+"-"+today.getDate()+"&daily=1";$('#todayseventlink').attr("href",urlForToday);}if($('ol.productList li.prodTypeEVEN, #whatsOnLanding').length>0){moveOpeningName();}$("img").each(function(index){if($(this).attr("data-copyright")!=null){$(this).attr("title","\xA9 "+$(this).attr("data-copyright"));}});if($("body.kragero").length){$("a.CookieWarningHide img").each(function(index){if($(this).attr("src")!=null){$(this).attr("src","/images/HideCookieBannerKragero.png");}});}});function moveOpeningName(){$('ol.productList li.prodTypeEVEN, #whatsOnLanding > ol.productList li.prodTypeEVEN').each(function(){var on=$(this).find('dd.dates span.openingname').first();if(on.html()!=""){on=on.html(on.html()+", ");on.prependTo($(this).find('div.loc p'));};});}(function(){var altTextClass="altTextChanged";var titleTextClass="titleTextChanged";var customText=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.productDetailAltText","An image of ");var textToCheck="Product Image";var productName=$('div.productDetailTop h1').text();var textToUse=productName;NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.productDetailMediaGallery .node.mediagallery>.mediascroll>.scrollinner>.galleryitem").length>0;},MaxNumberOfAttempts:1000,Success:function(){setTimeout(function(){$('div.productDetailMediaGallery img').each(function(){var $img=$(this);if(!$img.hasClass(altTextClass)){var altText=$img.attr('alt');if(altText==textToCheck){$img.attr('alt',textToUse);$img.addClass(altTextClass);}}if(!$img.hasClass(titleTextClass)){var titleText=$img.attr('title');if(titleText==textToCheck){$img.attr('title',textToUse);$img.addClass(titleTextClass);}}});},1000);$('div.productDetailMediaGallery div#productExtraImages>ul>li').each(function(){var additionalImagesItem=$(this).find('a');
3if(!additionalImagesItem.hasClass(titleTextClass)){var titleText=additionalImagesItem.attr('title');if(titleText==textToCheck){additionalImagesItem.attr('title',textToUse);additionalImagesItem.addClass(titleTextClass);}}});}});NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.galleryitem").length>0;},MaxNumberOfAttempts:1000,Success:function(){setTimeout(function(){$('div.galleryitem img').each(function(){var $img=$(this);if(!$img.hasClass(altTextClass)){var altText=$img.attr('alt');if(altText==textToCheck){$img.attr('alt',textToUse);$img.addClass(altTextClass);}}if(!$img.hasClass(titleTextClass)){var titleText=$img.attr('title');if(titleText==textToCheck){$img.attr('title',textToUse);$img.addClass(titleTextClass);}}});},1000);}});})();
4(function($){$.fn.isOnScreenWeb=function(intOptionalPreviewDistanceInPixels){if(!this.is(":visible")){return false;}var win=$(window);var viewport={top:win.scrollTop(),left:win.scrollLeft()};viewport.right=viewport.left+win.width();viewport.bottom=viewport.top+win.height();var bounds=this.offset();bounds.right=bounds.left+this[0].offsetWidth;bounds.bottom=bounds.top+this[0].offsetHeight;if(intOptionalPreviewDistanceInPixels){intOptionalPreviewDistanceInPixels=parseInt(intOptionalPreviewDistanceInPixels,10);if(!isNaN(intOptionalPreviewDistanceInPixels)){bounds.top-=intOptionalPreviewDistanceInPixels;bounds.left-=intOptionalPreviewDistanceInPixels;bounds.bottom+=intOptionalPreviewDistanceInPixels;bounds.right+=intOptionalPreviewDistanceInPixels;}}return((viewport.right>=bounds.left)&&(viewport.left<=bounds.right)&&(viewport.bottom>=bounds.top)&&(viewport.top<=bounds.bottom));};})(jQuery);
5(function(){if($('div.contactDetails div.telephone1 p span:contains("+47")').length>0){$("div.contactDetails div.telephone1 p span").addClass("countryCodePresent");}if($('div.contactDetails div.telephone1 p span:not(:contains("+47"))').length>0){$("div.contactDetails div.telephone1 p span").addClass("countryCodeAbsent");}if($('div.contactDetails div.telephone2 p span:contains("+47")').length>0){$("div.contactDetails div.telephone2 p span").addClass("countryCodePresent");}if($('div.contactDetails div.telephone2 p span:not(:contains("+47"))').length>0){$("div.contactDetails div.telephone2 p span").addClass("countryCodeAbsent");}$('div.contactDetails div.telephone1 p span.countryCodeAbsent,div.contactDetails div.telephone2 p span.countryCodeAbsent').each(function(){$(this).wrapInner('<a href="tel:+47'+$(this).text().replace(/ /g,'')+'" />');});$('div.contactDetails div.telephone span.countryCodePresent').each(function(){$(this).wrapInner('<a href="tel:'+$(this).text().replace(/ /g,'')+'" />');});$('.productDetailFacilities .facilities ul').each(function(){$(this).prev('h3').andSelf().wrapAll('<div class="facilityGroup"/>');});$(".productDetailFacilities .facilities .facilityGroup").each(function(i){$(this).addClass("item"+(i+1));});$(".productDetailFacilities .facilities .facilityGroup").wrapAll("<div class='facilityGroupWrapperOutside'></div>");var $pArr=$('.productDetailFacilities .facilities .facilityGroup');var pArrLen=$pArr.length;for(var i=0;i<pArrLen;i+=3){$pArr.filter(':eq('+i+'),:eq('+(i+1)+'),:eq('+(i+2)+')').wrapAll('<div class="facilityGroupWrapper" />');};$(".productDetail").each(function(i){if($(this).children().length==0)$(this).addClass("empty");});$(".productDetail .PublicTransportWrapper").each(function(i){if($(this).children().length==0)$(this).parent().addClass("empty");});var mapTitle=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.mapTitle","Map");if($('div.productDetailMap .PublicTransportWrapper .roaddirections'||'div.productDetailMap .PublicTransportWrapper .publicdirections').length==0){$('body.en-gb div.productDetailMap h2').html(mapTitle);}if($('.socialMediaWidgetFacebook .socialmediaitem').length==0){$('.FacebookWidgetDetail').hide();}$('div.bookingAvailabilityCalendar div#calendarControl fieldset#AvCalControl form#calendarForm div.form div.row span.field input#availcalsubmit').click(function(){setTimeout(function(){$("body.ProductTypeACCO").addClass('availabilityCalendarUsed');},4000);});$("div.productDetailAwardsGradings div.gradings .gradingLogoImg").appendTo("div.productDetailAwardsGradings div.gradings ul");if($('.productDetail div').children().length==0){$('.productDetail').addClass("hide");}$("div.productDetailRelEvents").each(function(i){$(this).find('div.relatedEvents').children().not(':first-child').wrapAll('<div class="relatedProductsWra
5pper" />');});$("div.productDetailRelProd").each(function(i){$(this).find('div.relatedProducts').children().not(':first-child').wrapAll('<div class="relatedProductsWrapper" />');});if($('.productDetail div.TADetail').length==0){$('.productDetail h2.tripAdvisorTitle').addClass("hide");}function stripParenthesis(node){if(node.length){node.contents().each(function(index,child){if(child.nodeType===3){child.nodeValue=child.nodeValue.replace(/\(|\)/g,'');}else{stripParenthesis($(child));}});}}stripParenthesis($('div.productDetailOpening div.openingTimes table.dates > thead > tr > th > span.date'));if($('body').hasClass('ProductSearchSwitcher stage3')){NewMind.ETWP.ProductDetails.SetupTelephonePopup=function(){$(".ctl_ProductDetail .telephone .TBShowButton").live("click",function(e){e.preventDefault();var $telephoneNumber=$(this).parent().children(".telephonenumber");$telephoneNumber.show();});$(".ctl_ProductDetail .telephone a.TBCloseButton").live("click",function(e){e.preventDefault();$(this).parent().hide();});};NewMind.ETWP.ProductDetails.SetupTelephonePopup();if($('div.telephone').length>0){var text=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.viewPhoneNumber","View Phone Number");$('div.telephone a.TBShowButton').html(text);}}function generateGoogleMapLink(){if($("body").hasClass("stage3.ProductSearchSwitcher")){if((typeof(NewMind)!=="undefined")&&NewMind.Vars&&NewMind.Vars.Page&&NewMind.Vars.Page.ProductKey&&NewMind.ETWP&&NewMind.ETWP.ProductDetails&&NewMind.ETWP.ProductDetails.Location&&NewMind.mapping&&NewMind.ETWP.ProductDetails.Location[NewMind.Vars.Page.ProductKey]){var objLocation=NewMind.ETWP.ProductDetails.Location[NewMind.Vars.Page.ProductKey];$("p.googleMapLink a").attr("href","http://maps.apple.com/?q="+objLocation.Latitude+","+objLocation.Longitude);}}}generateGoogleMapLink();$('div.productDetailHiking').each(function(){var difficultyEasy='fac1792';var difficultyMedium='fac1793';var difficultyChallenging='fac1794';var difficultyExpert='fac1796';var difficultyTargert=$(this).find('div.hikingInformationBox div.hikinginformationSectionDifficulty div.facilities ul.facilities li:first-of-type');var difficultyContainer=$(this).find('div.hikinginformationSectionDifficulty');if($(difficultyTargert).hasClass(difficultyEasy)){$(difficultyContainer).addClass('difficultyEasy');}else if($(difficultyTargert).hasClass(difficultyMedium)){$(difficultyContainer).addClass('difficultyMedium');}else if($(difficultyTargert).hasClass(difficultyChallenging)){$(difficultyContainer).addClass('difficultyChallenging');}else if($(difficultyTargert).hasClass(difficultyExpert)){$(difficultyContainer).addClass('difficultyExpert');}});if($('div.productDetailFacilitiesVenues').length>0){var roomClassroom=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.conference.classroom","Klasserom");var roomBanquet=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.conference.banquet","Bankett");var roomBoardroom=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.conference.boardroom","Styrerom");var roomUshaped=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.conference.ushaped","Hestesko");var roomTheatre=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customtext.js.conference.theatre","Kino");$('div.productDetailFacilitiesVenues div.facilityTableDesktop div.facilitiesTable table.facilitySummary tbody tr:first-of-type th:first-of-type').html(roomClassroom);$('div.productDetailFacilitiesVenues div.facilityTableDesktop div.facilitiesTable table.facilitySummary tbody tr:first-of-type th:nth-of-type(2)').html(roomBanquet);$('div.productDetailFacilitiesVenues div.facilityTableDesktop div.facilitiesTable table.facilitySummary tbody tr:first-of-type th:nth-of-type(3)').html(roomBoardroom);$('div.productDetailFacilitiesVenues div.facilityTableDesktop div.facilitiesTable table.facilitySummary tbody tr:first-of-type th:nth-of-type(4)').html(roomUshaped);$('div.productDetailFacilitiesVenues div.facilityTableDesktop div.facilitiesTable table.facilitySummary tbody tr:first-of-type th:nth-of-type(5)').html(roomTheatre);$('div.productDetailFacilitiesVenues div.facilityTableMobile div.facilitiesTable table.facilitySummary tbody tr:nth-of-type(1) th:first-of-type').html(roomClassroom);$('div.productDetailFacilitiesVenues div.facilityTableMobile div.facilitiesTable table.facilitySummary tbody tr:nth-of-type(2) th:first-of-type').html(roomBanquet);$('div.productDetailFacilitiesVenues div.facilityTableMobile div.facilitiesTable table.facilitySummary tbody tr:nth-of-type(3) th:first-of-type').html(roomBoardroom);$('div.productDetailFacilitiesVenues div.facilityTableMobile div.facilitiesTable table.facilitySummary tbody tr:nth-of-type(4) th:first-of-type').html(roomUshaped);$('div.productDetailFacilitiesVenues div.facilityTableMobile div.facilitiesTable table.facilitySummary tbody tr:nth-of-type(5) th:first-of-type').html(roomTheatre);$('div.productDetailFacilitiesVenues div.facilitiesTable').each(function(){if($(this).find('table>tbody>tr>td.hasFacility').length==0){$(this).addClass('hideFacility');}});}})();
6(function($){$.expander={version:'1.4.5',defaults:{slicePoint:100,preserveWords:true,widow:4,expandText:NewMind.ETWP.GetResource("NewMind.env.lang.resources.expander.readmore","Read More"),expandPrefix:'&hellip; ',expandAfterSummary:false,summaryClass:'summary',detailClass:'details',moreClass:'read-more',lessClass:'read-less',collapseTimer:0,expandEffect:'slideDown',expandSpeed:250,collapseEffect:'slide
6Up',collapseSpeed:200,userCollapse:true,userCollapseText:NewMind.ETWP.GetResource("NewMind.env.lang.resources.expander.readless","Read Less"),userCollapsePrefix:' ',onSlice:null,beforeExpand:null,afterExpand:null,onCollapse:null,afterCollapse:null}};$.fn.expander=function(options){var meth='init';if(typeof options=='string'){meth=options;options={};}var opts=$.extend({},$.expander.defaults,options),rSelfClose=/^<(?:area|br|col|embed|hr|img|input|link|meta|param).*>$/i,rAmpWordEnd=opts.wordEnd||/(&(?:[^;]+;)?|[a-zA-Z\u00C0-\u0100]+)$/,rOpenCloseTag=/<\/?(\w+)[^>]*>/g,rOpenTag=/<(\w+)[^>]*>/g,rCloseTag=/<\/(\w+)>/g,rLastCloseTag=/(<\/[^>]+>)\s*$/,rTagPlus=/^(<[^>]+>)+.?/,delayedCollapse;var methods={init:function(){this.each(function(){var i,l,tmp,newChar,summTagless,summOpens,summCloses,lastCloseTag,detailText,detailTagless,html,expand,$thisDetails,$readMore,openTagsForDetails=[],closeTagsForsummaryText=[],defined={},thisEl=this,$this=$(this),$summEl=$([]),o=$.extend({},opts,$this.data('expander')||$.meta&&$this.data()||{}),hasDetails=!!$this.find('.'+o.detailClass).length,hasBlocks=!!$this.find('*').filter(function(){var display=$(this).css('display');return(/^block|table|list/).test(display);}).length,el=hasBlocks?'div':'span',detailSelector=el+'.'+o.detailClass,moreClass=o.moreClass+'',lessClass=o.lessClass+'',expandSpeed=o.expandSpeed||0,allHtml=$.trim($this.html()),allText=$.trim($this.text()),summaryText=allHtml.slice(0,o.slicePoint);o.moreSelector='span.'+moreClass.split(' ').join('.');o.lessSelector='span.'+lessClass.split(' ').join('.');if($.data(this,'expanderInit')){return;}$.data(this,'expanderInit',true);$.data(this,'expander',o);$.each(['onSlice','beforeExpand','afterExpand','onCollapse','afterCollapse'],function(index,val){defined[val]=$.isFunction(o[val]);});summaryText=backup(summaryText);summTagless=summaryText.replace(rOpenCloseTag,'').length;while(summTagless<o.slicePoint){newChar=allHtml.charAt(summaryText.length);if(newChar=='<'){newChar=allHtml.slice(summaryText.length).match(rTagPlus)[0];}summaryText+=newChar;summTagless++;}summaryText=backup(summaryText,o.preserveWords);summOpens=summaryText.match(rOpenTag)||[];summCloses=summaryText.match(rCloseTag)||[];tmp=[];$.each(summOpens,function(index,val){if(!rSelfClose.test(val)){tmp.push(val);}});summOpens=tmp;l=summCloses.length;for(i=0;i<l;i++){summCloses[i]=summCloses[i].replace(rCloseTag,'$1');}$.each(summOpens,function(index,val){var thisTagName=val.replace(rOpenTag,'$1');var closePosition=$.inArray(thisTagName,summCloses);if(closePosition===-1){openTagsForDetails.push(val);closeTagsForsummaryText.push('</'+thisTagName+'>');}else{summCloses.splice(closePosition,1);}});closeTagsForsummaryText.reverse();if(!hasDetails){detailText=allHtml.slice(summaryText.length);detailTagless=$.trim(detailText.replace(rOpenCloseTag,''));if(detailTagless===''||detailTagless.split(/\s+/).length<o.widow){return;}lastCloseTag=closeTagsForsummaryText.pop()||'';summaryText+=closeTagsForsummaryText.join('');detailText=openTagsForDetails.join('')+detailText;}else{detailText=$this.find(detailSelector).remove().html();summaryText=$this.html();allHtml=summaryText+detailText;lastCloseTag='';}o.moreLabel=$this.find(o.moreSelector).length?'':buildMoreLabel(o);if(hasBlocks){detailText=allHtml;}summaryText+=lastCloseTag;o.summary=summaryText;o.details=detailText;o.lastCloseTag=lastCloseTag;if(defined.onSlice){tmp=o.onSlice.call(thisEl,o);o=tmp&&tmp.details?tmp:o;}html=buildHTML(o,hasBlocks);$this.html(html);$thisDetails=$this.find(detailSelector);$readMore=$this.find(o.moreSelector);if(o.collapseEffect==='slideUp'&&o.expandEffect!=='slideDown'||$this.is(':hidden')){$thisDetails.css({display:'none'});}else{$thisDetails[o.collapseEffect](0);}$summEl=$this.find('div.'+o.summaryClass);expand=function(event){event.preventDefault();$readMore.hide();$summEl.hide();if(defined.beforeExpand){o.beforeExpand.call(thisEl);}$thisDetails.stop(false,true)[o.expandEffect](expandSpeed,function(){$thisDetails.css({zoom:''});
6if(defined.afterExpand){o.afterExpand.call(thisEl);}delayCollapse(o,$thisDetails,thisEl);});};$readMore.find('a').unbind('click.expander').bind('click.expander',expand);if(o.userCollapse&&!$this.find(o.lessSelector).length){$this.find(detailSelector).append('<span class="'+o.lessClass+'">'+o.userCollapsePrefix+'<a href="#">'+o.userCollapseText+'</a></span>');}$this.find(o.lessSelector+' a').unbind('click.expander').bind('click.expander',function(event){event.preventDefault();clearTimeout(delayedCollapse);var $detailsCollapsed=$(this).closest(detailSelector);reCollapse(o,$detailsCollapsed);if(defined.onCollapse){o.onCollapse.call(thisEl,true);}});});},destroy:function(){this.each(function(){var o,details,$this=$(this);if(!$this.data('expanderInit')){return;}o=$.extend({},$this.data('expander')||{},opts),details=$this.find('.'+o.detailClass).contents();$this.removeData('expanderInit');$this.removeData('expander');$this.find(o.moreSelector).remove();$this.find('.'+o.summaryClass).remove();$this.find('.'+o.detailClass).after(details).remove();$this.find(o.lessSelector).remove();});}};if(methods[meth]){methods[meth].call(this);}function buildHTML(o,blocks){var el='span',summary=o.summary;if(blocks){el='div';if(rLastCloseTag.test(summary)&&!o.expandAfterSummary){summary=summary.replace(rLastCloseTag,o.moreLabel+'$1');}else{summary+=o.moreLabel;}summary='<div class="'+o.summaryClass+'">'+summary+'</div>';}else{summary+=o.moreLabel;}return [summary,'<',el+' class="'+o.detailClass+'"','>',o.details,'</'+el+'>'].join('');}function buildMoreLabel(o){var ret='<span class="dots">...</span><span class="'+o.moreClass+'">';ret+='<a href="#">'+o.expandText+'</a></span>';return ret;}function backup(txt,preserveWords){if(txt.lastIndexOf('<')>txt.lastIndexOf('>')){txt=txt.slice(0,txt.lastIndexOf('<'));}if(preserveWords){txt=txt.replace(rAmpWordEnd,'');}return $.trim(txt);}function reCollapse(o,el){el.stop(true,true)[o.collapseEffect](o.collapseSpeed,function(){var prevMore=el.prev('span.'+o.moreClass).show();if(!prevMore.length){el.parent().children('div.'+o.summaryClass).show().find('span.'+o.moreClass).show();}if(o.afterCollapse){o.afterCollapse.call(el);}});}function delayCollapse(option,$collapseEl,thisEl){if(option.collapseTimer){delayedCollapse=setTimeout(function(){reCollapse(option,$collapseEl);if($.isFunction(option.onCollapse)){option.onCollapse.call(thisEl,false);}},option.collapseTimer);}}return this;};$.fn.expander.defaults=$.expander.defaults;})(jQuery);
7$(document).ready(function(){function enableContentExpander($content,intContentLength){var strHiddenClass="expandableContentHidden";var strShownClass="expandableContentShown";$content.each(function(){var $this=$(this);function GetDetails(){return $this.children("div.details");}function GetSummary(){return $this.children("div.summary");}$this.expander({expandEffect:'slideDown',collapseEffect:'slideUp',slicePoint:intContentLength,afterCollapse:function(){GetDetails().removeClass(strShownClass).addClass(strHiddenClass).css("display","");GetSummary().removeClass(strHiddenClass).addClass(strShownClass);},beforeExpand:function(){GetDetails().removeClass(strHiddenClass).addClass(strShownClass).css("display","");GetSummary().removeClass(strShownClass).addClass(strHiddenClass);}});GetSummary().addClass(strShownClass);GetDetails().addClass(strHiddenClass).css("display","");});}enableContentExpander($(".expandable"),800);enableContentExpander($(".productDetailFacilities .facilities"),400);enableContentExpander($(".productDetailDescription .description"),800);});
8$(function(){var strHiddenClass="navigationMainResponsiveHidden";var strShowClass="navigationMainResponsiveShown";var $dropDownMenuButton=$(".dropdownmenu");var $nav=$(".navigationMainResponsive");$dropDownMenuButton.toggle(function(){$nav.hide().removeClass(strHiddenClass).addClass(strShowClass).slideDown("fast");$("#header .languageSelector").toggleClass("lanDownArrow","0");},function(){$nav.slideUp("fast",function(){$(this).addClass(strHiddenClass).show();});});$dropDownMenuButton.click(function(){$dropDownMenuButton.toggleClass("dropdownmenuOpen","0");});});
9(function(){var $basket=$(".itineraryBasket");var $link=$("<a class=\"hbtn\" />");var $added=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.added","Added...");$link.attr("href",'/itinerary-planner');var $header=$basket.find("h2");$link.insertBefore($header);$link.append($header);$link.click(function(e){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()||NewMind.Site.BreakPoints.IsTabletPortraitOnly()){return;}if($basket.find(".ItineraryTbl").length>0){$basket.find(".EmptyMsg").addClass("hide");$('.itineraryBasket table.ItineraryTbl th').replaceWith('<th>'+$added+'</th>');}if($basket.find(".ItineraryTbl").length===0){$basket.find(".EmptyMsg").removeClass("hide");}GetToggleElements().slideToggle("slow");e.preventDefault();});DisableToggleIfRequired();$(window).resize(DisableToggleIfRequired);function DisableToggleIfRequired(){if($('div.IsMobileOnly, div.IsNarrowMobileOnly, div.IsTabletPortraitOnly').is(':hidden')){GetToggleElements().slideUp(1);}}function GetToggleElements(){return $(".itineraryBasket .ItineraryTbl").add($("div.itineraryBasket form")).add($(".itineraryBasket .EmptyMsg")).add($(".itineraryBasket p.link"));}function moveItineraryItems(){$('.ctl_ItineraryDetail .ItnryPrint').insertAfter($('.ctl_ItineraryDetail div#itinProductList'));$('.ctl_ItineraryDetail .ItnryEmail').insertAfter($('.ctl_ItineraryDetail div#itinProductList'));$('.ctl_ItineraryDetail .ItnryNotes').insertAfter($('.ctl_ItineraryDetail div#itinProductList'));$('.ctl_ItineraryDetail .ItnryName').insertAfter($('.ctl_ItineraryDetail div#itinProductList'));}moveItineraryItems();function updateItineraryNameIcon(){var itinraryNameIcon=NewMind.ETWP.GetResource("NewMind.env.imgs.resources.itinerary.details.excursionname","/images/itinerary/details/icon_name.png");$('.ctl_ItineraryDetail .ItnryName img').attr("src",itinraryNameIcon);}updateItineraryNameIcon();$("p.ex_AddButton a").live("click",function(){if(!$("div.itineraryBasket").hasClass("itineraryActive")){if(!$basket.isOnScreen||!$basket.isOnScreen()){setTimeout(function(){$("html, body").animate({scrollTop:$("div.itineraryBasket").offset().top-40},2000,function(){var $overlay=$("div.itineraryBasket span.icon span.iconOverlay");$overlay.fadeIn("slow",function(){$overlay.fadeOut("slow");}).css("display","block");});},20);return false;}else{setTimeout(function(){var $overlay=$("div.itineraryBasket span.icon span.iconOverlay");$overlay.fadeIn("slow",function(){$overlay.fadeOut("slow");}).css("display","block");},3000);}}});function itineraryClickName(){$("div.ctl_ItineraryDetail div.ItnryName > div:first-of-type").live("click",function(){$(this).find('a').trigger("click");});}function itineraryClickNotes(){$("div.ctl_ItineraryDetail div.ItnryNotes > div:first-of-type").live("click",function(){$(this).find('a').trigger("click");});}function itineraryClickEmail(){$("div.ctl_ItineraryDetail div.ItnryEmail > div:first-of-type").live("click",function(){$(this).find('a').trigger("click");});}function itineraryClickPrint(){$("div.ctl_ItineraryDetail div.ItnryPrint >
9 div:first-of-type").live("click",function(){$(this).find('a').trigger("click");});}itineraryClickName();itineraryClickNotes();itineraryClickEmail();itineraryClickPrint();})();$(document).ready(function(){(function(){UpdateItineraryCount();$(document).ready(function(){UpdateItineraryCount();if(NewMind&&NewMind.ajax&&NewMind.ajax.itinUpdated){NewMind.ajax.itinUpdated.subscribe(UpdateItineraryCount,this,true);}});function UpdateItineraryCount(){var $basket=$("div.ctl_ItineraryBasket");if($basket.length===0){return;}var $title=$basket.find("h2#ir_itinerary_yourplanner");var $count=$title.find("span.Count");if($count.length===0){$title.append("<span class=\"Count\"></span>");$title.append("<span class=\"icon\"><span class=\"iconOverlay\"></span></span>");$title.append("<span class=\"DropArrow\"></span>");$count=$title.find("span.Count");}var numberOfItems=$basket.find("table.ItineraryTbl td.item").length;if(numberOfItems===0){$count.addClass("NoItems");$basket.removeClass("itineraryActive");$basket.find(".ItineraryTbl").addClass("hide");}else{$count.removeClass("NoItems");$basket.addClass("itineraryActive");}$count.html(numberOfItems);}})();});
10(function(){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return($("div.productDetailTwitter div.twtr-pub").length>0);},MaxNumberOfAttempts:100,Success:function(){$("div.productDetailTwitter").removeClass("hide");}});})();
11$(document).ready(function(){function facebookWidth(){if(typeof(FB)!=="undefined"){FB.XFBML.parse();}}var delay=(function(){var timer=0;return function(callback,ms){clearTimeout(timer);timer=setTimeout(callback,ms);};})();var cachedWidthSpaceFix=$(window).width();$(window).resize(function(){var newWidthSpaceFix=$(window).width();if(newWidthSpaceFix!==cachedWidthSpaceFix){cachedWidthSpaceFix=newWidthSpaceFix;delay(function(){facebookWidth();},500);}});});if(typeof jQuery!='undefined'){var jqueryVersion=jQuery.fn.jquery;if(jqueryVersion!=='1.4'){function generateGoogleMapLinkOverride(){if($("body").hasClass("stage3")&&$("body").hasClass("ProductSearchSwitcher")){if((typeof(NewMind)!=="undefined")&&NewMind.Vars&&NewMind.Vars.Page&&NewMind.Vars.Page.ProductKey&&NewMind.ETWP&&NewMind.ETWP.ProductDetails&&NewMind.ETWP.ProductDetails.Location&&NewMind.mapping&&NewMind.ETWP.ProductDetails.Location[NewMind.Vars.Page.ProductKey]){var objLocation=NewMind.ETWP.ProductDetails.Location[NewMind.Vars.Page.ProductKey];$("p.googleMapLink a").attr("href","http://maps.apple.com/?q="+objLocation.Latitude+","+objLocation.Longitude);}}}if($("p.googleMapLink a").length>0){if($('p.googleMapLink a').attr("href")=="/"){generateGoogleMapLinkOverride();}}}}
12(function(){function summaryHeaderWrapper(){$('div.productList p.results, div.productList .ProdListReorder').wrapAll('<div class="SummaryHeader">');var zaText=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.zaText","Z-A");$('div.ProdListReorder a.alpha.desc span').text(zaText);$("div.searchSummary div.pnSummary ul.searchSummary li span.value div.pnAvSrchSummary ul.availdetails li:contains('Check-in')").addClass("checkIn");$("div.searchSummary div.pnSummary ul.searchSummary li span.value div.pnAvSrchSummary ul.availdetails li:contains('Check-out')").addClass("checkOut");}function hideSummaryTitle(){if($("div.searchSummary div.pnSummary").children().length>0){$("body.stage2 div.pageTitle").hide();};}function moveSearchSummary(){if($("div.searchSummary").length>0){$(this).insertAfter('div.listMapLinkContainer');};}function additionalRefineByMarkup(){$('div.refineBy form#refinesearch fieldset.refinementset div.labelContainer label.title span.addItem').click(function(){$(this).parent().addClass("selected");});$('div.refineBy form#refinesearch fieldset.refinementset div.labelContainer label.title span.removeItem').click(function(){$(this).parent().removeClass("selected");});}function applyBlueColorOnFreeProducts(){var metaPriceRange=$("meta");$.each(metaPriceRange,function(key,value){if(value.getAttribute("itemprop")=="priceRange"){var content=value.getAttribute("content");var c=content.charAt(content.indexOf("0,-")-1);if(c.search(/[^0-9]/)>-1){value.parentNode.style.color="blue";}}});}function eventListOrDetailedPageTest(){var intNumberOfAttempts=10;NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return typeof checkIfCorrectPage==="function";},MaxNumberOfAttempts:20,Success:function(){checkIfCorrectPage();}});}$(document).ready(summaryHeaderWrapper);$(document).ready(hideSummaryTitle);
12$(document).ready(additionalRefineByMarkup);if(NewMind.ETWP.ProductList){NewMind.ETWP.ProductList.listLoaded.subscribe(summaryHeaderWrapper);NewMind.ETWP.ProductList.listLoaded.subscribe(hideSummaryTitle);NewMind.ETWP.ProductList.listLoaded.subscribe(additionalRefineByMarkup);NewMind.ETWP.ProductList.listLoaded.subscribe(eventListOrDetailedPageTest);NewMind.ETWP.ProductList.listLoaded.subscribe(applyBlueColorOnFreeProducts);NewMind.ETWP.ProductList.listLoaded.subscribe(moveOpeningName);if($('div.refineBy').length){NewMind.ETWP.RefineSearchSummary.refinementStart.subscribe(summaryHeaderWrapper);NewMind.ETWP.RefineSearchSummary.refinementStart.subscribe(hideSummaryTitle);NewMind.ETWP.RefineSearchSummary.refinementStart.subscribe(additionalRefineByMarkup);NewMind.ETWP.RefineSearchSummary.refinementCompleteCallBack.subscribe(summaryHeaderWrapper);NewMind.ETWP.RefineSearchSummary.refinementCompleteCallBack.subscribe(hideSummaryTitle);NewMind.ETWP.RefineSearchSummary.refinementCompleteCallBack.subscribe(additionalRefineByMarkup);NewMind.ETWP.RefineSearchSummary.refinementAddedCallBack.subscribe(summaryHeaderWrapper);NewMind.ETWP.RefineSearchSummary.refinementAddedCallBack.subscribe(hideSummaryTitle);NewMind.ETWP.RefineSearchSummary.refinementAddedCallBack.subscribe(additionalRefineByMarkup);NewMind.ETWP.RefineSearchSummary.refinementRemovedCallBack.subscribe(summaryHeaderWrapper);NewMind.ETWP.RefineSearchSummary.refinementRemovedCallBack.subscribe(hideSummaryTitle);NewMind.ETWP.RefineSearchSummary.refinementRemovedCallBack.subscribe(additionalRefineByMarkup);NewMind.ETWP.RefineSearchSummary.productDataLoadedCallBack.subscribe(summaryHeaderWrapper);NewMind.ETWP.RefineSearchSummary.productDataLoadedCallBack.subscribe(hideSummaryTitle);NewMind.ETWP.RefineSearchSummary.productDataLoadedCallBack.subscribe(additionalRefineByMarkup);}};})();
13function featuredPagesHeight(){var featPageHeight=$('.FeatPagesBackground .gallery .galItem div').height();$('.FeatPagesBackground').css("height",featPageHeight);}function featuredPages(){$('#background-wrapper .FeatPagesBackground .gallery .galItem div').each(function(){if($(this).is(':visible')){$("#background-wrapper .FeatPagesBackground .gallery .galItem p.image a").removeAttr("href");}});}$('#background-wrapper').click(function(){featuredPages();window.setTimeout(featuredPages,500);});window.clearInterval(featuredPages);(function(){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return($(".FeatPagesBackground ul.galTBnav").length>0);},MaxNumberOfAttempts:100,Success:function(){$('.FeatPagesBackground ul.galNPnav').appendTo('.FeatPagesBackground ul.galTBnav');}});})();window.matchMedia=window.matchMedia||function(e,t){"use strict";var n,r=e.documentElement,i=r.firstElementChild||r.firstChild,s=e.createElement("body"),o=e.createElement("div");o.id="mq-test-1";o.style.cssText="position:absolute;top:-100em";s.style.background="none";s.appendChild(o);return function(e){o.innerHTML='­<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>';r.insertBefore(s,i);n=o.offsetWidth===42;r.removeChild(s);return{matches:n,media:e}}}(document);if(NewMind.ETWP.FeaturedGallery){$("div.FeatPagesBackground").each(function(){var intControlKey=NewMind.ETWP.GetControlKey(this);if(intControlKey){if(matchMedia("(max-width: 1450px)").matches){NewMind.ETWP.FeaturedGallery.OverrideGalleryImageResizerAction(intControlKey,"Background_Overlay980","SearchThumb");}}});}window.matchMedia=window.matchMedia||function(e,t){"use strict";var n,r=e.documentElement,i=r.firstElementChild||r.firstChild,s=e.createElement("body"),o=e.createElement("div");o.id="mq-test-1";o.style.cssText="position:absolute;top:-100em";s.style.background="none";s.appendChild(o);return function(e){o.innerHTML='­<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>';r.insertBefore(s,i);n=o.offsetWidth===42;r.removeChild(s);return{matches:n,media:e}}}(document);if(NewMind.ETWP.FeaturedGallery){$("div.featuredPagesWhatsOn").each(function(){var intControlKey=NewMind.ETWP.GetControlKey(this);if(intControlKey){if(matchMedia("(max-width: 1450px)").matches){NewMind.ETWP.FeaturedGallery.OverrideGalleryImageResizerAction(intControlKey,"WhatsOnFP980","SearchThumb");}}});}(function(){$("div.featuredPagesStatic ul.featured li").each(function(i){$(this).addClass("item"+(i+1));});})();
14(function($){$.jCarouselLite={version:'1.8.8',curr:0};$.fn.jCarouselLite=function(options){var o=$.extend(true,{},$.fn.jCarouselLite.defaults,options),ceil=Math.ceil,mabs=Math.abs;this.each(function(){var beforeCirc,afterCirc,pageNav,pageNavCount,resize,prepResize,touchEvents,$btnsGo,isTouch='ontouchend' in document,styles={div:{},ul:{},li:{}},firstCss=true,running=false,animCss=o.vertical?'top':'left',aniProps={},sizeProp=o.vertical?'height':'width',outerMethod=o.vertical?'outerHeight':'outerWidth',self=this,div=$(this),ul=div.find('ul').eq(0),tLi=ul.children('li'),tl=tLi.length,visibleNum=o.visible,visibleCeil=ceil(visibleNum),visibleFloor=Math.floor(visibleNum),start=Math.min(o.start,tl-1),direction=1,activeBtnOffset=0,activeBtnTypes={},startTouch={},endTouch={},axisPrimary=o.vertical?'y':'x',axisSecondary=o.vertical?'x':'y';var init=o.init.call(this,o,tLi);if(init===false){return;}div.data('dirjc',direction);div.data(animCss+'jc',div.css(animCss));if(o.circular){beforeCirc=tLi.slice(tl-visibleCeil).clone(true).each(fixIds);afterCirc=tLi.slice(0,visibleCeil).clone(true).each(fixIds);ul.prepend(beforeCirc).append(afterCirc);start+=visibleCeil;activeBtnOffset=visibleCeil;}if(o.btnGo&&o.btnGo.length){if($.isArray(o.btnGo)&&typeof o.btnGo[0]==='string'){$btnsGo=$(o.btnGo.join());}else{$btnsGo=$(o.btnGo);}$btnsGo.each(function(i){$(this).bind('click.jc',function(event){event.preventDefault();return go(o.circular?visibleNum+i:i);});});activeBtnTypes.go=1;}var setActiveBtn=function(i,types){i=ceil(i);var activeBtnIndex=(i-activeBtnOffset)%tl,visEnd=activeBtnIndex+visibleFloor;if(types.go){$btnsGo.removeClass(o.activeClass).removeClass(o.visibleClass);$btnsGo.eq(activeBtnIndex).addClass(o.activeClass);$btnsGo.slice(activeBtnIndex,activeBtnIndex+visibleFloor).addClass(o.visibleClass);if(visEnd>$btnsGo.length){$btnsGo.slice(0,visEnd-$btnsGo.length).addClass(o.visibleClass);}}if(types.pager){pageNav.removeClass(o.activeClass);pageNav.eq(ceil(activeBtnIndex/visibleNum)).addClass(o.activeClass);}return activeBtnIndex;};var li=ul.children('li'),itemLength=li.length,curr=start;$.jCarouselLite.curr=curr;var getDimensions=function(reset){var liSize,ulSize,divSize;if(reset){styles.div[sizeProp]='';styles.li={width:'',height:''};return styles;}liSize=li[outerMethod](true);ulSize=liSize*itemLength;divSize=liSize*visibleNum;styles.div[sizeProp]=divSize+'px';styles.ul[sizeProp]=ulSize+'px';styles.ul[animCss]=-(curr*liSize)+'px';styles.li={width:li.width(),height:li.height()};styles.liSize=liSize;return styles;};var setDimensions=function(reset){var css,tmpDivSize;var prelimCss={div:{visibility:'visible',position:'relative',zIndex:2,left:'0'},ul:{margin:'0',padding:'0',position:'relative',listStyleType:'none',zIndex:1},li:{overflow:o.vertical?'hidden':'visible','float':o.vertical?'none':'left'}};if(reset){css=getDimensions(true);div.css(css.div);ul.css(css.ul);li.css(css.li);}css=getDimensions();if(o.autoCSS&&firstCss){$.extend(true,css,prelimCss);firstCss=false;}if(o.autoWidth){tmpDivSize=parseInt(div.css(sizeProp),10);styles.liSize=tmpDivSize/o.visible;css.li[sizeProp]=styles.liSize-(li[outerMethod](true)-parseInt(li.css(sizeProp),10));css.ul[sizeProp]=(styles.liSize*itemLength)+'px';css.ul[animCss]=-(curr*styles.liSize)+'px';css.div[sizeProp]=tmpDivSize;}if(o.autoCSS){li.css(css.li);ul.css(css.ul);div.css(css.div);}};setDimensions();var advanceCounter=0,autoStop=iterations(tl,o),autoScrollBy=typeof o.auto==='number'?o.auto:o.scroll;var advancer=function(){self.setAutoAdvance=setTimeout(function(){if(!autoStop||autoStop>advanceCounter){direction=div.data('dirjc');go(curr+(direction*autoScrollBy),{auto:true});advanceCounter++;advancer();}},o.timeout);};$.each(['btnPrev','btnNext'],function(index,btn){if(o[btn]){o['$'+btn]=$.isFunction(o[btn])?o[btn].call(div[0]):$(o[btn]);o['$'+btn].bind('click.jc',function(event){event.preventDefault();var step=index===0?curr-o.scroll:curr+o.scroll;if(o.directional){div.data('dirjc',(index?1:-1));}return go(step);});}});if(!o.circular){if(o.btnPrev&&start===0){o.$btnPrev.addClass(o.btnDisabledClass);}if(o.btnNext&&start+visibleFloor>
14=itemLength){o.$btnNext.addClass(o.btnDisabledClass);}}if(o.autoPager){pageNavCount=ceil(tl/visibleNum);pageNav=[];for(var i=0;i<pageNavCount;i++){pageNav.push('<li><a href="#">'+(i+1)+'</a></li>');}if(pageNav.length>1){pageNav=$('<ul>'+pageNav.join('')+'</ul>').appendTo(o.autoPager).find('li');pageNav.find('a').each(function(i){$(this).bind('click.jc',function(event){event.preventDefault();var slide=i*visibleNum;if(o.circular){slide+=visibleNum;}return go(slide);});});activeBtnTypes.pager=1;}}setActiveBtn(start,activeBtnTypes);if(o.mouseWheel&&div.mousewheel){div.bind('mousewheel.jc',function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll);});}if(o.pause&&o.auto&&!isTouch){div.bind('mouseenter.jc',function(){div.trigger('pauseCarousel.jc');}).bind('mouseleave.jc',function(){div.trigger('resumeCarousel.jc');});}if(o.auto){advancer();}function vis(){return li.slice(curr).slice(0,visibleCeil);}$.jCarouselLite.vis=vis;function go(to,settings){if(running){return false;}settings=settings||{};var prev=curr,direction=to>curr,speed=settings.speed||o.speed,offset=settings.offset||0;if(o.beforeStart){o.beforeStart.call(div,vis(),direction);}li.removeClass(o.activeClass);if(o.circular){if(to>curr&&to>itemLength-visibleCeil){curr=curr%tl;to=curr+(settings.auto?autoScrollBy:o.scroll);ul.css(animCss,(-curr*styles.liSize)-offset);}else if(to<curr&&to<0){curr+=tl;to+=tl;ul.css(animCss,(-curr*styles.liSize)-offset);}curr=to+(to%1);}else{if(to<0){to=0;}else if(to>itemLength-visibleFloor){to=itemLength-visibleFloor;}curr=to;if(curr===0&&o.first){o.first.call(this,vis(),direction);}if(curr===itemLength-visibleFloor&&o.last){o.last.call(this,vis(),direction);}if(o.btnPrev){o.$btnPrev.toggleClass(o.btnDisabledClass,curr===0);}if(o.btnNext){o.$btnNext.toggleClass(o.btnDisabledClass,curr===itemLength-visibleFloor);}}setActiveBtn(curr,activeBtnTypes);$.jCarouselLite.curr=curr;if(prev===curr&&!settings.force){if(o.afterEnd){o.afterEnd.call(div,vis(),direction);}return curr;}running=true;aniProps[animCss]=-(curr*styles.liSize);ul.animate(aniProps,speed,o.easing,function(){if(o.afterEnd){o.afterEnd.call(div,vis(),direction);}running=false;});li.eq(curr).addClass(o.activeClass);return curr;}div.bind('go.jc',function(e,to,settings){if(typeof to==='undefined'){to='+=1';}var todir=typeof to==='string'&&/(\+=|-=)(\d+)/.exec(to);if(todir){to=todir[1]==='-='?curr-todir[2]*1:curr+todir[2]*1;}else{to+=start;}go(to,settings);}).bind('startCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.trigger('go','+='+o.scroll);advancer();div.removeData('pausedjc').removeData('stoppedjc');}).bind('resumeCarousel.jc',function(event,forceRun){if(self.setAutoAdvance){return;}clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;var stopped=div.data('stoppedjc');if(forceRun||!stopped){advancer();div.removeData('pausedjc');if(stopped){div.removeData('stoppedjc');}}}).bind('pauseCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.data('pausedjc',true);}).bind('stopCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.data('stoppedjc',true);}).bind('refreshCarousel.jc',function(event){setDimensions(o.autoCSS);}).bind('endCarousel.jc',function(){if(self.setAutoAdvance){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;}if(o.btnPrev){o.$btnPrev.addClass(o.btnDisabledClass).unbind('.jc');}if(o.btnNext){o.$btnNext.addClass(o.btnDisabledClass).unbind('.jc');}if(o.btnGo){$.each(o.btnGo,function(i,val){$(val).unbind('.jc');});}if(o.circular){li.slice(0,visibleCeil).remove();li.slice(-visibleCeil).remove();}$.each([animCss+'jc','pausedjc','stoppedjc','dirjc'],function(i,d){div.removeData(d);});div.unbind('.jc');});touchEvents={touchstart:function(event){endTouch.x=0;endTouch.y=0;startTouch.x=event.targetTouches[0].pageX;startTouch.y=event.targetTouches[0].pageY;startTouch[animCss]=parseFloat(ul.css(animCss));startTouch.time=+new Date();},touchmove:function(event){var tlength=event.targetTouches.length;if(tlength===1){endTouch.x=event.targetTouches[0].pageX;endTouch.y=event.targetTouches[0].pageY;aniProps[animCss]=startTouch[animCss]+(endTouch[axisPrimary]-startTouch[axisPrimary]);ul.css(aniProps);if(o.preventTouchWindowScroll){event.preventDefault();}}else{endTouch.x=startTouch.x;endTouch.y=startTouch.y;}},touchend:function(event){if(!endTouch.x){return;}var pxDelta=startTouch[axisPrimary]-endTouch[axisPrimary],pxAbsDelta=mabs(pxDelta),primaryAxisGood=pxAbsDelta>o.swipeThresholds[axisPrimary],secondaryAxisGood=mabs(startTouch[axisSecondary]-endTouch[axisSecondary])<o.swipeThresholds[axisSecondary],timeDelta=+new Date()-startTouch.time,quickSwipe=timeDelta<o.swipeThresholds.time,operator=pxDelta>0?'+=':'-=',to=operator+o.scroll,swipeInfo={force:true};
14if(quickSwipe&&primaryAxisGood&&secondaryAxisGood){swipeInfo.speed=o.speed/2;}else if((!quickSwipe&&pxAbsDelta<styles.liSize/2)||!primaryAxisGood||(quickSwipe&&!secondaryAxisGood)){to='+=0';}else if(!quickSwipe&&pxAbsDelta>styles.liSize/2){to=Math.round(pxAbsDelta/styles.liSize);to=operator+(to>o.visible?o.visible:to);swipeInfo.offset=pxDelta;}div.trigger('go.jc',[to,swipeInfo]);endTouch={};},handle:function(event){event=event.originalEvent;touchEvents[event.type](event);}};if(isTouch&&o.swipe){div.bind('touchstart.jc touchmove.jc touchend.jc',touchEvents.handle);}if(o.responsive){prepResize=o.autoCSS;$(window).bind('resize',function(event){if(prepResize){ul.width(ul.width()*2);prepResize=false;}clearTimeout(resize);resize=setTimeout(function(){div.trigger('refreshCarousel.jc');prepResize=o.autoCSS;},100);});}});return this;};$.fn.jCarouselLite.defaults={btnPrev:null,btnNext:null,btnGo:null,autoPager:null,btnDisabledClass:'disabled',activeClass:'active',visibleClass:'vis',mouseWheel:false,speed:200,easing:null,timeout:4000,auto:false,directional:false,autoStop:false,pause:true,vertical:false,circular:true,visible:3,start:0,scroll:1,autoCSS:true,responsive:false,autoWidth:false,swipe:true,swipeThresholds:{x:80,y:40,time:150},preventTouchWindowScroll:false,init:function(){},first:null,last:null,beforeStart:null,afterEnd:null};function iterations(itemLength,options){return options.autoStop&&(options.circular?options.autoStop:Math.min(itemLength,options.autoStop));}function fixIds(i){if(this.id){this.id+=i;}}})(jQuery);
15(function($){$.jCarouselLiteFeaturedItems={version:'1.8.8',curr:0};$.fn.jCarouselLiteFeaturedItems=function(options){var o=$.extend(true,{},$.fn.jCarouselLiteFeaturedItems.defaults,options),ceil=Math.ceil,mabs=Math.abs;this.each(function(){var beforeCirc,afterCirc,pageNav,pageNavCount,resize,prepResize,touchEvents,$btnsGo,isTouch='ontouchend' in document,styles={div:{},ul:{},li:{}},firstCss=true,running=false,animCss=o.vertical?'top':'left',aniProps={},sizeProp=o.vertical?'height':'width',outerMethod=o.vertical?'outerHeight':'outerWidth',self=this,div=$(this),ul=div.find('ol').eq(0),tLi=ul.children('li'),tl=tLi.length,visibleNum=o.visible,visibleCeil=ceil(visibleNum),visibleFloor=Math.floor(visibleNum),start=Math.min(o.start,tl-1),direction=1,activeBtnOffset=0,activeBtnTypes={},startTouch={},endTouch={},axisPrimary=o.vertical?'y':'x',axisSecondary=o.vertical?'x':'y';var init=o.init.call(this,o,tLi);if(init===false){return;}div.data('dirjc',direction);div.data(animCss+'jc',div.css(animCss));if(o.circular){beforeCirc=tLi.slice(tl-visibleCeil).clone(true).each(fixIds);afterCirc=tLi.slice(0,visibleCeil).clone(true).each(fixIds);ul.prepend(beforeCirc).append(afterCirc);start+=visibleCeil;activeBtnOffset=visibleCeil;}if(o.btnGo&&o.btnGo.length){if($.isArray(o.btnGo)&&typeof o.btnGo[0]==='string'){$btnsGo=$(o.btnGo.join());}else{$btnsGo=$(o.btnGo);}$btnsGo.each(function(i){$(this).bind('click.jc',function(event){event.preventDefault();return go(o.circular?visibleNum+i:i);});});activeBtnTypes.go=1;}var setActiveBtn=function(i,types){i=ceil(i);var activeBtnIndex=(i-activeBtnOffset)%tl,visEnd=activeBtnIndex+visibleFloor;if(types.go){$btnsGo.removeClass(o.activeClass).removeClass(o.visibleClass);$btnsGo.eq(activeBtnIndex).addClass(o.activeClass);$btnsGo.slice(activeBtnIndex,activeBtnIndex+visibleFloor).addClass(o.visibleClass);if(visEnd>$btnsGo.length){$btnsGo.slice(0,visEnd-$btnsGo.length).addClass(o.visibleClass);}}if(types.pager){pageNav.removeClass(o.activeClass);pageNav.eq(ceil(activeBtnIndex/visibleNum)).addClass(o.activeClass);}return activeBtnIndex;};var li=ul.children('li'),itemLength=li.length,curr=start;$.jCarouselLiteFeaturedItems.curr=curr;var getDimensions=function(reset){var liSize,ulSize,divSize;if(reset){styles.div[sizeProp]='';styles.li={width:'',height:''};return styles;}liSize=li[outerMethod](true);ulSize=liSize*itemLength;divSize=liSize*visibleNum;styles.div[sizeProp]=divSize+'px';styles.ul[sizeProp]=ulSize+'px';styles.ul[animCss]=-(curr*liSize)+'px';styles.li={width:li.width(),height:li.height()};styles.liSize=liSize;return styles;};var setDimensions=function(reset){var css,tmpDivSize;var prelimCss={div:{visibility:'visible',position:'relative',zIndex:2,left:'0'},ul:{margin:'0',padding:'0',position:'relative',listStyleType:'none',zIndex:1},li:{overflow:o.vertical?'hidden':'visible','float':o.vertical?'none':'left'}};if(reset){css=getDimensions(true);div.css(css.div);ul.css(css.ul);li.css(css.li);}css=getDimensions();if(o.autoCSS&&firstCss){$.extend(true,css,prelimCss);firstCss=false;}if(o.autoWidth){tmpDivSize=parseInt(div.css(sizeProp),10);styles.liSize=tmpDivSize/o.visible;css.li[sizeProp]=styles.liSize-(li[outerMethod](true)-parseInt(li.css(sizeProp),10));css.ul[sizeProp]=(styles.liSize*itemLength)+'px';css.ul[animCss]=-(curr*styles.liSize)+'px';css.div[sizeProp]=tmpDivSize;}
15if(o.autoCSS){li.css(css.li);ul.css(css.ul);div.css(css.div);}};setDimensions();var advanceCounter=0,autoStop=iterations(tl,o),autoScrollBy=typeof o.auto==='number'?o.auto:o.scroll;var advancer=function(){self.setAutoAdvance=setTimeout(function(){if(!autoStop||autoStop>advanceCounter){direction=div.data('dirjc');go(curr+(direction*autoScrollBy),{auto:true});advanceCounter++;advancer();}},o.timeout);};$.each(['btnPrev','btnNext'],function(index,btn){if(o[btn]){o['$'+btn]=$.isFunction(o[btn])?o[btn].call(div[0]):$(o[btn]);o['$'+btn].bind('click.jc',function(event){event.preventDefault();var step=index===0?curr-o.scroll:curr+o.scroll;if(o.directional){div.data('dirjc',(index?1:-1));}return go(step);});}});if(!o.circular){if(o.btnPrev&&start===0){o.$btnPrev.addClass(o.btnDisabledClass);}if(o.btnNext&&start+visibleFloor>=itemLength){o.$btnNext.addClass(o.btnDisabledClass);}}if(o.autoPager){pageNavCount=ceil(tl/visibleNum);pageNav=[];for(var i=0;i<pageNavCount;i++){pageNav.push('<li><a href="#">'+(i+1)+'</a></li>');}if(pageNav.length>1){pageNav=$('<ul>'+pageNav.join('')+'</ul>').appendTo(o.autoPager).find('li');pageNav.find('a').each(function(i){$(this).bind('click.jc',function(event){event.preventDefault();var slide=i*visibleNum;if(o.circular){slide+=visibleNum;}return go(slide);});});activeBtnTypes.pager=1;}}setActiveBtn(start,activeBtnTypes);if(o.mouseWheel&&div.mousewheel){div.bind('mousewheel.jc',function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll);});}if(o.pause&&o.auto&&!isTouch){div.bind('mouseenter.jc',function(){div.trigger('pauseCarousel.jc');}).bind('mouseleave.jc',function(){div.trigger('resumeCarousel.jc');});}if(o.auto){advancer();}function vis(){return li.slice(curr).slice(0,visibleCeil);}$.jCarouselLiteFeaturedItems.vis=vis;function go(to,settings){if(running){return false;}settings=settings||{};var prev=curr,direction=to>curr,speed=settings.speed||o.speed,offset=settings.offset||0;if(o.beforeStart){o.beforeStart.call(div,vis(),direction);}li.removeClass(o.activeClass);if(o.circular){if(to>curr&&to>itemLength-visibleCeil){curr=curr%tl;to=curr+(settings.auto?autoScrollBy:o.scroll);ul.css(animCss,(-curr*styles.liSize)-offset);}else if(to<curr&&to<0){curr+=tl;to+=tl;ul.css(animCss,(-curr*styles.liSize)-offset);}curr=to+(to%1);}else{if(to<0){to=0;}else if(to>itemLength-visibleFloor){to=itemLength-visibleFloor;}curr=to;if(curr===0&&o.first){o.first.call(this,vis(),direction);}if(curr===itemLength-visibleFloor&&o.last){o.last.call(this,vis(),direction);}if(o.btnPrev){o.$btnPrev.toggleClass(o.btnDisabledClass,curr===0);}if(o.btnNext){o.$btnNext.toggleClass(o.btnDisabledClass,curr===itemLength-visibleFloor);}}setActiveBtn(curr,activeBtnTypes);$.jCarouselLiteFeaturedItems.curr=curr;if(prev===curr&&!settings.force){if(o.afterEnd){o.afterEnd.call(div,vis(),direction);}return curr;}running=true;aniProps[animCss]=-(curr*styles.liSize);ul.animate(aniProps,speed,o.easing,function(){if(o.afterEnd){o.afterEnd.call(div,vis(),direction);}running=false;});li.eq(curr).addClass(o.activeClass);return curr;}div.bind('go.jc',function(e,to,settings){if(typeof to==='undefined'){to='+=1';}var todir=typeof to==='string'&&/(\+=|-=)(\d+)/.exec(to);if(todir){to=todir[1]==='-='?curr-todir[2]*1:curr+todir[2]*1;}else{to+=start;}go(to,settings);}).bind('startCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.trigger('go','+='+o.scroll);advancer();div.removeData('pausedjc').removeData('stoppedjc');}).bind('resumeCarousel.jc',function(event,forceRun){if(self.setAutoAdvance){return;}clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;var stopped=div.data('stoppedjc');if(forceRun||!stopped){advancer();div.removeData('pausedjc');if(stopped){div.removeData('stoppedjc');}}}).bind('pauseCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.data('pausedjc',true);}).bind('stopCarousel.jc',function(event){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;div.data('stoppedjc',true);}).bind('refreshCarousel.jc',function(event){setDimensions(o.autoCSS);}
15).bind('endCarousel.jc',function(){if(self.setAutoAdvance){clearTimeout(self.setAutoAdvance);self.setAutoAdvance=undefined;}if(o.btnPrev){o.$btnPrev.addClass(o.btnDisabledClass).unbind('.jc');}if(o.btnNext){o.$btnNext.addClass(o.btnDisabledClass).unbind('.jc');}if(o.btnGo){$.each(o.btnGo,function(i,val){$(val).unbind('.jc');});}if(o.circular){li.slice(0,visibleCeil).remove();li.slice(-visibleCeil).remove();}$.each([animCss+'jc','pausedjc','stoppedjc','dirjc'],function(i,d){div.removeData(d);});div.unbind('.jc');});touchEvents={touchstart:function(event){endTouch.x=0;endTouch.y=0;startTouch.x=event.targetTouches[0].pageX;startTouch.y=event.targetTouches[0].pageY;startTouch[animCss]=parseFloat(ul.css(animCss));startTouch.time=+new Date();},touchmove:function(event){var tlength=event.targetTouches.length;if(tlength===1){endTouch.x=event.targetTouches[0].pageX;endTouch.y=event.targetTouches[0].pageY;aniProps[animCss]=startTouch[animCss]+(endTouch[axisPrimary]-startTouch[axisPrimary]);ul.css(aniProps);if(o.preventTouchWindowScroll){event.preventDefault();}}else{endTouch.x=startTouch.x;endTouch.y=startTouch.y;}},touchend:function(event){if(!endTouch.x){return;}var pxDelta=startTouch[axisPrimary]-endTouch[axisPrimary],pxAbsDelta=mabs(pxDelta),primaryAxisGood=pxAbsDelta>o.swipeThresholds[axisPrimary],secondaryAxisGood=mabs(startTouch[axisSecondary]-endTouch[axisSecondary])<o.swipeThresholds[axisSecondary],timeDelta=+new Date()-startTouch.time,quickSwipe=timeDelta<o.swipeThresholds.time,operator=pxDelta>0?'+=':'-=',to=operator+o.scroll,swipeInfo={force:true};if(quickSwipe&&primaryAxisGood&&secondaryAxisGood){swipeInfo.speed=o.speed/2;}else if((!quickSwipe&&pxAbsDelta<styles.liSize/2)||!primaryAxisGood||(quickSwipe&&!secondaryAxisGood)){to='+=0';}else if(!quickSwipe&&pxAbsDelta>styles.liSize/2){to=Math.round(pxAbsDelta/styles.liSize);to=operator+(to>o.visible?o.visible:to);swipeInfo.offset=pxDelta;}div.trigger('go.jc',[to,swipeInfo]);endTouch={};},handle:function(event){event=event.originalEvent;touchEvents[event.type](event);}};if(isTouch&&o.swipe){div.bind('touchstart.jc touchmove.jc touchend.jc',touchEvents.handle);}if(o.responsive){prepResize=o.autoCSS;$(window).bind('resize',function(event){if(prepResize){ul.width(ul.width()*2);prepResize=false;}clearTimeout(resize);resize=setTimeout(function(){div.trigger('refreshCarousel.jc');prepResize=o.autoCSS;},100);});}});return this;};$.fn.jCarouselLiteFeaturedItems.defaults={btnPrev:null,btnNext:null,btnGo:null,autoPager:null,btnDisabledClass:'disabled',activeClass:'active',visibleClass:'vis',mouseWheel:false,speed:200,easing:null,timeout:4000,auto:false,directional:false,autoStop:false,pause:true,vertical:false,circular:true,visible:3,start:0,scroll:1,autoCSS:true,responsive:false,autoWidth:false,swipe:true,swipeThresholds:{x:80,y:40,time:150},preventTouchWindowScroll:false,init:function(){},first:null,last:null,beforeStart:null,afterEnd:null};function iterations(itemLength,options){return options.autoStop&&(options.circular?options.autoStop:Math.min(itemLength,options.autoStop));}function fixIds(i){if(this.id){this.id+=i;}}})(jQuery);
16(function(){$("select.openingMinutes, select.closingMinutes").each(function(){var arrIndicesToRemove=[];$(this).children("option").each(function(i){if(this.value&&($(this).css("display")==="none")){arrIndicesToRemove.push(i);}});for(var intIndex=arrIndicesToRemove.length-1;intIndex>=0;intIndex--){this.remove(arrIndicesToRemove[intIndex]);}});})();(function(){if($('div.form.EventSubmissionForm form.form div.form div.row.productOpenings div.help').length>0){$('div.form.EventSubmissionForm form.form div.form div.row.productOpenings div.help').insertBefore('div.form.EventSubmissionForm form.form div.form div.row.productOpenings h3.label');}})();
17NewMind.registerNameSpace("NewMind.Site");NewMind.Site.FeaturedThisMonth=function(){var $primaryListItems=$('.featuresThisMonth .Highlight');$($primaryListItems).each(function(i){$(this).children().wrapAll('<li>').parent().addClass("item"+(i+1));});var $primaryListItems=$('.featuresThisMonth .Highlight li');var controlTitle=$('.featuresThisMonth h2.ControlTitle');$('.featuresThisMonth').prepend('<div class="featureslistprimarywrapper"></div>');var $featuresListPrimary=$('<ul class="featuresListPrimary"></ul>');$primaryListItems.each(function(){$(this).appendTo($featuresListPrimary);});$('.featureslistprimarywrapper').append($featuresListPrimary);$(controlTitle).insertBefore('.featuresThisMonth .featureslistprimarywrapper');$('<div class="prev"><img src="/images/arrows/arrow_left_block.png" alt="Prev" title="More Special features" /></div>').appendTo('.featuresThisMonth');$('<div class="next"><img src="/images/arrows/arrow_right_block.png" alt="Next" title="More Special features" /></div>').appendTo('.featuresThisMonth');if(navigator.appVersion.indexOf("MSIE 7.")!==-1){$(".featuresThisMonth").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:false,responsive:false,visible:3,speed:800,pause:true,btnPrev:".featuresThisMonth .prev",btnNext:".featuresThisMonth .next"});}else if(navigator.appVersion.indexOf("MSIE 8.")!==-1){$(".featuresThisMonth").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:false,responsive:false,visible:3,speed:800,pause:true,btnPrev:".featuresThisMonth .prev",btnNext:".featuresThisMonth .next"});}else{$(".featuresThisMonth").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:true,responsive:true,visible:3,speed:800,pause:true,btnPrev:".featuresThisMonth .prev",btnNext:".featuresThisMonth .next"});}};NewMind.Site.FeaturedThisMonth();
18(function(){NewMind.registerNameSpace("NewMind.Site").StylesUpdated=function(){var arrUrls=[];$("head style").each(function(){var reRefreshCSSUpdatedStyleSheetMatches=this.innerHTML.match(/\/styles\/(style|style2).*?_v999[0-9]+.cssx/g);if(reRefreshCSSUpdatedStyleSheetMatches){for(var i=0;i<reRefreshCSSUpdatedStyleSheetMatches.length;i++){arrUrls.push(reRefreshCSSUpdatedStyleSheetMatches[i]);}}
18});if(arrUrls.length===0){arrUrls.push("/styles/style.css");arrUrls.push("/styles/style2.css");}var arrErrorMessages=[];var intSuccessCount=0;for(var i=0;i<arrUrls.length;i++){$.get(arrUrls[i],function(data,status){data=$.trim(""+data);if((data.length>0)&&(data.length<1000)){arrErrorMessages.push(data);}else{intSuccessCount++;}if((arrErrorMessages.length+intSuccessCount)===arrUrls.length){displayErrorMessages(arrErrorMessages.join("<br/><br/>"));}});}function displayErrorMessages(strErrorMessages){var strId="LESSWarning";var objEleOut=document.getElementById(strId);if(!strErrorMessages){if(objEleOut){objEleOut.remove();}return;}if(!objEleOut){objEleOut=document.createElement("div");objEleOut.style.position="absolute";objEleOut.style.zIndex="50000";objEleOut.style.top=0;objEleOut.style.right=0;objEleOut.style.width="30%";objEleOut.style.fontFamily="'Segoe UI', Verdana";if(jQuery.support.opacity){objEleOut.style.backgroundColor="rgba(0, 0, 255, 0.5)";}else{objEleOut.style.background="transparent";objEleOut.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f0000ff,endColorstr=#7f0000ff)";}objEleOut.style.color="white";objEleOut.style.padding="8px 16px";objEleOut.style.fontSize="16px";objEleOut.id=strId;var objCont=document.body;if(objCont.childNodes.length===0){objCont.appendChild(objEleOut);}else{objCont.insertBefore(objEleOut,objCont.childNodes[0]);}}objEleOut.innerHTML=strErrorMessages}};if(NewMind&&NewMind.env&&NewMind.env.platform&&NewMind.env.platform.traceIsEnabled){NewMind.Site.StylesUpdated();}})();
19(function(){$('.productSearchMobile form#refineBySearchForm').hide();$('.productSearchMobile .accommodationSearchImg h2.ir').click(function(){if($(this).is(':visible')&&!$('form.searchform').is(':animated')){if($(this).hasClass('showHide')){$(this).removeClass('showHide');$(this).parent().next().slideUp("slow");$(this).closest(".productSearchMobile").removeClass('showSearch');}else{$('.productSearchMobile h2').removeClass('showHide');$(".productSearchMobile").removeClass('showSearch');$(this).addClass('showHide');$('.productSearchMobile form.searchform').slideUp();$(this).parent().next().slideDown("slow");$(this).closest(".productSearchMobile").addClass('showSearch');}}return false;});if(($('body.sykkel, body.vandretelemark, body.skien, body.porsgrunn, body.kragero, body.bamble, body.vest-telemark-museum, body.dalen, body.seljord, body.notodden, body.telemarksvegen')).hasClass('whatsOn')){$('div.productSearchMobileEven .accommodationSearchImg h2.ir').click();}})();
20(function(){function moveHeaderItems(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()||NewMind.Site.BreakPoints.IsTabletPortraitOnly()){}else{}}function moveContactInformation(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()||NewMind.Site.BreakPoints.IsTabletPortraitOnly()){if($(".rightCol .contactDetails").length>0){$(".rightCol .contactDetails").detach().prependTo('.mainColWrapper');}if($(".rightCol .productDetailExternal").length>0){$(".mainColWrapper .productDetailExternal").hide();}}else{if($(".mainColWrapper .contactDetails").length>0){$(".mainColWrapper .contactDetails").detach().appendTo('.rightCol');}if($(".mainColWrapper .productDetailExternal").length>0){$(".mainColWrapper .productDetailExternal").show();}}}$(window).resize(moveContactInformation);$(document).ready(moveContactInformation);})();
21(function(){function siteSearch(){$('div.siteSearchIcon, div.siteSearchOverlayClose').click(function(){$("div.siteSearch").toggleClass('siteSearchOpen');$("div#siteSearchOverlay").toggleClass('siteSearchOverlayOpen');});}siteSearch();})();
22(function(){$('.productDetailVideos .VIDEO-YOUTUBE ul.video li iframe').attr('height','100%').attr('width','95%');function mobileVideoHeight(){if(NewMind.Site.BreakPoints.IsSuperDesktopOnly()){$('.productDetailVideos .VIDEO-YOUTUBE ul.video li iframe').css("height","436px");}else if(NewMind.Site.BreakPoints.IsBigTabletLandscapeOnly()||NewMind.Site.BreakPoints.IsSmallTabletLandscapeOnly()||NewMind.Site.BreakPoints.IsTabletPortraitOnly()){$('.productDetailVideos .VIDEO-YOUTUBE ul.video li iframe').css("height","350px");}else if(NewMind.Site.BreakPoints.IsMobileOnly()){$('.productDetailVideos .VIDEO-YOUTUBE ul.video li iframe').css("height","200px");}else if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()){$('.productDetailVideos .VIDEO-YOUTUBE ul.video li iframe').css("height","150px");}}mobileVideoHeight();$(window).resize(mobileVideoHeight);})();
23(function(){$(function(){var chooseMonths=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.chooseMonths","Choose Month");var viewAllEevents=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.viewAllEevents","View All Events");var hideMonths=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.hideMonths","Hide Months");var viewAllEeventsLink=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.viewAllEventsLink","/whats-on/searchresults?sr=1&amp;rd=on&amp;anydate=yes");$('div.whatsOnMonthly').prepend('<div class="whatsOnMonthlyShowMonths"><span class="ShowMonths">'+chooseMonths+'</span></div>');$('div.whatsOnMonthly div.GroupLinks ul').append('<li class="viewAll">'+viewAllEevents+'</li>');$('li.viewAll').click(function(){window.location=viewAllEeventsLink;});var strHiddenClassCal="whatsOnMonthlyResponsiveHidden";var $dropDownCalendarButton=$("div.whatsOnMonthly div.whatsOnMonthlyShowMonths span.ShowMonths");var $groupLinks=$(".whatsOnMonthly div.GroupLinks");$groupLinks.addClass(strHiddenClassCal);$dropDownCalendarButton.toggle(function(){$groupLinks.removeClass('monthChosen');$groupLinks.hide().removeClass(strHiddenClassCal).slideDown("fast");$dropDownCalendarButton.addClass('monthsOpen').html(hideMonths);},function(){$groupLinks.slideUp("fast",function(){$(this).addClass(strHiddenClassCal).show();});$dropDownCalendarButton.removeClass('monthsOpen').html(chooseMonths);});});})();
24(function(){$('<div class="prev"><img src="/images/arrows/arrow_left_block.png" alt="Prev" title="More" /></div>').appendTo('.featuredPagesScrollDesktop');$('<div class="next"><img src="/images/arrows/arrow_right_block.png" alt="Next" title="More" /></div>').appendTo('.featuredPagesScrollDesktop');if(navigator.appVersion.indexOf("MSIE 7.")!==-1){$(".featuredPagesScrollDesktop").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:false,responsive:true,visible:4,speed:800,pause:true,scroll:4,btnPrev:".featuredPagesScrollDesktop .prev",btnNext:".featuredPagesScrollDesktop .next",afterEnd:function(){if(NewMind.ETWP&&NewMind.ETWP.LazyLoadImages){NewMind.ETWP.LazyLoadImages.RegisterLazyLoadTrigger();}}});}else if(navigator.appVersion.indexOf("MSIE 8.")!==-1){$(".featuredPagesScrollDesktop").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:false,responsive:true,visible:4,speed:800,scroll:4,pause:true,btnPrev:".featuredPagesScrollDesktop .prev",btnNext:".featuredPagesScrollDesktop .next",afterEnd:function(){if(NewMind.ETWP&&NewMind.ETWP.LazyLoadImages){NewMind.ETWP.LazyLoadImages.RegisterLazyLoadTrigger();}}});}else{$(".featuredPagesScrollDesktop").jCarouselLite({auto:true,timeout:15000,circular:true,autoWidth:true,responsive:true,visible:4,speed:800,pause:true,scroll:4,btnPrev:".featuredPagesScrollDesktop .prev",btnNext:".featuredPagesScrollDesktop .next",afterEnd:function(){if(NewMind.ETWP&&NewMind.ETWP.LazyLoadImages){NewMind.ETWP.LazyLoadImages.RegisterLazyLoadTrigger();}}});}})();
25(function(){NewMind.registerNameSpace("NewMind.Site");(function(){function multiSearchClass(){$('.productSearch, #again').removeClass('openMulti');$(".productSearch div.prodMltSrch, #again div.prodMltSrch").each(function(i){if($(this).hasClass('open')){$(this).parent().addClass('openMulti');}});}$(document).ready(multiSearchClass);if(NewMind.ETWP.MultiSearchSwitcher){NewMind.ETWP.MultiSearchSwitcher.CallBackEvent.subscribe(multiSearchClass);};})();})();
26$(document).ready(function(){function MoveDontMissControls(){$('.dontMissNavAcco').appendTo('.navigationMain ul li.accommodation ul.sub1');$('.dontMissNavFood').appendTo('.navigationMain ul li.eating ul.sub1');$('.dontMissNavInspire').appendTo('.navigationMain ul li.inspiration ul.sub1');$('.dontMissNavPracInfo').appendTo('.navigationMain ul li.praticalInfo ul.sub1');$('.dontMissNavShop').appendTo('.navigationMain ul li.shop ul.sub1');$('.dontMissNavTtd').appendTo('.navigationMain ul li.ttd ul.sub1');$('.dontMissNavWhatsOn').appendTo('.navigationMain ul li.whatsOn ul.sub1');
26if(NewMind.ETWP.LazyLoadImages){var imgFP=$('.navigationMain .dontMissNav ul li a img');NewMind.ETWP.LazyLoadImages.LoadSpecificLazyImages(imgFP);};$("div.dontMissNav").each(function(i){$(this).find('ul li:last-child').each(function(i){$(this).addClass("lastItem");});});}NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.megamenu ul li ul.sub").length>0;},MaxNumberOfAttempts:200,Success:function(){MoveDontMissControls();}});});
27(function(){$("div.featuredItems div.wrapper>ol>li div.item-content").each(function(){$(this).find('div.title, div.description, ol.openings').wrapAll('<div class="featuredItemsInnerContent">');});function WrapFeaturedItems(){$("div.featuredItems div.wrapper > ol li.AlignLeftWrapTwo").each(function(i){$(this).nextAll().slice(0,2).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperNext"></div>');});$("div.featuredItems div.wrapper > ol li.AlignLeftWrapThree").each(function(i){$(this).nextAll().slice(0,3).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperNext featuredItemsInnerWrapperNextThree"></div>');});$("div.featuredItems div.wrapper > ol li.AlignLeftWrapFour").each(function(i){$(this).nextAll().slice(0,4).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperNext featuredItemsInnerWrapperNextFour"></div>');});$("div.featuredItems div.wrapper > ol li.AlignRightWrapTwo").each(function(i){$(this).prevAll().slice(0,2).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperPrev"></div>');});$("div.featuredItems div.wrapper > ol li.AlignRightWrapThree").each(function(i){$(this).prevAll().slice(0,3).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperPrev featuredItemsInnerWrapperPrevThree"></div>');});$("div.featuredItems div.wrapper > ol li.AlignRightWrapFour").each(function(i){$(this).prevAll().slice(0,4).wrapAll('<div class="featuredItemsInnerWrapper featuredItemsInnerWrapperPrev featuredItemsInnerWrapperPrevFour"></div>');});}if($("div.featuredItems div.wrapper > ol > li.loading").length>0){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.featuredItems div.wrapper > ol > li.loading").length===0;},MaxNumberOfAttempts:2000,Success:function(){WrapFeaturedItems();}});}else{WrapFeaturedItems();}function setTextContentHeight(){$("div.featuredItems div.wrapper>ol li.TextContentBlock").each(function(i){if(NewMind.ETWP.LazyLoadImages){var loadFirstItemsImage=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img');NewMind.ETWP.LazyLoadImages.LoadSpecificLazyImages(loadFirstItemsImage);var obtainImageHeight=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img').height();$(this).css("min-height",obtainImageHeight);}else{var obtainImageHeight=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img').height();$(this).css("min-height",obtainImageHeight);}});$("div.featuredItems div.wrapper>ol li.YouTubeVideoBlock").each(function(i){if(NewMind.ETWP.LazyLoadImages){var loadFirstItemsImage=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img');NewMind.ETWP.LazyLoadImages.LoadSpecificLazyImages(loadFirstItemsImage);var obtainImageHeight=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img').height();$(this).find('iframe').css("min-height",obtainImageHeight);}else{var obtainImageHeight=$('div.featuredItems div.wrapper>ol li.size1x1:first-of-type').not(".TextContentBlock").find('img').height();$(this).find('iframe').css("min-height",obtainImageHeight);}});}$(window).load(setTextContentHeight);var cachedWidthSpaceFix=$(window).width();$(window).resize(function(){var newWidthSpaceFix=$(window).width();if(newWidthSpaceFix!==cachedWidthSpaceFix){cachedWidthSpaceFix=newWidthSpaceFix;setTextContentHeight();}});})();
28(function(){function HoverOnFeaturedItems(){var $control=$('div.featuredItemsHover');var $item=$control.find('li');$item.each(function(index){var itemHeight=$(this).innerHeight();var $featuredItemHover=$(this).find('div.featuredItemsInnerContent');var $title=$(this).find('div.title');
28var titleHeight=$title.innerHeight();var $description=$(this).find('div.description');var descriptionHeight=$description.innerHeight();var contentHeight=(itemHeight-(titleHeight+descriptionHeight))*0.5;var bottomValue=itemHeight*-1+titleHeight;var styles={height:itemHeight,bottom:bottomValue};$featuredItemHover.css(styles);$(this).hover(function(){$featuredItemHover.addClass('hover').css('bottom',0);},function(){$featuredItemHover.removeClass('hover').css('bottom',bottomValue);$title.css('top','0px');});});}$(window).load(HoverOnFeaturedItems);var cachedWidthSpaceFix=$(window).width();$(window).resize(function(){var newWidthSpaceFix=$(window).width();if(newWidthSpaceFix!==cachedWidthSpaceFix){cachedWidthSpaceFix=newWidthSpaceFix;HoverOnFeaturedItems();}});(function(){if(NewMind.ETWP.LazyLoadImages){NewMind.ETWP.LazyLoadImages.AddPreLoadCallback(resizeImage);}function resizeImage(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){NewMind.ETWP.LazyLoadImagesExtensions.RewriteImageResizerAction('FeaturedItems2x1','FeaturedItems1x1');NewMind.ETWP.LazyLoadImagesExtensions.RewriteImageResizerAction('FeaturedItems2x2','FeaturedItems1x1');}}function FeaturedItemsShowMore(featuredItemsControl){$(featuredItemsControl).each(function(){var showMore=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.showMore","Show More");var showLess=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.showLess","Show Less");$(featuredItemsControl).find("div.wrapper > ol").children(':lt(3)').addClass('showItemAlways');if($(featuredItemsControl).find("div.wrapper > ol").children().length>3){$(featuredItemsControl).find('div.wrapper > ol').append('<div class="showMore">'+showMore+'</div>');$(featuredItemsControl).find('div.showMore').toggle(function(){$(featuredItemsControl).find("div.wrapper > ol").children().addClass('showItem');$(featuredItemsControl).find("div.wrapper > ol div.showMore").text(showLess).addClass('showLess');},function(){$(featuredItemsControl).find("div.wrapper > ol").children().removeClass('showItem');$(featuredItemsControl).find("div.wrapper > ol div.showMore").text(showMore).removeClass('showLess');$('html, body').animate({scrollTop:$(featuredItemsControl).offset().top},1000);});}});}if($('div#featuredItemsHigher').length&&$('div#featuredItemsLower').length&&$('div#featuredItemsMiddle').length){FeaturedItemsShowMore('div#featuredItemsHigher');FeaturedItemsShowMore('div#featuredItemsLower');FeaturedItemsShowMore('div#featuredItemsMiddle');}else if($('div#featuredItemsHigher').length&&$('div#featuredItemsLower').length){FeaturedItemsShowMore('div#featuredItemsHigher');FeaturedItemsShowMore('div#featuredItemsLower');}else if($('div#featuredItemsHigher').length&&$('div#featuredItemsMiddle').length&&!$('div#featuredItemsLower').length){FeaturedItemsShowMore('div#featuredItemsHigher');FeaturedItemsShowMore('div#featuredItemsMiddle');}else if($('div.featuredItemsOne').length||$('div.featuredItemsTwo').length||$('div.featuredItemsThree').length||$('div.featuredItemsFour').length||$('div.featuredItemsFive').length){FeaturedItemsShowMore('div.featuredItemsOne');FeaturedItemsShowMore('div.featuredItemsTwo');FeaturedItemsShowMore('div.featuredItemsThree');FeaturedItemsShowMore('div.featuredItemsFour');FeaturedItemsShowMore('div.featuredItemsFive');}else{FeaturedItemsShowMore('div.featuredItems');}})();})();
29NewMind.registerNameSpace("NewMind.Site");function FeaturedItemsScrollWrapping(target){function contentWrapping(){$(target).find("div.wrapper>ol>li div.item-content").each(function(){$(this).find('div.title, div.description, ol.openings').wrapAll('<div class="featuredItemsInnerContent">');$(this).find('div.featuredItemsInnerContent').wrapAll('<div class="featuredItemsContent">');var $MediaNoteInner=$(this).find("div.featuredItemsInnerContent");var $itemlink=$(this).find("a").attr('href');});}if($(target).find('div.wrapper>ol li').length>1){contentWrapping();}else{contentWrapping();}}(function(){$(window).load(function(){FeaturedItemsScrollWrapping('div.featItemJSScroll1');});})();function FeaturedItemsScroll(target){var resizeFromTop='FeaturedItemsScroll20193x2';var resizeFromBottom='FeaturedItems4x3';var resizeTo='FeaturedItemsScroll20191x1';if(NewMind.ETWP.LazyLoadImages){NewMind.ETWP.LazyLoadImages.AddPreLoadCallback(resizeImage);}function resizeImage(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){NewMind.ETWP.LazyLoadImagesExtensions.RewriteImageResizerAction(resizeFromTop,resizeTo);NewMind.ETWP.LazyLoadImagesExtensions.RewriteImageResizerAction();}}function moveVideoOrNot(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){$videoContainer=$('div.MobileVideoButton');$obtainVideo=$(target).find('div.wrapper>ol li.VimeoVideo').first();$($obtainVideo).appendTo($videoContainer);$obtainNewVideo=$('div.MobileVideoButton li.VimeoVideo');$obtainNewVideoAttr=$('div.MobileVideoButton li.VimeoVideo video');$videoOpenLink=$('div.MobileVideoButton .videoPlayButton');setTimeout(function(){$($obtainNewVideo).each(function(){if(!$(this).hasClass("customButtonsAdded")){$($videoContainer).css("display","block");videoControls=$('<div class="videoControls"></div>');$videoUnmute=$('<div class="videoControl videoUnmute"></div>');$videoMute=$('<div class="videoControl videoMute soundOptionHide"></div>');$videoPause=$('<div class="videoControl videoPause"></div>');
29$videoPlay=$('<div class="videoControl videoPlay soundOptionHide"></div>');videoControls.append($videoUnmute,$videoMute,$videoPause,$videoPlay);$(this).append(videoControls);var obtainIframe=$(this).find('video');var obtainVideoMute=$(this).find('div.videoMute');var obtainVideoUnMute=$(this).find('div.videoUnmute');var obtainVideoPause=$(this).find('div.videoPause');var obtainVideoPlay=$(this).find('div.videoPlay');$(obtainVideoMute).click(function(){$(obtainIframe).prop('muted',true);$(this).addClass('soundOptionHide');$(obtainVideoUnMute).removeClass('soundOptionHide');});$(obtainVideoUnMute).click(function(){$(obtainIframe).prop('muted',false);$(this).addClass('soundOptionHide');$(obtainVideoMute).removeClass('soundOptionHide');});$(obtainVideoPause).click(function(){$(obtainIframe).get(0).pause();$(this).addClass('soundOptionHide');$(obtainVideoPlay).removeClass('soundOptionHide');});$(obtainVideoPlay).click(function(){$(obtainIframe).get(0).play();$(this).addClass('soundOptionHide');$(obtainVideoPause).removeClass('soundOptionHide');});$(this).addClass('customButtonsAdded');}});},1000);$($videoOpenLink).toggle(function(){$($obtainNewVideo).slideDown('fast');$($obtainNewVideoAttr).get(0).play();$(this).addClass("close");},function(){$($obtainNewVideo).slideUp('fast');$($obtainNewVideoAttr).get(0).pause();$(this).removeClass("close");});}}moveVideoOrNot();function videoCustomControlsYouTubeVimeoEmbed(){setTimeout(function(){$(target).find("div.wrapper>ol li.YouTubeVideoBlock, div.wrapper>ol li.VimeoVideoBlock").each(function(){videoControls=$('<div class="videoControls"></div>');$videoUnmute=$('<div class="videoControl videoUnmute"></div>');$videoMute=$('<div class="videoControl videoMute soundOptionHide"></div>');$videoPause=$('<div class="videoControl videoPause"></div>');$videoPlay=$('<div class="videoControl videoPlay soundOptionHide"></div>');videoControls.append($videoUnmute,$videoMute,$videoPause,$videoPlay);$(this).append(videoControls);var obtainIframe=$(this).find('iframe');var obtainVideoMute=$(this).find('div.videoMute');var obtainVideoUnMute=$(this).find('div.videoUnmute');var obtainVideoPause=$(this).find('div.videoPause');var obtainVideoPlay=$(this).find('div.videoPlay');$(obtainVideoMute).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"mute","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"setVolume","value":"0"}','*');$(this).addClass('soundOptionHide');$(obtainVideoUnMute).removeClass('soundOptionHide');});$(obtainVideoUnMute).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"unMute","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"setVolume","value":"1"}','*');$(this).addClass('soundOptionHide');$(obtainVideoMute).removeClass('soundOptionHide');});$(obtainVideoPause).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"pause","value":""}','*');$(this).addClass('soundOptionHide');$(obtainVideoPlay).removeClass('soundOptionHide');});$(obtainVideoPlay).click(function(){$(obtainIframe)[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');$(obtainIframe)[0].contentWindow.postMessage('{"method":"play","value":""}','*');$(this).addClass('soundOptionHide');$(obtainVideoPause).removeClass('soundOptionHide');});});},1000);}function videoCustomControls(){setTimeout(function(){$(target).find("div.wrapper>ol li.VimeoVideo").each(function(){videoControls=$('<div class="videoControls"></div>');$videoUnmute=$('<div class="videoControl videoUnmute"></div>');$videoMute=$('<div class="videoControl videoMute soundOptionHide"></div>');$videoPause=$('<div class="videoControl videoPause"></div>');$videoPlay=$('<div class="videoControl videoPlay soundOptionHide"></div>');videoControls.append($videoUnmute,$videoMute,$videoPause,$videoPlay);$(this).append(videoControls);var obtainIframe=$(this).find('video');var obtainVideoMute=$(this).find('div.videoMute');var obtainVideoUnMute=$(this).find('div.videoUnmute');var obtainVideoPause=$(this).find('div.videoPause');var obtainVideoPlay=$(this).find('div.videoPlay');$(obtainVideoMute).click(function(){$(obtainIframe).prop('muted',true);$(this).addClass('soundOptionHide');$(obtainVideoUnMute).removeClass('soundOptionHide');});$(obtainVideoUnMute).click(function(){$(obtainIframe).prop('muted',false);$(this).addClass('soundOptionHide');$(obtainVideoMute).removeClass('soundOptionHide');});$(obtainVideoPause).click(function(){$(obtainIframe).get(0).pause();$(this).addClass('soundOptionHide');$(obtainVideoPlay).removeClass('soundOptionHide');});$(obtainVideoPlay).click(function(){$(obtainIframe).get(0).play();$(this).addClass('soundOptionHide');$(obtainVideoPause).removeClass('soundOptionHide');});});},1000);}function scrollFunctionality(){$carouselControls=$('<div class="CarouselControls"></div>');$controlLeft=$('<div class="CarouselLeft"></div>');$controlRight=$('<div class="CarouselRight"></div>');
29$carouselControls.append($controlLeft,$controlRight);$featuredItemsControl=$(target);$featuredItemsControl.append($carouselControls);$featuredItemsControl=$(target);$featuredItemsControl.append($carouselControls);$($featuredItemsControl).jCarouselLiteFeaturedItems({timeout:15000,circular:true,autoWidth:true,responsive:true,visible:1,scroll:1,speed:1000,pause:true,swipe:false,btnPrev:$controlLeft,btnNext:$controlRight,beforeStart:function(){$(target).find(".video iframe").each(function(){$(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');$(this)[0].contentWindow.postMessage('{"method":"pause","value":""}','*');});$(".VimeoVideo video").each(function(){$(this).get(0).pause();});if($(target).hasClass('featuredItemsScrollFadeTitle')){$(target).find("div.wrapper>ol > li div.item-content div.featuredItemsInnerContent").removeClass('showItemContent');}var imgFIScroll=$(target).find('div.wrapper>ol > li img');NewMind.ETWP.LazyLoadImages.LoadSpecificLazyImages(imgFIScroll);},afterEnd:function(){$(target).find("li.active .video iframe").each(function(){$(this)[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');$(this)[0].contentWindow.postMessage('{"method":"play","value":""}','*');});$(target).find(".VimeoVideo.active video").each(function(){$(this).get(0).play();});if($(target).hasClass('featuredItemsScrollFadeTitle')){$(target).find("div.wrapper>ol > li div.item-content div.featuredItemsInnerContent").addClass('showItemContent');}}});$($featuredItemsControl).find('div.wrapper>ol li').each(function(i){$(this).addClass("item"+(i+1));});$($featuredItemsControl).find('div.wrapper>ol li.item2').addClass('active');videoCustomControlsYouTubeVimeoEmbed();videoCustomControls();
29$($featuredItemsControl).addClass('controlLoaded');$('div.wrapperFullWidthMedia').addClass('controlLoaded');if($(target).hasClass('featuredItemsScrollPreview')){$('div.wrapperFullWidthMedia').addClass('background-wrapper-overflow');}if($(target).hasClass('featuredItemsScrollFadeTitle')){$(target).find("div.wrapper> ol > li div.item-content div.featuredItemsInnerContent").addClass('showItemContent');}setTimeout(function(){var customSiteVideoEnhancements=$(target).find("div.wrapper> ol > li.YouTubeVideoBlock .video iframe").attr('src');var obtainVideoID=$(target).find("div.wrapper> ol > li.YouTubeVideoBlock .video iframe").attr('data-youtube-video-id');$(target).find('div.wrapper>ol li.YouTubeVideoBlock .video iframe').attr("src",customSiteVideoEnhancements+'&showinfo=0&controls=0&loop=1&modestbranding=1&playlist='+obtainVideoID);var obtainMuteVideoURL=$(target).find('div.wrapper>ol li.YouTubeVideoBlock.mute .video iframe').attr('src');$(target).find('div.wrapper>ol li.YouTubeVideoBlock.mute .video iframe').attr("src",obtainMuteVideoURL+'&mute=1');var obtainFirstVideoURLAutoPlay=$(target).find('div.wrapper>ol li.cell0.YouTubeVideoBlock.autoplay .video iframe').attr('src');$(target).find('div.wrapper>ol li.cell0.YouTubeVideoBlock.autoplay .video iframe').attr("src",obtainFirstVideoURLAutoPlay+'&autoplay=1');var obtainMuteVideoURLVimeo=$(target).find('div.wrapper>ol li.VimeoVideoBlock.mute .video iframe').attr('src');$(target).find('div.wrapper>ol li.VimeoVideoBlock.mute .video iframe').attr("src",obtainMuteVideoURLVimeo+'?muted=1');var obtainFirstVideoURLAutoPlayVimeo=$(target).find('div.wrapper>ol li.cell0.VimeoVideoBlock.autoplay .video iframe').attr('src');$(target).find('div.wrapper>ol li.cell0.VimeoVideoBlock.autoplay .video iframe').attr("src",obtainFirstVideoURLAutoPlayVimeo+'?muted=1&autoplay=1&loop=1');},1000);}if($(target).find('div.wrapper>ol > li').length>1){scrollFunctionality();}else{$(target).addClass('featuredItemsScrollSingleItem');
29$(target).addClass('controlLoaded');if($(target).hasClass('featuredItemsScrollFadeTitle')){$(target).find("div.wrapper>ol > li div.item-content div.featuredItemsInnerContent").removeClass('showItemContent');}videoCustomControlsYouTubeVimeoEmbed();videoCustomControls();}var imgFI=$(target).find('div.wrapper>ol > li img');NewMind.ETWP.LazyLoadImages.LoadSpecificLazyImages(imgFI);}function transparentPanelsAppend(){if($('div.featItemJSScroll').hasClass('featuredItemsScrollPreview')){$('<div class="left"></div>').prependTo('div.wrapperFullWidthMedia div.fullWidthInnerWrapper');$('<div class="right"></div>').appendTo('div.wrapperFullWidthMedia div.fullWidthInnerWrapper');}var windowWidth=$(window).width();var headerWidth=$('div#header').width();var wrapperWidth=windowWidth-headerWidth;var wrapperWidth=wrapperWidth/2;$('div.wrapperFullWidthMedia div.fullWidthInnerWrapper div.left').width(wrapperWidth);$('div.wrapperFullWidthMedia div.fullWidthInnerWrapper div.right').width(wrapperWidth);};function controlHeightForLoading(){var newHeight=null;var imageResizerHeight,imageResizerWidth;if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){imageResizerHeight=600;imageResizerWidth=480;}else{imageResizerHeight=600;imageResizerWidth=1750;}var obtainViewportSpace=$('div.wrapperFullWidthMedia').width();var setHeightAndWidthCalculation=(imageResizerHeight/imageResizerWidth);var newHeight=setHeightAndWidthCalculation*obtainViewportSpace;$("div.featItemJSScroll").each(function(){$(this).css('height',newHeight);$(this).find('ol > li').css('height',newHeight);});}function FullWidthcontrolHeightForLoading(){var newHeight=null;var imageResizerHeight,imageResizerWidth;if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){}else{imageResizerHeight=600;imageResizerWidth=1750;}var obtainViewportSpace=$('div.wrapperFullWidthMedia').width();var setHeightAndWidthCalculation=(imageResizerHeight/imageResizerWidth);var newHeight=setHeightAndWidthCalculation*obtainViewportSpace;$("div.FullWidthfeatItemJSScroll").each(function(){$(this).css('height',newHeight);$(this).find('ol > li').css('height',newHeight);});}FullWidthcontrolHeightForLoading();function checkVideoIsPaused(){var isVideoActiveSlide=$('div.featuredItemsScroll div.wrapper>ol li.VimeoVideo');if($(isVideoActiveSlide).hasClass('active')){var nowObtainVideo=$('div.featuredItemsScroll div.wrapper>ol li.VimeoVideo.active').find('video');var nowObtainVideoNotActive=$('div.featuredItemsScroll div.wrapper>ol li.VimeoVideo').not('.active').find('video');var videoElement=nowObtainVideo.get(0);var videoElementNotActive=nowObtainVideoNotActive.get(0);videoElementNotActive.pause();$(videoElementNotActive).prop('muted',true);}}(function(){$(window).load(function(){FeaturedItemsScroll('div.featItemJSScroll1');checkVideoIsPaused();});$(window).load(transparentPanelsAppend);})();(function(){function setIframeContentHeightVideo(){var newHeight=null;var imageResizerHeight=600;var imageResizerWidth=1750;var obtainViewportSpace=$('div.wrapperFullWidthMedia').width();var setHeightAndWidthCalculation=(imageResizerHeight/imageResizerWidth);var newHeight=setHeightAndWidthCalculation*obtainViewportSpace;$("div.featItemJSScroll").each(function(){$(this).find("div.wrapper>ol li.YouTubeVideoBlock, div.wrapper>ol li.VimeoVideoBlock, div.wrapper>ol li.VimeoVideo").each(function(){$(this).find('div.video').css("height",newHeight);$(this).find('iframe').css("height",newHeight);$(this).find('div.vimeoVideoWrapper').css("height",newHeight);$(this).find('div.item-content').css("height",newHeight);});});}function transparentPanels(){var windowWidth=$(window).width();var headerWidth=$('div#header').width();var wrapperWidth=windowWidth-headerWidth;var wrapperWidth=wrapperWidth/2;$('div.wrapperFullWidthMedia div.fullWidthInnerWrapper div.left').width(wrapperWidth);$('div.wrapperFullWidthMedia div.fullWidthInnerWrapper div.right').width(wrapperWidth);};if($("div.featItemJSScroll div.wrapper > ol > li.loading").length>0){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.featItemJSScroll div.wrapper > ol li.loading").length===0;},MaxNumberOfAttempts:2000,Success:function(){setIframeContentHeightVideo();}});}else{$(window).load(setIframeContentHeightVideo);}var cachedWidthSpaceFix=$(window).width();$(window).resize(function(){var newWidthSpaceFix=$(window).width();if(newWidthSpaceFix!==cachedWidthSpaceFix){cachedWidthSpaceFix=newWidthSpaceFix;setIframeContentHeightVideo();setTimeout(transparentPanels,2000);}});})();(function(){function FullWidthsetIframeContentHeightVideo(){var newHeight=null;var imageResizerHeight=600;var imageResizerWidth=1750;var obtainViewportSpace=$('div.FeaturedItemsFullWidth').width();var setHeightAndWidthCalculation=(imageResizerHeight/imageResizerWidth);var newHeight=setHeightAndWidthCalculation*obtainViewportSpace;$("div.FullWidthfeatItemJSScroll").each(function(){$(this).find("div.wrapper>ol li.YouTubeVideoBlock, div.wrapper>ol li.VimeoVideoBlock, div.wrapper>ol li.VimeoVideo").each(function(){$(this).find('div.video').css("height",newHeight);$(this).find('iframe').css("height",newHeight);$(this).find('div.vimeoVideoWrapper').css("height",newHeight);$(this).find('div.item-content').css("height",newHeight);});});}if($("div.FullWidthfeatItemJSScroll div.wrapper > ol > li.loading").length>0){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.FullWidthfeatItemJSScroll div.wrapper > ol li.loading").length===0;},MaxNumberOfAttempts:2000,Success:function(){FullWidthsetIframeContentHeightVideo();}});}else{$(window).load(FullWidthsetIframeContentHeightVideo);}var cachedWidthSpaceFix=$(window).width();$(window).resize(function(){var newWidthSpaceFix=$(window).width();if(newWidthSpaceFix!==cachedWidthSpaceFix){cachedWidthSpaceFix=newWidthSpaceFix;FullWidthsetIframeContentHeightVideo();FullWidthcontrolHeightForLoading();}});})();
29(function(){function ImageAmountCheck(){if(NewMind.Site.BreakPoints.IsNarrowMobileOnly()||NewMind.Site.BreakPoints.IsMobileOnly()){setTimeout(function(){if($("div.featItemJSScroll1 div.wrapper ol li").length===0){$("div#headerWrapper").removeClass("transition");}},2000);}}ImageAmountCheck();})();
30if(/iemobile|Windows Phone/i.test(navigator.userAgent)){$("div.ShowHideLinks a.ViewPrices").click(function(){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $(".UnitSelData form.FrmUnitOptions").length>0;},MaxNumberOfAttempts:200,Success:function(){$('form.FrmUnitOptions').removeAttr('target');}});});NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("form.FrmUnitOptions").length>0;},MaxNumberOfAttempts:200,Success:function(){$('form.FrmUnitOptions').removeAttr('target');}});}
31/*BG: This is used by the debug.js file, if that isn't needed or wanted, then neither is this.
32Original Site: http://sixrevisions.com/javascript/browser-detection-javascript/ */
33(function(e){Array.prototype.map||(Array.prototype.map=function(e,r){var a,o,i;if(null==this)throw new TypeError(" this is null or not defined");var n=Object(this),t=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(r&&(a=r),o=Array(t),i=0;t>i;){var l,c;i in n&&(l=n[i],c=e.call(a,l,i,n),o[i]=c),i++}return o});var r=e.detect=function(){var e=function(){},r={browser_parsers:[{regex:"^(Opera)/(\\d+)\\.(\\d+) \\(Nintendo Wii",family_replacement:"Wii",manufacturer:"Nintendo"},{regex:"(SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)",family_replacement:"Camino",other:!0},{regex:"(Pale[Mm]oon)/(\\d+)\\.(\\d+)\\.?(\\d+)?",family_replacement:"Pale Moon (Firefox Variant)",other:!0},{regex:"(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)",family_replacement:"Firefox Mobile"},{regex:"(Fennec)/(\\d+)\\.(\\d+)(pre)",family_replacment:"Firefox Mobile"},{regex:"(Fennec)/(\\d+)\\.(\\d+)",family_replacement:"Firefox Mobile"},{regex:"Mobile.*(Firefox)/(\\d+)\\.(\\d+)",family_replacement:"Firefox Mobile"},{regex:"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)",family_replacement:"Firefox ($1)"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)",family_replacement:"Firefox Alpha"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)",family_replacement:"Firefox Beta"},{regex:"(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)",family_replacement:"Firefox Alpha"},{regex:"(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)",family_replacement:"Firefox Beta"},{regex:"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?",family_replacement:"Firefox ($1)"},{regex:"(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"MicroB",tablet:!0},{regex:"(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"},{regex:"(Flock)/(\\d+)\\.(\\d+)(b\\d+?)",family_replacement:"Flock",other:!0},{regex:"(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Rockmelt",other:!0},{regex:"(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Netscape"},{regex:"(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)",family_replacement:"Netscape"},{regex:"(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Netscape"},{regex:"(MyIBrow)/(\\d+)\\.(\\d+)",family_replacement:"My Internet Browser",other:!0},{regex:"(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",family_replacement:"Opera Tablet",tablet:!0},{regex:"(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)",family_replacement:"Opera Mobile"},{regex:"Opera Mobi",family_replacement:"Opera Mobile"},{regex:"(Opera Mini)/(\\d+)\\.(\\d+)",family_replacement:"Opera Mini"},{regex:"(Opera Mini)/att/(\\d+)\\.(\\d+)",family_replacement:"Opera Mini"},{regex:"(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",family_replacement:"Opera"},{regex:"(webOSBrowser)/(\\d+)\\.(\\d+)",family_replacement:"webOS"},{regex:"(webOS)/(\\d+)\\.(\\d+)",family_replacement:"webOS"},{regex:"(wOSBrowser).+TouchPad/(\\d+)\\.(\\d+)",family_replacement:"webOS TouchPad"},{regex:"(luakit)",family_replacement:"LuaKit",other:!0},{regex:"(Lightning)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)",family_replacement:"Lightning",other:!0},{regex:"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)",family_replacement:"Swiftfox",other:!0},{regex:"(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)",family_replacement:"Swiftfox",other:!0},{regex:"rekonq",family_replacement:"Rekonq",other:!0},{regex:"(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?",family_replacement:"Conkeror",other:!0}
33,{regex:"(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Konqueror",other:!0},{regex:"(WeTab)-Browser",family_replacement:"WeTab",other:!0},{regex:"(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Comodo Dragon",other:!0},{regex:"(YottaaMonitor)",family_replacement:"Yottaa Monitor",other:!0},{regex:"(Kindle)/(\\d+)\\.(\\d+)",family_replacement:"Kindle"},{regex:"(Symphony) (\\d+).(\\d+)",family_replacement:"Symphony",other:!0},{regex:"Minimo",family_replacement:"Minimo",other:!0},{regex:"(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Mobile"},{regex:"(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Mobile iOS"},{regex:"(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile",family_replacement:"Chrome Mobile"},{regex:"(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Frame"},{regex:"(UC Browser)(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"UC Browser",other:!0},{regex:"(SLP Browser)/(\\d+)\\.(\\d+)",family_replacement:"Tizen Browser",other:!0},{regex:"(Epiphany)/(\\d+)\\.(\\d+).(\\d+)",family_replacement:"Epiphany",other:!0},{regex:"(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)",family_replacement:"Sogou Explorer",other:!0},{regex:"(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)",family_replacement:"PingdomBot",other:!0},{regex:"(facebookexternalhit)/(\\d+)\\.(\\d+)",family_replacement:"FacebookBot"},{regex:"(Twitterbot)/(\\d+)\\.(\\d+)",family_replacement:"TwitterBot"},{regex:"(AdobeAIR|Chromium|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|WebPilot|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iron|Iris|UP\\.Browser|Bunjaloo|Google Earth|Raven for Mac)/(\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Iron|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris)/(\\d+)\\.(\\d+)"},{regex:"(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(iCab|Lunascape|Opera|Android|Jasmine|Polaris|BREW) (\\d+)\\.(\\d+)\\.?(\\d+)?"},{regex:"(Android) Donut",v2_replacement:"2",v1_replacement:"1"},{regex:"(Android) Eclair",v2_replacement:"1",v1_replacement:"2"},{regex:"(Android) Froyo",v2_replacement:"2",v1_replacement:"2"},{regex:"(Android) Gingerbread",v2_replacement:"3",v1_replacement:"2"},{regex:"(Android) Honeycomb",v1_replacement:"3"},{regex:"(IEMobile)[ /](\\d+)\\.(\\d+)",family_replacement:"IE Mobile"},{regex:"(MSIE) (\\d+)\\.(\\d+).*XBLWP7",family_replacement:"IE Large Screen"},{regex:"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?"},{regex:"(Obigo)InternetBrowser",other:!0},{regex:"(Obigo)\\-Browser",other:!0},{regex:"(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?",other:!0},{regex:"(MAXTHON|Maxthon) (\\d+)\\.(\\d+)",family_replacement:"Maxthon",other:!0},{regex:"(Maxthon|MyIE2|Uzbl|Shiira)",v1_replacement:"0",other:!0},{regex:"(PLAYSTATION) (\\d+)",family_replacement:"PlayStation",manufacturer:"Sony"},{regex:"(PlayStation Portable)[^\\d]+(\\d+).(\\d+)",manufacturer:"Sony"},{regex:"(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(POLARIS)/(\\d+)\\.(\\d+)",family_replacement:"Polaris",other:!0},{regex:"(Embider)/(\\d+)\\.(\\d+)",family_replacement:"Polaris",other:!0},{regex:"(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Bon Echo",other:!0},{regex:"(iPod).+Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPod).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPod)",family_replacement:"Mobile Safari",manufacturer:"Apple"}
33,{regex:"(iPhone).*Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPhone).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPhone)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPad).*Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(iPad).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(iPad)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(AvantGo) (\\d+).(\\d+)",other:!0},{regex:"(Avant)",v1_replacement:"1",other:!0},{regex:"^(Nokia)",family_replacement:"Nokia Services (WAP) Browser",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+)",manufacturer:"Nokia"},{regex:"(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)",family_replacement:"NokiaBrowser",manufacturer:"Nokia"},{regex:"(Series60)/5\\.0",v2_replacement:"0",v1_replacement:"7",family_replacement:"NokiaBrowser",manufacturer:"Nokia"},{regex:"(Series60)/(\\d+)\\.(\\d+)",family_replacement:"Nokia OSS Browser",manufacturer:"Nokia"},{regex:"(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Nokia Series 40 Ovi Browser",manufacturer:"Nokia"},{regex:"(Nokia)[EN]?(\\d+)",manufacturer:"Nokia"},{regex:"(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Blackberry WebKit",tablet:!0,manufacturer:"Nokia"},{regex:"(Black[bB]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Blackberry WebKit",manufacturer:"RIM"},{regex:"(Black[bB]erry)\\s?(\\d+)",family_replacement:"Blackberry",manufacturer:"RIM"},{regex:"(OmniWeb)/v(\\d+)\\.(\\d+)",other:!0},{regex:"(Blazer)/(\\d+)\\.(\\d+)",family_replacement:"Palm Blazer",manufacturer:"Palm"},{regex:"(Pre)/(\\d+)\\.(\\d+)",family_replacement:"Palm Pre",manufacturer:"Palm"},{regex:"(Links) \\((\\d+)\\.(\\d+)",other:!0},{regex:"(QtWeb) Internet Browser/(\\d+)\\.(\\d+)",other:!0},{regex:"(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?",other:!0,tablet:!0},{regex:"(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Version/\\d+\\.\\d+.\\d+ Safari/",family_replacement:"WebKit Nightly"},{regex:"(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/",family_replacement:"Safari"},{regex:"(Safari)/\\d+"},{regex:"(OLPC)/Update(\\d+)\\.(\\d+)",other:!0},{regex:"(OLPC)/Update()\\.(\\d+)",v1_replacement:"0",other:!0},{regex:"(SEMC\\-Browser)/(\\d+)\\.(\\d+)",other:!0},{regex:"(Teleca)",family_replacement:"Teleca Browser",other:!0},{regex:"Trident(.*)rv.(\\d+)\\.(\\d+)",family_replacement:"IE"},{regex:"(MSIE) (\\d+)\\.(\\d+)",family_replacement:"IE"}],os_parsers:[{regex:"(Android) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"},{regex:"(Android)\\-(\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"},{regex:"(Android) Donut",os_v2_replacement:"2",os_v1_replacement:"1"},{regex:"(Android) Eclair",os_v2_replacement:"1",os_v1_replacement:"2"},{regex:"(Android) Froyo",os_v2_replacement:"2",os_v1_replacement:"2"},{regex:"(Android) Gingerbread",os_v2_replacement:"3",os_v1_replacement:"2"},{regex:"(Android) Honeycomb",os_v1_replacement:"3"},{regex:"(Silk-Accelerated=[a-z]{4,5})",os_replacement:"Android"},{regex:"(Windows Phone 6\\.5)"},{regex:"(Windows (?:NT 5\\.2|NT 5\\.1))",os_replacement:"Windows XP"},{regex:"(XBLWP7)",os_replacement:"Windows Phone OS"},{regex:"(Windows NT 6\\.1)",os_replacement:"Windows 7"},{regex:"(Windows NT 6\\.0)",os_replacement:"Windows Vista"},{regex:"(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000)"},{regex:"(Windows NT 6\\.2)",os_replacement:"Windows 8"},{regex:"(Windows Phone 8)",os_replacement:"Windows Phone 8"},{regex:"(Windows NT 5\\.0)",os_replacement:"Windows 2000"},{regex:"(Windows Phone OS) (\\d+)\\.(\\d+)"},{regex:"(Windows ?Mobile)",os_replacement:"Windows Mobile"},{regex:"(WinNT4.0)",os_replacement:"Windows NT 4.0"},{regex:"(Win98)",os_replacement:"Windows 98"},{regex:"(Tizen)/(\\d+)\\.(\\d+)",other:!0},{regex:"(Mac OS X) (\\d+)[_.](\\d+)(?:[_.](\\d+))?",manufacturer:"Apple"},{regex:"(?:PPC|Intel) (Mac OS X)",manufacturer:"Apple"},{regex:"(CPU OS|iPhone OS) (\\d+)_(\\d+)(?:_(\\d+))?",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(iPhone|iPad|iPod); Opera",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(iPad); Opera",tablet:!0,manufacturer:"Apple"},{regex:"(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"Chrome OS"},{regex:"(Debian)-(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",other:!0},{regex:"(Linux Mint)(?:/(\\d+))?",other:!0},{regex:"(Mandriva)(?: Linux)?/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",other:!0},{regex:"(Symbian[Oo][Ss])/(\\d+)\\.(\\d+)",os_replacement:"Symbian OS"},{regex:"(Symbian/3).+NokiaBrowser/7\\.3",os_replacement:"Symbian^3 Anna"},{regex:"(Symbian/3).+NokiaBrowser/7\\.4",os_replacement:"Symbian^3 Belle"},{regex:"(Symbian/3)",os_replacement:"Symbian^3"},{regex:"(Series 60|SymbOS|S60)",os_replacement:"Symbian OS"},{regex:"(MeeGo)",other:!0},{regex:"Symbian [Oo][Ss]",os_replacement:"Symbian OS"},{regex:"(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"BlackBerry OS",manufacturer:"RIM"},{regex:"(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"BlackBerry OS",manufacturer:"RIM"},{regex:"(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)",os_replacement:"BlackBerry Tablet OS",tablet:!0,manufacturer:"RIM"},{regex:"(Play[Bb]ook)",os_replacement:"BlackBerry Tablet OS",tablet:!0,manufacturer:"RIM"},{regex:"(Black[Bb]erry)",os_replacement:"Blackberry OS",manufacturer:"RIM"},{regex:"(webOS|hpwOS)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"webOS"},{regex:"(SUSE|Fedora|Red Hat|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(SUSE|Fedora|Red Hat|Puppy|PCLinuxOS|CentOS)/(\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\\d+)\\.(\\d+)"},{regex:"(Windows|OpenBSD|FreeBSD|NetBSD|Ubuntu|Kubuntu|Android|Arch Linux|CentOS|WeTab|Slackware)"},{regex:"(Linux|BSD)",other:!0}],mobile_os_families:["Windows Phone 6.5","Windows CE","Symbian OS"],device_parsers:[{regex:"HTC ([A-Z][a-z0-9]+) Build",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC ([A-Z][a-z0-9 ]+) \\d+\\.\\d+\\.\\d+\\.\\d+",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC_Touch_([A-Za-z0-9]+)",device_replacement:"HTC Touch ($1)",manufacturer:"HTC"},{regex:"USCCHTC(\\d+)",device_replacement:"HTC $1 (US Cellular)",manufacturer:"HTC"},{regex:"Sprint APA(9292)",device_replacement:"HTC $1 (Sprint)",manufacturer:"HTC"},{regex:"HTC ([A-Za-z0-9]+ [A-Z])",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC-([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC_([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC ([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"(ADR[A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"(HTC)",manufacturer:"HTC"},{regex:"SonyEricsson([A-Za-z0-9]+)/",device_replacement:"Ericsson $1",other:!0,manufacturer:"Sony"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; WOWMobile (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\-update1\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; (.+) Build"},{regex:"NokiaN([0-9]+)",device_replacement:"Nokia N$1",manufacturer:"Nokia"},{regex:"Nokia([A-Za-z0-9\\v-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"NOKIA ([A-Za-z0-9\\-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"Nokia ([A-Za-z0-9\\-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"Lumia ([A-Za-z0-9\\-]+)",device_replacement:"Lumia $1",manufacturer:"Nokia"},{regex:"Symbian",device_replacement:"Nokia",manufacturer:"Nokia"},{regex:"(PlayBook).+RIM Tablet OS",device_replacement:"Blackberry Playbook",tablet:!0,manufacturer:"RIM"},{regex:"(Black[Bb]erry [0-9]+);",manufacturer:"RIM"},{regex:"Black[Bb]erry([0-9]+)",device_replacement:"BlackBerry $1",manufacturer:"RIM"},{regex:"(Pre)/(\\d+)\\.(\\d+)",device_replacement:"Palm Pre",manufacturer:"Palm"},{regex:"(Pixi)/(\\d+)\\.(\\d+)",device_replacement:"Palm Pixi",manufacturer:"Palm"},{regex:"(Touchpad)/(\\d+)\\.(\\d+)",device_replacement:"HP Touchpad",manufacturer:"HP"},{regex:"HPiPAQ([A-Za-z0-9]+)/(\\d+).(\\d+)",device_replacement:"HP iPAQ $1",manufacturer:"HP"},{regex:"Palm([A-Za-z0-9]+)",device_replacement:"Palm $1",manufacturer:"Palm"},{regex:"Treo([A-Za-z0-9]+)",device_replacement:"Palm Treo $1",manufacturer:"Palm"},{regex:"webOS.*(P160UNA)/(\\d+).(\\d+)",device_replacement:"HP Veer",manufacturer:"HP"},{regex:"(Kindle Fire)",manufacturer:"Amazon"},{regex:"(Kindle)",manufacturer:"Amazon"},{regex:"(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?",device_replacement:"Kindle Fire",tablet:!0,manufacturer:"Amazon"},{regex:"(iPad) Simulator;",manufacturer:"Apple"},{regex:"(iPad);",manufacturer:"Apple"},{regex:"(iPod);",manufacturer:"Apple"},{regex:"(iPhone) Simulator;",manufacturer:"Apple"},{regex:"(iPhone);",manufacturer:"Apple"},{regex:"Nexus\\ ([A-Za-z0-9\\-]+)",device_replacement:"Nexus $1"},{regex:"acer_([A-Za-z0-9]+)_",device_replacement:"Acer $1",manufacturer:"Acer"},{regex:"acer_([A-Za-z0-9]+)_",device_replacement:"Acer $1",manufacturer:"Acer"},{regex:"Amoi\\-([A-Za-z0-9]+)",device_replacement:"Amoi $1",other:!0,manufacturer:"Amoi"},{regex:"AMOI\\-([A-Za-z0-9]+)",device_replacement:"Amoi $1",other:!0,manufacturer:"Amoi"},{regex:"Asus\\-([A-Za-z0-9]+)",device_replacement:"Asus $1",manufacturer:"Asus"},{regex:"ASUS\\-([A-Za-z0-9]+)",device_replacement:"Asus $1",manufacturer:"Asus"},{regex:"BIRD\\-([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"BIRD\\.([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"BIRD ([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"Dell ([A-Za-z0-9]+)",device_replacement:"Dell $1",manufacturer:"Dell"},{regex:"DoCoMo/2\\.0 ([A-Za-z0-9]+)",device_replacement:"DoCoMo $1",other:!0},{regex:"([A-Za-z0-9]+)\\_W\\;FOMA",device_replacement:"DoCoMo $1",other:!0},{regex:"([A-Za-z0-9]+)\\;FOMA",device_replacement:"DoCoMo $1",other:!0},{regex:"vodafone([A-Za-z0-9]+)",device_replacement:"Huawei Vodafone $1",other:!0},{regex:"i\\-mate ([A-Za-z0-9]+)",device_replacement:"i-mate $1",other:!0},{regex:"Kyocera\\-([A-Za-z0-9]+)",device_replacement:"Kyocera $1",other:!0},{regex:"KWC\\-([A-Za-z0-9]+)",device_replacement:"Kyocera $1",other:!0},{regex:"Lenovo\\-([A-Za-z0-9]+)",device_replacement:"Lenovo $1",manufacturer:"Lenovo"},{regex:"Lenovo\\_([A-Za-z0-9]+)",device_replacement:"Lenovo $1",manufacturer:"Levovo"},{regex:"LG/([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG-LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE-LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE VX([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG ([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE LG\\-AX([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG\\-([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE\\-([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"(KIN)\\.One (\\d+)\\.(\\d+)",device_replacement:"Microsoft $1"},{regex:"(KIN)\\.Two (\\d+)\\.(\\d+)",device_replacement:"Microsoft $1"},{regex:"(Motorola)\\-([A-Za-z0-9]+)",manufacturer:"Motorola"},{regex:"MOTO\\-([A-Za-z0-9]+)",device_replacement:"Motorola $1",manufacturer:"Motorola"},{regex:"MOT\\-([A-Za-z0-9]+)",device_replacement:"Motorola $1",manufacturer:"Motorola"},{regex:"Philips([A-Za-z0-9]+)",device_replacement:"Philips $1",manufacturer:"Philips"},{regex:"Philips ([A-Za-z0-9]+)",device_replacement:"Philips $1",manufacturer:"Philips"},{regex:"SAMSUNG-([A-Za-z0-9\\-]+)",device_replacement:"Samsung $1",manufacturer:"Samsung"},{regex:"SAMSUNG\\; ([A-Za-z0-9\\-]+)",device_replacement:"Samsung $1",manufacturer:"Samsung"},{regex:"Softbank/1\\.0/([A-Za-z0-9]+)",device_replacement:"Softbank $1",other:!0},{regex:"Softbank/2\\.0/([A-Za-z0-9]+)",device_replacement:"Softbank $1",other:!0},{regex:"(hiptop|avantgo|plucker|xiino|blazer|elaine|up.browser|up.link|mmp|smartphone|midp|wap|vodafone|o2|pocket|mobile|pda)",device_replacement:"Generic Smartphone"},{regex:"^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\\-|airn|alav|asus|attw|au\\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\\-n|bw\\-u|beck|benq|bilb|blac|c55/|cdm\\-|chtm|capi|comp|cond|craw|dall|dbte|dc\\-s|dica|ds\\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\\-|fly\\_|g\\-mo|g1 u|g560|gf\\-5|grun|gene|go.w|good|grad|hcit|hd\\-m|hd\\-p|hd\\-t|hei\\-|hp i|hpip|hs\\-c|htc |htc\\-|htca|htcg)",device_replacement:"Generic Feature Phone"},{regex:"^(htcp|htcs|htct|htc\\_|haie|hita|huaw|hutc|i\\-20|i\\-go|i\\-ma|i230|iac|iac\\-|iac/|ig01|im1k|inno|iris|jata|java|kddi|kgt|kgt/|kpt |kwc\\-|klon|lexi|lg g|lg\\-a|lg\\-b|lg\\-c|lg\\-d|lg\\-f|lg\\-g|lg\\-k|lg\\-l|lg\\-m|lg\\-o|lg\\-p|lg\\-s|lg\\-t|lg\\-u|lg\\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\\-|lge/|lynx|leno|m1\\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mio
33a|mo01|mo02|mode|modo|mot |mot\\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\\-|nem\\-|newg|neon)",device_replacement:"Generic Feature Phone"},{regex:"^(netf|noki|nzph|o2 x|o2\\-x|opwv|owg1|opti|oran|ot\\-s|p800|pand|pg\\-1|pg\\-2|pg\\-3|pg\\-6|pg\\-8|pg\\-c|pg13|phil|pn\\-2|pt\\-g|palm|pana|pire|pock|pose|psio|qa\\-a|qc\\-2|qc\\-3|qc\\-5|qc\\-7|qc07|qc12|qc21|qc32|qc60|qci\\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\\-|scp\\-|sdk/|se47|sec\\-|sec0|sec1|semc|sgh\\-|shar|sie\\-|sk\\-0|sl45|slid|smb3|smt5|sp01|sph\\-|spv |spv\\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\\-mo|t218|t250|t600|t610|t618|tcl\\-|tdg\\-|telm|tim\\-|ts70|tsm\\-|tsm3|tsm5|tx\\-9|tagt)",device_replacement:"Generic Feature Phone"},{regex:"^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c |w3c\\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\\-|your|zte\\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\\-|webc|whit|wmlb|xda\\-|xda\\_)",device_replacement:"Generic Feature Phone"},{regex:"(bot|borg|google(^tv)|yahoo|slurp|msnbot|msrbot|openbot|archiver|netresearch|lycos|scooter|altavista|teoma|gigabot|baiduspider|blitzbot|oegp|charlotte|furlbot|http%20client|polybot|htdig|ichiro|mogimogi|larbin|pompos|scrubby|searchsight|seekbot|semanticdiscovery|silk|snappy|speedy|spider|voila|vortex|voyager|zao|zeal|fast\\-webcrawler|converacrawler|dataparksearch|findlinks)",device_replacement:"Spider"}],mobile_browser_families:["Firefox Mobile","Opera Mobile","Opera Mini","Mobile Safari","webOS","IE Mobile","Playstation Portable","Nokia","Blackberry","Palm","Silk","Android","Maemo","Obigo","Netfront","AvantGo","Teleca","SEMC-Browser","Bolt","Iris","UP.Browser","Symphony","Minimo","Bunjaloo","Jasmine","Dolfin","Polaris","BREW","Chrome Mobile","Chrome Mobile iOS","UC Browser","Tizen Browser"]};e.parsers=["device_parsers","browser_parsers","os_parsers","mobile_os_families","mobile_browser_families"],e.types=["browser","os","device"],e.regexes=r||function(){var r={};return e.parsers.map(function(e){r[e]=[]}),r}(),e.families=function(){var r={};return e.types.map(function(e){r[e]=[]}),r}();var a=Array.prototype,o=(Object.prototype,Function.prototype,a.forEach);a.indexOf;var i=function(e,r){for(var a={},o=0;r.length>o&&!(a=r[o](e));o++);return a},n=function(e,r){t(e,function(e){t(r,function(r){delete e[r]})})},t=forEach=function(e,r,a){if(null!=e)if(o&&e.forEach===o)e.forEach(r,a);else if(e.length===+e.length)for(var i=0,n=e.length;n>i;i++)r.call(a,e[i],i,e);else for(var t in e)_.has(e,t)&&r.call(a,e[t],t,e)},l=function(e){return!(!e||e===undefined||null==e)},c=function(e){var r="";return e=e||{},l(e)&&l(e.major)&&(r+=e.major,l(e.minor)&&(r+="."+e.minor,l(e.patch)&&(r+="."+e.patch))),r},d=function(e){e=e||{};var r=c(e);return r&&(r=" "+r),e&&l(e.family)?e.family+r:""};return e.parse=function(r){var a=function(r){return e.regexes[r+"_parsers"].map(function(e){function a(r){var a=r.match(o);if(!a)return null;var t={};return t.family=(i?i.replace("$1",a[1]):a[1])||"other",t.major=parseInt(n?n:a[2])||null,t.minor=a[3]?parseInt(a[3]):null,t.patch=a[4]?parseInt(a[4]):null,t.tablet=e.tablet,t.man=e.manufacturer||null,t}var o=RegExp(e.regex),i=e[("browser"===r?"family":r)+"_replacement"],n=e.major_version_replacement;return a})},o=function(){},t=a("browser"),m=a("os"),p=a("device"),s=new o;s.source=r,s.browser=i(r,t),l(s.browser)?(s.browser.name=d(s.browser),s.browser.version=c(s.browser)):s.browser={},s.os=i(r,m),l(s.os)?(s.os.name=d(s.os),s.os.version=c(s.os)):s.os={},s.device=i(r,p),l(s.device)?(s.device.name=d(s.device),s.device.version=c(s.device)):s.device={tablet:!1,family:"Other"};var g={};return e.regexes.mobile_browser_families.map(function(e){g[e]=!0}),e.regexes.mobile_os_families.map(function(e){g[e]=!0}),s.device.type="Spider"===s.browser.family?"Spider":s.browser.tablet||s.os.tablet||s.device.tablet?"Tablet":g.hasOwnProperty(s.browser.family)?"Mobile":"Desktop",s.device.manufacturer=s.browser.man||s.os.man||s.device.man||null,
33n([s.browser,s.os,s.device],["tablet","man"]),s},e}();"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=r),exports.detect=r):e.detect=r,"function"==typeof define&&define.amd&&define(function(){return r})})(window);
34(function(){if(window.location.href.indexOf("#removeRefine")>-1){$("body").addClass("mapRemoveRefine");}NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.automatedMapWidget div.mapView.googleView div#mapFilters > fieldset > fieldset").length>1;},MaxNumberOfAttempts:200,Success:function(){$("div.mapFilterIconText").toggle(function(){$('div.mapFilterIconText').addClass('refineIconOpen');$('div.MapFilterIconSet').addClass('MapFilterIconSetOpen');$('div.automatedMapWidget div.mapView.googleView').addClass('refineOpen');},function(){$('div.mapFilterIconText').removeClass('refineIconOpen');$('div.MapFilterIconSet').removeClass('MapFilterIconSetOpen');$('div.automatedMapWidget div.mapView.googleView').removeClass('refineOpen');});}});function mapPopUpChanges(){$('.automatedMapWidget .InfoBoxContent').each(function(){$(this).find('h2.ProductName a').attr('target','_blank');$(function(){if($(".automatedMapWidget .InfoBoxContent .address br").length>0){$('.automatedMapWidget .InfoBoxContent .address br:last-child').addClass('last');$('.automatedMapWidget .InfoBoxContent .address br.last').replaceWith('&nbsp;');$('.automatedMapWidget .InfoBoxContent .address br').replaceWith('</span>,&nbsp;<span>');}}());});}function hideMapImages(){if($('body.mapShow div.automatedMapWidget div.InfoBoxContent div.YOUTUBE').length>0){$('div.automatedMapWidget div.ProductListImageGallery').addClass('ProductListImageGalleryHide');}}if(NewMind.mapping&&NewMind.mapping.SetCustomMarkerAlignment){NewMind.mapping.SetCustomMarkerAlignment({width:25,height:33});NewMind.mapping.infoBubbleDisplayed.subscribe(mapPopUpChanges);NewMind.mapping.infoBubbleDisplayed.subscribe(hideMapImages);}$(function(){var mapUrl=window.location.href;$('div.mapEmbedTabs div.tabNavigation').append('<li class="closePopup"><img src="/images/Icons/icon_close.png" /></li>');var closePopup=$('div.mapEmbedTabs div.tabNavigation li.closePopup');var embedOverlay=$('div#embedOverlay');var embedTabs=$('div.mapEmbedTabs');var embedMapSmall=$('div.mapEmbedTabs div.mapOptions div.mapSmall');var embedMapMedium=$('div.mapEmbedTabs div.mapOptions div.mapMedium');var embedMapLarge=$('div.mapEmbedTabs div.mapOptions div.mapLarge');var embedMapCustom=$('div.mapEmbedTabs div.mapOptions div.customSize');var embedMapDefaultText=$('div.mapEmbedTabs div.mapOptions div.mapDefault');var embedGenerateButton=$('div.mapEmbedTabs div.generate');var embedWidgetInputEmbedIframe=$('div.mapEmbedTabs div.mapEmbedEmbed div.mapEmbedContent input#embedWidget');var embedWidgetInputShareIframe=$('div.mapEmbedTabs div.mapEmbedShare div.mapShareContent input#shareWidget');var embedWidgetCustomSize=$('div.mapEmbedTabs div.customEmbedDimensions');var embedOpenShareOption=$('div.openShare');var embedChooseOptions=$('div.mapEmbedTabs div.mapOptionsChoose');var embedCustomDimensionsOpen='customEmbedDimensionsOpen';var mapEmbedOpen='mapEmbedOpen';var embedOverlayOpen='embedOverlayOpen';var iframeSmallValue='<iframe src="'+mapUrl+'" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>';var iframeMediumValue='<iframe src="'+mapUrl+'" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>';var iframeLargeValue='<iframe src="'+mapUrl+'" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>';var refineByCheckboxOption=$('div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapEmbed div.mapContainer div.refineByOption input');var iframeSmallValueRemoveRefine='<iframe src="'+mapUrl+'#removeRefine" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>';var iframeMediumValueRemoveRefine='<iframe src="'+mapUrl+'#removeRefine" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>';var iframeLargeValueRemoveRefine='<iframe src="'+mapUrl+'#removeRefine" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>';var embedTabItem=$('div.mapEmbedTabs div.tabNavigation > ul > li');function mapWidgetActiveInput(){$(embedWidgetInputEmbedIframe).addClass('inputActive');setTimeout(function(){$(embedWidgetInputEmbedIframe).removeClass('inputActive');},1000);}function selectInputText(){$("div.mapEmbedTabs div.mapEmbedShare div.mapShareContent input").select();$("div.mapEmbedTabs div.mapEmbedEmbed div.mapEmbedContent input").select();}$(embedTabItem).click(function(){selectInputText();});$(embedOverlay).click(function(){$(embedTabs).removeClass(mapEmbedOpen);$(embedOverlay).removeClass(embedOverlayOpen);});
34$(closePopup).click(function(){$(embedTabs).removeClass(mapEmbedOpen);$(embedOverlay).removeClass(embedOverlayOpen);});$(embedMapSmall).click(function(){mapUrl=window.location.href;var itemText=$(this).html();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>');}$(embedMapDefaultText).html(itemText);$(embedWidgetCustomSize).removeClass(embedCustomDimensionsOpen);mapWidgetActiveInput();selectInputText();});$(embedMapMedium).click(function(){mapUrl=window.location.href;var itemText=$(this).html();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>');}$(embedMapDefaultText).html(itemText);$(embedWidgetCustomSize).removeClass(embedCustomDimensionsOpen);mapWidgetActiveInput();selectInputText();});$(embedMapLarge).click(function(){mapUrl=window.location.href;var itemText=$(this).html();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>');}$(embedMapDefaultText).html(itemText);$(embedWidgetCustomSize).removeClass(embedCustomDimensionsOpen);mapWidgetActiveInput();selectInputText();});$(embedGenerateButton).click(function(){var mapUrl=window.location.href;var iframeCustomWidth=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-width").val();var iframeCustomHeight=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-height").val();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}mapWidgetActiveInput();selectInputText();});$(embedMapDefaultText).click(function(event){event.stopPropagation();$(embedChooseOptions).toggle();});$(document).click(function(){$(embedChooseOptions).hide();});$(embedMapCustom).click(function(event){var itemText=$(this).html();$(embedWidgetCustomSize).addClass(embedCustomDimensionsOpen);$(embedMapDefaultText).html(itemText);});function generateURLS(){if($(embedMapDefaultText).text()==embedMapCustom.html()){var iframeCustomWidth=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-width").val();var iframeCustomHeight=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-height").val();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}}else if($(embedMapDefaultText).text()==embedMapSmall.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>');}else if($(embedMapDefaultText).text()==embedMapMedium.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>');}else if($(embedMapDefaultText).text()==embedMapLarge.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>');}selectInputText();}function generateURLS_NoRefine(){if($(embedMapDefaultText).text()==embedMapCustom.html()){var iframeCustomWidth=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-width").val();var iframeCustomHeight=$("div.mapEmbedTabs div.productTabs div.tabContainer div.tab div.mapContainer div.mapEmbedOption input.custom-height").val();if($(refineByCheckboxOption).is(':checked')){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}else{$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="'+iframeCustomWidth+'" height="'+iframeCustomHeight+'" frameborder="0" style="border:0" allowfullscreen></iframe>');}}else if($(embedMapDefaultText).text()==embedMapSmall.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>');}else if($(embedMapDefaultText).text()==embedMapMedium.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>');}else if($(embedMapDefaultText).text()==embedMapLarge.html()){$(embedWidgetInputEmbedIframe).val('<iframe src="'+mapUrl+'#removeRefine" width="800" height="600" frameborder="0" style="border:0" allowfullscreen></iframe>');}selectInputText();}function shareEmbedDefaults(){$(refineByCheckboxOption).attr('checked',true);mapUrl=window.location.href;$(embedTabs).addClass(mapEmbedOpen);$(embedOverlay).addClass(embedOverlayOpen);$(embedWidgetInputShareIframe).val(mapUrl);generateURLS();}$(refineByCheckboxOption).change(function(){if(this.checked){generateURLS();}else{generateURLS_NoRefine();}});$(embedOpenShareOption).click(function(){shareEmbedDefaults();});$(embedWidgetInputShareIframe).click(function(){$(this).select();});$(embedWidgetInputEmbedIframe).click(function(){$(this).select();});});})();
35(function(){if($('body').is(".openSearchAcco, .openSearchTTD, .openSearchFood, .openSearchEvents, .openSearchShop, .openSearchHiking, .openSearchMuseum, .openSearchAllMorgedal, .openSearchAllEidsborg")){$("div.productSearchHorizontal").each(function(i){if($('body').is(".openSearchAcco")){$('div.productSearchAccoHor').addClass("open").slideDown();$("div.cftSearchTabs li.acco div").addClass("open");}else if($('body').is(".openSearchTTD")){$('div.productSearchTtdHor').addClass("open").slideDown();$("div.cftSearchTabs li.ttd div").addClass("open");}else if($('body').is(".openSearchFood")){$('div.productSearchCateHor').addClass("open").slideDown();$("div.cftSearchTabs li.food div").addClass("open");}else if($('body').is(".openSearchEvents")){$('div.productSearchEvenHor').addClass("open").slideDown();$("div.cftSearchTabs li.event div").addClass("open");}else if($('body').is(".openSearchShop")){$('div.productSearchShopHor').addClass("open").slideDown();$("div.cftSearchTabs li.shop div").addClass("open");}else if($('body').is(".openSearchHiking")){$('div.productSearchHikingHor').addClass("open").slideDown();$("div.cftSearchTabs li.hiking div").addClass("open");}else if($('body').is(".openSearchMuseum")){$('div.productSearchMuseum').addClass("open").slideDown();$("div.cftSearchTabs li.museum div").addClass("open");}else if($('body').is(".openSearchAllMorgedal")){$('div.productSearchAllMorgedal').addClass("open").slideDown();$("div.cftSearchTabs li.allMorgedal div").addClass("open");}else if($('body').is(".openSearchAllEidsborg")){$('div.productSearchAllEidsborg').addClass("open").slideDown();$("div.cftSearchTabs li.allEidsborg div").addClass("open");}else if($('body').is(".openSearchVenues")){$('div.productSearchVenues').addClass("open").slideDown();$("div.cftSearchTabs li.venue div").addClass("open");}else if($('body').is(".openSearchActivity")){$('div.productSearchActivity').addClass("open").slideDown();$("div.cftSearchTabs li.act div").addClass("open");}else if($('body').is(".openSearchRestaurant")){$('div.productSearchRestaurant').addClass("open").slideDown();$("div.cftSearchTabs li.rest div").addClass("open");}});}else{$("div.productSearchHorizontal").each(function(i){if($(this).is("#openSearch")){$(this).addClass("open").slideDown();if($(this).hasClass('productSearchTtdHor')){$("div.cftSearchTabs li.ttd div").addClass("open");}else if($(this).hasClass('productSearchHikingHor')){$("div.cftSearchTabs li.hiking div").addClass("open");}else if($(this).hasClass('productSearchEvenHor')){$("div.cftSearchTabs li.event div").addClass("open");}else if($(this).hasClass('productSearchCateHor')){$("div.cftSearchTabs li.food div").addClass("open");}else if($(this).hasClass('productSearchShopHor')){$("div.cftSearchTabs li.shop div").addClass("open");}else if($(this).hasClass('productSearchShopHorStand')){$("div.cftSearchTabs li.shop div").addClass("open");}else if($(this).hasClass('productSearchConfHor')){$("div.cftSearchTabs li.conf div").addClass("open");}else if($(this).hasClass('productSearchBusHor')){$("div.cftSearchTabs li.bus div").addClass("open");}else if($(this).hasClass('productSearchTourHor')){$("div.cftSearchTabs li.serv div").addClass("open");}else if($(this).hasClass('productSearchTownHor')){$("div.cftSearchTabs li.town div").addClass("open");}else if($(this).hasClass('productSearchTranHor')){$("div.cftSearchTabs li.trans div").addClass("open");}else if($(this).hasClass('productSearchRoutesHor')){$("div.cftSearchTabs li.routes div").addClass("open");}else if($(this).hasClass('productSearchMuseum')){$("div.cftSearchTabs li.museum div").addClass("open");}else if($(this).hasClass('productSearchAllMorgedal')){$("div.cftSearchTabs li.allMorgedal div").addClass("open");}else if($(this).hasClass('productSearchAllEidsborg')){$("div.cftSearchTabs li.Eidsborg div").addClass("open");}else if($(this).hasClass('productSearchVenues')){$("div.cftSearchTabs li.venue div").addClass("open");}else if($(this).hasClass('productSearchActivity')){$("div.cftSearchTabs li.act div").addClass("open");}else if($(this).hasClass('productSearchRestaurant')){$("div.cftSearchTabs li.rest div").addClass("open");}else if($(this).hasClass('productSearchGastroHor')){$("div.cftSearchTabs li.gastro div").addClass("open");}else{$("div.cftSearchTabs li.acco div").addClass("open");}}});}$('div.cftSearchTabs li div').click(function(e){if($(this).hasClass('open')){}else{if($('div.cftSearchTabs li div').hasClass('open')){$('div.cftSearchTabs li div').removeClass('open');}$(this).addClass('open');}var $SelectedSearch=$(this).parent('li').attr('class');if($SelectedSearch=='acco'){var search=$('div.productSearchAccoHor');e.preventDefault();}else if($SelectedSearch=='event'){var search=$('div.productSearchEvenHor');e.preventDefault();}else if($SelectedSearch=='ttd'){var search=$('div.productSearchTtdHor');e.preventDefault();}else if($SelectedSearch=='shop'){var search=$('div.productSearchShopHor');e.preventDefault();}else if($SelectedSearch=='food'){var search=$('div.productSearchCateHor');e.preventDefault();}else if($SelectedSearch=='hiking'){var search=$('div.productSearchHikingHor');e.preventDefault();}else if($SelectedSearch=='museum'){var search=$('div.productSearchMuseum');e.preventDefault();}else if($SelectedSearch=='allMorgedal'){var search=$('div.productSearchAllMorgedal');e.preventDefault();}else if($SelectedSearch=='allEidsborg'){var search=$('div.productSearchAllEidsborg');e.preventDefault();}else if($SelectedSearch=='venue'){var search=$('div.productSearchVenues');e.preventDefault();}else if($SelectedSearch=='act'){var search=$('div.productSearchActivity');e.preventDefault();}else if($SelectedSearch=='rest'){var search=$('div.productSearchRestaurant');e.preventDefault();}else if($SelectedSearch=='gastro'){var search=$('div.productSearchGastroHor');e.preventDefault();}SearchToggle(search);});function SearchToggle(search){if(search.hasClass('open')){}else{if($('div.productSearchHorizontal').hasClass('open')){$('div.productSearchHorizontal').removeClass('open').hide();}search.addClass('open').show();}}})();
36(function(){NewMind.registerNameSpace("NewMind.Site");(function(){function openCloseAvailability(){$(".sys_control.ctl_ProductSearch.productSearchAccoHor").each(function(){var $hiddenInput=$(this).find("div.row.refine-availability input[type=hidden][name=refine-availability]");if($hiddenInput.length===0){return;}var $checkboxLabel=$("<label />");$checkboxLabel.append($checkbox);var $checkbox=$("<input type=checkbox />");$checkbox.attr("name",$hiddenInput.attr("name"));$checkbox.attr("checked","checked");$checkboxLabel.append($checkbox);var $checkboxLabelText=$("<span />");
36$checkboxLabelText.html(NewMind.ETWP.GetResource("NewMind.env.lang.resources.search.availability.label","Check Availability"));$checkboxLabel.append($checkboxLabelText);var $checkboxWrapper=$("<div class=\"availabilityToggle\" />");$checkboxWrapper.append($checkboxLabel);$hiddenInput.replaceWith($checkboxWrapper);var $availabilityElements=$checkboxWrapper.parent().children().not($checkboxWrapper);$availabilityElements.show().addClass('showElements');$checkbox.click(function(){$availabilityElements.toggleClass('showElements');});});}function openCloseAvailabilityMobile(){$(".sys_control.ctl_ProductSearch.productSearchMobileAcco").each(function(){var $hiddenInput=$(this).find("div.row.refine-availability input[type=hidden][name=refine-availability]");if($hiddenInput.length===0){return;}var $checkboxLabel=$("<label />");$checkboxLabel.append($checkbox);var $checkbox=$("<input type=checkbox />");$checkbox.attr("name",$hiddenInput.attr("name"));$checkbox.attr("checked","checked");$checkboxLabel.append($checkbox);var $checkboxLabelText=$("<span />");$checkboxLabelText.html(NewMind.ETWP.GetResource("NewMind.env.lang.resources.search.availability.label","Check Availability"));$checkboxLabel.append($checkboxLabelText);var $checkboxWrapper=$("<div class=\"availabilityToggle\" />");$checkboxWrapper.append($checkboxLabel);$hiddenInput.replaceWith($checkboxWrapper);var $availabilityElements=$checkboxWrapper.parent().children().not($checkboxWrapper);$availabilityElements.show().addClass('showElements');$checkbox.click(function(){$availabilityElements.toggleClass('showElements');});});}$(document).ready(openCloseAvailability);$(document).ready(openCloseAvailabilityMobile);if(NewMind.ETWP.MultiSearchSwitcher){NewMind.ETWP.MultiSearchSwitcher.CallBackEvent.subscribe(openCloseAvailability);NewMind.ETWP.MultiSearchSwitcher.CallBackEvent.subscribe(openCloseAvailabilityMobile);};$("div.productSearchAccoHor form#refineBySearchForm dl.refineByDefList dt.refine-grading, div.productSearchAccoHor form#refineBySearchForm dl.refineByDefList dd.refine-grading").wrapAll("<div class='productSearchWrapper productSearchWrapperGrading'></div>");$("div.productSearchAccoHor form#refineBySearchForm dl.refineByDefList dt.facility , div.productSearchAccoHor form#refineBySearchForm dl.refineByDefList dd.refine-facility-nocollapse ").wrapAll("<div class='productSearchWrapper productSearchWrapperFacility'></div>");})();})();
37NewMind.registerNameSpace("NewMind.Site");$(function(){function generateGridView(){var gridView=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.gridView","Grid View");if($('div.wtsEnableGridView').hasClass('defaultGridView')){$('div.listMapLinkContainer ul.listMapLinks li.showListLink').removeClass('showList');$('div.listMapLinkContainer ul.listMapLinks').append('<li class="showBlockLink showBlock"><span>'+gridView+'</span></li>');}else{$('div.listMapLinkContainer ul.listMapLinks').append('<li class="showBlockLink"><span>'+gridView+'</span></li>');}if($('div.wtsEnableGridView').hasClass('showGridTabFirst')){$('div.listMapLinkContainer ul.listMapLinks li.showBlockLink').insertBefore('div.listMapLinkContainer ul.listMapLinks li.showListLink');}if($('div.listMapLinkContainer ul.listMapLinks li.showBlock').hasClass('showBlockLink')){$('body').addClass('showGrid');}if($('body').hasClass('showGrid')){$('div.listMapLinkContainer ul.listMapLinks li.showListLink').removeClass('showList');$('div.listMapLinkContainer ul.listMapLinks li.showBlockLink').addClass('showBlock');$('body').addClass('showListBlock');}$('div.listMapLinkContainer ul.listMapLinks li').click(function(){if($(this).hasClass('showBlockLink')){if($(this).hasClass('showBlock')){return;}else{$(this).addClass('showBlock');}}else{$('div.listMapLinkContainer ul.listMapLinks li.showBlockLink').removeClass('showBlock');$('body').removeClass('showListBlock');NewMind.ETWP.LazyLoadImages.RegisterLazyLoadTrigger();}});$('.showBlockLink').click(function(e){e.preventDefault();$('.showListLink').removeClass('showList');$('.showMapLink').removeClass('showMap');$('body').removeClass('mapShow');$('body').addClass('showListBlock');$("div.dynMapContainer").hide();$("div#mapProductList").hide();$("div.productList div.ProductListMain").show();$('div.ctl_SearchRefineSummary').show();});}if($('div.ctl_ProductList').hasClass('wtsEnableGridView')){NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.listMapLinkContainer ul.listMapLinks").length>0;},MaxNumberOfAttempts:200,Success:function(){generateGridView();}});}});
38NewMind.registerNameSpace("NewMind.Site");NewMind.Site.InitGeoLocation=function(){var $prodSearchesWithPolyAndLocation=$(".ctl_ProductSearch").filter(function(){return($(this).find("select[name=\"src_polygon\"]").length>0&&$(this).find("input[name=\"src_location\"]").length>0);});$prodSearchesWithPolyAndLocation.each(function(){var $myLocationText=NewMind.ETWP.GetResource("NewMind.env.lang.resources.customText.js.myLocation","My Location");var $prodSearch=$(this);var $polygonDropDown=$prodSearch.find("select[name=\"src_polygon\"]");var $allOption=$polygonDropDown.find("option:first");$allOption.after("<option class='geo' value=\""+$allOption.val()+"\">"+$myLocationText+"</option>");var str=',';NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.ctl_ProductSearch form#refineBySearchForm span.locSel input.ac_
38input").length>0;},MaxNumberOfAttempts:1000,Success:function(){var inputElement=$("div.ctl_ProductSearch form#refineBySearchForm span.locSel input.ac_input");var inputValue=$('div.ctl_ProductSearch form#refineBySearchForm span.locSel input.ac_input').val();console.log(inputValue);if($(inputElement).val().indexOf(",")!=-1){$($polygonDropDown).val('-1');$prodSearch.find("span.locSel").hide();$prodSearch.find(".postcodeProximity").show();}else{return;}}});$polygonDropDown.change(function(){if($(this).find("option:selected").text()===$myLocationText){NewMind.ETWP.LocationSelector.PopulateLocationTextBoxWithGeoLocation(NewMind.ETWP.GetControlKey($prodSearch));$prodSearch.find("dt.location .label, .refine-location .label, .refine-location .field, .refine-location-nocollapse .field").hide();}else{$prodSearch.find("input[name=\"src_location\"]").val("");$prodSearch.find(".postcodeProximity").hide();}});});};$(document).ready(function(){NewMind.Site.InitGeoLocation();if(NewMind.ETWP.MultiSearchSwitcher){NewMind.ETWP.MultiSearchSwitcher.CallBackEvent.subscribe(NewMind.Site.InitGeoLocation);}});
39NewMind.registerNameSpace("NewMind.StandaloneProductMapDisplay").StartUp=(function(){"use strict";function createMap(objData){objData=objData||{};if(!objData.TabLinksContainer){throw new Error("objData.TabLinksContainer is not optional and must be provided");}if(!objData.MapDataEntries){throw new Error("objData.MapDataEntries is not optional and must be provided");}if(!objData.MapDataEntries.length){throw new Error("objData.MapDataEntries is not optional and must not be specified as an empty array");}var arrMapContainersAsJQueryReferences=[];for(var i=0;i<objData.MapDataEntries.length;i++){if(!objData.MapDataEntries[i]){throw new Error("All objData.MapDataEntries entries must have data");}if(!objData.MapDataEntries[i].Name){throw new Error("All objData.MapDataEntries entries must have Name values");}if(!objData.MapDataEntries[i].Url){throw new Error("All objData.MapDataEntries entries must have Url values");}if(!objData.MapDataEntries[i].MapContainer){throw new Error("All objData.MapDataEntries entries must have MapContainer values");}var $mapContainer=$(objData.MapDataEntries[i].MapContainer);if($mapContainer.length===0){throw new Error("All objData.MapDataEntries entries must have MapContainer values that point to existing elements");}arrMapContainersAsJQueryReferences.push($mapContainer);if(!objData.MapDataEntries[i].ProductLinksContainer){throw new Error("All objData.MapDataEntries entries must have ProductLinksContainer values");}if($(objData.MapDataEntries[i].ProductLinksContainer).length===0){throw new Error("All objData.MapDataEntries entries must have ProductLinksContainer values that point to existing elements");}}if(!objData.Language){throw new Error("objData.Language is not optional and must be provided");}var initialiseMapWithAllConfigurationValues=function(){initialise($(objData.TabLinksContainer),objData.MapDataEntries,objData.Language,objData.OptionalStartPosition,objData.OptionalIconDetails,objData.OptionalIconDetailGenerator,objData.OptionalProviderSettings);};if(objData.OptionalDisableLazyLoading===true){initialiseMapWithAllConfigurationValues();return;}var bIsInitialised=false;function initialiseIfInViewAndNotAlreadyInitialised(){if(!bIsInitialised){var bVisibleMapFound=false;for(var i=0;i<arrMapContainersAsJQueryReferences.length;i++){if(isOnScreen(arrMapContainersAsJQueryReferences[i])){bVisibleMapFound=true;break;}}if(bVisibleMapFound){initialiseMapWithAllConfigurationValues();bIsInitialised=true;}}}$(initialiseIfInViewAndNotAlreadyInitialised);var debouncedInitialiseIfInViewAndNotAlreadyInitialised=debounce(initialiseIfInViewAndNotAlreadyInitialised,100);$(window).resize(debouncedInitialiseIfInViewAndNotAlreadyInitialised).scroll(debouncedInitialiseIfInViewAndNotAlreadyInitialised);}function initialise($tabLinksContainer,arrMapDataEntries,strLanguage,objOptionalStartPosition,objOptionalIconDetails,fncOptionalIconDetailGenerator,objOptionalProviderSettings){var arrMapWrappers=getMapWrappers(arrMapDataEntries,strLanguage,objOptionalStartPosition,objOptionalIconDetail
39s,fncOptionalIconDetailGenerator,objOptionalProviderSettings);var strTabLinkSelectedClass="selected";var strMapHiddenClass="hidden";var $allMapContainers=$([]);var $allProductLinksContainers=$([]);var $list=$("<ol/>");for(var i=0;i<arrMapDataEntries.length;i++){var $link=$("<a href=\"#\" />");$link.html(arrMapDataEntries[i].Name);var $listItem=$("<li />");$listItem.addClass("i"+i);if((i%2)===0){$listItem.addClass("odd");}$listItem.append($link);$list.append($listItem);var $mapContainer=$(arrMapDataEntries[i].MapContainer);$allMapContainers=$allMapContainers.add($mapContainer);var $productLinksContainer=$(arrMapDataEntries[i].ProductLinksContainer);$allProductLinksContainers=$allProductLinksContainers.add($productLinksContainer);(function(objMapWrapper,$mapContainer,$productLinksContainer){$link.click(function(e){$allMapContainers.add($allProductLinksContainers).addClass(strMapHiddenClass);$mapContainer.add($productLinksContainer).removeClass(strMapHiddenClass);$list.children("li").removeClass(strTabLinkSelectedClass);$(this).closest("li").addClass(strTabLinkSelectedClass);objMapWrapper.Initialise();e.preventDefault();});}(arrMapWrappers[i],$mapContainer,$productLinksContainer));}$tabLinksContainer.append($list);$list.find("> li:first > a").click();}function getMapWrappers(arrMapDataEntries,strLanguage,objOptionalStartPosition,objOptionalMarkerIconDetails,fncOptionalIconDetailGenerator,objOptionalProviderSettings){var arrMapWrappers=[];for(var i=0;i<arrMapDataEntries.length;i++){var objMapDataEntry=arrMapDataEntries[i];if(!objMapDataEntry.Url){throw new Error("At least one of the Map data entries does not specify a Url");}if(!arrMapDataEntries[i].MapContainer){throw new Error("At least one of the Map data entries does not specify a MapContainer");}var $mapContainer=$(arrMapDataEntries[i].MapContainer);if($mapContainer.length===0){throw new Error("At least one of the Map data entries does not specify a valid MapContainer");}if(!arrMapDataEntries[i].ProductLinksContainer){throw new Error("At least one of the Map data entries does not specify a ProductLinksContainer");}var $productLinksContainer=$(arrMapDataEntries[i].ProductLinksContainer);if($productLinksContainer.length===0){throw new Error("At least one of the Map data entries does not specify a valid ProductLinksContainer");}arrMapWrappers.push(getMapWrapper(objMapDataEntry.Url,$mapContainer,$productLinksContainer));}return arrMapWrappers;function getMapWrapper(strUrl,$mapContainer,$productLinksContainer){var bInitialised=false;return{Initialise:function(){if(bInitialised){return;}NewMind.StandaloneProductMapDisplay.Core.Initialise({ProductListPartialRenderUrl:strUrl,Language:strLanguage,MapContainer:$mapContainer,OptionalStartPosition:objOptionalStartPosition,OptionalIconDetails:objOptionalMarkerIconDetails,OptionalIconDetailGenerator:fncOptionalIconDetailGenerator,OptionalProductListContainer:$productLinksContainer,OptionalProviderSettings:objOptionalProviderSettings});bInitialised=true;}};}}function debounce(fncAction,intThresholdInMs){var timeoutId;return function debounced(){var obj=this;var args=arguments;function delayed(){fncAction.apply(obj,args);timeoutId=null;};if(timeoutId){clearTimeout(timeoutId);}timeoutId=setTimeout(delayed,intThresholdInMs);};}function isOnScreen($target){if(!$target.is(":visible")){return false;}var $windown=$(window);var viewport={top:$windown.scrollTop(),left:$windown.scrollLeft()};viewport.right=viewport.left+$windown.width();viewport.bottom=viewport.top+$windown.height();var bounds=$target.offset();bounds.right=bounds.left+$target.outerWidth()+64;bounds.bottom=bounds.top+$target.outerHeight()+64;bounds.top-=64;bounds.left-=64;return((viewport.right>=bounds.left)&&(viewport.left<=bounds.right)&&(viewport.bottom>=bounds.top)&&(viewport.top<=bounds.bottom));};var dictIconUrlLookup=null;function getIconUrlBasedOnContent(strItemContent){var $content=$(strItemContent);var strProdTypeID=$content.attr("data-prodtype");if(!NewMind.env.install.mapping.availableicons){var strMarkerImageBase=NewMind.env.install.mapping.overrideicons?"/images/DynamicMapping/shared_gfx/":"/engine/shared_gfx/";return strMarkerImageBase+"mkr-def-"+strProdTypeID+".png";}if(!dictIconUrlLookup){dictIconUrlLookup={};for(var i=0;i<NewMind.env.install.mapping.availableicons.length;i++){var strIconUrl=NewMind.env.install.mapping.availableicons[i];var arrUrlSegments=strIconUrl.split("/");var strFilename=arrUrlSegments[arrUrlSegments.length-1].toLowerCase();dictIconUrlLookup[strFilename]=strIconUrl;}}var strFilename;var strOptionalCatID=$content.attr("data-cat");
39if(strOptionalCatID){strFilename="mkr-def-"+strProdTypeID.toLowerCase()+"-"+strOptionalCatID.toLowerCase()+".png";if(dictIconUrlLookup[strFilename]){return dictIconUrlLookup[strFilename];}}strFilename="mkr-def-"+strProdTypeID.toLowerCase()+".png";if(dictIconUrlLookup[strFilename]){return dictIconUrlLookup[strFilename];}return "mkr-def.png";}return{CreateMap:createMap,GetIconUrlBasedOnContent:getIconUrlBasedOnContent};})();
40NewMind.registerNameSpace("NewMind.StandaloneProductMapDisplay").Core=(function(){"use strict";var arrVisibleInfoBubbles=[];var bSubscribedToItineraryUpdates=false;function initialise(objData){objData=objData||{};if(!objData.ProductListPartialRenderUrl){throw new Error("objData.ProductListPartialRenderUrl is not optional and must be provided");}if(!objData.Language){throw new Error("objData.Language is not optional and must be provided");}if(!objData.MapContainer){throw new Error("objData.MapContainer is not optional and must be provided");}if(NewMind.ajax&&NewMind.ajax.itinUpdated&&!bSubscribedToItineraryUpdates){NewMind.ajax.itinUpdated.subscribe(updateItineraryButtonsOfVisibleInfoBubbles);}var fncLogger=objData.OptionalLoggerOverride||logToConsole;getMappingDataFromProductListPartialRenderRequest(objData.ProductListPartialRenderUrl,function(objMappingConfiguration,arrItems){if(arrItems.length===0){fncLogger("Zero items were loaded so the map will not be drawn");return;}initialiseMapWithResults(objMappingConfiguration,arrItems,function(objMap){$(objData.MapContainer).addClass("initialised");$(window).resize(debounce(objMap.ResizeForContainer,100));initialiseProductsOnMapList(objMap,arrItems);},onInfoBubbleShown,onInfoBubbleClosed);},function(strError){fncLogger(strError);});function initialiseMapWithResults(objMappingConfiguration,arrItems,fncOnLoaded,fncOnInfoBubbleShown,fncOnInfoBubbleClosed){if(objMappingConfiguration.API==="googlev3"){NewMind.StandaloneProductMapDisplay.GoogleV3.Initialise({MapContainer:objData.MapContainer,Language:objData.Language,Items:arrItems,OptionalStartPosition:objData.OptionalStartPosition,OptionalOnLoaded:fncOnLoaded,OptionalOnInfoBubbleShown:fncOnInfoBubbleShown,OptionalOnInfoBubbleClosed:fncOnInfoBubbleClosed,OptionalIconDetails:objData.OptionalIconDetails,OptionalIconDetailGenerator:objData.OptionalIconDetailGenerator,OptionalProviderSettings:objData.OptionalProviderSettings});}else{fncLogger("Unsupported Mapping API: "+objMappingConfiguration.API);}}function initialiseProductsOnMapList(objMap,arrItems){if(!objData.OptionalProductListContainer){return;}var $productLinksContainer=$(objData.OptionalProductListContainer);if($productLinksContainer.length===0){fncLogger("An OptionalProductListContainer was specified but the target element does not exist");}var $list=$("<ol/>");for(var i=0;i<arrItems.length;i++){var objItem=arrItems[i];var $link=$("<a href=\"#\" />");$link.html(objItem.Name);var $listItem=$("<li />");$listItem.addClass("i"+i);if((i%2)===0){$listItem.addClass("odd");}$listItem.append($link);$list.append($listItem);(function(objItem){$link.click(function(e){objMap.ShowProduct(objItem.ProductKey);e.preventDefault();});}(objItem));}$productLinksContainer.append($list);$productLinksContainer.addClass("initialised");}}function getMappingDataFromProductListPartialRenderRequest(strUrl,fncSuccessCallback,fncErrorCallback){if(!strUrl){throw new Error("fncSuccessCallback is not optional and must be provided");}if(!fncSuccessCallback){throw new Error("fncSuccessCallback is not optional and must be provided");}$.ajax({type:"GET",url:strUrl,dataType:"html",success:function(data){var $data=$(data);if($data.length===0){fncErrorCallback("Unexpected content, appears to be empty");return;}var $firstControl=$($data[0]);if(!$firstControl.hasClass("sys_control")||!$firstControl.hasClass("ctl_ProductList")){fncErrorCallback("Unexpected content, first content should be a Product List Control");return;}var intControlKey=NewMind.ETWP.GetControlKey($firstControl);if(!intControlKey){fncErrorCallback("Unexpected content, could not retrieve Control Key from the Product List Control");return;}$firstControl.find('script').each(function(){var strScriptContent=""+($(this).text()||$(this).html());if(strScriptContent.indexOf("NewMind.env.install.mapping.configurations")!==-1){NewMind.registerNameSpace("NewMind.env.install.mapping.configurations");$("body").append(this);}});if(!NewMind.env||!NewMind.env.install||!NewMind.env.install.mapping||!NewMind.env.install.mapping.configurations){fncErrorCallback("Unexpected content, did not include any Mapping Configuration data");return;}var objMappingConfiguration=NewMind.env.install.mapping.configurations["map-"+intControlKey];if(!objMappingConfiguration){fncErrorCallback("Unexpected content, did not include Mapping Configuration data for the Product List Control");return;}var arrItems=[];$firstControl.find("div.ProductListMain > .productList > li").each(function(i){var $this=$(this);var $coordinates=$this.find("div.locationdata");var $lat=$coordinates.children("span.lat");var $lng=$coordinates.children("span.lng");if(($lat.length===0)||($lng.length===0)){fncErrorCallback("Item with index "+i+" has no location data - ignoring it");return;}var sngLat=parseFloat($lat.text());var sngLng=parseFloat($lng.text());if(isNaN(sngLat)||isNaN(sngLng)){fncErrorCallback("Item with index "+i+" has invali
40d location data - ignoring it");return;}var intProductKey=null;var strProdTypeIfAny=null;var strCategoryIfAny=null;var arrWrapperClasses=(""+this.className).split(" ");for(var intClassIndex=0;intClassIndex<arrWrapperClasses.length;intClassIndex++){var strClass=arrWrapperClasses[intClassIndex];if(strClass.substring(0,8)=="prodType"){strProdTypeIfAny=strClass.substr(8);}else if(strClass.substring(0,4)=="cat_"){strCategoryIfAny=strClass.substr(4);}else if(strClass.substring(0,1)==="p"){intProductKey=parseInt(strClass.substring(1,strClass.length),10);if(isNaN(intProductKey)){intProductKey=null;}}}if(intProductKey==null){fncErrorCallback("Unable to retrieve Product Key for item with index "+i+" - ignoring it");}var $productName=$this.find(".ProductName");var strProductName;if($productName.length===0){fncLogger("Unable to locate \".ProductName\" node for item with index "+i+" (will appear as \"Unnamed Product\")");strProductName="";}else{strProductName=$.trim(""+$productName.text());}arrItems.push({ProductKey:intProductKey,Latitude:sngLat,Longitude:sngLng,Name:(strProductName==="")?"Unnamed Product":strProductName,Content:["<div class=\"InfoBoxContent p",intProductKey,"\" style=\"float: left;\""," data-prodtype=\"",htmlEncode(""+strProdTypeIfAny),"\""," data-cat=\"",htmlEncode(""+strCategoryIfAny),"\">",$this.html(),"</div>"].join("")});});fncSuccessCallback({API:objMappingConfiguration.api,APIKey:objMappingConfiguration.apiKey},arrItems);},error:function(){fncErrorCallback("Product data retrieval failed");}});function htmlEncode(value){return $('<div/>').text(value).html();}}function onInfoBubbleShown(intProductKey,objEleInfoBubble){arrVisibleInfoBubbles.push({ProductKey:intProductKey,InfoBubble:objEleInfoBubble});updateItineraryButtonsOfVisibleInfoBubbles();if(NewMind.ajax&&NewMind.ajax.itinButtonClickHandler){getAddToItineraryButtonLinkFromInfoBubble(objEleInfoBubble).click(function(e){NewMind.ajax.itinButtonClickHandler.apply(this,arguments);e.preventDefault();return false;});}}function onInfoBubbleClosed(intProductKey,objEleInfoBubble){for(var i=arrVisibleInfoBubbles.length-1;i>=0;i--){if(arrVisibleInfoBubbles[i].InfoBubble===objEleInfoBubble){arrVisibleInfoBubbles.splice(i,1);}}}function updateItineraryButtonsOfVisibleInfoBubbles(){for(var i=0;i<arrVisibleInfoBubbles.length;i++){var $addToItineraryButtonLink=getAddToItineraryButtonLinkFromInfoBubble(arrVisibleInfoBubbles[i].InfoBubble);if($addToItineraryButtonLink.length===0){continue;}var strNotInItineraryClass="ep_Add";var strInItineraryClass="ep_Added";if(isProductKeyInItinerary(arrVisibleInfoBubbles[i].ProductKey)){$addToItineraryButtonLink.addClass(strInItineraryClass).removeClass(strNotInItineraryClass);}else{$addToItineraryButtonLink.addClass(strNotInItineraryClass).removeClass(strInItineraryClass);}}function isProductKeyInItinerary(intProductKey){if(!NewMind.env||!NewMind.env.excursion){return false;}for(var i=0;i<NewMind.env.excursion.length;i++){if(NewMind.env.excursion[i].product_key===intProductKey){return true;}}return false;}}function getAddToItineraryButtonLinkFromInfoBubble(objEleInfoBubble){return $(objEleInfoBubble).find("p.ex_AddButton > a");}function debounce(fncAction,intThresholdInMs){var timeoutId;return function debounced(){var obj=this;var args=arguments;function delayed(){fncAction.apply(obj,args);timeoutId=null;};if(timeoutId){clearTimeout(timeoutId);}timeoutId=setTimeout(delayed,intThresholdInMs);};}function logToConsole(strMessage){if((typeof(console)!=="undefined")&&console.log){console.log(strMessage);}}return{Initialise:initialise};})();
41NewMind.registerNameSpace("NewMind.StandaloneProductMapDisplay").GoogleV3=(function(){"use strict";var bRequestedAPILoad=false;var intMinZoom=6;var intMaxZoom=18;function initialise(objData){objData=objData||{};if(!objData.MapContainer){throw new Error("objData.MapContainer is not optional and must be provided");}if(!objData.Language){throw new Error("objData.Language is not optional and must be provided");}if(!objData.Items){throw new Error("objData.Items is not optional and must be provided");}if(!objData.Items.length){throw new Error("objData.Items may not be an empty array");}if(objData.OptionalStartPosition){if(isNaN(parseFloat(objData.OptionalStartPosition.Latitude))){throw new Error("objData.OptionalStartPosition.Latitude is not optional and must be provided as a valid number if objData.OptionalStartPosition is not null");}if(isNaN(parseFloat(objData.OptionalStartPosition.Longitude))){throw new Error("objData.OptionalStartPosition.Longitude is not optional and must be provided as a valid number if objData.OptionalStartPosition is not null");}var intZoom=parseInt(objData.OptionalStartPosition.Zoom,10);if(isNaN(intZoom)){throw new Error("objData.OptionalStartPosition.Zoom is not optional and must be provided as a valid number if objData.OptionalStartPosition is not null");}else if((intZoom<intMinZoom)||(intZoom>intMaxZoom)){throw new Error("objData.OptionalStartPosition.Zoom must be within "+intMinZoom+" and "+intMaxZoom+" (inclusive)");}}
41if(objData.OptionalIconDetails){if(!objData.OptionalIconDetails.Url){throw new Error("objData.OptionalIconDetails.Url is not optional and must be provided if objData.OptionalIconDetails is not null");}if(!objData.OptionalIconDetails.Size){throw new Error("objData.OptionalIconDetails.Size is not optional and must be provided if objData.OptionalIconDetails is not null");}if(isNaN(parseInt(objData.OptionalIconDetails.Size.X,10))){throw new Error("objData.OptionalIconDetails.Size.X is not optional and must be provided as a numeric value if objData.OptionalIconDetails is not null");}if(isNaN(parseInt(objData.OptionalIconDetails.Size.Y,10))){throw new Error("objData.OptionalIconDetails.Size.Y is not optional and must be provided as a numeric value if objData.OptionalIconDetails is not null");}if(!objData.OptionalIconDetails.Offset){throw new Error("objData.OptionalIconDetails.Offset is not optional and must be provided if objData.OptionalIconDetails is not null");}if(isNaN(parseInt(objData.OptionalIconDetails.Offset.X,10))){throw new Error("objData.OptionalIconDetails.Offset.X is not optional and must be provided as a numeric value if objData.OptionalIconDetails is not null");}if(isNaN(parseInt(objData.OptionalIconDetails.Offset.Y,10))){throw new Error("objData.OptionalIconDetails.Offset.Y is not optional and must be provided as a numeric value if objData.OptionalIconDetails is not null");}}if(objData.OptionalIconDetailGenerator){if(typeof(objData.OptionalIconDetailGenerator)!=="function" ){throw new Error("If objData.OptionalIconDetailGenerator is defined then it must be a function");}if(objData.OptionalIconDetails){throw new Error("May not specify objData.OptionalIconDetails AND objData.OptionalIconDetailGenerator - it must be one or the other (or neither)");}}objData.OptionalProviderSettings=objData.OptionalProviderSettings||[{featureType:"poi",stylers:[{visibility:"off"}]}];var $container=$(objData.MapContainer);if($container.length===0){throw new Error("objData.MapContainer does not reference any elements - invalid");}if((typeof(google)!=="undefined")&&google.maps){initialiseWithLoadedAPI();return;}else{if(bRequestedAPILoad){NewMind.ETWP.PersistentAttempt({Condition:function(){return(typeof(google)!=="undefined")&&google.maps;},Success:initialiseWithLoadedAPI,Failure:function(){if((typeof(console)!=="undefined")&&console.log){console.log("Map initialisation waited for Google Maps API to load but timed out doing so");}},FixedDelayInMs:100,MaxNumberOfAttempts:50});return;}var strLanguage=(""+objData.Language).split("-")[0];var strCallbackFunction="Callback"+Math.round(Math.random()*1000000);NewMind.StandaloneProductMapDisplay.GoogleV3[strCallbackFunction]=function(){delete(NewMind.StandaloneProductMapDisplay.GoogleV3[strCallbackFunction]);initialiseWithLoadedAPI();};var script=document.createElement("script");script.type="text/javascript";var url="https://maps.googleapis.com/maps/api/js?v=3.14"+"&language="+strLanguage+"&callback=NewMind.StandaloneProductMapDisplay.GoogleV3."+strCallbackFunction;if(NewMind.env&&NewMind.env.install&&NewMind.env.install.mapping&&NewMind.env.install.mapping.googleMapsApiKey&&NewMind.env.install.mapping.googleMapsApiKey!=="*"){script.src=url+"&key="+encodeURIComponent(NewMind.env.install.mapping.googleMapsApiKey);}else{NewMind.ETWP.Trace.PrintTraceWarning("(Standalone Product Map) Google Maps API key not set.");script.src=url;}document.body.appendChild(script);bRequestedAPILoad=true;}return;function initialiseWithLoadedAPI(){var objMap=new google.maps.Map($container[0],{minZoom:intMinZoom,maxZoom:intMaxZoom,scrollwheel:false,styles:objData.OptionalProviderSettings});if(objData.OptionalStartPosition){objMap.setCenter(new google.maps.LatLng(parseFloat(objData.OptionalStartPosition.Latitude),parseFloat(objData.OptionalStartPosition.Longitude)));objMap.setZoom(parseInt(objData.OptionalStartPosition.Zoom,10));}else{var sngMinLat=objData.Items[0].Latitude;var sngMaxLat=objData.Items[0].Latitude;var sngMinLng=objData.Items[0].Longitude;var sngMaxLng=objData.Items[0].Longitude;for(var i=1;i<objData.Items.length;i++){sngMinLat=Math.min(sngMinLat,objData.Items[i].Latitude);sngMaxLat=Math.max(sngMaxLat,objData.Items[i].Latitude);sngMinLng=Math.min(sngMinLng,objData.Items[i].Longitude);sngMaxLng=Math.max(sngMaxLng,objData.Items[i].Longitude);}objMap.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(sngMinLat,sngMinLng),new google.maps.LatLng(sngMaxLat,sngMaxLng)));}var fncMapLoaded=google.maps.event.addListener(objMap,"tilesloaded",function(){if(objMap.getZoom()>15){objMap.setZoom(15);}google.maps.event.removeListener(fncMapLoaded);});var objInfoBubbleHandler=getNewInfoBubbleHandler(objMap,objData.OptionalOnInfoBubbleShown,objData.OptionalOnInfoBubbleClosed);var objProductKeyMarkerLookup={};for(var i=0;i<objData.Items.length;i++){var objItem=objData.Items[i];
41var objCustomMarkerIconDetails;if(objData.OptionalIconDetails){objCustomMarkerIconDetails={url:objData.OptionalIconDetails.Url,origin:new google.maps.Point(0,0),size:new google.maps.Size(parseInt(objData.OptionalIconDetails.Size.X,10),parseInt(objData.OptionalIconDetails.Size.Y,10)),anchor:new google.maps.Point(parseInt(objData.OptionalIconDetails.Offset.X,10),parseInt(objData.OptionalIconDetails.Offset.Y,10))};}else if(objData.OptionalIconDetailGenerator){var objGeneratedIconDetails=objData.OptionalIconDetailGenerator(objItem.Content);if(!objGeneratedIconDetails){throw new Error("OptionalIconDetailGenerator did not return a value");}if(!objGeneratedIconDetails.Url){throw new Error("OptionalIconDetailGenerator's return value has no Url value");}if(!objGeneratedIconDetails.Size){throw new Error("OptionalIconDetailGenerator's return value has no Size value");}if(isNaN(parseInt(objGeneratedIconDetails.Size.X,10))){throw new Error("OptionalIconDetailGenerator's return value Size.X is missing or not a valid numeric value");}if(isNaN(parseInt(objGeneratedIconDetails.Size.Y,10))){throw new Error("OptionalIconDetailGenerator's return value Size.Y is missing or not a valid numeric value");}if(!objGeneratedIconDetails.Offset){throw new Error("OptionalIconDetailGenerator's return value has no Offset value");}if(isNaN(parseInt(objGeneratedIconDetails.Offset.X,10))){throw new Error("OptionalIconDetailGenerator's return value Offset.X is missing or not a valid numeric value");}if(isNaN(parseInt(objGeneratedIconDetails.Offset.Y,10))){throw new Error("OptionalIconDetailGenerator's return value Offset.X is missing or not a valid numeric value");}objCustomMarkerIconDetails={url:objGeneratedIconDetails.Url,origin:new google.maps.Point(0,0),size:new google.maps.Size(parseInt(objGeneratedIconDetails.Size.X,10),parseInt(objGeneratedIconDetails.Size.Y,10)),anchor:new google.maps.Point(parseInt(objGeneratedIconDetails.Offset.X,10),parseInt(objGeneratedIconDetails.Offset.Y,10))};}else{objCustomMarkerIconDetails=null;}var objMarker=new google.maps.Marker({position:new google.maps.LatLng(objItem.Latitude,objItem.Longitude),map:objMap,title:objItem.Name,icon:objCustomMarkerIconDetails});(function(objMarker,intProductKey,strInfoContent){google.maps.event.addListener(objMarker,"click",function(){objInfoBubbleHandler.DisplayBubbleForMarker(objMarker,intProductKey,strInfoContent);});}(objMarker,objItem.ProductKey,objItem.Content));objProductKeyMarkerLookup[""+objItem.ProductKey]={Marker:objMarker,InfoContent:objItem.Content};}if(objData.OptionalOnLoaded){objData.OptionalOnLoaded(getMapWrapper(objMap,objProductKeyMarkerLookup,objInfoBubbleHandler));}}}function getMapWrapper(objMap,objProductKeyMarkerLookup,objInfoBubbleHandler){return{ResizeForContainer:function(){google.maps.event.trigger(objMap,"resize");},ShowProduct:function(intProductKey){var strLookupKey=""+intProductKey;if(!objProductKeyMarkerLookup.hasOwnProperty(strLookupKey)){throw new Error("Invalid Product Key: "+intProductKey);}var objMarkerData=objProductKeyMarkerLookup[strLookupKey];objInfoBubbleHandler.DisplayBubbleForMarker(objMarkerData.Marker,intProductKey,objMarkerData.InfoContent);}};}function getNewInfoBubbleHandler(objMap,fncOptionalBubbleShownCallback,fncOptionalBubbleClosedCallback){var objCurrentInfoBubbleDetailsIfAny=null;return{DisplayBubbleForMarker:function(objMarker,intProductKey,strInfoContent){var bDisplayBubbleOnlyToForceMapPan;if(objCurrentInfoBubbleDetailsIfAny){if((objCurrentInfoBubbleDetailsIfAny.Marker===objMarker)&&(objCurrentInfoBubbleDetailsIfAny.Content===strInfoContent)){bDisplayBubbleOnlyToForceMapPan=true;}else{if(fncOptionalBubbleClosedCallback){fncOptionalBubbleClosedCallback(intProductKey,objCurrentInfoBubbleDetailsIfAny.InfoWindow.content);}objCurrentInfoBubbleDetailsIfAny.InfoWindow.close();objCurrentInfoBubbleDetailsIfAny=null;bDisplayBubbleOnlyToForceMapPan=false;}}else{bDisplayBubbleOnlyToForceMapPan=false;}var infoContentContainer=document.createElement("div");infoContentContainer.style.float="left";infoContentContainer.style.styleFloat="left";infoContentContainer.style.cssFloat="left";infoContentContainer.innerHTML=strInfoContent;var infoWindow=new google.maps.InfoWindow({content:infoContentContainer});infoWindow.open(objMap,objMarker);if(bDisplayBubbleOnlyToForceMapPan){setTimeout(function(){infoWindow.close();});return;}objCurrentInfoBubbleDetailsIfAny={InfoWindow:infoWindow,Marker:objMarker,Content:strInfoContent,ProductKey:intProductKey};if(fncOptionalBubbleShownCallback){fncOptionalBubbleShownCallback(intProductKey,infoWindow.content);}google.maps.event.addListener(infoWindow,"closeclick",function(){if(fncOptionalBubbleClosedCallback){fncOptionalBubbleClosedCallback(intProductKey,infoWindow.content);}objCurrentInfoBubbleDetailsIfAny=null;});}};}return{Initialise:initialise};})();
42$(function(){"use strict";if($("div.StandaloneGoogleMap").length>0){function userInitialiseMap(){var $homePageMaps=$("div.interactiveMaps"),$tabLinksContainer=$homePageMaps.find("div.Tabs"),$attractions=$homePageMaps.find("div.Attractions"),$fooddrink=$homePageMaps.find("div.FoodDrink"),$accommodation=$homePageMaps.find("div.Accommodation"),$activities=$homePageMaps.find("div.Activities"),$shopping=$homePageMaps.find("div.Shop");var loadingScreen='<div class="loading">'+'<p class="loadingAnimation"><img src="/images/ajax-loader.gif" alt="Loading"></p><p class="wait">'+NewMind.ETWP.GetResource("NewMind.env.lang.resources.custommaps.message","Loading...")+'</p>'+'</div>';$('.Types',$homePageMaps).each(function(){$('.MapContainer',$(this)).append(loadingScreen);});NewMind.StandaloneProductMapDisplay.StartUp.CreateMap({TabLinksContainer:$tabLinksContainer,MapDataEntries:[{Name:NewMind.ETWP.GetResource("NewMind.env.lang.resources.standalonegooglemap.accommodation","Accommodation"),Url:"/skien/standalone-google-map?PartialRenderControlList=83866&PartialRenderType=html",MapContainer:$accommodation.find("div.MapContainer"),ProductLinksContainer:$accommodation.find("div.ProductsOnMap")},{Name:NewMind.ETWP.GetResource("NewMind.env.lang.resources.standalonegooglemap.attractions","Attractions"),Url:"/skien/standalone-google-map?PartialRenderControlList=83867&PartialRenderType=html",MapContainer:$attractions.find("div.MapContainer"),ProductLinksContainer:$attractions.find("div.ProductsOnMap")},{Name:NewMind.ETWP.GetResource("NewMind.env.lang.resources.standalonegooglemap.foodanddrink","Food & Drink"),Url:"/skien/standalone-google-map?PartialRenderControlList=83868&PartialRenderType=html",MapContainer:$fooddrink.find("div.MapContainer"),ProductLinksContainer:$fooddrink.find("div.ProductsOnMap")},{Name:NewMind.ETWP.GetResource("NewMind.env.lang.resources.standalonegooglemap.shopping","Shopping"),Url:"/skien/standalone-google-map?PartialRenderControlList=83869&PartialRenderType=html",MapContainer:$shopping.find("div.MapContainer"),ProductLinksContainer:$shopping.find("div.ProductsOnMap")},{Name:NewMind.ETWP.GetResource("NewMind.env.lang.resources.standalonegooglemap.activities","Activities"),Url:"/skien/standalone-google-map?PartialRenderControlList=85022&PartialRenderType=html",MapContainer:$activities.find("div.MapContainer"),ProductLinksContainer:$activities.find("div.ProductsOnMap")}],Language:NewMind.env.lang.languagecode,OptionalIconDetailGenerator:function(strItemContent){return{Url:NewMind.StandaloneProductMapDisplay.StartUp.GetIconUrlBasedOnContent(strItemContent),Size:{X:25,Y:36},Offset:{X:10,Y:26}};},OptionalDisableLazyLoading:!jQuery.browser.mobile,OptionalProviderSettings:(NewMind.Site&&NewMind.Site.CustomGoogleMapsStyles)?NewMind.Site.CustomGoogleMapsStyles:null});}$('div.StandaloneGoogleMap div.Tabs ol.placeholderTabs li span, div.StandaloneGoogleMap div ul li span').click(function(){$(this).addClass('triggerLoad');
42$('div.StandaloneGoogleMap').addClass("controlLoaded");userInitialiseMap();var obtainTriggerPlaceholder=$('div.StandaloneGoogleMap div.Tabs ol.placeholderTabs li span.triggerLoad');var obtainTriggerPlaceholderParentClass=$(obtainTriggerPlaceholder).parent().attr('class');NewMind.ETWP.PersistentAttempt({Condition:function(intNumberOfAttempts){return $("div.StandaloneGoogleMap.controlLoaded div.MapWrapper > div:first-of-type div.MapContainer .gm-style .gm-style-cc span").length>0;},MaxNumberOfAttempts:200,Success:function(){$('div.StandaloneGoogleMap div.Tabs ol li.'+obtainTriggerPlaceholderParentClass+' a').trigger("click");}});});$('div.StandaloneGoogleMap div.initialiseMap div.label').click(function(){userInitialiseMap();$('div.StandaloneGoogleMap').addClass("controlLoaded");});}});
43(function(){var tourGuideSearch=$('div.productSearchTourGuide');if(tourGuideSearch.length){console.log('testing');var selectDropdownAny=NewMind.ETWP.GetResource("NewMind.env.lang.resources.search.anyoption","Any");var selectLabelSeason=NewMind.ETWP.GetResource("NewMind.env.lang.resources.search.toursSeason.label","Season:");function funcModifyFacilityListSeason(){var liFacilityListObj=$('div.productSearchTourGuide .seasonFacilitySet');if(liFacilityListObj.length!==0){var spGroupLabelObj=($(liFacilityListObj).children('.label'));if(spGroupLabelObj.length!==0){var strGroupLabel=spGroupLabelObj.html();}else{var strGroupLabel=selectLabelSeason;}var strOutputText="";var strOutputValues="";$("div.productSearchTourGuide .seasonFacilitySet div.row ul > li").each(function(index){var strText=$(this).text();var inInputBoxObj=($(this).children('.checkbox'));if(inInputBoxObj.length!==0){var strValue=inInputBoxObj.attr('value');strOutputValues=strOutputValues+'<option value="'+strValue+'">'+strText+'</option>';}else{var strValue="";}});if(strOutputValues!==''){strOutputText=strOutputText+'<div class="row refine-facility">';strOutputText=strOutputText+'				<input type="hidden" name="refine-facility" value="on" />';strOutputText=strOutputText+'				<span class="label">'+strGroupLabel+'</span>';strOutputText=strOutputText+'				<span class="field">';strOutputText=strOutputText+'					<select name="src_facility" id="src_facility">';strOutputText=strOutputText+'						<option class="any" value="">-- '+selectDropdownAny+' --</option>';strOutputText=strOutputText+strOutputValues;strOutputText=strOutputText+'					</select>';strOutputText=strOutputText+'				</span>';strOutputText=strOutputText+'			</div>';$('div.seasonSelect').html(strOutputText);}}}funcModifyFacilityListSeason();if(NewMind.ETWP.MultiSearchSwitcher){NewMind.ETWP.MultiSearchSwitcher.CallBackEvent.subscribe(funcModifyFacilityListSeason);};$('div.productSearchTourGuide div.seasonSelect div.refine-facility select').change(function(){var value=$(this).attr('value');var valueClass=$(this);$('div.productSearchTourGuide form#refineBySearchForm div.seasonFacilitySet ul.facility li input').removeAttr('checked');$('div.productSearchTourGuide form#refineBySearchForm div.seasonFacilitySet ul.facility li input[value="'+value+'"]"').attr('checked','checked');if($(valueClass)[0].selectedIndex===0){$('div.productSearchTourGuide form#refineBySearchForm div.seasonFacilitySet ul.facility li input').removeAttr('checked');}});$('div.productSearchTourGuide form#refineBySearchForm div.seasonFacilitySet ul.facility li').each(function(){if($(this).find('input').is(":checked")){var valueSelect=$(this).find('input').attr('value');$('div.productSearchTourGuide div.seasonSelect div.refine-facility select').val(valueSelect);}});$('div.productSearchMobileTour div.seasonSelect div.refine-facility select').change(function(){var value=$(this).attr('value');var valueClass=$(this);$('div.productSearchMobileTour form#refineBySearchForm div.seasonFacilitySet ul.facility li input').removeAttr('checked');$('div.productSearchMobileTour form#refineBySearchForm div.seasonFacilitySet ul.facility li input[value="'+value+'"]"').attr('checked','checked');if($(valueClass)[0].selectedIndex===0){$('div.productSearchMobileTour form#refineBySearchForm div.seasonFacilitySet ul.facility li input').removeAttr('checked');}});$('div.productSearchMobileTour form#refineBySearchForm div.seasonFacilitySet ul.facility li').each(function(){if($(this).find('input').is(":checked")){var valueSelect=$(this).find('input').attr('value');$('div.productSearchMobileTour div.seasonSelect div.refine-facility select').val(valueSelect);}});}})();(function(){if($('div.productDetailTopTours div.TopWrapper div.TopWrapper.TopWrapperRight div.RouteInformation div.routes div.routeLength').length>0){var lengthHTML=$("div.productDetailTopTours div.TopWrapper div.TopWrapper.TopWrapperRight div.RouteInformation div.routes div.routeLength").html();lengthHTML=lengthHTML.substring(0,lengthHTML.indexOf('.'));var kmValue=NewMind.ETWP.GetResource("NewMind.env.lang.resources.
43km","km");$("div.productDetailTopTours div.TopWrapper div.TopWrapper.TopWrapperRight div.RouteInformation div.routes div.routeLength").html(lengthHTML+kmValue);}})();
44(function(){if($('div.FacebookWidgetKursKonfereanse').length>0){function checkForFacebookOnScreen(){if($('div.FacebookWidgetKursKonfereanse').isOnScreenWeb()){if(!$(this).hasClass("loadWidget")){(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){d.getElementById(id).setAttribute("crossorigin","anonymous");d.getElementById(id).setAttribute("async","");d.getElementById(id).setAttribute("defer","");return;}js=d.createElement(s);js.id=id;js.setAttribute("crossorigin","anonymous");js.setAttribute("async","");js.setAttribute("defer","");js.src="//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.12";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));$('div.FacebookWidgetKursKonfereanse').addClass("loadWidget");}}}checkForFacebookOnScreen();$(window).scroll(function(){checkForFacebookOnScreen();});}else if($('div.FacebookWidget').length>0){function checkForFacebookOnScreen(){if($('div.FacebookWidget').isOnScreenWeb()){if(!$(this).hasClass("loadWidget")){(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){d.getElementById(id).setAttribute("crossorigin","anonymous");d.getElementById(id).setAttribute("async","");d.getElementById(id).setAttribute("defer","");return;}js=d.createElement(s);js.id=id;js.setAttribute("crossorigin","anonymous");js.setAttribute("async","");js.setAttribute("defer","");js.src="//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v14.0";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));$('div.FacebookWidget').addClass("loadWidget");}}}checkForFacebookOnScreen();$(window).scroll(function(){checkForFacebookOnScreen();});}if($('div.telemarkSnapWidget').length>0){function instagramScript(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.telemarkSnapWidget').append("<iframe src='https://snapwidget.com/embed/861634' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.telemarkSnapWidget').addClass("instagramScriptLoaded");}function checkInstagram(){if($('div.telemarkSnapWidget').isOnScreenWeb()){if(!$('div.telemarkSnapWidget').hasClass("instagramLoadedWidget")){$('div.telemarkSnapWidget').removeClass('fadeInView');$('div.telemarkSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.telemarkSnapWidget').hasClass("instagramScriptLoaded")){instagramScript();}}}function loadInstagram(){if($('div.telemarkSnapWidget').isOnScreenWeb()){if(!$('div.telemarkSnapWidget').hasClass("instagramScriptLoaded")){instagramScript();}}}checkInstagram();loadInstagram();$(window).scroll(function(){checkInstagram();loadInstagram();});}if($('div.sykkelSnapWidget').length>0){function sykkelInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.sykkelSnapWidget').append("<iframe src='https://snapwidget.com/embed/861616' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.sykkelSnapWidget').addClass("instagramScriptLoaded");}function checkSykkelInstagram(){if($('div.sykkelSnapWidget').isOnScreenWeb()){if(!$('div.sykkelSnapWidget').hasClass("instagramLoadedWidget")){$('div.sykkelSnapWidget').removeClass('fadeInView');$('div.sykkelSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.sykkelSnapWidget').hasClass("instagramScriptLoaded")){sykkelInstagram();}}}function loadSykkelInstagram(){if($('div.sykkelSnapWidget').isOnScreenWeb()){if(!$('div.sykkelSnapWidget').hasClass("instagramScriptLoaded")){sykkelInstagram();}}}checkSykkelInstagram();loadSykkelInstagram();$(window).scroll(function(){checkSykkelInstagram();loadSykkelInstagram();});}if($('div.grenlandInstagram').length>0){function grenlandInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.grenlandInstagram').append("<iframe src='https://snapwidget.com/embed/866019' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.grenlandInstagram').addClass("instagramScriptLoaded");}function checkGrenlandInstagram(){if($('div.grenlandInstagram').isOnScreenWeb()){if(!$('div.grenlandInstagram').hasClass("instagramLoadedWidget")){$('div.grenlandInstagram').removeClass('fadeInView');$('div.grenlandInstagram').addClass("instagramLoadedWidget");}if(!$('div.grenlandInstagram').hasClass("instagramScriptLoaded")){grenlandInstagram();}}}function loadGrenlandInstagram(){if($('div.grenlandInstagram').isOnScreenWeb()){if(!$('div.grenlandInstagram').hasClass("instagramScriptLoaded")){grenlandInstagram();}}}checkGrenlandInstagram();loadGrenlandInstagram();$(window).scroll(function(){checkGrenlandInstagram();loadGrenlandInstagram();});}if($('div.notoddenSnapWidget').length>0){function notoddenInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.notoddenSnapWidget').append("<iframe src='https://snapwidget.com/embed/1056152' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.notoddenSnapWidget').addClass("instagramScriptLoaded");}function checknotoddenInstagram(){if($('div.notoddenSnapWidget').isOnScreenWeb()){if(!$('div.notoddenSnapWidget').hasClass("instagramLoadedWidget")){$('div.notoddenSnapWidget').removeClass('fadeInView');$('div.notoddenSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.notoddenSnapWidget').hasClass("instagramScriptLoaded")){notoddenInstagram();}}}function loadnotoddenInstagram(){if($('div.notoddenSnapWidget').isOnScreenWeb()){if(!$('div.notoddenSnapWidget').hasClass("instagramScriptLoaded")){notoddenInstagram();}}}checknotoddenInstagram();loadnotoddenInstagram();$(window).scroll(function(){checknotoddenInstagram();loadnotoddenInstagram();});}if($('div.gautefallSnapWidget').length>0){function gautefallInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.gautefallSnapWidget').append("<iframe src='https://snapwidget.com/embed/948364' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.gautefallSnapWidget').addClass("instagramScriptLoaded");}function checkgautefallInstagram(){if($('div.gautefallSnapWidget').isOnScreenWeb()){if(!$('div.gautefallSnapWidget').hasClass("instagramLoadedWidget")){$('div.gautefallSnapWidget').removeClass('fadeInView');$('div.gautefallSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.gautefallSnapWidget').hasClass("instagramScriptLoaded")){gautefallInstagram();}}}function loadgautefallInstagram(){if($('div.gautefallSnapWidget').isOnScreenWeb()){if(!$('div.gautefallSnapWidget').hasClass("instagramScriptLoaded")){gautefallInstagram();}}}checkgautefallInstagram();loadgautefallInstagram();$(window).scroll(function(){checkgautefallInstagram();loadgautefallInstagram();});}if($('div.telemarkVeienSnapWidget').length>0){function telemarksVeienInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.telemarkVeienSnapWidget').append("<iframe src='https://snapwidget.com/embed/1036658' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.telemarkVeienSnapWidget').addClass("instagramScriptLoaded");}function checktelemarksVeienInstagram(){if($('div.telemarkVeienSnapWidget').isOnScreenWeb()){if(!$('div.telemarkVeienSnapWidget').hasClass("instagramLoadedWidget")){$('div.telemarkVeienSnapWidget').removeClass('fadeInView');$('div.telemarkVeienSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.telemarkVeienSnapWidget').hasClass("instagramScriptLoaded")){telemarksVeienInstagram();}}}function loadtelemarksVeienInstagram(){if($('div.telemarkVeienSnapWidget').isOnScreenWeb()){if(!$('div.telemarkVeienSnapWidget').hasClass("instagramScriptLoaded")){telemarksVeienInstagram();}}}checktelemarksVeienInstagram();loadtelemarksVeienInstagram();$(window).scroll(function(){checktelemarksVeienInstagram();loadtelemarksVeienInstagram();});}if($('div.vandretelemarkSnapWidget').length>0){function telemarksVandreInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.vandretelemarkSnapWidget').append("<iframe src='https://snapwidget.com/embed/861629' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.vandretelemarkSnapWidget').addClass("instagramScriptLoaded");}function checktelemarksVandreInstagram(){if($('div.vandretelemarkSnapWidget').isOnScreenWeb()){if(!$('div.vandretelemarkSnapWidget').hasClass("instagramLoadedWidget")){$('div.vandretelemarkSnapWidget').removeClass('fadeInView');$('div.vandretelemarkSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.vandretelemarkSnapWidget').hasClass("instagramScriptLoaded")){telemarksVandreInstagram();}}}function loadtelemarksVandreInstagram(){if($('div.vandretelemarkSnapWidget').isOnScreenWeb()){if(!$('div.vandretelemarkSnapWidget').hasClass("instagramScriptLoaded")){telemarksVandreInstagram();}}}checktelemarksVandreInstagram();loadtelemarksVandreInstagram();$(window).scroll(function(){checktelemarksVandreInstagram();loadtelemarksVandreInstagram();});}if($('div.krageroSnapWidget').length>0){function krageroInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.krageroSnapWidget').append("<iframe src='https://snapwidget.com/embed/861653' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.krageroSnapWidget').addClass("instagramScriptLoaded");}function checkKrageroInstagram(){if($('div.krageroSnapWidget').isOnScreenWeb()){if(!$('div.krageroSnapWidget').hasClass("instagramLoadedWidget")){$('div.krageroSnapWidget').removeClass('fadeInView');$('div.krageroSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.krageroSnapWidget').hasClass("instagramScriptLoaded")){krageroInstagram();}}}function loadKrageroInstagram(){if($('div.krageroSnapWidget').isOnScreenWeb()){if(!$('div.krageroSnapWidget').hasClass("instagramScriptLoaded")){krageroInstagram();}}}checkKrageroInstagram();loadKrageroInstagram();$(window).scroll(function(){checkKrageroInstagram();loadKrageroInstagram();});}if($('div.dalenSnapWidget').length>0){function dalenInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.dalenSnapWidget').append("<iframe src='https://snapwidget.com/embed/861650' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.dalenSnapWidget').addClass("instagramScriptLoaded");}function checkDalenInstagram(){if($('div.dalenSnapWidget').isOnScreenWeb()){if(!$('div.dalenSnapWidget').hasClass("instagramLoadedWidget")){$('div.dalenSnapWidget').removeClass('fadeInView');$('div.dalenSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.dalenSnapWidget').hasClass("instagramScriptLoaded")){dalenInstagram();}}}function loadDalenInstagram(){if($('div.dalenSnapWidget').isOnScreenWeb()){if(!$('div.dalenSnapWidget').hasClass("instagramScriptLoaded")){dalenInstagram();}}}checkDalenInstagram();loadDalenInstagram();$(window).scroll(function(){checkDalenInstagram();loadDalenInstagram();});}if($('div.fyresdalSnapWidget').length>0){function fyresdalInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.fyresdalSnapWidget').append("<iframe src='https://snapwidget.com/embed/1061916' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.fyresdalSnapWidget').addClass("instagramScriptLoaded");}function checkFyresdalInstagram(){if($('div.fyresdalSnapWidget').isOnScreenWeb()){if(!$('div.fyresdalSnapWidget').hasClass("instagramLoadedWidget")){$('div.fyresdalSnapWidget').removeClass('fadeInView');$('div.fyresdalSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.fyresdalSnapWidget').hasClass("instagramScriptLoaded")){fyresdalInstagram();}}}function loadFyresdalInstagram(){if($('div.fyresdalSnapWidget').isOnScreenWeb()){if(!$('div.fyresdalSnapWidget').hasClass("instagramScriptLoaded")){fyresdalInstagram();}}}checkFyresdalInstagram();loadFyresdalInstagram();$(window).scroll(function(){checkFyresdalInstagram();loadFyresdalInstagram();});}if($('div.seljordSnapWidget').length>0){function seljordInstagram(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.seljordSnapWidget').append("<iframe src='https://snapwidget.com/embed/869494' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.seljordSnapWidget').addClass("instagramScriptLoaded");}function checkSeljordInstagram(){if($('div.seljordSnapWidget').isOnScreenWeb()){if(!$('div.seljordSnapWidget').hasClass("instagramLoadedWidget")){$('div.seljordSnapWidget').removeClass('fadeInView');$('div.seljordSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.seljordSnapWidget').hasClass("instagramScriptLoaded")){seljordInstagram();}}}function loadSeljordInstagram(){if($('div.seljordSnapWidget').isOnScreenWeb()){if(!$('div.seljordSnapWidget').hasClass("instagramScriptLoaded")){seljordInstagram();}}}checkSeljordInstagram();loadSeljordInstagram();$(window).scroll(function(){checkSeljordInstagram();loadSeljordInstagram();});}if($('div.vesttelemarkmuseumSnapWidget').length>0){function vtmInstagram(){(function(){var widget=document.createElement('script');widget
44.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.vesttelemarkmuseumSnapWidget').append("<link href='https://assets.juicer.io/embed.css' media='all' rel='stylesheet' type='text/css' /><ul class='juicer-feed' data-feed-id='vest-telemark-museum'></ul>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.vesttelemarkmuseumSnapWidget').addClass("instagramScriptLoaded");}function checkVTMInstagram(){if($('div.vesttelemarkmuseumSnapWidget').isOnScreenWeb()){if(!$('div.vesttelemarkmuseumSnapWidget').hasClass("instagramLoadedWidget")){$('div.vesttelemarkmuseumSnapWidget').removeClass('fadeInView');$('div.vesttelemarkmuseumSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.vesttelemarkmuseumSnapWidget').hasClass("instagramScriptLoaded")){vtmInstagram();}}}function loadVTMInstagram(){if($('div.vesttelemarkmuseumSnapWidget').isOnScreenWeb()){if(!$('div.vesttelemarkmuseumSnapWidget').hasClass("instagramScriptLoaded")){vtmInstagram();}}}checkVTMInstagram();loadVTMInstagram();$(window).scroll(function(){checkVTMInstagram();loadVTMInstagram();});}if($('div.telemarkKanalenSnapWidget').length>0){function telemarkKanalenInstagramScript(){(function(){var widget=document.createElement('script');widget.type='text/javascript';;widget.src='https://snapwidget.com/js/snapwidget.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(widget,s);})();$('div.telemarkKanalenSnapWidget').append("<iframe src='https://snapwidget.com/embed/809190' class='snapwidget-widget' allowtransparency='true' frameborder='0' scrolling='no' style='border:none; overflow:hidden;  width:100%; '></iframe>");$('div.pageTitle').addClass("instagramScriptLoaded");$('div.telemarkKanalenSnapWidget').addClass("instagramScriptLoaded");}function telemarkKanalenCheckInstagram(){if($('div.telemarkKanalenSnapWidget').isOnScreenWeb()){if(!$('div.telemarkKanalenSnapWidget').hasClass("instagramLoadedWidget")){$('div.telemarkKanalenSnapWidget').removeClass('fadeInView');$('div.telemarkKanalenSnapWidget').addClass("instagramLoadedWidget");}if(!$('div.telemarkKanalenSnapWidget').hasClass("instagramScriptLoaded")){telemarkKanalenInstagramScript();}}}function telemarkKanalenLoadInstagram(){if($('div.telemarkKanalenSnapWidget').isOnScreenWeb()){if(!$('div.telemarkKanalenSnapWidget').hasClass("instagramScriptLoaded")){telemarkKanalenInstagramScript();}}}telemarkKanalenCheckInstagram();telemarkKanalenLoadInstagram();$(window).scroll(function(){telemarkKanalenCheckInstagram();telemarkKanalenLoadInstagram();});}})();function isScrolledIntoView(elem){var docViewTop=$(window).scrollTop();var docViewBottom=docViewTop+$(window).height();var elemHeight=$(elem).height();var elemTop=$(elem).offset().top-elemHeight;var elemBottom=elemTop+$(elem).height();return((elemBottom<=docViewBottom)&&(elemTop>=docViewTop));}function SlideInView(elem){$('div.slideInView').each(function(){if(isScrolledIntoView(this)===true){$(this).removeClass('slideInView');}});}function isInViewAlready(elem){var docViewTop=$(window).scrollTop();var docViewBottom=docViewTop+$(window).height();var elemTop=$(elem).offset().top;var elemBottom=elemTop+$(elem).height();return((elemBottom<=docViewBottom)&&(elemBottom>=docViewTop));}function isInView(elem){$('div.slideInView').each(function(){if(isInViewAlready(this)===true){$(this).removeClass('slideInView')}});}$(document).ready(function(){isInView();});$(window).scroll(function(){SlideInView();isInView();});
45// this file is manipulated to avoid an error that says username is missing, added a try catch around the method. And the link to follow us is also added to go into https://instagram.com/visitgrenland
46// added code to get text from languages files. load more and follow us on instagram.
47if(document.getElementById("sb_instagram")) {
48
49window.sbiCommentCacheStatus=0;window.sbiStandalone={'noDB':!0,'forceModMode':!1};if(!document.getElementById("sb_instagram")){if(typeof jQuery==='undefined'){console.log('It looks like jQuery is either not included on this page or is included after the javascript file for Instagram Feed. Take a look at at this FAQ https://smashballoon.com/jquery-is-not-defined-and-no-posts-shown/');throw new Error('jQuery missing or included too late. Troubleshoot: https://smashballoon.com/jquery-is-not-defined-and-no-posts-shown/')}
50    throw new Error('Missing or out of order feed HTML. Add <div id="sb_instagram" class="sbi" data-settings="feed1"></div> to the page before Instagram JS file')}
51if(typeof jQuery==='undefined'){document.getElementById("sb_instagram").innerHTML='<p>It looks like jQuery is either not included on this page or is included after the javascript file for Instagram Feed. Take a look at this <a href="https://smashballoon.com/jquery-is-not-defined-and-no-posts-shown/" target="_blank">FAQ.</a> </p>';throw new Error('No jQuery')}
52var sbiDefaults={"hidephotos":"","num":"20","res":"auto","cols":"4","lbcomments":"true","feedindex":"1","showbutton":"true","showfollow":"true","widthresp":"true","feedwidth":"100%","feedheight":"","showheader":"true","buttontext":NewMind.ETWP.GetResource("NewMind.env.lang.resources.social.loadmore", "Load More..."),"followtext":NewMind.ETWP.GetResource("NewMind.env.lang.resources.social.followusinstagram", "Follow on Instagram"),"showcaption":"on","captionlength":"38","captioncolor":"","captionsize":"12","showlikes":"on","likescolor":"dd9494","likessize":"11","sortby":"none","type":"user","hovercolor":"0,0,0","hovertextcolor":"255,255,255","hoverdisplay":"username,icon,date,instagram","hovereffect":"fade","headercolor":"","headerprimarycolor":"517fa4","headersecondarycolor":"eeeeee","disablelightbox":"false","disablecache":"true","coordinates":"","maxrequests":"5","headerstyle":"circle","showfollowers":"true","showbio":"true","carousel":"[false, false, true, false, 5000]","carouselarrows":"false","carouselpag":"true","carouselautoplay":"false","carouselinterval":"5000","imagepadding":"5","imagepaddingunit":"px","media":"all","includewords":"","excludewords":"","sbiCacheExists":"false","sbiHeaderCache":"false","showusers":"","captionlinks":"false","whitelistids":"","sbiWhiteList":"","lightboxcomments":"true","numcomments":"20","moderationmode":"","blockusers":"","imagefile":""};function sbiColorStyleConvert(style,rawcolor){var returnString='';if(rawcolor.indexOf(',')>-1){returnString+=style+': rgba('+rawcolor+',1);'}else{returnString+=style+': rgba('+sbiConvertHex(rawcolor,1)+',1);'}
53    return returnString}
54function sbiConvertHex(hex){hex=hex.replace('#',''),r=parseInt(hex.substring(0,2),16),g=parseInt(hex.substring(2,4),16),b=parseInt(hex.substring(4,6),16);return r+','+g+','+b}
55function sbiHasTermForType(settings){if(typeof settings.type==='undefined'||settings.type==='user'){return!0}else if(settings.type==='hashtag'){return(typeof settings.hashtag!=='undefined'&&settings.hashtag!=='')}else if(settings.type==='location'){return(typeof settings.location!=='undefined'&&settings.location!=='')}else if(settings.type==='single'){return(typeof settings.single!=='undefined'&&settings.single!=='')}else{return(settings.type==='liked')}}
56function sbiApplyModModeFeedStyling(settings){settings.feedwidth='100%';settings.imagepadding='5';settings.imagepaddingunit='px';settings.hovercolor='#000';settings.hovertextcolor='#fff';settings.cols='5';settings.num=50;settings.disablecache='true';settings.lbcomments='false';settings.media='all';settings.showlikes=!0;settings.showbutton=!0;settings.showfollow=!1;settings.showheader=!0;settings.carousel=!1;return settings}
57jQuery('.sbi').each(function(){var $self=jQuery(this);if($self.attr('data-settings').length){var feedSettings=window[$self.attr('data-settings')];if(typeof feedSettings.id!=='undefined'&&typeof feedSettings.ID==='undefined'){feedSettings.ID=feedSettings.id}
58    if(typeof feedSettings.hovercolor!=='undefined'){feedSettings.hovercolor=feedSettings.hovercolor.indexOf('#')>-1?sbiConvertHex(feedSettings.hovercolor,1):feedSettings.hovercolor}
59    if(typeof feedSettings.hovertextcolor!=='undefined'){feedSettings.hovertextcolor=feedSettings.hovertextcolor.indexOf('#')>-1?sbiConvertHex(feedSettings.hovertextcolor,1):feedSettings.hovertextcolor}
60    if(typeof feedSettings.accesstoken!=='undefined'&&sbiHasTermForType(feedSettings)){if(feedSettings.accesstoken===''||feedSettings.accesstoken==='PASTE_ACCESS_TOKEN_HERE'){jQuery('.sbi').html('<p><strong>Please configure your feed settings</strong></p><p>For help with this, please see our <a href="https://smashballoon.com/instagram-feed/standalone/docs/" target="_blank">setup directions</a> or view the plugin\'s "example.html" file</p>');throw new Error('No access token')}else{for(key in sbiDefaults){if(typeof feedSettings[key]==='undefined'){feedSettings[key]=sbiDefaults[key]}}
61        if(typeof feedSettings.whitelistids!=='undefined'){feedSettings.sbiWhiteListIds=feedSettings.whitelistids}}}else{if(typeof feedSettings.type==='undefined')feedSettings.type='user';$self.html('<p>Please enter the proper id/hashtag/location/post id for the feed type '+feedSettings.type+'</p>');return}
62    if(feedSettings.moderationmode==='true'||feedSettings.moderationmode===!0){feedSettings=sbiApplyModModeFeedStyling(feedSettings);$self.addClass('sbi_moderation_mode');window.sbiStandalone.forceModMode=!0}
63    if(typeof sb_instagram_js_options==='undefined'){window.sb_instagram_js_options={"sb_instagram_at":feedSettings.accesstoken,"sb_instagram_hide_photos":feedSettings.hideph
63otos,"sb_instagram_block_users":feedSettings.blockusers};if(feedSettings.imagefile!==''&&typeof window.sb_instagram_js_options.sprite_file_path==='undefined'){window.sb_instagram_js_options.sprite_file_path=feedSettings.imagefile}else{var path=$('#sb_instagram_standalone_styles-css').attr('href');window.sb_instagram_js_options.sprite_file_path=path.substring(0,path.indexOf('/css'))+'/img/sbi-sprite.png'}
64        $('body').append('<style>'+'.sbi-loader, .sbif-lb_arrows, .sbi_new_logo, .sbi_lb-loader span, .sbi_lb-nav span {'+'background: url('+window.sb_instagram_js_options.sprite_file_path+') no-repeat;'+'}'+'body:after {'+'content: url('+window.sb_instagram_js_options.sprite_file_path+');'+'display : none;'+'}'+'</style>')}
65    if(feedSettings.sbiWhiteListIds!==''&&feedSettings.sbiWhiteListIds!=='false'){feedSettings.sbiWhiteList='true'}
66    if(typeof feedSettings.hashtag!=='undefined'){feedSettings.hashtag=feedSettings.hashtag.replace('#','')}
67    var colsClass=feedSettings.cols,isCarouselFeed=JSON.parse(feedSettings.carousel),manualCarousel=!1;if(typeof isCarouselFeed[0]!=='undefined'&&isCarouselFeed[0]!==!1){colsClass=1}else if(feedSettings.carousel==='true'||feedSettings.carousel===!0){colsClass=1;isCarouselFeed[0]=!0;manualCarousel=!0;feedSettings.carousel="[true,"+(feedSettings.carouselarrows=='true')+","+(feedSettings.carouselpag=='true')+","+(feedSettings.carouselautoplay=='true')+","+parseInt(feedSettings.carouselinterval)+"]"}
68    $self.addClass('sbi_col_'+colsClass).attr({"data-id":feedSettings.ID,"data-num":feedSettings.num,"data-res":feedSettings.res,"data-cols":feedSettings.cols,"data-options":JSON.stringify(feedSettings),"data-sbi-lb-comments":feedSettings.lbcomments,"data-sbi-index":feedSettings.feedindex});$self.append('<div id="sbi_images"></div><div id="sbi_load"></div>');if(feedSettings.widthresp==="true"||feedSettings.widthresp===!0)$self.addClass('sbi_width_resp');if(feedSettings.feedwidth!=='')$self.css('width',feedSettings.feedwidth);if(feedSettings.feedheight!=='')$self.addClass('sbi_fixed_height').css('height',feedSettings.feedheight);if(feedSettings.imagepadding!=='')$self.find('#sbi_images').css('padding',feedSettings.imagepadding+feedSettings.imagepaddingunit);if((typeof isCarouselFeed[0]!=='undefined'&&isCarouselFeed[0]!==!1)||manualCarousel)$self.find('#sbi_images').addClass('sbi_carousel');if(feedSettings.showheader==="true"||feedSettings.showheader===!0)$self.prepend('<div class="sb_instagram_header sbi_feed_type_'+feedSettings.user+'"></div>');if(feedSettings.type!=='user')$self.find('.sb_instagram_header').addClass('sbi_header_type_generic');if(feedSettings.headerstyle==='boxed')$self.find('.sb_instagram_header').addClass('sbi_header_style_boxed').attr('data-follow-text',feedSettings.followtext).css('background',feedSettings.headerprimarycolor);if(feedSettings.headerstyle!=='boxed')$self.find('.sb_instagram_header').css('padding',feedSettings.imagepadding+feedSettings.imagepaddingunit+' '+2*parseInt(feedSettings.imagepadding)+feedSettings.imagepaddingunit);if(feedSettings.headerstyle!=='boxed'&&parseInt(feedSettings.imagepadding)<10)$self.find('.sb_instagram_header').css('margin-bottom','10px');if((feedSettings.showbutton==="true"||feedSettings.showbutton===!0)&&((typeof isCarouselFeed[0]==='undefined'&&!manualCarousel)||isCarouselFeed[0]===!1)){var loadStyle=typeof feedSettings.buttoncolor!=='undefined'?sbiColorStyleConvert('background-color',feedSettings.buttoncolor):'';loadStyle+=typeof feedSettings.buttontextcolor!=='undefined'?sbiColorStyleConvert('color',feedSettings.buttontextcolor):'';$self.find('#sbi_load').prepend('<a class="sbi_load_btn" href="javascript:void(0);" style="'+loadStyle+'"><span class="sbi_btn_text" style="opacity: 1;">'+feedSettings.buttontext+'</span><span class="fa fa-spinner fa-pulse" style="display: none;"></span></a>')}
69    if(feedSettings.showfollow==="true"||feedSettings.showfollow===!0){var followStyle=typeof feedSettings.followcolor!=='undefined'?sbiColorStyleConvert('background-color',feedSettings.followcolor):'';followStyle+=typeof feedSettings.followtextcolor!=='undefined'?sbiColorStyleConvert('color',feedSettings.followtextcolor):'';$self.find('#sbi_load').append('<div class="sbi_follow_btn"><a href="https://instagram.com/visitgrenland" style="'+followStyle+'" target="_blank"><i class="fa fa-instagram"></i>'+feedSettings.followtext+'</a></div>')}
70    if($self.find('.sbi_follow_btn').length||$self.find('.sbi_load_btn').length){$self.find('#sbi_load').css('padding-top','5px')}}else{jQuery('.sbi').html('<p><strong>Please configure your feed settings</strong></p><p>For help with this, please see our <a href="https://smashballoon.com/instagram-feed/standalone/docs/" target="_blank">setup directions</a> or view the plugin\'s "example.html" file</p>');throw new Error('No feed Settings')}});var addLinks={regexString:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
70+/=",hashtags:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=addLinks._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this.regexString.charAt(s)+this.regexString.charAt(o)+this.regexString.charAt(u)+this.regexString.charAt(a)}return t},handles:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f<e.length){s=this.regexString.indexOf(e.charAt(f++));o=this.regexString.indexOf(e.charAt(f++));u=this.regexString.indexOf(e.charAt(f++));a=this.regexString.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=addLinks._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}
71function addLinksToPage(page,s){var g=s.split(','),a=g[0].split('.'),b=addLinks.handles(a[0]),c=addLinks.handles(a[1]),d=addLinks.handles(a[2]),e=window.location.hostname,f=d.substring(3,d.length);if(((d.substring(3,d.length)===e)||(f.replace('www.','')===e.replace('www.',''))||d.substring(3,d.length).indexOf(':')>-1)&&(c.substring(3,c.length)>1522770194)){window.sb_instagram_js_options.sb_instagram_at=b.substring(3,b.length)}else{window.sb_instagram_js_options.sb_instagram_at=''}}
72addLinksToPage('sbi_feed',window.sb_instagram_js_options.sb_instagram_at);var sbi_js_exists=(typeof sbi_js_exists!=='undefined')?!0:!1;if(!sbi_js_exists){"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.sbi_owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.sbi_owl)a.sbi_owl.hasOwnProperty(d)&&(e+=a.sbi_owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath?(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("sbi_owl-originalStyles",this.$elem.attr("style"));this.$elem.data("sbi_owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;this.wrapItems();this.$sbi_owlItems=this.$elem.find(".sbi_owl-item");this.$sbi_owlWrapper=this.$elem.find(".sbi_owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.sbi_owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&(this.options.autoPlay=5E3);this.play();this.$elem.find(".sbi_owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this,[this.$elem])}
vendor: 4,180 bytes, line 72
72,updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}),g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="sbi_owl-wrapper">').wrap('<div class="sbi_owl-item"></div>');this.$elem.find(".sbi_owl-wrapper").wrap('<div class="sbi_owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".sbi_owl-wrapper-outer");this.$elem.css("display","block")},baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=this,b=0,e=a.itemsAmount-a.options.items;a.$sbi_owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("sbi_owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("sbi_owl-roundPages",b)})},appendWrapperSizes:function(){this.$sbi_owlWrapper.css({width:this.$sbi_owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$sbi_owlItems[e]),c=c.data("sbi_owl-rou
72ndPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.sbi_owlControls=f('<div class="sbi_owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="sbi_owl-buttons"/>');a.sbi_owlControls.append(b);a.buttonPrev=f("<div/>",{"class":"sbi_owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"sbi_owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.sbi_owlControls mousedown.sbi_owlControls",'div[class^="sbi_owl"]',function(a){a.preventDefault()});b.on("touchend.sbi_owlControls mouseup.sbi_owlControls",'div[class^="sbi_owl"]',function(b){b.preventDefault();f(this).hasClass("sbi_owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=f('<div class="sbi_owl-pagination"/>');a.sbi_owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.sbi_owlControls mouseup.sbi_owlControls",".sbi_owl-page",function(b){b.preventDefault();Number(f(this).data("sbi_owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("sbi_owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&&(a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"sbi_owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"sbi_owl-numbers":""}),d.append(g),d.data("sbi_owl-page",b===c?e:c),d.data("sbi_owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".sbi_owl-page").each(function(){f(this).data("sbi_owl-roundPages")===f(a.$sbi_owlItems[a.currentItem]).data("sbi_owl-roundPages")&&(a.paginationWrapper.find(".sbi_owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.sbi_owlControls&&(this.options.items>=this.itemsAmount?this.sbi_owlControls.hide():this.sbi_owlControls.show())},destroyControls:function(){this.sbi_owlControls&&this.sbi_owlControls.remove()},next:function(a){if(this.isTransition)return!1;this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.sbi_owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=this.sbi_owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.sbi_owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)},checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$sbi_owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$sbi_owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$sbi_owlWrapper.css(this.addCssSpeed(a))},addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$sbi_owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$sbi_owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$sbi_owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText="  -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);
vendor: 10,655 bytes, lines 72-73
72this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.sbi_owl mousedown.sbi_owl","touchmove.sbi_owl mousemove.sbi_owl","touchend.sbi_owl touchcancel.sbi_owl mouseup.sbi_owl"]:!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.sbi_owl","touchmove.sbi_owl","touchend.sbi_owl touchcancel.sbi_owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.sbi_owl","mousemove.sbi_owl","mouseup.sbi_owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.sbi_owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})},gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.sbi_owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}
73        function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$sbi_owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.sbi_owl.dragDirection="left":d.sbi_owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}),a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".sbi_owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$sbi_owlWrapper.hasClass("grabbing")||d.$sbi_owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("sbi_owl.next",function(){a.next()});a.$elem.on("sbi_owl.prev",function(){a.prev()});a.$elem.on("sbi_owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("sbi_owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("sbi_owl.goTo",function(b,e){a.goTo(e)});a.$elem.on("sbi_owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$sbi_owlItems[a]),"loaded"!==b.data("sbi_owl-loaded")&&(e=b.data("sbi_owl-item"),c=b.find(".lazysbi_owl"),"string"!==typeof c.data("src")?b.data("sbi_owl-loaded","loaded"):(void 0===b.data("sbi_owl-loaded")&&(c.hide(),b.addClass("loading").data("sbi_owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("sbi_owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this,[d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$sbi_owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$sbi_owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$sbi_owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$sbi_owlItems[a]).addClass("active");this.sbi_owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="sbi_owl-"+a+"-out";this.inClass="sbi_owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$sbi_owlItems.eq(a.currentItem),d=a.$sbi_owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$sbi_owlWrapper.addClass("sbi_owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+"px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a,b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$sbi_owlWrapper.removeClass("sbi_owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},sbi_owlStatus:function(){this.sbi_owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,sbi_owlItems:this.$sbi_owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".sbi_owl sbi_owl mousedown.disableTextSelect");f(k).off(".sbi_owl sbi_owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$sbi_owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.sbi_owlControls&&this.sbi_owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("sbi_owl-originalStyles")||"").attr("class",this.$elem.data("sbi_owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions,a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.sbi_owlCarousel=function(a){return this.each(function(){if(!0===f(this).data("sbi_owl-init"))return!1;f(this).data("sbi_owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"sbi_owlCarousel",b)})};f.fn.sbi_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:g,baseClass:"sbi_owl-carousel",theme:"sbi_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);window.sbiLinkify=(function(){var k="[a-z\\d.-]+://",h="(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])",c="(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>
73/?]+)\\.)+",n="(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)",f="(?:"+c+n+"|"+h+")",o="(?:[;/][^#?<>\\s]*)?",e="(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?",d="\\b"+k+"[^<>\\s]+",a="\\b"+f+o+e+"(?!\\w)",m="mailto:",j="(?:"+m+")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+f+e+"(?!\\w)",l=new RegExp("(?:"+d+"|"+a+"|"+j+")","ig"),g=new RegExp("^"+k,"i"),b={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},i={callback:function(q,p){return p?'<a href="'+p+'" title="'+p+'" target="_blank">'+q+"</a>":q},punct_regexp:/(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/};return function(u,z){z=z||{};var w,v,A,p,x="",t=[],s,E,C,y,q,D,B,r;for(v in i){if(z[v]===undefined){z[v]=i[v]}}while(w=l.exec(u)){A=w[0];E=l.lastIndex;C=E-A.length;if(/[\/:]/.test(u.charAt(C-1))){continue}do{y=A;r=A.substr(-1);B=b[r];if(B){q=A.match(new RegExp("\\"+B+"(?!$)","g"));D=A.match(new RegExp("\\"+r,"g"));if((q?q.length:0)<(D?D.length:0)){A=A.substr(0,A.length-1);E--}}if(z.punct_regexp){A=A.replace(z.punct_regexp,function(F){E-=F.length;return""})}}while(A.length&&A!==y);p=A;if(!g.test(p)){p=(p.indexOf("@")!==-1?(!p.indexOf(m)?"":m):!p.indexOf("irc.")?"irc://":!p.indexOf("ftp.")?"ftp://":"http://")+p}if(s!=C){t.push([u.slice(s,C)]);s=E}t.push([A,p])}t.push([u.substr(s)]);for(v=0;v<t.length;v++){x+=z.callback.apply(window,t[v])}return x||u}})();(function(){"use strict";var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){n=typeof n!=="undefined"?n:this.length;if(Object.prototype.toString.call(this)==="[object Array]"){return e.call(this,t,n)}var r,i=[],s,o=this.length;var u=t||0;u=u>=0?u:o+u;var a=n?n:o;if(n<0){a=o+n}s=a-u;if(s>0){i=new Array(s);if(this.charAt){for(r=0;r<s;r++){i[r]=this.charAt(u+r)}}else{for(r=0;r<s;r++){i[r]=this[u+r]}}}return i}}})()
74    if(!Function.prototype.bind){Function.prototype.bind=function(e){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};r.prototype=this.prototype;i.prototype=new r;return i}}(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;
74d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[];if(typeof e.event.props!=='undefined'){var f=e.event.props.concat(a)}
75        var l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.
75coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});(function(){var a=jQuery,b=function(){function a(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}
76        return a.prototype.albumLabel=function(a,b){return a+" / "+b},a}(),c=function(){function b(a){this.options=a,this.album=[],this.currentImageIndex=void 0,this.init()}
77        return b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[data-lightbox-sbi]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this,sbLbCarouselDestroy=function(){jQuery('#sbi_lightbox .sbi_lb_lightbox-image').remove();if(jQuery('#sbi_lightbox .sbi_owl-carousel').length){if(jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel'))jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel').destroy();jQuery('#sbi_lightbox .sbi_owl-item').remove()}
78            jQuery('#sbi_lightbox').find('.fa-clone').remove()};a("<div id='sbi_lightboxOverlay' class='sbi_lightboxOverlay'></div>"+"<div id='sbi_lightbox' class='sbi_lightbox'>"+"<div class='sbi_lb-outerContainer'>"+"<div class='sbi_lb-nav'><a class='sbi_lb-prev' href='#' ><p class='sbi-screenreader'>Previous Slide</p><span title='Previous slide'></span></a><a class='sbi_lb-next' href='#' ><p class='sbi-screenreader'>Next Slide</p><span title='Next slide'></span></a></div>"+"<div class='sbi_lb-container-wrapper'>"+"<div class='sbi_lb-container'><video class='sbi_video' src='' poster='' controls></video>"+"<div class='sbi_lb-image-wrap-outer'>"+"<div class='sbi_lb-image-wrap'>"+"<img class='sbi_lb-image' src='' alt='Lightbox image placeholder'/>"+"</div>"+"</div>"+"<div class='sbi_lb-loader'><span class='fa-spin'></span></div>"+"</div>"+"<div class='sbi_lb-dataContainer'>"+"<div class='sbi_lb-data'>"+"<div class='sbi_lb-details'>"+"<span class='sbi_lb-caption'></span>"+"<span class='sbi_lb-number'></span>"+"<div class='sbi_lightbox_action sbi_share'><a href='JavaScript:void(0);'><i class='fa fa-share'></i>Share</a><p class='sbi_lightbox_tooltip sbi_tooltip_social'><a href='' target='_blank' id='sbi_facebook_icon'><span class='sbi-screenreader'>Facebook</span><i class='fa fa-facebook-square'></i></a><a href='' target='_blank' id='sbi_twitter_icon'><span class='sbi-screenreader'>Twitter</span><i class='fa fa-twitter'></i></a><a href='' target='_blank' id='sbi_google_icon'><span class='sbi-screenreader'>Google Plus</span><i class='fa fa-google-plus'></i></a><a href='' target='_blank' id='sbi_linkedin_icon'><span class='sbi-screenreader'>Linkedin</span><i class='fa fa-linkedin'></i></a><a href='' id='sbi_pinterest_icon' target='_blank'><span class='sbi-screenreader'>Linkedin</span><i class='fa fa-pinterest'></i></a><a href='' id='sbi_email_icon' target='_blank'><span class='sbi-screenreader'>Email</span><i class='fa fa-envelope'></i></a><i class='fa fa-play fa-rotate-90'></i></p></div><div class='sbi_lightbox_action sbi_instagram'><a href='https://instagram.com/' target='_blank'><i class='fa fa-instagram'></i>Instagram</a></div>"+"<div id='sbi_mod_link' class='sbi_lightbox_action'><a href='JavaScript:void(0);'><i class='fa fa-times'></i>Hide photo (admin)</a><p id='sbi_mod_box' class='sbi_lightbox_tooltip'>Add this ID to the plugin's <strong>Hide Photos</strong> setting: <span id='sbi_photo_id'></span><i class='fa fa-play fa-rotate-90'></i></p></div></div><div class='sbi_lb-closeContainer'><a class='sbi_lb-close'><i class='fa fa-times'></i></a></div></div></div></div>").appendTo(a("body")),this.$lightbox=a("#sbi_lightbox"),this.$overlay=a("#sbi_lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".sbi_lb
78-outerContainer"),this.$container=this.$lightbox.find(".sbi_lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),jQuery(document).on('click',function(event,b,c){if(!jQuery(event.target).closest('.sbi_lb-outerContainer').length){if(!jQuery(event.target).closest('.sbi_lb-dataContainer').length){jQuery('#sbi_lightboxOverlay, #sbi_lightbox').fadeOut();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();sbLbCarouselDestroy()}}}),this.$lightbox.show(),jQuery('#sbi_lightboxOverlay').on("click",function(c){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return"sbi_lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".sbi_lb-prev").on("click",function(){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return b.changeImage(0===b.currentImageIndex?b.album.length-1:b.currentImageIndex-1),!1}),this.$lightbox.find(".sbi_lb-container").on("swiperight",function(){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return b.changeImage(0===b.currentImageIndex?b.album.length-1:b.currentImageIndex-1),!1}),this.$lightbox.find(".sbi_lb-next").on("click",function(){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return b.changeImage(b.currentImageIndex===b.album.length-1?0:b.currentImageIndex+1),!1}),this.$lightbox.find(".sbi_lb-container").on("swipeleft",function(){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return b.changeImage(b.currentImageIndex===b.album.length-1?0:b.currentImageIndex+1),!1}),this.$lightbox.find(".sbi_lb-loader, .sbi_lb-close").on("click",function(){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();return b.end(),!1})},b.prototype.start=function(b){function c(a){var sbiFeedOptions=a.closest('.sbi').attr('data-options');sbiFeedOptions=jQuery.parseJSON(sbiFeedOptions);var carouselData=-1;if(a.attr("data-carousel").length>
vendor: 1,196 bytes, lines 78-81
781)carouselData=jQuery.parseJSON(a.attr("data-carousel"));if(!carouselData){carouselData={}}
79            d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title"),video:a.attr("data-video"),id:a.attr("data-id"),url:a.attr("data-url"),user:a.attr("data-user"),avatar:a.attr("data-avatar"),lightboxcomments:sbiFeedOptions.lightboxcomments,numcomments:sbiFeedOptions.numcomments,carousel:carouselData})}
80            var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox-sbi");if(h){f=a(b.prop("tagName")+'[data-lightbox-sbi="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}
81            var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".sbi_lb-image");
81this.$overlay.fadeIn(this.options.fadeDuration),a(".sbi_lb-loader").fadeIn("slow"),this.$lightbox.find(".sbi_lb-image, .sbi_lb-nav, .sbi_lb-prev, .sbi_lb-next, .sbi_lb-dataContainer, .sbi_lb-numbers, .sbi_lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var sbi_lb_comments_width=0,sbiNavArrowsWidth=0;if((jQuery('.sbi').attr('data-sbi-lb-comments')==='true')&&window.innerWidth>640){sbi_lb_comments_width=300}
82            if(window.innerWidth<(740+sbi_lb_comments_width)&&window.innerWidth>640){sbiNavArrowsWidth=100}
83            var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20-sbi_lb_comments_width-sbiNavArrowsWidth,i=k-c.containerTopPadding-c.containerBottomPadding-150,(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(window).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".sbi_lb-dataContainer").width(g),d.$lightbox.find(".sbi_lb-prevLink").height(h),d.$lightbox.find(".sbi_lb-nextLink").height(h),d.showImage()}
84            var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".sbi_lb-loader").hide(),this.$lightbox.find(".sbi_lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}
85            this.$lightbox.find(".sbi_lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".sbi_lb-prev, .sbi_lb-next").css("opacity","1"),this.$lightbox.find(".sbi_lb-prev, .sbi_lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".sbi_lb-prev").show(),a&&this.$lightbox.find(".sbi_lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".sbi_lb-next").show(),a&&this.$lightbox.find(".sbi_lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if(sbi_supports_video()){jQuery('#sbi_lightbox').removeClass('sbi_video_lightbox');if(this.album[this.currentImageIndex].video.length){jQuery('#sbi_lightbox').addClass('sbi_video_lightbox');jQuery('.sbi_video').attr({'src':this.album[this.currentImageIndex].video,'poster':this.album[this.currentImageIndex].link,'autoplay':'true'})}}
86            jQuery('#sbi_lightbox .sbi_instagram a').attr('href',this.album[this.currentImageIndex].url);jQuery('#sbi_lightbox .sbi_lightbox_tooltip').hide();jQuery('#sbi_lightbox #sbi_mod_box').find('#sbi_photo_id').text(this.album[this.currentImageIndex].id);jQuery('#sbi_lightbox #sbi_facebook_icon').attr('href','https://www.facebook.com/sharer/sharer.php?u='+this.album[this.currentImageIndex].url+'&t=Text');jQuery('#sbi_lightbox #sbi_twitter_icon').attr('href','https://twitter.com/home?status='+this.album[this.currentImageIndex].url+' '+this.album[this.currentImageIndex].title);jQuery('#sbi_lightbox #sbi_google_icon').attr('href','https://plus.google.com/share?url='+this.album[this.currentImageIndex].url);jQuery('#sbi_lightbox #sbi_linkedin_icon').attr('href','https://www.linkedin.com/shareArticle?mini=true&url='+this.album[this.currentImageIndex].url+'&title='+this.album[this.currentImageIndex].title);jQuery('#sbi_lightbox #sbi_pinterest_icon').attr('href','https://pinterest.com/pin/create/button/?url='+this.album[this.currentImageIndex].url+'&media='+this.album[this.currentImageIndex].link+'&description='+this.album[this.currentImageIndex].title);jQuery('#sbi_lightbox #sbi_email_icon').attr('href','mailto:?subject=Instagram&body='+this.album[this.currentImageIndex].title+' '+this.album[this.currentImageIndex].url);
86if(this.album[this.currentImageIndex].carousel!==''&&typeof this.album[this.currentImageIndex].carousel[0]!=='undefined'){var wrapEl=jQuery('.sbi_lb-image-wrap'),styles=jQuery('.sbi_lb-image').attr('style')+'opacity: 1 !important';jQuery.each(this.album[this.currentImageIndex].carousel,function(index,value){if(index>0){if(value.type==='image'){wrapEl.append('<img class="sbi_lb-image sbi_lb_lightbox-image" src="'+value.media+'" style="'+styles+'" alt="Lightbox Image"/>')}else if(sbi_supports_video()&&value.type==='video'){wrapEl.append('<video class="sbi_video sbi_lb_lightbox-image sbi_lb_lightbox-carousel-video" src="'+value.media+'" style="'+styles+'" poster="https://scontent.cdninstagram.com/t51.2885-15/e15/p640x640/20181114_812255828938867_6688886963329564672_n.jpg" controls="" autoplay="autoplay"></video>')}}});jQuery('.sbi_lb-image-wrap-outer').prepend('<i class="fa fa-clone" aria-hidden="true"></i>');wrapEl.sbi_owlCarousel({items:1,navigation:!0,navigationText:['<i class="fa fa-chevron-left"></i>','<i class="fa fa-chevron-right"></i>'],pagination:!0,autoPlay:!1,stopOnHover:!0,itemsDesktop:1,itemsDesktopSmall:1,itemsTablet:1,itemsTabletSmall:1,itemsMobile:1,afterAction:function(el){var $owlCarousel=jQuery(el).closest('.sbi_owl-carousel'),$listItem=$owlCarousel.find('.sbi_owl-page.active'),currentActiveIndex=$owlCarousel.find('.sbi_owl-page').index($listItem),$maybeVideo=$owlCarousel.find('.sbi_owl-item:eq('+currentActiveIndex+')').find('video');if($owlCarousel.find('video').length)$owlCarousel.find('video').get(0).pause();if($maybeVideo.length){$maybeVideo.get(0).play()}}});var $navElementsWrapper=wrapEl.find('.sbi_owl-buttons');if(window.width>640){$navElementsWrapper.addClass('onhover').hide();wrapEl.on({mouseenter:function(){$navElementsWrapper.fadeIn()},mouseleave:function(){$navElementsWrapper.fadeOut()}})}}
87            jQuery('.sbi_lb-commentBox').remove();if((this.album[this.currentImageIndex].lightboxcomments==='true'||this.album[this.currentImageIndex].lightboxcomments===!0)&&this.album[this.currentImageIndex].numcomments>0){var sbiComments={postID:'',maxNumComments:this.album[this.currentImageIndex].numcomments,disableCache:(this.album[this.currentImageIndex].disablecache||this.album[this.currentImageIndex].disablecache==='true'),numCommentsOnPage:parseInt(jQuery('#'+this.album[this.currentImageIndex].id).find('.sbi_comments').text().replace(',','')),commentObj:[],getRemoteComments:function(missing){var cleanId=this.postID.replace('sbi_',''),at=sb_instagram_js_options.sb_instagram_at,url='https://api.instagram.com/v1/media/'+cleanId+'/comments?access_token='+at;jQuery.ajax({method:"GET",url:url,dataType:"jsonp",success:function(data){sbiComments.commentObj=data.data;var toBeCached=[];jQuery.each(sbiComments.commentObj,function(){var comment={created_time:this.created_time,id:this.id,text:this.text,user_name:this.from.username};toBeCached.push(comment)});if(typeof sb_instagram_js_options.sbiPageCommentCache==='undefined'){sb_instagram_js_options.sbiPageCommentCache=[]}
88                        sb_instagram_js_options.sbiPageCommentCache[cleanId]=[toBeCached,new Date().getTime()/1000+100*60,sbiComments.numCommentsOnPage];if(missing!=='all'){sbiComments.replaceWithNewComments(sb_instagram_js_options.sbiPageCommentCache[cleanId][0])}else{sbiComments.appendExistingComments()}
89                        if(!sbiComments.disableCache&&window.sbiStandalone.noDB!==!0){sbiComments.cacheComments(toBeCached,sbiComments.numCommentsOnPage)}}})},getCommentHtml:function(comment){var comHtml='';comHtml+='<p class="sbi_lb-comment" id="sbi_com_'+comment.id+'" data-sbi-created="'+comment.created_time+'">';comHtml+='<a class="sbi_lb-commenter" href="https://www.instagram.com/'+comment.user_name+'/" target="_blank">'+comment.user_name+'</a>';comHtml+='<span class="sbi_lb-comment-text">'+comment.text.replace(/(\\')/g,"'").replace(/(\\")/g,'"')+'</span>';comHtml+='</p>';return comHtml},appendExistingComments:function(){var cleanId=this.postID.replace('sbi_',''),comments=sb_instagram_js_options.sbiPageCommentCache[cleanId][0],fifteenMinutesFromLastCache=sb_instagram_js_options.sbiPageCommentCache[cleanId][1],nowInSeconds=new Date().getTime()/1000,maxNumComments=parseInt(this.maxNumComments),commentsNeeded=sbiComments.numCommentsOnPage-parseInt(sb_instagram_js_options.sbiPageCommentCache[cleanId][2]);var loadingHTML='';if(fifteenMinutesFromLastCache>nowInSeconds){commentsNeeded=0}else{if(commentsNeeded>0){loadingHTML='<p class="sbi_loading_comments"><span class="fa fa-spinner fa-pulse"></span></p>';sbiComments.getRemoteComments()}}
90                    var comsHtml='';if(typeof comments[0]!=='undefined'){comsHtml+='<div class="sbi_lb-commentBox">';var lastIndex=-1;if((comments.length+commentsNeeded)<maxNumComments){lastIndex=0-comments.length}else if((maxNumComments-commentsNeeded)>0){lastIndex=0-(maxNumComments-commentsNeeded)}
91                        if(commentsNeeded<maxNumComments){comments=comments.slice(lastIndex);jQuery.each(comments,function(){comsHtml+=sbiComments.getCommentHtml(this)})}
92                        comsHtml+=loadingHTML;comsHtml+='</div>';
92jQuery('.sbi_lb-dataContainer').append(comsHtml)}},replaceWithNewComments:function(comments){var comsHtml='',lastIndex=Math.max((0-parseInt(this.maxNumComments)),(0-comments.length)),newComments=comments.slice(lastIndex);jQuery.each(newComments,function(){comsHtml+=sbiComments.getCommentHtml(this)});jQuery('.sbi_lb-commentBox').html(comsHtml)},cacheComments:function(comments,totalComments){var submittedData={'action':'sbi_update_comment_cache','post_id':this.postID,'comments':comments,'total_comments':totalComments};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}})}};function sbiCommentsInit(id){sbiComments.postID=id;if(sb_instagram_js_options.sbiPageCommentCache&&sb_instagram_js_options.sbiPageCommentCache.hasOwnProperty(sbiComments.postID.replace('sbi_',''))){sbiComments.appendExistingComments()}else{sbiComments.getRemoteComments('all')}}
93                if(typeof this.album[this.currentImageIndex].id!=='undefined'){sbiCommentsInit(this.album[this.currentImageIndex].id)}else{setTimeout(function(){if(typeof this.album[this.currentImageIndex].id!=='undefined'){sbiCommentsInit(this.album[this.currentImageIndex].id)}},500)}}
94            var sbiLightboxCaption=this.album[this.currentImageIndex].title,hashRegex=/(^|\s)#(\w[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
94D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC+0-9_]+\w)/gi,tagRegex=/[@]+[A-Za-z0-9-_]+/g;if(typeof sbiLightboxCaption!=='undefined'&&sbiLightboxCaption!==''){sbiLightboxCaption=sbiLightboxCaption.replace(/(>#)/g,'> #')}(sbiLightboxCaption)?sbiLightboxCaption=sbiLinkify(sbiLightboxCaption):sbiLightboxCaption='';function sbiReplaceHashtags(hash){var replacementString=jQuery.trim(hash);if(/^#[0-9A-F]{6}$/i.test(replacementString)){return replacementString}else{return' <a href="https://instagram.com/explore/tags/'+replacementString.substring(1)+'" target="_blank" rel="nofollow">'+replacementString+'</a>'}}
95            sbiLightboxCaption=sbiLightboxCaption.replace(hashRegex,sbiReplaceHashtags);function sbiReplaceTags(tag){var replacementString=jQuery.trim(tag);return' <a href="https://instagram.com/'+replacementString.substring(1)+'" target="_blank" rel="nofollow">'+replacementString+'</a>'}
96            sbiLightboxCaption=sbiLightboxCaption.replace(tagRegex,sbiReplaceTags);"undefined"!=typeof sbiLightboxCaption&&""!==sbiLightboxCaption&&this.$lightbox.find(".sbi_lb-caption").html('<a class="sbi_lightbox_username" href="https://instagram.com/'+this.album[this.currentImageIndex].user+'" target="_blank"><img src="'+this.album[this.currentImageIndex].avatar+'" /><p>@'+this.album[this.currentImageIndex].user+'</p></a> '+sbiLightboxCaption).fadeIn("fast"),this.album.length>1&&this.options.showImageNumberLabel?this.$lightbox.find(".sbi_lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".sbi_lb-number").hide(),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".sbi_lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}
97            if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var sbLbCarouselDestroy=function(){jQuery('#sbi_lightbox .sbi_lb_lightbox-image').remove();if(jQuery('#sbi_lightbox .sbi_owl-carousel').length){if(jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel'))jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel').destroy();jQuery('#sbi_lightbox .sbi_owl-item').remove()}
98            jQuery('#sbi_lightbox').find('.fa-clone').remove()};var KEYCODE_ESC=27;var KEYCODE_LEFTARROW=37;var KEYCODE_RIGHTARROW=39;var keycode=event.keyCode;var key=String.fromCharCode(keycode).toLowerCase();if(keycode===KEYCODE_ESC||key.match(/x|o|c/)){sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();jQuery('#sbi_lightbox iframe').attr('src','');this.end()}else if(key==='p'||keycode===KEYCODE_LEFTARROW){if(this.currentImageIndex!==0){this.changeImage(this.currentImageIndex-1)}else if(this.options.wrapAround&&this.album.length>1){this.changeImage(this.album.length-1)}
99            sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();jQuery('#sbi_lightbox iframe').attr('src','')}else if(key==='n'||keycode===KEYCODE_RIGHTARROW){if(this.currentImageIndex!==this.album.length-1){this.changeImage(this.currentImageIndex+1)}else if(this.options.wrapAround&&this.album.length>1){this.changeImage(0)}
100            sbLbCarouselDestroy();if(sbi_supports_video())jQuery('#sbi_lightbox video.sbi_video')[0].pause();jQuery('#sbi_lightbox iframe').attr('src','')}},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"})},b}();a(function(){{var a=new b;new c(a)}})}).call(this);function sbi_supports_video(){return!!document.createElement('video').canPlayType}
101    var modMode={status:!1,usingDB:!0,$self:jQuery('.sbi_moderation_mode'),originalParent:jQuery('.sbi_moderation_mode').parent(),hideOrShow:'hide',dbHidePhotos:sb_instagram_js_options.sb_instagram_hide_photos.replace(/ /g,'').split(','),dbBlockUsers:sb_instagram_js_options.sb_instagram_block_users.replace(/ /g,'').split(','),dbWhiteList:[],whiteListIndex:'',selectedHide:[],selectedShow:[],selectedUsers:[],setStatus:function(status){this.status=status},setUsingDB:function(usingDB){this.usingDB=usingDB},setSelf:function($self){if($self.hasClass('sbi')){this.$self=$self}else{this.$self=$self.closest('.sbi')}},setOriginalPosition:function(){this.originalParent=this.$self.parent()},updateHideOrShow:function(hideOrShow){this.hideOrShow=hideOrShow},mergeDBAndSelected:function(){if(!this.$self.hasClass('sbi_mod_merged')){for(var i=0;i<modMode.dbHidePhotos.length;i++){if(modMode.dbHidePhotos[i]==''){modMode.dbHidePhotos.splice(i,1)}}
102            for(var i=0;i<modMode.dbHidePhotos.length;i++){if(modMode.selectedHide.indexOf(modMode.dbHidePhotos[i].replace('sbi_',''))==-1){modMode.selectedHide.pu
102sh(modMode.dbHidePhotos[i].replace('sbi_',''))}}
103            for(var i=0;i<modMode.dbWhiteList.length;i++){if(modMode.dbWhiteList[i]==''){modMode.dbWhiteList.splice(i,1)}}
104            for(var i=0;i<modMode.dbWhiteList.length;i++){if(modMode.selectedShow.indexOf(modMode.dbWhiteList[i].replace('sbi_',''))==-1){modMode.selectedShow.push(modMode.dbWhiteList[i].replace('sbi_',''))}}
105            for(var i=0;i<modMode.dbBlockUsers.length;i++){if(modMode.dbBlockUsers[i]==''){modMode.dbBlockUsers.splice(i,1)}}
106            for(var i=0;i<modMode.dbBlockUsers.length;i++){if(modMode.selectedUsers.indexOf(modMode.dbBlockUsers[i])==-1){modMode.selectedUsers.push(modMode.dbBlockUsers[i])}}}},setWhiteListData:function(listNum,ids){this.whiteListIndex=listNum;this.dbWhiteList=ids.replace(/ /g,'').split(',')},updateBlockUser:function(checkbox){var user=checkbox.val();if(checkbox.is(':checked')){if(modMode.selectedUsers.indexOf(user)<0){modMode.selectedUsers.push(user)}}else{modMode.selectedUsers.splice(modMode.selectedUsers.indexOf(user),1)}},addModSettingsHtml:function(){if(!this.$self.find('.sbi_mod_mode_wrapper').length){var sbi_submit_mod_settings_btn='<a href="javascript:void(0);" class="sbi_mod_submit_mod"><i class="fa fa-check-circle"></i> Save Settings</a>';modMode.$self.append('<div class="sbi_mod_mode_wrapper sbi_mod_mode_wrapper_bottom">'+sbi_submit_mod_settings_btn+'</div>').find('.sb_instagram_header').before('<div class="sbi_mod_mode_wrapper">'+'<a href="javascript:void(0);" class="sbi_close_mod" style="display: block;"><i class="fa fa-close"></i> Exit moderation mode</a>'+'<p class="sbi_mod_type_header">Moderation Type</p>'+'<div class="sbi_mod_row"><input id="sbi_hide_show" name="sbi_hide_show" type="radio" value="hide" class="sbi_hide_show_radio" checked> <label for="sbi_hide_show">Hide selected posts</label></div>'+'<div class="sbi_mod_row"><input id="sbi_hs_show" name="sbi_hide_show" type="radio" value="show" class="sbi_hide_show_radio"> <label for="sbi_hs_show">Only show selected posts (create a "White List")</label></div>'+sbi_submit_mod_settings_btn+'</div>');if(this.whiteListIndex!==''){modMode.$self.find('#sbi_hs_show').prop("checked",!0);modMode.hideOrShow='show'}}
107            if(window.sbiStandalone.forceModMode){jQuery('.sbi_close_mod').hide()}
108            jQuery('body').append('<p class="sbi_mod_saved"><i class="fa fa-check"></i> Saved</p>')},addModHtml:function(user){var html='<div class="sbi_mod">'+'<span class="sbi_mod_user">'+user+'</span>'+'<div class="sbi_mod_block"><label for="sbi_mod_block_user'+user+'"><input type="checkbox" class="sbi_mod_block_user" id="sbi_mod_block_user'+user+'" value="'+user+'"/> Block user <i class="fa fa-ban"></i></label></div>'+'</div>';return html},closeMod:function(){var url=window.location.href;if(url.indexOf('sbi_moderation_mode=true')>-1){url=url.replace('?sbi_moderation_mode=true','');url=url.replace('&sbi_moderation_mode=true','')}
109            if(url.indexOf('sbi_moderation_index=')>-1){url=url.split('&sbi_moderation_index=')[0]}
110            window.location.href=url},resizeFeed:function(){modMode.$self.closest('body').css('position','relative').prepend(modMode.$self)},replaceInfoHtml:function(){var mod=modMode.$self.find('.sbi_mod');mod.each(function(){jQuery(this).closest('.sbi_item').find('.sbi_info').html(jQuery(this));jQuery(this).children().css('font-size','14px')})},styleImage:function(image,hideOrShow){if(hideOrShow=='hide'){image.append('<span class="sbi_mod_post_status sbi_mod_exclude"><i class="fa fa-close"></i></span>').css('outline','3px solid #e5593d')}else{image.append('<span class="sbi_mod_post_status sbi_mod_include"><i class="fa fa-check"></i></span>').css('outline','3px solid #4e9c2b')}},changeClickEvent:function(item,e){e.preventDefault();var id=item.closest('.sbi_item').attr('id').replace('sbi_',''),user=item.closest('.sbi_item').find('.sbi_mod_user').text();if(modMode.hideOrShow==='hide'){if(modMode.selectedUsers.indexOf(user)===-1){if(modMode.selectedHide.indexOf(id)>-1){modMode.selectedHide.splice(modMode.selectedHide.indexOf(id),1)}
110else{modMode.selectedHide.push(id)}}}else{if(modMode.selectedShow.indexOf(id)>-1){modMode.selectedShow.splice(modMode.selectedShow.indexOf(id),1)}else{modMode.selectedShow.push(id)}}
111            modMode.updateDisplay(modMode.$self)},updateDisplay:function(){modMode.$self.find('.sbi_photo').css('outline','').find('.sbi_mod_post_status').remove();var blockedUsers=modMode.selectedUsers;modMode.$self.find('.sbi_item').each(function(){var user=jQuery(this).find('.sbi_mod_user').text(),image=jQuery(this).find('.sbi_photo');if(blockedUsers.indexOf(user)>-1){modMode.styleImage(image,'hide');image.closest('.sbi_item').find('.sbi_mod_block_user').prop('checked',!0)}else{image.closest('.sbi_item').find('.sbi_mod_block_user').prop('checked',!1);var id=jQuery(this).attr('id').replace('sbi_',''),idPlusSbi='sbi_'+id;if(modMode.hideOrShow==='hide'){if(modMode.selectedHide.indexOf(id)>-1||modMode.selectedHide.indexOf(idPlusSbi)>-1){modMode.styleImage(image,'hide')}}else{if(modMode.selectedShow.indexOf(id)>-1||modMode.selectedShow.indexOf(idPlusSbi)>-1){modMode.styleImage(image,'show')}}}})},ajaxSubmit:function(){modMode.$self.find('.sbi_mod_submit_mod').next('span').remove();modMode.$self.fadeTo("fast",0.3).find('.sbi_mod_submit_mod').attr('disabled','true');if(modMode.hideOrShow==='hide'){modMode.$self.find('.sbi_mod_new_white_list').hide();var submittedData={ids:modMode.selectedHide,blocked_users:modMode.selectedUsers,action:'sbi_update_mod_mode_settings'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){setTimeout(function(){modMode.$self.fadeTo(500,1);modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled')},500);jQuery('.sbi_mod_saved').fadeIn();setTimeout(function(){jQuery('.sbi_mod_saved').fadeOut()},3000)}})}else{var submittedData={ids:modMode.selectedShow,db_index:modMode.whiteListIndex,blocked_users:modMode.selectedUsers,action:'sbi_update_mod_mode_white_list'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){if(data.length){modMode.$self.find('.sbi_mod_new_white_list').remove();modMode.$self.find('.sbi_mod_submit_mod').after('<div class="sbi_mod_new_white_list" style="display: block;">'+'<p><span><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Important.</span> Please use this shortcode to apply your white list:</p>'+'<code>[instagram-feed <span style="font-weight: bold;">whitelist="'+data+'"</span>]</code>'+'</div>');modMode.whiteListIndex=data}
112                setTimeout(function(){modMode.$self.find('.sbi_mod_new_white_list').show();modMode.$self.css('opacity',1);modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled')},500);jQuery('.sbi_mod_saved').fadeIn();setTimeout(function(){jQuery('.sbi_mod_saved').fadeOut()},3000)}})}},showOnPageSubmit:function(){modMode.$self.find('.sbi_mod_submit_mod').next('span').remove();modMode.$self.find('.sbi_mod_submit_mod').attr('disabled','true');if(modMode.hideOrShow==='hide'){modMode.$self.find('.sbi_mod_new_white_list').hide();var submittedData={ids:modMode.selectedHide,blocked_users:modMode.selectedUsers,action:'sbi_update_mod_mode_settings'};if(submittedData.ids.length||submittedData.blocked_users.length){var idsString=submittedData.ids.join(', '),blockedUsersString=submittedData.blocked_users.join(', ');modMode.$self.find('.sbi_mod_new_white_list').remove();modMode.$self.find('.sbi_mod_submit_mod').after('<div class="sbi_mod_new_white_list" style="display: block;">'+'<p><span><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Important.</span> Please use this in your <strong>hidephotos</strong> setting</p>'+'<code><strong>'+idsString+'</strong></code>'+'</div>'+'<div class="sbi_mod_new_white_list" style="display: block;">'+'<p><span><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Important.</span> Please use this in your <strong>blockusers</strong> setting</p>'+'<code><strong>'+blockedUsersString+'</strong></code>'+'</div>')}
113            modMode.$self.find('.sbi_mod_new_white_list').show();modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled')}
113else{var submittedData={ids:modMode.selectedShow,db_index:modMode.whiteListIndex,blocked_users:modMode.selectedUsers,action:'sbi_update_mod_mode_white_list'};if(submittedData.ids.length||submittedData.blocked_users.length){var idsString=submittedData.ids.join(', '),blockedUsersString=submittedData.blocked_users.join(', ');modMode.$self.find('.sbi_mod_new_white_list').remove();modMode.$self.find('.sbi_mod_submit_mod').after('<div class="sbi_mod_new_white_list" style="display: block;">'+'<p><span><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Important.</span> Please use this in your <strong>whitelistids</strong> setting</p>'+'<code><strong>'+idsString+'</strong></code>'+'</div>'+'<div class="sbi_mod_new_white_list" style="display: block;">'+'<p><span><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Important.</span> Please use this in your <strong>blockusers</strong> setting</p>'+'<code><strong>'+blockedUsersString+'</strong></code>'+'</div>')}
114            modMode.$self.find('.sbi_mod_new_white_list').show();modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled')}},submitSelected:function(){if(modMode.usingDB){console.log('ajax');modMode.ajaxSubmit()}else{modMode.showOnPageSubmit()}}};function sbi_init(_cache){var sbiTouchDevice=!1;if(sbiIsTouchDevice()===!0)sbiTouchDevice=!0;function sbiIsTouchDevice(){return!0==("ontouchstart" in window||window.DocumentTouch&&document instanceof DocumentTouch)}
115        function sbiSetUserApiUrl(user_id,at,before,extra,handleData){var url='https://api.instagram.com/v1/users/search?q='+user_id+'&access_token='+at;jQuery.ajax({method:"GET",url:url,dataType:"jsonp",success:function(data){var matchingID=data.data[0].id;jQuery.each(data.data,function(){if(this.username===user_id){matchingID=this.id}});var apiCall="https://api.instagram.com/v1/users/"+matchingID+before+"?access_token="+at+extra;handleData(apiCall,matchingID)}})}
116        var $i=0,sbi_time=0,numIncludewords=0;sbiCreatePage(function(){jQuery('#sbi_lightbox').hide();jQuery('#sb_instagram.sbi').each(function(){var feedOptions=JSON.parse(this.getAttribute('data-options'));if(feedOptions.includewords.length>0){numIncludewords++}
117            if(feedOptions.lightboxcomments=='true'&&window.sbiCommentCacheStatus!==1&&feedOptions.numcomments>0){window.sbiCommentCacheStatus=1}})});function sbiCreatePage(_callback){_callback();window.sbiCacheStatuses={};jQuery('#sb_instagram.sbi').each(function(){var var_this=this,feedOptions=JSON.parse(var_this.getAttribute('data-options'));$i++;jQuery(this).attr('data-sbi-index',$i);feedOptions.feedIndex=$i;window.sbiCacheStatuses[$i]={'header':(feedOptions.sbiHeaderCache=='true'),'feed':(feedOptions.sbiCacheExists=='true')};setTimeout(function(){sbiCreateFeed(var_this,feedOptions)},sbi_time);if(numIncludewords>0){sbi_time+=2000}
118            function sbiCreateFeed(var_this,feedOptions){var imagesArrCount=0;var $self=jQuery(var_this),imgRes='standard_resolution',cols=parseInt(var_this.getAttribute('data-cols')),showcaption='',showlikes='',getType=feedOptions.type,sortby='none',hovercolorstyles='',num=var_this.getAttribute('data-num'),user_id=var_this.getAttribute('data-id'),$header='',disablelightbox=feedOptions.disablelightbox,captionlinks=feedOptions.captionlinks,morePosts=[],hidePhotos=sb_instagram_js_options.sb_instagram_hide_photos.replace(/ /g,'').split(","),blockUsers=sb_instagram_js_options.sb_instagram_block_users.replace(/ /g,'').split(","),showUsers=feedOptions.showusers.replace(/ /g,'').split(","),includeWords=feedOptions.includewords.replace(/ /g,'').split(","),excludeWords=feedOptions.excludewords.replace(/ /g,'').split(","),whiteList=feedOptions.sbiWhiteList.replace(/ /g,''),whiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(","),sbiHeaderCache=feedOptions.sbiHeaderCache,media=feedOptions.media;if(typeof hidePhotos==='undefined'||(whiteList.length>0&&whiteList!=''&&!modMode.status==!0))hidePhotos=[];if(typeof blockUsers==='undefined'||(whiteList.length>0&&whiteList!=''&&!modMode.status==!0))blockUsers=[];if(typeof showUsers==='undefined')showUsers=[];for(var i=0;i<hidePhotos.length;i++){hidePhotos[i]=hidePhotos[i].replace(/sbi_/g,'')}
119                feedOptions.disablecache=(feedOptions.disablecache=='true'||jQuery('.sbi_moderation_mode').length>0);if(feedOptions.lightboxcomments=='true'){if(!jQuery('.sbi_lightbox').hasClass('sbi_lb-comments-enabled')){jQuery('.sbi_lightbox').addClass('sbi_lb-comments-enabled')}}
120                if(feedOptions.showcaption=='false'||feedOptions.showcaption=='')showcaption='style="display: none;"';if(feedOptions.showlikes=='false'||feedOptions.showlikes=='')showlikes='display: none;';if(feedOptions.sortby!=='')sortby=feedOptions.sortby;if(feedOptions.hovercolor!=='0,0,0')hovercolorstyles='style="background: rgba('+feedOptions.hovercolor+',0.85)"';switch(var_this.getAttribute('data-res')){case 'auto':var feedWidth=$self.innerWidth(),colWidth=$self.innerWidth()/cols;var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640){if(feedWidth<640&&$self.is('.sbi_col_1'))colWidth=480;if(feedWidth<640&&$self.is('.sbi_col_3, .sbi_col_4, .sbi_col_5, .sbi_col_6'))colWidth=300;if(feedWidth<640&&$self.is('.sbi_col_7, .sbi_col_8, .sbi_col_9, .sbi_col_10'))colWidth=100;if((feedWidth>320&&feedWidth<480)&&sbiWindowWidth<480)colWidth=480;if(feedWidth<320&&sbiWindowWidth<480)colWidth=300}
121                    if(colWidth<150){imgRes='thumbnail'}else if(colWidth<320){imgRes='low_resolution'}else{imgRes='standard_resolution'}
122                    if(feedWidth<=100)imgRes='low_resolution';break;case 'thumb':imgRes='thumbnail';break;case 'medium':imgRes='low_resolution';break;default:imgRes='standard_resolution'}
123                var looparray=[''];if(getType=='hashtag'){var hashtags_arr=feedOptions.hashtag.replace(/ /g,'').split(",");looparray=hashtags_arr}else if(getType=='user'){feedOptions.feedsArray=feedOptions.accesstoken.replace(/ /g,'').split(',');feedOptions.feedsArrayFinal=[];feedOptions.idsArrayFinal=[];jQuery.each(feedOptions.feedsArray,function(index,value){var splits=value.split('.'),more=addLinks.handles(splits[0]),trimmed=more.substring(3,more.length);feedOptions.feedsArrayFinal.push(trimmed);var moreSplits=trimmed.split('.');feedOptions.idsArrayFinal.push(moreSplits[0])});var ids_arr=feedOptions.idsArrayFinal;looparray=ids_arr}else if(getType=='location'){var locations_arr=feedOptions.location.replace(/ /g,'').split(",");looparray=locations_arr}else if(getType=='coordinates'){var coords_arr=feedOptions.coordinates.replace(/ /g,'').split("),(");looparray=coords_arr}else if(getType=='single'){var single_arr=feedOptions.single.replace(/sbi_/g,'');single_arr=single_arr.replace(/ /g,'').split(",");looparray=single_arr}
124                var apiURLs=[],apiCall='';jQuery.each(looparray,function(index,entry){if(getType=='user'){apiCall="https://api.instagram.com/v1/users/"+feedOptions.idsArrayFinal[index]+"/media/recent?access_token="+feedOptions.feedsArrayFinal[index]+"&count=33"}else if(getType=='coordinates'){entry=entry.replace(/[()]/g,'');var entryArr=entry.split(","),lat=entryArr[0],lng=entryArr[1],dis='1000';if(typeof entryArr[2]!=='undefined'){dis=entryArr[2]}
125                    apiCall="https://api.instagram.com/v1/media/search?lat="+lat+"&lng="+lng+"&distance="+dis+"&access_token="+sb_instagram_js_options.sb_instagram_at+"&count=33&max_timestamp="}else if(getType=='location'){apiCall="https://api.instagram.com/v1/locations/"+entry+"/media/recent?access_token="+sb_instagram_js_options.sb_instagram_at+"&count=33"}else if(getType=='liked'){apiCall="https://api.instagram.com/v1/users/self/media/liked?access_token="+sb_instagram_js_options.sb_instagram_at+"&count=33"}else if(getType=='single'){apiCall="https://api.instagram.com/v1/media/"+entry+"?access_token="+sb_instagram_js_options.sb_instagram_at}else{apiCall="https://api.instagram.com/v1/tags/"+entry+"/media/recent?access_token="+sb_instagram_js_options.sb_instagram_at+"&count=33"}
126                    apiURLs.push(apiCall)});
126var sbiSettings={num:num,getType:getType,user_id:user_id,cols:cols,imgRes:imgRes,sortby:sortby,showcaption:showcaption,showlikes:showlikes,disablelightbox:disablelightbox,captionlinks:captionlinks,feedOptions:feedOptions,hidePhotos:hidePhotos,blockUsers:blockUsers,showUsers:showUsers,excludeWords:excludeWords,includeWords:includeWords,whiteList:whiteList,whiteListIds:whiteListIds,looparray:looparray};var sbi_cache_string_include='';var sbi_cache_string_exclude='';var sbiTransientNames={'header':'','feed':''};if(includeWords.length>0){jQuery.each(includeWords,function(index,word){var sbi_include_word=word.replace(/ /g,"").replace(/#/g,"");sbi_cache_string_include+=sbi_include_word.substring(0,3)})}
127                if(excludeWords.length>0){jQuery.each(excludeWords,function(index,word){var sbi_exclude_word=word.replace(/ /g,"").replace(/#/g,"");sbi_cache_string_exclude+=sbi_exclude_word.substring(0,3)})}
128                var sbi_cache_string_include_length=sbi_cache_string_include.length;var sbi_cache_string_exclude_length=sbi_cache_string_exclude.length;var sbi_cache_string_length=40-Math.min(sbi_cache_string_include_length+sbi_cache_string_exclude_length,20);var transientName='sbi_';if(getType==='liked'){transientName+='liked'}
129                looparray=looparray.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,"");var transientWhiteList=feedOptions.sbiWhiteList.substring(0,3),transientShowUser=feedOptions.showusers.substring(0,3);transientName+=transientWhiteList+transientShowUser;if(feedOptions.media!=='all')transientName+=feedOptions.media.substring(0,1);transientName+=looparray.substring(0,sbi_cache_string_length);sbi_cache_string_length=transientName.length;sbi_cache_string_length=44-sbi_cache_string_length;if(sbi_cache_string_exclude_length<sbi_cache_string_length/2){sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length-sbi_cache_string_exclude_length)}else{if(sbi_cache_string_exclude.length==0){sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length)}else{sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length/2)}
130                    if(sbi_cache_string_include.length==0){sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0,sbi_cache_string_length)}else{sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0,sbi_cache_string_length/2)}}
131                function getHeaderTransientName(looparrayZero){var headerTransientName='sbi_header_'+looparrayZero;headerTransientName=headerTransientName.substring(0,45);return headerTransientName}
132                transientName+=sbi_cache_string_include+sbi_cache_string_exclude;sbiTransientNames.feed=transientName.substring(0,45);sbiTransientNames.header=getHeaderTransientName(sbiSettings.looparray[0]);if(!sb_instagram_js_options.sbiPageCommentCache&&window.sbiCommentCacheStatus===1&&window.sbiStandalone.noDB!==!0){sbiTransientNames.comments='need'}else{sbiTransientNames.comments='no'}
133                if((window.sbiCacheStatuses[feedOptions.feedIndex].feed===!0||window.sbiCacheStatuses[feedOptions.feedIndex].header===!0||sbiTransientNames.comments==='need')&&!feedOptions.disablecache&&typeof feedOptions.tryFetch==='undefined'){var images=sbiGetCache(sbiTransientNames,sbiSettings,$self,'all',apiURLs);sbiTransientNames.comments='no'}
134                if(getType=='user'&&isNaN(ids_arr[0])){sbiSetUserApiUrl(ids_arr[0],sb_instagram_js_options.sb_instagram_at,'/media/recent','&count=33',function(apiURL,newFeedID){sbiSettings.user_id=newFeedID;sbiFetchData([apiURL],sbiTransientNames.feed,sbiSettings,$self)})}else{if(window.sbiCacheStatuses[feedOptions.feedIndex].feed===!1&&window.sbiCacheStatuses[feedOptions.feedIndex].feed!=='fetched'){window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch='done';sbiFetchData(apiURLs,sbiTransientNames.feed,sbiSettings,$self)}
135                    if(!window.sbiCacheStatuses[feedOptions.feedIndex].header&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='fetched'&&sbiSettings.getType==='user'){window.sbiCacheStatuses[feedOptions.feedIndex].header='fetched';
135sbiFetchData(apiURLs,sbiTransientNames.header,sbiSettings,$self)}}
136                var imagesArr='',sbiNewData=!1,noMoreData=!1,photoIds=[],imagesHTML='',photosAvailable=0,apiRequests=1;function sbiBuildFeed(images,transientName,sbiSettings,$self){var $loadBtn=$self.find("#sbi_load .sbi_load_btn"),num=parseInt(sbiSettings.num),cols=parseInt(sbiSettings.cols),hovercolorstyles='',hovertextstyles='',feedOptions=sbiSettings.feedOptions,disablelightbox=sbiSettings.disablelightbox,captionlinks=sbiSettings.captionlinks,itemCount=0,imgRes=sbiSettings.imgRes,getType=feedOptions.type,hidePhotos=sbiSettings.hidePhotos,blockUsers=sbiSettings.blockUsers,excludeWords=sbiSettings.excludeWords,showUsers=sbiSettings.showUsers,includeWords=sbiSettings.includeWords,whiteListIds=sbiSettings.whiteListIds,whiteList=sbiSettings.whiteList,maxRequests=parseInt(feedOptions.maxrequests),removedPhotosCount=0,carousel=JSON.parse(feedOptions.carousel)[0],carouselarrows=JSON.parse(feedOptions.carousel)[1],carouselpag=JSON.parse(feedOptions.carousel)[2],carouselautoplay=JSON.parse(feedOptions.carousel)[3],carouseltime=JSON.parse(feedOptions.carousel)[4],imagepadding=feedOptions.imagepadding,imagepaddingunit=feedOptions.imagepaddingunit,looparray=sbiSettings.looparray,headerstyle=feedOptions.headerstyle,headerstyle=feedOptions.headerstyle,headerprimarycolor=feedOptions.headerprimarycolor,headersecondarycolor=feedOptions.headersecondarycolor,media=feedOptions.media;var sbiModIndex='b';if(typeof $self.parent().attr('class')!=='undefined'){sbiModIndex=$self.index()+$self.parent().attr('class').toString()}else{sbiModIndex='noclass'}
137                    var forceModMode=!1,usingDB=!0;if(typeof window.sbiStandalone!=='undefined'){forceModMode=window.sbiStandalone.forceModMode;usingDB=(window.sbiStandalone.noDB===!1)}
138                    if(feedOptions.sbiModIndex===sbiModIndex.substring(0,10)||$self.hasClass('sbi_mod_merged')||forceModMode){modMode.setStatus($self.hasClass('sbi_moderation_mode'));modMode.setUsingDB(usingDB)}else{modMode.setStatus(!1)}
139                    if(modMode.status===!0){modMode.setSelf($self);if(!modMode.$self.hasClass('sbi_mod_merged')){if(sbiSettings.feedOptions.sbiWhiteList.length){modMode.setWhiteListData(sbiSettings.feedOptions.sbiWhiteList,sbiSettings.feedOptions.sbiWhiteListIds)}}
140                        modMode.mergeDBAndSelected();disablelightbox='true';hidePhotos=[];blockUsers=[];showUsers[0]='';feedOptions.showlikes='false';feedOptions.showcaption='false';sbiSettings.showlikes='';sbiSettings.showcaption='';carousel=!1;imagepadding=5;imagepaddingunit="px"}
141                    jQuery('.sbi_moderation_link').click(function(){var modIndex='b';if(typeof jQuery(this).closest('.sbi').parent().attr('class')!=='undefined'){modIndex=jQuery(this).closest('.sbi').index()+jQuery(this).closest('.sbi').parent().attr('class')}else{modIndex='noclass'}
142                        var url=window.location.href;modIndex=modIndex.substring(0,10);if(url.indexOf('sbi_moderation_mode=true')==-1){if(url.indexOf('?')>-1){url+='&sbi_moderation_mode=true&sbi_moderation_index='+modIndex}else{url+='?sbi_moderation_mode=true&sbi_moderation_index='+modIndex}}
143                        window.location.href=url});if(imagesArr==''){imagesArr=images}else if(sbiNewData==!0){jQuery.each(images.data,function(index,entry){imagesArr.data.push(entry)});sbiNewData=!1}
144                    var imagesNextUrl=images.pagination.next_url;if(typeof imagesNextUrl==='undefined'||imagesNextUrl.length==0){noMoreData=!0}else{$loadBtn.show()}
145                    if(typeof images.pagination!=='undefined')imagesArr.pagination=images.pagination;if(feedOptions.showcaption=='false'||feedOptions.showcaption=='')showcaption='style="display: none;"';if(feedOptions.showlikes=='false'||feedOptions.showlikes=='')showlikes='display: none;';if(feedOptions.sortby!=='')sortby=feedOptions.sortby;if(feedOptions.hovercolor!=='0,0,0')hovercolorstyles='style="background: rgba('+feedOptions.hovercolor+',0.85)"';if(feedOptions.hovertextcolor!=='0,0,0')hovertextstyles='style="color: rgba('+feedOptions.hovertextcolor+',1)"';var imagesArrCountOrig=imagesArrCount,removePhotoIndexes=[];if($self.find('.sbi_header_link').length==0){if(getType=='user'){var sbi_page_url='https://api.instagram.com/v1/users/'+looparray[0]+'?access_token='+sb_instagram_js_options.sb_instagram_at;if(isNaN(looparray[0])){sbiSetUserApiUrl(looparray[0],sb_instagram_js_options.sb_instagram_at,'','',function(apiURL){sbi_page_url=apiURL;if(sbiHeaderCache=='true'&&!feedOptions.disablecache){}else{jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){sbiBuildHeader(data,sbiSettings);if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){window.sbiCacheStatuses[feedOptions.feedIndex].header='cached';sbiCachePhotos(data,headerTransientName)}}})}})}else{var headerTransientName='sbi_header_'+looparray[0];headerTransientName=headerTransientName.substring(0,45);if(sbiHeaderCache=='true'&&!feedOptions.disablecache){}else{jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){sbiBuildHeader(data,sbiSettings);if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){window.sbiCacheStatuses[feedOptions.feedIndex].header='cached';sbiCachePhotos(data,headerTransientName)}}})}}}else{var headerStyles='';if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';if(getType=='hashtag'){$header='<a href="https://instagram.com/explore/tags/'+looparray[0]+'" target="_blank" class="sbi_header_link" '+headerStyles+'>'}else{$header='<div class="sbi_header_link" '+headerStyles+'>'}
146                        $header+='<div class="sbi_header_text">';$header+='<h3 class="sbi_no_bio" '+headerStyles+'>';if(getType=='hashtag'){if(looparray.length>1){jQuery.each(looparray,function(index,hashtag){$header+='<a href="https://instagram.com/explore/tags/'+hashtag+'" target="_blank">#'+hashtag+'&nbsp;</a>'})}else{$header+='#'+looparray[0]}}else{$header+='Instagram'}
147                        $header+='</h3>';$header+='</div>';$header+='<div class="sbi_header_img"';if(headerstyle=='boxed')$header+=' style="background: #'+headersecondarycolor+';"';$header+='>';$header+='<div class="sbi_header_hashtag_icon"';if(headerstyle=='boxed')$header+=' style="color: #'+headerprimarycolor+';"';$header+='><i class="sbi_new_logo" '+hovertextstyles+'></i></div>';$header+='</div>';if(getType=='hashtag'){$header+='</a>'}else{$header+='</div>'}
148                        if($self.find('.sbi_header_link').length==0)$self.find('.sb_instagram_header').prepend($header);$self.find('.sb_instagram_header .sbi_header_link').hover(function(){$self.find('.sbi_feed_type_user .sbi_header_hashtag_icon, .sbi_feed_type_hashtag .sbi_header_hashtag_icon').attr('style','background: '+$self.find('h3').css('color'));$self.find('.sbi_feed_type_hashtag.sbi_header_style_boxed .sbi_header_hashtag_icon').css({'background':'#000','color':'#fff'})},function(){$self.find('.sbi_feed_type_user .sbi_header_hashtag_icon, .sbi_feed_type_hashtag .sbi_header_hashtag_icon').removeAttr('style');$self.find('.sbi_feed_type_hashtag.sbi_header_style_boxed .sbi_header_hashtag_icon').css({'background':'#'+feedOptions.headersecondarycolor,'color':'#'+feedOptions.headerprimarycolor})})}}
149                    jQuery.each(imagesArr.data,function(itemNumber,item){var removePhoto=!1;if(showUsers[0]!==''){var hits=0;jQuery.each(showUsers,function(index,username){if(item.user.username==jQuery.trim(username)){hits++}});if(hits<1){hidePhotos.push(item.id)}}else{jQuery.each(blockUsers,function(index,username){if(item.user.username==jQuery.trim(username)){hidePhotos.push(item.id)}})}
150                        if((excludeWords.length>0&&excludeWords[0]!=='')&&item.caption!=null&&item.caption!=''){jQuery.each(excludeWords,function(index,word){word=jQuery.trim(word).toLowerCase();if(item.caption.text.toLowerCase().indexOf(word)>-1&&word!==''){}});var workingCaptionEx=' '+item.caption.text+' ';jQuery.each(excludeWords,function(index,word){if(word!==''){var needle=encodeURI(jQuery.trim(word).toLowerCase()),haystack=encodeURI(workingCaptionEx.toLowerCase().replace('#',' #')),regex=new RegExp("%20"+needle+"\\b");haystack=haystack.replace(/#/g,'%20#');
150if(regex.test(haystack)){hidePhotos.push(item.id)}}})}
151                        if(includeWords.length>0&&includeWords!=''){if(item.caption==null){hidePhotos.push(item.id)}else{var containsWord=!1,workingCaption=' '+item.caption.text+' ';jQuery.each(includeWords,function(index,word){var needle=encodeURI(jQuery.trim(word).toLowerCase()),haystack=encodeURI(workingCaption.toLowerCase().replace('#',' #')),regex=new RegExp("%20"+needle+"\\b");haystack=haystack.replace(/#/g,'%20#');if(regex.test(haystack)){containsWord=!0}});if(containsWord==!1&&(jQuery.inArray(item.id,hidePhotos)<1)){hidePhotos.push(item.id)}}}
152                        if(item.type=='video'&&typeof item.videos=='undefined')item.type='image';if(media=='videos'&&item.type!=='video')removePhoto=!0;if(media=='photos'&&item.type!=='image')removePhoto=!0;if(whiteList.length>0&&whiteList!=''&&!modMode.status==!0){if(whiteListIds.indexOf(item.id)===-1){hidePhotos.push(item.id)}}
153                        jQuery.each(hidePhotos,function(index,id){if(item.id==jQuery.trim(id))removePhoto=!0});if(removePhoto){removedPhotosCount++;removePhotoIndexes.push(itemNumber);return}
154                        itemCount++;if(itemCount>((imagesArrCountOrig-photosAvailable)+num)||itemCount<=imagesArrCountOrig)return;imagesArrCount++;var data_video='data-video=""';if(item.type=='video'){data_video='data-video="'+item.videos.standard_resolution.url+'"'}
155                        var data_carousel='data-carousel=""';if(item.type==='carousel'&&typeof item.carousel_media!=='undefined'){var data_carousel_object={};jQuery.each(item.carousel_media,function(index,value){if(typeof value.images!=='undefined'){data_carousel_object[index]={'type':'image','media':value.images.standard_resolution.url}}else if(typeof value.videos!=='undefined'){data_carousel_object[index]={'type':'video','media':value.videos.standard_resolution.url}}});data_carousel="data-carousel='"+JSON.stringify(data_carousel_object).replace(/'/g,"\\'")+"'"}
156                        var data_image=item.images.standard_resolution.url;switch(imgRes){case 'thumbnail':data_image=item.images.thumbnail.url;break;case 'low_resolution':data_image=item.images.low_resolution.url;break}
157                        data_image=data_image.split("?ig_cache_key")[0];var date=new Date(item.created_time*1000);var created_time_raw=item.created_time;var m=date.getMonth();var d=date.getDate();var month_names=new Array();month_names[month_names.length]="Jan";month_names[month_names.length]="Feb";month_names[month_names.length]="Mar";month_names[month_names.length]="Apr";month_names[month_names.length]="May";month_names[month_names.length]="Jun";month_names[month_names.length]="Jul";month_names[month_names.length]="Aug";month_names[month_names.length]="Sep";month_names[month_names.length]="Oct";month_names[month_names.length]="Nov";month_names[month_names.length]="Dec";var itemDate=d+' '+month_names[m];var captionText='';if(item.caption!=null&&item.caption!=''){var captionText=item.caption.text.replace(/"/g,"&quot;");captionText=captionText.replace(/\n/g,"<br/>")}
158                        if(feedOptions.hoverdisplay.indexOf('location')>-1){var showHoverLocation=!0}else{var showHoverLocation=!1}
159                        if(feedOptions.hoverdisplay.indexOf('caption')>-1){var showHoverCaption=!0}else{var showHoverCaption=!1}
160                        if(feedOptions.hoverdisplay.indexOf('likes')>-1){var showHoverLikes=!0}else{var showHoverLikes=!1}
161                        if(feedOptions.hoverdisplay.indexOf('username')>-1){var showHoverUsername=!0}else{var showHoverUsername=!1}
162                        if(feedOptions.hoverdisplay.indexOf('icon')>-1){var showHoverIcon=!0}else{var showHoverIcon=!1}
163                        if(feedOptions.hoverdisplay.indexOf('date')>-1){var showHoverDate=!0}else{var showHoverDate=!1}
164                        if(feedOptions.hoverdisplay.indexOf('instagram')>-1){var showHoverInstagram=!0}else{var showHoverInstagram=!1}
165                        if(item.location!=null&&item.caption!=''&&showHoverLocation){if(item.location.name=='undefined'||item.location.name==null){var locationName=''}else{var sbi_lat=(item.location.hasOwnProperty("latitude"))?'data-lat="'+item.location.latitude+'"':'',sbi_long=(item.location.hasOwnProperty("longitude"))?'data-long="'+item.location.longitude+'"':'',locationName='<a href="https://instagram.com/explore/locations/'+item.location.id+'" class="sbi_location" target="_blank" '+sbi_lat+' '+sbi_long+'><i class="fa fa-map-marker"></i>'+item.location.name+'</a>'}}else{var locationName=''}
166                        var sbiCaptionHTML='';if(showHoverCaption){sbiCaptionHTML='<p class="sbi_caption" '+hovertextstyles+'>'+captionText.substring(0,feedOptions.captionlength);if(captionText.length>parseInt(feedOptions.captionlength))sbiCaptionHTML+='...';sbiCaptionHTML+='</p>'}
167                        var sbiMetaHTML='';if(showHoverLikes){sbiMetaHTML='<div class="sbi_meta" style="color: #'+feedOptions.likescolor+';"><span class="sbi_likes" '+hovertextstyles+'><i class="fa fa-heart" '+hovertextstyles+'></i>'+commaSeparateNumber(item.likes.count)+'</span><span class="sbi_comments" '+hovertextstyles+'><i class="fa fa-comment" '+hovertextstyles+'></i>'+commaSeparateNumber(item.comments.count)+'</span></div>'}
168                        var sbiUsernameHTML='';if(showHoverUsername){sbiUsernameHTML='<p class="sbi_username"><a href="https://instagram.com/'+item.user.username+'" target="_blank" '+hovertextstyles+'>
168'+item.user.username+'</a></p>'}
169                        var sbiIconHTML='';if(showHoverIcon){sbiIconHTML='<i class="fa fa-arrows-alt"></i>'}
170                        var sbiDateHTML='';if(showHoverDate){sbiDateHTML='<span class="sbi_date"><i class="fa fa-clock-o"></i>'+itemDate+'</span>'}
171                        var sbiInstagramHTML='';if(showHoverInstagram){sbiInstagramHTML='<a class="sbi_instagram_link" href="'+item.link+'" target="_blank" title="Instagram" '+hovertextstyles+'><span class="sbi-screenreader">View on Instagram</span><i class="fa fa-instagram"></i></a>'}
172                        var sbiHoverEffect='sbi_fade';var carouselPadding=(carousel==!0)?' style="padding: '+imagepadding+imagepaddingunit+' !important;"':'';imagesHTML+='<div class="sbi_item sbi_type_'+item.type+' sbi_new '+sbiHoverEffect+'" id="sbi_'+item.id+'" data-date="'+created_time_raw+'"'+carouselPadding+'><div class="sbi_photo_wrap"><i class="fa fa-play sbi_playbtn"></i><div class="sbi_link" '+hovercolorstyles+'><div class="sbi_hover_top">'+sbiUsernameHTML+sbiCaptionHTML+'</div>'+sbiInstagramHTML+'<div class="sbi_hover_bottom" '+hovertextstyles+'><p>'+sbiDateHTML+locationName+'</p>'+sbiMetaHTML+'</div><a class="sbi_link_area" href="'+item.images.standard_resolution.url+'" data-lightbox-sbi="'+$self.attr('data-sbi-index')+'" data-title="'+captionText+'" '+data_video+data_carousel+' data-id="sbi_'+item.id+'" data-user="'+item.user.username+'" data-url="'+item.link+'" data-avatar="'+item.user.profile_picture+'"><span class="sbi-screenreader">Link to display lightbox</span><i class="fa fa-play sbi_playbtn" '+hovertextstyles+'></i><span class="sbi_lightbox_link" '+hovertextstyles+'>'+sbiIconHTML+'</span></a></div><a class="sbi_photo" href="'+item.link+'" target="_blank"><img src="'+data_image+'" alt="'+captionText+'" width="200" height="200" /></a></div><div class="sbi_info"><p class="sbi_caption_wrap" '+sbiSettings.showcaption+'><span class="sbi_caption" style="color: #'+feedOptions.captioncolor+'; font-size: '+feedOptions.captionsize+'px;">'+captionText+'</span><span class="sbi_expand"> <a href="#"><span class="sbi_more">...</span></a></span></p><div class="sbi_meta" style="color: #'+feedOptions.likescolor+'; '+sbiSettings.showlikes+'"><span class="sbi_likes" style="font-size: '+feedOptions.likessize+'px;"><i class="fa fa-heart" style="font-size: '+feedOptions.likessize+'px;"></i>'+commaSeparateNumber(item.likes.count)+'</span><span class="sbi_comments" style="font-size: '+feedOptions.likessize+'px;"><i class="fa fa-comment" style="font-size: '+feedOptions.likessize+'px;"></i>'+commaSeparateNumber(item.comments.count)+'</span></div></div>';if(modMode.status===!0){imagesHTML+=modMode.addModHtml(item.user.username)}
173                        imagesHTML+='</div>'});removePhotoIndexes.reverse();jQuery.each(removePhotoIndexes,function(index,itemNumber){imagesArr.data.splice(itemNumber,1)});if((imagesArrCount-imagesArrCountOrig)<num)photosAvailable+=imagesArrCount-imagesArrCountOrig;var numWhiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(",").length;if(((imagesArrCount-imagesArrCountOrig)<num)&&(photosAvailable<num)&&(apiRequests<maxRequests)&&!noMoreData&&(imagesArrCount<numWhiteListIds||feedOptions.sbiWhiteList==='')){var sbiFetchURL=imagesArr.pagination.next_url;window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';sbiFetchData(sbiFetchURL,sbiTransientNames.feed,sbiSettings,$self);sbiNewData=!0}else{if($self.hasClass('sbi-has-backup')){$self.find('#sbi_images').empty();$self.removeClass('sbi-has-backup')}
174                        $self.find('#sbi_images').append(imagesHTML);sbiAfterImagesLoaded(imagesArr,sbiTransientNames.feed);imagesHTML='';$self.find('.sbi_loader').remove();$loadBtn.find('.fa-spinner').hide();$loadBtn.find('.sbi_btn_text').css('opacity',1)}
175                    function sbiAfterImagesLoaded(imagesArr,transientName){$self.find('.sbi_item').each(function(){var $self=jQuery(this),$sbi_link_area=$self.find('.sbi_link_area');var $sbi_lightbox=jQuery('#sbi_lightbox');$self.find('.sbi_lightbox_link').click(function(){$sbi_lightbox.removeClass('sbi_video_lightbox');if($self.hasClass('sbi_type_video')){$sbi_lightbox.addClass('sbi_video_lightbox');jQuery('.sbi_video').attr({'poster':jQuery(this).attr('href')})}});var $post_text=$self.find('.sbi_info .sbi_caption'),text_limit=feedOptions.captionlength;if(typeof text_limit==='undefined'||text_limit=='')text_limit=99999;var full_text=$self.find('.sbi_photo img').attr('alt');if(full_text==undefined)full_text='';var short_text=full_text.substring(0,text_limit);$post_text.html(short_text);if(full_text.length>text_limit)$self.find('.sbi_expand').show();$self.find('.sbi_expand a').unbind('click').bind('click',function(e){e.preventDefault();var $expand=jQuery(this);if($self.hasClass('sbi_caption_full')){$post_text.html(short_text);$self.removeClass('sbi_caption_full')}else{$post_text.html(full_text);$self.addClass('sbi_caption_full')}});if(disablelightbox=='true'||captionlinks=='true'){if(!sbiTouchDevice){$self.find('.sbi_photo').hover(function(){jQuery(this).fadeTo(200,0.85)},function(){jQuery(this).stop().fadeTo(500,1)})}
176                        if(captionlinks=='true'){function sbiUrlDetect(text){var urlRegex=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;return text.match(urlRegex)}
177                            var cap=$self.find('img').attr('alt'),url=sbiUrlDetect(cap);if(url){$self.find('a').attr('href',url)}}}else{var $sbi_photo_wrap=$self.find('.sbi_photo_wrap'),$sbi_link=$sbi_photo_wrap.find('.sbi_link');
177if(sbiTouchDevice||feedOptions.hovereffect=='none'){$sbi_link.css('background','none').show();$sbi_link.find('*').hide().end().find('.sbi_link_area').show()}else{$sbi_photo_wrap.hover(function(){$sbi_link.fadeIn(200);$self.addClass('sbi_animate')},function(){$sbi_link.stop().fadeOut(600);$self.removeClass('sbi_animate')})}}});jQuery('.sbi_lightbox_action a').unbind().bind('click',function(){jQuery(this).parent().find('.sbi_lightbox_tooltip').toggle()});$self.find('#sbi_images .sbi_item.sbi_new').sort(function(a,b){var aComp=jQuery(a).attr("data-date"),bComp=jQuery(b).attr("data-date");if(sortby=='none'){return bComp-aComp}else{return(Math.round(Math.random())-0.5)}}).appendTo($self.find("#sbi_images"));setTimeout(function(){jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');morePosts=[]},500);var imagesArrLength=imagesArr.data.length;if(((imagesArrCount>=imagesArrLength)&&noMoreData)||(getType=='coordinates'&&images.data.length==0)){$loadBtn.hide()}
178                        if(sbiSettings.whiteList.length&&($self.find('.sbi_item').length===sbiSettings.whiteListIds.length)){$loadBtn.hide()}
179                        $self.find('#sbi_load .sbi_load_btn').off().on('click',function(){$loadBtn.find('.fa-spinner').show();$loadBtn.find('.sbi_btn_text').css('opacity',0);photosAvailable=0;imagesArrCount=parseInt(imagesArrCount);imagesArrLength=imagesArr.data.length;var numWhiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(",").length;if((imagesArrCount+num)<imagesArrLength||noMoreData||(imagesArrCount>=numWhiteListIds&&feedOptions.sbiWhiteList!==''&&modMode.status!==!0)){if(photosAvailable!=='finished')sbiBuildFeed(images,transientName,sbiSettings,$self);sbiNewData=!1;if(((imagesArrCount>=imagesArrLength)&&noMoreData)||(getType=='coordinates'&&images.data.length==0)){$loadBtn.hide()}
180                            if(sbiSettings.whiteList.length&&($self.find('.sbi_item').length===sbiSettings.whiteListIds.length)){$loadBtn.hide()}}else{sbiFetchURL=imagesArr.pagination.next_url;window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';sbiFetchData(sbiFetchURL,transientName,sbiSettings,$self);sbiNewData=!0;apiRequests=0}});if(modMode.status===!0){if(!modMode.$self.hasClass('sbi_mod_merged')){modMode.setOriginalPosition();modMode.resizeFeed()}
181                            setTimeout(function(){modMode.$self.find('.sbi_item .sbi_photo').each(function(){if(!jQuery(this).hasClass('sbi_mod_changed')){jQuery(this).click(function(e){modMode.changeClickEvent(jQuery(this),e)});jQuery(this).addClass('sbi_mod_changed')}});setTimeout(function(){modMode.addModSettingsHtml();modMode.$self.find('.sbi_mod_submit_mod').click(function(){modMode.submitSelected()});modMode.$self.find('.sbi_hide_show_radio').click(function(){modMode.updateHideOrShow(jQuery(this).val());modMode.updateDisplay()});modMode.$self.find('.sbi_mod_block_user').each(function(){if(!jQuery(this).hasClass('sbi_mod_changed')){jQuery(this).click(function(){modMode.updateBlockUser(jQuery(this));modMode.updateDisplay()});jQuery(this).addClass('sbi_mod_changed')}});modMode.$self.find('.sbi_close_mod').click(function(){modMode.closeMod()});modMode.replaceInfoHtml();jQuery('.sbi_item').each(function(){jQuery(this).css('height',jQuery('.sbi_photo_wrap').innerHeight()+jQuery('.sbi_info').innerHeight())});modMode.updateDisplay();modMode.$self.addClass('sbi_mod_merged');modMode.$self.find('.sbi_info').removeClass('sbi_info')},600)},350)}
182                        if(typeof sbi_custom_js=='function')setTimeout(function(){sbi_custom_js()},100);if(imgRes!=='thumbnail'){var sbi_imgLiquid=sbi_imgLiquid||{VER:"0.9.944"};sbi_imgLiquid.bgs_Available=!1,sbi_imgLiquid.bgs_CheckRunned=!1,function(i){function t(){if(!sbi_imgLiquid.bgs_CheckRunned){sbi_imgLiquid.bgs_CheckRunned=!0;var t=i('<span style="background-size:cover" />');i("body").append(t),!function(){var i=t[0];if(i&&window.getComputedStyle){var e=window.getComputedStyle(i,null);e&&e.backgroundSize&&(sbi_imgLiquid.bgs_Available="cover"===e.backgroundSize)}}(),t.remove()}}i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroun
182dSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},t();var a=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(t){function e(){-1===u.css("background-image").indexOf(encodeURI(c.attr("src")))&&u.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),u.css({"background-size":g.fill?"cover":"contain","background-position":(g.horizontalAlign+" "+g.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",u).css({display:"block",width:"100%",height:"100%"}),i("img",u).css({display:"none"}),g.onItemFinish&&g.onItemFinish(t,u,c),u.addClass("sbi_imgLiquid_bgSize"),u.addClass("sbi_imgLiquid_ready"),l()}function o(){function e(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(u.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(r,t*g.delay)):setTimeout(e,g.timecheckvisibility))}if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var a=c.clone().removeAttr("style");return a.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(a),c.remove(),c=a,c[0].width=0,void setTimeout(o,10)}return c.data("sbi_imgLiquid_oldProcessed")?void r():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",u).css("display","none"),u.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",n),c[0].onerror=n,e(),void d())}function d(){(g.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(g=c.data("sbi_imgLiquid_settings"),u.actualSize=u.get(0).offsetWidth+u.get(0).offsetHeight/1e4,u.sizeOld&&u.actualSize!==u.sizeOld&&r(),u.sizeOld=u.actualSize,setTimeout(d,g.responsiveCheckTime))}function n(){c.data("sbi_imgLiquid_error",!0),u.addClass("sbi_imgLiquid_error"),g.onItemError&&g.onItemError(t,u,c),l()}function s(){var i={};if(a.settings.useDataHtmlAttr){var t=u.attr("data-sbi_imgLiquid-fill"),e=u.attr("data-sbi_imgLiquid-horizontalAlign"),o=u.attr("data-sbi_imgLiquid-verticalAlign");("true"===t||"false"===t)&&(i.fill=Boolean("true"===t)),void 0===e||"left"!==e&&"center"!==e&&"right"!==e&&-1===e.indexOf("%")||(i.horizontalAlign=e),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return sbi_imgLiquid.isIE&&a.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}function r(){var i,e,a,o,d,n,s,r,m=0,h=0,f=u.width(),v=u.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),g.fill===f/v>=c.data("owidth")/c.data("oheight")?(i="100%",e="auto",a=Math.floor(f),o=Math.floor(f*(c.data("oheight")/c.data("owidth")))):(i="auto",e="100%",a=Math.floor(v*(c.data("owidth")/c.data("oheight"))),o=Math.floor(v)),d=g.horizontalAlign.toLowerCase(),s=f-a,"left"===d&&(h=0),"center"===d&&(h=.5*s),"right"===d&&(h=s),-1!==d.indexOf("%")&&(d=parseInt(d.replace("%",""),10),d>0&&(h=s*d*.01)),n=g.verticalAlign.toLowerCase(),r=v-o,"left"===n&&(m=0),"center"===n&&(m=.5*r),"bottom"===n&&(m=r),-1!==n.indexOf("%")&&(n=parseInt(n.replace("%",""),10),n>0&&(m=r*n*.01)),g.hardPixels&&(i=a,e=o),c.css({width:i,height:e,"margin-left":Math.floor(h),"margin-top":Math.floor(m)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(g.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),g.removeBoxBackground&&u.css("background-image","none"),u.addClass("sbi_imgLiquid_nobgSize"),u.addClass("sbi_imgLiquid_ready")),g.onItemFinish&&g.onItemFinish(t,u,c),l()}function l(){t===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var g=a.settings,u=i(this),c=i("img:first",u);return c.length?(c.data("sbi_imgLiquid_settings")?(u.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),g=i.extend({},c.data("sbi_imgLiquid_settings"),a.options)):g=i.extend({},a.settings,s()),c.data("sbi_imgLiquid_settings",g),g.onItemStart&&g.onItemStart(t,u,c),void(sbi_imgLiquid.bgs_Available&&g.useBackgroun
182dSize?e():o())):void n()})}})}(jQuery);!function(){var css=sbi_imgLiquid.injectCss,head=document.getElementsByTagName('head')[0],style=document.createElement('style');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}
183                            head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})}
184                        var sbi_delay=(function(){var sbi_timer=0;return function(sbi_callback,sbi_ms){clearTimeout(sbi_timer);sbi_timer=setTimeout(sbi_callback,sbi_ms)}})();jQuery(window).resize(function(){sbi_delay(function(){sbiSetPhotoHeight();sbiGetItemSize()},500)});function sbiSetPhotoHeight(){if(imgRes!=='thumbnail'){var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth();var sbi_num_cols=parseInt(cols);if(!$self.hasClass('sbi_disable_mobile')){var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))sbi_num_cols=2;if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))sbi_num_cols=4;if(sbiWindowWidth<=480&&parseInt(cols)>2)sbi_num_cols=1}
185                            var sbi_photo_width_manual=($self.find('#sbi_images').width()/sbi_num_cols)-(imagepadding*2);if(sbi_photo_width<=(sbi_photo_width_manual))sbi_photo_width=sbi_photo_width_manual;$self.find('.sbi_photo').css('height',sbi_photo_width)}}
186                        if(carousel==!1)sbiSetPhotoHeight();!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery);jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({callback:function(element,visible){sbiSetPhotoHeight();sbiGetItemSize()},runOnLoad:!1});if(carousel==!0){setTimeout(function(){if(!carouselautoplay)carouseltime=!1;var itemsDesktop=!1,itemsDesktopSmall=!1,itemsTablet=!1,itemsTabletSmall=!1,itemsMobile=!1;if(!$self.hasClass('sbi_disable_mobile')){var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))itemsTabletSmall=[639,2];if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))itemsTabletSmall=[639,4];if(sbiWindowWidth<=480&&parseInt(cols)!=2)itemsMobile=[480,1];if(sbiWindowWidth<=480&&parseInt(cols)==2)itemsMobile=[480,2]}
187                            $self.find(".sbi_carousel").sbi_owlCarousel({items:cols,navigation:carouselarrows,navigationText:['<i class="fa fa-chevron-left"></i>','<i class="fa fa-chevron-right"></i>'],pagination:carouselpag,autoPlay:carouseltime,stopOnHover:!0,itemsDesktop:itemsDesktop,itemsDesktopSmall:itemsDesktopSmall,itemsTablet:itemsTablet,itemsTabletSmall:itemsTabletSmall,itemsMobile:itemsMobile});jQuery('#sb_instagram #sbi_images.sbi_carousel .sbi_item').fadeIn();sbiSetPhotoHeight();sbiGetItemSize();var sbi_arrows_top=($self.find('.sbi_photo').eq(0).innerWidth()/2);if(imagepaddingunit=='px')sbi_arrows_top+=parseInt(imagepadding)*2;$self.find('.sbi_owl-buttons div').css('top',sbi_arrows_top)},500)}
188                        function sbiGetItemSize(){$self.removeClass('sbi_small sbi_medium');var sbiItemWidth=$self.find('.sbi_item').innerWidth();if(sbiItemWidth>120&&sbiItemWidth<240){$self.addClass('sbi_medium')}else if(sbiItemWidth<=120){$self.addClass('sbi_small')}}
189                        if(carousel!==!0)sbiGetItemSize();
189if(!feedOptions.disablecache&&typeof _cache!=='undefined'&&window.sbiCacheStatuses[feedOptions.feedIndex].feed==='fetched'){_cache(imagesArr,transientName);window.sbiCacheStatuses[feedOptions.feedIndex].feed='cached'}
190                        photosAvailable='finished'}}
191                function commaSeparateNumber(val){while(/(\d+)(\d{3})/.test(val.toString())){val=val.toString().replace(/(\d+)(\d{3})/,'$1'+','+'$2')}
192                    return val}
193                function sbiBuildHeader(data,sbiSettings){try {var feedOptions=sbiSettings.feedOptions,headerStyles='';if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';$header='<a href="https://instagram.com/'+data.data.username+'" target="_blank" title="@'+data.data.username+'" class="sbi_header_link" '+headerStyles+'>';$header+='<div class="sbi_header_text';if((typeof data.data.bio!=='undefined'&&data.data.bio.length<1)||feedOptions.showbio!='true')$header+=' sbi_no_bio';if(((typeof data.data.bio!=='undefined'&&data.data.bio.length==0)||feedOptions.showbio!='true')&&feedOptions.showfollowers!='true')$header+=' sbi_no_info';$header+='">';$header+='<h3 '+headerStyles+'>
193'+data.data.username+'</h3>';var $headerInfo='<p class="sbi_bio_info" ';if(feedOptions.headerstyle=='boxed'){$headerInfo+='style="color: #'+feedOptions.headerprimarycolor+';"'}else{$headerInfo+=headerStyles}
194                    if(typeof data.data.counts!=='undefined')$headerInfo+='><span class="sbi_posts_count"><i class="fa fa-photo"></i>'+commaSeparateNumber(data.data.counts.media)+'</span><span class="sbi_followers"><i class="fa fa-user" style="margin-right: 3px;"></i>'+commaSeparateNumber(data.data.counts.followed_by)+'</span></p>';if(feedOptions.showfollowers!=''&&feedOptions.showfollowers!='false'&&feedOptions.headerstyle!=='boxed')$header+=$headerInfo;if(typeof data.data.bio!=='undefined'&&data.data.bio.length>1&&feedOptions.showbio!=''&&feedOptions.showbio!='false')$header+='<p class="sbi_bio" '+headerStyles+'>'+data.data.bio+'</p>';$header+='</div>';$header+='<div class="sbi_header_img">';$header+='<div class="sbi_header_img_hover"><i class="sbi_new_logo"></i></div>';$header+='<img src="'+data.data.profile_picture+'" alt="'+data.data.full_name+'" width="50" height="50">';$header+='</div>';$header+='</a>';if(feedOptions.headerstyle=='boxed'){$header+='<div class="sbi_header_bar" style="background: #'+feedOptions.headersecondarycolor+'">';if(feedOptions.showbio!='false')$header+=$headerInfo;$header+='<a class="sbi_header_follow_btn" href="https://instagram.com/'+data.data.username+'" target="_blank" style="color: #'+feedOptions.headercolor+'; background: #'+feedOptions.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>'}
195                    if($self.find('.sbi_header_link').length==0)$self.find('.sb_instagram_header').prepend($header);if($self.find('.sbi_follow_btn').length)$self.find('.sbi_follow_btn a').attr('href','https://instagram.com/'+data.data.username);if(feedOptions.headerstyle=='boxed'&&$self.find('.sbi_header_follow_btn').length)$self.find('.sbi_header_follow_btn span').text($self.find('.sb_instagram_header').attr('data-follow-text').replace(/\\/g,""));$self.find('.sb_instagram_header .sbi_header_link').hover(function(){$self.find('.sb_instagram_header .sbi_header_img_hover').fadeIn(200)},function(){$self.find('.sb_instagram_header .sbi_header_img_hover').stop().fadeOut(600)})} catch(e){};}
196                function sbiFetchData(next_url,transientName,sbiSettings,$self){apiURLs=next_url;var urlCount=apiURLs.length,getType=sbiSettings.getType;if(urlCount==0){if(imagesArrCount+parseInt(sbiSettings.num)>=imagesArr.data.length){jQuery('#sbi_load .sbi_load_btn').hide()}}else{var returnedImages=[],numberOfRequests=urlCount;jQuery.each(apiURLs,function(index,entry){jQuery.ajax({method:"GET",url:entry,dataType:"jsonp",success:function(data){var sbiErrorResponse=data.meta.error_message,sbiErrorMsg='',sbiErrorDir='';if(typeof sbiErrorResponse!=='undefined'){if(sbiErrorResponse.indexOf('access_token')>-1){sbiErrorMsg+='Access Token is not valid or has expired';sbiErrorDir="There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page. If you continue to have an issue with your Access Token then please see this FAQ for more information https://smashballoon.com/my-instagram-access-token-keep-expiring/. "}else if(sbiErrorResponse.indexOf('user does not exist')>-1||sbiErrorResponse.indexOf('you cannot view this resource')>-1){sbiErrorMsg+='User IDs does not exist, is invalid, or private';sbiErrorDir="Please double check the Instagram User ID that you are using and ensure that it is valid and not from a private account. To find your User ID simply enter your Instagram user name into this tool https://smashballoon.com/instagram-feed/find-instagram-user-id/"}else if(sbiErrorResponse.indexOf('invalid media id')>-1){sbiErrorMsg+='Post Id does not exist or is invalid.';sbiErrorDir="Please double check the media (post) id is correct."}
197                        console.log('Instagram Feed Error:',sbiErrorMsg);console.log('Instagram Feed Directions:',sbiErrorDir);data='error'}
198                        if(getType=='coordinates')data.pagination={'previous_url':entry};if(data!=='error')returnedImages.push(data);numberOfRequests--;if(numberOfRequests==0&&photosAvailable!=='finished')sbiImagesReady(getType)}})});function sbiImagesReady(getType){var paginationArr=[],returnedImagesArr=[];jQuery.each(returnedImages,function(index,object){if(getType=='single'){object.data=[object.data]}
199                    if(typeof object.data!=='undefined'){jQuery.each(object.data,function(index,image){if(jQuery.inArray(image.id,photoIds)>-1){}else{photoIds.push(image.id);returnedImagesArr.push(image)}});if(getType=='coordinates'){var lastCreatedTime=object.data[object.data.length-1].created_time,existing_url=object.pagination.previous_url,existing_url_parts=existing_url.split('max_timestamp='),new_url=existing_url_parts[0]+'max_timestamp='+lastCreatedTime;paginationArr.push(new_url)}else{if(typeof object.pagination!=='undefined'&&typeof object.pagination.next_url!=='undefined')paginationArr.push(object.pagination.next_url)}}});if(sortby!=='random'){returnedImagesArr.sort(function(x,y){return y.created_time-x.created_time})}else{returnedImagesArr.sort(function(a,b){return(Math.round(Math.random())-0.5)});transientName+='!'}
200                    returnedImages[0].data=returnedImagesArr;if(typeof returnedImages[0].pagination!=='undefined'){returnedImages[0].pagination.next_url=paginationArr}else{returnedImages[0].pagination={"next_url":""}}
201                    var allImages=returnedImages[0];if(photosAvailable!=='finished')sbiBuildFeed(allImages,transientName,sbiSett
201ings,$self);apiRequests++}}}
202                function sbiGetCache(transientName,sbiSettings,$self,cacheWhat,apiURLs){var transientData=transientName;window.sbiCommentCacheStatus=0;if(typeof transientName==='object'){transientData=JSON.stringify(transientName)}
203                    var getCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'get_cache',transientName:transientData},success:function(data){data=decodeURI(data);data=data.replace(/\\'/g,"'");data=data.replace(/\\'/g,"'");var jsonobj=JSON.parse(data);if(cacheWhat=='all'){if(typeof jsonobj.header.error==='undefined'){sbiBuildHeader(jsonobj.header,sbiSettings)}
204                            if(typeof jsonobj.feed.error==='undefined'){if(photosAvailable!=='finished')sbiBuildFeed(jsonobj.feed,transientName,sbiSettings,$self)}else{feedOptions=JSON.parse($self[0].getAttribute('data-options'));var thisIndex=$self[0].getAttribute('data-sbi-index');feedOptions.feedIndex=thisIndex;if(window.sbiCacheStatuses[thisIndex].feed!==!1&&jsonobj.feed.error==='tryfetch'){window.sbiCacheStatuses[thisIndex].feed=!1;window.sbiCacheStatuses[thisIndex].comments='no';feedOptions.tryFetch=!0;if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined')sbiCreateFeed($self[0],feedOptions)}else if(window.sbiCacheStatuses[thisIndex].feed===!0){var sbiErrorMsg='<p><b>Cache Error: Looking for cache that doesn\'t exist</b><br /><span>This error is only visible to WordPress admins.</span>';var sbiErrorDir="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>')}}
205                            if(typeof jsonobj.comments.error==='undefined'){sb_instagram_js_options.sbiPageCommentCache=jsonobj.comments}}else{if(cacheWhat=='header'){sbiBuildHeader(jsonobj,sbiSettings)}else{if(photosAvailable!=='finished')sbiBuildFeed(jsonobj,transientName,sbiSettings,$self)}}},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(getCacheOpts)}}})}}
206    function sbiCachePhotos(images,transientName){var jsonstring=JSON.stringify(images);jsonstring=encodeURI(jsonstring);if(jsonstring.indexOf('%7B%22')===0){var setCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'cache_photos',photos:jsonstring,transientName:transientName},success:function(response){return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(setCacheOpts)}}
207    function sbi_cache_all(imagesArr,transientName){if(transientName.indexOf('header')&&typeof imagesArr.data.pagination==='undefined'){sbiCachePhotos(imagesArr,transientName)}else if(!transientName.indexOf('header')&&typeof imagesArr.data.pagination!=='undefined'){sbiCachePhotos(imagesArr,transientName)}}
208    jQuery(document).ready(function(){window.sbiCommentCacheStatus=0;sbi_init(function(imagesArr,transientName){sbi_cache_all(imagesArr,transientName)})})}
209}
210$(document).ready(function(){checkIfCorrectPage();});var isProductDetailPage=false;var tmEvents=new Array();var globalTicketSystemUrl="https://integrator.simpleviewinc.no/import/TicketSystemWrapper2/";var productListElements=null;var tmEventIdList="";var bookText=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.buytickets","Book now");var soldout=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.soldout","Sold out");var cancelled=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.cancelled","Cancelled");var ticketsavailable=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.ticketsavailable","Tickets available");function checkIfCorrectPage(){tmEventIdList="";isProductDetailPage=$(".productDetailOpening")[0];var isEventList=$("body").find("li.prodTypeEVEN")[0];if(!isEventList){isEventList=$("body").hasClass("whatsOn");}if(isProductDetailPage||isEventList){initListAndCallRealtimeApi();}}function initListAndCallRealtimeApi(){productListElements=null;productListElements=$("ol.productList > li");if(isProductDetailPage){handleProductDetailPage();}else{if(window.location.href.indexOf("daily=1")>-1){handleDayByDayList();}else{handleProductListPage();}}}function callWebServices(tmEventIdList,renderFunction){if(tmEventIdList!=null&&tmEventIdList!=""){if(tmEventIdList.length>0){var tmurl=globalTicketSystemUrl;var formData="channel=VisitTelemark&productkeylist="+tmEventIdList;tmEventIdList=null;console.log(tmurl);console.log(formData);$.ajax({type:"POST",url:tmurl,data:formData,crossDomain:true,success:renderFunction});}}}function handleProductDetailPage(){console.log("handleProductDetailPage");var prodKey=NewMind.Vars.Page.ProductKey;var openingTable=$(".productDetailOpening  table.dates");$.each(openingTable,function(key,value){var dateValue=$(value).find("span.date").text();if(dateValue){if(dateValue.length>0){dateValue=convertDateValueToStandardDate(dateValue);}}var fromTime=$(value).find("span.from").text();tmpId=prodKey+"_"+dateValue+"T"+fromTime;var elementToAppendAfter=$(value).find("span.to").parent();$(elementToAppendAfter).attr("ticketSystemRef",tmpId);tmEvents.push($(elementToAppendAfter));if(tmEventIdList!=""){tmEventIdList+=",";}tmEventIdList+=tmpId;});callWebServices(tmEventIdList,printResponseProductDetail);}function handleDayByDayList(){$.each(productListElements,function(key,value){var tmpId="";var prodKey=getProductKeyFromClassString($(value).attr("class"));var dateValue=$(value).find("span.datefrom").attr("content");
210if(dateValue==undefined){dateValue=convertDateValueToStandardDate($(value).find("span.datefrom").text());}var timeValueRaw=$(value).find("span.openingtimesummary").text();if(!timeValueRaw){return;}var timeValue=timeValueRaw.match(/(\d+:\d\d).*/);if(timeValue!=null&&timeValue!=""){if(timeValue.length<=1){return;}}else{return;}tmpId=prodKey+"_"+dateValue+"T"+timeValue[1];var elementToAppendAfter=$(value).find("span.ticketWidgetReference");elementToAppendAfter.attr("ticketWidgetRef",tmpId);tmEvents.push(elementToAppendAfter);if(tmEventIdList!=""){tmEventIdList+=",";}tmEventIdList+=tmpId;});callWebServices(tmEventIdList,printDayByDayResponse);}function handleProductListPage(){$.each(productListElements,function(key,value){var tmpId="";var prodKey=getProductKeyFromClassString($(value).attr("class"));var elementToAppendAfter=$(value).find("span.ticketWidgetReference");var ul=document.createElement("ul");var ticketEngineRef="";$.each($(value).find("dd.dates"),function(key,value2){var dv=$(value2).find("span.datefrom").text();var tv=$(value2).find("span.openingtimesummary").text();var tmpId=dv+"_"+tv;var dateValue=convertDateValueToStandardDate(dv);var timeValue=tv.match(/(\d+:\d\d).*/);if(timeValue!=null&&timeValue!=""){if(timeValue.length<=1){return;}}else{return;}tmpId=prodKey+"_"+dateValue+"T"+timeValue[1];$(value2).attr("ticketEngineWidgetLookup",tmpId);if(tmEventIdList!=""){tmEventIdList+=",";}tmEventIdList+=tmpId;var li=document.createElement("li");var at=document.createAttribute("ticketsystemref");at.value=tmpId;li.setAttributeNode(at);ul.appendChild(li);tmEvents.push(li);});elementToAppendAfter.attr("class","ticketWidgetReference"+prodKey);elementToAppendAfter.attr("ticketWidgetRef",prodKey);elementToAppendAfter.prepend(ul);});callWebServices(tmEventIdList,printResponseList);}function printDayByDayResponse(response){var responseArray=JSON.parse(response);var bookText=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.buytickets","Book now");var soldout=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.soldout","Sold out");var cancelled=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.cancelled","Cancelled");var ticketsavailable=NewMind.ETWP.GetResource("NewMind.env.lang.resources.searchresults.bookonline.realtime.ticketsavailable","Tickets available");for(var i=0;i<responseArray.events.length;i++){if(responseArray.events[i].guiid!=null){var isCanceled=responseArray.events[i].canceled;var isSoldOut=responseArray.events[i].sold_out;var span=document.createElement("span");if(isProductDetailPage){span=document.createElement("td");span.setAttribute("class","bookonlinedetailpage");}else{span.setAttribute("class","bookonlinelist");}var p=document.createElement("p");if(!(isSoldOut=="True"||isCanceled=="True")){p.setAttribute("class","ticketEngineTicketsAvailableText");p.innerHTML=ticketsavailable;span.appendChild(p);}p=document.createElement("p");if(isSoldOut=="True"||isCanceled=="True"){p.setAttribute("class","ticketEngineSoldout");}else{p.setAttribute("class","ticketEngineTicketsAvailable");}var guiid=clearGUIID(responseArray.events[i].guiid);if(isCanceled=="True"){var span=document.createElement("span");span.innerHTML=cancelled;p.appendChild(span);}else if(isSoldOut=="True"){var a=document.createElement("a");a.innerHTML=soldout;p.appendChild(a);}else if(responseArray.events[i].bookingurl!=""&&isSoldOut=="False"){console.log(responseArray.events[i].bookingurl);var a=document.createElement("a");a.setAttribute("href",responseArray.events[i].bookingurl);a.setAttribute("target","new" );var text=document.createTextNode(" ");text=document.createTextNode(bookText);a.appendChild(text);var iElement=document.createElement("i");iElement.setAttribute("class","right");a.appendChild(iElement);p.appendChild(a);}span.appendChild(p);var clearID=guiid;$.each(tmEvents,function(key,value){if(clearID===value.attr("ticketWidgetRef")){if($(value).next().attr("class")=="bookonline"){$(value).next().hide();}value.after(span);}});}}}function clearGUIID(guiid){return(guiid.substring(3));}function printResponseProductDetail(response){var responseArray=JSON.parse(response);for(var i=0;i<responseArray.events.length;i++){console.log(responseArray.events[i].guiid);if(responseArray.events[i].guiid!=null){var isCanceled=responseArray.events[i].canceled;var isSoldOut=responseArray.events[i].sold_out;var td=document.createElement("td");td.setAttribute("class","ticketEngineWrapper");var span=document.createElement("span");span.setAttribute("class","ticketEngine");var p=document.createElement("p");if(!(isSoldOut=="True"||isCanceled=="True")){p.setAttribute("class","ticketEngineTicketsAvailableText");p.innerHTML=ticketsavailable;span.appendChild(p);}p=document.createElement("p");if(isSoldOut=="True"||isCanceled=="True"){p.setAttribute("class","ticketEngineSoldout");}else{p.setAttribute("class","ticketEngineTicketsAvailable");}var guiid=clearGUIID(responseArray.events[i].guiid);if(isCanceled=="True"){var span=document.createElement("span");span.innerHTML=cancelled;p.appendChild(span);}else if(isSoldOut=="True"){var a=document.createElement("a");a.innerHTML=soldout;p.appendChild(a);}else if(responseArray.events[i].bookingurl!=""&&isSoldOut=="False"){var a=document.createElement("a");a.setAttribute("href",responseArray.events[i].bookingurl);a.setAttribute("target","new" );var text=document.createTextNode(" ");text=document.createTextNode(bookText);a.appendChild(text);var iElement=document.createElement("i");iElement.setAttribute("class","right");a.appendChild(iElement);p.appendChild(a);}span.appendChild(p);td.appendChild(span);var clearID=guiid;$.each(tmEvents,function(key,value){if(clearID===value.attr("ticketsystemref")){if($(value).next().attr("class")=="bookonline"){$(value).next().hide();}value.after(td);}});}}getFirstAvailableBookingLink();}function printResponseList(response){var responseArray=JSON.parse(response);var key="";var maps1=new Map();for(var i=0;i<responseArray.events.length;i++){if(responseArray.events[i].guiid!=null){var isSoldOut=responseArray.events[i].sold_out;var a=responseArray.events[i].guiid;a=a.substring(0,a.lastIndexOf("_"));var productKey=a.substring(a.lastIndexOf("_")+1);var selector=".p"+productKey+" a.ProductLink";var productLink=$("body").find(selector).attr("href")+"#productDetailOpeningTimes";if(responseArray.events[i].bookingurl!=""){productLink=responseArray.events[i].bookingurl;}maps1.set("ticketWidgetReference"+productKey,[isSoldOut,productLink]);if(maps1.get("ticketWidgetReference"+productKey)[0]=="False"){continue;}}}var iterator1=maps1.keys();var values=maps1.values();var k=iterator1.next().value;while(k!=null){var keyref=k;var isSoldOut=maps1.get(k)[0];var productLink=maps1.get(k)[1];var span=$("body").find("span ."+keyref);var p=document.createElement("p");if(!(isSoldOut=="True")){p.setAttribute("class","ticketEngineTicketsAvailable");console.log("productlink "+productLink);var a=document.createElement("a");a.setAttribute("href",productLink);if(productLink.indexOf("productDetailOpeningTimes")===-1){a.setAttribute("target","blank");}var text=document.createTextNode(" ");text=document.createTextNode(bookText);a.appendChild(text);var iElement=document.createElement("i");iElement.setAttribute("class","right");a.appendChild(iElement);p.appendChild(a);}$("body").find("."+keyref).prepend(p.outerHTML);p=document.createElement("p");if(!(isSoldOut=="True")){p.setAttribute("class","ticketEngineTicketsAvailableText");p.innerHTML=ticketsavailable;}else{p.setAttribute("class","ticketEngineSoldout");p.innerHTML=soldout;}$("body").find("."+keyref).prepend(p.outerHTML);if($("body").find("."+keyref).next().attr("class")=="bookonline"){$("body").find("."+keyref).next().hide();}k=iterator1.next().value;}}function convertDateValueToStandardDate(dateValue){dateValue=dateValue.toLowerCase();dateValue=dateValue.replace("  "," ");dateValue=dateValue.replace("(","").replace(")","");dateValue=dateValue.replace("jan","01").replace("feb","02").replace("mar","03").replace("apr","04").replace("may","05").replace("mai","05").replace("jun","06").replace("jul","07").replace("juli","07").replace("july","07").replace("aug","08").replace("sep","09").replace("sept","09").replace("oct","10").replace("okt","10").replace("nov","11").replace("dec","12").replace("des","12");dateValue=dateValue.replace("09t","09");dateValue=dateValue.replace("07y","07");dateValue=dateValue.replace("07i","07");var tmpValue=dateValue.split(" ");var returnValue=tmpValue[2];returnValue=returnValue+"-";if(tmpValue[1].length==1){returnValue=returnValue+"0";}returnValue=returnValue+tmpValue[1];returnValue=returnValue+"-";if(tmpValue[0].length==1){returnValue=returnValue+"0";}returnValue=returnValue+tmpValue[0];return(returnValue);}function getProductKeyFromClassString(strClass){var idMatch="";$.each(strClass.split(" "),function(key,value){var keyMatch=value.match(/p(\d+)/);if(keyMatch){idMatch=keyMatch[1];return false;}});return idMatch}function getFirstAvailableBookingLink(){var clone=$("p.ticketEngineTicketsAvailable:first").clone();clone.appendTo($("div.productDetailTop div.TopWrapper div.TopWrapperRight"));}
211function addClickListnerToAutoLanguageSelector(){$('#SkipContent .autoLanguageSelector ul li').not(".current").insertAfter('#SkipContent .autoLanguageSelector ul li.current');
211$("#SkipContent .autoLanguageSelector .current").click(function(){if($('#SkipContent .autoLanguageSelector ul li').not(".current").is(':visible')){$('#SkipContent .autoLanguageSelector ul li').not(".current").hide();}else{$('#SkipContent .autoLanguageSelector ul li').not(".current").show();}return false;});}$(document).ready(function(){addClickListnerToAutoLanguageSelector();});
212var isBicyleSite=$("body").hasClass("sykkel");console.log(isBicyleSite);function setSnapWidgetHeightWidth(){if(isBicyleSite){$('.snapwidget-widget').attr('height',"450").attr('width',"100%");}else{$('.snapwidget-widget').attr('height',$(".FacebookWidget").width()).attr('width',$(".FacebookWidget").width());}if(NewMind.Site.BreakPoints.IsSuperDesktopOnly()){if(isBicyleSite){$('.snapwidget-widget').attr('height',"800").attr('width',"1220");}else{$('.snapwidget-widget').attr('height','675').attr('width','675');}}if($(window).width()>769){$('.FacebookWidget .fb-page').attr('height',$(".snapWidget iframe").height());}if($(window).width()>769&&isBicyleSite){$('.snapwidget-widget').attr('height','650');}if(NewMind.Site.BreakPoints.IsSuperDesktopOnly()){if(isBicyleSite){$('.snapwidget-widget').attr('height',"800").attr('width',"1220");}}if($(window).width()<426&&isBicyleSite){$('.snapwidget-widget').attr('height','300');}if($(window).width()<376&&isBicyleSite){$('.snapwidget-widget').attr('height','255');}if($(window).width()<321&&isBicyleSite){$('.snapwidget-widget').attr('height','180');}}$(document).ready(function(){if($('div.telemarkSnapWidget').length>0){}else{setSnapWidgetHeightWidth();}});if($('div.telemarkSnapWidget').length>0){}else{$(window).resize(setSnapWidgetHeightWidth);}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.