﻿(function($,window,undefined){function CaptionJS(element,options)
{this.main=$(element);var $this=this;this.settings=$.extend({},$.fn.captionjs.defaults,options||{});this.$caption=undefined;this.$figure=undefined;this.$figcaption=undefined;this.target_width=undefined;this.target_height=undefined;this.loadJSON();}
CaptionJS.prototype={loadJSON:function()
{var $this=this,mediaID=this.main.attr('src'),lang=$('html').attr('lang'),url=this.settings.ajaxURL+'?culture='+lang+'&path='+mediaID;$.jsonp({url:url,context:$this,callback:'jsonCallback',success:$this._loaded,error:$this._error});},_error:function(jqXHR,textStatus,errorThrown)
{if(this.settings.debug_mode)console.log("Error JSON : "+jqXHR+" | "+textStatus+" | "+errorThrown);},_loaded:function(data)
{var o=data[0];var oTitle="";var oDescription="";if(o!==undefined)
{oTitle=o.title;oDescription=o.desc;if(this.settings.debug_mode)
console.log("title : "+this.main.htmlEncode(o.title)+"     desc : "+this.main.htmlEncode(o.desc));}
this._initElements(this.main.htmlEncode(oTitle),this.main.htmlEncode(oDescription));},_initElements:function(title,desc)
{var txt=(title.length==0)?"":"<strong>"+title+"</strong>";txt+=(desc.length==0)?"":desc;this.main.attr('rev',txt);if(this.main.parent().attr('target')=="_lightbox")_setlightbox_figcaption();if(txt.length!=0)
{this.$caption=txt;this.$figure=this.main.wrap('<figure class="'+this.settings.class_name+'"/>').after('<figcaption/>').parent();this.$figcaption=this.main.next('figcaption').html(this.$caption);this._buildElements();}
else
{if(this.settings.debug_mode)console.log("NO DATAS available");}},_buildElements:function()
{if(this.$caption==='')this.$figcaption.remove();if(this.settings.debug_mode)console.log('caption.js | Caption: '+this.$caption);this.$figure.attr('aria-haspopup','true');if(this.settings.force_dimensions)
{if(this.settings.debug_mode)console.log('caption.js | Forcing dimensions with a clone.');var $clone=this.$figure.clone().css({'position':'absolute','left':'-9999px'}).appendTo('body');this.target_width=$('img',$clone).outerWidth(),this.target_height=$('figcaption',$clone);$clone.remove();}
else
{this.target_width=this.main.outerWidth();this.target_height=this.$figcaption.outerHeight();}
var imgFloat=this.main.css('float');if(imgFloat=="left")
{this.$figure.addClass('float-left');this.main.css('float','none');}
else if(imgFloat=="right")
{this.$figure.addClass('float-right');this.main.css('float','none');}
else
{this.$figure.addClass('float-left');this.main.css('float','none');}
var dBlock=this.main.css('display');if(dBlock=="block")
{this.$figure.wrap("<p class='figCaption-center'></p>");}
if(this.settings.schema===true)
{this.$figure.attr({'itemscope':'itemscope','itemtype':'http://schema.org/Photograph'});this.$figcaption.attr('itemprop','name');this.main.attr('itemprop','image');}
if(this.settings.mode==='stacked')
{this.$figure.addClass('stacked');this.$figcaption.css({'margin-bottom':'0','bottom':'0',});}
if(this.settings.mode==='animated')
{this.$figure.addClass('animated');this.$figcaption.css({'margin-bottom':'0','bottom':-this.target_height,});}
if(this.settings.mode==='hidy')
{this.$figure.addClass('hidy');}}};$.fn.captionjs=function(opts){return this.each(function(){var captionjs=new CaptionJS($(this),opts);$(this).data("captionjs",captionjs);});};$.fn.captionjs.settings={};$.fn.captionjs.defaults={'ajaxURL':'/Umbraco/Api/ImageCaption/Description','mode':'hidy','debug_mode':false,'force_dimensions':false,'class_name':'captionjs','schema':false};$.fn.htmlEncode=function(value)
{return(value)?$('<div/>').text(value).html():'';};function noop(){}
function genericCallback(data){lastValue=[data];}
function callIfDefined(method,object,parameters){return method&&method.apply(object.context||object,parameters);}
function qMarkOrAmp(url){var patt=new RegExp("/\?/");return patt.test(url)?"&":"?";}
var
STR_ASYNC="async",STR_CHARSET="charset",STR_EMPTY="",STR_ERROR="error",STR_INSERT_BEFORE="insertBefore",STR_JQUERY_JSONP="_jqjsp",STR_ON="on",STR_ON_CLICK=STR_ON+"click",STR_ON_ERROR=STR_ON+STR_ERROR,STR_ON_LOAD=STR_ON+"load",STR_ON_READY_STATE_CHANGE=STR_ON+"readystatechange",STR_READY_STATE="readyState",STR_REMOVE_CHILD="removeChild",STR_SCRIPT_TAG="<script>",STR_SUCCESS="success",STR_TIMEOUT="timeout",win=window,Deferred=$.Deferred,head=$("head")[0]||document.documentElement,pageCache={},count=0,lastValue,xOptionsDefaults={callback:STR_JQUERY_JSONP,url:location.href},opera=win.opera,oldIE=!!$("<div>").html("<!--[if IE]><i><![endif]-->").find("i").length;function jsonp(xOptions){xOptions=$.extend({},xOptionsDefaults,xOptions);var successCallback=xOptions.success,errorCallback=xOptions.error,completeCallback=xOptions.complete,dataFilter=xOptions.dataFilter,callbackParameter=xOptions.callbackParameter,successCallbackName=xOptions.callback,cacheFlag=xOptions.cache,pageCacheFlag=xOptions.pageCache,charset=xOptions.charset,url=xOptions.url,data=xOptions.data,timeout=xOptions.timeout,pageCached,done=0,cleanUp=noop,supportOnload,supportOnreadystatechange,firstChild,script,scriptAfter,timeoutTimer;Deferred&&Deferred(function(defer){defer.done(successCallback).fail(errorCallback);successCallback=defer.resolve;errorCallback=defer.reject;}).promise(xOptions);xOptions.abort=function(){!(done++)&&cleanUp();};if(callIfDefined(xOptions.beforeSend,xOptions,[xOptions])===!1||done){return xOptions;}
url=url||STR_EMPTY;data=data?((typeof data)=="string"?data:$.param(data,xOptions.traditional)):STR_EMPTY;url+=data?(qMarkOrAmp(url)+data):STR_EMPTY;callbackParameter&&(url+=qMarkOrAmp(url)+encodeURIComponent(callbackParameter)+"=?");!cacheFlag&&!pageCacheFlag&&(url+=qMarkOrAmp(url)+"_"+(new Date()).getTime()+"=");url=url.replace(/=\?(&|$)/,"="+successCallbackName+"$1");function notifySuccess(json){if(!(done++)){cleanUp();pageCacheFlag&&(pageCache[url]={s:[json]});dataFilter&&(json=dataFilter.apply(xOptions,[json]));callIfDefined(successCallback,xOptions,[json,STR_SUCCESS,xOptions]);callIfDefined(completeCallback,xOptions,[xOptions,STR_SUCCESS]);}}
function notifyError(type){if(!(done++)){cleanUp();pageCacheFlag&&type!=STR_TIMEOUT&&(pageCache[url]=type);callIfDefined(errorCallback,xOptions,[xOptions,type]);callIfDefined(completeCallback,xOptions,[xOptions,type]);}}
if(pageCacheFlag&&(pageCached=pageCache[url])){pageCached.s?notifySuccess(pageCached.s[0]):notifyError(pageCached);}else{win[successCallbackName]=genericCallback;script=$(STR_SCRIPT_TAG)[0];script.id=STR_JQUERY_JSONP+count++;if(charset){script[STR_CHARSET]=charset;}
opera&&opera.version()<11.60?((scriptAfter=$(STR_SCRIPT_TAG)[0]).text="document.getElementById('"+script.id+"')."+STR_ON_ERROR+"()"):(script[STR_ASYNC]=STR_ASYNC);if(oldIE){script.htmlFor=script.id;script.event=STR_ON_CLICK;}
script[STR_ON_LOAD]=script[STR_ON_ERROR]=script[STR_ON_READY_STATE_CHANGE]=function(result){if(!script[STR_READY_STATE]||!/i/.test(script[STR_READY_STATE])){try{script[STR_ON_CLICK]&&script[STR_ON_CLICK]();}catch(_){}
result=lastValue;lastValue=0;result?notifySuccess(result[0]):notifyError(STR_ERROR);}};script.src=url;cleanUp=function(i){timeoutTimer&&clearTimeout(timeoutTimer);script[STR_ON_READY_STATE_CHANGE]=script[STR_ON_LOAD]=script[STR_ON_ERROR]=null;head[STR_REMOVE_CHILD](script);scriptAfter&&head[STR_REMOVE_CHILD](scriptAfter);};head[STR_INSERT_BEFORE](script,(firstChild=head.firstChild));scriptAfter&&head[STR_INSERT_BEFORE](scriptAfter,firstChild);timeoutTimer=timeout>0&&setTimeout(function(){notifyError(STR_TIMEOUT);},timeout);}
return xOptions;}
jsonp.setup=function(xOptions){$.extend(xOptionsDefaults,xOptions);};$.jsonp=jsonp;})(jQuery,window);(function($){$(document).ready(function()
{$('img.captionjs').captionjs({'ajaxURL':'/Umbraco/Api/ImageCaption/Description'});});})(jQuery);
;;;_LightboxPopupData=[];(function($){$(document).ready(function(){var $eLightbox=$("a.grouped_elements"),$imgHasCaption=false;$eLightbox.each(function(index)
{$(this).attr('data-src',$(this).attr('href'));if(!$imgHasCaption)$imgHasCaption=$(this).find('img').hasClass("captionjs");});if(!$imgHasCaption)_setlightbox_figcaption();});})(jQuery);function _setlightbox_figcaption()
{_LightboxPopupData=[];var $eLightbox=$("a.grouped_elements"),$lightboxPopupslider=$('.WP-popupslider'),$lightboxPopup=$lightboxPopupslider.data('popupslider');$eLightbox.off('click');$eLightbox.each(function(index)
{var rev=$(this).find('img').attr('rev');if(rev==undefined)rev="";_LightboxPopupData.push({type:'img',src:$(this).attr('data-src'),desc:rev});var i=index+1;$(this).attr('href','javascript:void(0)').attr('data-num',i-1);});$eLightbox.on('click',function()
{if($lightboxPopupslider.length!=0&&$lightboxPopup!=undefined)$lightboxPopup.addSlider(_LightboxPopupData,parseInt($(this).attr('data-num'))+1);return false;});}
;;;function show_WP_popupSearch()
{var o=$('.WP-popupSearch');if(o.length!=0)
{o.addClass('show');if($('html').hasClass('no-iOS'))
{setTimeout(function(){o.find("input[type='text']").focus();},100);}
$('.bodyScreen').addClass('has-a-popup');}}
function unshow_WP_popupSearch()
{var o=$('.WP-popupSearch');if(o.length!=0)o.removeClass('show');$('.bodyScreen').removeClass('has-a-popup');}
;;;$(function(){var alertZone=$('.alert-newsletter');var form=$('#WG-newsletter-form');var button=$('#WG-newsletter-submit');var email=$('#newsletterEmail');var culture=$('#newsletterCulture');var listId=$('#mailChimpListId');form.submit(function(){button.trigger('click');return false;});button.click(function(){var newsLetterEmail=email.val();var newsLetterCulture=culture.val();var newsLetterListId=listId.val();alertZone.hide();$.ajax({type:'POST',url:form.attr('action'),data:{culture:newsLetterCulture,email:newsLetterEmail,mailChimpListId:newsLetterListId}}).done(function(jsonResponse){if(jsonResponse.success){alertZone.removeClass('alert-danger');alertZone.addClass('alert-success');alertZone.html(jsonResponse.message);email.val("");alertZone.show();}
else{alertZone.addClass('alert-danger');alertZone.html(jsonResponse.message);alertZone.show();}}).fail(function(jqXHR,textStatus){alertZone.addClass('alert-danger');alertZone.html(textStatus);alertZone.show();});return false;});});
;;;(function(){if(window.google&&google.gears){return;}
var factory=null;if(typeof GearsFactory!='undefined'){factory=new GearsFactory();}else{try{factory=new ActiveXObject('Gears.Factory');if(factory.getBuildInfo().indexOf('ie_mobile')!=-1){factory.privateSetGlobalObject(this);}}catch(e){if((typeof navigator.mimeTypes!='undefined')&&navigator.mimeTypes["application/x-googlegears"]){factory=document.createElement("object");factory.style.display="none";factory.width=0;factory.height=0;factory.type="application/x-googlegears";document.documentElement.appendChild(factory);if(factory&&(typeof factory.create=='undefined')){factory=null;}}}}
if(!factory){return;}
if(!window.google){google={};}
if(!google.gears){google.gears={factory:factory};}})();
;;;var PowerHour={getPrintUrl:function(addresses,travelmode,lang)
{if(window.travelmode===undefined)travelmode='G_TRAVEL_MODE_DRIVING';if(lang==undefined)lang=(window.lang===undefined)?'en':window.lang;var url="http://maps.google.com/maps?f=d&source=s_d";for(i=0;i<addresses.length;i++)
{if(i==0)
{url+="&saddr=";}
else if(i==1)
{url+="&daddr=";}
url+=addresses[i].replace(' ','+');if(i!=addresses.length-1&&i!=0)
{url+="+to:";}}
url+="&ie=UTF8&z=10&pw=2&hl="+lang;if(travelmode=='G_TRAVEL_MODE_WALKING')
url+="&dirflg=w";return url;}};
;;;function KalouGeoMap(idName,latLngPoint,textInfobul,textInput,skin)
{this.WIDGETid=idName;this.WIDGET;this.$ID;this.attr_dataWidth="";var _lang='en';var _textInput="Direction: enter your departure address";var _defaultLatLng=new google.maps.LatLng(46.5199617,6.6335971);var _errorGeoMSG={fail:"<h2>Sorry</h2>Geolocation service failed.<br/><br/>Please try to enter an address into the provided field",unsupported:"<h2>Sorry</h2>Your browser doesn't support geolocation.<br/>Maybe it is too old (example: the geolocation is supported on Internet Explorer from version 9).<br/><br/>We recommend to update your browser, or install one of the followings:<br/>     - <a href='http://windows.microsoft.com/en-US/internet-explorer/downloads/ie' target='_blank'>Internet Explorer</a><br/>     - <a href='http://www.google.com/chrome' target='_blank'>Chrome</a><br/>     - <a href='http://www.mozilla.org' target='_blank'>Firefox</a>",unsuccessful:"<h2>Sorry</h2>The search for your location failed for the following reason:"}
var _folderImg="/Site/Skins/"+((skin==""||typeof(skin)==="undefined")?"Default":skin)+"/Widgets/GoogleMap/Img/";this.latLngPoint=latLngPoint;this.LatLng;var _markerIcon=_folderImg+'marker-icon.png';this.marker;this.infowindow=new google.maps.InfoWindow();this.textInfobul=(textInfobul==undefined)?"":textInfobul;this.markerLocate;var _markerLocateIcon=_folderImg+'gemarker-icon.png';this.geoLocation;var _browserSupportFlag=new Boolean();this.map;this.panorama;var _zoom=16;var _googleMapOPTIONS;this.dirService=new google.maps.DirectionsService();this.dirDisplay;this.geocoder=new google.maps.Geocoder();this.POPUP;this.btnClosePopup;if(typeof KalouGeoMap.initialized=="undefined")
{KalouGeoMap.prototype.init=function(lang)
{if(!this.isUndefined(lang))language(lang);this.WIDGET=$('#'+this.WIDGETid);this.$ID=this.WIDGET.find('.wGooMap');if($('.WG-googlemap-popup').length==0)
{$('body').append('<div class="WG-googlemap-popup"><div class="popup-wrapper"></div></div> ');}
this.POPUP=$('.WG-googlemap-popup');this.initDataWidth();this.initAddress();}
KalouGeoMap.prototype.textInput=function(msg)
{_textInput=msg;this.setInputText(false);}
KalouGeoMap.prototype.language=function(lang)
{_lang=lang.toLowerCase();}
KalouGeoMap.prototype.zoom=function(zoom)
{_zoom=zoom;}
KalouGeoMap.prototype.errorMSGtranslation=function(o)
{_errorGeoMSG=o;}
KalouGeoMap.prototype.skin=function(skin)
{_folderImg="/Site/Skins/"+((skin==""||typeof(skin)==="undefined")?"Default":skin)+"/Widgets/GoogleMap/Img/";_markerIcon=_folderImg+'marker-icon.png';_markerLocateIcon=_folderImg+'gemarker-icon.png';}
KalouGeoMap.prototype.initDataWidth=function()
{this.attr_dataWidth=this.WIDGET.attr('data-width');this.changeDataWidth(false);}
KalouGeoMap.prototype.changeDataWidth=function(b)
{if(this.attr_dataWidth!=undefined)
{this.WIDGET.css('width',(!b)?this.attr_dataWidth:'100%');}}
KalouGeoMap.prototype.initAddress=function()
{if(this.isUndefined(this.latLngPoint.lat)||this.isUndefined(this.latLngPoint.lng))
{if(this.isUndefined(this.latLngPoint.address)||this.latLngPoint.address=="")
{this.initLatlng(_defaultLatLng.lat(),_defaultLatLng.lng());}
else
{var t=this;this.geocoder.geocode({'address':this.latLngPoint.address},function(results,status)
{if(status==google.maps.GeocoderStatus.OK)
{var o=results[0].geometry.location;t.initLatlng(o.lat(),o.lng());}
else
{t.initLatlng(_defaultLatLng.lat(),_defaultLatLng.lng());}});}}
else
{this.initLatlng(this.latLngPoint.lat,this.latLngPoint.lng);}}
KalouGeoMap.prototype.initLatlng=function(lat,lng)
{this.LatLng=new google.maps.LatLng(lat,lng);this.addMap();}
KalouGeoMap.prototype.addMap=function()
{_googleMapOPTIONS={small:{zoom:_zoom,maxZoom:18,minZoom:5,center:this.LatLng,mapTypeControl:false,streetViewControl:false,zoomControl:false,zoomControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM},mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:false,draggable:false,panControl:false},large:{mapTypeControl:true,zoomControl:true,zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE,position:google.maps.ControlPosition.LEFT_BOTTOM},streetViewControl:true,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM},scrollwheel:true,draggable:true,panControl:true}};this.dirDisplay=new google.maps.DirectionsRenderer({suppressMarkers:true});this.map=new google.maps.Map($('.displayMap',this.$ID).get(0),_googleMapOPTIONS.small);this.changeMapStyle();this.marker=new google.maps.Marker({map:this.map,icon:_markerIcon,position:this.LatLng,draggable:false,animation:google.maps.Animation.DROP});this.addMarkerListener();this.addControls();this.initStreetview();this.setResize(true);this.infowindow.close();}
KalouGeoMap.prototype.setResize=function(bol)
{if(bol)
{var $this=this;$(window).resize(function()
{google.maps.event.trigger($this.map,'resize');$this.map.setCenter($this.LatLng);});}}
KalouGeoMap.prototype.initStreetview=function()
{this.panorama=this.map.getStreetView();this.panorama.setPosition(this.LatLng);this.panorama.setPov({heading:265,zoom:1,pitch:0});}
KalouGeoMap.prototype.toggleStreetView=function()
{var toggle=_panorama.getVisible();this.panorama.setVisible(!toggle);}
KalouGeoMap.prototype.addMarkerListener=function()
{var t=this;google.maps.event.addListener(this.marker,'click',function()
{t.onClickMarker();});}
KalouGeoMap.prototype.onClickMarker=function()
{if($('html').hasClass('mobile'))
{var url=String((this.latLngPoint.address!=""&&this.latLngPoint.address!=undefined)?this.latLngPoint.address:(this.latLngPoint.lat+","+this.latLngPoint.lng)).replace(/ /g,"+"),os='';if($('html').hasClass('iOS'))
{os='maps:q='+url;}
else if($('html').hasClass('android'))
{os='geo:0,0?q='+url;}
else if($('html').hasClass('windowsPhone'))
{os=(this.latLngPoint.address!="")?'maps:'+url:'';}
else
{os='';}
(os!='')?window.open(os,"_self"):this.showPopup();}
else
{this.showPopup();}}
KalouGeoMap.prototype.showPopup=function()
{this.POPUP.addClass('show');this.$ID.appendTo(this.POPUP.find('.popup-wrapper'));google.maps.event.trigger(this.map,'resize');this.map.setCenter(this.LatLng);this.map.setOptions(_googleMapOPTIONS.large);$('.bodyScreen').addClass('has-a-popup');this.setInputText(false);var $this=this;this.POPUP.find('.btn-close-popup').on('click',function()
{$this.unShowPopup();});}
KalouGeoMap.prototype.unShowPopup=function()
{this.infowindow.close();this.$ID.insertBefore(this.WIDGET.find('.desc'));google.maps.event.trigger(this.map,'resize');this.map.setCenter(this.LatLng);this.map.setOptions(_googleMapOPTIONS.small);this.POPUP.removeClass('show');$('.bodyScreen').removeClass('has-a-popup');this.POPUP.removeClass('show');$('.TF_from',this.$ID).val("");this.changeAddress();this.setInputText(false);}
KalouGeoMap.prototype.markerCLICK=function(m)
{this.map.setCenter(m.position);}
KalouGeoMap.prototype.animateMarker=function(b,marker)
{marker.setAnimation((b)?google.maps.Animation.BOUNCE:null);}
KalouGeoMap.prototype.addInfobullMSG=function(msg)
{if(msg!=undefined)
{this.infowindow.setContent((!this.isUndefined(msg))?((typeof msg=="object")?msg.html():msg):this.textInfobul);this.infowindow.open(this.map,this.marker);this.markerCLICK(this.marker);}}
KalouGeoMap.prototype.changeMapStyle=function()
{var hueColor='#e7bb05';waterColor='#a3dfe5',parkColor='#6fdd9e',landscapeColor='#f9f9f9';terrainColor='#f2efef';var featureOpts=[{"featureType":"all","elementType":"all","stylers":[{"invert_lightness":true},{"saturation":0},{"lightness":30},{"gamma":0.5},{"hue":"#435158"}]},{"featureType":"water","stylers":[{"color":"#037cb8"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"color":"#002639"}]},{"featureType":"poi.park","stylers":[{"color":"#699462"}]},{"featureType":"poi.park","elementType":"labels.text.stroke","stylers":[{"color":"#203c1b"}]},{"featureType":"poi.medical","stylers":[{"color":"#3d5562"}]},{"featureType":"poi.medical","elementType":"labels.text.fill","stylers":[{"color":"#79909d"}]},{"featureType":"poi.medical","elementType":"labels.text.stroke","stylers":[{"color":"#23323a"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#b3a683"},{"lightness":"0"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.highway","elementType":"labels.text.stroke","stylers":[{"color":"#685f45"}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#6c6551"}]},{"featureType":"road.arterial","elementType":"labels.text.fill","stylers":[{"color":"#e0dbce"}]},{"featureType":"road.arterial","elementType":"labels.text.stroke","stylers":[{"color":"#333027"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#708692"}]}];this.map.setOptions({styles:featureOpts});}
KalouGeoMap.prototype.addControls=function()
{var t=this;$('.btn-print',this.$ID).on("click",function()
{var a=[t.LatLng.lat().toString()+","+t.LatLng.lng().toString()];var gl=t.geoLocation;if(!t.isUndefined(gl))a.push(gl.lat().toString()+","+gl.lng().toString());window.open(PowerHour.getPrintUrl(a,'G_TRAVEL_MODE_DRIVING',_lang),'_blank');});$('.btn-locate',this.$ID).on("click",function()
{t.setGeolocation();});$('.TF_from',this.$ID).keypress(function(e)
{var key=e.keyCode||e.which;if(key==13)
{t.changeAddress();return false;}});$('.TF_from',this.$ID).focus(function()
{t.setInputText(true);});$('.TF_from',this.$ID).focusout(function()
{t.setInputText(false);});$('.btn-search-address',this.$ID).click(function()
{t.changeAddress();});}
KalouGeoMap.prototype.setInputText=function(b)
{var o=$('.TF_from',this.$ID),t=_textInput,e="";if(o.val()==(b?t:e))o.val(b?e:t);}
KalouGeoMap.prototype.setGeolocation=function(){var t=this;if(navigator.geolocation)
{_browserSupportFlag=true;navigator.geolocation.getCurrentPosition(function(pos){t.addGeolocation(pos.coords.latitude,pos.coords.longitude);},function(){t.noGeolocation(_browserSupportFlag);});}
else if(google.gears)
{_browserSupportFlag=true;var geo=google.gears.factory.create('beta.geolocation');geo.getCurrentPosition(function(pos){t.addGeolocation(pos.coords.latitude,pos.coords.longitude);},function(){t.noGeolocation(_browserSupportFlag);});}
else
{_browserSupportFlag=false;t.noGeolocation(_browserSupportFlag);}}
KalouGeoMap.prototype.resetGeolocation=function()
{this.setChangeMapWidth(false);this.removeGelocateMarker();this.updateMarkerAddress('');}
KalouGeoMap.prototype.setChangeMapWidth=function(b)
{$('.directionsPanel',this.$ID).css('cssText',b?'overflow-y:scroll;*overflow:scroll; display:block;':'overflow:hidden; display:none;');}
KalouGeoMap.prototype.addGeolocation=function(lat,lng)
{this.removeGelocateMarker();this.geoLocation=new google.maps.LatLng(lat,lng);this.map.setCenter(this.geoLocation);this.addNewGeoMarker();this.setUpdateAdress(this.geoLocation);this.updateMarkerAddress(this.getAddressByLatlng(this.geoLocation));this.setChangeMapWidth(true);}
KalouGeoMap.prototype.addGeoMarkerListeners=function()
{var t=this;var marker=this.markerLocate;google.maps.event.addListener(marker,'dragstart',function()
{t.updateMarkerAddress('Dragging...');});google.maps.event.addListener(marker,'dragend',function()
{var o=marker.getPosition();t.geoLocation=new google.maps.LatLng(o.lat(),o.lng());t.setUpdateAdress(o);t.addNewDirection();});}
KalouGeoMap.prototype.addNewGeoMarker=function()
{this.markerLocate=new google.maps.Marker({map:this.map,icon:_markerLocateIcon,position:this.geoLocation,draggable:true,animation:google.maps.Animation.DROP,cursor:"move"});this.addGeoMarkerListeners();this.$ID.addClass("addLocation");}
KalouGeoMap.prototype.changeAddress=function()
{this.infowindow.close();var st=$('.TF_from',this.$ID).val();var b=(st!=""&&st!=_textInput);(b)?this.setAddress(st):this.removeDirection();this.setChangeMapWidth(b);}
KalouGeoMap.prototype.removeGelocateMarker=function()
{if(!this.isUndefined(this.markerLocate))
{this.markerLocate.setMap(null);this.markerLocate=undefined;this.$ID.removeClass("addLocation");}}
KalouGeoMap.prototype.updateMarkerAddress=function(str)
{$('.TF_from',this.$ID).val(str);}
KalouGeoMap.prototype.getAddressByLatlng=function(pos)
{var msg="";this.geocoder.geocode({latLng:pos},function(responses)
{msg=(responses&&responses.length>0)?responses[0].formatted_address:'Cannot determine address at this location.';});return msg;}
KalouGeoMap.prototype.setUpdateAdress=function(pos)
{var t=this;this.geocoder.geocode({latLng:pos},function(responses)
{if(responses&&responses.length>0)
{t.updateMarkerAddress(responses[0].formatted_address);t.addNewDirection();}
else
{t.updateMarkerAddress('Cannot determine address at this location.');}});}
KalouGeoMap.prototype.setAddress=function(address)
{var t=this;this.geocoder.geocode({'address':address},function(results,status)
{if(status==google.maps.GeocoderStatus.OK)
{var o=results[0].geometry.location;t.geoLocation=new google.maps.LatLng(o.lat(),o.lng());(!t.isUndefined(t.markerLocate))?t.markerLocate.setPosition(t.geoLocation):t.addNewGeoMarker();t.setZoomCentering();}
else
{t.addInfobullMSG(_errorGeoMSG.unsuccessful+"<br/><br/><i>"+status+"</i>");}});}
KalouGeoMap.prototype.setZoomCentering=function()
{var LatLngList=[this.LatLng,this.geoLocation];var bounds=new google.maps.LatLngBounds();for(var i=0,LtLgLen=LatLngList.length;i<LtLgLen;i++)bounds.extend(LatLngList[i]);this.map.fitBounds(bounds);this.addNewDirection();}
KalouGeoMap.prototype.noGeolocation=function(errorFlag)
{if(errorFlag){this.geoLocation=this.LatLng;this.addInfobullMSG(_errorGeoMSG.fail);}
else{this.geoLocation=this.LatLng;this.addInfobullMSG(_errorGeoMSG.unsupported);}
this.map.setCenter(this.geoLocation);}
KalouGeoMap.prototype.addNewDirection=function()
{if(!this.isUndefined(this.geoLocation))
{this.dirDisplay.setMap(this.map);this.dirDisplay.setPanel($('.directionsPanel',this.$ID).get(0));var t=this;var o={origin:this.geoLocation,destination:this.LatLng,travelMode:google.maps.TravelMode.DRIVING};this.dirService.route(o,function(result,status)
{if(status==google.maps.DirectionsStatus.OK)
{t.dirDisplay.setDirections(result);t.infowindow.close();}});}
else
{this.dirDisplay.setMap(null);}}
KalouGeoMap.prototype.removeDirection=function()
{this.geoLocation=undefined;this.removeGelocateMarker();this.dirDisplay.setMap(null);this.dirDisplay.setPanel(null);this.setChangeMapWidth(false);this.map.setCenter(this.LatLng);this.addInfobullMSG();}
KalouGeoMap.prototype.isUndefined=function(o)
{return(o==undefined);}
KalouGeoMap.initialized=true;}}
;;;/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version: 3.1.11
 *
 * Requires: jQuery 1.2.2+
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b)["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||(c=a("body")),parseInt(c.css("fontSize"),10)},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
;;;;(function($,window,document,undefined){function Owl(element,options){this.settings=null;this.options=$.extend({},Owl.Defaults,options);this.$element=$(element);this._handlers={};this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._widths=[];this._invalidated={};this._pipe=[];this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null};this._states={current:{},tags:{'initializing':['busy'],'animating':['busy'],'dragging':['interacting']}};$.each(['onResize','onThrottledResize'],$.proxy(function(i,handler){this._handlers[handler]=$.proxy(this[handler],this);},this));$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key.charAt(0).toLowerCase()+key.slice(1)]=new plugin(this);},this));$.each(Owl.Workers,$.proxy(function(priority,worker){this._pipe.push({'filter':worker.filter,'run':$.proxy(worker.run,this)});},this));this.setup();this.initialize();}
Owl.Defaults={items:3,loop:false,center:false,rewind:false,mouseDrag:true,touchDrag:true,pullDrag:true,freeDrag:false,margin:0,stagePadding:0,merge:false,mergeFit:true,autoWidth:false,startPosition:0,rtl:false,smartSpeed:250,fluidSpeed:false,dragEndSpeed:false,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,fallbackEasing:'swing',info:false,nestedItemSelector:false,itemElement:'div',stageElement:'div',refreshClass:'owl-refresh',loadedClass:'owl-loaded',loadingClass:'owl-loading',rtlClass:'owl-rtl',responsiveClass:'owl-responsive',dragClass:'owl-drag',itemClass:'owl-item',stageClass:'owl-stage',stageOuterClass:'owl-stage-outer',grabClass:'owl-grab'};Owl.Width={Default:'default',Inner:'inner',Outer:'outer'};Owl.Type={Event:'event',State:'state'};Owl.Plugins={};Owl.Workers=[{filter:['width','settings'],run:function(){this._width=this.$element.width();}},{filter:['width','items','settings'],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)];}},{filter:['items','settings'],run:function(){this.$stage.children('.cloned').remove();}},{filter:['width','items','settings'],run:function(cache){var margin=this.settings.margin||'',grid=!this.settings.autoWidth,rtl=this.settings.rtl,css={'width':'auto','margin-left':rtl?margin:'','margin-right':rtl?'':margin};!grid&&this.$stage.children().css(css);cache.css=css;}},{filter:['width','items','settings'],run:function(cache){var width=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[];cache.items={merge:false,width:width};while(iterator--){merge=this._mergers[iterator];merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge;cache.items.merge=merge>1||cache.items.merge;widths[iterator]=!grid?this._items[iterator].width():width*merge;}
this._widths=widths;}},{filter:['items','settings'],run:function(){var clones=[],items=this._items,settings=this.settings,view=Math.max(settings.items*2,4),size=Math.ceil(items.length/2)*2,repeat=settings.loop&&items.length?settings.rewind?view:Math.max(view,size):0,append='',prepend='';repeat/=2;while(repeat--){clones.push(this.normalize(clones.length/2,true));append=append+items[clones[clones.length-1]][0].outerHTML;clones.push(this.normalize(items.length-1-(clones.length-1)/2,true));prepend=items[clones[clones.length-1]][0].outerHTML+prepend;}
this._clones=clones;$(append).addClass('cloned').appendTo(this.$stage);$(prepend).addClass('cloned').prependTo(this.$stage);}},{filter:['width','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,size=this._clones.length+this._items.length,iterator=-1,previous=0,current=0,coordinates=[];while(++iterator<size){previous=coordinates[iterator-1]||0;current=this._widths[this.relative(iterator)]+this.settings.margin;coordinates.push(previous+current*rtl);}
this._coordinates=coordinates;}},{filter:['width','items','settings'],run:function(){var padding=this.settings.stagePadding,coordinates=this._coordinates,css={'width':Math.ceil(Math.abs(coordinates[coordinates.length-1]))+padding*2,'padding-left':padding||'','padding-right':padding||''};this.$stage.css(css);}},{filter:['width','items','settings'],run:function(cache){var iterator=this._coordinates.length,grid=!this.settings.autoWidth,items=this.$stage.children();if(grid&&cache.items.merge){while(iterator--){cache.css.width=this._widths[this.relative(iterator)];items.eq(iterator).css(cache.css);}}else if(grid){cache.css.width=cache.items.width;items.css(cache.css);}}},{filter:['items'],run:function(){this._coordinates.length<1&&this.$stage.removeAttr('style');}},{filter:['width','items','settings'],run:function(cache){cache.current=cache.current?this.$stage.children().index(cache.current):0;cache.current=Math.max(this.minimum(),Math.min(this.maximum(),cache.current));this.reset(cache.current);}},{filter:['position'],run:function(){this.animate(this.coordinates(this._current));}},{filter:['width','position','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++){inner=this._coordinates[i-1]||0;outer=Math.abs(this._coordinates[i])+padding*rtl;if((this.op(inner,'<=',begin)&&(this.op(inner,'>',end)))||(this.op(outer,'<',begin)&&this.op(outer,'>',end))){matches.push(i);}}
this.$stage.children('.active').removeClass('active');this.$stage.children(':eq('+matches.join('), :eq(')+')').addClass('active');if(this.settings.center){this.$stage.children('.center').removeClass('center');this.$stage.children().eq(this.current()).addClass('center');}}}];Owl.prototype.initialize=function(){this.enter('initializing');this.trigger('initialize');this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl);if(this.settings.autoWidth&&!this.is('pre-loading')){var imgs,nestedSelector,width;imgs=this.$element.find('img');nestedSelector=this.settings.nestedItemSelector?'.'+this.settings.nestedItemSelector:undefined;width=this.$element.children(nestedSelector).width();if(imgs.length&&width<=0){this.preloadAutoWidthImages(imgs);}}
this.$element.addClass(this.options.loadingClass);this.$stage=$('<'+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>');this.$element.append(this.$stage.parent());this.replace(this.$element.children().not(this.$stage.parent()));if(this.$element.is(':visible')){this.refresh();}else{this.invalidate('width');}
this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass);this.registerEventHandlers();this.leave('initializing');this.trigger('initialized');};Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;if(!overwrites){settings=$.extend({},this.options);}else{$.each(overwrites,function(breakpoint){if(breakpoint<=viewport&&breakpoint>match){match=Number(breakpoint);}});settings=$.extend({},this.options,overwrites[match]);if(typeof settings.stagePadding==='function'){settings.stagePadding=settings.stagePadding();}
delete settings.responsive;if(settings.responsiveClass){this.$element.attr('class',this.$element.attr('class').replace(new RegExp('('+this.options.responsiveClass+'-)\\S+\\s','g'),'$1'+match));}}
this.trigger('change',{property:{name:'settings',value:settings}});this._breakpoint=match;this.settings=settings;this.invalidate('settings');this.trigger('changed',{property:{name:'settings',value:this.settings}});};Owl.prototype.optionsLogic=function(){if(this.settings.autoWidth){this.settings.stagePadding=false;this.settings.merge=false;}};Owl.prototype.prepare=function(item){var event=this.trigger('prepare',{content:item});if(!event.data){event.data=$('<'+this.settings.itemElement+'/>').addClass(this.options.itemClass).append(item)}
this.trigger('prepared',{content:event.data});return event.data;};Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n){if(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0){this._pipe[i].run(cache);}
i++;}
this._invalidated={};!this.is('valid')&&this.enter('valid');};Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-this.settings.stagePadding*2+this.settings.margin;}};Owl.prototype.refresh=function(){this.enter('refreshing');this.trigger('refresh');this.setup();this.optionsLogic();this.$element.addClass(this.options.refreshClass);this.update();this.$element.removeClass(this.options.refreshClass);this.leave('refreshing');this.trigger('refreshed');};Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer);this.resizeTimer=window.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate);};Owl.prototype.onResize=function(){if(!this._items.length){return false;}
if(this._width===this.$element.width()){return false;}
if(!this.$element.is(':visible')){return false;}
this.enter('resizing');if(this.trigger('resize').isDefaultPrevented()){this.leave('resizing');return false;}
this.invalidate('width');this.refresh();this.leave('resizing');this.trigger('resized');};Owl.prototype.registerEventHandlers=function(){if($.support.transition){this.$stage.on($.support.transition.end+'.owl.core',$.proxy(this.onTransitionEnd,this));}
if(this.settings.responsive!==false){this.on(window,'resize',this._handlers.onThrottledResize);}
if(this.settings.mouseDrag){this.$element.addClass(this.options.dragClass);this.$stage.on('mousedown.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('dragstart.owl.core selectstart.owl.core',function(){return false});}
if(this.settings.touchDrag){this.$stage.on('touchstart.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('touchcancel.owl.core',$.proxy(this.onDragEnd,this));}};Owl.prototype.onDragStart=function(event){var stage=null;if(event.which===3){return;}
if($.support.transform){stage=this.$stage.css('transform').replace(/.*\(|\)| /g,'').split(',');stage={x:stage[stage.length===16?12:4],y:stage[stage.length===16?13:5]};}else{stage=this.$stage.position();stage={x:this.settings.rtl?stage.left+this.$stage.width()-this.width()+this.settings.margin:stage.left,y:stage.top};}
if(this.is('animating')){$.support.transform?this.animate(stage.x):this.$stage.stop()
this.invalidate('position');}
this.$element.toggleClass(this.options.grabClass,event.type==='mousedown');this.speed(0);this._drag.time=new Date().getTime();this._drag.target=$(event.target);this._drag.stage.start=stage;this._drag.stage.current=stage;this._drag.pointer=this.pointer(event);$(document).on('mouseup.owl.core touchend.owl.core',$.proxy(this.onDragEnd,this));$(document).one('mousemove.owl.core touchmove.owl.core',$.proxy(function(event){var delta=this.difference(this._drag.pointer,this.pointer(event));$(document).on('mousemove.owl.core touchmove.owl.core',$.proxy(this.onDragMove,this));if(Math.abs(delta.x)<Math.abs(delta.y)&&this.is('valid')){return;}
event.preventDefault();this.enter('dragging');this.trigger('drag');},this));};Owl.prototype.onDragMove=function(event){var minimum=null,maximum=null,pull=null,delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this.difference(this._drag.stage.start,delta);if(!this.is('dragging')){return;}
event.preventDefault();if(this.settings.loop){minimum=this.coordinates(this.minimum());maximum=this.coordinates(this.maximum()+1)-minimum;stage.x=(((stage.x-minimum)%maximum+maximum)%maximum)+minimum;}else{minimum=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum());maximum=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum());pull=this.settings.pullDrag?-1*delta.x/5:0;stage.x=Math.max(Math.min(stage.x,minimum+pull),maximum+pull);}
this._drag.stage.current=stage;this.animate(stage.x);};Owl.prototype.onDragEnd=function(event){var delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this._drag.stage.current,direction=delta.x>0^this.settings.rtl?'left':'right';$(document).off('.owl.core');this.$element.removeClass(this.options.grabClass);if(delta.x!==0&&this.is('dragging')||!this.is('valid')){this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);this.current(this.closest(stage.x,delta.x!==0?direction:this._drag.direction));this.invalidate('position');this.update();this._drag.direction=direction;if(Math.abs(delta.x)>3||new Date().getTime()-this._drag.time>300){this._drag.target.one('click.owl.core',function(){return false;});}}
if(!this.is('dragging')){return;}
this.leave('dragging');this.trigger('dragged');};Owl.prototype.closest=function(coordinate,direction){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();if(!this.settings.freeDrag){$.each(coordinates,$.proxy(function(index,value){if(direction==='left'&&coordinate>value-pull&&coordinate<value+pull){position=index;}else if(direction==='right'&&coordinate>value-width-pull&&coordinate<value-width+pull){position=index+1;}else if(this.op(coordinate,'<',value)&&this.op(coordinate,'>',coordinates[index+1]||value-width)){position=direction==='left'?index+1:index;}
return position===-1;},this));}
if(!this.settings.loop){if(this.op(coordinate,'>',coordinates[this.minimum()])){position=coordinate=this.minimum();}else if(this.op(coordinate,'<',coordinates[this.maximum()])){position=coordinate=this.maximum();}}
return position;};Owl.prototype.animate=function(coordinate){var animate=this.speed()>0;this.is('animating')&&this.onTransitionEnd();if(animate){this.enter('animating');this.trigger('translate');}
if($.support.transform3d&&$.support.transition){this.$stage.css({transform:'translate3d('+coordinate+'px,0px,0px)',transition:(this.speed()/1000)+'s'});}else if(animate){this.$stage.animate({left:coordinate+'px'},this.speed(),this.settings.fallbackEasing,$.proxy(this.onTransitionEnd,this));}else{this.$stage.css({left:coordinate+'px'});}};Owl.prototype.is=function(state){return this._states.current[state]&&this._states.current[state]>0;};Owl.prototype.current=function(position){if(position===undefined){return this._current;}
if(this._items.length===0){return undefined;}
position=this.normalize(position);if(this._current!==position){var event=this.trigger('change',{property:{name:'position',value:position}});if(event.data!==undefined){position=this.normalize(event.data);}
this._current=position;this.invalidate('position');this.trigger('changed',{property:{name:'position',value:this._current}});}
return this._current;};Owl.prototype.invalidate=function(part){if($.type(part)==='string'){this._invalidated[part]=true;this.is('valid')&&this.leave('valid');}
return $.map(this._invalidated,function(v,i){return i});};Owl.prototype.reset=function(position){position=this.normalize(position);if(position===undefined){return;}
this._speed=0;this._current=position;this.suppress(['translate','translated']);this.animate(this.coordinates(position));this.release(['translate','translated']);};Owl.prototype.normalize=function(position,relative){var n=this._items.length,m=relative?0:this._clones.length;if(!this.isNumeric(position)||n<1){position=undefined;}else if(position<0||position>=n+m){position=((position-m/2)%n+n)%n+m/2;}
return position;};Owl.prototype.relative=function(position){position-=this._clones.length/2;return this.normalize(position,true);};Owl.prototype.maximum=function(relative){var settings=this.settings,maximum=this._coordinates.length,iterator,reciprocalItemsWidth,elementWidth;if(settings.loop){maximum=this._clones.length/2+this._items.length-1;}else if(settings.autoWidth||settings.merge){iterator=this._items.length;reciprocalItemsWidth=this._items[--iterator].width();elementWidth=this.$element.width();while(iterator--){reciprocalItemsWidth+=this._items[iterator].width()+this.settings.margin;if(reciprocalItemsWidth>elementWidth){break;}}
maximum=iterator+1;}else if(settings.center){maximum=this._items.length-1;}else{maximum=this._items.length-settings.items;}
if(relative){maximum-=this._clones.length/2;}
return Math.max(maximum,0);};Owl.prototype.minimum=function(relative){return relative?0:this._clones.length/2;};Owl.prototype.items=function(position){if(position===undefined){return this._items.slice();}
position=this.normalize(position,true);return this._items[position];};Owl.prototype.mergers=function(position){if(position===undefined){return this._mergers.slice();}
position=this.normalize(position,true);return this._mergers[position];};Owl.prototype.clones=function(position){var odd=this._clones.length/2,even=odd+this._items.length,map=function(index){return index%2===0?even+index/2:odd-(index+1)/2};if(position===undefined){return $.map(this._clones,function(v,i){return map(i)});}
return $.map(this._clones,function(v,i){return v===position?map(i):null});};Owl.prototype.speed=function(speed){if(speed!==undefined){this._speed=speed;}
return this._speed;};Owl.prototype.coordinates=function(position){var multiplier=1,newPosition=position-1,coordinate;if(position===undefined){return $.map(this._coordinates,$.proxy(function(coordinate,index){return this.coordinates(index);},this));}
if(this.settings.center){if(this.settings.rtl){multiplier=-1;newPosition=position+1;}
coordinate=this._coordinates[position];coordinate+=(this.width()-coordinate+(this._coordinates[newPosition]||0))/2*multiplier;}else{coordinate=this._coordinates[newPosition]||0;}
coordinate=Math.ceil(coordinate);return coordinate;};Owl.prototype.duration=function(from,to,factor){if(factor===0){return 0;}
return Math.min(Math.max(Math.abs(to-from),1),6)*Math.abs((factor||this.settings.smartSpeed));};Owl.prototype.to=function(position,speed){var current=this.current(),revert=null,distance=position-this.relative(current),direction=(distance>0)-(distance<0),items=this._items.length,minimum=this.minimum(),maximum=this.maximum();if(this.settings.loop){if(!this.settings.rewind&&Math.abs(distance)>items/2){distance+=direction* -1*items;}
position=current+distance;revert=((position-minimum)%items+items)%items+minimum;if(revert!==position&&revert-distance<=maximum&&revert-distance>0){current=revert-distance;position=revert;this.reset(current);}}else if(this.settings.rewind){maximum+=1;position=(position%maximum+maximum)%maximum;}else{position=Math.max(minimum,Math.min(maximum,position));}
this.speed(this.duration(current,position,speed));this.current(position);if(this.$element.is(':visible')){this.update();}};Owl.prototype.next=function(speed){speed=speed||false;this.to(this.relative(this.current())+1,speed);};Owl.prototype.prev=function(speed){speed=speed||false;this.to(this.relative(this.current())-1,speed);};Owl.prototype.onTransitionEnd=function(event){if(event!==undefined){event.stopPropagation();if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){return false;}}
this.leave('animating');this.trigger('translated');};Owl.prototype.viewport=function(){var width;if(this.options.responsiveBaseElement!==window){width=$(this.options.responsiveBaseElement).width();}else if(window.innerWidth){width=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){width=document.documentElement.clientWidth;}else{console.warn('Can not detect viewport width.');}
return width;};Owl.prototype.replace=function(content){this.$stage.empty();this._items=[];if(content){content=(content instanceof jQuery)?content:$(content);}
if(this.settings.nestedItemSelector){content=content.find('.'+this.settings.nestedItemSelector);}
content.filter(function(){return this.nodeType===1;}).each($.proxy(function(index,item){item=this.prepare(item);this.$stage.append(item);this._items.push(item);this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1);},this));this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0);this.invalidate('items');};Owl.prototype.add=function(content,position){var current=this.relative(this._current);position=position===undefined?this._items.length:this.normalize(position,true);content=content instanceof jQuery?content:$(content);this.trigger('add',{content:content,position:position});content=this.prepare(content);if(this._items.length===0||position===this._items.length){this._items.length===0&&this.$stage.append(content);this._items.length!==0&&this._items[position-1].after(content);this._items.push(content);this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1);}else{this._items[position].before(content);this._items.splice(position,0,content);this._mergers.splice(position,0,content.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1);}
this._items[current]&&this.reset(this._items[current].index());this.invalidate('items');this.trigger('added',{content:content,position:position});};Owl.prototype.remove=function(position){position=this.normalize(position,true);if(position===undefined){return;}
this.trigger('remove',{content:this._items[position],position:position});this._items[position].remove();this._items.splice(position,1);this._mergers.splice(position,1);this.invalidate('items');this.trigger('removed',{content:null,position:position});};Owl.prototype.preloadAutoWidthImages=function(images){images.each($.proxy(function(i,element){this.enter('pre-loading');element=$(element);$(new Image()).one('load',$.proxy(function(e){element.attr('src',e.target.src);element.css('opacity',1);this.leave('pre-loading');!this.is('pre-loading')&&!this.is('initializing')&&this.refresh();},this)).attr('src',element.attr('src')||element.attr('data-src')||element.attr('data-src-retina'));},this));};Owl.prototype.destroy=function(){this.$element.off('.owl.core');this.$stage.off('.owl.core');$(document).off('.owl.core');if(this.settings.responsive!==false){window.clearTimeout(this.resizeTimer);this.off(window,'resize',this._handlers.onThrottledResize);}
for(var i in this._plugins){this._plugins[i].destroy();}
this.$stage.children('.cloned').remove();this.$stage.unwrap();this.$stage.children().contents().unwrap();this.$stage.children().unwrap();this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr('class',this.$element.attr('class').replace(new RegExp(this.options.responsiveClass+'-\\S+\\s','g'),'')).removeData('owl.carousel');};Owl.prototype.op=function(a,o,b){var rtl=this.settings.rtl;switch(o){case'<':return rtl?a>b:a<b;case'>':return rtl?a<b:a>b;case'>=':return rtl?a<=b:a>=b;case'<=':return rtl?a>=b:a<=b;default:break;}};Owl.prototype.on=function(element,event,listener,capture){if(element.addEventListener){element.addEventListener(event,listener,capture);}else if(element.attachEvent){element.attachEvent('on'+event,listener);}};Owl.prototype.off=function(element,event,listener,capture){if(element.removeEventListener){element.removeEventListener(event,listener,capture);}else if(element.detachEvent){element.detachEvent('on'+event,listener);}};Owl.prototype.trigger=function(name,data,namespace,state,enter){var status={item:{count:this._items.length,index:this.current()}},handler=$.camelCase($.grep(['on',name,namespace],function(v){return v}).join('-').toLowerCase()),event=$.Event([name,'owl',namespace||'carousel'].join('.').toLowerCase(),$.extend({relatedTarget:this},status,data));if(!this._supress[name]){$.each(this._plugins,function(name,plugin){if(plugin.onTrigger){plugin.onTrigger(event);}});this.register({type:Owl.Type.Event,name:name});this.$element.trigger(event);if(this.settings&&typeof this.settings[handler]==='function'){this.settings[handler].call(this,event);}}
return event;};Owl.prototype.enter=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){if(this._states.current[name]===undefined){this._states.current[name]=0;}
this._states.current[name]++;},this));};Owl.prototype.leave=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){this._states.current[name]--;},this));};Owl.prototype.register=function(object){if(object.type===Owl.Type.Event){if(!$.event.special[object.name]){$.event.special[object.name]={};}
if(!$.event.special[object.name].owl){var _default=$.event.special[object.name]._default;$.event.special[object.name]._default=function(e){if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){return _default.apply(this,arguments);}
return e.namespace&&e.namespace.indexOf('owl')>-1;};$.event.special[object.name].owl=true;}}else if(object.type===Owl.Type.State){if(!this._states.tags[object.name]){this._states.tags[object.name]=object.tags;}else{this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags);}
this._states.tags[object.name]=$.grep(this._states.tags[object.name],$.proxy(function(tag,i){return $.inArray(tag,this._states.tags[object.name])===i;},this));}};Owl.prototype.suppress=function(events){$.each(events,$.proxy(function(index,event){this._supress[event]=true;},this));};Owl.prototype.release=function(events){$.each(events,$.proxy(function(index,event){delete this._supress[event];},this));};Owl.prototype.pointer=function(event){var result={x:null,y:null};event=event.originalEvent||event||window.event;event=event.touches&&event.touches.length?event.touches[0]:event.changedTouches&&event.changedTouches.length?event.changedTouches[0]:event;if(event.pageX){result.x=event.pageX;result.y=event.pageY;}else{result.x=event.clientX;result.y=event.clientY;}
return result;};Owl.prototype.isNumeric=function(number){return!isNaN(parseFloat(number));};Owl.prototype.difference=function(first,second){return{x:first.x-second.x,y:first.y-second.y};};$.fn.owlCarousel=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data('owl.carousel');if(!data){data=new Owl(this,typeof option=='object'&&option);$this.data('owl.carousel',data);$.each(['next','prev','to','destroy','refresh','replace','add','remove'],function(i,event){data.register({type:Owl.Type.Event,name:event});data.$element.on(event+'.owl.carousel.core',$.proxy(function(e){if(e.namespace&&e.relatedTarget!==this){this.suppress([event]);data[event].apply(this,[].slice.call(arguments,1));this.release([event]);}},data));});}
if(typeof option=='string'&&option.charAt(0)!=='_'){data[option].apply(data,args);}});};$.fn.owlCarousel.Constructor=Owl;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var AutoRefresh=function(carousel){this._core=carousel;this._interval=null;this._visible=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoRefresh){this.watch();}},this)};this._core.options=$.extend({},AutoRefresh.Defaults,this._core.options);this._core.$element.on(this._handlers);};AutoRefresh.Defaults={autoRefresh:true,autoRefreshInterval:500};AutoRefresh.prototype.watch=function(){if(this._interval){return;}
this._visible=this._core.$element.is(':visible');this._interval=window.setInterval($.proxy(this.refresh,this),this._core.settings.autoRefreshInterval);};AutoRefresh.prototype.refresh=function(){if(this._core.$element.is(':visible')===this._visible){return;}
this._visible=!this._visible;this._core.$element.toggleClass('owl-hidden',!this._visible);this._visible&&(this._core.invalidate('width')&&this._core.refresh());};AutoRefresh.prototype.destroy=function(){var handler,property;window.clearInterval(this._interval);for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Lazy=function(carousel){this._core=carousel;this._loaded=[];this._handlers={'initialized.owl.carousel change.owl.carousel resized.owl.carousel':$.proxy(function(e){if(!e.namespace){return;}
if(!this._core.settings||!this._core.settings.lazyLoad){return;}
if((e.property&&e.property.name=='position')||e.type=='initialized'){var settings=this._core.settings,n=(settings.center&&Math.ceil(settings.items/2)||settings.items),i=((settings.center&&n* -1)||0),position=(e.property&&e.property.value!==undefined?e.property.value:this._core.current())+i,clones=this._core.clones().length,load=$.proxy(function(i,v){this.load(v)},this);while(i++<n){this.load(clones/2+this._core.relative(position));clones&&$.each(this._core.clones(this._core.relative(position)),load);position++;}}},this)};this._core.options=$.extend({},Lazy.Defaults,this._core.options);this._core.$element.on(this._handlers);};Lazy.Defaults={lazyLoad:false};Lazy.prototype.load=function(position){var $item=this._core.$stage.children().eq(position),$elements=$item&&$item.find('.owl-lazy');if(!$elements||$.inArray($item.get(0),this._loaded)>-1){return;}
$elements.each($.proxy(function(index,element){var $element=$(element),image,url=(window.devicePixelRatio>1&&$element.attr('data-src-retina'))||$element.attr('data-src');this._core.trigger('load',{element:$element,url:url},'lazy');if($element.is('img')){$element.one('load.owl.lazy',$.proxy(function(){$element.css('opacity',1);this._core.trigger('loaded',{element:$element,url:url},'lazy');},this)).attr('src',url);}else{image=new Image();image.onload=$.proxy(function(){$element.css({'background-image':'url("'+url+'")','opacity':'1'});this._core.trigger('loaded',{element:$element,url:url},'lazy');},this);image.src=url;}},this));this._loaded.push($item.get(0));};Lazy.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this._core.$element.off(handler,this.handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var AutoHeight=function(carousel){this._core=carousel;this._handlers={'initialized.owl.carousel refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight){this.update();}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.property.name=='position'){this.update();}},this),'loaded.owl.lazy':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.element.closest('.'+this._core.settings.itemClass).index()===this._core.current()){this.update();}},this)};this._core.options=$.extend({},AutoHeight.Defaults,this._core.options);this._core.$element.on(this._handlers);};AutoHeight.Defaults={autoHeight:false,autoHeightClass:'owl-height'};AutoHeight.prototype.update=function(){var start=this._core._current,end=start+this._core.settings.items,visible=this._core.$stage.children().toArray().slice(start,end),heights=[],maxheight=0;$.each(visible,function(index,item){heights.push($(item).height());});maxheight=Math.max.apply(null,heights);this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass);};AutoHeight.prototype.destroy=function(){var handler,property;for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Video=function(carousel){this._core=carousel;this._videos={};this._playing=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace){this._core.register({type:'state',name:'playing',tags:['interacting']});}},this),'resize.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){e.preventDefault();}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.is('resizing')){this._core.$stage.find('.cloned .owl-video-frame').remove();}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'&&this._playing){this.stop();}},this),'prepared.owl.carousel':$.proxy(function(e){if(!e.namespace){return;}
var $element=$(e.content).find('.owl-video');if($element.length){$element.css('display','none');this.fetch($element,$(e.content));}},this)};this._core.options=$.extend({},Video.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on('click.owl.video','.owl-video-play-icon',$.proxy(function(e){if(this._playing!=null)
{this._core.trigger('stop',null,'video');this._playing.find('.owl-video-frame').remove();this._playing.removeClass('owl-video-playing');this._playing=null;this._core.leave('playing');this._core.trigger('stopped',null,'video');}
this.play(e);},this));};Video.Defaults={video:false,videoHeight:false,videoWidth:false};Video.prototype.fetch=function(target,item){var type=(function(){if(target.attr('data-vimeo-id')){return'vimeo';}else if(target.attr('data-vzaar-id')){return'vzaar'}else{return'youtube';}})(),id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'),width=target.attr('data-width')||this._core.settings.videoWidth,height=target.attr('data-height')||this._core.settings.videoHeight,url=target.attr('href');if(url){id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1){type='youtube';}else if(id[3].indexOf('vimeo')>-1){type='vimeo';}else if(id[3].indexOf('vzaar')>-1){type='vzaar';}else{throw new Error('Video URL not supported.');}
id=id[6];}else{throw new Error('Missing video URL.');}
this._videos[url]={type:type,id:id,width:width,height:height};item.attr('data-video',url);this.thumbnail(target,this._videos[url]);};Video.prototype.thumbnail=function(target,video){var tnLink,icon,path,dimensions=video.width&&video.height?'style="width:'+video.width+'px;height:'+video.height+'px;"':'',customTn=target.find('img'),srcType='src',lazyClass='',settings=this._core.settings,create=function(path){icon='<div class="owl-video-play-icon"></div>';if(settings.lazyLoad){tnLink='<div class="owl-video-tn '+lazyClass+'" '+srcType+'="'+path+'"></div>';}else{tnLink='<div class="owl-video-tn" style="opacity:1;background-image:url('+path+')"></div>';}
target.after(tnLink);target.after(icon);};target.wrap('<div class="owl-video-wrapper"'+dimensions+'></div>');if(this._core.settings.lazyLoad){srcType='data-src';lazyClass='owl-lazy';}
if(customTn.length){create(customTn.attr(srcType));customTn.remove();return false;}
if(video.type==='youtube'){path="//img.youtube.com/vi/"+video.id+"/hqdefault.jpg";create(path);}else if(video.type==='vimeo'){$.ajax({type:'GET',url:'//vimeo.com/api/v2/video/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data[0].thumbnail_large;create(path);}});}else if(video.type==='vzaar'){$.ajax({type:'GET',url:'//vzaar.com/api/videos/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data.framegrab_url;create(path);}});}};Video.prototype.stop=function(){this._core.trigger('stop',null,'video');this._playing.find('.owl-video-frame').remove();this._playing.removeClass('owl-video-playing');this._playing=null;this._core.leave('playing');this._core.trigger('stopped',null,'video');};Video.prototype.play=function(event){var target=$(event.target),item=target.closest('.'+this._core.settings.itemClass),video=this._videos[item.attr('data-video')],width=video.width||'100%',height=video.height||this._core.$stage.height(),html;if(this._playing){return;}
this._core.enter('playing');this._core.trigger('play',null,'video');item=this._core.items(this._core.relative(item.index()));this._core.reset(item.index());if(video.type==='youtube'){html='<iframe width="'+width+'" height="'+height+'" src="//www.youtube.com/embed/'+
video.id+'?autoplay=1&rel=0&v='+video.id+'" frameborder="0" allowfullscreen></iframe>';}else if(video.type==='vimeo'){html='<iframe src="//player.vimeo.com/video/'+video.id+'?autoplay=1" width="'+width+'" height="'+height+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';}else if(video.type==='vzaar'){html='<iframe frameborder="0"'+'height="'+height+'"'+'width="'+width+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen '+'src="//view.vzaar.com/'+video.id+'/player?autoplay=true"></iframe>';}
$('<div class="owl-video-frame">'+html+'</div>').insertAfter(item.find('.owl-video'));this._playing=item.addClass('owl-video-playing');};Video.prototype.isInFullScreen=function(){var element=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;return element&&$(element).parent().hasClass('owl-video-frame');};Video.prototype.destroy=function(){var handler,property;this._core.$element.off('click.owl.video');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Video=Video;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Animate=function(scope){this.core=scope;this.core.options=$.extend({},Animate.Defaults,this.core.options);this.swapping=true;this.previous=undefined;this.next=undefined;this.handlers={'change.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.previous=this.core.current();this.next=e.property.value;}},this),'drag.owl.carousel dragged.owl.carousel translated.owl.carousel':$.proxy(function(e){if(e.namespace){this.swapping=e.type=='translated';}},this),'translate.owl.carousel':$.proxy(function(e){if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){this.swap();}},this)};this.core.$element.on(this.handlers);};Animate.Defaults={animateOut:false,animateIn:false};Animate.prototype.swap=function(){if(this.core.settings.items!==1){return;}
if(!$.support.animation||!$.support.transition){return;}
this.core.speed(0);var left,clear=$.proxy(this.clear,this),previous=this.core.$stage.children().eq(this.previous),next=this.core.$stage.children().eq(this.next),incoming=this.core.settings.animateIn,outgoing=this.core.settings.animateOut;if(this.core.current()===this.previous){return;}
if(outgoing){left=this.core.coordinates(this.previous)-this.core.coordinates(this.next);previous.one($.support.animation.end,clear).css({'left':left+'px'}).addClass('animated owl-animated-out').addClass(outgoing);}
if(incoming){next.one($.support.animation.end,clear).addClass('animated owl-animated-in').addClass(incoming);}};Animate.prototype.clear=function(e){$(e.target).css({'left':''}).removeClass('animated owl-animated-out owl-animated-in').removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.onTransitionEnd();};Animate.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this.core.$element.off(handler,this.handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Animate=Animate;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Autoplay=function(carousel){this._core=carousel;this._timeout=null;this._paused=false;this._handlers={'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='settings'){if(this._core.settings.autoplay){this.play();}else{this.stop();}}else if(e.namespace&&e.property.name==='position'){if(this._core.settings.autoplay){this._setAutoPlayInterval();}}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoplay){this.play();}},this),'play.owl.autoplay':$.proxy(function(e,t,s){if(e.namespace){this.play(t,s);}},this),'stop.owl.autoplay':$.proxy(function(e){if(e.namespace){this.stop();}},this),'mouseover.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.pause();}},this),'mouseleave.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.play();}},this),'touchstart.owl.core':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.pause();}},this),'touchend.owl.core':$.proxy(function(){if(this._core.settings.autoplayHoverPause){this.play();}},this)};this._core.$element.on(this._handlers);this._core.options=$.extend({},Autoplay.Defaults,this._core.options);};Autoplay.Defaults={autoplay:false,autoplayTimeout:5000,autoplayHoverPause:false,autoplaySpeed:false};Autoplay.prototype.play=function(timeout,speed){this._paused=false;if(this._core.is('rotating')){return;}
this._core.enter('rotating');this._setAutoPlayInterval();};Autoplay.prototype._getNextTimeout=function(timeout,speed){if(this._timeout){window.clearTimeout(this._timeout);}
return window.setTimeout($.proxy(function(){if(this._paused||this._core.is('busy')||this._core.is('interacting')||document.hidden){return;}
this._core.next(speed||this._core.settings.autoplaySpeed);},this),timeout||this._core.settings.autoplayTimeout);};Autoplay.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout();};Autoplay.prototype.stop=function(){if(!this._core.is('rotating')){return;}
window.clearTimeout(this._timeout);this._core.leave('rotating');};Autoplay.prototype.pause=function(){if(!this._core.is('rotating')){return;}
this._paused=true;};Autoplay.prototype.destroy=function(){var handler,property;this.stop();for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Navigation=function(carousel){this._core=carousel;this._initialized=false;this._pages=[];this._controls={};this._templates=[];this.$element=this._core.$element;this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to};this._handlers={'prepared.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.push('<div class="'+this._core.settings.dotClass+'">'+
$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot')+'</div>');}},this),'added.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,0,this._templates.pop());}},this),'remove.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,1);}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.draw();}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&!this._initialized){this._core.trigger('initialize',null,'navigation');this.initialize();this.update();this.draw();this._initialized=true;this._core.trigger('initialized',null,'navigation');}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._initialized){this._core.trigger('refresh',null,'navigation');this.update();this.draw();this._core.trigger('refreshed',null,'navigation');}},this)};this._core.options=$.extend({},Navigation.Defaults,this._core.options);this.$element.on(this._handlers);};Navigation.Defaults={nav:false,navText:['prev','next'],navSpeed:false,navElement:'div',navContainer:false,navContainerClass:'owl-nav',navClass:['owl-prev','owl-next'],slideBy:1,dotClass:'owl-dot',dotsClass:'owl-dots',dots:true,dotsEach:false,dotsData:false,dotsSpeed:false,dotsContainer:false};Navigation.prototype.initialize=function(){var override,settings=this._core.settings;this._controls.$relative=(settings.navContainer?$(settings.navContainer):$('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');this._controls.$previous=$('<'+settings.navElement+'>').addClass(settings.navClass[0]).html(settings.navText[0]).prependTo(this._controls.$relative).on('click',$.proxy(function(e){this.prev(settings.navSpeed);},this));this._controls.$next=$('<'+settings.navElement+'>').addClass(settings.navClass[1]).html(settings.navText[1]).appendTo(this._controls.$relative).on('click',$.proxy(function(e){this.next(settings.navSpeed);},this));if(!settings.dotsData){this._templates=[$('<div>').addClass(settings.dotClass).append($('<span>')).prop('outerHTML')];}
this._controls.$absolute=(settings.dotsContainer?$(settings.dotsContainer):$('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');this._controls.$absolute.on('click','div',$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$absolute)?$(e.target).index():$(e.target).parent().index();e.preventDefault();this.to(index,settings.dotsSpeed);},this));for(override in this._overrides){this._core[override]=$.proxy(this[override],this);}};Navigation.prototype.destroy=function(){var handler,control,property,override;for(handler in this._handlers){this.$element.off(handler,this._handlers[handler]);}
for(control in this._controls){this._controls[control].remove();}
for(override in this.overides){this._core[override]=this._overrides[override];}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};Navigation.prototype.update=function(){var i,j,k,lower=this._core.clones().length/2,upper=lower+this._core.items().length,maximum=this._core.maximum(true),settings=this._core.settings,size=settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items;if(settings.slideBy!=='page'){settings.slideBy=Math.min(settings.slideBy,settings.items);}
if(settings.dots||settings.slideBy=='page'){this._pages=[];for(i=lower,j=0,k=0;i<upper;i++){if(j>=size||j===0){this._pages.push({start:Math.min(maximum,i-lower),end:i-lower+size-1});if(Math.min(maximum,i-lower)===maximum){break;}
j=0,++k;}
j+=this._core.mergers(this._core.relative(i));}}};Navigation.prototype.draw=function(){var difference,settings=this._core.settings,disabled=this._core.items().length<=settings.items,index=this._core.relative(this._core.current()),loop=settings.loop||settings.rewind;this._controls.$relative.toggleClass('disabled',!settings.nav||disabled);if(settings.nav){this._controls.$previous.toggleClass('disabled',!loop&&index<=this._core.minimum(true));this._controls.$next.toggleClass('disabled',!loop&&index>=this._core.maximum(true));}
this._controls.$absolute.toggleClass('disabled',!settings.dots||disabled);if(settings.dots){difference=this._pages.length-this._controls.$absolute.children().length;if(settings.dotsData&&difference!==0){this._controls.$absolute.html(this._templates.join(''));}else if(difference>0){this._controls.$absolute.append(new Array(difference+1).join(this._templates[0]));}else if(difference<0){this._controls.$absolute.children().slice(difference).remove();}
this._controls.$absolute.find('.active').removeClass('active');this._controls.$absolute.children().eq($.inArray(this.current(),this._pages)).addClass('active');}};Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items)};};Navigation.prototype.current=function(){var current=this._core.relative(this._core.current());return $.grep(this._pages,$.proxy(function(page,index){return page.start<=current&&page.end>=current;},this)).pop();};Navigation.prototype.getPosition=function(successor){var position,length,settings=this._core.settings;if(settings.slideBy=='page'){position=$.inArray(this.current(),this._pages);length=this._pages.length;successor?++position:--position;position=this._pages[((position%length)+length)%length].start;}else{position=this._core.relative(this._core.current());length=this._core.items().length;successor?position+=settings.slideBy:position-=settings.slideBy;}
return position;};Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(true),speed);};Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(false),speed);};Navigation.prototype.to=function(position,speed,standard){var length;if(!standard&&this._pages.length){length=this._pages.length;$.proxy(this._overrides.to,this._core)(this._pages[((position%length)+length)%length].start,speed);}else{$.proxy(this._overrides.to,this._core)(position,speed);}};$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Hash=function(carousel){this._core=carousel;this._hashes={};this.$element=this._core.$element;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.startPosition==='URLHash'){$(window).trigger('hashchange.owl.navigation');}},this),'prepared.owl.carousel':$.proxy(function(e){if(e.namespace){var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');if(!hash){return;}
this._hashes[hash]=e.content;}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'){var current=this._core.items(this._core.relative(this._core.current())),hash=$.map(this._hashes,function(item,hash){return item===current?hash:null;}).join();if(!hash||window.location.hash.slice(1)===hash){return;}
window.location.hash=hash;}},this)};this._core.options=$.extend({},Hash.Defaults,this._core.options);this.$element.on(this._handlers);$(window).on('hashchange.owl.navigation',$.proxy(function(e){var hash=window.location.hash.substring(1),items=this._core.$stage.children(),position=this._hashes[hash]&&items.index(this._hashes[hash]);if(position===undefined||position===this._core.current()){return;}
this._core.to(this._core.relative(position),false,true);},this));};Hash.Defaults={URLhashListener:false};Hash.prototype.destroy=function(){var handler,property;$(window).off('hashchange.owl.navigation');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var style=$('<support>').get(0).style,prefixes='Webkit Moz O ms'.split(' '),events={transition:{end:{WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd',transition:'transitionend'}},animation:{end:{WebkitAnimation:'webkitAnimationEnd',MozAnimation:'animationend',OAnimation:'oAnimationEnd',animation:'animationend'}}},tests={csstransforms:function(){return!!test('transform');},csstransforms3d:function(){return!!test('perspective');},csstransitions:function(){return!!test('transition');},cssanimations:function(){return!!test('animation');}};function test(property,prefixed){var result=false,upper=property.charAt(0).toUpperCase()+property.slice(1);$.each((property+' '+prefixes.join(upper+' ')+upper).split(' '),function(i,property){if(style[property]!==undefined){result=prefixed?property:true;return false;}});return result;}
function prefixed(property){return test(property,true);}
if(tests.csstransitions()){$.support.transition=new String(prefixed('transition'))
$.support.transition.end=events.transition.end[$.support.transition];}
if(tests.cssanimations()){$.support.animation=new String(prefixed('animation'))
$.support.animation.end=events.animation.end[$.support.animation];}
if(tests.csstransforms()){$.support.transform=new String(prefixed('transform'));$.support.transform3d=tests.csstransforms3d();}})(window.Zepto||window.jQuery,window,document);
;;;(function($){function PopupSlider(element,options)
{this.main=$(element);var $this=this;this.settings=$.extend({},$.fn.popupslider.defaults,options||{});this.datas=[];var opts=this.settings.opts;opts.lazyLoad=true;opts.autoHeight=false;this.$slide=this.main.find('.slider');this.$slider=this.$slide.find('.owl-carousel');this.$btn_close=this.main.find('.btn-close-popup');this._init_popup();}
PopupSlider.prototype={addSlider:function(data,goToItemNum,no_dots)
{var lng=data.length,i=goToItemNum-1;if(lng!=0&&data!=undefined)
{this.datas=data;this._datasManager();this._setSlider((i<=lng)?i:undefined);this._show();}
if(no_dots)this.main.addClass('no-dots');},remove:function()
{$('.bodyScreen').removeClass('has-a-popup');this._clear();},_clear:function()
{this.datas=[];this.$slider.off('mousewheel translated.owl.carousel changed.owl.carousel mousedown change.owl.carousel dragge.owl.carousel to.owl.carousel remove.owl.carousel');this.$slider.find('.wrapper').off('mousedown touchstart');this.$btn_close.off('click');$(document).off('keyup');this.main.removeClass('loaded show no-dots');this.$slider.remove();this.$slide.append('<div class="owl-carousel"></div>');this.$slider=this.$slide.find('.owl-carousel');},_show:function()
{$('.bodyScreen').addClass('has-a-popup');this.main.addClass('show');var $this=this;this.$btn_close.on('click',function()
{$this.remove();});},_init_popup:function()
{this._clear();},_datasManager:function()
{var o=this.datas,e=undefined,elements="",isImg=false,maxImgCharging=this.settings.nbr_prefetchImg,numImgCharged=0,bolImgCharded=false,hasWrapper=false;for(var i=0;i<o.length;i++)
{e=o[i];isImg=(e.type.toLowerCase()=="img");bolImgCharded=(numImgCharged>=maxImgCharging);if(!bolImgCharded&&isImg)numImgCharged++;hasWrapper=(e.desc!=""&&e.desc!=undefined);elements+=this._getStructure(i,e.src,isImg,{hasWrapper:hasWrapper,desc:e.desc},bolImgCharded);}
this.$slider.append(elements);picturefill();},_getStructure:function(i,src,bol,oWrapper,bolImgCharded)
{var o="";var hasWrapper=(oWrapper.hasWrapper)?"has-desc":"",wrapper='<div class="wrapper" aria-haspopup="true"><article><span>'+((oWrapper.desc!="")?oWrapper.desc:'')+'</span></article></div>';if(bol)
{if(bolImgCharded)
{o='<div class="item '+hasWrapper+'" data-num='+String(i)+'>'+((hasWrapper)?wrapper:'')+'</div>';}
else
{var delimiter=src.indexOf('?')==-1?'?':'&';o='<div class="item '+hasWrapper+'" data-num='+String(i)+'>'+((hasWrapper)?wrapper:'')+'<figure><picture><!--[if IE 9]><video style="display: none;"><![endif]--><source srcset="'+src+delimiter+'width=1920&height=990&format=png" media="(min-width: 1281px)"><source srcset="'+src+delimiter+'width=1280&height=660&format=png" media="(min-width: 1025px)"><source srcset="'+src+delimiter+'width=1024&height=510&format=png" media="(min-width: 767px)"><source srcset="'+src+delimiter+'width=768&height=396&format=png" media="(min-width: 481px)"><source srcset="'+src+delimiter+'width=480&height=248&format=png" media="(max-width: 480px)"><source srcset="'+src+delimiter+'width=768&height=396&format=png" ><!--[if IE 9]></video><![endif]--><img srcset="'+src+delimiter+'width=768&height=396&format=png" ></picture></figure></div>';}}
else
{o='<div class="item-video '+hasWrapper+'" data-num='+String(i)+'>'+((hasWrapper)?wrapper:'')+'<a class="owl-video" href="'+src+'"></a></div>';}
return o;},_getImgStructure:function(numItem)
{var o=this.datas[numItem];if(o!=undefined)
{return(o.type.toLowerCase()=="img")?'<figure><picture><!--[if IE 9]><video style="display: none;"><![endif]--><source srcset="'+o.src+'?width=1920&height=990&format=png" media="(min-width: 1281px)"><source srcset="'+o.src+'?width=1280&height=660&format=png" media="(min-width: 1025px)"><source srcset="'+o.src+'?width=1024&height=510&format=png" media="(min-width: 767px)"><source srcset="'+o.src+'?width=768&height=396&format=png" media="(min-width: 481px)"><source srcset="'+o.src+'?width=480&height=248&format=png" media="(max-width: 480px)"><source srcset="'+o.src+'?width=768&height=396&format=png" ><!--[if IE 9]></video><![endif]--><img srcset="'+o.src+'?width=768&height=396&format=png" ></picture></figure>':'';}
else
{return'';}},_setSlider:function(i)
{var $this=this;var only_one_img=(this.datas.length==1);if(only_one_img)
{var opts=this.settings.opts;opts.nav=opts.dots=opts.mouseDrag=opts.touchDrag=opts.pullDrag=opts.freeDrag=opts.loop=false;$.each(opts.responsive,function(key,val){val.nav=val.dots=opts.loop=false;});this.$slider.css('cursor','default');}
this.$slider.on('translated.owl.carousel',function(event){$this.main.addClass('loaded');$(this).off('translated.owl.carousel');});this.$slider.on('changed.owl.carousel translated.owl.carousel',function(event){var o=$(event.target),num=event.page.index;if(num>-1&&num!=null)
{var item=o.find('[data-num="'+num+'"]');var func=function()
{$this.main.removeClass('loaded');item.append($this._getImgStructure(num));picturefill();}
if(!$this._hasElement(item.children()))
{func();}
else if(item.hasClass('has-desc')&&!$this._hasElement(item.find('figure')))
{func();}
$this._show_Wrapper();}});var flag=false;this.$slider.on('mousedown',function(event){if(!flag)
{flag=true;setTimeout(function(){flag=false;},100);$(this).toggleClass('unshow-wrapper');}
return false;})
this.$slider.find('.wrapper').on('mousedown touchstart',function(event){event.stopPropagation();});this.$slider.on('change.owl.carousel  dragge.owl.carousel to.owl.carousel remove.owl.carousel',function(event){var o=$(event.target),num=event.page.index;if(num>-1)
{$this._unshow_Wrapper();}});this.$slider.owlCarousel(this.settings.opts);var $owlCarouselPlug=this._getWidgetDatas(this.$slider,'owl.carousel');if($('html').hasClass('no-mobile'))
{$(document).on('keyup',function(e)
{if(e.keyCode==27){$this.remove();}
if(e.keyCode==37){$owlCarouselPlug.prev();}
if(e.keyCode==39){$owlCarouselPlug.next();}});}
if(i!=undefined)
{$owlCarouselPlug.reset(i);this.$slider.find('[data-num="'+i+'"]').parent().addClass('active');}
if(!only_one_img)
{this.$slider.on('mousewheel','.owl-stage',function(e){$this._unshow_Wrapper();if(e.deltaY>0){$this.$slider.trigger('next.owl');}else{$this.$slider.trigger('prev.owl');}
e.preventDefault();});}},_unshow_Wrapper:function()
{this.$slider.addClass('unshow-wrapper');},_show_Wrapper:function()
{this.$slider.removeClass('unshow-wrapper');},_hasElement:function(o){return(o.length!=0);},_hasAnElement:function(o){return(this.main.find(o).length!=0);},_getWidgetDatas:function(o,widgetName){return o.data(widgetName);},_wordInString:function(s,word){return new RegExp('\\b'+word+'\\b','i').test(s);}};$.fn.popupslider=function(options){return this.each(function(){var popupslider=new PopupSlider($(this),options);$(this).data("popupslider",popupslider);});};$.fn.popupslider.defaults={nbr_prefetchImg:10,opts:{items:1,center:true,lazyLoad:true,autoHeight:false,video:true,merge:true,loop:false,responsiveClass:true,stagePadding:0,margin:10,responsive:{0:{nav:false},991:{nav:true}}}};$.fn.popupslider.settings={};})(jQuery);$(document).ready(function()
{$('.WP-popupslider').popupslider();})
;;;(function($){function Slider(element,options)
{this.main=$(element);var $this=this;this.settings=$.extend({},$.fn.slider.defaults,options||{});var has_widgetArea=(this.main.parent().attr('data-sk')=="widget-area");this.settings.opts=jQuery.extend(true,{},(has_widgetArea)?this.settings.opts_widgetArea:this.settings.opts_contentArea);var opts=this.settings.opts;this.$slider=this.main.find('.owl-carousel');this.$items=this.$slider.children();this.$popupslider=$('.WP-popupslider')
this.$popup=this._getWidgetDatas(this.$popupslider,'popupslider');this.nbr_items=this.$slider.children().length;var dataWidget=this.main.attr('data-widget');this.hasPopup=this._wordInString(dataWidget,'has-popup');var dataDesc=this.main.attr('data-widgetDesc');if(dataDesc.length==1)dataDesc+="0";if(dataDesc==""||dataDesc==undefined)dataDesc="00";this.oViewDesc={item:Boolean(parseInt(dataDesc.substring(0,1))),popup:Boolean(parseInt(dataDesc.substring(1)))}
if(!has_widgetArea){if(this._wordInString(dataWidget,'no-dots'))opts.dots=false,$.each(opts.responsive,function(key,val){val.dots=false;});if(this._wordInString(dataWidget,'no-nav'))opts.nav=false,$.each(opts.responsive,function(key,val){val.nav=false;});if(this._wordInString(dataWidget,'one-item'))
{opts.items=1;$.each(opts.responsive,function(key,val){val.items=1;});if(this.nbr_items==1)opts.nav=opts.dots=opts.loop=opts.center=false,$.each(opts.responsive,function(key,val){val.nav=val.dots=val.loop=val.center=false;});}
else
{if(this.nbr_items<=3)opts.nav=opts.dots=opts.loop=opts.center=false,$.each(opts.responsive,function(key,val){val.nav=val.dots=val.loop=val.center=false;});}
if(this.hasPopup)opts.loop=opts.center=false,$.each(opts.responsive,function(key,val){val.loop=val.center=false;});}
else
{if(this.nbr_items==1)opts.nav=opts.dots=opts.loop=opts.center=false;}
this.settings.has_video=this._hasElement(this.$slider.find('.item-video'));opts.video=this.settings.has_video;if(this.settings.has_video)opts.autoHeight=false;if($('html').hasClass('lte9')||$('html').hasClass('ie10')||$('html').hasClass('ie11'))opts.autoHeight=true;opts.lazyLoad=(has_widgetArea);if(opts.lazyLoad)this.$slider.addClass('lazyloading');if(this.oViewDesc.item)
{var desc,obj,elemStart=(opts.lazyLoad)?'<span class="desc">':'<figcaption>',elemEnd=(opts.lazyLoad)?'</span>':'</figcaption>';this.$items.each(function(index)
{desc=$(this).attr('rev');obj=(opts.lazyLoad)?$(this):$(this).find('figure');if(desc!=""&&desc!=undefined)obj.prepend(elemStart+desc+elemEnd);});}
this.popupData=[];if(this.hasPopup)this._init_popupDatas();this._init();}
Slider.prototype={_init:function()
{this.$slider.owlCarousel(this.settings.opts);var $this=this;this.$slider.find('.item').parent().on('click',function()
{if($this._hasElement($this.$popupslider)&&$this.$popup!=undefined)$this.$popup.addSlider($this.popupData,parseInt($(this).find('.item').attr('data-num'))+1);})},_init_popupDatas:function()
{var $this=this,isLazyload=this.settings.opts.lazyLoad;this.$items.each(function(index)
{var type=$(this).attr('data-type'),src=$(this).attr('data-srcpopup'),desc=($this.oViewDesc.popup)?$(this).attr('rev'):"";if(type=="img")
{$this.popupData.push({type:(type!=undefined)?type:"img",src:(src!=undefined)?src:"",desc:(desc!=undefined)?desc:""});}
else
{var owlVideo=$(this).find('.owl-video'),videoInfo=$this._getVideoInfo($(this));$this.popupData.push({type:'video',src:owlVideo.attr('href'),videoInfo:videoInfo,desc:(desc!=undefined)?desc:""});}
var i=index+1;$(this).attr('data-num',i-1);});},_getVideoInfo:function(el)
{var type,id,url=el.find('.owl-video').attr('href');if(url)
{id=url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1)
{type='youtube';}
else if(id[3].indexOf('vimeo')>-1)
{type='vimeo';}
id=id[6];return{type:type,id:id};}
else
{throw new Error('Missing video link.');}},_hasElement:function(o){return(o.length!=0);},_hasAnElement:function(o){return(this.main.find(o).length!=0);},_getWidgetDatas:function(o,widgetName){return o.data(widgetName);},_wordInString:function(s,word){return new RegExp('\\b'+word+'\\b','i').test(s);}};$.fn.slider=function(options){return this.each(function(){var slider=new Slider($(this),options);$(this).data("slider",slider);});};$.fn.slider.defaults={opts_contentArea:{items:1,center:true,lazyLoad:false,autoHeight:false,video:true,merge:true,loop:true,responsiveClass:true,stagePadding:0,margin:10,responsive:{0:{items:1,nav:false,loop:false},767:{items:3,nav:false,loop:true}}},opts_widgetArea:{items:1,center:true,lazyLoad:true,autoHeight:false,video:true,merge:true,loop:false,responsiveClass:true,stagePadding:0,margin:10}};$.fn.slider.settings={};})(jQuery);$(document).ready(function()
{$('.WG-slider').slider({opts_contentArea:{items:1,center:true,lazyLoad:false,autoHeight:false,video:true,merge:true,loop:true,responsiveClass:true,stagePadding:0,margin:10,responsive:{0:{items:1,nav:false,loop:false},767:{items:3,nav:true,loop:true}}},opts_widgetArea:{items:1,center:true,lazyLoad:false,autoHeight:false,video:true,merge:true,loop:false,responsiveClass:true,stagePadding:0,margin:10}});})
;;;(function($){function SliderGallery(element,options)
{this.main=$(element);var $this=this;this.settings=$.extend({},$.fn.slidergallery.defaults,options||{});var has_widgetArea=(this.main.parent().attr('data-sk')=="widget-area");this.settings.opts=jQuery.extend(true,{},(has_widgetArea)?this.settings.opts_widgetArea:this.settings.opts_contentArea);var opts=this.settings.opts;this.$slider=this.main.find('.owl-carousel');this.$items=this.$slider.children();this.$popupslider=$('.WP-popupslider')
this.$popup=this._getWidgetDatas(this.$popupslider,'popupslider');var dataWidget=this.main.attr('data-widget');this.hasPopup=this._wordInString(dataWidget,'has-popup');if(this.settings.opts.lazyLoad)this.$slider.addClass('lazyloading');this.nbr_items=this.$slider.children().length;if(this.nbr_items<=3)opts.nav=opts.dots=opts.loop=false;var dataDesc=this.main.attr('data-widgetDesc');if(dataDesc.length==1)dataDesc+="0";if(dataDesc==""||dataDesc==undefined)dataDesc="00";this.oViewDesc={popup:Boolean(parseInt(dataDesc.substring(1)))}
this.popupData=[];if(this.hasPopup)this._init_popupDatas();this._init();}
SliderGallery.prototype={_init:function()
{var $this=this;this._init_thumbnail();this.$slider.owlCarousel(this.settings.opts);this.$slider.find('.owl-item').on('click',function()
{if($this._hasElement($this.$popupslider)&&$this.$popup!=undefined)$this.$popup.addSlider($this.popupData,parseInt($(this).find('.item-num').attr('data-num'))+1);})},_init_thumbnail:function()
{var opts=this.settings.opts;var has_widgetArea=(this.main.parent().attr('data-sk')=="widget-area");if(has_widgetArea)opts.items=4,$.each(opts.responsive,function(key,val){val.items=4;val.nav=false;});var dataWidget=this.main.attr('data-widget');if(this._wordInString(dataWidget,'no-dots'))opts.dots=false,$.each(opts.responsive,function(key,val){val.dots=false;});if(this._wordInString(dataWidget,'no-nav'))opts.nav=false,$.each(opts.responsive,function(key,val){val.nav=false;});},_init_popupDatas:function()
{var $this=this,isLazyload=this.settings.opts.lazyLoad;this.$items.each(function(index)
{var desc=($this.oViewDesc.popup)?$(this).attr('rev'):"",type=$(this).attr('data-type');if(type=="img")
{$this.popupData.push({type:type,src:$(this).attr('data-srcpopup'),desc:(desc!=undefined)?desc:""});}
else
{var owlVideo=$(this).find('.owl-video'),videoInfo=$this._getVideoInfo($(this));if(isLazyload)$(this).addClass('lazy-loaded');$this.popupData.push({type:'video',src:owlVideo.attr('href'),videoInfo:videoInfo,desc:(desc!=undefined)?desc:""});$this._createVideoThumbnail($(this),index,videoInfo);}
var i=index+1;$(this).attr('data-num',i-1).addClass('item-num');});},_createVideoThumbnail:function(videoEl,i,videoInfo)
{var $this=this,ahref=videoEl.find('.owl-video');ahref.replaceWith("<span class='picture'><img /></span>");var pict=videoEl.find('.picture'),img=videoEl.find('img');if(videoInfo.type==='youtube')
{$this._addVideoThumbnail(videoEl,img,"http://img.youtube.com/vi/"+videoInfo.id+"/hqdefault.jpg",videoInfo.type);}
else if(videoInfo.type==='vimeo')
{pict.addClass('owl-video-wrapper');$.ajax({type:'GET',url:'http://vimeo.com/api/v2/video/'+videoInfo.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data)
{pict.removeClass('owl-video-wrapper');$this._addVideoThumbnail(videoEl,img,data[0].thumbnail_large,videoInfo.type);}});}
else
{throw new Error('No video thumbnail available.');}},_addVideoThumbnail:function(videoEl,img,path,type)
{if(path!=undefined)
{var w=h="150";img.attr('src','/Site/Skins/Default/Widgets/Gallery/Img/empty.png?width='+w+'&height='+h+'&format=png').attr('width',w).attr('height',h);videoEl.find('.picture').css('background-image','url("'+path+'")');videoEl.addClass('video-thumb '+type);}},_getVideoInfo:function(el)
{var type,id,url=el.find('.owl-video').attr('href');if(url)
{id=url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1)
{type='youtube';}
else if(id[3].indexOf('vimeo')>-1)
{type='vimeo';}
id=id[6];return{type:type,id:id};}
else
{throw new Error('Missing video link.');}},_hasElement:function(o){return(o.length!=0);},_hasAnElement:function(o){return(this.main.find(o).length!=0);},_getWidgetDatas:function(o,widgetName){return o.data(widgetName);},_wordInString:function(s,word){return new RegExp('\\b'+word+'\\b','i').test(s);}};$.fn.slidergallery=function(options){return this.each(function(){var slidergallery=new SliderGallery($(this),options);$(this).data("slidergallery",slidergallery);});};$.fn.slidergallery.defaults={opts_contentArea:{items:8,center:false,lazyLoad:true,autoHeight:false,video:false,merge:true,loop:false,responsiveClass:true,stagePadding:0,margin:10,responsive:{0:{items:5,nav:false},767:{items:8,nav:true}}},opts_widgetArea:{items:5,center:false,lazyLoad:true,autoHeight:false,video:false,merge:true,loop:false,responsiveClass:true,stagePadding:0,margin:10,responsive:{0:{nav:false},767:{nav:true}}}};$.fn.slidergallery.settings={};})(jQuery);$(document).ready(function()
{$('.WG-slidergallery').slidergallery();})
;;;(function($){function BGbigimage(element,options)
{this.main=$(element);this.$bgWrapper=this.main.find('.wrapper');this.$bgCaption=this.main.find('.caption');this.WindowW=null;this.onResized=null;this.size='undefined';this.responsive_image_sizes=[{size:0,label:'XS'},{size:480,label:'S'},{size:768,label:'M'},{size:991,label:'HD'},{size:1280,label:'UHD'},{size:1601,label:'XHD'},{size:9000,label:'XHD'}];this._init();}
BGbigimage.prototype={_init:function()
{var $this=this;$(window).resize(function()
{clearTimeout($this.onResized);$this.onResized=setTimeout(function(){$this._resized();},100);});this._resized();},_setResponsiveBGimg:function(label)
{var $this=this;if(this.$bgWrapper.length!=0&&this.size!=label)
this.size=label;this.$bgWrapper.each(function()
{$this._setCSS($(this),label);});if(this.$bgCaption.length!=0&&this.size!=label)
this.size=label;this.$bgCaption.each(function(i)
{$this._setCSS($(this),label);});},_setCSS:function(o,label)
{var url=o.attr("data-bg-"+label);o.css("background-image",(url!=undefined)?"url("+url+")":"none");},_resized:function()
{var $windowW=$(document).width();if($windowW!=this.WindowW)
{var $this=this,s;$.each($this.responsive_image_sizes,function(i)
{s=$this.responsive_image_sizes[i];if(Modernizr.mq('only all and (max-width: '+s.size+'px)'))
{var n=(i==0)?0:(i-1);$this._setResponsiveBGimg($this.responsive_image_sizes[n].label);return false;}});this.WindowW=$windowW;}}};$.fn.bgBigimage=function(options){return this.each(function(){var o=new BGbigimage($(this),options);$(this).data("bgBigimage",o);});};})(jQuery);$(document).ready(function()
{$('.WG-bigimage[data-widget~="has-bg"]').each(function(i)
{$(this).bgBigimage();});$('.WG-bigimage_cap').each(function(i)
{$(this).bgBigimage();});})
;;;