!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i').val(m.extraData[d].value).appendTo(w)[0]:e('').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand ("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;Ec;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;li;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); (function($){ if(typeof _wpcf7=='undefined'||_wpcf7===null) _wpcf7={}; _wpcf7=$.extend({ cached: 0 }, _wpcf7); $(function(){ _wpcf7.supportHtml5=$.wpcf7SupportHtml5(); $('div.wpcf7 > form').wpcf7InitForm(); }); $.fn.wpcf7InitForm=function(){ this.ajaxForm({ beforeSubmit: function(arr, $form, options){ $form.wpcf7ClearResponseOutput(); $form.find('[aria-invalid]').attr('aria-invalid', 'false'); $form.find('img.ajax-loader').css({ visibility: 'visible' }); return true; }, beforeSerialize: function($form, options){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val(''); }); return true; }, data: { '_wpcf7_is_ajax_call': 1 }, dataType: 'json', success: $.wpcf7AjaxSuccess, error: function(xhr, status, error, $form){ var e=$('
').text(error.message); $form.after(e); }}); if(_wpcf7.cached) this.wpcf7OnloadRefill(); this.wpcf7ToggleSubmit(); this.find('.wpcf7-submit').wpcf7AjaxLoader(); this.find('.wpcf7-acceptance').click(function(){ $(this).closest('form').wpcf7ToggleSubmit(); }); this.find('.wpcf7-exclusive-checkbox').wpcf7ExclusiveCheckbox(); this.find('.wpcf7-list-item.has-free-text').wpcf7ToggleCheckboxFreetext(); this.find('[placeholder]').wpcf7Placeholder(); if(_wpcf7.jqueryUi&&! _wpcf7.supportHtml5.date){ this.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(_wpcf7.jqueryUi&&! _wpcf7.supportHtml5.number){ this.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); }}; $.wpcf7AjaxSuccess=function(data, status, xhr, $form){ if(! $.isPlainObject(data)||$.isEmptyObject(data)) return; var $responseOutput=$form.find('div.wpcf7-response-output'); $form.wpcf7ClearResponseOutput(); $form.find('.wpcf7-form-control').removeClass('wpcf7-not-valid'); $form.removeClass('invalid spam sent failed'); if(data.captcha) $form.wpcf7RefillCaptcha(data.captcha); if(data.quiz) $form.wpcf7RefillQuiz(data.quiz); if(data.invalids){ $.each(data.invalids, function(i, n){ $form.find(n.into).wpcf7NotValidTip(n.message); $form.find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid'); $form.find(n.into).find('[aria-invalid]').attr('aria-invalid', 'true'); }); $responseOutput.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); $(data.into).trigger('invalid.wpcf7'); }else if(1==data.spam){ $responseOutput.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); $(data.into).trigger('spam.wpcf7'); }else if(1==data.mailSent){ $responseOutput.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); if(data.onSentOk) $.each(data.onSentOk, function(i, n){ eval(n) }); $(data.into).trigger('mailsent.wpcf7'); }else{ $responseOutput.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); $(data.into).trigger('mailfailed.wpcf7'); } if(data.onSubmit) $.each(data.onSubmit, function(i, n){ eval(n) }); $(data.into).trigger('submit.wpcf7'); if(1==data.mailSent) $form.resetForm(); $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); $responseOutput.append(data.message).slideDown('fast'); $responseOutput.attr('role', 'alert'); $.wpcf7UpdateScreenReaderResponse($form, data); } $.fn.wpcf7ExclusiveCheckbox=function(){ return this.find('input:checkbox').click(function(){ $(this).closest('.wpcf7-checkbox').find('input:checkbox').not(this).removeAttr('checked'); }); }; $.fn.wpcf7Placeholder=function(){ if(_wpcf7.supportHtml5.placeholder) return this; return this.each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')) $(this).val('').removeClass('placeheld'); }); $(this).blur(function(){ if(''==$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); }; $.fn.wpcf7AjaxLoader=function(){ return this.each(function(){ var loader=$('') .attr({ src: _wpcf7.loaderUrl, alt: _wpcf7.sending }) .css('visibility', 'hidden'); $(this).after(loader); }); }; $.fn.wpcf7ToggleSubmit=function(){ return this.each(function(){ var form=$(this); if(this.tagName.toLowerCase()!='form') form=$(this).find('form').first(); if(form.hasClass('wpcf7-acceptance-as-validation')) return; var submit=form.find('input:submit'); if(! submit.length) return; var acceptances=form.find('input:checkbox.wpcf7-acceptance'); if(! acceptances.length) return; submit.removeAttr('disabled'); acceptances.each(function(i, n){ n=$(n); if(n.hasClass('wpcf7-invert')&&n.is(':checked') || ! n.hasClass('wpcf7-invert')&&! n.is(':checked')) submit.attr('disabled', 'disabled'); }); }); }; $.fn.wpcf7ToggleCheckboxFreetext=function(){ return this.each(function(){ var $wrap=$(this).closest('.wpcf7-form-control'); if($(this).find(':checkbox, :radio').is(':checked')){ $(this).find(':input.wpcf7-free-text').prop('disabled', false); }else{ $(this).find(':input.wpcf7-free-text').prop('disabled', true); } $wrap.find(':checkbox, :radio').change(function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); var $freetext=$(':input.wpcf7-free-text', $wrap); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); }; $.fn.wpcf7NotValidTip=function(message){ return this.each(function(){ var $into=$(this); $into.hide().append('' + message + '').slideDown('fast'); if($into.is('.use-floating-validation-tip *')){ $('.wpcf7-not-valid-tip', $into).mouseover(function(){ $(this).wpcf7FadeOut(); }); $(':input', $into).focus(function(){ $('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut(); }); }}); }; $.fn.wpcf7FadeOut=function(){ return this.each(function(){ $(this).animate({ opacity: 0 }, 'fast', function(){ $(this).css({'z-index': -100}); }); }); }; $.fn.wpcf7OnloadRefill=function(){ return this.each(function(){ var url=$(this).attr('action'); if(0 < url.indexOf('#')) url=url.substr(0, url.indexOf('#')); var id=$(this).find('input[name="_wpcf7"]').val(); var unitTag=$(this).find('input[name="_wpcf7_unit_tag"]').val(); $.getJSON(url, { _wpcf7_is_ajax_call: 1, _wpcf7: id, _wpcf7_request_ver: $.now() }, function(data){ if(data&&data.captcha) $('#' + unitTag).wpcf7RefillCaptcha(data.captcha); if(data&&data.quiz) $('#' + unitTag).wpcf7RefillQuiz(data.quiz); } ); }); }; $.fn.wpcf7RefillCaptcha=function(captcha){ return this.each(function(){ var form=$(this); $.each(captcha, function(i, n){ form.find(':input[name="' + i + '"]').clearFields(); form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]); }); }); }; $.fn.wpcf7RefillQuiz=function(quiz){ return this.each(function(){ var form=$(this); $.each(quiz, function(i, n){ form.find(':input[name="' + i + '"]').clearFields(); form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]); form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]); }); }); }; $.fn.wpcf7ClearResponseOutput=function(){ return this.each(function(){ $(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked').removeAttr('role'); $(this).find('span.wpcf7-not-valid-tip').remove(); $(this).find('img.ajax-loader').css({ visibility: 'hidden' }); }); }; $.wpcf7UpdateScreenReaderResponse=function($form, data){ $('.wpcf7 .screen-reader-response').html('').attr('role', ''); if(data.message){ var $response=$form.siblings('.screen-reader-response').first(); $response.append(data.message); if(data.invalids){ var $invalids=$('
    '); $.each(data.invalids, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }} $.wpcf7SupportHtml5=function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=['email', 'url', 'tel', 'number', 'range', 'date']; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[value]=input.type!=='text'; }); return features; };})(jQuery); var cff_js_exists=(typeof cff_js_exists!=='undefined') ? true:false; if(!cff_js_exists){ function cff_init(){ jQuery('#cff .cff-item').each(function(){ var $self=jQuery(this); if($self.find('.cff-viewpost-facebook').parent('p').length){ $self.find('.cff-viewpost-facebook').unwrap('p'); } if($self.find('.cff-author').parent('p').length){ $self.find('.cff-author').eq(1).unwrap('p'); $self.find('.cff-author').eq(1).remove(); } if($self.find('#cff .cff-link').parent('p').length){ $self.find('#cff .cff-link').unwrap('p'); } var expanded=false, $post_text=$self.find('.cff-post-text .cff-text'), text_limit=$self.closest('#cff').attr('data-char'); if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999; if($post_text.find('a.cff-post-text-link').length) $post_text=$self.find('.cff-post-text .cff-text a'); var full_text=$post_text.html(); if(full_text==undefined) full_text=''; var cff_trunc_regx=new RegExp(/(<[^>]*>)/g); var cff_trunc_counter=0; full_text_arr=full_text.split(cff_trunc_regx); for (var i=0, len=full_text_arr.length; i < len; i++){ if(!(cff_trunc_regx.test(full_text_arr[i]))){ if(cff_trunc_counter==text_limit){ full_text_arr.splice(i, 1); continue; } cff_trunc_counter=cff_trunc_counter + full_text_arr[i].length; if(cff_trunc_counter > text_limit){ var diff=cff_trunc_counter - text_limit; full_text_arr[i]=full_text_arr[i].slice(0, -diff); cff_trunc_counter=text_limit; if(full_text.length > text_limit) $self.find('.cff-expand').show(); }} } var short_text=full_text_arr.join(''); short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g, ""); var lastChar=short_text.substr(short_text.length - 1); if(lastChar=='<') short_text=short_text.substring(0, short_text.length - 1); short_text=short_text.replace(/(
    \s*)+$/,''); short_text=short_text.replace(/(\s*)+$/,''); $post_text.html(short_text); $self.find('.cff-expand a').unbind('click').bind('click', function(e){ e.preventDefault(); var $expand=jQuery(this), $more=$expand.find('.cff-more'), $less=$expand.find('.cff-less'); if(expanded==false){ $post_text.html(full_text); expanded=true; $more.hide(); $less.show(); }else{ $post_text.html(short_text); expanded=false; $more.show(); $less.hide(); } cffLinkHashtags(); $post_text.find('a').attr('target', '_blank'); }); $post_text.find('a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow' }); $sharedLink=$self.find('.cff-shared-link'); if($sharedLink.text()==''){ $sharedLink.remove(); } function cffLinkHashtags(){ var cffTextStr=$self.find('.cff-text').html(), cffDescStr=$self.find('.cff-post-desc').html(), regex=/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi, linkcolor=$self.find('.cff-text').attr('data-color'); function replacer(hash){ var replacementString=jQuery.trim(hash); if(/^#[0-9A-F]{6}$/i.test(replacementString)){ return replacementString; }else{ return ' ' + replacementString + ''; }} if(typeof cfflinkhashtags=='undefined') cfflinkhashtags='true'; if(cfflinkhashtags=='true'){ var $cffText=$self.find('.cff-text'); if($cffText.length > 0){ cffTextStr=cffTextStr.replace(/
    /g, "
    "); $cffText.html(cffTextStr.replace(regex , replacer)); }} if($self.find('.cff-post-desc').length > 0) $self.find('.cff-post-desc').html(cffDescStr.replace(regex , replacer)); } cffLinkHashtags(); $self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow' }); $self.find('.cff-share-link').unbind().bind('click', function(){ $self.find('.cff-share-tooltip').toggle(); }); }); } cff_init(); }; jQuery(function($){ var using_mobile_browser=false; if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){ using_mobile_browser=true; } var nectarPageHeader; function fullscreenHeightCalc(){ var pageHeaderOffset=nectarPageHeader.offset().top; nectarPageHeader.css('height',(parseInt(window.innerHeight) - parseInt(pageHeaderOffset)) +'px'); } if(using_mobile_browser&&$('#page-header-bg.fullscreen-header').length > 0){ nectarPageHeader=$('#page-header-bg'); fullscreenHeightCalc(); var $windowDOMWidth=window.innerWidth, $windowDOMHeight=window.innerHeight; $(window).resize(function(){ if(($(window).width()!=$windowDOMWidth&&$(window).height!=$windowDOMHeight)){ fullscreenHeightCalc(); $windowDOMWidth=window.innerWidth; $windowDOMHeight=window.innerHeight; }}); } function portfolioFullScreenSliderCalcs(){ var $bodyBorderSize=($('.body-border-top').length > 0&&$(window).width() > 1000) ? $('.body-border-top').height(): 0; $('.nectar_fullscreen_zoom_recent_projects').each(function(){ if($(this).parents('.first-section').length > 0){ $(this).css('height',$(window).height() - $(this).offset().top - $bodyBorderSize); }else{ $(this).css('height',$(window).height()); }}); } if(using_mobile_browser&&$('.nectar_fullscreen_zoom_recent_projects').length > 0){ portfolioFullScreenSliderCalcs(); } function centeredNavBottomBarReposition(){ var $headerOuter=$('#header-outer'); var $headerSpan9=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_9'); var $headerSpan3=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_3'); var $secondaryHeader=$('#header-secondary-outer'); var $logoLinkClone=$headerSpan3.find('#logo').clone(); if($logoLinkClone.is('[data-supplied-ml="true"]')){ $logoLinkClone.find('img:not(.mobile-only-logo)').remove(); } $logoLinkClone.find('img.starting-logo').remove(); function centeredNavBottomBarSecondary(){ if($('body.mobile').length > 0){ $('#header-outer').css('margin-top',''); }else{ if($('#header-outer .span_9').css('display')=='none'){ $('#header-outer').css('margin-top',''); }else if($('#header-outer .span_9').css('display')!='none'&&parseInt($('#header-outer').css('top')) > 0){ $('#header-outer').css('top',''); }} } if($secondaryHeader.length > 0){ if($('#header-outer[data-remove-fixed="1"]').length==0&&$('#header-outer[data-condense="true"]').length > 0){ setTimeout(function(){ centeredNavBottomBarSecondary(); },50); } $secondaryHeader.addClass('centered-menu-bottom-bar'); } if($('#header-outer[data-condense="true"]').length > 0){ $headerSpan9.prepend($logoLinkClone); }} if($('#header-outer[data-format="centered-menu-bottom-bar"]').length > 0){ centeredNavBottomBarReposition(); } $('#page-header-bg[data-animate-in-effect="zoom-out"]').addClass('loaded'); function sliderFontOverrides(){ var $overrideCSS=''; $('.nectar-slider-wrap').each(function(i){ if($(this).find('.swiper-container[data-tho]').length > 0){ $tho=$(this).find('.swiper-container').attr('data-tho'); $tco=$(this).find('.swiper-container').attr('data-tco'); $pho=$(this).find('.swiper-container').attr('data-pho'); $pco=$(this).find('.swiper-container').attr('data-pco'); if($tho!='auto'||$tco!='auto'){ $overrideCSS +='@media only screen and (max-width: 1000px) and (min-width: 690px){'; if($tho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $tho + 'px!important; line-height:' + (parseInt($tho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $tco + 'px!important; line-height:' + (parseInt($tco) + 10) + 'px!important; }'; $overrideCSS +='}'; } if($pho!='auto'||$pco!='auto'){ $overrideCSS +='@media only screen and (max-width: 690px){'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $pho + 'px!important; line-height:' + (parseInt($pho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $pco + 'px!important; line-height:' + (parseInt($pco) + 10) + 'px!important; }'; $overrideCSS +='}'; }} }); if($overrideCSS.length > 1){ var head=document.head||document.getElementsByTagName('head')[0]; var style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=$overrideCSS; }else{ style.appendChild(document.createTextNode($overrideCSS)); } head.appendChild(style); $('.nectar-slider-wrap .content').css('visibility','visible'); }} sliderFontOverrides(); function centeredLogoMargins(){ if($('#header-outer[data-format="centered-logo-between-menu"]').length > 0&&$(window).width() > 1000){ $midnightSelector=($('#header-outer .midnightHeader').length > 0) ? '> .midnightHeader:first-child':''; var $navItemLength=$('#header-outer[data-format="centered-logo-between-menu"] '+$midnightSelector+' nav > .sf-menu > li').length; if($('#header-outer #social-in-menu').length > 0){ $navItemLength--; } $centerLogoWidth=($('#header-outer .row .col.span_3 #logo img:visible').length==0) ? parseInt($('#header-outer .row .col.span_3').width()):parseInt($('#header-outer .row .col.span_3 img:visible').width()); $extraMenuSpace=($('#header-outer[data-lhe="animated_underline"]').length > 0) ? parseInt($('#header-outer header#top nav > ul > li:first-child > a').css('margin-right')):parseInt($('#header-outer header#top nav > ul > li:first-child > a').css('padding-right')); if($extraMenuSpace > 30){ $extraMenuSpace +=45; }else if($extraMenuSpace > 20){ $extraMenuSpace +=40; }else{ $extraMenuSpace +=30; } $('#header-outer[data-format="centered-logo-between-menu"] nav > .sf-menu > li:nth-child('+Math.floor($navItemLength/2)+')').css({'margin-right': ($centerLogoWidth+$extraMenuSpace) + 'px'}).addClass('menu-item-with-margin'); $leftMenuWidth=0; $rightMenuWidth=0; $('#header-outer[data-format="centered-logo-between-menu"] '+$midnightSelector+' nav > .sf-menu > li:not(#social-in-menu)').each(function(i){ if(i+1 <=Math.floor($navItemLength/2)){ $leftMenuWidth +=$(this).width(); }else{ $rightMenuWidth +=$(this).width(); }}); var $menuDiff=Math.abs($rightMenuWidth - $leftMenuWidth); if($leftMenuWidth > $rightMenuWidth) $('#header-outer .row > .col.span_9').css('padding-right',$menuDiff); else $('#header-outer .row > .col.span_9').css('padding-left',$menuDiff); $('#header-outer[data-format="centered-logo-between-menu"] nav').css('visibility','visible'); }} var usingLogoImage=($('#header-outer[data-using-logo="1"]').length > 0) ? true:false; if(!usingLogoImage){ centeredLogoMargins(); } else if(usingLogoImage&&$('#header-outer[data-format="centered-logo-between-menu"]').length > 0&&$('header#top #logo img:first[src]').length > 0){ var tempLogoImg=new Image(); tempLogoImg.src=$('header#top #logo img:first').attr('src'); tempLogoImg.onload=function(){ centeredLogoMargins(); };} function nectarFullWidthSections(){ var $windowInnerWidth=window.innerWidth; var $scrollBar=($('#ascrail2000').length > 0&&$windowInnerWidth > 1000) ? -13:0; var $bodyBorderWidth=($('.body-border-right').length > 0&&$windowInnerWidth > 1000) ? parseInt($('.body-border-right').width())*2:0; var $justOutOfSight; if($('#boxed').length==1){ $justOutOfSight=((parseInt($('.container-wrap').width()) - parseInt($('.main-content').width())) / 2) + 4; }else{ var $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&$windowInnerWidth >=1000) ? 180:0; var $leftHeaderSize=($('#header-outer[data-format="left-header"]').length > 0&&$windowInnerWidth >=1000) ? parseInt($('#header-outer[data-format="left-header"]').width()):0; if($(window).width() - $leftHeaderSize - $bodyBorderWidth <=parseInt($('.main-content').css('max-width'))){ var $windowWidth=parseInt($('.main-content').css('max-width')); if($extResponsivePadding==180) $windowWidth=$windowWidth - $scrollBar; }else{ var $windowWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth; } var $contentWidth=parseInt($('.main-content').css('max-width')); if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; } $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) } $('.carousel-wrap[data-full-width="true"], .portfolio-items[data-col-num="elastic"]:not(.fullwidth-constrained), .full-width-content').each(function(){ var $leftHeaderSize=($('#header-outer[data-format="left-header"]').length > 0&&$windowInnerWidth >=1000) ? parseInt($('#header-outer[data-format="left-header"]').width()):0; var $bodyBorderWidth=($('.body-border-right').length > 0&&$windowInnerWidth > 1000) ? parseInt($('.body-border-right').width())*2:0; if($('#boxed').length==1){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0&&$(this).parents('.post-area').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; $windowWidth=$(window).width() - $bodyBorderWidth; $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) }else{ if($(this).parents('.page-submenu').length > 0) $justOutOfSight=((parseInt($('.container-wrap').width()) - $mainContentWidth) / 2); else $justOutOfSight=((parseInt($('.container-wrap').width()) - $mainContentWidth) / 2) + 4; }}else{ if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0&&$(this).parents('.post-area').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; $windowWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth; }else{ var $mainContentMaxWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').css('max-width')):parseInt($(this).parents('.container').css('max-width')); if($('#boxed').length==0&&$(this).hasClass('portfolio-items')&&$(this).is('[data-gutter*="px"]')&&$(this).attr('data-gutter').length > 0&&$(this).attr('data-gutter')!='none'){ $scrollBar=($('#ascrail2000').length > 0&&$windowInnerWidth > 1000) ? -13:0; } if($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentMaxWidth){ $windowWidth=$mainContentMaxWidth; if($extResponsivePadding==180) $windowWidth=$windowWidth - $scrollBar; } $contentWidth=$mainContentMaxWidth; $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&window.innerWidth >=1000) ? 180:0; if($leftHeaderSize > 0) $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&window.innerWidth >=1000) ? 120:0; } $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) } var $extraSpace=0; if($(this).hasClass('carousel-wrap')) $extraSpace=1; if($(this).hasClass('portfolio-items')) $extraSpace=5; var $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):$(window).width() - $leftHeaderSize - $bodyBorderWidth +$extraSpace + $scrollBar ; if($('#boxed').length==0&&$(this).hasClass('portfolio-items')&&$(this).is('[data-gutter*="px"]')&&$(this).attr('data-gutter').length > 0&&$(this).attr('data-gutter')!='none'){ if($(window).width() > 1000) $carouselWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth + $scrollBar + 3 else $carouselWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth + $scrollBar } if($(this).parent().hasClass('default-style')){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('#boxed').length!=0){ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):$(window).width() - $leftHeaderSize + $extraSpace + $scrollBar ; }else{ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.025) + $extraSpace + $scrollBar ; $windowWidth=($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentWidth) ? $mainContentWidth:($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.025); $justOutOfSight=Math.ceil((($windowWidth + $scrollBar - $mainContentWidth) / 2)) }} else if($(this).parent().hasClass('spaced')){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('#boxed').length!=0){ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2) - ($(window).width()*.02):$(window).width() + $extraSpace + $scrollBar ; }else{ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):($(window).width()- $leftHeaderSize - $bodyBorderWidth) - Math.ceil(($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.02) + $extraSpace + $scrollBar ; var $windowWidth2=($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentWidth) ? $mainContentWidth:($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.02); $justOutOfSight=Math.ceil((($windowWidth2 + $scrollBar - $mainContentWidth) / 2) +2) }} if(!$(this).parents('.span_9').length > 0&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'&&$(this).parent().attr('id')!='portfolio-extra' && !$(this).find('.carousel-wrap[data-full-width="true"]').length > 0 && !$(this).find('.nectar-carousel-flickity-fixed-content').length > 0 && !$(this).find('.portfolio-items:not(".carousel")[data-col-num="elastic"]').length > 0){ if($('.single-product').length > 0&&$(this).parents('#tab-description').length > 0&&$(this).parents('.full-width-tabs').length==0){ $(this).css({ 'visibility': 'visible' }); }else{ if($(this).hasClass('portfolio-items')){ $(this).css({ 'transform': 'translateX(-'+ $justOutOfSight + 'px)', 'margin-left': 0, 'left': 0, 'width': $carouselWidth, 'visibility': 'visible' }); }else{ $(this).css({ 'left': 0, 'margin-left': - $justOutOfSight, 'width': $carouselWidth, 'visibility': 'visible' }); }} }else if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){ $(this).css({ 'left': 0, 'margin-left': - $justOutOfSight, 'width': $carouselWidth, 'visibility': 'visible' }); }else{ $(this).css({ 'margin-left': 0, 'width': 'auto', 'left': '0', 'visibility': 'visible' }); }}); } if($('#nectar_fullscreen_rows').length==0){ nectarFullWidthSections(); }}); !function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var c in b)if(b.hasOwnProperty(c)){if(e=[],t=b[c],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(g=e[f],h=W.style[g],c(g,"-")&&(g=s(g)),W.style[g]!==n){if(o||r(a,"undefined"))return d(),"pfx"==t?g:!0;try{W.style[g]=a}catch(y){}if(W.style[g]!=h)return d(),"pfx"==t?g:!0}return d(),!1}function h(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+B.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?g(s,t,a,o):(s=(e+" "+P.join(i+" ")+i).split(" "),f(s,t,n))}function v(e,t,r){return h(e,n,n,t,r)}var y=[],b=[],x={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("applicationcache","applicationCache"in e),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("postmessage","postMessage"in e),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T=!1;try{T="WebSocket"in e&&2===e.WebSocket.CLOSING}catch(w){}Modernizr.addTest("websockets",T),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e),Modernizr.addTest("webworkers","Worker"in e);var S=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];x._prefixes=S;var C=t.documentElement,E="svg"===C.nodeName.toLowerCase();E||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,d(t)}function o(e){var t=y[e[h]];return t||(t={},v++,e[h]=v,y[v]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():g.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),c=s.length;c>i;i++)a.createElement(s[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function d(e){e||(e=t);var r=o(e);return!b.shivCSS||l||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||c(e,r),e}var l,u,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,g=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",v=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",l="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){l=!0,u=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:u,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:d,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,d(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var k="Moz O ms Webkit",P=x._config.usePrefixes?k.toLowerCase().split(" "):[];x._domPrefixes=P;var _=function(){function e(e,t){var a;return e?(t&&"string"!=typeof t||(t=i(t||"div")),e="on"+e,a=e in t,!a&&r&&(t.setAttribute||(t=i("div")),t.setAttribute(e,""),a="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),a):!1}var r=!("onblur"in t.documentElement);return e}();x.hasEvent=_,Modernizr.addTest("hashchange",function(){return _("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7}),Modernizr.addTest("audio",function(){var e=i("audio"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,""),t.opus=e.canPlayType('audio/ogg; codecs="opus"')||e.canPlayType('audio/webm; codecs="opus"').replace(/^no$/,""),t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("canvas",function(){var e=i("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof i("canvas").getContext("2d").fillText}),Modernizr.addTest("video",function(){var e=i("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("webgl",function(){var t=i("canvas"),n="probablySupportsContext"in t?"probablySupportsContext":"supportsContext";return n in t?t[n]("webgl")||t[n]("experimental-webgl"):"WebGLRenderingContext"in e}),Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",a=0,o=S.length-1;o>a;a++)e=0===a?"to ":"",r+=t+S[a]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(r+=t+"-webkit-"+n);var s=i("a"),c=s.style;return c.cssText=r,(""+c.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("multiplebgs",function(){var e=i("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("opacity",function(){var e=i("a").style;return e.cssText=S.join("opacity:.55;"),/^0.55$/.test(e.opacity)}),Modernizr.addTest("rgba",function(){var e=i("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("inlinesvg",function(){var e=i("div");return e.innerHTML="","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)}),Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=i("a"),r=n.style;return r.cssText=e+S.join(t+";"+e).slice(0,-e.length),-1!==r.position.indexOf(t)});var N=i("input"),R="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),z={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)z[t[n]]=!!(t[n]in N);return z.list&&(z.list=!(!i("datalist")||!e.HTMLDataListElement)),z}(R);var $="search tel url email datetime date month week time datetime-local number range color".split(" "),A={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s="1)",c=0;i>c;c++)N.setAttribute("type",r=e[c]),o="text"!==N.type&&"style"in N,o&&(N.value=s,N.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&N.style.WebkitAppearance!==n?(C.appendChild(N),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(N,null).WebkitAppearance&&0!==N.offsetHeight,C.removeChild(N)):/^(search|tel)$/.test(r)||(o=/^(url|email)$/.test(r)?N.checkValidity&&N.checkValidity()===!1:N.value!=s)),A[e[c]]=!!o;return A}($),Modernizr.addTest("hsla",function(){var e=i("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",c(e.backgroundColor,"rgba")||c(e.backgroundColor,"hsla")});var O="CSS"in e&&"supports"in e.CSS,L="supportsCSS"in e;Modernizr.addTest("supports",O||L);var j={}.toString;Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(j.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(j.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))});var B=x._config.usePrefixes?k.split(" "):[];x._cssomPrefixes=B;var F=function(t){var r,a=S.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=S[i],c=s.toUpperCase()+"_"+r;if(c in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=F;var M=x.testStyles=l,D=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,a=533>t&&e.match(/android/gi);return n||a||r}();D?Modernizr.addTest("fontface",!1):M('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),a=r.sheet||r.styleSheet,o=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",i)}),M('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(e){Modernizr.addTest("generatedcontent",e.offsetHeight>=7)});var I={elem:i("modernizr")};Modernizr._q.push(function(){delete I.elem});var W={style:I.elem.style};Modernizr._q.unshift(function(){delete W.style});var V=x.testProp=function(e,t,r){return g([e],n,t,r)};Modernizr.addTest("textshadow",V("textShadow","1px 1px")),x.testAllProps=h;var H,U=x.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=s(e)),t?h(e,t,n):h(e,"pfx"))};try{H=U("indexedDB",e)}catch(w){}Modernizr.addTest("indexeddb",!!H),H&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in H),x.testAllProps=v,Modernizr.addTest("cssanimations",v("animationName","a",!0)),Modernizr.addTest("backgroundsize",v("backgroundSize","100%",!0)),Modernizr.addTest("borderimage",v("borderImage","url() 1",!0)),Modernizr.addTest("borderradius",v("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",v("boxShadow","1px 1px",!0)),function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=v("columnCount");try{(e=!!t)&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r',preload:!0,css:{},attr:{scrolling:"auto"}},defaultType:"image",animationEffect:"zoom",animationDuration:500,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'',spinnerTpl:'
    ',errorTpl:'

    {{ERROR}}

    ',btnTpl:{download:'',zoom:'',close:'',smallBtn:'',arrowLeft:'',arrowRight:''},parentEl:"body",autoFocus:!1,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:4e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{idleTime:!1,margin:0,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded.
    Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden.
    Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Maßstab"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},u=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),d=function(){var t,n=e.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(n.style[t]!==o)return i[t];return"transitionend"}(),f=function(t){return t&&t.length&&t[0].offsetHeight},p=function(t,o,i){var a=this;a.opts=n.extend(!0,{index:i},n.fancybox.defaults,o||{}),n.fancybox.isMobile&&(a.opts=n.extend(!0,{},a.opts,a.opts.mobile)),o&&n.isArray(o.buttons)&&(a.opts.buttons=o.buttons),a.id=a.opts.id||++c,a.group=[],a.currIndex=parseInt(a.opts.index,10)||0,a.prevIndex=null,a.prevPos=null,a.currPos=0,a.firstRun=null,a.createGroup(t),a.group.length&&(a.$lastFocus=n(e.activeElement).blur(),a.slides={},a.init())};n.extend(p.prototype,{init:function(){var i,a,s,c=this,l=c.group[c.currIndex],u=l.opts,d=n.fancybox.scrollbarWidth;c.scrollTop=r.scrollTop(),c.scrollLeft=r.scrollLeft(),n.fancybox.getInstance()||(n("body").addClass("fancybox-active"),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream?"image"!==l.type&&n("body").css("top",n("body").scrollTop()*-1).addClass("fancybox-iosfix"):!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(d===o&&(i=n('
    ').appendTo("body"),d=n.fancybox.scrollbarWidth=i[0].offsetWidth-i[0].clientWidth,i.remove()),n("head").append('"),n("body,html").addClass("compensate-for-scrollbar"))),s="",n.each(u.buttons,function(t,e){s+=u.btnTpl[e]||""}),a=n(c.translate(c,u.baseTpl.replace("{{buttons}}",s).replace("{{arrows}}",u.btnTpl.arrowLeft+u.btnTpl.arrowRight))).attr("id","fancybox-container-"+c.id).addClass("fancybox-is-hidden").addClass(u.baseClass).data("FancyBox",c).appendTo(u.parentEl),c.$refs={container:a},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){c.$refs[t]=a.find(".fancybox-"+t)}),c.trigger("onInit"),c.activate(),c.jumpTo(c.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang];return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var i=n[e];return i===o?t:i})},createGroup:function(t){var e=this,i=n.makeArray(t);n.each(i,function(t,i){var a,s,r,c,l,u={},d={};n.isPlainObject(i)?(u=i,d=i.opts||i):"object"===n.type(i)&&n(i).length?(a=n(i),d=a.data(),d=n.extend({},d,d.options||{}),d.$orig=a,u.src=d.src||a.attr("href"),u.type||u.src||(u.type="inline",u.src=i)):u={type:"html",src:i+""},u.opts=n.extend(!0,{},e.opts,d),n.isArray(d.buttons)&&(u.opts.buttons=d.buttons),s=u.type||u.opts.type,c=u.src||"",!s&&c&&(c.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":c.match(/\.(pdf)((\?|#).*)?$/i)?s="pdf":(r=c.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i))?(s="video",u.opts.videoFormat||(u.opts.videoFormat="video/"+("ogv"===r[1]?"ogg":r[1]))):"#"===c.charAt(0)&&(s="inline")),s?u.type=s:e.trigger("objectNeedsType",u),u.index=e.group.length,u.opts.$orig&&!u.opts.$orig.length&&delete u.opts.$orig,!u.opts.$thumb&&u.opts.$orig&&(u.opts.$thumb=u.opts.$orig.find("img:first")),u.opts.$thumb&&!u.opts.$thumb.length&&delete u.opts.$thumb,"function"===n.type(u.opts.caption)&&(u.opts.caption=u.opts.caption.apply(i,[e,u])),"function"===n.type(e.opts.caption)&&(u.opts.caption=e.opts.caption.apply(i,[e,u])),u.opts.caption instanceof n||(u.opts.caption=u.opts.caption===o?"":u.opts.caption+""),"ajax"===s&&(l=c.split(/\s+/,2),l.length>1&&(u.src=l.shift(),u.opts.filter=l.shift())),"auto"==u.opts.smallBtn&&(n.inArray(s,["html","inline","ajax"])>-1?(u.opts.toolbar=!1,u.opts.smallBtn=!0):u.opts.smallBtn=!1),"pdf"===s&&(u.type="iframe",u.opts.iframe.preload=!1),u.opts.modal&&(u.opts=n.extend(!0,u.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),e.group.push(u)})},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("click.fb-prev touchend.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("click.fb-next touchend.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}).on("click.fb","[data-fancybox-zoom]",function(t){o[o.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?u(function(){o.update()}):(o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update()},600))}),r.on("focusin.fb",function(t){var i=n.fancybox?n.fancybox.getInstance():null;i.isClosing||!i.current||!i.current.opts.trapFocus||n(t.target).hasClass("fancybox-container")||n(t.target).is(e)||i&&"fixed"!==n(t.target).css("position")&&!i.$refs.container.has(t.target).length&&(t.stopPropagation(),i.focus(),s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft))}),r.on("keydown.fb",function(t){var e=o.current,i=t.keyCode||t.which;if(e&&e.opts.keyboard&&!n(t.target).is("input")&&!n(t.target).is("textarea"))return 8===i||27===i?(t.preventDefault(),void o.close(t)):37===i||38===i?(t.preventDefault(),void o.previous()):39===i||40===i?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,i)}),o.group[o.currIndex].opts.idleTime&&(o.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=t.setInterval(function(){o.idleSecondsCounter++,o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&!o.isDragging&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("focusin.fb keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e,i){var a,s,r,c,l,u,d,p=this,h=p.group.length;if(!(p.isDragging||p.isClosing||p.isAnimating&&p.firstRun)){if(t=parseInt(t,10),s=p.current?p.current.opts.loop:p.opts.loop,!s&&(t<0||t>=h))return!1;if(a=p.firstRun=null===p.firstRun,!(h<2&&!a&&p.isDragging)){if(c=p.current,p.prevIndex=p.currIndex,p.prevPos=p.currPos,r=p.createSlide(t),h>1&&((s||r.index>0)&&p.createSlide(t-1),(s||r.indexr.pos?"next":"previous"),c.$slide.removeClass("fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous"),c.isComplete=!1,e&&(r.isMoved||r.opts.transitionEffect)&&(r.isMoved?c.$slide.addClass(d):(d="fancybox-animated "+d+" fancybox-fx-"+r.opts.transitionEffect,n.fancybox.animate(c.$slide,d,e,function(){c.$slide.removeClass(d).removeAttr("style")}))))}}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('
    ').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,i){var a,s,r,c,l,u=this,d=u.current,f=d.$content,p=parseInt(d.$slide.width(),10),h=parseInt(d.$slide.height(),10),g=d.width,b=d.height;"image"!=d.type||d.hasError||!f||u.isAnimating||(n.fancybox.stop(f),u.isAnimating=!0,t=t===o?.5*p:t,e=e===o?.5*h:e,a=n.fancybox.getTranslate(f),c=g/a.width,l=b/a.height,s=.5*p-.5*g,r=.5*h-.5*b,g>p&&(s=a.left*c-(t*c-t),s>0&&(s=0),sh&&(r=a.top*l-(e*l-e),r>0&&(r=0),rt.width||o.height>t.height))},isScaledDown:function(){var t=this,e=t.current,o=e.$content,i=!1;return o&&(i=n.fancybox.getTranslate(o),i=i.width1||Math.abs(n.height()-o.height)>1),o},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){switch(t.isLoading=!0,a.trigger("beforeLoad",t),e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass("fancybox-slide--"+(e||"unknown")).addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;case"video":a.setContent(t,'");break;default:a.setError(t)}return!0}},setImage:function(e){var o,i,a,s,r=this,c=e.opts.srcset||e.opts.image.srcset;if(c){a=t.devicePixelRatio||1,s=t.innerWidth*a,i=c.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),i.sort(function(t,e){return t.value-e.value});for(var l=0;l=s||"x"===u.postfix&&u.value>=a){o=u;break}}!o&&i.length&&(o=i[i.length-1]),o&&(e.src=o.url,e.width&&e.height&&"w"==o.postfix&&(e.height=e.width/e.height*o.value,e.width=o.value))}e.$content=n('
    ').addClass("fancybox-is-hidden").appendTo(e.$slide),e.opts.preload!==!1&&e.opts.width&&e.opts.height&&(e.opts.thumb||e.opts.$thumb)?(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=n("").one("error",function(){n(this).remove(),e.$ghost=null,r.setBigImage(e)}).one("load",function(){r.afterLoad(e),r.setBigImage(e)}).addClass("fancybox-image").appendTo(e.$content).attr("src",e.opts.thumb||e.opts.$thumb.attr("src"))):r.setBigImage(e)},setBigImage:function(t){var e=this,o=n("");t.$image=o.one("error",function(){e.setError(t)}).one("load",function(){clearTimeout(t.timouts),t.timouts=null,e.isClosing||(t.width=t.opts.width||this.naturalWidth,t.height=t.opts.height||this.naturalHeight,t.opts.image.srcset&&o.attr("sizes","100vw").attr("srcset",t.opts.image.srcset),e.hideLoading(t),t.$ghost?t.timouts=setTimeout(function(){t.timouts=null,t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))):e.afterLoad(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(o[0].complete||"complete"==o[0].readyState)&&o[0].naturalWidth&&o[0].naturalHeight?o.trigger("load"):o[0].error?o.trigger("error"):t.timouts=setTimeout(function(){o[0].complete||t.hasError||e.showLoading(t)},100)},setIframe:function(t){var e,i=this,a=t.opts.iframe,s=t.$slide;t.$content=n('
    ').css(a.css).appendTo(s),e=n(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(t.$content),a.preload?(i.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),i.afterLoad(t)}),s.on("refresh.fb",function(){var n,i,s,r=t.$content,c=a.css.width,l=a.css.height;if(1===e[0].isReady){try{i=e.contents(),s=i.find("body")}catch(t){}s&&s.length&&(c===o&&(n=e[0].contentWindow.document.documentElement.scrollWidth,c=Math.ceil(s.outerWidth(!0)+(r.width()-n)),c+=r.outerWidth()-r.innerWidth()),l===o&&(l=Math.ceil(s.outerHeight(!0)),l+=r.outerHeight()-r.innerHeight()),c&&r.width(c),l&&r.height(l)),r.removeClass("fancybox-is-hidden")}})):this.afterLoad(t),e.attr("src",t.src),t.opts.smallBtn===!0&&t.$content.prepend(i.translate(t,t.opts.btnTpl.smallBtn)),s.one("onReset",function(){try{n(this).find("iframe").hide().attr("src","//about:blank")}catch(t){}n(this).empty(),t.isLoaded=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$slide.empty(),l(e)&&e.parent().length?(e.parent(".fancybox-slide--inline").trigger("onReset"),t.$placeholder=n("
    ").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("
    ").append(n.trim(e)).contents(),3===e[0].nodeType&&(e=n("
    ").html(e))),t.opts.filter&&(e=n("
    ").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1)}),t.$content=n(e).appendTo(t.$slide),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.removeClass("fancybox-slide--"+t.type),this.setContent(t,this.translate(t,t.opts.errorTpl))},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.opts.spinnerTpl).appendTo(t.$slide))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.opts.smallBtn&&!t.$smallBtn&&(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content.filter("div,form").first())),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('
    ').appendTo(t.$content)),e.revealContent(t))},revealContent:function(t){var e,i,a,s,r,c=this,l=t.$slide,u=!1;return e=t.opts[c.firstRun?"animationEffect":"transitionEffect"],a=t.opts[c.firstRun?"animationDuration":"transitionDuration"],a=parseInt(t.forcedDuration===o?a:t.forcedDuration,10),!t.isMoved&&t.pos===c.currPos&&a||(e=!1),"zoom"!==e||t.pos===c.currPos&&a&&"image"===t.type&&!t.hasError&&(u=c.getThumbPos(t))||(e="fade"),"zoom"===e?(r=c.getFitPos(t),r.scaleX=r.width/u.width,r.scaleY=r.height/u.height,delete r.width,delete r.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-u.width/u.height)>.1),s&&(u.opacity=.1,r.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),u),f(t.$content),void n.fancybox.animate(t.$content,r,a,function(){c.complete()})):(c.updateSlide(t),e?(n.fancybox.stop(l),i="fancybox-animated fancybox-slide--"+(t.pos>=c.prevPos?"next":"previous")+" fancybox-fx-"+e,l.removeAttr("style").removeClass("fancybox-slide--current fancybox-slide--next fancybox-slide--previous").addClass(i),t.$content.removeClass("fancybox-is-hidden"),f(l),void n.fancybox.animate(l,"fancybox-slide--current",a,function(e){l.removeClass(i).removeAttr("style"),t.pos===c.currPos&&c.complete()},!0)):(f(l),t.$content.removeClass("fancybox-is-hidden"),void(t.pos===c.currPos&&c.complete())))},getThumbPos:function(o){var i,a=this,s=!1,r=function(e){for(var o,i=e[0],a=i.getBoundingClientRect(),s=[];null!==i.parentElement;)"hidden"!==n(i.parentElement).css("overflow")&&"auto"!==n(i.parentElement).css("overflow")||s.push(i.parentElement.getBoundingClientRect()),i=i.parentElement;return o=s.every(function(t){var e=Math.min(a.right,t.right)-Math.max(a.left,t.left),n=Math.min(a.bottom,t.bottom)-Math.max(a.top,t.top);return e>0&&n>0}),o&&a.bottom>0&&a.right>0&&a.left=t.currPos-1&&o.pos<=t.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),t.slides=i,t.updateCursor(),t.trigger("afterShow"),o.$slide.find("video,audio").first().trigger("play"),(n(e.activeElement).is("[disabled]")||o.opts.autoFocus&&"image"!=o.type&&"iframe"!==o.type)&&t.focus())},preload:function(t){var e=this,n=e.slides[e.currPos+1],o=e.slides[e.currPos-1];n&&n.type===t&&e.loadSlide(n),o&&o.type===t&&e.loadSlide(o)},focus:function(){var t,e=this.current;this.isClosing||(e&&e.isComplete&&(t=e.$slide.find("input[autofocus]:enabled:visible:first"),t.length||(t=e.$slide.find("button,:input,[tabindex],a").filter(":enabled:visible:first"))),t=t&&t.length?t:this.$refs.container,t.focus())},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l=this,p=l.current,h=function(){l.cleanUp(t)};return!l.isClosing&&(l.isClosing=!0,l.trigger("beforeClose",t)===!1?(l.isClosing=!1,u(function(){l.update()}),!1):(l.removeEvents(),p.timouts&&clearTimeout(p.timouts),a=p.$content,o=p.opts.animationEffect,i=n.isNumeric(e)?e:o?p.opts.animationDuration:0,p.$slide.off(d).removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),p.$slide.siblings().trigger("onReset").remove(),i&&l.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing"),l.hideLoading(p),l.hideControls(),l.updateCursor(),"zoom"!==o||t!==!0&&a&&i&&"image"===p.type&&!p.hasError&&(c=l.getThumbPos(p))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),r=n.fancybox.getTranslate(a),r.width=r.width*r.scaleX,r.height=r.height*r.scaleY,s=p.opts.zoomOpacity,"auto"==s&&(s=Math.abs(p.width/p.height-c.width/c.height)>.1),s&&(c.opacity=0),r.scaleX=r.width/c.width,r.scaleY=r.height/c.height,r.width=c.width,r.height=c.height,n.fancybox.setTranslate(p.$content,r),f(p.$content),n.fancybox.animate(p.$content,c,i,h),!0):(o&&i?t===!0?setTimeout(h,i):n.fancybox.animate(p.$slide.removeClass("fancybox-slide--current"),"fancybox-animated fancybox-slide--previous fancybox-fx-"+o,i,h):h(),!0)))},cleanUp:function(t){var o,i,a=this,r=n("body");a.current.$slide.trigger("onReset"),a.$refs.container.empty().remove(),a.trigger("afterClose",t),a.$lastFocus&&a.current.opts.backFocus&&a.$lastFocus.focus(),a.current=null,o=n.fancybox.getInstance(),o?o.activate():(s.scrollTop(a.scrollTop).scrollLeft(a.scrollLeft),r.removeClass("fancybox-active compensate-for-scrollbar"),n('html').removeClass('compensate-for-scrollbar'),r.hasClass("fancybox-iosfix")&&(i=parseInt(e.body.style.top,10),r.removeClass("fancybox-iosfix").css("top","").scrollTop(i*-1)),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;return s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),o===!1?o:void("afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i))},updateControls:function(t){var e=this,n=e.current,o=n.index,i=n.opts.caption,a=e.$refs.container,s=e.$refs.caption;n.$slide.trigger("refresh"),e.$caption=i&&i.length?s.html(i):null,e.isHiddenControls||e.isIdle||e.showControls(),a.find("[data-fancybox-count]").html(e.group.length),a.find("[data-fancybox-index]").html(o+1),a.find("[data-fancybox-prev]").prop("disabled",!n.opts.loop&&o<=0),a.find("[data-fancybox-next]").prop("disabled",!n.opts.loop&&o>=e.group.length-1),"image"===n.type?a.find("[data-fancybox-download]").attr("href",n.opts.image.src||n.src).show():a.find("[data-fancybox-download],[data-fancybox-zoom]").hide()},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav")},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.isHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal),t.$caption?n.addClass("fancybox-show-caption "):n.removeClass("fancybox-show-caption")},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.2.10",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof p&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new p(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close())},destroy:function(){this.close(!0),r.off("click.fb-start")},isMobile:e.createTouch!==o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;if(!t||!t.length)return!1;if(e=t.eq(0).css("transform"),e&&e.indexOf("matrix")!==-1?(e=e.split("(")[1],e=e.split(")")[0],e=e.split(",")):e=[],e.length)e=e.length>10?[e[13],e[12],e[0],e[5]]:[e[5],e[4],e[0],e[3]],e=e.map(parseFloat);else{e=[0,0,1,1];var n=/\.*translate\((.*)px,(.*)px\)/i,o=n.exec(t.eq(0).attr("style"));o&&(e[0]=parseFloat(o[2]),e[1]=parseFloat(o[1]))}return{top:e[0],left:e[1],scaleX:e[2],scaleY:e[3],opacity:parseFloat(t.css("opacity")),width:t.width(),height:t.height()}},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),t.on(d,function(i){(!i||!i.originalEvent||t.is(i.originalEvent.target)&&"z-index"!=i.originalEvent.propertyName)&&(n.fancybox.stop(t),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(t.css("transition-duration",""),e.width=Math.round(t.width()*e.scaleX),e.height=Math.round(t.height()*e.scaleY),e.scaleX=1,e.scaleY=1,n.fancybox.setTranslate(t,e)),s===!1&&t.removeAttr("style")):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(i))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?n.fancybox.setTranslate(t,e):t.addClass(e),e.scaleX&&t.hasClass("fancybox-image-wrap")&&t.parent().addClass("fancybox-is-scaling"),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t){clearTimeout(t.data("timer")),t.off("transitionend").css("transition-duration",""),t.hasClass("fancybox-image-wrap")&&t.parent().removeClass("fancybox-is-scaling")}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i)}}(window,document,window.jQuery||jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg" },vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:"iframe",url:"//www.metacafe.com/embed/$1/?ap=1"},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"iframe",url:"//www.dailymotion.com/embed/video/$1"},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:"iframe",url:"//vine.co/v/$1/embed/simple"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12])+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,u,d,f,p=a.src||"",h=!1;s=t.extend(!0,{},n,a.opts.media),t.each(s,function(n,o){if(c=p.match(o.matcher)){if(h=o.type,d={},o.paramPlace&&c[o.paramPlace]){u=c[o.paramPlace],"?"==u[0]&&(u=u.substring(1)),u=u.split("&");for(var i=0;ie.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},u=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};u.prototype.destroy=function(){this.$container.off(".fb.touch")},u.prototype.ontouchstart=function(o){var i=this,c=n(o.target),u=i.instance,d=u.current,f=d.$content,p="touchstart"==o.type;if(p&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!d||i.instance.isAnimating||i.instance.isClosing)return o.stopPropagation(),void o.preventDefault();if(i.realPoints=i.startPoints=a(o),i.startPoints){if(o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=f,i.opts=d.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.sliderStartPos=i.sliderLastPos||{top:0,left:0},i.contentStartPos=n.fancybox.getTranslate(i.$content),i.contentLastPos=null,i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(d.$slide[0].clientWidth),i.canvasHeight=Math.round(d.$slide[0].clientHeight),n(e).off(".fb.touch").on(p?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(p?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),!i.opts&&!u.canPan()||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is("img")&&o.preventDefault());n.fancybox.isMobile&&(l(c)||l(c.parent()))||o.preventDefault(),1===i.startPoints.length&&("image"===d.type&&(i.contentStartPos.width>i.canvasWidth+1||i.contentStartPos.height>i.canvasHeight+1)?(n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-controls--isGrabbing")),2!==i.startPoints.length||u.isAnimating||d.hasError||"image"!==d.type||!d.isLoaded&&!d.$ghost||(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}}},u.prototype.onscroll=function(t){self.isScrolling=!0},u.prototype.ontouchmove=function(t){var e=this,o=n(t.target);return e.isScrolling||!o.is(e.$stage)&&!e.$stage.find(o).length?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.instance.canPan())&&e.newPoints&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},u.prototype.onSwipe=function(e){var a,s=this,r=s.isSwiping,c=s.sliderStartPos.left||0;if(r!==!0)"x"==r&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==r?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,s.instance.group.length<2&&s.opts.vertical?s.isSwiping="y":s.instance.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),s.canTap=!1,"y"===s.isSwiping&&n.fancybox.isMobile&&(l(s.$target)||l(s.$target.parent())))return void(s.isScrolling=!0);s.instance.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(s.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration",""),e.inTransition=!1,e.pos===s.instance.current.pos&&(s.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left)}),s.instance.SlideShow&&s.instance.SlideShow.isActive&&s.instance.SlideShow.stop()}},u.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&(i(t.requestId),t.requestId=null),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},u.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,u=s.distanceY,d=s.contentStartPos,f=d.left,p=d.top,h=d.width,g=d.height;return i=h>r?f+l:f,a=p+u,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),h>r&&(l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&ic&&(u>0&&a>e&&(a=e-1+Math.pow(-e+p+u,.8)||0),u<0&&aa?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},150),i=o.instance.close(!0,300)):"x"==t&&o.distanceX>50&&a>1?i=o.instance.previous(o.speedX):"x"==t&&o.distanceX<-50&&a>1&&(i=o.instance.next(o.speedX)),i!==!1||"x"!=t&&"y"!=t||(e||a<2?o.instance.centerSlide(o.instance.current,150):o.instance.jumpTo(o.instance.current.index)),o.$container.removeClass("fancybox-is-sliding")},u.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.opts.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,430))},u.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),rs.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.setTranslate(a.content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},u.prototype.onTap=function(t){var e,o=this,i=n(t.target),s=o.instance,r=s.current,c=t&&a(t)||o.startPoints,l=c[0]?c[0].x-o.$stage.offset().left:0,u=c[0]?c[0].y-o.$stage.offset().top:0,d=function(e){var i=r.opts[e];if(n.isFunction(i)&&(i=i.apply(s,[r,t])),i)switch(i){case"close":s.close(o.startEvent);break;case"toggleControls":s.toggleControls(!0);break;case"next":s.next();break;case"nextOrClose":s.group.length>1?s.next():s.close(o.startEvent);break;case"zoom":"image"==r.type&&(r.isLoaded||r.$ghost)&&(s.canPan()?s.scaleToFit():s.isScaledDown()?s.scaleToActual(l,u):s.group.length<2&&s.close(o.startEvent))}};if((!t.originalEvent||2!=t.originalEvent.button)&&(i.is("img")||!(l>i[0].clientWidth+i.offset().left))){if(i.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))e="Outside";else if(i.is(".fancybox-slide"))e="Slide";else{if(!s.current.$content||!s.current.$content.find(i).addBack().filter(i).length)return;e="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,Math.abs(l-o.tapX)>50||Math.abs(u-o.tapY)>50)return this;d("dblclick"+e)}else o.tapX=l,o.tapY=u,r.opts["dblclick"+e]&&r.opts["dblclick"+e]!==r.opts["click"+e]?o.tapped=setTimeout(function(){o.tapped=null,d("click"+e)},500):d("click"+e);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new u(e))})}(window,document,window.jQuery||jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:''},slideShow:{autoStart:!1,speed:3e3}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(t){var e=this;e.instance&&e.instance.current&&(t===!0||e.instance.current.opts.loop||e.instance.currIndex'},fullScreen:{autoStart:!1}}),e(t).on({"onInit.fb":function(t,e){var n;e&&e.group[e.currIndex].opts.fullScreen?(n=e.$refs.container,n.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle(n[0])}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(n[0]),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle(e.$refs.container[0]))},"beforeClose.fb":function(t){t&&t.FullScreen&&o.exit()}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t))})}(document,window.jQuery||jQuery),function(t,e){"use strict";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:''},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var n=function(t){this.init(t)};e.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this;e.instance=t,t.Thumbs=e;var n=t.group[0],o=t.group[1];e.opts=t.group[t.currIndex].opts.thumbs,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]"),e.opts&&n&&o&&("image"==n.type||n.opts.thumb||n.opts.$thumb)&&("image"==o.type||o.opts.thumb||o.opts.$thumb)?(e.$button.show().on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,n,o=this,i=o.instance,a=o.opts.parentEl;o.$grid=e('
    ').appendTo(i.$refs.container.find(a).addBack().filter(a)),t="
      ",e.each(i.group,function(e,o){n=o.opts.thumb||(o.opts.$thumb?o.opts.$thumb.attr("src"):null),n||"image"!==o.type||(n=o.src),n&&n.length&&(t+='
    • ')}),t+="
    ",o.$list=e(t).appendTo(o.$grid).on("click","li",function(){i.jumpTo(e(this).data("index"))}),o.$list.find("img").hide().one("load",function(){var t,n,o,i,a=e(this).parent().removeClass("fancybox-thumbs-loading"),s=a.outerWidth(),r=a.outerHeight();t=this.naturalWidth||this.width,n=this.naturalHeight||this.height,o=t/s,i=n/r,o>=1&&i>=1&&(o>i?(t/=i,n=r):(t=s,n/=o)),e(this).css({width:Math.floor(t),height:Math.floor(n),"margin-top":n>r?Math.floor(.3*r-.3*n):Math.floor(.5*r-.5*n),"margin-left":Math.floor(.5*s-.5*t)}).show()}).each(function(){this.src=e(this).data("src")}),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"))+i.group.length*o.$list.children().eq(0).outerWidth(!0)+"px")},focus:function(t){var e,n,o=this,i=o.$list;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.lefti.parent().scrollLeft()+(i.parent().width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){this.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus(0)):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e),o.isActive&&o.opts.autoStart===!0&&o.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,window.jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:''},share:{tpl:''}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance();i&&(t=i.current.opts.hash===!1?i.current.src:window.location,o=i.current.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===i.current.type?encodeURIComponent(i.current.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{animationEffect:"fade",animationDuration:250,afterLoad:function(t,e){e.$content.find(".fancybox-share__links a").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})}}}))})}(document,window.jQuery||jQuery),function(t,e,n){"use strict";function o(){var t=e.location.hash.substr(1),n=t.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return o<1&&(o=1),{hash:t,index:o,gallery:i}}function i(t){var e;""!==t.gallery&&(e=n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1),e.length||(e=n("#"+n.escapeSelector(t.gallery))),e.length&&(s=!1,e.trigger("click")))}function a(t){var e;return!!t&&(e=t.current?t.current.opts:t.opts,e.hash||(e.$orig?e.$orig.data("fancybox"):""))}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)});var s=!0,r=null,c=null;n(function(){n.fancybox.defaults.hash!==!1&&(n(t).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i){var l;i&&i.opts.hash!==!1&&(l=a(o),l&&""!==l&&(e.location.hash.indexOf(l)<0&&(o.opts.origHash=e.location.hash),r=l+(o.group.length>1?"-"+(i.index+1):""),"replaceState"in e.history?(c&&clearTimeout(c),c=setTimeout(function(){e.history[s?"pushState":"replaceState"]({},t.title,e.location.pathname+e.location.search+"#"+r),c=null,s=!1},300)):e.location.hash=r))},"beforeClose.fb":function(o,i,s){var l,u;c&&clearTimeout(c),s.opts.hash!==!1&&(l=a(i),u=i&&i.opts.origHash?i.opts.origHash:"",l&&""!==l&&("replaceState"in history?e.history.replaceState({},t.title,e.location.pathname+e.location.search+u):(e.location.hash=u,n(e).scrollTop(i.scrollTop).scrollLeft(i.scrollLeft))),r=null)}}),n(e).on("hashchange.fb",function(){var t=o();n.fancybox.getInstance()?!r||r===t.gallery+"-"+t.index||1===t.index&&r==t.gallery||(r=null,n.fancybox.close()):""!==t.gallery&&i(t)}),setTimeout(function(){i(o())},50))})}(document,window,window.jQuery||jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<1||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,window.jQuery||jQuery); ;(function ($){ "use strict"; var methods=(function (){ var c={ bcClass: 'sf-breadcrumb', menuClass: 'sf-js-enabled', anchorClass: 'sf-with-ul', menuArrowClass: 'sf-arrows' }, ios=(function (){ var ios=/iPhone|iPad|iPod/i.test(navigator.userAgent); if(ios){ $(window).load(function (){ $('body').children().on('click', $.noop); }); } return ios; })(), wp7=(function (){ var style=document.documentElement.style; return ('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent)); })(), toggleMenuClasses=function ($menu, o){ var classes=c.menuClass; if(o.cssArrows){ classes +=' ' + c.menuArrowClass; } $menu.toggleClass(classes); }, setPathToCurrent=function ($menu, o){ return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) .addClass(o.hoverClass + ' ' + c.bcClass) .filter(function (){ return ($(this).children(o.popUpSelector).hide().show().length); }).removeClass(o.pathClass); }, toggleAnchorClass=function ($li){ $li.children('a').toggleClass(c.anchorClass); }, toggleTouchAction=function ($menu){ var touchAction=$menu.css('ms-touch-action'); touchAction=(touchAction==='pan-y') ? 'auto':'pan-y'; $menu.css('ms-touch-action', touchAction); }, applyHandlers=function ($menu, o){ var targets='li:has(' + o.popUpSelector + ')'; if($.fn.hoverIntent&&!o.disableHI){ $menu.hoverIntent(over, out, targets); }else{ $menu .on('mouseenter.superfish', targets, over) .on('mouseleave.superfish', targets, out); } var touchevent='MSPointerDown.superfish'; if(!ios){ touchevent +=' touchend.superfish'; } if(wp7){ touchevent +=' mousedown.superfish'; } $menu .on('focusin.superfish', 'li', over) .on('focusout.superfish', 'li', out) .on(touchevent, 'a', o, touchHandler); }, touchHandler=function (e){ var $this=$(this), $ul=$this.siblings(e.data.popUpSelector); if($ul.length > 0&&$ul.is(':hidden')){ $this.one('click.superfish', false); if(e.type==='MSPointerDown'){ $this.trigger('focus'); }else{ $.proxy(over, $this.parent('li'))(); }} }, over=function (){ var $this=$(this), o=getOptions($this); if($(this).parents('.megamenu').length > 0) return; clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out=function (){ var $this=$(this), o=getOptions($this); if(ios){ $.proxy(close, $this, o)(); }else{ clearTimeout(o.sfTimer); o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay); }}, close=function (o){ o.retainPath=($.inArray(this[0], o.$path) > -1); this.superfish('hide'); if(!this.parents('.' + o.hoverClass).length){ o.onIdle.call(getMenu(this)); if(o.$path.length){ $.proxy(over, o.$path)(); }} }, getMenu=function ($el){ return $el.closest('.' + c.menuClass); }, getOptions=function ($el){ return getMenu($el).data('sf-options'); }; return { hide: function (instant){ if(this.length){ var $this=this, o=getOptions($this); if(!o){ return this; } if($(this).hasClass('menu-item-over')&&$(this).hasClass('megamenu')){ return true; } var not=(o.retainPath===true) ? o.$path:'', $ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), speed=o.speedOut; if(instant){ $ul.show(); speed=0; } o.retainPath=false; o.onBeforeHide.call($ul); if(o.dropdownStyle=='minimal'){ var $this=$(this); o.onHide.call($this); }else{ $ul.stop(true, true).animate(o.animationOut, speed, function (){ var $this=$(this); o.onHide.call($this); }); } if($(this).parents('.megamenu').length > 0) return; if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$('#header-outer[data-transparent-header="true"]').length > 0){ if($('#header-outer.scrolled-down').length==0&&$('#header-outer.small-nav').length==0&&$('#header-outer.detached').length==0&&$('#header-outer.fixed-menu').length==0){ $('#header-outer').addClass('transparent'); }} } return this; }, show: function (){ if($(this).parents('.megamenu').length > 0) return; var o=getOptions(this); if(!o){ return this; } var $this=this.addClass(o.hoverClass), $ul=$this.children(o.popUpSelector); if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$(this).hasClass('megamenu')){ $('#header-outer').addClass('no-transition'); $('#header-outer').removeClass('transparent'); } o.onBeforeShow.call($ul); if(!$($ul).parents('li').hasClass('megamenu')&&!$($ul).parents('ul').hasClass('sub-menu')&&$ul.offset()){ $ul.addClass('temp-hidden-display'); var docW=$("#top .container").width(); var elm=$ul; var off=elm.offset(); var l=off.left - ($(window).width() - docW)/2; var w=elm.width(); var isEntirelyVisible=(l+w <=$(window).width()-100); if(! isEntirelyVisible){ $ul.parents('li').addClass('edge'); }else{ $ul.parents('li').removeClass('edge'); } $ul.removeClass('temp-hidden-display'); } if(o.dropdownStyle=='minimal'){ o.onShow.call($ul); }else{ $ul.stop(true, true).animate(o.animation, o.speed, function (){ o.onShow.call($ul); }); } if($ul.length > 0&&$ul.parents('.sub-menu').length > 0&&$ul.parent().parent().parent().parent().hasClass('sf-menu')){ if($ul.offset().left + $ul.outerWidth() > $(window).width()){ $ul.addClass('on-left-side'); $ul.find('ul').addClass('on-left-side'); }} return this; }, destroy: function (){ return this.each(function (){ var $this=$(this), o=$this.data('sf-options'), $hasPopUp; if(!o){ return false; } $hasPopUp=$this.find(o.popUpSelector).parent('li'); clearTimeout(o.sfTimer); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); $this.off('.superfish').off('.hoverIntent'); $hasPopUp.children(o.popUpSelector).attr('style', function (i, style){ return style.replace(/display[^;]+;?/g, ''); }); o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); $this.find('.' + o.hoverClass).removeClass(o.hoverClass); o.onDestroy.call($this); $this.removeData('sf-options'); }); }, init: function (op){ return this.each(function (){ var $this=$(this); if($this.data('sf-options')){ return false; } var o=$.extend({}, $.fn.superfish.defaults, op), $hasPopUp=$this.find(o.popUpSelector).parent('li'); o.$path=setPathToCurrent($this, o); $this.data('sf-options', o); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); applyHandlers($this, o); $hasPopUp.not('.' + c.bcClass).superfish('hide', true); o.onInit.call(this); }); }};})(); $.fn.superfish=function (method, args){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if(typeof method==='object'||! method){ return methods.init.apply(this, arguments); }else{ return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); }}; $.fn.superfish.defaults={ popUpSelector: 'ul,.sf-mega', hoverClass: 'sfHover', pathClass: 'overrideThisToUse', pathLevels: 1, delay: 800, animation: {opacity: 'show'}, animationOut: {opacity: 'hide'}, speed: 'normal', speedOut: 'fast', cssArrows: true, disableHI: false, onInit: $.noop, onBeforeShow: $.noop, onShow: $.noop, onBeforeHide: $.noop, onHide: $.noop, onIdle: $.noop, onDestroy: $.noop, dropdownStyle: ($('body[data-dropdown-style="minimal"]').length > 0) ? 'minimal':'classic' }; $.fn.extend({ hideSuperfishUl: methods.hide, showSuperfishUl: methods.show }); })(jQuery); !function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); !function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top0&&g.bottom<=h,c=g.left>=0&&g.left0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery); jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(hb&&(b+=1);1b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1=g.currentTime)for(var G=0;G=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0===n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;db&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); !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.12",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),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},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){ jQuery(document).ready(function($){ var $event=$.event, dispatchMethod=$.event.handle ? 'handle':'dispatch', resizeTimeout; $event.special.smartresize={ setup: function(){ $(this).on("resize", $event.special.smartresize.handler); }, teardown: function(){ $(this).off("resize", $event.special.smartresize.handler); }, handler: function(event, execAsap){ var context=this, args=arguments; event.type="smartresize"; if(resizeTimeout){ clearTimeout(resizeTimeout); } resizeTimeout=setTimeout(function(){ $event[ dispatchMethod ].apply(context, args); }, execAsap==="execAsap"? 0:100); }}; $.fn.smartresize=function(fn){ return fn ? this.on("smartresize", fn):this.trigger("smartresize", ["execAsap"]); }; (function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery); window.requestAnimationFrame=window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(f){setTimeout(f, 1000/60)} var nectarDOMInfo={ usingMobileBrowser: (navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) ? true:false, usingFrontEndEditor: (typeof window.vc_iframe==='undefined') ? false:true, getWindowSize: function(){ nectarDOMInfo.windowHeight=window.innerHeight; nectarDOMInfo.windowWidth=window.innerWidth; nectarDOMInfo.adminBarHeight=($('#wpadminbar').length > 0) ? $('#wpadminbar').height():0; nectarDOMInfo.secondaryHeaderHeight=($('#header-secondary-outer').length > 0) ? $('#header-secondary-outer').height():0; }, scrollPosMouse: function(){ return $(window).scrollTop(); }, scrollPosRAF: function(){ nectarDOMInfo.scrollTop=$(window).scrollTop(); requestAnimationFrame(nectarDOMInfo.scrollPosRAF); }, bindEvents: function(){ if(!nectarDOMInfo.usingMobileBrowser){ $(window).on('scroll',function(){ nectarDOMInfo.scrollTop=nectarDOMInfo.scrollPosMouse(); }); } $(window).on('resize',nectarDOMInfo.getWindowSize); }} nectarDOMInfo.getWindowSize(); nectarDOMInfo.scrollTop=nectarDOMInfo.scrollPosMouse(); if(nectarDOMInfo.usingMobileBrowser){ requestAnimationFrame(nectarDOMInfo.scrollPosRAF); } nectarDOMInfo.bindEvents(); fullWidthSections(); fwsClasses(); function addRowCtrls(){ $('.wpb_row').removeClass('only-ns'); $('.nectar-slider-wrap[data-full-width="true"], .page-submenu, .portfolio-items[data-col-num="elastic"]:not(.fullwidth-constrained), .blog-fullwidth-wrap').parents('.wpb_row').addClass('only-ns'); $('body.vc_editor.compose-mode .wpb_row .vc_vc_column > .wpb_column > .vc_column-inner').each(function(){ if($(this).find('> .vc_element-container > div').length > 0){ if($(this).find('> .vc_element-container > div:first-child').is('.vc_vc_row_inner')){ $(this).find('> .vc_element-container > div:first-child').addClass('first-inner-row-el'); }else{ $(this).find('> .vc_element-container > div:first-child').removeClass('first-inner-row-el'); }} }); } function convertFrontEndPadding(){ $('.vc_element > .wpb_column[class*="padding-"][class*="-percent"]').each(function(){ var $elPaddingPercent=4; var elclassName=this.className.match(/padding-\d+/); if(elclassName){ $elPaddingPercent=elclassName[0].match(/\d+/); if($elPaddingPercent){ $elPaddingPercent=$elPaddingPercent[0]/100; }else{ $elPaddingPercent=0; }} if($elPaddingPercent){ var $parentRowWidth=$(this).parents('.span_12').width(); if($(this).is('[data-padding-pos="all"]')){ $(this).css('padding', $parentRowWidth * $elPaddingPercent); }else if($(this).is('[data-padding-pos="top"]')){ $(this).css('padding-top', $parentRowWidth * $elPaddingPercent); }else if($(this).is('[data-padding-pos="bottom"]')){ $(this).css('padding-bottom', $parentRowWidth * $elPaddingPercent); }else if($(this).is('[data-padding-pos="left"]')){ $(this).css('padding-left', $parentRowWidth * $elPaddingPercent); }else if($(this).is('[data-padding-pos="right"]')){ $(this).css('padding-right', $parentRowWidth * $elPaddingPercent); }else if($(this).is('[data-padding-pos="top-bottom"]')){ $(this).css({ 'padding-top': $parentRowWidth * $elPaddingPercent, 'padding-bottom': $parentRowWidth * $elPaddingPercent, }); }else if($(this).is('[data-padding-pos="top-right"]')){ $(this).css({ 'padding-top': $parentRowWidth * $elPaddingPercent, 'padding-right': $parentRowWidth * $elPaddingPercent, }); }else if($(this).is('[data-padding-pos="bottom-right"]')){ $(this).css({ 'padding-right': $parentRowWidth * $elPaddingPercent, 'padding-bottom': $parentRowWidth * $elPaddingPercent, }); }else if($(this).is('[data-padding-pos="bottom-left"]')){ $(this).css({ 'padding-left': $parentRowWidth * $elPaddingPercent, 'padding-bottom': $parentRowWidth * $elPaddingPercent, }); }else if($(this).is('[data-padding-pos="left-right"]')){ $(this).css({ 'padding-left': $parentRowWidth * $elPaddingPercent, 'padding-right': $parentRowWidth * $elPaddingPercent, }); }} }); $('.wpb_row[class*="vc_custom_"]').each(function(){ $(this).parent().addClass('no-bottom-margin'); }); } setTimeout(function(){ if($('body.compose-mode').length > 0){ $('.container-wrap').addClass('visible-editor-controls'); } if(nectarDOMInfo.usingFrontEndEditor){ addRowCtrls(); convertFrontEndPadding(); $(window).smartresize(convertFrontEndPadding); }},200); var $fp_section_length=0, $fp_section_prev_length=0; $(window).on('vc_reload', function(){ addRowCtrls(); columnBGColors(); coloredButtons(); twentytwentyInit(); parallaxRowsBGCals(); if($('.carousel').length > 0){ standardCarouselInit(); clientsCarouselInit(); carouselHeightCalcs(); } if($('.owl-carousel').length > 0){ $('.owl-carousel').each(function(){ $(this).trigger('destroy.owl.carousel').removeClass('owl-loaded'); $(this).find('.owl-stage-outer .owl-stage > *').unwrap(); $(this).find('.owl-stage-outer > *').unwrap(); $(this).find('.owl-item > *').unwrap(); $(this).find('.owl-dots').remove(); $(this).find('.owl-nav').remove(); }); owlCarouselInit(); } flexsliderInit(); accordionInit(); ulChecks(); oneFourthClasses(); carouselfGrabbingClass(); if($('.nectar_cascading_images').length > 0){ imagesLoaded($('.nectar_cascading_images'),function(instance){ cascadingImageBGSizing(); }); } fullWidthSections(); fwsClasses(); fullwidthImgOnlySizingInit(); fullwidthImgOnlySizing(); fullWidthRowPaddingAdjustInit(); recentPostsFlickityInit(); if(nectarDOMInfo.usingMobileBrowser){ fullWidthRowPaddingAdjustCalc(); } if($('.nectar-box-roll').length==0){ boxRollInit(); } if($flickitySliders.length > 0){ for(var i=0; i<$flickitySliders.length; i++){ $flickitySliders[i].reloadCells(); $flickitySliders[i].off('scroll.flickity'); $flickitySliders[i].off('dragStart.flickity'); $flickitySliders[i].off('dragEnd.flickity'); }} setTimeout(function(){ flickityInit(); if($flickitySliders.length > 0){ for(var i=0; i<$flickitySliders.length; i++){ $flickitySliders[i].reloadCells(); $flickitySliders[i].resize(); }} },100); if($wooFlickityCarousels.length > 0){ for(var i=0; i<$wooFlickityCarousels.length; i++){ $wooFlickityCarousels[i].flickity('reloadCells'); $wooFlickityCarousels[i].off('scroll.flickity'); $wooFlickityCarousels[i].off('dragStart.flickity'); $wooFlickityCarousels[i].off('dragEnd.flickity'); }} setTimeout(function(){ if($('.nectar-woo-flickity').length > 0){ productCarouselInit(); } if($wooFlickityCarousels.length > 0){ for(var i=0; i<$wooFlickityCarousels.length; i++){ $wooFlickityCarousels[i].flickity('reloadCells'); $wooFlickityCarousels[i].flickity('resize'); }} },100); socialSharingInit(); hotSpotHoverBind(); pricingTableHeight(); nectarIconMatchColoring(); if($testimonialSlider.length > 0){ for(var i=0; i<$testimonialSlider.length; i++){ var testimonialflkty=$testimonialSlider[i].data('flickity'); $testimonialSlider[i].flickity('reloadCells'); $testimonialSlider[i].off('select.flickity'); }} createTestimonialControls(); lightBoxInit(); imageWithHotspotClickEvents(); testimonialSliderHeight(); largeIconHover(); if($('.nectar-box-roll').length==0) boxRollMouseWheelInit(); midnightInit(); responsiveVideoIframesInit(); responsiveVideoIframes(); fullWidthContentColumns(); setTimeout(fullWidthContentColumns,1000); videoBGInit(); $(window).off('scroll.parallaxSections').off('resize.parallaxSections'); parallaxScrollInit(); $('.posts-container').each(function(i){ $blog_containers[i]=$(this); }); masonryBlogInit(); masonryPortfolioInit(); portfolioAccentColor(); portfolioHoverEffects(); portfolioFiltersInit(); style6Img(); fsProjectSliderInit(); setTimeout(function(){ if($('.nectar_fullscreen_zoom_recent_projects').length > 0){ portfolioFullScreenSliderCalcs(); splitLineText(); $(window).resize(splitLineText); $(window).resize(portfolioFullScreenSliderCalcs); }},300); isotopeCatSelection(); $(window).unbind('.infscr'); infiniteScrollInit(); postNextButtonEffect(); mouseParallaxInit(); $('.nectar-video-wrap').each(function(i){ if($(this).find('video').length > 0){ $(this).find('video').css('visibility','visible'); }}); $('.wpb_column[data-t-w-inherits]').each(function(){ if($(this).is('[data-t-w-inherits="small_desktop"]')){ $(this).parent().addClass('inherits-s-desktop-col'); }else{ $(this).parent().removeClass('inherits-s-desktop-col'); }}); if($('#nectar_fullscreen_rows').length > 0){ $fp_section_length=$('#nectar_fullscreen_rows > .vc_element').length; if($('#nectar_fullscreen_rows > .vc_element').length==0){ $('#nectar_fullscreen_rows').prepend('
    '); } if($('#nectar_fullscreen_rows > .vc_element:not(.empty_placeholder)').length > 0){ $('#nectar_fullscreen_rows >.vc_element.empty_placeholder').remove(); } setFPNames(); if($('#fp-nav').length==0){ initNectarFP(); var currentFPSectionIndex=($('#nectar_fullscreen_rows > .vc_element.active').length > 0) ? $('#nectar_fullscreen_rows > .vc_element.active').index() + 1:1; setFPNavColoring(currentFPSectionIndex,'na'); } else if($fp_section_length!=$fp_section_prev_length){ $.fn.fullpage.destroy('all'); initNectarFP(); var currentFPSectionIndex=($('#nectar_fullscreen_rows > .vc_element.active').length > 0) ? $('#nectar_fullscreen_rows > .vc_element.active').index() + 1:1; setFPNavColoring(currentFPSectionIndex,'na'); } var $nectarFPindex=0; var nectarFPOffsets=[{el: '', offset: 0}]; $('#nectar_fullscreen_rows > div.vc_element').each(function(i){ nectarFPOffsets[i]={ el: $(this), offset: $(this).offset().top }}); for(var x in nectarFPOffsets){ if(nectarFPOffsets[x].offset < $(window).height()){ $nectarFPindex=x; }} if($('#nectar_fullscreen_rows > div.vc_element').length===1){ $('#nectar_fullscreen_rows').css({'transform':'translate3d(0,0,0)'}); } $('body').scrollTo(0,0); $fp_section_prev_length=$fp_section_length; }else{ if($('body .main-content > .row > .vc_element:first > .wpb_row[class*="full-width-"]').length > 0||$('body .main-content > .row > .vc_element:first .nectar-slider-wrap[data-full-width="true"]').length > 0){ $('.container-wrap').css({ 'padding-top': '0', 'margin-top':'0'}); }else{ $('.container-wrap').css({ 'padding-top': '40px'}); }} $svg_icons=[]; $('.svg-icon-holder').removeClass('animated-in').removeClass('bound'); if($('.vc_nectar_gmap').length > 0){ setTimeout(function(){ if(typeof google==='object'&&typeof google.maps==='object'){ mapAPI_Loaded(); }else{ if(nectarLove.mapApiKey.length > 0){ $.getScript('https://maps.google.com/maps/api/js?sensor=false&key='+nectarLove.mapApiKey+'&callback=mapAPI_Loaded'); }} },100); } if($().theiaStickySidebar){ blogStickySS(); } if(typeof window.Waypoint!='undefined'){ Waypoint.destroyAll(); waypoints(); }}); function fancyBoxInit(){ $('a.pp').removeClass('pp').attr('data-fancybox',''); $("a[rel^='prettyPhoto']:not([rel*='_gal']):not([rel*='product-gallery']):not([rel*='prettyPhoto['])").removeAttr('rel').attr('data-fancybox',''); $('.wpb_gallery .wpb_gallery_slidesnectarslider_style').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.swiper-slide a:not(.ext-url-link)').attr('data-fancybox','group_'+$unique_id); }); $('.wpb_gallery_slides.wpb_flexslider').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.slides > li > a').attr('data-fancybox','group_'+$unique_id); }); $('.wpb_gallery_slidesflickity_style').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.cell > a:not(.ext-url-link)').attr('data-fancybox','group_'+$unique_id); }); $('.portfolio-items, .wpb_gallery .parallax-grid-item').each(function(){ var $unique_id=Math.floor(Math.random()*10000); if($(this).find('.pretty_photo').length > 0){ $(this).find('.pretty_photo').removeClass('pretty_photo').attr('data-fancybox','group_'+$unique_id); }else if($(this).find('a[rel*="prettyPhoto["]').length > 0){ $(this).find('a[rel*="prettyPhoto["]').removeAttr('rel').attr('data-fancybox','group_'+$unique_id); }}); if($('body').hasClass('nectar-auto-lightbox')){ $('.gallery').each(function(){ if($(this).find('.gallery-icon a[rel^="prettyPhoto"]').length==0){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.gallery-item .gallery-icon a[href*=".jpg"], .gallery-item .gallery-icon a[href*=".png"], .gallery-item .gallery-icon a[href*=".gif"], .gallery-item .gallery-icon a[href*=".jpeg"]').attr('data-fancybox','group_'+$unique_id).removeClass('pretty_photo'); }}); $('.main-content img').each(function(){ if($(this).parent().is("[href]")&&!$(this).parent().is(".magnific-popup")&&$(this).parents('.tiled-gallery').length==0&&$(this).parents('.product-image').length==0&&$(this).parents('.iosSlider.product-slider').length==0){ var match=$(this).parent().attr('href').match(/\.(jpg|png|gif)\b/); if(match) $(this).parent().attr('data-fancybox',''); }}); } fbMarginArr=($('body.admin-bar').length > 0) ? [60,100]:[60,100]; if(window.innerWidth < 1000){ fbMarginArr=[0,0]; } $("[data-fancybox]").fancybox({ animationEffect:"zoom-in-out", animationDuration:350, buttons:[ 'fullScreen', 'zoom', 'close' ], margin:fbMarginArr, loop:true, caption:function(instance, item){ return $(this).attr('title'); }, beforeLoad: function(instance,current){ if(typeof instance.current.src!=='string'){ $.fancybox.close(true); }}, mobile:{ margin:0 }}); } function magnificInit(){ $('a.pp').removeClass('pp').addClass('magnific-popup'); $("a[rel^='prettyPhoto']:not([rel*='_gal']):not([rel*='product-gallery']):not([rel*='prettyPhoto['])").removeAttr('rel').addClass('magnific-popup'); $('.wpb_gallery .wpb_gallery_slidesnectarslider_style').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.swiper-slide a:not(.ext-url-link)').addClass('pretty_photo'); }); $('.wpb_gallery_slides.wpb_flexslider').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.slides > li > a').addClass('pretty_photo'); }); $('.wpb_gallery_slidesflickity_style').each(function(){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.cell > a:not(.ext-url-link)').addClass('pretty_photo'); }); $('.portfolio-items, .wpb_gallery .swiper-slide, .wpb_gallery_slidesflickity_style .cell, .wpb_gallery_slides.wpb_flexslider ul > li, .wpb_gallery .parallax-grid-item').each(function(){ if($(this).find('.pretty_photo').length > 0){ $(this).find('.pretty_photo').removeClass('pretty_photo').addClass('gallery').addClass('magnific'); }else if($(this).find('a[rel*="prettyPhoto["]').length > 0){ $(this).find('a[rel*="prettyPhoto["]').removeAttr('rel').addClass('gallery').addClass('magnific'); }}); $("a[data-rel='prettyPhoto[product-gallery]']").each(function(){ $(this).removeAttr('data-rel').addClass('magnific').addClass('gallery'); }); if($('body').hasClass('nectar-auto-lightbox')){ $('.gallery').each(function(){ if($(this).find('.gallery-icon a[rel^="prettyPhoto"]').length==0){ var $unique_id=Math.floor(Math.random()*10000); $(this).find('.gallery-item .gallery-icon a[href*=".jpg"], .gallery-item .gallery-icon a[href*=".png"], .gallery-item .gallery-icon a[href*=".gif"], .gallery-item .gallery-icon a[href*=".jpeg"]').addClass('magnific').addClass('gallery').removeClass('pretty_photo'); }}); $('.main-content img').each(function(){ if($(this).parent().is("[href]")&&!$(this).parent().is(".magnific-popup")&&$(this).parents('.tiled-gallery').length==0&&$(this).parents('.product-image').length==0&&$(this).parents('.iosSlider.product-slider').length==0){ var match=$(this).parent().attr('href').match(/\.(jpg|png|gif)\b/); if(match) $(this).parent().addClass('magnific-popup').addClass('image-link'); }}); } $('a.magnific-popup:not(.gallery):not(.nectar_video_lightbox)').magnificPopup({ type: 'image', callbacks: { imageLoadComplete: function(){ var $that=this; setTimeout(function(){ $that.wrap.addClass('mfp-image-loaded'); }, 10); }, beforeOpen: function(){ this.st.image.markup=this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); }, open: function(){ $.magnificPopup.instance.next=function(){ var $that=this; this.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.next.call($that); }, 100); } $.magnificPopup.instance.prev=function(){ var $that=this; this.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.prev.call($that); }, 100); }} }, fixedContentPos: false, mainClass: 'mfp-zoom-in', removalDelay: 400 }); $('a.magnific-popup.nectar_video_lightbox, .magnific_nectar_video_lightbox a.link_text, .swiper-slide a[href*=youtube], .swiper-slide a[href*=vimeo], .nectar-video-box a.full-link.magnific-popup').magnificPopup({ type: 'iframe', fixedContentPos: false, mainClass: 'mfp-zoom-in', removalDelay: 400 }); $('a.magnific.gallery').each(function(){ var $parentRow=($(this).closest('.wpb_column').length > 0) ? $(this).closest('.wpb_column'):$(this).parents('.row'); if($parentRow.length > 0&&!$parentRow.hasClass('lightbox-col')){ $parentRow.magnificPopup({ type: 'image', delegate: 'a.magnific', mainClass: 'mfp-zoom-in', fixedContentPos: false, callbacks: { elementParse: function(item){ if($(item.el.context).is('[href]')&&$(item.el.context).attr('href').indexOf('iframe=true')!=-1||$(item.el.context).is('[href]')&&$(item.el.context).attr('href').indexOf('https://www.youtube.com/watch')!=-1){ item.type='iframe'; }else if($(item.el.context).is('[href]')&&$(item.el.context).attr('href').indexOf('video-popup-')!=-1){ item.type='inline'; }else{ item.type='image'; }}, imageLoadComplete: function(){ var $that=this; setTimeout(function(){ $that.wrap.addClass('mfp-image-loaded'); }, 10); }, beforeOpen: function(){ this.st.image.markup=this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); }, open: function(){ if($(this.content).find('.mejs-video video').length > 0&&$().mediaelementplayer){ $(this.content).find('.mejs-video video')[0].player.remove(); var $that=this; setTimeout(function(){ $($that.content).find('video').mediaelementplayer(); $($that.content).find('.mejs-video video')[0].player.play(); },50); } $.magnificPopup.instance.next=function(){ var $that=this; this.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.next.call($that); if($($that.content).find('.mejs-video video').length > 0){ $($that.content).find('.mejs-video video')[0].play(); }}, 100); } $.magnificPopup.instance.prev=function(){ var $that=this; this.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.prev.call($that); if($($that.content).find('.mejs-video video').length > 0){ $($that.content).find('.mejs-video video')[0].play(); }}, 100); }}, close: function(){ if($(this.content).find('.mejs-video video').length > 0){ $(this.content).find('.mejs-video video')[0].load(); }} }, removalDelay: 400, gallery: { enabled:true }}); $parentRow.addClass('lightbox-col'); }}); } function lightBoxInit(){ if($('body[data-ls="magnific"]').length > 0||$('body[data-ls="pretty_photo"]').length > 0){ magnificInit(); }else if($('body[data-ls="fancybox"]').length > 0){ fancyBoxInit(); }} lightBoxInit(); setTimeout(lightBoxInit,500); function NectarLiquid(bgIMG, type, el_type){ this.canvasContainer=bgIMG[0]; this.rowBG=bgIMG; this.animationType=type; this.elType=el_type; this.bgDivWidth=$(this.rowBG).width(); this.bgDivHeight=$(this.rowBG).height(); this.bgDivRatio=this.bgDivHeight / this.bgDivWidth; this.app=new PIXI.Application({ width: this.bgDivWidth, height: this.bgDivHeight, transparent: true, sharedTicker: true }); this.app.stage=new window.PIXI.Container(); this.imgContainer=new window.PIXI.Container(); $(this.canvasContainer).remove('.nectar-displacement'); $(this.canvasContainer).append('
    '); this.displacementIMG_URL=$(this.canvasContainer).find('.nectar-displacement').css('background-image'); this.displacementIMG_URL=this.displacementIMG_URL.replace(/(url\(|\)|")/g, ''); this.bgIMG_SRC=bgIMG.css('background-image'); this.bgIMG_SRC=this.bgIMG_SRC.replace(/(url\(|\)|")/g, ''); this.loader=new PIXI.loaders.Loader(); this.loader.add('rowBG',this.bgIMG_SRC); this.loader.add('displaceBG', this.displacementIMG_URL); this.loader.load(this.initialize.bind(this)); } NectarLiquid.prototype.initialize=function(){ this.settings={ animationStrength: 1, animationStrengthSpeed: 1, displacementScaleX: 30, displacementScaleY: 90, time: Math.random()*20, filterMultX: 200, filterMultY: 350, shouldAnimate: true }; if(this.animationType=='displace-filter-fade'){ if(this.elType=='row'){ this.settings.filterMultX=150; this.settings.filterMultY=375; this.settings.displacementScaleX=80; this.settings.displacementScaleY=170; this.settings.animationStrengthSpeed=2; }else{ this.settings.filterMultX=55; this.settings.filterMultY=150; this.settings.displacementScaleX=50; this.settings.displacementScaleY=160; this.settings.animationStrengthSpeed=1; }}else{ if(this.elType!='row'){ this.settings.displacementScaleY=70; }} this.filterSprite=new window.PIXI.Sprite(this.loader.resources.displaceBG.texture); this.filterSprite.texture.baseTexture.wrapMode=PIXI.WRAP_MODES.REPEAT; this.filter=new window.PIXI.filters.DisplacementFilter(this.filterSprite); this.bg=new PIXI.Sprite(this.loader.resources.rowBG.texture); this.imgHeight=this.loader.resources.rowBG.texture.orig.height; this.imgWidth=this.loader.resources.rowBG.texture.orig.width; this.imgRatio=this.imgWidth/this.imgHeight; this.bg.anchor.x=0.5; this.bg.anchor.y=0.5; this.bg.height=$(this.rowBG).height(); this.bg.width=this.imgRatio * this.bg.height; if(this.bg.width <=$(this.rowBG).width()){ this.bg.width=$(this.rowBG).width() + 100; this.bg.height=this.bg.width / this.imgRatio; }else{ this.bg.height=$(this.rowBG).height() + 100; this.bg.width=this.imgRatio * this.bg.height; } this.app.renderer.resize($(this.rowBG).width(), $(this.rowBG).height()); this.buildStage(); this.createFilters(); this.app.view.setAttribute("class", "nectar-liquid-bg"); this.canvasContainer.appendChild(this.app.view); if(this.animationType=='displace-filter-loop'){ if($('#nectar_fullscreen_rows').length==0){ this.animateFilters(); $liquidBGOffsetPos=($('#nectar_fullscreen_rows').length > 0) ? '200%':'105%'; var self=this; var $parentSelector=(self.elType=='row') ? '.row-bg-wrap':'.column-image-bg-wrap'; var waypoint=new Waypoint({ element: $(this.canvasContainer).parents($parentSelector), handler: function(direction){ self.imgContainer.addChild(self.bg); }, offset: $liquidBGOffsetPos }); }else{ this.animateFilters(); this.imgContainer.addChild(this.bg); }} else if(this.animationType=='displace-filter-fade'){ this.animateFilters(); this.settings.shouldAnimate=false; $liquidBGOffsetPos=($('#nectar_fullscreen_rows').length > 0) ? '200%':'85%'; var self=this; var $parentSelector=(self.elType=='row') ? '.row-bg-wrap':'.column-image-bg-wrap'; if($('#nectar_fullscreen_rows').length==0||$('#nectar_fullscreen_rows').length > 0&&$(this.canvasContainer).parents('.wpb_row.fp-section').index()==0||$disableFPonMobile=='on'){ var waypoint=new Waypoint({ element: $(this.canvasContainer).parents($parentSelector), handler: function(direction){ if($(self.canvasContainer).parents('.wpb_tab').length > 0&&$(self.canvasContainer).parents('.wpb_tab').css('visibility')=='hidden'||$(self.canvasContainer).hasClass('animated-in')){ waypoint.destroy(); return; } self.imgContainer.addChild(self.bg); self.animateProps(self); waypoint.destroy(); }, offset: $liquidBGOffsetPos }); }} $(window).resize(this.resize.bind(this)); $(window).smartresize(this.resize.bind(this)); } NectarLiquid.prototype.animateProps=function(self){ setTimeout(function(){ $(self.canvasContainer).find('.nectar-liquid-bg').addClass('animated-in'); self.settings.shouldAnimate=true; self.settings.animationStrength=1; self.settings.animationStrengthSpeed=2.5; self.animateFilters(); anime({ targets: self.settings, animationStrength: 0, duration: 1900, easing: [.36,.42,.3,1], complete: function(anim){ self.settings.shouldAnimate=false }}); anime({ targets: self.settings, animationStrengthSpeed: 0.8, duration: 1900, easing: [.36,.42,.3,1], complete: function(anim){ self.settings.shouldAnimate=false }}); },100); } NectarLiquid.prototype.resize=function(){ var self=this; self.bgDivRatio=$(self.rowBG).height() / $(self.rowBG).width(); self.imgContainer.position.x=$(self.rowBG).width() / 2; self.imgContainer.position.y=$(self.rowBG).height() / 2; self.bg.height=$(self.rowBG).height(); self.bg.width=self.imgRatio * self.bg.height; if(self.bg.width <=$(self.rowBG).width()){ self.bg.width=$(self.rowBG).width() + 100; self.bg.height=self.bg.width / self.imgRatio; }else{ self.bg.height=$(self.rowBG).height() + 100; self.bg.width=self.imgRatio * self.bg.height; } self.app.stage.scale.x=self.app.stage.scale.y=1; self.app.renderer.resize($(self.rowBG).width(), $(self.rowBG).height()); } NectarLiquid.prototype.createFilters=function(){ this.app.stage.addChild(this.filterSprite); this.filter.scale.x=this.filter.scale.y=1; this.imgContainer.filters=[ this.filter ]; } NectarLiquid.prototype.buildStage=function(){ this.imgContainer.position.x=$(this.rowBG).width() / 2; this.imgContainer.position.y=$(this.rowBG).height() / 2; this.app.stage.scale.x=this.app.stage.scale.y=1; this.app.stage.addChild(this.imgContainer); } NectarLiquid.prototype.animateFilters=function(){ this.filterSprite.rotation=this.settings.time * 0.01; this.filterSprite.x=Math.sin(this.settings.time * 0.1) * this.settings.filterMultX; this.filterSprite.y=Math.cos(this.settings.time * 0.1) * this.settings.filterMultY; this.filter.scale.x=this.settings.displacementScaleX * this.settings.animationStrength; this.filter.scale.y=this.settings.displacementScaleY * this.settings.animationStrength; this.settings.time +=0.05 * this.settings.animationStrengthSpeed; if(this.animationType=='displace-filter-loop'){ requestAnimationFrame(function(){ this.animateFilters(); }.bind(this)); } else if(this.animationType=='displace-filter-fade'&&this.settings.shouldAnimate){ requestAnimationFrame(function(){ this.animateFilters(); }.bind(this)); }} function nectarLiquidBGs(){ $liquidBG_EL=[]; $('.row-bg-wrap[data-bg-animation*="displace-filter"] .row-bg.using-image, .column-image-bg-wrap[data-bg-animation*="displace-filter"] .column-image-bg').each(function(i){ var $that_el=$(this); if($(this).is('.row-bg')){ var $type=$(this).parents('.row-bg-wrap').attr('data-bg-animation'); var $el_type='row'; }else if($(this).is('.column-image-bg')){ var $type=$(this).parents('.column-image-bg-wrap').attr('data-bg-animation'); var $el_type='col'; } $liquidBG_EL[i]=new NectarLiquid($that_el, $type, $el_type); }); } var $standAnimatedColTimeout=[]; var $animatedSVGIconTimeout=[]; var $svg_icons=[]; var $nectarCustomSliderRotate=[]; var $flickitySliders=[]; var $wooFlickityCarousels=[]; var $liquidBG_EL=[]; function niceScrollInit(){ } var $smoothActive=0; var $smoothCache=false; function flexsliderInit(){ $('.flex-gallery').each(function(){ var $that=$(this); imagesLoaded($(this),function(instance){ $that.flexslider({ animation: 'fade', smoothHeight: false, animationSpeed: 500, useCSS: false, touch: true }); $('.flex-gallery .flex-direction-nav li a.flex-next').html(''); $('.flex-gallery .flex-direction-nav li a.flex-prev').html(''); }); }); } flexsliderInit(); function flickityInit(){ if($('.nectar-flickity:not(.masonry)').length==0) return false; $flickitySliders=[]; $('.nectar-flickity:not(.masonry)').each(function(i){ $(this).removeClass(function (index, className){ return (className.match (/(^|\s)instance-\S+/g)||[]).join(' '); }); $(this).addClass('instance-'+i); var $freeScrollBool=($(this).is('[data-free-scroll]')&&$(this).attr('data-free-scroll')=='true') ? true:false; var $groupCellsBool=true; var $flickContainBool=true; var $flcikAttr=0.025; var $flickCellAlign='center'; if($(this).is('[data-format="fixed_text_content_fullwidth"]')){ $flickCellAlign='left'; $groupCellsBool=false; $flickContainBool=false; $flcikAttr=0.02; } if($freeScrollBool==true){ $groupCellsBool=false; } if($(this).attr('data-controls').length > 0&&$(this).attr('data-controls')=='next_prev_arrows'){ var $paginationBool=false; var $nextPrevArrowBool=true; }else{ var $paginationBool=true; var $nextPrevArrowBool=false; } if($(this).attr('data-controls').length > 0&&$(this).attr('data-controls')=='none'){ var $paginationBool=false; var $nextPrevArrowBool=false; } var $flickity_autoplay=false; var $selectedAttraction=0.025; if($(this).is('[data-autoplay]')&&$(this).attr('data-autoplay')=='true'){ $flickity_autoplay=true; $selectedAttraction=0.019; if($(this).is('[data-autoplay-dur]')&&$(this).attr('data-autoplay-dur').length > 0){ if(parseInt($(this).attr('data-autoplay-dur')) > 100&&parseInt($(this).attr('data-autoplay-dur')) < 30000){ $flickity_autoplay=parseInt($(this).attr('data-autoplay-dur')); }} } var $that=$(this); var $frontEndEditorDrag=($('body.vc_editor').length > 0) ? false: true; var $frontEndEditorPause=($('body.vc_editor').length > 0) ? true: false; $flickitySliders[i]=new Flickity('.nectar-flickity.instance-'+i, { contain: $flickContainBool, draggable:$frontEndEditorDrag, lazyLoad: false, imagesLoaded: true, percentPosition: true, cellAlign: $flickCellAlign, selectedAttraction: $selectedAttraction, groupCells: $groupCellsBool, prevNextButtons: $nextPrevArrowBool, freeScroll: $freeScrollBool, pageDots: $paginationBool, resize: true, selectedAttraction: $flcikAttr, autoPlay: $flickity_autoplay, pauseAutoPlayOnHover: $frontEndEditorPause, setGallerySize: true, wrapAround: true, accessibility: false, arrowShape: { x0: 20, x1: 70, y1: 30, x2: 70, y2: 25, x3: 70 }}); if($(this).is('[data-format="fixed_text_content_fullwidth"]')&&!nectarDOMInfo.usingFrontEndEditor){ var $onMobileBrowser=navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/); $flickitySliders[i].on('scroll', function(){ if($onMobileBrowser){ return; } var $curFlkSlid=$flickitySliders[i]; var $flkSlideWidth=$that.find('.cell').outerWidth() + 25; var $leftHeaderSize=($('body[data-header-format="left-header"]').length > 0&&$(window).width() > 1000) ? 275:0; var $extraWindowSpace=(($(window).width() + $leftHeaderSize) - $that.parents('.main-content').width())/2; $extraWindowSpace +=parseInt($that.css('margin-left')) + 2; $flickitySliders[i].slides.forEach(function(slide, j){ var $scaleAmt=1; var $translateXAmt=0; var $rotateAmt=0; var $slideZIndex=10; var $opacityAmt=1; var $slideOffset=$(slide.cells[0].element).offset().left; var flkInstanceSlide=$('.nectar-flickity.instance-'+i+' .cell:nth-child('+ (j+1) +')'); if($slideOffset - $extraWindowSpace < 0&&$slideOffset - $extraWindowSpace > $flkSlideWidth*-1){ $scaleAmt=1 +(($slideOffset - $extraWindowSpace) / 1500); $opacityAmt=1 +(($slideOffset - $extraWindowSpace + 70) / 550); $translateXAmt=(($slideOffset - $extraWindowSpace)) * -1; $rotateAmt=(($slideOffset - $extraWindowSpace) / 25) * -1; }else{ $scaleAmt=1; $opacityAmt=1; $translateXAmt=0; $rotateAmt=0; } if($slideOffset + 5 - $extraWindowSpace < 0&&$slideOffset - $extraWindowSpace > $flkSlideWidth*-1){ $slideZIndex=5; }else{ $slideZIndex=10; } flkInstanceSlide.css({ 'z-index':$slideZIndex }); flkInstanceSlide.find('.inner-wrap-outer').css({ 'transform': 'perspective(800px) translateX('+ $translateXAmt +'px) rotateY('+$rotateAmt+'deg) translateZ(0)', 'opacity':$opacityAmt }); flkInstanceSlide.find('.inner-wrap').css({ 'transform': 'scale('+ $scaleAmt +') translateZ(0)' }); }); }); } var $removeHiddenTimeout; $flickitySliders[i].on('dragStart', function(){ clearTimeout($removeHiddenTimeout); $that.addClass('is-dragging'); $that.find('.flickity-prev-next-button').addClass('hidden'); }); $flickitySliders[i].on('dragEnd', function(){ $that.removeClass('is-dragging'); $removeHiddenTimeout=setTimeout(function(){ $that.find('.flickity-prev-next-button').removeClass('hidden'); },600); }); $('.flickity-prev-next-button').on('click', function(){ clearTimeout($removeHiddenTimeout); $(this).parents('.nectar-flickity').find('.flickity-prev-next-button').addClass('hidden'); $removeHiddenTimeout=setTimeout(function(){ $that.find('.flickity-prev-next-button').removeClass('hidden'); },600); }); if($that.hasClass('nectar-carousel')){ imagesLoaded($that,function(instance){ nectarCarouselFlkEH($that); }); }}); } setTimeout(flickityInit,100); function setNectarCarouselFlkEH(){ $('.nectar-carousel.nectar-flickity:not(.masonry)').each(function(){ nectarCarouselFlkEH($(this)); }); } function nectarCarouselFlkEH($slider_instance){ var $tallestSlideCol=0; $slider_instance.find('.flickity-slider > .cell').css('height','auto'); $slider_instance.find('.flickity-slider > .cell').each(function(){ ($(this).height() > $tallestSlideCol) ? $tallestSlideCol=$(this).height():$tallestSlideCol=$tallestSlideCol; }); if($tallestSlideCol < 10) $tallestSlideCol='auto'; $slider_instance.find('.flickity-slider > .cell').css('height',$tallestSlideCol+'px'); } function flickityBlogInit(){ if($('.nectar-flickity.masonry.not-initialized').length==0) return false; $('.nectar-flickity.masonry.not-initialized').each(function(){ if($(this).parents('article').hasClass('large_featured')) $(this).insertBefore($(this).parents('article').find('.content-inner')); }); $('.nectar-flickity.masonry.not-initialized').flickity({ contain: true, draggable: false, lazyLoad: false, imagesLoaded: true, percentPosition: true, prevNextButtons: true, pageDots: false, resize: true, setGallerySize: true, wrapAround: true, accessibility: false }); $('.nectar-flickity.masonry').removeClass('not-initialized'); $('.nectar-flickity.masonry:not(.not-initialized)').each(function(){ if($(this).find('.item-count').length==0){ $('
    ').insertBefore($(this).find('.flickity-prev-next-button.next')); $(this).find('.item-count').html('1/' + $(this).find('.flickity-slider .cell').length + ''); $(this).find('.flickity-prev-next-button, .item-count').wrapAll('
    '); if($(this).parents('article').hasClass('wide_tall')&&$(this).parents('.masonry.material').length==0) $(this).find('.control-wrap').insertBefore($(this)); }}); $('.masonry .flickity-prev-next-button.previous, .masonry .flickity-prev-next-button.next').on('click',function(){ if($(this).parents('.wide_tall').length > 0) $(this).parent().find('.item-count .current').html($(this).parents('article').find('.nectar-flickity .cell.is-selected').index()+1); else $(this).parent().find('.item-count .current').html($(this).parents('.nectar-flickity').find('.cell.is-selected').index()+1); }); $('body').on('mouseover','.flickity-prev-next-button.next',function(){ $(this).parent().find('.flickity-prev-next-button.previous, .item-count').addClass('next-hovered'); }); $('body').on('mouseleave','.flickity-prev-next-button.next',function(){ $(this).parent().find('.flickity-prev-next-button.previous, .item-count').removeClass('next-hovered'); }); } function twentytwentyInit(){ $('.twentytwenty-container').each(function(){ var $that=$(this); if($that.find('.twentytwenty-handle').length==0){ $(this).imagesLoaded(function(){ $that.twentytwenty(); }); }}); } twentytwentyInit(); if($('.nectar-recent-posts-single_featured.multiple_featured').length > 0){ splitLineText(); } var $frontEndEditorFPRDiv=''; var $usingFullScreenRows=false; var $fullscreenSelector=''; var $disableFPonMobile=($('#nectar_fullscreen_rows[data-mobile-disable]').length > 0) ? $('#nectar_fullscreen_rows').attr('data-mobile-disable'):'off'; var $onMobileBrowser=navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/); if(!$onMobileBrowser){ $disableFPonMobile='off'; } if($disableFPonMobile=='on'&&$('#nectar_fullscreen_rows').length > 0){ $('#nectar_fullscreen_rows > .wpb_row[data-fullscreen-anchor-id]').each(function(){ if($(this).attr('data-fullscreen-anchor-id').length > 0) $(this).attr('id',$(this).attr('data-fullscreen-anchor-id')); }); $('.container-wrap .main-content > .row').css({'padding-bottom':'0'}); if($('#nectar_fullscreen_rows > .wpb_row:nth-child(1)').length > 0&&$('#header-outer[data-transparent-header="true"]').length > 0&&!$('#nectar_fullscreen_rows > .wpb_row:nth-child(1)').hasClass('full-width-content')){ $('#nectar_fullscreen_rows > .wpb_row:nth-child(1)').addClass('extra-top-padding'); }} if($('#nectar_fullscreen_rows').length > 0&&$disableFPonMobile!='on'||$().fullpage&&$disableFPonMobile!='on'){ function setFPNavColoring(index,direction){ if($('#boxed').length > 0&&overallWidth > 750) return; if($('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv+':nth-child('+index+')').find('.span_12.light').length > 0){ $('#fp-nav').addClass('light-controls'); if(direction=='up') $('#header-outer.dark-slide').removeClass('dark-slide'); else setTimeout(function(){ $('#header-outer.dark-slide').removeClass('dark-slide'); },520); }else{ $('#fp-nav.light-controls').removeClass('light-controls'); if(direction=='up') $('#header-outer').addClass('dark-slide'); else setTimeout(function(){ $('#header-outer').addClass('dark-slide'); },520); } if($('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv+':nth-child('+index+')').find('.nectar-slider-wrap[data-fullscreen="true"]').length > 0){ var $currentSlider=$('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv+':nth-child('+index+')').find('.nectar-slider-wrap[data-fullscreen="true"]'); if($currentSlider.is('[data-overall_style="directional"]')&&$('#header-outer #logo span.dark').length > 0){ $('#header-outer').addClass('directional-nav-effect').removeClass('dne-disabled'); } if($currentSlider.find('.swiper-slide-active[data-color-scheme="light"]').length > 0){ $('#header-outer').removeClass('dark-slide'); }else if($currentSlider.find('.swiper-slide-active[data-color-scheme="dark"]').length > 0){ $('#header-outer').addClass('dark-slide'); }}else{ $('#header-outer').removeClass('directional-nav-effect').addClass('dne-disabled'); }} var $anchors=[]; var $names=[]; function setFPNames(){ $anchors=[]; $names=[]; $frontEndEditorFPRDiv=(window.vc_iframe) ? '> .vc_element': '> .wpb_row'; $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv).each(function(i){ var $id=($(this).is('[data-fullscreen-anchor-id]')) ? $(this).attr('data-fullscreen-anchor-id'):''; if($('#nectar_fullscreen_rows[data-anchors="on"]').length > 0){ if($id.indexOf('fws_')==-1) $anchors.push($id); else $anchors.push('section-'+(i+1)); } if($(this).find('.full-page-inner-wrap[data-name]').length > 0) $names.push($(this).find('.full-page-inner-wrap').attr('data-name')); else $names.push(' '); }); } setFPNames(); function initFullPageFooter(){ var $footerPos=$('#nectar_fullscreen_rows').attr('data-footer'); if($footerPos=='default'){ $('#footer-outer').appendTo('#nectar_fullscreen_rows').addClass('fp-auto-height').addClass('fp-section').addClass('wpb_row').attr('data-anchor',' ').wrapInner('
    ').wrapInner('
    ').wrapInner('
    ').wrapInner('
    ').wrapInner('
    '); } else if($footerPos=='last_row'){ $('#footer-outer').remove(); $('#nectar_fullscreen_rows > .wpb_row:last-child').attr('id','footer-outer').addClass('fp-auto-height'); }else{ $('#footer-outer').remove(); }} if($('#nectar_fullscreen_rows').length > 0) initFullPageFooter(); function fullscreenRowLogic(){ $('.full-page-inner-wrap .full-page-inner > .span_12 > .wpb_column').each(function(){ if($(this).find('> .vc_column-inner > .wpb_wrapper').find('> .wpb_row').length > 0){ $(this).find('> .vc_column-inner > .wpb_wrapper').addClass('only_rows'); var $rowNum=$(this).find('> .vc_column-inner > .wpb_wrapper').find('> .wpb_row').length; $(this).find('> .vc_column-inner > .wpb_wrapper').attr('data-inner-row-num',$rowNum); } else if($(this).find('> .column-inner-wrap > .column-inner > .wpb_wrapper').find('> .wpb_row').length > 0){ $(this).find('> .column-inner-wrap > .column-inner > .wpb_wrapper').addClass('only_rows'); var $rowNum=$(this).find('> .column-inner-wrap > .column-inner > .wpb_wrapper').find('> .wpb_row').length; $(this).find('> .column-inner-wrap > .column-inner > .wpb_wrapper').attr('data-inner-row-num',$rowNum); }}); } fullscreenRowLogic(); function fullHeightRowOverflow(){ if($(window).width() >=1000){ $('#nectar_fullscreen_rows > .wpb_row .full-page-inner-wrap[data-content-pos="full_height"]').each(function(){ $(this).find('> .full-page-inner').css('height','100%'); var maxHeight=overallHeight; var columnPaddingTop=0; var columnPaddingBottom=0; if($('#nectar_fullscreen_rows').attr('data-animation')=='none') $(this).find('> .full-page-inner > .span_12 ').css('height','100%'); else $(this).find('> .full-page-inner > .span_12 ').css('height',overallHeight); $(this).find('> .full-page-inner > .span_12 > .wpb_column > .vc_column-inner > .wpb_wrapper').each(function(){ columnPaddingTop=parseInt($(this).parents('.wpb_column').css('padding-top')); columnPaddingBottom=parseInt($(this).parents('.wpb_column').css('padding-bottom')); maxHeight=maxHeight > $(this).height() + columnPaddingTop + columnPaddingBottom ? maxHeight:$(this).height() + columnPaddingTop + columnPaddingBottom; }); if(maxHeight > overallHeight) $(this).find('> .full-page-inner > .span_12').height(maxHeight).css('float','none'); }); }else{ $('#nectar_fullscreen_rows > .wpb_row').each(function(){ $totalColHeight=0; $(this).find('.fp-scrollable > .fp-scroller > .full-page-inner-wrap-outer > .full-page-inner-wrap[data-content-pos="full_height"] > .full-page-inner > .span_12 > .wpb_column').each(function(){ $totalColHeight +=$(this).outerHeight(true); }); $(this).find('.fp-scrollable > .fp-scroller > .full-page-inner-wrap-outer > .full-page-inner-wrap > .full-page-inner').css('height','100%'); if($totalColHeight > $(this).find('.fp-scrollable > .fp-scroller > .full-page-inner-wrap-outer > .full-page-inner-wrap > .full-page-inner').height()) $(this).find('.fp-scrollable > .fp-scroller > .full-page-inner-wrap-outer > .full-page-inner-wrap > .full-page-inner').height($totalColHeight); }); }} function fullscreenElementSizing(){ var $nsSelector='.nectar-slider-wrap[data-fullscreen="true"][data-full-width="true"], .nectar-slider-wrap[data-fullscreen="true"][data-full-width="boxed-full-width"]'; if($('.nectar-slider-wrap[data-fullscreen="true"][data-full-width="true"]').length > 0||$('.nectar-slider-wrap[data-fullscreen="true"][data-full-width="boxed-full-width"]').length > 0){ if($('#nectar_fullscreen_rows .wpb_row').length > 0) $($nsSelector).find('.swiper-container').attr('data-height',$('#nectar_fullscreen_rows .wpb_row').height()+1); $(window).trigger('resize.nsSliderContent'); $($nsSelector).parents('.full-page-inner').addClass('only-nectar-slider'); }} $('#nectar_fullscreen_rows[data-row-bg-animation="ken_burns"] > .wpb_row:first-child .row-bg.using-image').addClass('kenburns'); setTimeout(function(){ $('#nectar_fullscreen_rows[data-row-bg-animation="ken_burns"] > .wpb_row:first-child .row-bg.using-image').removeClass('kenburns'); },500); if(navigator.userAgent.indexOf('Safari')!=-1&&navigator.userAgent.indexOf('Chrome')==-1) $('#nectar_fullscreen_rows[data-row-bg-animation="ken_burns"]').attr('data-row-bg-animation','none'); var overallHeight=$(window).height(); var overallWidth=$(window).width(); var $fpAnimation=$('#nectar_fullscreen_rows').attr('data-animation'); var $fpAnimationSpeed; var $svgResizeTimeout; switch($('#nectar_fullscreen_rows').attr('data-animation-speed')){ case 'slow': $fpAnimationSpeed=1150; break; case 'medium': $fpAnimationSpeed=850; break; case 'fast': $fpAnimationSpeed=650; break; default: $fpAnimationSpeed=850; } function heyFirefoxDrawTheEl(){ var $drawTheEl=$('#nectar_fullscreen_rows > div:first-child').height(); if($('#nectar_fullscreen_rows.trans-animation-active').length > 0){ requestAnimationFrame(heyFirefoxDrawTheEl); }} function initNectarFP(){ $frontEndEditorFPRDiv=(window.vc_iframe) ? '> .vc_element': '> .wpb_row'; if(window.vc_iframe){ setTimeout(function(){ $('html,body').css({ 'height':'100%', 'overflow-y':'hidden' }); },100); $('body,html').on("mousewheel.removeScroll", function(){ return false; }); } if($('body.vc_editor').length > 0){ $('#nectar_fullscreen_rows > .vc_empty-placeholder').remove(); $('#nectar_fullscreen_rows > .vc_element').each(function(){ var innerRowID=$(this).find('> .wpb_row').attr('id'); $(this).attr('id',innerRowID); }); } $usingFullScreenRows=true; $fullscreenSelector=(window.vc_iframe) ? '.vc_element.vc_vc_row.active ':'.wpb_row.active '; $('.container-wrap, .container-wrap .main-content > .row').css({'padding-bottom':'0', 'margin-bottom': '0'}); $('#nectar_fullscreen_rows').fullpage({ sectionSelector: '#nectar_fullscreen_rows '+$frontEndEditorFPRDiv, navigation: true, css3: true, scrollingSpeed: $fpAnimationSpeed, anchors: $anchors, scrollOverflow: true, navigationPosition: 'right', navigationTooltips: $names, afterLoad: function(anchorLink, index, slideAnchor, slideIndex){ if($('#nectar_fullscreen_rows').hasClass('afterLoaded')){ if(nectarDOMInfo.scrollTop!=0){ window.scrollTo(0,0); } $('.wpb_row:not(.last-before-footer):not(:nth-child('+index+')) .fp-scrollable').each(function(){ var $scrollable=$(this).data('iscrollInstance'); $scrollable.scrollTo(0,0); }); $('.wpb_row:not(:nth-child('+index+')) .owl-carousel').trigger('to.owl.carousel',[0]); var $row_id=$('#nectar_fullscreen_rows > .wpb_row:nth-child('+index+')').attr('id'); $('#nectar_fullscreen_rows '+$frontEndEditorFPRDiv).removeClass('transition-out').removeClass('trans'); $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':nth-child('+index+')').removeClass('next-current'); $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':nth-child('+index+') .full-page-inner-wrap-outer').css({'height': '100%'}); $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +' .full-page-inner-wrap-outer').css({'transform':'none'}); if($row_id!='footer-outer'&&$('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':nth-child('+index+').last-before-footer').length==0){ waypoints(); if(!navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)&&!nectarDOMInfo.usingFrontEndEditor){ resetWaypoints(); Waypoint.destroyAll(); startMouseParallax(); } if(!nectarDOMInfo.usingFrontEndEditor){ nectarLiquidBGFP(); } responsiveTooltips(); } if($row_id!='footer-outer'){ $('#nectar_fullscreen_rows ' + $frontEndEditorFPRDiv).removeClass('last-before-footer').css('transform','initial'); if(!window.vc_iframe){ $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':not(.active):not(#footer-outer)').css({'transform':'translateY(0)','left':'-9999px', 'transition': 'none', 'opacity':'1', 'will-change':'auto'}); $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':not(#footer-outer)').find('.full-page-inner-wrap-outer').css({'transition': 'none', 'transform':'none', 'will-change':'auto'}); $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':not(#footer-outer)').find('.fp-tableCell').css({'transition': 'none', 'transform':'none', 'will-change':'auto'}); } $('#nectar_fullscreen_rows '+ $frontEndEditorFPRDiv +':not(#footer-outer)').find('.full-page-inner-wrap-outer > .full-page-inner-wrap > .full-page-inner > .container').css({'backface-visibility':'visible', 'z-index':'auto'}); }}else{ fullHeightRowOverflow(); overallHeight=$('#nectar_fullscreen_rows').height(); $('#nectar_fullscreen_rows').addClass('afterLoaded'); setTimeout(function(){ window.scrollTo(0,0); },1800); $('#nectar_fullscreen_rows[data-row-bg-animation="ken_burns"] '+ $frontEndEditorFPRDiv +':first-child .row-bg.using-image').removeClass('kenburns'); fullscreenElementSizing(); } $('#nectar_fullscreen_rows').removeClass('nextSectionAllowed'); }, onLeave: function(index, nextIndex, direction){ $('#nectar_fullscreen_rows').addClass('trans-animation-active'); var $row_id=$('#nectar_fullscreen_rows ' + $frontEndEditorFPRDiv + ':nth-child('+nextIndex+')').attr('id'); var $indexRow=$('#nectar_fullscreen_rows ' + $frontEndEditorFPRDiv + ':nth-child('+index+')'); var $nextIndexRow=$('#nectar_fullscreen_rows ' + $frontEndEditorFPRDiv + ':nth-child('+nextIndex+')'); var $nextIndexRowInner=$nextIndexRow.find('.full-page-inner-wrap-outer'); var $nextIndexRowFpTable=$nextIndexRow.find('.fp-tableCell'); var $transformProp=(!navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) ? 'transform':'all'; if($row_id=='footer-outer'){ $indexRow.addClass('last-before-footer'); $('#footer-outer').css('opacity','1'); }else{ $('#nectar_fullscreen_rows '+$frontEndEditorFPRDiv+'.last-before-footer').css('transform','translateY(0px)'); $('#footer-outer').css('opacity','0'); } if($indexRow.attr('id')=='footer-outer'){ $('#footer-outer').css({'transition': $transformProp+' 460ms cubic-bezier(0.60, 0.23, 0.2, 0.93)', 'backface-visibility': 'hidden'}); $('#footer-outer').css({'transform': 'translateY(45%) translateZ(0)'}); } if($nextIndexRow.attr('id')!='footer-outer'){ $nextIndexRowFpTable.find('.full-page-inner-wrap-outer > .full-page-inner-wrap > .full-page-inner > .container').css({'backface-visibility':'hidden', 'z-index':'110'}); } if($nextIndexRow.attr('id')!='footer-outer'&&$indexRow.attr('id')!='footer-outer'&&$('#nectar_fullscreen_rows[data-animation="none"]').length==0){ if(direction=='down'){ if($fpAnimation=='parallax'){ $indexRow.css({'transition': $transformProp+' '+$fpAnimationSpeed+'ms cubic-bezier(.29,.23,.13,1)', 'will-change':'transform', 'transform':'translateZ(0)' ,'z-index': '100'}); setTimeout(function(){ $indexRow.css({'transform': 'translateY(-50%) translateZ(0)'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); $nextIndexRowFpTable.css({'transform':'translateY(100%) translateZ(0)', 'will-change':'transform'}); $nextIndexRowInner.css({'transform':'translateY(-50%) translateZ(0)', 'will-change':'transform'}); }else if($fpAnimation=='zoom-out-parallax'){ $indexRow.css({'transition': 'opacity '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.31, 0.2, 0.85), transform '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.31, 0.2, 0.85)', 'z-index': '100', 'will-change':'transform'}); setTimeout(function(){ $indexRow.css({'transform': 'scale(0.77) translateZ(0)', 'opacity': '0'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); $nextIndexRowFpTable.css({'transform':'translateY(100%) translateZ(0)', 'will-change':'transform'}); $nextIndexRowInner.css({'transform':'translateY(-50%) translateZ(0)', 'will-change':'transform'}); }}else{ if($fpAnimation=='parallax'){ $indexRow.css({'transition': $transformProp+' '+$fpAnimationSpeed+'ms cubic-bezier(.29,.23,.13,1)', 'z-index': '100', 'will-change':'transform'}); setTimeout(function(){ $indexRow.css({'transform': 'translateY(50%) translateZ(0)'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); $nextIndexRowFpTable.css({'transform':'translateY(-100%) translateZ(0)','will-change':'transform'}); $nextIndexRowInner.css({'transform':'translateY(50%) translateZ(0)','will-change':'transform'}); } else if($fpAnimation=='zoom-out-parallax'){ $indexRow.css({'transition': 'opacity '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.31, 0.2, 0.85), transform '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.31, 0.2, 0.85)', 'z-index': '100', 'will-change':'transform'}); setTimeout(function(){ $indexRow.css({'transform': 'scale(0.77) translateZ(0)', 'opacity': '0'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); $nextIndexRowFpTable.css({'transform':'translateY(-100%) translateZ(0)', 'will-change':'transform'}); $nextIndexRowInner.css({'transform':'translateY(50%) translateZ(0)', 'will-change':'transform'}); }} setTimeout(function(){ $nextIndexRowFpTable.css({'transition':$transformProp+' '+$fpAnimationSpeed+'ms cubic-bezier(.29,.23,.13,1) 0ms', 'transform':'translateY(0%) translateZ(0)'}); if($fpAnimation!='none'){ $nextIndexRowInner.css({'transition':$transformProp+' '+$fpAnimationSpeed+'ms cubic-bezier(.29,.23,.13,1) 0ms', 'transform':'translateY(0%) translateZ(0)'}); if(navigator.userAgent.indexOf('Firefox')!=-1){ requestAnimationFrame(heyFirefoxDrawTheEl); }} },60); } if($('#nectar_fullscreen_rows[data-animation="none"]').length==0&&$nextIndexRow.find('.fp-scrollable').length > 0){ $nextIndexRow.find('.full-page-inner-wrap-outer').css('height',overallHeight); } setTimeout(function(){ if($row_id=='footer-outer'){ $indexRow.css('transform','translateY(-'+($('#footer-outer').height()-1)+'px)'); $('#footer-outer').css({'transform': 'translateY(45%) translateZ(0)'}); $('#footer-outer').css({'transition-duration': '0s', 'backface-visibility': 'hidden'}); setTimeout(function(){ $('#footer-outer').css({'transition': $transformProp+' 500ms cubic-bezier(0.60, 0.23, 0.2, 0.93)', 'backface-visibility': 'hidden'}); $('#footer-outer').css({'transform': 'translateY(0%) translateZ(0)'}); },30); }},30); if($row_id!='footer-outer'){ stopMouseParallax(); setFPNavColoring(nextIndex,direction); setTimeout(function(){ FPActiveMenuItems(nextIndex); },50); }}, afterResize: function(){ overallHeight=$('#nectar_fullscreen_rows').height(); overallWidth=$(window).width(); fullHeightRowOverflow(); fullscreenElementSizing(); fullscreenFooterCalcs(); if($('#footer-outer.active').length > 0){ setTimeout(function(){ $('.last-before-footer').css('transform','translateY(-'+$('#footer-outer').height()+'px)'); },200); } clearTimeout($svgResizeTimeout); $svgResizeTimeout=setTimeout(function(){ if($svg_icons.length > 0){ $('.svg-icon-holder.animated-in').each(function(i){ $(this).css('opacity','1'); $svg_icons[$(this).find('svg').attr('id').slice(-1)].finish(); }); }},300); }}); } if(window.vc_iframe){ }else{ if($('#nectar_fullscreen_rows').length > 0) initNectarFP(); } $(window).smartresize(function(){ if($('#nectar_fullscreen_rows').length > 0){ setTimeout(function(){ $('.wpb_row:not(.last-before-footer) .fp-scrollable').each(function(){ var $scrollable=$(this).data('iscrollInstance'); $scrollable.refresh(); }); },200); fullHeightRowOverflow(); }}); function fullscreenFooterCalcs(){ if($('#footer-outer.active').length > 0){ $('.last-before-footer').addClass('fp-notransition').css('transform','translateY(-'+$('#footer-outer').height()+'px)'); setTimeout(function(){ $('.last-before-footer').removeClass('fp-notransition'); },10); }} function stopMouseParallax(){ $.each($mouseParallaxScenes,function(k,v){ v.parallax('disable'); }); } function startMouseParallax(){ if($('#nectar_fullscreen_rows > .wpb_row.active .nectar-parallax-scene').length > 0){ $.each($mouseParallaxScenes,function(k,v){ v.parallax('enable'); }); }} if($('#nectar_fullscreen_rows').length > 0){ if(window.vc_iframe){ setTimeout(function(){ setFPNavColoring(1,'na'); },500); }else{ setFPNavColoring(1,'na'); } fullscreenElementSizing(); if($('body[data-slide-out-widget-area-style="slide-out-from-right"].material').length > 0){ $('#slide-out-widget-area .off-canvas-menu-container').find("a[href*='#']").on('click',function(e){ var $link_hash=$(this).prop("hash"); if($link_hash!='#'&&$link_hash.indexOf("#")!=-1&&$('div[data-fullscreen-anchor-id="'+$link_hash.substr($link_hash.indexOf("#")+1)+'"]').length > 0){ if($('body.material-ocm-open').length > 0){ $('body > .slide_out_area_close').addClass('non-human-allowed').trigger('click'); setTimeout(function(){ $('body > .slide_out_area_close').removeClass('non-human-allowed'); },100); }} }); }} function FPActiveMenuItems(index){ if(!$('#nectar_fullscreen_rows[data-anchors="on"]').length > 0||!index) return; var $hash=window.location.hash; var $hashSubstrng=($hash&&$hash.length > 0) ? $hash.substring(1,$hash.length):''; if($('body:not(.mobile) #header-outer[data-has-menu="true"]').length > 0&&$('#nectar_fullscreen_rows > .wpb_row:nth-child('+index+')[data-fullscreen-anchor-id]').length > 0&&$('header#top nav > ul.sf-menu > li').find('> a[href$="#'+$hashSubstrng+'"]').length > 0){ $('header#top nav > ul.sf-menu > li').removeClass('current-menu-item'); $('header#top nav > ul.sf-menu > li').find('> a[href$="'+$hashSubstrng+'"]').parent().addClass('current-menu-item'); }} function resetWaypoints(){ $('img.img-with-animation.animated-in:not([data-animation="none"])').css({'transition':'none'}); $('img.img-with-animation.animated-in:not([data-animation="none"])').css({'opacity':'0','transform':'none'}).removeClass('animated-in'); $('.col.has-animation.animated-in:not([data-animation*="reveal"]), .wpb_column.has-animation.animated-in:not([data-animation*="reveal"])').css({'transition':'none'}); $('.col.has-animation.animated-in:not([data-animation*="reveal"]), .wpb_column.has-animation.animated-in:not([data-animation*="reveal"]), .nectar_cascading_images .cascading-image:not([data-animation="none"]) .inner-wrap').css({'opacity':'0','transform':'none','left':'auto','right':'auto'}).removeClass('animated-in'); $('.col.has-animation.boxed:not([data-animation*="reveal"]), .wpb_column.has-animation.boxed:not([data-animation*="reveal"])').addClass('no-pointer-events'); $('.row-bg-wrap[data-bg-animation]:not([data-bg-animation="none"]):not([data-bg-animation*="displace-filter"]) .inner-wrap.using-image').removeClass('animated-in'); $('.column-image-bg-wrap[data-bg-animation]:not([data-bg-animation="none"]):not([data-bg-animation*="displace-filter"]) .inner-wrap').removeClass('animated-in'); $('.wpb_column.has-animation[data-animation*="reveal"], .nectar_cascading_images').removeClass('animated-in'); if(overallWidth > 1000&&$('.using-mobile-browser').length==0){ $('.wpb_column.has-animation[data-animation="reveal-from-bottom"] > .column-inner-wrap').css({'transition':'none','transform':'translate(0, 100%)'}); $('.wpb_column.has-animation[data-animation="reveal-from-bottom"] > .column-inner-wrap > .column-inner').css({'transition':'none','transform':'translate(0, -90%)'}); $('.wpb_column.has-animation[data-animation="reveal-from-top"] > .column-inner-wrap').css({'transition':'none','transform':'translate(0, -100%)'}); $('.wpb_column.has-animation[data-animation="reveal-from-top"] > .column-inner-wrap > .column-inner').css({'transition':'none','transform':'translate(0, 90%)'}); $('.wpb_column.has-animation[data-animation="reveal-from-left"] > .column-inner-wrap').css({'transition-duration':'0s','transform':'translate(-100%, 0)'}); $('.wpb_column.has-animation[data-animation="reveal-from-left"] > .column-inner-wrap > .column-inner').css({'transition-duration':'0s','transform':'translate(90%, 0)'}); $('.wpb_column.has-animation[data-animation="reveal-from-right"] > .column-inner-wrap').css({'transition-duration':'0s','transform':'translate(100%, 0)'}); $('.wpb_column.has-animation[data-animation="reveal-from-right"] > .column-inner-wrap > .column-inner').css({'transition-duration':'0s','transform':'translate(-90%, 0)'}); } $('.wpb_column.has-animation[data-animation*="reveal"] > .column-inner-wrap, .wpb_column.has-animation[data-animation*="reveal"] > .column-inner-wrap > .column-inner').removeClass('no-transform'); $('.wpb_animate_when_almost_visible.animated').removeClass('wpb_start_animation').removeClass('animated'); $('.wpb_column[data-border-animation="true"] .border-wrap.animation').removeClass('animation').removeClass('completed'); $('.nectar-milestone.animated-in').removeClass('animated-in').removeClass('in-sight'); $('.nectar-milestone .symbol').removeClass('in-sight'); $('.nectar-fancy-ul[data-animation="true"]').removeClass('animated-in'); $('.nectar-fancy-ul[data-animation="true"] ul li').css({'opacity':'0','left':'-20px'}); $('.nectar-progress-bar').parent().removeClass('completed'); $('.nectar-progress-bar .bar-wrap > span').css({'width':'0px'}); $('.nectar-progress-bar .bar-wrap > span > strong').css({'opacity':'0'}); $('.clients.fade-in-animation').removeClass('animated-in'); $('.clients.fade-in-animation > div').css('opacity','0'); $('.owl-carousel[data-enable-animation="true"]').removeClass('animated-in'); $('.owl-carousel[data-enable-animation="true"] .owl-stage > .owl-item').css({'transition':'none','opacity':'0','transform':'translate(0, 70px)'}); $('.divider-small-border[data-animate="yes"], .divider-border[data-animate="yes"]').removeClass('completed').css({'transition':'none','transform':'scale(0,1)'}); $('.nectar-icon-list').removeClass('completed'); $('.nectar-icon-list-item').removeClass('animated'); $('.portfolio-items .col').removeClass('animated-in'); $('.nectar-split-heading').removeClass('animated-in'); $('.nectar-split-heading .heading-line > div').transit({'y':'200%'},0); $('.nectar_image_with_hotspots[data-animation="true"]').removeClass('completed'); $('.nectar_image_with_hotspots[data-animation="true"] .nectar_hotspot_wrap').removeClass('animated-in'); $('.nectar-animated-title').removeClass('completed'); $('.nectar-highlighted-text em').removeClass('animated'); if($('.vc_pie_chart').length > 0){ vc_pieChart(); } $('.col.has-animation:not([data-animation*="reveal"]), .wpb_column.has-animation:not([data-animation*="reveal"])').each(function(i){ clearTimeout($standAnimatedColTimeout[i]); }); }}else if($('#nectar_fullscreen_rows').length > 0&&$disableFPonMobile=='on'||$().fullpage&&$disableFPonMobile=='on'){ $('html,body').css({'height':'auto','overflow-y':'auto'}); } function nectarLiquidBGFP(){ $('.nectar-liquid-bg').removeClass('animated-in'); for(var k=0; k<$liquidBG_EL.length;k++){ if($liquidBG_EL[k].animationType=='displace-filter-fade'&&$($liquidBG_EL[k].canvasContainer).parents('.fp-section.active').length > 0){ if($($liquidBG_EL[k].canvasContainer).find('.image-added-to-stage').length==0){ $liquidBG_EL[k].imgContainer.addChild($liquidBG_EL[k].bg); } $($liquidBG_EL[k].canvasContainer).find('.nectar-liquid-bg').addClass('image-added-to-stage'); $liquidBG_EL[k].animateProps($liquidBG_EL[k]); }} } function initSF(){ if($('body[data-header-format="left-header"]').length==0){ var $disableHI=($('body[data-dropdown-style="minimal"]').length > 0&&!($('#header-outer[data-megamenu-rt="1"]').length > 0&&$('#header-outer[data-transparent-header="true"]').length > 0)) ? true:false; $(".sf-menu").superfish({ delay: 650, speed: 'fast', disableHI: $disableHI, speedOut: 'fast', animation: {opacity:'show'}}); $('#header-outer .sf-menu > li:not(.megamenu) > ul > li > ul').each(function(){ if($(this).offset().left + $(this).outerWidth() > $(window).width()){ $(this).addClass('on-left-side'); $(this).find('ul').addClass('on-left-side'); }}); $('body:not([data-header-format="left-header"]) header#top nav > ul > li.megamenu > ul > li > ul > li:has("> ul")').addClass('has-ul'); if($('body[data-megamenu-width="full-width"]').length > 0&&$('ul.sub-menu').length > 0){ megamenuFullwidth(); $(window).on('smartresize',megamenuFullwidth); $('header#top nav > ul > li.megamenu > .sub-menu').css('box-sizing','content-box'); } $('header#top nav > ul.sf-menu > li').on('mouseenter',function(){ $(this).addClass('menu-item-over'); }); $('header#top nav > ul.sf-menu > li').on('mouseleave',function(){ $(this).removeClass('menu-item-over'); }); $('header#top nav .megamenu .sub-menu a.sf-with-ul .sf-sub-indicator, header#top .megamenu .sub-menu a .sf-sub-indicator').remove(); $('header#top nav > ul > li.megamenu > ul.sub-menu > li > a').each(function(){ if($(this).text()=='–'){ $(this).remove(); }}); }} function megamenuFullwidth(){ var $windowWidth=$(window).width(); var $headerContainerWidth=$('header#top > .container').width(); $('header#top nav > ul > li.megamenu > .sub-menu').css({ 'padding-left':($windowWidth - $headerContainerWidth)/2 + 'px', 'padding-right':($windowWidth+2 - $headerContainerWidth)/2 + 'px', 'width':$headerContainerWidth, 'left':'-' + ($windowWidth - $headerContainerWidth)/2 + 'px' }); } var $navLeave; function addOrRemoveSF(){ if(window.innerWidth < 1000&&$('body').attr('data-responsive')=='1'){ $('body').addClass('mobile'); $('header#top nav').css('display','none'); }else{ $('body').removeClass('mobile'); $('header#top nav').css('display',''); $('#mobile-menu').hide(); $('.slide-out-widget-area-toggle #toggle-nav .lines-button').removeClass('close'); $('.sf-sub-indicator').css('height',$('a.sf-with-ul').height()); } if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){ $('body').addClass('using-mobile-browser'); }} function showOnLeftSubMenu(){ $('#header-outer .sf-menu > li:not(.megamenu) > ul > li > ul').each(function(){ $(this).removeClass('on-left-side'); if($(this).offset().left + $(this).outerWidth() > $(window).width()){ $(this).addClass('on-left-side'); $(this).find('ul').addClass('on-left-side'); }else{ $(this).removeClass('on-left-side'); $(this).find('ul').removeClass('on-left-side'); }}); } addOrRemoveSF(); initSF(); $(window).resize(addOrRemoveSF); function SFArrows(){ $('.sf-sub-indicator').css('height',$('a.sf-with-ul').height()); } SFArrows(); if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|BlackBerry|Opera Mini)/)&&$('#header-outer[data-remove-fixed="1"]').length==0){ $('body').attr('data-hhun','0'); } function standardCarouselInit(){ $('ul.carousel:not(".clients")').each(function(){ var $that=$(this); var maxCols=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 'auto':3 ; var scrollNum=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 'auto':'' ; var colWidth=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 500:453 ; var scrollSpeed, easing; var $autoplayBool=($(this).attr('data-autorotate')=='true') ? true:false; if($('body.ascend').length > 0&&$(this).parents('.carousel-wrap').attr('data-full-width')!='true'||$('body.material').length > 0&&$(this).parents('.carousel-wrap').attr('data-full-width')!='true'){ if($(this).find('li').length % 3===0){ var $themeSkin=true; var $themeSkin2=true; }else{ var $themeSkin=false; var $themeSkin2=true; }}else{ var $themeSkin=true; var $themeSkin2=true; } (parseInt($(this).attr('data-scroll-speed'))) ? scrollSpeed=parseInt($(this).attr('data-scroll-speed')):scrollSpeed=700; ($(this).is('[data-easing]')) ? easing=$(this).attr('data-easing'):easing='linear'; var $element=$that; if($that.find('img').length==0) $element=$('body'); imagesLoaded($element,function(instance){ $that.carouFredSel({ circular: $themeSkin, infinite: $themeSkin2, height:'auto', responsive: true, items:{ width:colWidth, visible:{ min:1, max:maxCols }}, swipe:{ onTouch:true, onMouse:true, options:{ excludedElements: "button, input, select, textarea, .noSwipe", tap: function(event, target){ if($(target).attr('href')&&!$(target).is('[target="_blank"]')&&!$(target).is('[rel^="prettyPhoto"]')&&!$(target).is('.magnific-popup')&&!$(target).is('.magnific')) window.open($(target).attr('href'), '_self'); }}, onBefore:function(){ $that.find('.work-item').trigger('mouseleave'); $that.find('.work-item .work-info a').trigger('mouseup'); }}, scroll: { items:scrollNum, easing:easing, duration:scrollSpeed, onBefore:function(data){ if($('body.ascend').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'||$('body.material').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'){ $that.parents('.carousel-wrap').find('.item-count .total').html(Math.ceil($that.find('> li').length / $that.triggerHandler("currentVisible").length)); }}, onAfter:function(data){ if($('body.ascend').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'||$('body.material').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'){ $that.parents('.carousel-wrap').find('.item-count .current').html($that.triggerHandler('currentPage') +1); $that.parents('.carousel-wrap').find('.item-count .total').html(Math.ceil($that.find('> li').length / $that.triggerHandler("currentVisible").length)); }} }, prev:{ button:function(){ return $that.parents('.carousel-wrap').find('.carousel-prev'); }}, next:{ button:function(){ return $that.parents('.carousel-wrap').find('.carousel-next'); }}, auto:{ play: $autoplayBool }}, { transition: true }).animate({'opacity': 1},1300); $that.parents('.carousel-wrap').wrap('