function initDropDownMenus(){function mouseenter(){$(this).addClass("hovered")}function mouseleave(){$(this).removeClass("hovered")}var $submenus=$(".footer-menu .nav-1 > li.hasChildren"),config;$submenus.length!=0&&(config={sensitivity:2,interval:100,over:mouseenter,timeout:200,out:mouseleave},$submenus.hoverIntent(config))}function initSideMenu(){var wrapper=$(".side-menu"),triggers,lis;wrapper.length<1||($("li.hasChildren.selected").addClass("expanded").find("> a .js-side-menu-trigger",wrapper).text("-"),triggers=$(".js-side-menu-trigger",wrapper),lis=$(".nav-2 li.hasChildren",wrapper),triggers.click(function(e){e.preventDefault();e.stopPropagation();var $this=$(this),li=$this.closest(".hasChildren");li.hasClass("expanded")?(li.removeClass("expanded"),$this.text("+")):(lis.removeClass("expanded"),triggers.text("+"),li.addClass("expanded"),$this.text("-"))}))}function applyResizeHandler(){$(window).bind("debouncedResize");$(window).resize(function(){initBackToTop();$(window).trigger("debouncedResize")});$(window).on("debouncedResize",$.debounce(300,function(){})).resize()}function applyScrollHandler(){$(window).bind("debouncedScroll");$(window).scroll(function(){initBackToTop();$(window).trigger("debouncedScroll")});$(window).on("debouncedScroll",$.debounce(300,function(){})).scroll()}function initBackToTop(){var backToTop=$(".back-to-top");backToTop.length<1||($(window).scrollTop()>750?backToTop.fadeIn(200):backToTop.fadeOut(200),$(window).scrollTop()+$(window).height()>=$("body").height()-$(".footer-template-one").height()?backToTop.addClass("absolute"):backToTop.removeClass("absolute"),backToTop.css({right:($(window).width()-$(".center-container").width())/2-70}))}function initNewsList(){var triggers=$(".js-news-trigger"),newsboxes;triggers.length<1||(newsboxes=$(".news-box"),triggers.click(function(){var $this=$(this),newsBox=$this.closest(".news-box");newsBox.hasClass("js-open")?newsBox.get(0).close():newsBox.get(0).open()}),$.each(newsboxes,function(i,newsbox){newsbox.open=function(){var $newsbox=$(newsbox);$.each(newsboxes,function(ii,item){item.close();$newsbox.addClass("js-open");$(".description",$newsbox).css({height:"auto"});$(".body-container",$newsbox).show();$(".js-news-trigger",$newsbox).text("-")})};newsbox.close=function(){var $newsbox=$(newsbox);$newsbox.hasClass("js-open")&&($newsbox.removeClass("js-open"),$(".description",$newsbox).css({height:"40px"}),$(".body-container",$newsbox).hide(),$(".js-news-trigger",$newsbox).text("+"))}}),newsboxes.get(0).open())}function initRecipeList(){var list=$(".recipe-list");list.length<1||list.owlCarousel({items:3,itemsDesktop:[1199,3],itemsDesktopSmall:[979,3],itemsTablet:[768,3],itemsMobile:[768,3],pagination:!0,navigation:!0,responsiveRefreshRate:100})}function initSearchList(){var list=$(".search-article-list");list.length<1||list.owlCarousel({items:4,itemsDesktop:[1199,4],itemsDesktopSmall:[979,4],itemsTablet:[768,4],itemsMobile:[768,4],pagination:!0,navigation:!0,responsiveRefreshRate:100})}function UpdateQueryString(key,value,url){var re,separator,hash;return url||(url=window.location.href),re=new RegExp("([?|&])"+key+"=.*?(&|#|$)","gi"),url.match(re)?value?url.replace(re,"$1"+key+"="+value+"$2"):url.replace(re,"$2"):value?(separator=url.indexOf("?")!==-1?"&":"?",hash=url.split("#"),url=hash[0]+separator+key+"="+value,hash[1]&&(url+="#"+hash[1]),url):url}function getQueryStringValueByName(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS),results=regex.exec(window.location.search);return results==null?"":decodeURIComponent(results[1].replace(/\+/g," "))}function removeValueFromCommaSeparatedString(list,value,separator){var values,i;for(separator=separator||",",values=list.split(separator),i=0;i57)&&event.preventDefault():(event.keyCode<96||event.keyCode>105)&&event.preventDefault())}function preventSpecialCharacter(e){var shiftPressed=e.shiftKey,keyCode=e.keyCode;shiftPressed?(keyCode==188||keyCode==190||keyCode==51||keyCode==55||keyCode==53||keyCode==219||keyCode==221)&&e.preventDefault():(keyCode==191||keyCode==219||keyCode==221||keyCode==111)&&e.preventDefault()}function phoneGROnly(event){numbersOnly(event);$(event.currentTarget).val().length>9&&(event.keyCode==46||event.keyCode==8||event.keyCode==36||event.keyCode==35||event.keyCode==37||event.keyCode==39||event.keyCode==9||event.preventDefault())}function initNewsListFancy(){$(".fancybox-gallery").length>0&&$(".fancybox-button").fancybox({prevEffect:"none",nextEffect:"none",closeBtn:!0,arrows:!1,padding:0,helpers:{title:{type:"inside"},buttons:{}},tpl:{wrap:'
<\/div><\/div><\/div><\/div>'}})}function handleEspaBanner(){function setCookie(cname,cvalue){var d=new Date,expires;d.setTime(d.getTime()+864e5);expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";"}function getCookie(cname){for(var name=cname+"=",decodedCookie=decodeURIComponent(document.cookie),ca=decodedCookie.split(";"),c,i=0;i>>0,len===0)||(n=0,arguments.length>0&&(n=Number(arguments[1]),n!==n?n=0:n!==0&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len))return-1;for(k=n>=0?n:Math.max(len-Math.abs(n),0);k'+option+"<\/a><\/li>").data({key:key,selected:$(item).is(":selected")}))}function newUlPos(){var containerPosY=$containerDiv.offset().top,docHeight=$(window).height(),scrollTop=$(window).scrollTop();newUlHeight>parseInt(opts.ddMaxHeight)&&(newUlHeight=parseInt(opts.ddMaxHeight));containerPosY=containerPosY-scrollTop;containerPosY+newUlHeight>=docHeight?($newUl.css({height:newUlHeight}),$containerDivWrapper.css({top:"-"+newUlHeight+"px",height:newUlHeight}),$input.onTop=!0):($newUl.css({height:newUlHeight}),$containerDivWrapper.css({top:containerHeight+"px",height:newUlHeight}),$input.onTop=!1)}function positionFix(){$containerDiv.css("position","relative")}function positionHideFix(){$containerDiv.css({position:"static"})}function closeDropDown(fireChange,resetText){fireChange==!0&&(prevIndex=currentIndex,$input.change());resetText==!0&&(currentIndex=prevIndex,navigateList(currentIndex));$containerDivWrapper.hide();positionHideFix()}function navigateList(currentIndex,fireChange){if(currentIndex==-1)$containerDivText.text(opts.defaultText),$newLi.removeClass("hiLite");else{$newLi.removeClass("hiLite").eq(currentIndex).addClass("hiLite");var text=$newLi.eq(currentIndex).text(),val=$newLi.eq(currentIndex).parent().data("key");try{$input.val(val)}catch(ex){$input[0].selectedIndex=currentIndex}if($containerDivText.text(text),fireChange==!0&&(prevIndex=currentIndex,$input.change()),$containerDivWrapper.is(":visible"))try{$newLi.eq(currentIndex).focus()}catch(ex){}}}function keyPress(element){$(element).unbind("keydown.sSelect").bind("keydown.sSelect",function(e){var keycode=e.which,currentKeyIndex;prevented=!0;switch(keycode){case 40:case 39:return incrementList(),!1;case 38:case 37:return decrementList(),!1;case 33:case 36:return gotoFirst(),!1;case 34:case 35:return gotoLast(),!1;case 13:case 27:return closeDropDown(!0),!1;case 9:return closeDropDown(!0),nextFormElement(),!1}return keyPressed=String.fromCharCode(keycode).toLowerCase(),currentKeyIndex=keys.indexOf(keyPressed),typeof currentKeyIndex!="undefined"?(++currentIndex,currentIndex=keys.indexOf(keyPressed,currentIndex),(currentIndex==-1||currentIndex==null||prevKey!=keyPressed)&&(currentIndex=keys.indexOf(keyPressed)),navigateList(currentIndex),prevKey=keyPressed,!1):void 0})}function incrementList(){currentIndex0&&(--currentIndex,navigateList(currentIndex))}function gotoFirst(){currentIndex=0;navigateList(currentIndex)}function gotoLast(){currentIndex=newLiLength-1;navigateList(currentIndex)}function nextFormElement(){var fields=$("body").find("button,input,textarea,select"),index=fields.index($input);return index>-1&&index+1<\/div>'),$containerDiv=$('
<\/div>'),$containerDivWrapper=$('