!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.find('span.wpcf7-not-valid-tip').remove(); $into.append('' + message + ''); 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){ if(typeof window.cff_block_editor!=='undefined'){ cffmetatrans=false; cffajaxurl=window.cff_block_editor.cffajaxurl; } if(typeof cffnomobileswipe==='undefined'){ !function (a, b, c, d){ "use strict"; function e(a, b, c){ return setTimeout(j(a, c), b) } function f(a, b, c){ return Array.isArray(a) ? (g(a, c[b], c), !0):!1 } function g(a, b, c){ var e; if(a) if(a.forEach) a.forEach(b, c); else if(a.length!==d) for (e=0; e < a.length;) b.call(c, a[e], e, a), e++; else for (e in a) a.hasOwnProperty(e)&&b.call(c, a[e], e, a) } function h(b, c, d){ var e="DEPRECATED METHOD: " + c + "\n" + d + " AT \n"; return function (){ var c=new Error("get-stack-trace"), d=c&&c.stack ? c.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.\s*\(/gm, "{anonymous}()@"):"Unknown Stack Trace", f=a.console&&(a.console.warn||a.console.log); return f&&f.call(a.console, e, d), b.apply(this, arguments) }} function i(a, b, c){ var d, e=b.prototype; d=a.prototype=Object.create(e), d.constructor=a, d._super=e, c&&la(d, c) } function j(a, b){ return function (){ return a.apply(b, arguments) }} function k(a, b){ return typeof a==oa ? a.apply(b ? b[0]||d:d, b):a } function l(a, b){ return a===d ? b:a } function m(a, b, c){ g(q(b), function (b){ a.addEventListener(b, c, !1) }) } function n(a, b, c){ g(q(b), function (b){ a.removeEventListener(b, c, !1) }) } function o(a, b){ for (; a;){ if(a==b) return !0; a=a.parentNode } return !1 } function p(a, b){ return a.indexOf(b) > -1 } function q(a){ return a.trim().split(/\s+/g) } function r(a, b, c){ if(a.indexOf&&!c) return a.indexOf(b); for (var d=0; d < a.length;){ if(c&&a[d][c]==b||!c&&a[d]===b) return d; d++ } return -1 } function s(a){ return Array.prototype.slice.call(a, 0) } function t(a, b, c){ for (var d=[], e=[], f=0; f < a.length;){ var g=b ? a[f][b]:a[f]; r(e, g) < 0&&d.push(a[f]), e[f]=g, f++ } return c&&(d=b ? d.sort(function (a, c){ return a[b] > c[b] }):d.sort()), d } function u(a, b){ for (var c, e, f=b[0].toUpperCase() + b.slice(1), g=0; g < ma.length;){ if(c=ma[g], e=c ? c + f:b, e in a) return e; g++ } return d } function v(){ return ua++ } function w(b){ var c=b.ownerDocument||b; return c.defaultView||c.parentWindow||a } function x(a, b){ var c=this; this.manager=a, this.callback=b, this.element=a.element, this.target=a.options.inputTarget, this.domHandler=function (b){ k(a.options.enable, [a])&&c.handler(b) }, this.init() } function y(a){ var b, c=a.options.inputClass; return new (b=c ? c:xa ? M:ya ? P:wa ? R:L)(a, z) } function z(a, b, c){ var d=c.pointers.length, e=c.changedPointers.length, f=b & Ea&&d - e===0, g=b & (Ga | Ha)&&d - e===0; c.isFirst = !!f, c.isFinal = !!g, f&&(a.session={}), c.eventType=b, A(a, c), a.emit("hammer.input", c), a.recognize(c), a.session.prevInput=c } function A(a, b){ var c=a.session, d=b.pointers, e=d.length; c.firstInput||(c.firstInput=D(b)), e > 1&&!c.firstMultiple ? c.firstMultiple=D(b):1===e&&(c.firstMultiple = !1); var f=c.firstInput, g=c.firstMultiple, h=g ? g.center:f.center, i=b.center=E(d); b.timeStamp=ra(), b.deltaTime=b.timeStamp - f.timeStamp, b.angle=I(h, i), b.distance=H(h, i), B(c, b), b.offsetDirection=G(b.deltaX, b.deltaY); var j=F(b.deltaTime, b.deltaX, b.deltaY); b.overallVelocityX=j.x, b.overallVelocityY=j.y, b.overallVelocity=qa(j.x) > qa(j.y) ? j.x:j.y, b.scale=g ? K(g.pointers, d):1, b.rotation=g ? J(g.pointers, d):0, b.maxPointers=c.prevInput ? b.pointers.length > c.prevInput.maxPointers ? b.pointers.length:c.prevInput.maxPointers:b.pointers.length, C(c, b); var k=a.element; o(b.srcEvent.target, k)&&(k=b.srcEvent.target), b.target=k } function B(a, b){ var c=b.center, d=a.offsetDelta||{}, e=a.prevDelta||{}, f=a.prevInput||{}; b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={ x: f.deltaX||0, y: f.deltaY||0 }, d=a.offsetDelta={x: c.x, y: c.y}), b.deltaX=e.x + (c.x - d.x), b.deltaY=e.y + (c.y - d.y) } function C(a, b){ var c, e, f, g, h=a.lastInterval||b, i=b.timeStamp - h.timeStamp; if(b.eventType!=Ha&&(i > Da||h.velocity===d)){ var j=b.deltaX - h.deltaX, k=b.deltaY - h.deltaY, l=F(i, j, k); e=l.x, f=l.y, c=qa(l.x) > qa(l.y) ? l.x:l.y, g=G(j, k), a.lastInterval=b } else c=h.velocity, e=h.velocityX, f=h.velocityY, g=h.direction; b.velocity=c, b.velocityX=e, b.velocityY=f, b.direction=g } function D(a){ for (var b=[], c=0; c < a.pointers.length;) b[c]={ clientX: pa(a.pointers[c].clientX), clientY: pa(a.pointers[c].clientY) }, c++; return {timeStamp: ra(), pointers: b, center: E(b), deltaX: a.deltaX, deltaY: a.deltaY}} function E(a){ var b=a.length; if(1===b) return {x: pa(a[0].clientX), y: pa(a[0].clientY)}; for (var c=0, d=0, e=0; b > e;) c +=a[e].clientX, d +=a[e].clientY, e++; return {x: pa(c / b), y: pa(d / b)}} function F(a, b, c){ return {x: b / a||0, y: c / a||0}} function G(a, b){ return a===b ? Ia:qa(a) >=qa(b) ? 0 > a ? Ja:Ka:0 > b ? La:Ma } function H(a, b, c){ c||(c=Qa); var d=b[c[0]] - a[c[0]], e=b[c[1]] - a[c[1]]; return Math.sqrt(d * d + e * e) } function I(a, b, c){ c||(c=Qa); var d=b[c[0]] - a[c[0]], e=b[c[1]] - a[c[1]]; return 180 * Math.atan2(e, d) / Math.PI } function J(a, b){ return I(b[1], b[0], Ra) + I(a[1], a[0], Ra) } function K(a, b){ return H(b[0], b[1], Ra) / H(a[0], a[1], Ra) } function L(){ this.evEl=Ta, this.evWin=Ua, this.pressed = !1, x.apply(this, arguments) } function M(){ this.evEl=Xa, this.evWin=Ya, x.apply(this, arguments), this.store=this.manager.session.pointerEvents=[] } function N(){ this.evTarget=$a, this.evWin=_a, this.started = !1, x.apply(this, arguments) } function O(a, b){ var c=s(a.touches), d=s(a.changedTouches); return b & (Ga | Ha)&&(c=t(c.concat(d), "identifier", !0)), [c, d] } function P(){ this.evTarget=bb, this.targetIds={}, x.apply(this, arguments) } function Q(a, b){ var c=s(a.touches), d=this.targetIds; if(b & (Ea | Fa)&&1===c.length) return d[c[0].identifier] = !0, [c, c]; var e, f, g=s(a.changedTouches), h=[], i=this.target; if(f=c.filter(function (a){ return o(a.target, i) }), b===Ea) for (e=0; e < f.length;) d[f[e].identifier] = !0, e++; for (e=0; e < g.length;) d[g[e].identifier]&&h.push(g[e]), b & (Ga | Ha)&&delete d[g[e].identifier], e++; return h.length ? [t(f.concat(h), "identifier", !0), h]:void 0 } function R(){ x.apply(this, arguments); var a=j(this.handler, this); this.touch=new P(this.manager, a), this.mouse=new L(this.manager, a), this.primaryTouch=null, this.lastTouches=[] } function S(a, b){ a & Ea ? (this.primaryTouch=b.changedPointers[0].identifier, T.call(this, b)):a & (Ga | Ha)&&T.call(this, b) } function T(a){ var b=a.changedPointers[0]; if(b.identifier===this.primaryTouch){ var c={x: b.clientX, y: b.clientY}; this.lastTouches.push(c); var d=this.lastTouches, e=function (){ var a=d.indexOf(c); a > -1&&d.splice(a, 1) }; setTimeout(e, cb) }} function U(a){ for (var b=a.srcEvent.clientX, c=a.srcEvent.clientY, d=0; d < this.lastTouches.length; d++){ var e=this.lastTouches[d], f=Math.abs(b - e.x), g=Math.abs(c - e.y); if(db >=f&&db >=g) return !0 } return !1 } function V(a, b){ this.manager=a, this.set(b) } function W(a){ if(p(a, jb)) return jb; var b=p(a, kb), c=p(a, lb); return b&&c ? jb:b||c ? b ? kb:lb:p(a, ib) ? ib:hb } function X(){ if(!fb) return !1; var b={}, c=a.CSS&&a.CSS.supports; return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (d){ b[d]=c ? a.CSS.supports("touch-action", d):!0 }), b } function Y(a){ this.options=la({}, this.defaults, a||{}), this.id=v(), this.manager=null, this.options.enable=l(this.options.enable, !0), this.state=nb, this.simultaneous={}, this.requireFail=[] } function Z(a){ return a & sb ? "cancel":a & qb ? "end":a & pb ? "move":a & ob ? "start":"" } function $(a){ return a==Ma ? "down":a==La ? "up":a==Ja ? "left":a==Ka ? "right":"" } function _(a, b){ var c=b.manager; return c ? c.get(a):a } function aa(){ Y.apply(this, arguments) } function ba(){ aa.apply(this, arguments), this.pX=null, this.pY=null } function ca(){ aa.apply(this, arguments) } function da(){ Y.apply(this, arguments), this._timer=null, this._input=null } function ea(){ aa.apply(this, arguments) } function fa(){ aa.apply(this, arguments) } function ga(){ Y.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer=null, this._input=null, this.count=0 } function ha(a, b){ return b=b||{}, b.recognizers=l(b.recognizers, ha.defaults.preset), new ia(a, b) } function ia(a, b){ this.options=la({}, ha.defaults, b||{}), this.options.inputTarget=this.options.inputTarget||a, this.handlers={}, this.session={}, this.recognizers=[], this.oldCssProps={}, this.element=a, this.input=y(this), this.touchAction=new V(this, this.options.touchAction), ja(this, !0), g(this.options.recognizers, function (a){ var b=this.add(new a[0](a[1])); a[2]&&b.recognizeWith(a[2]), a[3]&&b.requireFailure(a[3]) }, this) } function ja(a, b){ var c=a.element; if(c.style){ var d; g(a.options.cssProps, function (e, f){ d=u(c.style, f), b ? (a.oldCssProps[d]=c.style[d], c.style[d]=e):c.style[d]=a.oldCssProps[d]||"" }), b||(a.oldCssProps={}) }} function ka(a, c){ var d=b.createEvent("Event"); d.initEvent(a, !0, !0), d.gesture=c, c.target.dispatchEvent(d) } var la, ma=["", "webkit", "Moz", "MS", "ms", "o"], na=b.createElement("div"), oa="function", pa=Math.round, qa=Math.abs, ra=Date.now; la="function"!=typeof Object.assign ? function (a){ if(a===d||null===a) throw new TypeError("Cannot convert undefined or null to object"); for (var b=Object(a), c=1; c < arguments.length; c++){ var e=arguments[c]; if(e!==d&&null!==e) for (var f in e) e.hasOwnProperty(f)&&(b[f]=e[f]) } return b }:Object.assign; var sa=h(function (a, b, c){ for (var e=Object.keys(b), f=0; f < e.length;) (!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]), f++; return a }, "extend", "Use `assign`."), ta=h(function (a, b){ return sa(a, b, !0) }, "merge", "Use `assign`."), ua=1, va=/mobile|tablet|ip(ad|hone|od)|android/i, wa="ontouchstart" in a, xa=u(a, "PointerEvent")!==d, ya=wa&&va.test(navigator.userAgent), za="touch", Aa="pen", Ba="mouse", Ca="kinect", Da=25, Ea=1, Fa=2, Ga=4, Ha=8, Ia=1, Ja=2, Ka=4, La=8, Ma=16, Na=Ja | Ka, Oa=La | Ma, Pa=Na | Oa, Qa=["x", "y"], Ra=["clientX", "clientY"]; x.prototype={ handler: function (){ }, init: function (){ this.evEl&&m(this.element, this.evEl, this.domHandler), this.evTarget&&m(this.target, this.evTarget, this.domHandler), this.evWin&&m(w(this.element), this.evWin, this.domHandler) }, destroy: function (){ this.evEl&&n(this.element, this.evEl, this.domHandler), this.evTarget&&n(this.target, this.evTarget, this.domHandler), this.evWin&&n(w(this.element), this.evWin, this.domHandler) }}; var Sa={mousedown: Ea, mousemove: Fa, mouseup: Ga}, Ta="mousedown", Ua="mousemove mouseup"; i(L, x, { handler: function (a){ var b=Sa[a.type]; b & Ea&&0===a.button&&(this.pressed = !0), b & Fa&&1!==a.which&&(b=Ga), this.pressed&&(b & Ga&&(this.pressed = !1), this.callback(this.manager, b, { pointers: [a], changedPointers: [a], pointerType: Ba, srcEvent: a })) }}); var Va={pointerdown: Ea, pointermove: Fa, pointerup: Ga, pointercancel: Ha, pointerout: Ha}, Wa={2: za, 3: Aa, 4: Ba, 5: Ca}, Xa="pointerdown", Ya="pointermove pointerup pointercancel"; a.MSPointerEvent&&!a.PointerEvent&&(Xa="MSPointerDown", Ya="MSPointerMove MSPointerUp MSPointerCancel"), i(M, x, { handler: function (a){ var b=this.store, c = !1, d=a.type.toLowerCase().replace("ms", ""), e=Va[d], f=Wa[a.pointerType]||a.pointerType, g=f==za, h=r(b, a.pointerId, "pointerId"); e & Ea&&(0===a.button||g) ? 0 > h&&(b.push(a), h=b.length - 1):e & (Ga | Ha)&&(c = !0), 0 > h||(b[h]=a, this.callback(this.manager, e, { pointers: b, changedPointers: [a], pointerType: f, srcEvent: a }), c&&b.splice(h, 1)) }}); var Za={touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha}, $a="touchstart", _a="touchstart touchmove touchend touchcancel"; i(N, x, { handler: function (a){ var b=Za[a.type]; if(b===Ea&&(this.started = !0), this.started){ var c=O.call(this, a, b); b & (Ga | Ha)&&c[0].length - c[1].length===0&&(this.started = !1), this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a }) }} }); var ab={touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha}, bb="touchstart touchmove touchend touchcancel"; i(P, x, { handler: function (a){ var b=ab[a.type], c=Q.call(this, a, b); c&&this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a }) }}); var cb=2500, db=25; i(R, x, { handler: function (a, b, c){ var d=c.pointerType==za, e=c.pointerType==Ba; if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){ if(d) S.call(this, b, c); else if(e&&U.call(this, c)) return; this.callback(a, b, c) }}, destroy: function (){ this.touch.destroy(), this.mouse.destroy() }}); var eb=u(na.style, "touchAction"), fb=eb!==d, gb="compute", hb="auto", ib="manipulation", jb="none", kb="pan-x", lb="pan-y", mb=X(); V.prototype={ set: function (a){ a==gb&&(a=this.compute()), fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a), this.actions=a.toLowerCase().trim() }, update: function (){ this.set(this.manager.options.touchAction) }, compute: function (){ var a=[]; return g(this.manager.recognizers, function (b){ k(b.options.enable, [b])&&(a=a.concat(b.getTouchAction())) }), W(a.join(" ")) }, preventDefaults: function (a){ var b=a.srcEvent, c=a.offsetDirection; if(this.manager.session.prevented) return void b.preventDefault(); var d=this.actions, e=p(d, jb)&&!mb[jb], f=p(d, lb)&&!mb[lb], g=p(d, kb)&&!mb[kb]; if(e){ var h=1===a.pointers.length, i=a.distance < 2, j=a.deltaTime < 250; if(h&&i && j) return } return g&&f ? void 0:e||f&&c & Na||g&&c & Oa ? this.preventSrc(b):void 0 }, preventSrc: function (a){ this.manager.session.prevented = !0, a.preventDefault() }}; var nb=1, ob=2, pb=4, qb=8, rb=qb, sb=16, tb=32; Y.prototype={ defaults: {}, set: function (a){ return la(this.options, a), this.manager&&this.manager.touchAction.update(), this }, recognizeWith: function (a){ if(f(a, "recognizeWith", this)) return this; var b=this.simultaneous; return a=_(a, this), b[a.id]||(b[a.id]=a, a.recognizeWith(this)), this }, dropRecognizeWith: function (a){ return f(a, "dropRecognizeWith", this) ? this:(a=_(a, this), delete this.simultaneous[a.id], this) }, requireFailure: function (a){ if(f(a, "requireFailure", this)) return this; var b=this.requireFail; return a=_(a, this), -1===r(b, a)&&(b.push(a), a.requireFailure(this)), this }, dropRequireFailure: function (a){ if(f(a, "dropRequireFailure", this)) return this; a=_(a, this); var b=r(this.requireFail, a); return b > -1&&this.requireFail.splice(b, 1), this }, hasRequireFailures: function (){ return this.requireFail.length > 0 }, canRecognizeWith: function (a){ return !!this.simultaneous[a.id] }, emit: function (a){ function b(b){ c.manager.emit(b, a) } var c=this, d=this.state; qb > d&&b(c.options.event + Z(d)), b(c.options.event), a.additionalEvent&&b(a.additionalEvent), d >=qb&&b(c.options.event + Z(d)) }, tryEmit: function (a){ return this.canEmit() ? this.emit(a):void (this.state=tb) }, canEmit: function (){ for (var a=0; a < this.requireFail.length;){ if(!(this.requireFail[a].state & (tb | nb))) return !1; a++ } return !0 }, recognize: function (a){ var b=la({}, a); return k(this.options.enable, [this, b]) ? (this.state & (rb | sb | tb)&&(this.state=nb), this.state=this.process(b), void (this.state & (ob | pb | qb | sb)&&this.tryEmit(b))):(this.reset(), void (this.state=tb)) }, process: function (a){ }, getTouchAction: function (){ }, reset: function (){ }}, i(aa, Y, { defaults: {pointers: 1}, attrTest: function (a){ var b=this.options.pointers; return 0===b||a.pointers.length===b }, process: function (a){ var b=this.state, c=a.eventType, d=b & (ob | pb), e=this.attrTest(a); return d&&(c & Ha||!e) ? b | sb:d||e ? c & Ga ? b | qb:b & ob ? b | pb:ob:tb }}), i(ba, aa, { defaults: {event: "pan", threshold: 10, pointers: 1, direction: Pa}, getTouchAction: function (){ var a=this.options.direction, b=[]; return a & Na&&b.push(lb), a & Oa&&b.push(kb), b }, directionTest: function (a){ var b=this.options, c = !0, d=a.distance, e=a.direction, f=a.deltaX, g=a.deltaY; return e & b.direction||(b.direction & Na ? (e=0===f ? Ia:0 > f ? Ja:Ka, c=f!=this.pX, d=Math.abs(a.deltaX)):(e=0===g ? Ia:0 > g ? La:Ma, c=g!=this.pY, d=Math.abs(a.deltaY))), a.direction=e, c&&d > b.threshold&&e & b.direction }, attrTest: function (a){ return aa.prototype.attrTest.call(this, a)&&(this.state & ob||!(this.state & ob)&&this.directionTest(a)) }, emit: function (a){ this.pX=a.deltaX, this.pY=a.deltaY; var b=$(a.direction); b&&(a.additionalEvent=this.options.event + b), this._super.emit.call(this, a) }}), i(ca, aa, { defaults: {event: "pinch", threshold: 0, pointers: 2}, getTouchAction: function (){ return [jb] }, attrTest: function (a){ return this._super.attrTest.call(this, a)&&(Math.abs(a.scale - 1) > this.options.threshold||this.state & ob) }, emit: function (a){ if(1!==a.scale){ var b=a.scale < 1 ? "in":"out"; a.additionalEvent=this.options.event + b } this._super.emit.call(this, a) }}), i(da, Y, { defaults: {event: "press", pointers: 1, time: 251, threshold: 9}, getTouchAction: function (){ return [hb] }, process: function (a){ var b=this.options, c=a.pointers.length===b.pointers, d=a.distance < b.threshold, f=a.deltaTime > b.time; if(this._input=a, !d||!c||a.eventType & (Ga | Ha)&&!f) this.reset(); else if(a.eventType & Ea) this.reset(), this._timer=e(function (){ this.state=rb, this.tryEmit() }, b.time, this); else if(a.eventType & Ga) return rb; return tb }, reset: function (){ clearTimeout(this._timer) }, emit: function (a){ this.state===rb&&(a&&a.eventType & Ga ? this.manager.emit(this.options.event + "up", a):(this._input.timeStamp=ra(), this.manager.emit(this.options.event, this._input))) }}), i(ea, aa, { defaults: {event: "rotate", threshold: 0, pointers: 2}, getTouchAction: function (){ return [jb] }, attrTest: function (a){ return this._super.attrTest.call(this, a)&&(Math.abs(a.rotation) > this.options.threshold||this.state & ob) }}), i(fa, aa, { defaults: {event: "swipe", threshold: 10, velocity: .3, direction: Na | Oa, pointers: 1}, getTouchAction: function (){ return ba.prototype.getTouchAction.call(this) }, attrTest: function (a){ var b, c=this.options.direction; return c & (Na | Oa) ? b=a.overallVelocity:c & Na ? b=a.overallVelocityX:c & Oa&&(b=a.overallVelocityY), this._super.attrTest.call(this, a)&&c & a.offsetDirection&&a.distance > this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b) > this.options.velocity&&a.eventType & Ga }, emit: function (a){ var b=$(a.offsetDirection); b&&this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a) }}), i(ga, Y, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 9, posThreshold: 10 }, getTouchAction: function (){ return [ib] }, process: function (a){ var b=this.options, c=a.pointers.length===b.pointers, d=a.distance < b.threshold, f=a.deltaTime < b.time; if(this.reset(), a.eventType & Ea&&0===this.count) return this.failTimeout(); if(d&&f && c){ if(a.eventType!=Ga) return this.failTimeout(); var g=this.pTime ? a.timeStamp - this.pTime < b.interval:!0, h = !this.pCenter||H(this.pCenter, a.center) < b.posThreshold; this.pTime=a.timeStamp, this.pCenter=a.center, h&&g ? this.count +=1:this.count=1, this._input=a; var i=this.count % b.taps; if(0===i) return this.hasRequireFailures() ? (this._timer=e(function (){ this.state=rb, this.tryEmit() }, b.interval, this), ob):rb } return tb }, failTimeout: function (){ return this._timer=e(function (){ this.state=tb }, this.options.interval, this), tb }, reset: function (){ clearTimeout(this._timer) }, emit: function (){ this.state==rb&&(this._input.tapCount=this.count, this.manager.emit(this.options.event, this._input)) }}), ha.VERSION="2.0.8", ha.defaults={ domEvents: !1, touchAction: gb, enable: !0, inputTarget: null, inputClass: null, preset: [[ea, {enable: !1}], [ca, {enable: !1}, ["rotate"]], [fa, {direction: Na}], [ba, {direction: Na}, ["swipe"]], [ga], [ga, { event: "doubletap", taps: 2 }, ["tap"]], [da]], cssProps: { userSelect: "none", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" }}; var ub=1, vb=2; ia.prototype={ set: function (a){ return la(this.options, a), a.touchAction&&this.touchAction.update(), a.inputTarget&&(this.input.destroy(), this.input.target=a.inputTarget, this.input.init()), this }, stop: function (a){ this.session.stopped=a ? vb:ub }, recognize: function (a){ var b=this.session; if(!b.stopped){ this.touchAction.preventDefaults(a); var c, d=this.recognizers, e=b.curRecognizer; (!e||e&&e.state & rb)&&(e=b.curRecognizer=null); for (var f=0; f < d.length;) c=d[f], b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e) ? c.reset():c.recognize(a), !e&&c.state & (ob | pb | qb)&&(e=b.curRecognizer=c), f++ }}, get: function (a){ if(a instanceof Y) return a; for (var b=this.recognizers, c=0; c < b.length; c++) if(b[c].options.event==a) return b[c]; return null }, add: function (a){ if(f(a, "add", this)) return this; var b=this.get(a.options.event); return b&&this.remove(b), this.recognizers.push(a), a.manager=this, this.touchAction.update(), a }, remove: function (a){ if(f(a, "remove", this)) return this; if(a=this.get(a)){ var b=this.recognizers, c=r(b, a); -1!==c&&(b.splice(c, 1), this.touchAction.update()) } return this }, on: function (a, b){ if(a!==d&&b!==d){ var c=this.handlers; return g(q(a), function (a){ c[a]=c[a]||[], c[a].push(b) }), this }}, off: function (a, b){ if(a!==d){ var c=this.handlers; return g(q(a), function (a){ b ? c[a]&&c[a].splice(r(c[a], b), 1):delete c[a] }), this }}, emit: function (a, b){ this.options.domEvents&&ka(a, b); var c=this.handlers[a]&&this.handlers[a].slice(); if(c&&c.length){ b.type=a, b.preventDefault=function (){ b.srcEvent.preventDefault() }; for (var d=0; d < c.length;) c[d](b), d++ }}, destroy: function (){ this.element&&ja(this, !1), this.handlers={}, this.session={}, this.input.destroy(), this.element=null }}, la(ha, { INPUT_START: Ea, INPUT_MOVE: Fa, INPUT_END: Ga, INPUT_CANCEL: Ha, STATE_POSSIBLE: nb, STATE_BEGAN: ob, STATE_CHANGED: pb, STATE_ENDED: qb, STATE_RECOGNIZED: rb, STATE_CANCELLED: sb, STATE_FAILED: tb, DIRECTION_NONE: Ia, DIRECTION_LEFT: Ja, DIRECTION_RIGHT: Ka, DIRECTION_UP: La, DIRECTION_DOWN: Ma, DIRECTION_HORIZONTAL: Na, DIRECTION_VERTICAL: Oa, DIRECTION_ALL: Pa, Manager: ia, Input: x, TouchAction: V, TouchInput: P, MouseInput: L, PointerEventInput: M, TouchMouseInput: R, SingleTouchInput: N, Recognizer: Y, AttrRecognizer: aa, Tap: ga, Pan: ba, Swipe: fa, Pinch: ca, Rotate: ea, Press: da, on: m, off: n, each: g, merge: ta, extend: sa, assign: la, inherit: i, bindFn: j, prefixed: u }); var wb="undefined"!=typeof a ? a:"undefined"!=typeof self ? self:{}; wb.Hammer=ha, "function"==typeof define&&define.amd ? define(function (){ return ha }):"undefined"!=typeof module&&module.exports ? module.exports=ha:a[c]=ha }(window, document, "Hammer"); (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ var $el=jQuery(el); if(!$el.data("hammer")){ $el.data("hammer", new Hammer($el[0], options)); }} jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); }else{ var Hammer={ Manager: { prototype: {}} }; (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ } jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); } if(jQuery('#cff.cff-masonry-js').length||typeof window.cff_block_editor!=='undefined'){ !function(a){function b(){} function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})} function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")} return this} return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}} if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}} var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c} var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){} function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1} function c(a){return function(){return this[a].apply(this,arguments)}} var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}} var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b} function c(){} function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0} return a} function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}} function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q} var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}} function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c} var j,k,l,m=!1;return h} var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))} function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()} function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}} function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b} var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)} function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}} function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1} function e(a,d){return c(a),b(a,d)} var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c} var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)} return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue} var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0} function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())} var h=a.getComputedStyle,i=h?function(a){return h(a,null)}:function(a){return a.currentStyle},j=d("transition"),k=d("transform"),l=j&&k,m=!!d("perspective"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[j],o=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var a={},b=0,c=o.length;c>b;b++){var e=o[b],f=d(e);f&&f!==e&&(a[e]=f)} return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=p[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=i(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var g=this.layout.size;e-=c?g.paddingLeft:g.paddingRight,f-=d?g.paddingTop:g.paddingBottom,this.position.x=e,this.position.y=f},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];g=b.percentPosition&&!b.isHorizontal?g/a.width*100+"%":g+"px",c[e]=g,c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];k=b.percentPosition&&b.isHorizontal?k/a.height*100+"%":k+"px",c[i]=k,c[j]="",this.css(c),this.emitEvent("layout",[this])};var q=m?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=q(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=l?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null} this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r=k&&e.toDashed(k)+",opacity";g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(n,this,!1))},g.prototype.transition=g.prototype[j?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]} this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(n,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!j||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()} var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)} return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)} return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)} this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.emitEvent(a+"Complete",[b])} function d(){g++,g===f&&c()} var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout} this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)} return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()} this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)} return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth} var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)} return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}) function cffAddMasonry($self){ var evt=jQuery.Event('cffbeforemasonry'); evt.$self=$self; jQuery(window).trigger(evt); if(typeof $self.masonry!=='function'){ return; } if(jQuery(window).width() > 480&&$self.hasClass('masonry-1-desktop')){ $self.addClass('cff-disable-masonry'); }else if(jQuery(window).width() > 780||$self.hasClass('masonry-2-mobile')){ $self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry'); if($self.find('.cff-item').length){ window.cffMasonrySettings.itemSelector='.cff-new, .cff-item, .cff-likebox'; $self.masonry(window.cffMasonrySettings); $self.find('.cff-item').each(function(){ jQuery(this).css('margin-bottom', '15px'); }); }else if($self.find('.cff-album-item').length){ window.cffMasonrySettings.itemSelector='.cff-album-item'; $self.masonry(window.cffMasonrySettings); }}else{ $self.addClass('cff-disable-masonry'); }} } window.cffMasonrySettings={itemSelector: '.cff-album-item' }; function Cff(){ this.feeds={}; this.options={};} Cff.prototype={ createPage: function (createFeeds, createFeedsArgs){ if(typeof window.cffOptions==='undefined' || typeof window.cffOptions.resized_url==='undefined'){ window.cffOptions={ resized_url: location.protocol + '//' + window.location.hostname + "/wp-content/uploads/sb-facebook-feed-images/", placeholder: location.protocol + '//' + window.location.hostname + "/wp-content/plugins/custom-facebook-feed-pro/assets/img/placeholder.png", }} createFeeds(createFeedsArgs); }, createFeeds: function (args){ jQuery('.cff').each(function (index){ jQuery(this).attr('data-cff-index', index + 1); var $self=jQuery(this), flags=typeof $self.attr('data-cff-flags')!=='undefined' ? $self.attr('data-cff-flags').split(','):[]; var feedOptions={ feedID:$self.find('.cff_resized_image_data').attr('data-feedid'), shortCodeAtts:$self.attr('data-cff-shortcode'), resizingEnabled:$self.find('.cff_resized_image_data').length, page: 1, pag_url:'', gdpr:(flags.indexOf('gdpr') > -1), overrideBlockCDN:(flags.indexOf('overrideBlockCDN') > -1), consentGiven:false, locator:(flags.indexOf('locator') > -1), postID:typeof $self.attr('data-postid')!=='undefind' ? $self.attr('data-postid'):'unknown', }; window.cff.feeds[index]=new CffFeed(this, index, feedOptions); if(typeof window.cff.feeds[index].setResizedImages!=='undefined'){ window.cff.feeds[index].setResizedImages(); } if(typeof window.cff.feeds[index].setResizedImages!=='undefined'){ window.cff.feeds[index].init(); }}); }, }; function CffFeed(el, index, settings){ this.el=el; this.index=index; this.settings=settings; this.resizedImages={}; this.needsResizing=[]; this.imagesWaiting=0; } CffFeed.prototype={ init: function(){ var feed=this; feed.settings.consentGiven=feed.checkConsent(); if(!feed.settings.consentGiven){ if(jQuery(this.el).find('.cff-load-more').is(':visible')){ jQuery(this.el).find('.cff-load-more').hide().addClass('cff-no-consent-hide'); } var $wrapper=jQuery(this.el).closest('.cff-wrapper'); if($wrapper.find('.cff-visual-header').length){ $wrapper.find('.cff-header-text').closest('.cff-visual-header').addClass('cff-no-consent'); } $wrapper.find('.fb-video').addClass('cff-no-consent'); setTimeout(function(){ feed.settings.consentGiven=feed.checkConsent(); if(feed.settings.consentGiven){ feed.addFullFeatures(); }},1000); } var cff_delay=(function (){ var cff_timer=0; return function (cff_callback, cff_ms){ clearTimeout(cff_timer); cff_timer=setTimeout(cff_callback, cff_ms); };})(); this.afterInitialImagesLoaded(); jQuery(window).on('resize', function (){ cff_delay(function (){ feed.afterResize(); }, 500); }); jQuery(this.el).find('.cff-item').each(function(){ feed.lazyLoadCheck(jQuery(this)); }); }, addFullFeatures: function(){ var $=jQuery, $self=jQuery(this.el); jQuery('.cff-gdpr-notice').remove(); jQuery(this.el).find('.cff-author-img').each(function(){ $(this).find('img').attr('src',$(this).attr('data-avatar')); $(this).removeClass('cff-no-consent'); }); jQuery('.fb-video.cff-no-consent').removeClass('cff-no-consent'); if(jQuery('.cff-visual-header').length){ jQuery('.cff-visual-header').each(function(){ jQuery(this).removeClass('cff-no-consent'); if(jQuery(this).find('.cff-header-hero').length){ jQuery(this).find('.cff-header-hero').find('img').attr('src',jQuery(this).find('.cff-header-hero').find('img').attr('data-cover-url')) } if(jQuery(this).find('.cff-header-img').length){ jQuery(this).find('.cff-header-img').find('img').attr('src',jQuery(this).find('.cff-header-img').find('img').attr('data-avatar')) }}); } jQuery('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); jQuery('.cff-comment-image-placeholder').each(function(){ jQuery(this).replaceWith('Attachement'); }); jQuery('.cff-likebox iframe').each(function(){ var $likebox=$(this), likeboxWidth=$likebox.attr('data-likebox-width'), cffFeedWidth=$likebox.parent().width(); if(likeboxWidth=='') likeboxWidth=340; if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth; $likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+Math.floor(likeboxWidth)+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale')); }); jQuery('.cff-iframe-placeholder').each(function(){ var $placeholder=jQuery(this), src=$placeholder.attr('data-src'), type=$placeholder.attr('data-type'); switch (type){ case 'facebook': $placeholder.replaceWith(''); break; case 'youtube': $placeholder.replaceWith(''); break; case 'vimeo': $placeholder.replaceWith(''); break; case 'soundcloud': $placeholder.replaceWith(''); break; case 'spotify': $placeholder.replaceWith(''); break; case 'video': var posterSrc=$placeholder.attr('data-poster-src'); $placeholder.replaceWith(''); break; }}); jQuery(this.el).find('.cff-load-more.cff-no-consent-hide').show(); this.afterResize(); }, setResizedImages: function(){ if(jQuery(this.el).find('.cff_resized_image_data').length && typeof jQuery(this.el).find('.cff_resized_image_data').attr('data-resized')!=='undefined' && (jQuery(this.el).find('.cff_resized_image_data').attr('data-resized').indexOf('{"')===0||jQuery(this.el).find('.cff_resized_image_data').attr('data-resized').indexOf('[')===0)){ var rawResized=JSON.parse(jQuery(this.el).find('.cff_resized_image_data').attr('data-resized')), organizedResized={}; jQuery.each(rawResized,function(index,value){ organizedResized[value.facebook_id]={ id: value.media_id, sizes: JSON.parse(value.sizes), aspect: value.aspect_ratio }}); this.resizedImages=organizedResized; } jQuery(this.el).find('.cff_resized_image_data').remove(); }, sendNeedsResizingToServer: function(){ var feed=this; if(feed.needsResizing.length > 0&&feed.settings.resizingEnabled){ var itemOffset=jQuery(this.el).find('.cff-item').length; if(!feed.settings.consentGiven && !feed.settings.overrideBlockCDN){ if(typeof jQuery(this.el).find('.cff-lightbox-link').attr('data-cff-lightbox')!=='undefined'){ jQuery(this.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox',jQuery(this.el).find('.cff-lightbox-link').attr('data-cff-lightbox')); jQuery(this.el).find('.cff-lightbox-link').removeAttr('data-cff-lightbox'); }} var submitData={ action: 'cff_resized_images_submit', needs_resizing: feed.needsResizing, offset: itemOffset, feed_id: feed.settings.feedID, atts: feed.settings.shortCodeAtts, pag_url: feed.pag_url, location: feed.locationGuess(), post_id: feed.settings.postID, }; var onSuccess=function(data){ feed.needsResizing=[]; if(data.trim().indexOf('{')===0){ var response=JSON.parse(data); if(feed.settings.debugEnabled){ console.log(response); } if(typeof response.resizing!=='undefined'){ var resized=response.resizing; for (var property in resized){ if(resized.hasOwnProperty(property)){ feed.resizedImages[property]=resized[property]; }} feed.maybeRaiseImageResolution(); if(typeof jQuery(feed.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox')!=='undefined'){ jQuery(feed.el).find('.cff-lightbox-link').attr('data-cff-lightbox',jQuery(feed.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox')); jQuery(feed.el).find('.cff-lightbox-link').removeAttr('data-x-cff-lightbox'); } setTimeout(function(){ feed.afterResize(); },500); }} }; cffAjax(submitData,onSuccess); }else if(feed.settings.locator){ var submitData={ action: 'cff_do_locator', feed_id: feed.settings.feedID, atts: feed.settings.shortCodeAtts, location: feed.locationGuess(), post_id: feed.settings.postID }; var onSuccess=function(data){ }; cffAjax(submitData,onSuccess); }}, hasTargetElement: function($cffItem){ var $target=$cffItem; if($cffItem.find('.cff-photo').length){ $target=$cffItem.find('.cff-photo'); }else if($cffItem.find('.cff-poster').length){ $target=$cffItem.find('.cff-poster'); }else if($cffItem.find('.cff-link-slider-slides').length){ $target=$cffItem.find('.cff-link-slider-slides'); }else if($cffItem.find('.cff-img-wrap').length){ $target=$cffItem.find('.cff-img-wrap'); }else if($cffItem.find('.cff-album-cover').length){ $target=$cffItem.find('.cff-album-cover'); }else if($cffItem.find('.cff-link').length){ $target=$cffItem.find('.cff-link'); } return typeof $target.attr('data-img-src-set')!=='undefined'; }, getTargetElement: function($cffItem){ var $target=$cffItem.find('.cff-photo'); if($cffItem.find('.cff-poster').length){ $target=$cffItem.find('.cff-poster'); }else if($cffItem.find('.cff-link-slider-slides').length){ $target=$cffItem.find('.cff-link-slider-item'); }else if($cffItem.find('.cff-img-wrap').length){ $target=$cffItem.find('.cff-img-wrap'); }else if($cffItem.find('.cff-album-cover').length){ $target=$cffItem.find('.cff-album-cover'); }else if($cffItem.find('.cff-link').length){ $target=$cffItem.find('.cff-link'); } return $target; }, getTargetElementImage: function($targetItem){ if($targetItem.find('img').length){ return $targetItem.find('img'); }else{ return $targetItem; }}, getTargetWidth: function($imgWrapItem,$item,index){ var width=50, newWidth=0; if($item.find('.cff-multi-image').length > 2&&index > 0){ newWidth=$item.innerWidth() / 3; }else if($item.closest('.cff-masonry').length){ newWidth=$item.innerWidth(); }else if($imgWrapItem.closest('.cff-item').find('.cff-link-slider').length){ newWidth=$imgWrapItem.closest('.cff-item').find('.cff-link-slider').width(); }else if($imgWrapItem.closest('.cff-media-wrap').length && !$imgWrapItem.closest('.cff-thumb-layout').length && !$imgWrapItem.closest('.cff-half-layout').length){ newWidth=$imgWrapItem.closest('.cff-media-wrap').width(); }else{ newWidth=$imgWrapItem.innerWidth(); } return Math.max(width,newWidth); }, maybeRaiseSingleImageResolution: function ($item, index, forceChange){ var feed=this, $target=feed.getTargetElement($item), imgSrcSet=feed.getImageUrls($item,$target); $target.each(function(i){ var $imgWrapItem=jQuery(this), $targetImageElement=feed.getTargetElementImage($imgWrapItem), currentUrl=$targetImageElement.attr('src'), currentRes=typeof $imgWrapItem.attr('data-current')==='undefined' ? 0:parseInt($imgWrapItem.attr('data-current')), neededRes=feed.getTargetWidth($imgWrapItem,$item,i), changeToRes=false; if(currentRes < neededRes&&typeof imgSrcSet[i]!=='undefined'){ var foundBestRes=false; jQuery.each(imgSrcSet[i], function (ii, value){ if(! foundBestRes&&ii > currentRes){ changeToRes=ii; if(ii >=neededRes){ foundBestRes=true; }} }); } if(!feed.settings.consentGiven){ var $lightboxAnchor=false; if($imgWrapItem.find('a[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.find('a[data-cff-lightbox]'); }else if($imgWrapItem.closest('.cff-item').find('a[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.closest('.cff-item').find('a[data-cff-lightbox]'); } if($imgWrapItem.find('area[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.find('area[data-cff-lightbox]'); }else if($imgWrapItem.closest('.cff-item').find('area[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.closest('.cff-item').find('area[data-cff-lightbox]'); } if($lightboxAnchor){ $lightboxAnchor.attr('href',feed.getMaxResImage(imgSrcSet,i)); }} if(changeToRes){ currentRes=changeToRes; if(feed.settings.debugEnabled){ var reason=currentUrl===feed.placeholderURL ? 'was placeholder':'too small'; } $imgWrapItem.attr('data-current',changeToRes); var newUrl=imgSrcSet[i][changeToRes]; if(newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); $imgWrapItem.imgLiquid({fill:true}); } feed.processNewImage($imgWrapItem); if(currentRes < 720&&$item.hasClass('cff-album-item')&&! $targetImageElement.hasClass('cff-secondary-check')){ $targetImageElement.addClass('cff-secondary-check'); $targetImageElement.on('load',function(){ if(!jQuery(this).hasClass('cff-secondary-checked')){ jQuery(this).addClass('cff-secondary-checked'); var imagEl=$targetImageElement.get(0), height=imagEl.naturalHeight, aspectRatio=imagEl.naturalWidth/imagEl.naturalHeight; if($targetImageElement.innerWidth() > height){ neededRes=feed.getTargetWidth($imgWrapItem,$item,i) * aspectRatio; if(parseInt(currentRes) < neededRes){ foundBestRes=false; jQuery.each(imgSrcSet[i], function (ii, value){ if(! foundBestRes&&ii > currentRes){ changeToRes=ii; if(ii >=neededRes){ foundBestRes=true; }} }); if(changeToRes){ $imgWrapItem.attr('data-current', changeToRes); var newUrl=imgSrcSet[i][changeToRes]; if(newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); $imgWrapItem.imgLiquid({fill:true}); } feed.processNewImage($imgWrapItem); }} }} }}); }} } $targetImageElement.on('error', function (){ if(!jQuery(this).hasClass('cff-img-error')){ jQuery(this).addClass('cff-img-error'); var newUrl=typeof jQuery(this).attr('data-orig-source')!=='undefined' ? jQuery(this).attr('data-orig-source'):false; if(newUrl&&newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); }} setTimeout(function(){ feed.afterResize(); }, 1500) }else{ console.log('unfixed error ' + jQuery(this).attr('src')); }}); }); }, maybeRaiseImageResolution: function (justNew){ var feed=this, itemsSelector=typeof justNew!=='undefined'&&justNew===true ? '.cff-item.cff-new, .cff-album-item.cff-new':'.cff-item, .cff-album-item'; jQuery(feed.el).find(itemsSelector).each(function (index){ if(!jQuery(this).hasClass('cff-num-diff-hide') && feed.hasTargetElement(jQuery(this))){ feed.maybeRaiseSingleImageResolution(jQuery(this),index); }}); }, getImageUrls: function ($item,$target){ var feed=this, srcSet={}, $srcSetItem=false, id=$item.attr('id').replace('cff_', ''); if(typeof $target.attr('data-img-src-set')!=='undefined'){ $srcSetItem=$target; }else if(typeof $item.find('.cff-photo').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-photo'); }else if(typeof $item.find('.cff-link-slider-slides').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-link-slider-slides'); }else if(typeof $item.find('.cff-album-cover').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-album-cover'); } if($srcSetItem){ srcSet=JSON.parse($srcSetItem.attr('data-img-src-set').replace(/\\\//g, '/')) } if(!this.settings.consentGiven&&!this.settings.overrideBlockCDN){ jQuery.each(srcSet,function(index,value){ srcSet[index]={};}); } var returnSrcSet=srcSet; if(typeof feed.resizedImages[id]==='undefined'&&id.indexOf('_')===-1){ id=$item.attr('data-page-id') + '_' + id; } if(typeof feed.resizedImages[id]!=='undefined' && feed.resizedImages[id].id!=='pending' && feed.resizedImages[id].id!=='error'){ jQuery.each(srcSet,function(index,value){ if(feed.settings.consentGiven){ returnSrcSet[index]={}; var apiSourceSet=JSON.parse($srcSetItem.attr('data-img-src-set').replace(/\\\//g, '/')); jQuery.each(apiSourceSet[index],function(index2,value2){ if(index2 > 700 || index2 < 220){ returnSrcSet[index][index2]=value2; }}); } jQuery.each(feed.resizedImages[id].sizes,function(index2,value2){ returnSrcSet[index][value2]=window.cffOptions.resized_url+feed.resizedImages[id].id+'-'+index+'-'+value2+'.jpg'; }); }); }else if(typeof this.resizedImages[id]==='undefined' || (typeof this.resizedImages[id]['id']!=='undefined'&&this.resizedImages[id]['id']!=='pending'&&this.resizedImages[id]['id']!=='error')){ var hasMediumSize=false; jQuery.each(returnSrcSet[0],function(resolution){ if(parseInt(resolution) > 150&&parseInt(resolution) < 500){ hasMediumSize=true; }}); if(feed.settings.gdpr){ hasMediumSize=false; } if(!hasMediumSize){ this.addToNeedsResizing(id); }} return returnSrcSet; }, addToNeedsResizing: function (id){ if(this.needsResizing.indexOf(id)===-1){ this.needsResizing.push(id); }}, processNewImage: function($item){ var feed=this; $item.find('img').each(function(){ if(!jQuery(this).prop('complete')){ feed.imagesWaiting++; jQuery(this).addClass('cff-image-loading').on('load',function(){ jQuery(this).removeClass('cff-image-loading'); feed.imagesWaiting--; if(feed.imagesWaiting < 1){ feed.afterResize(); }}); jQuery(this).on('error',function(){ jQuery(this).removeClass('cff-image-loading'); feed.imagesWaiting--; if(feed.imagesWaiting < 1){ feed.afterResize(); }}); }}); }, getMaxResImage: function(imgSrcSet,index){ if(typeof imgSrcSet[index]==='undefined'){ return false; } var largest=0, largestImage=false; jQuery.each(imgSrcSet[index], function (index, value){ if(index > largest){ largest=index; largestImage=value.toString(); }}); return largestImage; }, lazyLoadCheck: function($item){ var feed=this, $target=feed.getTargetElement($item), imgSrcSet=feed.getImageUrls($item,$target); if(!$item.closest('.cff').hasClass('cff-no-ll-check')){ $item.find('img').each(function(index){ if(typeof jQuery(this).attr('data-src')!=='undefined'){ jQuery(this).attr('data-src',jQuery(this).attr('data-orig-source')); } if(typeof jQuery(this).attr('data-orig-src')!=='undefined'){ jQuery(this).attr('data-orig-src',jQuery(this).attr('data-orig-source')); } if(!feed.settings.consentGiven){ jQuery(this).removeAttr('data-orig-source'); maxResImage=feed.getMaxResImage(imgSrcSet,index); if(maxResImage&&maxResImage.indexOf('scontent')===-1){ jQuery(this).attr('data-orig-source',maxResImage); }} jQuery(this).on('load',function(){ if(!jQuery(this).hasClass('cff-replaced') && jQuery(this).attr('src').indexOf('placeholder') > -1){ jQuery(this).addClass('cff-replaced'); var origSource=typeof jQuery(this).attr('data-orig-source')!=='undefined' ? jQuery(this).attr('data-orig-source'):false; if(origSource){ jQuery(this).attr('src',jQuery(this).attr('data-orig-source')); if(jQuery(this).closest('.imgLiquid_bgSize').length){ jQuery(this).closest('.imgLiquid_bgSize').css('background-image', 'url(' + origSource + ')'); }} }}); }); }}, maybeRelayoutMasonry: function(){ var $cff=jQuery(this.el); if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ var cff_delay=(function (){ var cff_timer=0; return function (cff_callback, cff_ms){ clearTimeout(cff_timer); cff_timer=setTimeout(cff_callback, cff_ms); };})(); cff_delay(function (){ cffAddMasonry($cff); }, 500); }}, afterInitialImagesLoaded: function(){ this.maybeRaiseImageResolution(); this.sendNeedsResizingToServer(); this.maybeCleanUpNew(); if(this.settings.consentGiven){ this.addFullFeatures(); }else{ jQuery('.cff-gdpr-notice').css({'display':'inline-block'}); }}, afterResize: function (){ this.maybeRaiseImageResolution(); this.maybeRelayoutMasonry(); }, afterLoadMoreClicked: function(){ this.maybeRaiseImageResolution(); this.addFullFeatures(); }, maybeCleanUpNew: function(){ var feed=this, $cff=jQuery(this.el); setTimeout(function(){ if(feed.index > 0){ $cff.find('.cff-new').removeClass('cff-new'); } $cff.find('img').each(function(){ if(feed.settings.consentGiven&&!jQuery(this).hasClass('cff-image-loading') &&(jQuery(this).attr('src')!=null&&jQuery(this).attr('src')!=undefined)&&jQuery(this).attr('src').indexOf('placeholder.png') > -1){ console.log('lazy load correction'); var $self=jQuery(this), currentSrc=$self.attr('src'), originalSrc=$self.attr('data-orig-source'); if(originalSrc!=currentSrc){ $self.attr('src', originalSrc); } if($self.hasClass('cff-multi-image')){ $self.css('background-image', 'url(' + originalSrc + ')'); }} }); },1250); }, checkConsent: function(){ if(this.settings.consentGiven||!this.settings.gdpr){ return true; } if(typeof CLI_Cookie!=="undefined"){ if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)!==null){ if(CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')!=='null'){ this.settings.consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')==='yes'; } if(CLI_Cookie.read('cookielawinfo-checkbox-necessary')!=='null'){ this.settings.consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-necessary')==='yes'; }} }else if(typeof window.cnArgs!=="undefined"){ var value="; " + document.cookie, parts=value.split('; cookie_notice_accepted='); if(parts.length===2){ var val=parts.pop().split(';').shift(); this.settings.consentGiven=(val==='true'); }}else if(typeof window.cookieconsent!=='undefined'){ this.settings.consentGiven=cffCmplzGetCookie('complianz_consent_status')==='allow'; }else if(typeof window.Cookiebot!=="undefined"){ this.settings.consentGiven=Cookiebot.consented; }else if(typeof window.BorlabsCookie!=='undefined'){ this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent('facebook'); } var evt=jQuery.Event('cffcheckconsent'); evt.feed=this; jQuery(window).trigger(evt); return this.settings.consentGiven; }, afterConsentToggled: function(){ if(this.checkConsent()){ var feed=this; feed.maybeRaiseImageResolution(); this.addFullFeatures(); setTimeout(function(){ feed.afterResize(); },500); }}, locationGuess: function($cff=false){ var $feed=($cff==false) ? jQuery(this.el):$cff, location='content'; if($feed.closest('footer').length){ location='footer'; }else if($feed.closest('.header').length || $feed.closest('header').length){ location='header'; }else if($feed.closest('.sidebar').length || $feed.closest('aside').length){ location='sidebar'; } return location; }}; function cffAjax(submitData, onSuccess){ jQuery.ajax({ url: cffajaxurl, type: 'post', data: submitData, success: onSuccess }); } function cffCmplzGetCookie(cname){ var name=cname + "="; var cArr=window.document.cookie.split(';'); for (var i=0; i < cArr.length; i++){ var c=cArr[i].trim(); if(c.indexOf(name)==0) return c.substring(name.length, c.length); } return ""; } function cff_init($cff){ jQuery('.cff-nojs').removeClass('cff-nojs'); var cffTouchDevice=false; if(cffIsTouchDevice()===true) cffTouchDevice=true; function cffIsTouchDevice(){ return true==("ontouchstart" in window||window.DocumentTouch&&document instanceof DocumentTouch); } var firsttime=false; if(typeof $cff==='undefined'){ $cff=jQuery('.cff'); firsttime=true; } (function($){ jQuery(document).off('click', '#cff a.cff-view-comments').on('click', '#cff a.cff-view-comments', function(){ var $self=jQuery(this), $commentsBox=$self.closest('.cff-item').find('.cff-comments-box'); $self.toggleClass('cff-open'); $commentsBox.slideToggle(300); var $feed=$self.closest('#cff'), $item=$(this).closest('.cff-item'); if($feed.hasClass('cff-masonry-js')&&!$feed.hasClass('cff-opaque-comments')){ setTimeout(function(){ cffAddMasonry($feed); }, 500); } $commentsBox.find('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); }); var cffAnimateIconColorVar, stopAnimate=false; $cff.find('.cff-view-comments').on('mouseenter', function(){ var $self=$(this), time=50; if($self.hasClass('cff-open')) return; $self.find('.cff-icon').each(function(){ var $cffIcon=jQuery(this); cffAnimateIconColor($cffIcon, time); time +=50; }); }).on('mouseleave', function(){ cffStopAnimateIconColor(); $(this).find('.cff-icon').removeClass('cff-animate'); }); function cffAnimateIconColor($cffIcon, time){ stopAnimate=false; cffAnimateIconColorVar=setTimeout(function(){ if(!stopAnimate) $cffIcon.addClass('cff-animate'); }, time); } function cffStopAnimateIconColor(){ clearTimeout(cffAnimateIconColorVar); stopAnimate=true; } if(typeof cffsiteurl==='undefined'||cffsiteurl=='') cffsiteurl=window.location.host + '/wp-content/plugins'; var locatefile=true; var metaArr={}, newMetaArr={}, metaArray=[]; var lb=0; jQuery('#cff.cff-lb').each(function(){ lb++; $(this).attr('data-cff-lb', lb); }); var $cff_post_selector=$cff.find('.cff-item.cff-new, .cff-album-item.cff-new'); if(firsttime){ $cff_post_selector=jQuery('#cff .cff-item.cff-new, #cff .cff-album-item.cff-new'); } $cff_post_selector.each(function(){ var $self=jQuery(this); if($self.find('.cff-viewpost-link, .cff-viewpost-facebook, .cff-viewpost').parent('p').length){ if(!$self.hasClass('event')) $self.find('.cff-viewpost-link, .cff-viewpost-facebook, .cff-viewpost').unwrap('p'); } if($self.find('.cff-photo').parent('p').length){ $self.find('p .cff-photo').unwrap('p'); $self.find('.cff-album-icon').appendTo('.cff-photo:last'); } if($self.find('.cff-event-thumb').parent('p').length){ $self.find('.cff-event-thumb').unwrap('p'); } if($self.find('.cff-vidLink').parent('p').length){ $self.find('.cff-vidLink').unwrap('p'); } if($self.find('.cff-link').parent('p').length){ $self.find('.cff-link').unwrap('p'); } if($self.find('.cff-viewpost-link').parent('p').length){ $self.find('.cff-viewpost-link').unwrap('p'); } if($self.find('.cff-viewpost-facebook').parent('p').length){ $self.find('.cff-viewpost-facebook').unwrap('p'); } if($self.find('iframe').parent('p').length){ $self.find('iframe').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-view-comments').parent('p').length){ $self.find('.cff-meta-wrap > p').remove(); $self.find('.cff-view-comments').eq(1).remove(); var $cffMeta=$self.find('.cff-meta'), cffMetaClasses=$cffMeta.attr('class'); $cffMeta.find('.cff-view-comments').unwrap().wrapInner('
      '); } if($self.find('.cff-photo').siblings('.cff-photo').length){ $self.find('.cff-photo').slice(0,2).remove(); } if($('.cff-author-img').parent().is('p')) $('.cff-author-img').unwrap('p'); $self.find('p:empty').not('.cff-comments-box p').remove(); var expanded=false; if($self.hasClass('cff-event')){ var $post_text=$self.find('.cff-desc .cff-desc-text'), text_limit=$post_text.parent().attr('data-char'); }else{ var $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').off('click').on('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'); if($self.closest('.cff').hasClass('cff-masonry-js')&&!$self.closest('.cff').hasClass('cff-masonry-css')){ cffAddMasonry($cff); }}); $post_text.find('a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow noopener noreferrer' }); var post_id=$self.attr('id').substring(4), post_id_orig=$self.find('.cff-view-comments').attr('id'); if(locatefile!=true) $self.find('.cff-lightbox-thumbs-holder').css('min-height', 0); jQuery(document).off('click', '#cff .cff-show-more-comments, .cff-lightbox-sidebar .cff-show-more-comments').on('click', '#cff .cff-show-more-comments, .cff-lightbox-sidebar .cff-show-more-comments', function(){ var $cffMoreCommentsLink=jQuery(this), thisCommentsTotal=parseInt($cffMoreCommentsLink.attr('data-cff-comments-total')); if($cffMoreCommentsLink.hasClass('cff-clicked')&&thisCommentsTotal > 25){ $cffMoreCommentsLink.find('a').attr({ 'href':$cffMoreCommentsLink.closest('.cff-comments-box').find('.cff-comment-on-facebook a').attr('href'), 'target':'_blank' }); } if(thisCommentsTotal <=25) $cffMoreCommentsLink.hide(); $cffMoreCommentsLink.addClass('cff-clicked'); $cffMoreCommentsLink.parent().find('.cff-comment').show().each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); var $closestCff=$cffMoreCommentsLink.closest('.cff'); if($closestCff.hasClass('cff-masonry-js')&&!$closestCff.hasClass('cff-opaque-comments')){ setTimeout(function(){ cffAddMasonry($closestCff); }, 500); }}); if($self.hasClass('cff-timeline-event')||$self.hasClass('cff-event')){ if($(this).find('.cff-date .cff-start-date k').text()!==$(this).find('.cff-date .cff-end-date k').text()) $(this).find('.cff-date .cff-end-date k').show(); } var $cffPhotoImg=$self.find('.cff-photo img, .cff-event-thumb img, .cff-poster, .cff-album-cover img'), cffPhotoImgSrc=$cffPhotoImg.attr('src'), cffImgStringAttr=$cffPhotoImg.attr('data-querystring'); if(typeof cffPhotoImgSrc=='undefined') cffPhotoImgSrc=''; if(cffPhotoImgSrc.indexOf('i0.wp.com') > -1||cffPhotoImgSrc.indexOf('i1.wp.com') > -1||cffPhotoImgSrc.indexOf('i2.wp.com') > -1||cffPhotoImgSrc.indexOf('i3.wp.com') > -1||cffPhotoImgSrc.indexOf('i4.wp.com') > -1||cffPhotoImgSrc.indexOf('i5.wp.com') > -1){ var photonSrc=$cffPhotoImg.attr('src').substring(0, $cffPhotoImg.attr('src').indexOf('?')), newSrc=photonSrc.replace('http://', 'https:/').replace(/i0.wp.com|i1.wp.com|i2.wp.com|i3.wp.com|i4.wp.com|i5.wp.com/gi, '') + '?' + cffImgStringAttr; $cffPhotoImg.attr('src', newSrc); } 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'), linkcolorHTML=''; function replacer(hash){ var replacementString=jQuery.trim(hash); if(/^#[0-9A-F]{6}$/i.test(replacementString)){ return replacementString; }else{ if(typeof linkcolor!=='undefined'){ if(linkcolor.length > 1) linkcolorHTML='style="color:#' + linkcolor + '"'; } 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').attr('target', '_blank'); if($self.closest('#cff').hasClass('cff-lb')){ $self.find('.cff-photo, .cff-album-cover, .cff-event-thumb, .cff-html5-video, .cff-iframe-wrap').each(function(){ var $photo=$(this), postId=post_id, cffLightboxTitle='', cffShowThumbs=false, postType='', cffgroupalbums=''; cffShowThumbs=true; function cffFormatCaption(text){ return String(text).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
      "); } if($self.hasClass('cff-albums-only')){ postType='albumsonly'; cffLightboxTitle=cffFormatCaption($self.find('img').attr('alt')); var dataGroup=$self.closest('#cff').attr('data-group'); if(typeof dataGroup!=='undefined') cffgroupalbums='data-cffgroupalbums="true"'; }else if($self.hasClass('cff-timeline-event')){ var capText=''; if($self.find('.cff-author-text .cff-page-name').length) capText +=$self.find('.cff-author-text .cff-page-name').text() + '

      '; if(full_text.length > 5) capText +=full_text; cffLightboxTitle=cffFormatCaption(capText); }else if($self.hasClass('cff-event')){ if($self.find('.cff-details').length){ if($self.find('.cff-event-title').length) cffLightboxTitle='' + cffFormatCaption($self.find('.cff-event-title').html() + ''); if($self.find('.cff-date').length) cffLightboxTitle +='' + cffFormatCaption($self.find('.cff-date').html() + ''); if($self.find('.cff-location').length) cffLightboxTitle +='' + cffFormatCaption($self.find('.cff-location').html() + ''); cffLightboxTitle +='' + full_text + ''; }}else if($self.hasClass('cff-album-item')){ cffLightboxTitle=cffFormatCaption($self.find('img').attr('alt')); }else{ var lb_title=full_text; if(full_text.trim()=='') lb_title=$self.find('.cff-post-desc').text(); if(lb_title==''&&$self.find('.cff-author .cff-story').length) lb_title=$self.find('.cff-author .cff-page-name').text(); if(lb_title=='') lb_title=' '; cffLightboxTitle=cffFormatCaption(lb_title); } if(cffLightboxTitle.length > 1) cffLightboxTitle=cffLightboxTitle.replace(/"/g, '"'); var cffLightboxTile='
      View
      '; $photo.prepend(cffLightboxTile); if(!cffTouchDevice){ $photo.on('mouseenter', function(){ $self.find('.cff-photo-hover').fadeIn(150); }).on('mouseleave', function(){ $self.find('.cff-photo-hover').stop().fadeOut(500); }); }}); } $self.find('.cff-share-link').off('click').on('click', function(e){ e.preventDefault(); var $cffShareTooltip=$self.find('.cff-share-tooltip') if($cffShareTooltip.is(':visible')){ $cffShareTooltip.hide().find('a').removeClass('cff-show'); }else{ $cffShareTooltip.show(); var time=0; $cffShareTooltip.find('a').each(function(){ var $cffShareIcon=jQuery(this); setTimeout(function(){ $cffShareIcon.addClass('cff-show'); }, time); time +=20; }); }}); if(typeof $cff.attr('data-restricted')!=='undefined'){ var cff_restricted_page=true; }else{ var cff_restricted_page=false; } if($self.hasClass('cff-album-item')){ var cff_data_full_size=$self.attr('data-cff-full-size'); if(typeof cff_data_full_size!=='undefined'&&cff_data_full_size!=''){ if(cff_restricted_page){ $self.find('.cff-lightbox-link').attr('href', cff_data_full_size).closest('.cff-album-cover').css('background-image', 'url('+cff_data_full_size+')'); $self.find('img').attr('src', cff_data_full_size); }else{ $self.find('.cff-lightbox-link').attr('href', cff_data_full_size); }} } if(( $self.find('.cff-html5-video').length||$self.hasClass('cff-video'))){ var cff_live_video=false; if($self.find('.cff-html5-video').length){ var $vid_sel=$self.find('.cff-html5-video'); if($vid_sel.attr('data-cff-live')=='true') cff_live_video=true; } if($self.hasClass('cff-video')) var $vid_sel=$self; if(cff_live_video&&$(window).width() <=640){ }else{ if(!$self.closest('.cff').hasClass('cff-private-group')){ if($vid_sel.attr('data-cff-video-player')!='standard'){ $self.find('.cff-lightbox-link').attr({ 'data-iframe':'https://www.facebook.com/v2.3/plugins/video.php?href=' + $vid_sel.attr('data-cff-video-link'), 'data-video':'' }); }} }} setTimeout(function(){ $self.find('.cff-iframe-wrap .fluid-width-video-wrapper iframe').unwrap().wrap('
      '); $self.find('.cff-iframe-wrap .iframe-embed iframe').unwrap('iframe-embed'); }, 500); $self.find('.cff-album-info a').on('click', function(e){ e.preventDefault(); $self.find('.cff-lightbox-link').trigger('click'); }); }); jQuery(document).off('click', '.cff-comment-replies a').on('click', '.cff-comment-replies a', function(){ cffLoadCommentReplies($(this)); }); $('.cff-wrapper').each(function(){ var $cff=$(this).find('#cff'), cff_grid_pag=$cff.attr('data-grid-pag'); var shortcode_token_param=cffGetShortcodeToken($cff); var $cffNumDiffHide=$(this).find('.cff'); if(typeof $cffNumDiffHide.attr('data-nummobile')!=='undefined'){ var num=typeof $cffNumDiffHide.attr('data-pag-num')!=='undefined'&&$cffNumDiffHide.attr('data-pag-num')!=='' ? parseInt($cffNumDiffHide.attr('data-pag-num')):1, nummobile=typeof $cffNumDiffHide.attr('data-nummobile')!=='undefined'&&$cffNumDiffHide.attr('data-nummobile')!=='' ? parseInt($cffNumDiffHide.attr('data-nummobile')):num, itemSelector=$cffNumDiffHide.find('.cff-item').length ? '.cff-item':'.cff-album-item'; if($(window).width() < 480){ if(nummobile < $cffNumDiffHide.find(itemSelector).length){ $cffNumDiffHide.find(itemSelector).slice(nummobile - $cffNumDiffHide.find(itemSelector).length).addClass('cff-num-diff-hide'); }}else{ if(num < $cffNumDiffHide.find(itemSelector).length){ $cffNumDiffHide.find(itemSelector).slice(num - $cffNumDiffHide.find(itemSelector).length).addClass('cff-num-diff-hide'); }} $cffNumDiffHide.removeAttr('data-nummobile'); } if($cff.hasClass('cff-masonry-js'&&! $cff.hasClass('cff-all-reviews'))){ if($cff.find('.cff-album-item').length){ $cff.removeClass('cff-masonry-js'); return; } cffAddMasonry($cff); setTimeout(function(){ cffAddMasonry($cff); }, 1000); $(window).on('resize', function (){ setTimeout(function(){ cffAddMasonry($cff); }, 500); }); if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30); } function cffCheckWidth(){ if($cff.hasClass('cff-album-items-feed')){ var $cffElement=$cff; }else{ var $cffElement=$cff.find('.cff-item').first(); } if($cffElement.innerWidth() < 400){ if(!$cff.hasClass('cff-disable-narrow')){ $cff.addClass('narrow'); }}else{ $cff.removeClass('narrow'); } if($cffElement.innerWidth() < 250){ $cff.addClass('cff-super-narrow'); }} cffCheckWidth(); function cffActionLinksPos(){ if($cff.find('.cff-item').first().innerWidth() < (190 + $('.cff-post-links').innerWidth())){ $cff.find('.cff-post-links').addClass('cff-left') }else{ $cff.find('.cff-post-links').removeClass('cff-left'); }} cffActionLinksPos(); var cffdelay=(function(){ var cfftimer=0; return function(cffcallback, cffms){ clearTimeout (cfftimer); cfftimer=setTimeout(cffcallback, cffms); };})(); window.addEventListener('resize', function(event){ cffdelay(function(){ cffCheckWidth(); cffActionLinksPos(); cffResizeAlbum(); }, 500); }); function cffResizeAlbum(last){ var cffAlbumWidth=$cff.find('.cff-album-item').eq(0).find('a').innerWidth(); $cff.find('.cff-album-item a').css('height', cffAlbumWidth); $cff.find('.cff-photo.cff-crop').css('height', $cff.find('.cff-photo.cff-crop').width()); $cff.find('.cff-item.cff-album .cff-photo.cff-multiple, .cff-video-post .cff-html5-video.cff-multiple').each(function(){ var $cffPhotoEl=$(this); var cffPhotoImgWidth=$cffPhotoEl.find('img').first().width(); if(cffPhotoImgWidth < 10) cffPhotoImgWidth=300; if($cffPhotoEl.hasClass('cff-img-layout-3')) $cffPhotoEl.find('.cff-img-attachments .cff-crop').css('height', cffPhotoImgWidth/2); if($cffPhotoEl.hasClass('cff-img-layout-4')) $cffPhotoEl.find('.cff-img-attachments .cff-crop').css('height', cffPhotoImgWidth/3); if($cffPhotoEl.is('.cff-img-layout-3, .cff-img-layout-4')){ var $cffMainImage=$cffPhotoEl.find('.cff-main-image'), cropPercentage=0.6; if($cffPhotoEl.hasClass('cff-img-layout-4')) cropPercentage=0.8; var cffImageHeight=Math.round(cffPhotoImgWidth / $cffMainImage.find('img').attr('data-ratio')); $cffMainImage.css('height', Math.round(Math.max(cffImageHeight*cropPercentage, $cffPhotoEl.find('.cff-img-attachments').height()))); }else if($cffPhotoEl.is('.cff-img-layout-2')){ var $cffCrop=$cffPhotoEl.find('.cff-img-wrap.cff-crop'); if($cffPhotoEl.hasClass('cff-portrait')){ $cffPhotoEl.find('.cff-img-wrap.cff-crop').css('height', $cffPhotoEl.width()*0.8); }else{ $cffPhotoEl.find('.cff-img-wrap.cff-crop').css('height', $cffPhotoEl.width()/2); }} if(last==true&&($cffPhotoEl.is('.cff-img-layout-3')||$cffPhotoEl.is('.cff-img-layout-4'))&&$cffPhotoEl.find('.cff-main-image').height() < 10) $cffPhotoEl.find('.cff-img-layout-3 .cff-main-image img, .cff-img-layout-4 .cff-main-image img').css({ 'display':'block', 'visibility':'visible' }) if(cffPhotoImgWidth < 200){ $cffPhotoEl.addClass('cff-small-layout'); }else{ $cffPhotoEl.removeClass('cff-small-layout'); }}); } cffResizeAlbum(false); setTimeout(function(){ cffResizeAlbum(false); }, 50); setTimeout(function(){ cffResizeAlbum(true); }, 500); setTimeout(function(){ cffResizeAlbum(true); }, 1500); var num_events=parseInt($cff.attr('data-pag-num')), show_events=num_events; $cff.find('.cff-event').slice(0, num_events).css('display', 'inline-block'); if($cff.hasClass('cff-all-reviews')){ var num_reviews=parseInt($cff.attr('data-pag-num')), show_reviews=num_reviews; var review_offset=parseInt($cff.attr('data-offset')); if(typeof review_offset=='undefined'||isNaN(review_offset)) review_offset=0; $cff.find('.cff-review').slice(0, num_reviews + review_offset).css('display', 'inline-block'); if(review_offset > 0) $cff.find('.cff-review').slice(0, review_offset).remove(); if($cff.hasClass('cff-masonry-js')){ cffAddMasonry($cff); setTimeout(function(){ cffAddMasonry($cff); }, 1000); $(window).on('resize', function (){ setTimeout(function(){ cffAddMasonry($cff); }, 500); }); if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30); }} var $cffLoadMore=$cff.find('#cff-load-more'), cff_no_posts_added=$cff.find('.cff-load-more').attr('data-cff-no-posts-added'); if(typeof cff_no_posts_added==typeof undefined||cff_no_posts_added==false){ $cffLoadMore.attr('data-cff-no-posts-added', 'false'); } if($cff.find('.cff-item, .cff-album-item').length < 1) $cffLoadMore.attr('data-cff-no-posts-added', 'true'); $cffLoadMore.off().on('click', function(){ var shortcodeData=$cff.attr('data-cff-shortcode'), $paginationURL=$cff.find('.cff-pag-url'), pag_url=$paginationURL.attr('data-cff-pag-url'), feed_id=$paginationURL.attr('data-transient-name'), post_id=$paginationURL.attr('data-post-id'), location=CffFeed.prototype.locationGuess($cff); var events_count=$cff.find('.cff-upcoming-event').length; if(events_count > 0){ show_events=show_events + num_events; $cff.find('.cff-upcoming-event').slice(0, show_events).css('display', 'inline-block'); if(show_events > events_count){ $cff.find('#cff-load-more').hide(); cff_no_more_posts($cff, $cffLoadMore); } if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ cffAddMasonry($cff); } return; } if($cff.hasClass('cff-all-reviews')){ var reviews_count=$cff.find('.cff-review').length; if(reviews_count > 0){ show_reviews=show_reviews + num_reviews; $cff.find('.cff-review').slice(0, show_reviews).css('display', 'inline-block'); if(show_reviews > reviews_count){ $cff.find('#cff-load-more').hide(); cff_no_more_posts($cff, $cffLoadMore); } if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ cffAddMasonry($cff); } return; }} $cffLoadMore.off().removeAttr('id').addClass('cff-disabled'); $paginationURL.remove(); if($cff.hasClass('cff-album-items-feed')){ var item_sel='.cff-album-item'; }else{ var item_sel='.cff-item'; } if(item_sel=='.cff-album-item'){ if((pag_url==''||pag_url=='{}')) pag_url=$paginationURL.attr('data-cff-prev-url'); var prev_urls=$paginationURL.attr('data-cff-prev-url'); var prev_urls_arr=(typeof prev_urls=='undefined') ? '':JSON.parse(prev_urls); } var pag_url_arr=(typeof pag_url=='undefined') ? '':JSON.parse(pag_url); if(item_sel=='.cff-album-item'){ for (var key in prev_urls_arr){ if(prev_urls_arr.hasOwnProperty(key)){ if(typeof pag_url_arr[key]=='undefined') pag_url_arr[key]=prev_urls_arr[key]; }} } if((pag_url==''||pag_url=='{}'||pag_url==0||pag_url=='0')&&item_sel=='.cff-item'){ $cffLoadMore.hide(); cff_no_more_posts($cff, $cffLoadMore); }else{ $cffLoadMore.addClass('cff-loading').append('
      '); $cffLoadMore.find('.cff-loader').css('background-color', $cffLoadMore.css('color')); } var cff_timeline_api_paging=false; if($cff.attr('data-timeline-pag')) cff_timeline_api_paging=true; if(cff_timeline_api_paging==true){ }else{ for (var key in pag_url_arr){ if(pag_url_arr.hasOwnProperty(key)&&key!='latest_record_date'){ var this_url=pag_url_arr[key], until_old=cffGetParameterByName('until', this_url), $last_item=$cff.find(item_sel+'.cff-' + key).last(), until_new=(parseInt($last_item.attr('data-cff-timestamp')) - 1).toString(), backdated_new=false; if(typeof $last_item.attr('data-cff-backdated')!='undefined'){ until_new=(parseInt($last_item.attr('data-cff-backdated')) - 1).toString(); } if(isNaN(parseFloat(until_new))){ $last_item=$cff.find(item_sel).last(); until_new=(parseInt($last_item.attr('data-cff-timestamp')) - 1).toString(); if(typeof $last_item.attr('data-cff-backdated')!='undefined'){ until_new=(parseInt($last_item.attr('data-cff-backdated')) - 1).toString(); }} var new_url=this_url; if($cffLoadMore.attr('data-cff-no-posts-added')=='true'){ }else{ if(item_sel!=='.cff-album-item'){ if(this_url.indexOf("until=")!==-1){ var new_url=this_url.replace("until="+until_old,"until="+until_new); }else{ var new_url=this_url + "&until="+until_new; } if(new_url.indexOf('&after=') > -1) new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); }} if(cff_grid_pag=='offset'){ if(item_sel=='.cff-album-item'){ if(new_url.indexOf('&after=') > -1) new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); key=key.replace(/(:|\.|\[|\]|,|=)/g, "\\$1"); var albumItemCount=$cff.find('.cff-album-item.cff-' + key).length + $cff.find('.cff-empty-album.cff-' + key).length; if(new_url.indexOf('&offset=') > -1){ new_url=new_url.replace("&offset="+cffGetParameterByName('offset', new_url), "&offset="+albumItemCount); }else{ new_url=new_url + "&offset=" + albumItemCount; } key=key.replace(/\\/g, ''); }} if((this_url.indexOf('/events') > -1&&this_url.indexOf('&after=') > -1)||(this_url.indexOf('/ratings') > -1&&this_url.indexOf('&after=') > -1&&$cff.hasClass('cff-all-reviews'))){ new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); } if(new_url.indexOf('&__paging_token') > -1){ new_url=new_url.replace("&__paging_token="+cffGetParameterByName('__paging_token', new_url),""); } pag_url_arr[key]=new_url; }} } pag_url=JSON.stringify(pag_url_arr); jQuery.ajax({ url:cffajaxurl, type:'post', data:{ action:'cff_get_new_posts', shortcode_data:shortcodeData, pag_url:pag_url, feed_id:feed_id, post_id:post_id, location:location }, success:function(data){ $cff.find('.cff-num-diff-hide').removeClass('cff-num-diff-hide'); if(data.indexOf('
      '+no_more_posts_text+'

      '); } if($cff.find('.cff-album-item').length){ $cff.removeClass('cff-masonry cff-masonry-js cff-masonry-css'); } $cff.find('.cff-more-dates').on('click', function(){ $(this).siblings('.cff-multiple-dates').slideToggle(100); }); }); function cffGetCommentsIDArray(){ var commentsArrayIDs=[]; $('.cff-posts-wrap').each(function(){ var wrapper=$(this); wrapper.find('.cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); commentsArrayIDs.push(post_id_orig); }); }); return commentsArrayIDs; } function cffGetFeedLocatorDataArray(){ var feedLocatorData=[]; $('.cff-timeline-feed').each(function(){ $cffPagUrl=$(this).find('.cff-pag-url'); var singleFeedLocatorData={ feedID:$cffPagUrl.attr('data-feed-id'), postID:$cffPagUrl.attr('data-post-id'), shortCodeAtts:$(this).attr('data-cff-shortcode').trim()=='' ? {}:JSON.parse($(this).attr('data-cff-shortcode')), location:CffFeed.prototype.locationGuess($(this)) }; feedLocatorData.push(singleFeedLocatorData); }); return feedLocatorData; } if($('.cff-timeline-feed').length&&(typeof cffdisablecommentcaching=='undefined')){ var commentsArrayIDs=cffGetCommentsIDArray(), feedLocatorData=cffGetFeedLocatorDataArray(); $.ajax({ url: cffajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'get_meta', comments_array_ids:commentsArrayIDs, feedLocatorData:feedLocatorData }, success: function(data){ if(data==''||data.length < 1){ metaArr=[]; }else{ data=data.replace(/\\'/g, "'"); metaArr=JSON.parse(data); } $cff.each(function(){ $(this).find('.cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); if(metaArr.hasOwnProperty(post_id_orig)&&metaArr[post_id_orig]!=""){ cffCreateComments($self, JSON.parse(metaArr[post_id_orig])['content']); cffAddFullsizeImageURLs($self, JSON.parse(metaArr[post_id_orig])['content']); }else{ cffGetMetaAPI($self, post_id_orig, object_id); }}); }); }, error: function(xhr,textStatus,e){ return; }}); }else{ $('#cff .cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); cffGetMetaAPI($self, post_id_orig, object_id); }); } function cffGetMetaAPI($self, post_id_orig, object_id){ if($self.find('.cff-view-comments').length==0) return; if(typeof object_id=='undefined'||object_id.length < 2) object_id=''; var object_id_query=''+object_id, post_id_query='?post_id='+post_id_orig, use_id='object', post_comment_count=$self.find('.cff-comments .cff-count').text(), post_likes_count=$self.find('.cff-likes .cff-count').text(), cff_page_id=$self.attr('data-page-id'); if(typeof post_comment_count=='undefined'||post_comment_count=='') post_comment_count=0; if(typeof $self.attr('data-comments-js')!=='undefined'){ if(typeof post_comment_count=='undefined'||post_comment_count=='') post_comment_count=1; } if(typeof post_likes_count=='undefined'||post_likes_count=='') post_likes_count=0; if(typeof object_id=='undefined'||object_id.length < 2||$self.find('.cff-comments-box').hasClass('cff-shared-story')||$self.hasClass('cff-timeline-event')) use_id='post'; var timeline_event=''; if($self.hasClass('cff-timeline-event')) timeline_event='&timeline_event=true'; var usegrouptoken='', useowntoken=''; if($self.closest('#cff').hasClass('cff-group')) usegrouptoken='&usegrouptoken=true'; if($self.closest('#cff').attr('data-own-token')=='true') useowntoken='&useowntoken=true'; shortcode_token_param=cffGetShortcodeToken($self.closest('#cff')); var cff_is_video_post=$self.hasClass('cff-video-post') ? '&isvideo=true':''; var url=cffsiteurl + "/custom-facebook-feed-pro/query.php?o_id=" + object_id + '&post_id='+post_id_orig + '&use_id=' + use_id + timeline_event + usegrouptoken + useowntoken + '&comments_num=' + post_comment_count + '&likes_num=' + post_likes_count + '&type=meta' + cff_is_video_post + '&pageid=' + cff_page_id + shortcode_token_param; if($self.hasClass('cff-album')) url +='&timelinealbum=true'; if(locatefile==true&&typeof window.cff_block_editor==='undefined'){ var submitData={ action: 'cff_query', o_id: object_id, post_id: post_id_orig, use_id: use_id, comments_num: post_comment_count, likes_num: post_likes_count, type: 'meta', pageid: cff_page_id, }; if($self.hasClass('cff-video-post')){ submitData.isvideo=true; } if($self.hasClass('cff-timeline-event')){ submitData.timeline_event=true; } if($self.closest('#cff').hasClass('cff-group')){ submitData.usegrouptoken=true; } if($self.closest('#cff').attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } var onSuccess=function(data){ metaArray.push({'id_post':post_id_orig, 'content':data}); metaArr[ post_id_orig ]=data; newMetaArr[ post_id_orig ]=data; cffCreateComments($self, data); cffAddFullsizeImageURLs($self, data); cffSetMetaCache(metaArray); }; cffAjax(submitData,onSuccess); }} var cffSetMetaCache_executed=false; function cffSetMetaCache(newMetaArr){ if(typeof cffdisablecommentcaching!='undefined') return; if(!cffSetMetaCache_executed){ var cffTimesCached=0, cffCacheDelay=setTimeout(function(){ var cffCacheInterval=setInterval(function(){ cffCacheMeta(newMetaArr); cffTimesCached++; if(cffTimesCached==2) clearInterval(cffCacheInterval); }, 3000); cffCacheMeta(newMetaArr); }, 500); cffSetMetaCache_executed=true; } function cffCacheMeta(newMetaArr){ var jsonstring=JSON.stringify(newMetaArr); var opts={ url: cffajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'cache_meta', metadata: jsonstring }, success: function(response){ return; }, error: function(xhr,textStatus,e){ return; }}; $.ajax(opts); }} function cffGetParameterByName(name, url){ name=name.replace(/[\[\]]/g, "\\$&"); var regex=new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results=regex.exec(url); if(!results) return null; if(!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } function cffLinkify(inputText){ var replacedText, replacePattern1, replacePattern2, replacePattern3; replacePattern1=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; replacedText=inputText.replace(replacePattern1, '$1'); replacePattern2=/(^|[^\/])(www\.[\S]+(\b|$))/gim; replacedText=replacedText.replace(replacePattern2, '$1$2'); replacePattern3=/(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim; replacedText=replacedText.replace(replacePattern3, '$1'); return replacedText; } $(document).off('click', '#cff .cff-html5-video .cff-html5-play').on('click', '#cff .cff-html5-video .cff-html5-play', function(e){ e.preventDefault(); var $self=$(this), $videoWrapper=$self.closest('.cff-html5-video'), video=$self.siblings('video')[0]; video.play(); $self.hide(); $self.siblings('.cff-poster').hide(); if(video.hasAttribute("controls")){ video.removeAttribute("controls") }else{ video.setAttribute("controls","controls") } if($videoWrapper.innerWidth() < 150&&!$videoWrapper.hasClass('cff-no-video-expand')){ $videoWrapper.css('width','100%').closest('.cff-item').find('.cff-text-wrapper').css('width','100%'); }}); function cffAddFullsizeImageURLs($self, data){ var data=JSON.parse(data); if(typeof data.images!=='undefined'&&data.images!==null) $self.find('.cff-lightbox-link').attr('href', data.images[0].source); } function cffCreateComments($self, data){ if(data.substring(0, 1)=="<") return false; var data=JSON.parse(data), cff_comments='', cff_likes_this='', commentShow=parseInt($self.find('.cff-comments-box').attr('data-num')), like_count=(typeof data.likes!=='undefined') ? data.likes.summary.total_count:0, $cffCommentsBox=$self.find('.cff-comments-box'), $cffCommentLikes=$cffCommentsBox.find('.cff-comment-likes'), cff_hide_comment_avatars=Boolean($self.find('.cff-comments-box').attr('data-cff-hide-avatars')), cff_expand_comments=Boolean($self.find('.cff-comments-box').attr('data-cff-expand-comments')), cff_translate_like_this_text=$cffCommentsBox.attr('data-cff-like-text'), cff_translate_likes_this_text=$cffCommentsBox.attr('data-cff-likes-text'), cff_translate_reacted_to_this_text=$cffCommentsBox.attr('data-cff-reacted-text'), cff_translate_and_text=$cffCommentsBox.attr('data-cff-and-text'), cff_translate_other_text=$cffCommentsBox.attr('data-cff-other-text'), cff_translate_others_text=$cffCommentsBox.attr('data-cff-others-text'), cff_translate_reply_text=$cffCommentsBox.attr('data-cff-reply-text'), cff_translate_replies_text=$cffCommentsBox.attr('data-cff-replies-text'), cff_total_comments_count=(typeof data.comments!=='undefined') ? data.comments.summary.total_count:0, cff_meta_link_color=$self.find('.cff-comments-box').attr('data-cff-meta-link-color'), cff_post_tags=Boolean($self.find('.cff-comments-box').attr('data-cff-post-tags')); if(typeof $self.attr('data-comments-js')!=='undefined'){ var comment_count=(typeof data.comments!=='undefined') ? data.comments.summary.total_count:0; $self.find('.cff-comments .cff-count').text(comment_count); } var cff_haha_count=(typeof data.haha!=='undefined') ? data.haha.summary.total_count:0; var cff_love_count=(typeof data.love!=='undefined') ? data.love.summary.total_count:0; var cff_wow_count=(typeof data.wow!=='undefined') ? data.wow.summary.total_count:0; var cff_sad_count=(typeof data.sad!=='undefined') ? data.sad.summary.total_count:0; var cff_angry_count=(typeof data.angry!=='undefined') ? data.angry.summary.total_count:0; var reactions_arr=[cff_haha_count, cff_love_count, cff_wow_count, cff_sad_count, cff_angry_count]; var reaction_first_num=reactions_arr.sort(sortNumber)[0]; var reaction_second_num=reactions_arr.sort(sortNumber)[1]; function sortNumber(a,b){ return b - a; } var reactions_html='', love_added=false, haha_added=false, wow_added=false, sad_added=false, angry_added=false, love_svg=''+'', haha_svg=''+'', wow_svg=''+'', sad_svg=''+'', angry_svg='', like_svg=''+'', like_svg_2=''; var reaction_one_html=''; if(reaction_first_num > 0){ if(data.love.summary.total_count==reaction_first_num){ reaction_one_html +=''+love_svg+''; love_added=true; } if(data.haha.summary.total_count==reaction_first_num){ reaction_one_html +=''+haha_svg+''; haha_added=true; } if(data.wow.summary.total_count==reaction_first_num){ reaction_one_html +=''+wow_svg+''; wow_added=true; } if(data.sad.summary.total_count==reaction_first_num){ reaction_one_html +=''+sad_svg+''; sad_added=true; } if(data.angry.summary.total_count==reaction_first_num){ reaction_one_html +=''+angry_svg+''; angry_added=true; } reactions_html +=reaction_one_html; } if(reaction_one_html.split('cff-reaction-one').length < 3){ if(reaction_second_num > 0){ var reaction_two_html=''; if(data.love.summary.total_count==reaction_second_num&&!love_added){ reaction_two_html=''+love_svg+''; } if(data.haha.summary.total_count==reaction_second_num&&!haha_added){ reaction_two_html=''+haha_svg+''; } if(data.wow.summary.total_count==reaction_second_num&&!wow_added){ reaction_two_html=''+wow_svg+''; } if(data.sad.summary.total_count==reaction_second_num&&!sad_added){ reaction_two_html=''+sad_svg+''; } if(data.angry.summary.total_count==reaction_second_num&&!angry_added){ reaction_two_html=''+angry_svg+''; } reactions_html +=reaction_two_html; }} if($self.find('.cff-meta .cff-likes').find('.cff-icon').length < 2) $self.find('.cff-meta .cff-likes .cff-icon').after(reactions_html); if(parseInt(like_count)==0&&(parseInt(cff_love_count) > 0||parseInt(cff_haha_count) > 0||parseInt(cff_wow_count) > 0||parseInt(cff_sad_count) > 0||parseInt(cff_angry_count) > 0)){ $self.find('.cff-meta .cff-likes .cff-like').remove(); $self.find('.cff-meta .cff-likes span').addClass('cff-no-animate'); } var cff_reactions_count=parseInt(like_count) + parseInt(cff_love_count) + parseInt(cff_haha_count) + parseInt(cff_wow_count) + parseInt(cff_sad_count) + parseInt(cff_angry_count); if(cff_reactions_count > 0) $self.find('.cff-meta .cff-likes .cff-count').text(cff_reactions_count); var cff_no_reactions=false; if(cff_love_count==0&&cff_haha_count==0&&cff_wow_count==0&&cff_sad_count==0&&cff_angry_count==0) cff_no_reactions=true; var reactions_count_html=''; if(parseInt(like_count) > 0){ reactions_count_html +=''+like_svg+''; if(!cff_no_reactions){ if(parseInt(like_count) > 0) reactions_count_html +=''+like_count+''; if(cff_love_count > 0) reactions_count_html +=''+love_svg+''+cff_love_count+''; if(cff_haha_count > 0) reactions_count_html +=''+haha_svg+''+cff_haha_count+''; if(cff_wow_count > 0) reactions_count_html +=''+wow_svg+''+cff_wow_count+''; if(cff_sad_count > 0) reactions_count_html +=''+sad_svg+''+cff_sad_count+''; if(cff_angry_count > 0) reactions_count_html +=''+angry_svg+''+cff_angry_count+''; }} reactions_count_html +=''; if(typeof data.likes!=='undefined'){ if(data.likes.data.length){ cff_likes_this +=''; var liker_one='', liker_two=''; if(like_count > 0&&typeof data.likes.data[0]!=='undefined'){ var userHasLink=false; if(typeof data.likes.data[0].link!=='undefined'){ if(data.likes.data[0].link.indexOf('/app_scoped_user_id/')==-1) userHasLink=true; } userHasLink ? liker_one +=''+data.likes.data[0].name; userHasLink ? liker_one +='':liker_one +=''; } if(like_count > 1&&typeof data.likes.data[1]!=='undefined'){ var userHasLink=false; if(typeof data.likes.data[1].link!=='undefined'){ if(data.likes.data[1].link.indexOf('/app_scoped_user_id/')==-1) userHasLink=true; } userHasLink ? liker_two +='':liker_two=''; liker_two +=data.likes.data[1].name; userHasLink ? liker_two +='':liker_two +=''; } if(like_count==1){ cff_likes_this +=liker_one+' '+cff_translate_likes_this_text; }else if(like_count==2){ cff_likes_this +=liker_one+' '+cff_translate_and_text+' '+liker_two+' '+cff_translate_like_this_text; }else if(like_count==3){ cff_likes_this +=liker_one+', '+liker_two+' '+cff_translate_and_text+' 1 '+cff_translate_other_text+' '+cff_translate_like_this_text; }else{ cff_likes_this +=liker_one+', '+liker_two+' '+cff_translate_and_text+' '; if(like_count==25) cff_likes_this +=''; cff_likes_this +=parseInt(cff_reactions_count)-2; if(like_count==25) cff_likes_this +=''; cff_likes_this +=' '+cff_translate_others_text; if(parseInt(cff_reactions_count)==parseInt(like_count)){ cff_likes_this +=' '+cff_translate_like_this_text; }else{ cff_likes_this +=' '+cff_translate_reacted_to_this_text; }} cff_likes_this +=''; if($cffCommentLikes.find('.cff-reactions-count').length < 1) $cffCommentLikes.append('' + reactions_count_html + cff_likes_this + ''); }else{ if(cff_no_reactions){ $cffCommentLikes.hide(); }else{ if($cffCommentLikes.find('.cff-reactions-count').length < 1) $cffCommentLikes.append('' + reactions_count_html + ''); }} } if(typeof data.comments!=='undefined'){ $.each(data.comments.data, function(i, commentItem){ var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; var comment_message=cffEncodeHTML(commentItem.message), comment_message=cffLinkify(comment_message), cff_comment_author_info=true, cff_hide_comment_avatars=false; if(typeof commentItem.from!=='undefined'){ cff_comment_from_id=commentItem.from.id; }else{ cff_hide_comment_avatars=true; cff_comment_author_info=false; cff_comment_from_id=''; } cff_comments +='
      =commentShow) ? cff_comments +='display: none;':cff_comments +='display: block;'; if(typeof $self.find('#cff_'+commentItem.id).attr('style')!=='undefined') cff_comments +=$self.find('#cff_'+commentItem.id).attr('style'); cff_comments +='"'; if(typeof commentItem.from!=='undefined'){ if(typeof commentItem.from.picture!=='undefined'){ cff_comments +='data-avatar="'+commentItem.from.picture.data.url+'"'; }} cff_comments +='>'; cff_comments +='
      '; cff_comments +='

      '; if(cff_comment_author_info){ if(typeof commentItem.from.link!=='undefined'){ cff_comments +=''+commentItem.from.name+''; }else{ cff_comments +=''+commentItem.from.name+''; }} if(cff_post_tags&&commentItem.hasOwnProperty('message_tags')){ $.each(commentItem.message_tags, function(i, message_tag){ tag_name=message_tag.name; tag_link=''+message_tag.name+''; comment_message=comment_message.replace(tag_name, tag_link); }); } cff_comments +=comment_message+'

      '; if(commentItem.hasOwnProperty('attachment')){ if(commentItem.attachment.hasOwnProperty('media')){ if(consentGiven){ cff_comments +='';
}else{
cff_comments +='<a class='; } if(consentGiven){ if(commentItem.attachment.hasOwnProperty('title')){ cff_comments +=commentItem.attachment.title; }else{ cff_comments +='Attachment'; } cff_comments +='" />'; }else{ cff_comments +=''; }} } cff_comments +=''; var cff_middot='', cff_comment_time=$self.find('#cff_'+commentItem.id).attr('data-cff-comment-date'); if(typeof cff_comment_time!=='undefined'){ cff_comments +=''+cff_comment_time+''; cff_middot='  ·  '; } if(commentItem.like_count > 0) cff_comments +=''+like_svg_2+''+commentItem.like_count+''; cff_comments +=''; var cff_comment_count=parseInt(commentItem.comment_count); if(cff_comment_count > 0){ var cff_replies_text_string=''; (cff_comment_count==1) ? cff_replies_text_string=cff_translate_reply_text:cff_replies_text_string=cff_translate_replies_text; cff_comments +='

      '+cff_comment_count+' '+cff_replies_text_string+'

      '; } cff_comments +='
      '; cff_comments +='
      '; if(!cff_hide_comment_avatars&&cff_comment_author_info){ cff_comments +=''; } cff_comments +='
      '; }); } $self.find('.cff-comments-wrap .cff-comment').remove(); $self.find('.cff-comments-wrap').prepend(cff_comments); $self.find('.cff-show-more-comments').attr('data-cff-comments-total', cff_total_comments_count); if($self.find('.cff-comment-likes span').length > 0) $self.find('.cff-comment-on-facebook').css({'border-top-left-radius':"0",'border-top-right-radius':"0"}); if($self.find('.cff-comments-wrap .cff-comment').length > 0) $self.find('.cff-comment-on-facebook').css({'border-bottom-left-radius':"0",'border-bottom-right-radius':"0"}); if($self.find('.cff-comments-wrap .cff-comment').length < 1) $self.find('.cff-comment-on-facebook').css('padding','8px 15px 8px 10px'); setTimeout(function(){ if($self.closest('.cff').hasClass('cff-masonry-js')&&!$self.closest('.cff').hasClass('cff-masonry-css')) cffAddMasonry($self.closest('.cff')); }, 200); } function cff_lazy_load_correction(){ var $=jQuery; $('.cff-lightbox-link').each(function(){ var $lbLink=$(this); if($lbLink.closest('.cff-album-item').attr('data-cff-full-size')){ lborigSrc=$lbLink.attr('data-cff-full-size'); }else{ lborigSrc=$lbLink.parent().find('img').attr('data-orig-source'); } $lbLink.attr('href', lborigSrc); }) $('img[data-orig-source]').each(function(){ var $self=$(this), currentSrc=$self.attr('src'), originalSrc=$self.attr('data-orig-source'); if(originalSrc!=currentSrc){ $self.attr('src', originalSrc); } if($self.hasClass('cff-multi-image')){ $self.css('background-image', 'url(' + originalSrc + ')'); }}); $('.cff-link-slider').each(function(){ $(this).find('.cff-link-slider-slides').css('width', '2500px') }); } if(typeof window.cff==='undefined'||typeof window.cff.feeds==='undefined'){ if(!$cff.find('.cff_resized_image_data').length){ cff_lazy_load_correction(); }}else if(typeof window.cff.feeds[0]!=='undefined'){ if(!window.cff.feeds[0].settings.resizingEnabled){ cff_lazy_load_correction(); }} setTimeout(function(){ $cff.find('.cff-link-slider').each(function(){ var $cffLinkSlider=$(this), $cffLinkSliderSlides=$cffLinkSlider.find('.cff-link-slider-slides'), $cffLinkSliderItem=$cffLinkSliderSlides.find('.cff-link-slider-item'), cffLinkSliderCount=$cffLinkSliderItem.length, cffLinkSliderWidth=$cffLinkSlider.width(), cffCurSlide=0; $cffLinkSliderSlides.css({ width: cffLinkSliderWidth * cffLinkSliderCount }); $cffLinkSliderItem.css({ width: cffLinkSliderWidth }); function cffMoveSlide(dir){ dir=='prev' ? cffCurSlide--:cffCurSlide++; $cffLinkSliderSlides.css('left', -cffCurSlide*cffLinkSliderWidth); cffCurSlide==cffLinkSliderCount-1 ? $cffLinkSlider.find('a.cff-slider-next').hide():$cffLinkSlider.find('a.cff-slider-next').show(); cffCurSlide > 0 ? $cffLinkSlider.find('a.cff-slider-prev').show():$cffLinkSlider.find('a.cff-slider-prev').hide(); }; $cffLinkSlider.find('a.cff-slider-prev, a.cff-slider-next').on('click', function(e){ e.preventDefault(); $(this).hasClass('cff-slider-prev') ? cffMoveSlide('prev'):cffMoveSlide('next'); }); setTimeout(function(){ var cffLastSlideHeight=$cffLinkSliderSlides.find('.cff-link-slider-item').first().height(); $cffLinkSliderSlides.find('.cff-final-item').css('height', cffLastSlideHeight).find('img').css('margin-top', (cffLastSlideHeight/2)-100); }, 1500); $cffLinkSliderSlides.find('.cff-link-slider-item').show(); }); }, 200); })(jQuery); var imgLiquid=imgLiquid||{VER: '0.9.944'}; imgLiquid.bgs_Available=false; imgLiquid.bgs_CheckRunned=false; $cff.find('.cff-new .cff-album-cover img, .cff-new .cff-crop img').css('visibility', 'hidden'); jQuery('#cff .cff-img-attachments .cff-crop img').css('opacity', 0); (function ($){ function checkBgsIsavailable(){ if(imgLiquid.bgs_CheckRunned) return; else imgLiquid.bgs_CheckRunned=true; var spanBgs=$(''); $('body').append(spanBgs); !function (){ var bgs_Check=spanBgs[0]; if(!bgs_Check||!window.getComputedStyle) return; var compStyle=window.getComputedStyle(bgs_Check, null); if(!compStyle||!compStyle.backgroundSize) return; imgLiquid.bgs_Available=(compStyle.backgroundSize==='cover'); }(); spanBgs.remove(); } $.fn.extend({ imgLiquid: function (options){ this.defaults={ fill: true, verticalAlign: 'center', // 'top' // 'bottom' // '50%' // '10%' horizontalAlign: 'center', // 'left' // 'right' // '50%' // '10%' useBackgroundSize: false, useDataHtmlAttr: true, responsive: true, delay: false, fadeInTime: false, removeBoxBackground: true, hardPixels: true, responsiveCheckTime: 500, timecheckvisibility: 500, onStart: null, onFinish: null, onItemStart: null, onItemFinish: function(index, container, img){ img.addClass('cffFadeIn'); }, onItemError: null }; checkBgsIsavailable(); var imgLiquidRoot=this; this.options=options; this.settings=$.extend({}, this.defaults, this.options); if(this.settings.onStart) this.settings.onStart(); return this.each(function ($i){ var settings=imgLiquidRoot.settings, $imgBoxCont=$(this), $img=$('img:first',$imgBoxCont); if(!$img.length){onError(); return;} if(!$img.data('imgLiquid_settings')){ settings=$.extend({}, imgLiquidRoot.settings, getSettingsOverwrite()); }else{ $imgBoxCont.removeClass('imgLiquid_error').removeClass('imgLiquid_ready'); settings=$.extend({}, $img.data('imgLiquid_settings'), imgLiquidRoot.options); } $img.data('imgLiquid_settings', settings); if(settings.onItemStart) settings.onItemStart($i, $imgBoxCont, $img); if(imgLiquid.bgs_Available&&settings.useBackgroundSize) processBgSize(); else processOldMethod(); function processBgSize(){ if($imgBoxCont.css('background-image').indexOf(encodeURI($img.attr('src')))===-1){ $imgBoxCont.css({'background-image': 'url("' + encodeURI($img.attr('src')) + '")'}); } $imgBoxCont.css({ 'background-size': (settings.fill) ? 'cover':'contain', 'background-position': (settings.horizontalAlign + ' ' + settings.verticalAlign).toLowerCase(), 'background-repeat': 'no-repeat' }); $('a:first', $imgBoxCont).css({ 'display': 'block', 'width': '100%', 'height': '100%' }); $('img', $imgBoxCont).css({'display': 'none'}); if(settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); $imgBoxCont.addClass('imgLiquid_bgSize'); $imgBoxCont.addClass('imgLiquid_ready'); checkFinish(); } function processOldMethod(){ if($img.data('oldSrc')&&$img.data('oldSrc')!==$img.attr('src')){ var $imgCopy=$img.clone().removeAttr('style'); $imgCopy.data('imgLiquid_settings', $img.data('imgLiquid_settings')); $img.parent().prepend($imgCopy); $img.remove(); $img=$imgCopy; $img[0].width=0; setTimeout(processOldMethod, 10); return; } if($img.data('imgLiquid_oldProcessed')){ makeOldProcess(); return; } $img.data('imgLiquid_oldProcessed', false); $img.data('oldSrc', $img.attr('src')); $('img:not(:first)', $imgBoxCont).css('display', 'none'); $imgBoxCont.css({'overflow': 'hidden'}); $img.fadeTo(0, 0).removeAttr('width').removeAttr('height').css({ 'visibility': 'visible', 'max-width': 'none', 'max-height': 'none', 'width': 'auto', 'height': 'auto', 'display': 'block' }); $img.on('error', onError); $img[0].onerror=onError; function onLoad(){ if($img.data('imgLiquid_error')||$img.data('imgLiquid_loaded')||$img.data('imgLiquid_oldProcessed')) return; if($imgBoxCont.is(':visible')&&$img[0].complete&&$img[0].width > 0&&$img[0].height > 0){ $img.data('imgLiquid_loaded', true); setTimeout(makeOldProcess, $i * settings.delay); }else{ setTimeout(onLoad, settings.timecheckvisibility); }} onLoad(); checkResponsive(); } function checkResponsive(){ if(!settings.responsive&&!$img.data('imgLiquid_oldProcessed')) return; if(!$img.data('imgLiquid_settings')) return; settings=$img.data('imgLiquid_settings'); $imgBoxCont.actualSize=$imgBoxCont.get(0).offsetWidth + ($imgBoxCont.get(0).offsetHeight / 10000); if($imgBoxCont.sizeOld&&$imgBoxCont.actualSize!==$imgBoxCont.sizeOld) makeOldProcess(); $imgBoxCont.sizeOld=$imgBoxCont.actualSize; setTimeout(checkResponsive, settings.responsiveCheckTime); } function onError(){ $img.data('imgLiquid_error', true); $imgBoxCont.addClass('imgLiquid_error'); if(settings.onItemError) settings.onItemError($i, $imgBoxCont, $img); checkFinish(); } function getSettingsOverwrite(){ var SettingsOverwrite={}; if(imgLiquidRoot.settings.useDataHtmlAttr){ var dif=$imgBoxCont.attr('data-imgLiquid-fill'), ha=$imgBoxCont.attr('data-imgLiquid-horizontalAlign'), va=$imgBoxCont.attr('data-imgLiquid-verticalAlign'); if(dif==='true'||dif==='false') SettingsOverwrite.fill=Boolean (dif==='true'); if(ha!==undefined&&(ha==='left'||ha==='center'||ha==='right'||ha.indexOf('%')!==-1)) SettingsOverwrite.horizontalAlign=ha; if(va!==undefined&&(va==='top'||va==='bottom'||va==='center'||va.indexOf('%')!==-1)) SettingsOverwrite.verticalAlign=va; } if(imgLiquid.isIE&&imgLiquidRoot.settings.ieFadeInDisabled) SettingsOverwrite.fadeInTime=0; return SettingsOverwrite; } function makeOldProcess(){ var w, h, wn, hn, ha, va, hdif, vdif, margT=0, margL=0, $imgCW=$imgBoxCont.width(), $imgCH=$imgBoxCont.height(); if($img.data('owidth')===undefined) $img.data('owidth', $img[0].width); if($img.data('oheight')===undefined) $img.data('oheight', $img[0].height); if(settings.fill===($imgCW / $imgCH) >=($img.data('owidth') / $img.data('oheight'))){ w='100%'; h='auto'; wn=Math.floor($imgCW); hn=Math.floor($imgCW * ($img.data('oheight') / $img.data('owidth'))); }else{ w='auto'; h='100%'; wn=Math.floor($imgCH * ($img.data('owidth') / $img.data('oheight'))); hn=Math.floor($imgCH); } ha=settings.horizontalAlign.toLowerCase(); hdif=$imgCW - wn; if(ha==='left') margL=0; if(ha==='center') margL=hdif * 0.5; if(ha==='right') margL=hdif; if(ha.indexOf('%')!==-1){ ha=parseInt (ha.replace('%',''), 10); if(ha > 0) margL=hdif * ha * 0.01; } va=settings.verticalAlign.toLowerCase(); vdif=$imgCH - hn; if(va==='left') margT=0; if(va==='center') margT=vdif * 0.5; if(va==='bottom') margT=vdif; if(va.indexOf('%')!==-1){ va=parseInt (va.replace('%',''), 10); if(va > 0) margT=vdif * va * 0.01; } if(settings.hardPixels){w=wn; h=hn;} $img.css({ 'width': w, 'height': h, 'margin-left': Math.floor(margL), 'margin-top': Math.floor(margT) }); if(!$img.data('imgLiquid_oldProcessed')){ $img.fadeTo(settings.fadeInTime, 1); $img.data('imgLiquid_oldProcessed', true); if(settings.removeBoxBackground) $imgBoxCont.css('background-image', 'none'); $imgBoxCont.addClass('imgLiquid_nobgSize'); $imgBoxCont.addClass('imgLiquid_ready'); } if(settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); checkFinish(); } function checkFinish(){ if($i===imgLiquidRoot.length - 1) if(imgLiquidRoot.settings.onFinish) imgLiquidRoot.settings.onFinish(); }}); }}); })(jQuery); if(typeof window.cff==='undefined'||typeof window.cff.feeds==='undefined'){ window.cff=new Cff(); window.cff.createPage(window.cff.createFeeds, {}); } jQuery(document).ready(function(){ var allInitiated=true; jQuery('.cff').each(function(index){ if(typeof window.cff!=='undefined' && typeof window.cff.feeds!=='undefined' && typeof window.cff.feeds[index]==='undefined'){ allInitiated=false; }}); if(!allInitiated){ window.cff.createPage(window.cff.createFeeds, {}); } var $=jQuery; $('#cookie-notice a').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $('#cookie-law-info-bar a').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $('.cli-user-preference-checkbox').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $(window).on('CookiebotOnAccept', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=true; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('cmplzAcceptAll', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=true; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('cmplzRevoke', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('borlabs-cookie-consent-saved', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); }); }); setTimeout(function(){ jQuery('#cff .embed-responsive video, #cff .embed-responsive iframe').unwrap(); }, 500); !function (){ var css=imgLiquid.injectCss, head=document.getElementsByTagName('head')[0], style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=css; }else{ style.appendChild(document.createTextNode(css)); } head.appendChild(style); }(); jQuery(".cff-new .cff-album-cover").imgLiquid({fill:true}); jQuery(".cff-new .cff-crop").imgLiquid({fill:true, useBackgroundSize:true}); jQuery(".cff-header-hero").imgLiquid({fill:true}); } cff_init(); function cffGetShortcodeToken($cff){ var shortcode_token_param=''; if($cff.attr('data-cff-shortcode')){ if($cff.attr('data-cff-shortcode').indexOf('accesstoken')!==-1){ var shortcode_att=$cff.attr('data-cff-shortcode'), shortcode_att_arr=JSON.parse(shortcode_att); shortcode_token_param=encodeURI('&at=' + shortcode_att_arr['accesstoken']); }} return shortcode_token_param; } window.cffLinkify=(function(){var k="[a-z\\d.-]+://",h="(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])",c="(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+",n="(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)",f="(?:"+c+n+"|"+h+")",o="(?:[;/][^#?<>\\s]*)?",e="(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?",d="\\b"+k+"[^<>\\s]+",a="\\b"+f+o+e+"(?!\\w)",m="mailto:",j="(?:"+m+")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+f+e+"(?!\\w)",l=new RegExp("(?:"+d+"|"+a+"|"+j+")","ig"),g=new RegExp("^"+k,"i"),b={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},i={callback:function(q,p){return p?''+q+"":q},punct_regexp:/(?:[!?.,:;'"]|(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/};return function(u,z){z=z||{};var w,v,A,p,x="",t=[],s,E,C,y,q,D,B,r;for(v in i){if(z[v]===undefined){z[v]=i[v]}}while(w=l.exec(u)){A=w[0];E=l.lastIndex;C=E-A.length;if(/[\/:]/.test(u.charAt(C-1))){continue}do{y=A;r=A.substr(-1);B=b[r];if(B){q=A.match(new RegExp("\\"+B+"(?!$)","g"));D=A.match(new RegExp("\\"+r,"g"));if((q?q.length:0)<(D?D.length:0)){A=A.substr(0,A.length-1);E--}}if(z.punct_regexp){A=A.replace(z.punct_regexp,function(F){E-=F.length;return""})}}while(A.length&&A!==y);p=A;if(!g.test(p)){p=(p.indexOf("@")!==-1?(!p.indexOf(m)?"":m):!p.indexOf("irc.")?"irc://":!p.indexOf("ftp.")?"ftp://":"http://")+p}if(s!=C){t.push([u.slice(s,C)]);s=E}t.push([A,p])}t.push([u.substr(s)]);for(v=0;v' + replacementString + ''; }} function cffReplaceTags(tag){ var replacementString=jQuery.trim(tag); return '' + replacementString + ''; } var hashRegex=/[#]+[A-Za-z0-9-_]+/g, tagRegex=/[@]+[A-Za-z0-9-_]+/g; function cffEncodeHTML(raw){ if(typeof raw==='undefined'){ return ''; } var encoded=raw.replace(/(>)/g,'>'), encoded=encoded.replace(/(<)/g,'<'); encoded=encoded.replace(/(<br\/>)/g,'
      '); encoded=encoded.replace(/(<br>)/g,'
      '); return encoded; } function cffLoadCommentReplies($this){ var usegrouptoken='', useowntoken='', $cffClosestContainer=jQuery('#cff_'+$this.parent().attr('data-id')).closest('#cff'); if($cffClosestContainer.hasClass('cff-group')) usegrouptoken='&usegrouptoken=true'; if($cffClosestContainer.attr('data-own-token')=='true') useowntoken='&useowntoken=true'; var cff_page_id=$this.closest('.cff-item').attr('data-page-id'), shortcode_token_param=cffGetShortcodeToken($cffClosestContainer), $commentReplies=$this.parent(), $commentRepliesBox=$commentReplies.siblings('.cff-comment-replies-box'), comments_url=cffsiteurl + "/custom-facebook-feed-pro/comments.php?id=" + $commentReplies.attr('data-id') + usegrouptoken + useowntoken + '&pageid=' + cff_page_id + shortcode_token_param; if($commentReplies.hasClass('cff-hide')){ $commentRepliesBox.hide(); $commentReplies.removeClass('cff-hide'); }else{ $commentRepliesBox.show(); $commentReplies.addClass('cff-hide'); if($commentRepliesBox.hasClass('cff-empty')){ var $commentRepliesA=$commentReplies.find('a'); $commentRepliesA.append('
      '); $commentReplies.find('.cff-loader').css('background-color', $commentRepliesA.css('color')); var submitData={ action: 'cff_comments', id: $commentReplies.attr('data-id'), pageid: cff_page_id, }; if($cffClosestContainer.hasClass('cff-group')){ submitData.usegrouptoken=true; } if($cffClosestContainer.attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } var onSuccess=function(data){ $commentReplies.find('.cff-loader').remove(); var data=JSON.parse(data), allComments=''; if(typeof data.comments!=='undefined'){ jQuery.each(data.comments.data, function(i, commentItem){ var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; var cff_comment_author_info=true; if(typeof commentItem.from!=='undefined'){ cff_comment_from_id=commentItem.from.id; }else{ cff_comment_author_info=false; cff_comment_from_id=''; } allComments +='

      '; if(cff_comment_author_info){ if(typeof commentItem.from.link!='undefined'){ allComments +=''+commentItem.from.name+''; }else{ allComments +=''+commentItem.from.name+''; }} var cffCommentMessage=cffEncodeHTML(commentItem.message); allComments +=cffCommentMessage; if(parseInt(commentItem.like_count) > 0) allComments +=''+commentItem.like_count+''; allComments +='

      '; if(typeof commentItem.attachment!=='undefined'){ if(consentGiven){ allComments +=''+commentItem.attachment.title+''; }else{ allComments +=''; }} allComments +='
      '; if(cff_comment_author_info){ if(consentGiven){ allComments +='
      Avatar
      '; }else{ allComments +='
      '; }} allComments +='
      '; }); } $commentRepliesBox.html(allComments).removeClass('cff-empty'); if($this.closest('#cff').hasClass('cff-masonry-js')&&!$this.closest('#cff').hasClass('cff-masonry-css')&&!$this.closest('#cff').hasClass('cff-opaque-comments')){ cffAddMasonry($this.closest('#cff')); }}; cffAjax(submitData,onSuccess); }} } function cffLightbox(){ (function(){ var $=jQuery; var LightboxOptions=(function(){ function LightboxOptions(){ this.fadeDuration=300; this.fitImagesInViewport=true; this.resizeDuration=400; this.positionFromTop=50; this.showImageNumberLabel=true; this.alwaysShowNavOnTouchDevices=false; this.wrapAround=false; } LightboxOptions.prototype.albumLabel=function(curImageNum, albumSize){ return curImageNum + " / " + albumSize; }; return LightboxOptions; })(); var Lightbox=(function(){ function Lightbox(options){ this.options=options; this.album=[]; this.currentImageIndex=void 0; this.init(); } Lightbox.prototype.init=function(){ this.enable(); this.build(); }; Lightbox.prototype.enable=function(){ var self=this; $('body').on('click', 'a[data-cff-lightbox], area[data-cff-lightbox]', function(event){ self.start($(event.currentTarget)); return false; }); }; Lightbox.prototype.build=function(){ var cff_lightbox_svg_class=''; if($('.cff.cff-no-svgs').length) cff_lightbox_svg_class='cff-no-svgs'; var self=this; $("
      ").appendTo($('body')); if(typeof jQuery("#cff-lightbox-wrapper").find(".cff-lightbox-dataContainer").hammer!=='function'){ var Hammer={ Manager: { prototype: {}} }; (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ } jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); } this.$lightbox=$('#cff-lightbox-wrapper'); this.$overlay=$('#cff-lightbox-overlay'); this.$outerContainer=this.$lightbox.find('.cff-lightbox-outerContainer'); this.$container=this.$lightbox.find('.cff-lightbox-container'); this.containerTopPadding=parseInt(this.$container.css('padding-top'), 10); this.containerRightPadding=parseInt(this.$container.css('padding-right'), 10); this.containerBottomPadding=parseInt(this.$container.css('padding-bottom'), 10); this.containerLeftPadding=parseInt(this.$container.css('padding-left'), 10); this.$overlay.hide().on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); this.$lightbox.hide().on('click', function(event){ if($(event.target).attr('id')==='cff-lightbox-wrapper'){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); }} return false; }); this.$outerContainer.on('click', function(event){ if($(event.target).attr('id')==='cff-lightbox-wrapper'){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); } return false; }); this.$lightbox.find('.cff-lightbox-prev').on('click', function(){ if(self.currentImageIndex===0){ self.changeImage(self.album.length - 1); }else{ self.changeImage(self.currentImageIndex - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-next').on('click', function(){ if(self.currentImageIndex===self.album.length - 1){ self.changeImage(0); }else{ self.changeImage(self.currentImageIndex + 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-outerContainer').hammer().on("swipeleft", function(){ if(self.currentImageIndex===self.album.length - 1){ self.changeImage(0); }else{ self.changeImage(self.currentImageIndex + 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-outerContainer').hammer().on("swiperight", function(){ if(self.currentImageIndex===0){ self.changeImage(self.album.length - 1); }else{ self.changeImage(self.currentImageIndex - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); $('.cff-lightbox-thumbs').on('click', '.cff-lightbox-attachment', function (){ var $thumb=$(this), $thumbImg=$thumb.find('img'), captionText=$thumb.attr('data-caption'); if(captionText==''||captionText=='undefined') captionText=$thumb.attr('orig-caption'); self.changeImage(parseInt($thumb.attr('data-cff-lightbox-order')), $thumb.attr('href'), $thumbImg.attr('width'), $thumbImg.attr('height'), $thumb.attr('data-facebook'), captionText); return false; }); this.$lightbox.find('.cff-lightbox-loader, .cff-lightbox-close').on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); }; Lightbox.prototype.start=function($link){ var self=this; var $window=$(window); $window.on('resize', $.proxy(this.sizeOverlay, this)); if($('body').length){ $('body').addClass('cff_no_scroll'); } $('select, object, embed').css({ visibility: "hidden" }); this.sizeOverlay(); if(this.album.length==0) this.album=[]; var imageNumber=0; function addToAlbum($link){ var albumClassName=$link.closest('.cff-posts-wrap').children().attr('class'); linkParentPostID=''; if(typeof albumClassName!=='undefined'){ linkParentPostID=$link.closest('.'+albumClassName.split(' ')[0]).attr('id'); linkParentPostID=linkParentPostID.replace('cff_','') } var found=false; $.each(self.album, function(i, imageitem){ if(( imageitem.link==$link.attr('href'))&&(imageitem.postid==linkParentPostID)){ found=true; return; }}); if(!$('.cff-duplicate-video-thumbnails').length) if(found==true) return; var closestFeedIndex=parseInt($link.closest('.cff').attr('data-cff-index')-1); var video=$link.attr("data-video"), iframe=$link.attr('data-iframe'), link=$link.attr("href"), count=0; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(!consentGiven){ if(iframe!==''){ iframe='link'; } if(video!==''){ video='link'; } if($link.closest('.cff-album-item').length && typeof $link.closest('.cff-album-item').attr('data-count')!=='undefined'){ count=$link.closest('.cff-album-item').attr('data-count'); }} self.album.push({ link: link, title: $link.attr('data-title')||$link.attr('title'), postid: $link.attr('data-id'), showthumbs: $link.attr('data-thumbs'), facebookurl: $link.attr('data-url'), video: video, iframe: iframe, type: $link.attr('data-type'), cffgroupalbums: $link.attr('data-cffgroupalbums'), isthumbnail: $link.attr('data-cff-isthumbnail'), pagename: $link.parent().attr('data-cff-page-name'), posttime: $link.parent().attr('data-cff-post-time'), lbcomments: $link.attr('data-lb-comments'), feedIndex: closestFeedIndex, count: count }); } var dataLightboxValue=$link.attr('data-cff-lightbox'); var $links; if(dataLightboxValue){ $links=$($link.prop("tagName") + '[data-cff-lightbox="' + dataLightboxValue + '"]'); for (var i=0; i < $links.length; i=++i){ addToAlbum($($links[i])); if($links[i]===$link[0]){ imageNumber=i; $.each(self.album, function(i, image){ if((image.postid==$link.attr('data-id'))&&image.isthumbnail!=true) imageNumber=i; }); }} }else{ if($link.attr('rel')==='lightbox'){ addToAlbum($link); }else{ $links=$($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]'); for (var j=0; j < $links.length; j=++j){ addToAlbum($($links[j])); if($links[j]===$link[0]){ imageNumber=j; }} }} var top=$window.scrollTop() + this.options.positionFromTop; var left=$window.scrollLeft(); this.$lightbox.css({ top: top + 'px', left: left + 'px' }).fadeIn(this.options.fadeDuration); this.changeImage(imageNumber); }; Lightbox.prototype.changeImage=function(imageNumberVal, imageUrl, imgWidth, imgHeight, facebookLink, captionText){ var self=this, isThumb=false, bottomPadding=120; imageNumber=imageNumberVal; if(typeof imageUrl!=='undefined') isThumb=true; this.disableKeyboardNav(); var $image=this.$lightbox.find('.cff-lightbox-image'); this.$overlay.fadeIn(this.options.fadeDuration); $('.cff-lightbox-loader').fadeIn('slow'); this.$lightbox.find('.cff-lightbox-image, .cff-lightbox-nav, .cff-lightbox-prev, .cff-lightbox-next, .cff-lightbox-dataContainer, .cff-lightbox-numbers, .cff-lightbox-caption').hide(); this.$outerContainer.addClass('animating'); var preloader=new Image(); preloader.onload=function(){ var $preloader, imageHeight, imageWidth, maxImageHeight, maxImageWidth, windowHeight, windowWidth; $image.attr('src', self.album[imageNumber].link); if(isThumb){ $image.attr('src', imageUrl); $('.cff-lightbox-facebook').attr('href', facebookLink); $('.cff-lightbox-caption .cff-lightbox-caption-text').html(captionText); preloader.width=imgWidth; preloader.height=imgHeight; bottomPadding=180; } $preloader=$(preloader); $image.width(preloader.width); $image.height(preloader.height); if(self.options.fitImagesInViewport){ windowWidth=$(window).width(); windowHeight=$(window).height(); var cff_lb_comments_width=0, cffNavArrowsWidth=80; if($('#cff_' + self.album[0].postid).closest('#cff').attr('data-lb-comments')=='true'&&windowWidth > 640) cff_lb_comments_width=300; if(window.innerWidth < 640) cffNavArrowsWidth=40; maxImageWidth=windowWidth - self.containerLeftPadding - self.containerRightPadding - 20 - cff_lb_comments_width - cffNavArrowsWidth; maxImageHeight=windowHeight - self.containerTopPadding - self.containerBottomPadding - bottomPadding; if((preloader.width > maxImageWidth)||(preloader.height > maxImageHeight)){ if((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)){ imageWidth=maxImageWidth; imageHeight=parseInt(preloader.height / (preloader.width / imageWidth), 10); $image.width(imageWidth); $image.height(imageHeight); }else{ imageHeight=maxImageHeight; imageWidth=parseInt(preloader.width / (preloader.height / imageHeight), 10); $image.width(imageWidth); $image.height(imageHeight); }} } self.sizeContainer($image.width(), $image.height()); }; preloader.src=this.album[imageNumber].link; this.currentImageIndex=imageNumber; }; Lightbox.prototype.sizeOverlay=function(){ this.$overlay .width($(window).width()) .height($(document).height()); }; Lightbox.prototype.sizeContainer=function(imageWidth, imageHeight){ var self=this; var oldWidth=this.$outerContainer.outerWidth(); var oldHeight=this.$outerContainer.outerHeight(); var newWidth=imageWidth + this.containerLeftPadding + this.containerRightPadding; var newHeight=imageHeight + this.containerTopPadding + this.containerBottomPadding; function postResize(){ self.$lightbox.find('.cff-lightbox-dataContainer').width(newWidth); self.$lightbox.find('.cff-lightbox-prevLink').height(newHeight); self.$lightbox.find('.cff-lightbox-nextLink').height(newHeight); self.showImage(); } if(oldWidth!==newWidth||oldHeight!==newHeight){ this.$outerContainer.animate({ width: newWidth, height: newHeight }, this.options.resizeDuration, 'swing', function(){ postResize(); }); }else{ postResize(); }}; Lightbox.prototype.showImage=function(){ this.$lightbox.find('.cff-lightbox-loader').hide(); this.$lightbox.find('.cff-lightbox-image').fadeIn('slow'); this.updateNav(); this.updateDetails(); this.preloadNeighboringImages(); this.enableKeyboardNav(); }; Lightbox.prototype.updateNav=function(){ var alwaysShowNav=false; try { document.createEvent("TouchEvent"); alwaysShowNav=(this.options.alwaysShowNavOnTouchDevices)? true: false; } catch (e){} this.$lightbox.find('.cff-lightbox-nav').show(); if(this.album.length > 1){ if(this.options.wrapAround){ if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-prev, .cff-lightbox-next').css('opacity', '1'); } this.$lightbox.find('.cff-lightbox-prev, .cff-lightbox-next').show(); }else{ if(this.currentImageIndex > 0){ this.$lightbox.find('.cff-lightbox-prev').show(); if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-prev').css('opacity', '1'); }} if(this.currentImageIndex < this.album.length - 1){ this.$lightbox.find('.cff-lightbox-next').show(); if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-next').css('opacity', '1'); }} }} }; var thumbsArr={}; Lightbox.prototype.updateDetails=function(){ var self=this; var origCaption=''; this.$lightbox.find('.cff-lightbox-nav, .cff-lightbox-nav a').show(); if($('.cff-lightbox-video').length==0) $('.cff-lightbox-container').prepend(""); if(cff_supports_video()){ $('#cff-lightbox-wrapper').removeClass('cff-has-video'); if(typeof this.album[this.currentImageIndex].video!=='undefined' && this.album[this.currentImageIndex].video!=='link'){ if(this.album[this.currentImageIndex].video.length){ $('#cff-lightbox-wrapper').addClass('cff-has-video'); $('.cff-lightbox-video').attr({ 'src':this.album[this.currentImageIndex].video, 'poster':this.album[this.currentImageIndex].link, 'autoplay':'true' }); }} } var iframeIsLink=false; if(this.album[this.currentImageIndex].iframe==='link'){ iframeIsLink=true; } if((this.album[this.currentImageIndex].video==='link'||iframeIsLink) && ! jQuery(".cff-lightbox-container .cff_gdpr_notice").length){ jQuery(".cff-lightbox-container").prepend('') }else if(this.album[this.currentImageIndex].video!=='link'&&!iframeIsLink){ jQuery('.cff_gdpr_notice').remove(); }else if(jQuery(".cff-lightbox-container .cff_gdpr_notice").length){ jQuery(".cff-lightbox-container .cff_gdpr_notice").attr('href',this.album[this.currentImageIndex].facebookurl); } var cff_lb_comments=(this.album[this.currentImageIndex].lbcomments=='true'&&$('#cff_'+this.album[this.currentImageIndex].postid+' .cff-lightbox-link').attr('data-lb-comments')!='false') ? true:false; if($(window).width() <=640) cff_lb_comments=false; if(cff_lb_comments){ var lb_post_id=this.album[this.currentImageIndex].postid, page_id=lb_post_id.split('_')[0], author_name=this.album[this.currentImageIndex].pagename, date_in_correct_format=this.album[this.currentImageIndex].posttime, $lightbox_sidebar=$('.cff-lightbox-container .cff-lightbox-sidebar'), $lightbox_thumbs_holder=$('.cff-lightbox-thumbs-holder'), from_id=$('#cff_'+this.album[this.currentImageIndex].postid).attr('data-cff-from'); $('.cff-lightbox-wrapper').addClass('cff-enable-lb-comments'); $('.cff-lightbox-dataContainer').css('width', $('.cff-lightbox-dataContainer').innerWidth() + 300); $lightbox_sidebar.css('display', 'block'); var cff_post_author=""; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven&&typeof from_id!=='undefined'){ cff_post_author="

      "+date_in_correct_format+"

      "+author_name+"
      "; }else{ cff_post_author="

      "+date_in_correct_format+"

      "; } $('.cff-lightbox-dataContainer .cff-lightbox-close').remove(); $lightbox_sidebar.html("
      " + cff_post_author + "

      " + $('.cff-lightbox-caption-text').html() + '

      ' + $('#cff_'+this.album[this.currentImageIndex].postid+' .cff-comments-box')[0].outerHTML); this.$lightbox.find('.cff-lightbox-close').on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); setTimeout(function(){ if($lightbox_thumbs_holder.find('a').length > 1){ $lightbox_sidebar.find('.cff-page-name a').text($lightbox_thumbs_holder.find('a.cff-selected').attr('data-page-name')); $lightbox_sidebar.find('.cff-date').text($lightbox_thumbs_holder.find('a.cff-selected').attr('data-post-date')); }}, 0); $lightbox_thumbs_holder.css('margin-top', -10); if($lightbox_sidebar.find('.cff-reactions-count').innerWidth() > 150){ $lightbox_sidebar.find('.cff-likes-this-text').addClass('cff-long'); } $lightbox_sidebar.find('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); $lightbox_sidebar.find('.cff-comment-replies a').on('click', function(){ cffLoadCommentReplies($(this)); }); $lightbox_sidebar.find('.cff-show-more-comments a').attr('href', $lightbox_sidebar.find('.cff-comment-on-facebook a').attr('href')); }else{ $('.cff-lightbox-wrapper .cff-lightbox-sidebar').html(''); $('.cff-lightbox-wrapper').removeClass('cff-enable-lb-comments'); } $('#cff-lightbox-wrapper').removeClass('cff-has-iframe cff-fb-player cff-has-thumbs'); if(typeof this.album[this.currentImageIndex].iframe!=='undefined'){ if(this.album[this.currentImageIndex].iframe.length&&this.album[this.currentImageIndex].iframe!=='link'){ var videoURL=this.album[this.currentImageIndex].iframe; $('#cff-lightbox-wrapper').addClass('cff-has-iframe'); if(videoURL.indexOf("https://www.facebook.com/v2.3/plugins/video.php?")!=-1) $('#cff-lightbox-wrapper').addClass('cff-fb-player'); if(videoURL.indexOf(".swf") > -1||videoURL.indexOf("&autoplay=1")!=-1){ var autoplayParam=''; }else{ var autoplayParam='?autoplay=1'; } var vInt=setTimeout(function(){ $('#cff-lightbox-wrapper iframe').attr({ 'src':videoURL + autoplayParam + "&mute=0" }); }, 500); }} var isThumbnail=false; if(this.album[this.currentImageIndex].isthumbnail) isThumbnail=true; if(!isThumbnail) $('.cff-lightbox-thumbs-holder').empty().removeClass('cff-animate'); if(this.album[this.currentImageIndex].link==$('.cff-lightbox-image').attr('src')){ $('.cff-lightbox-facebook').attr('href', this.album[this.currentImageIndex].facebookurl); } if(this.album[this.currentImageIndex].showthumbs=='true'){ $('.cff-lightbox-thumbs').show(); var thisPostId=this.album[this.currentImageIndex].postid, albumInfo='', albumThumbs='', albumsonly=false; if(this.album[this.currentImageIndex].type=='albumsonly') albumsonly=true; if(typeof thumbsArr[thisPostId]!=='undefined'){ $.each(thumbsArr[thisPostId], function(i, thumb){ var origCaption=thumb[5].replace(/"/g, '"'); var albumIndex=0; $.each(self.album, function(i, albumItem){ if(albumItem.postid==thisPostId){ albumIndex=i; return false; }}); var lightboxImageOrder=(parseInt(albumIndex)+parseInt(i)); if(typeof thumb[8]=='undefined') thumb[8]=thumb[0]; albumThumbs +=''; if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, thumb[0], thumb[4], thumb[3], thisPostId, albumsonly, true, thumb[6], thumb[7], thumb[8]); }}); $('.cff-lightbox-thumbs-holder').html('
      ' + albumThumbs + '
      ').addClass('cff-animate'); $('.cff-lightbox-wrapper').addClass('cff-has-thumbs'); jQuery(".cff-lightbox-thumbs-holder a").imgLiquid({fill:true, useBackgroundSize:true}); $('.cff-loader').hide(); $('.cff-lightbox-thumbs-holder').css('min-height', 0); }else{ if(typeof cffsiteurl==='undefined'||cffsiteurl=='') cffsiteurl=window.location.host + '/wp-content/plugins'; var $cffClosest=$('#cff_'+thisPostId).closest('.cff'), cff_page_id=$('#cff_'+thisPostId).attr('data-page-id'), shortcode_token_param=cffGetShortcodeToken($cffClosest), useowntoken=''; if($cffClosest.attr('data-own-token')=='true') useowntoken='&useowntoken=true'; var cffAttachmentsUrl=cffsiteurl + "/custom-facebook-feed-pro/thumbs.php?id=" + thisPostId + '&pageid=' + cff_page_id + useowntoken + shortcode_token_param, thumbsData=[]; if(albumsonly){ cffAttachmentsUrl=cffAttachmentsUrl + '&albumsonly=true'; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $('.cff-lightbox-thumbs-holder').css('min-height', 45).after('
      '); }} var cffgroupalbums=this.album[this.currentImageIndex].cffgroupalbums; if(cffgroupalbums) cffAttachmentsUrl=cffAttachmentsUrl + '&usegrouptoken=' + cffgroupalbums; var submitData={ action: 'cff_thumbs', id: thisPostId, pageid: cff_page_id, }; if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } if($cffClosest.attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(cffgroupalbums){ submitData.usegrouptoken=cffgroupalbums; } if(albumsonly){ submitData.albumsonly=true; } var onSuccess=function(data){ data=JSON.parse(data); if(albumsonly){ $.each(data.data, function(i, photoItem){ var dataCaption=''; if(photoItem.name) dataCaption=photoItem.name; dataCaption=cffLinkify(dataCaption); dataCaption=dataCaption.replace(hashRegex , cffReplaceHashtags); dataCaption=String(dataCaption).replace(/& /g, '& ').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
      "); origCaption=String(origCaption).replace(/& /g, '& ').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
      "); var lightboxImageOrder=(parseInt(self.currentImageIndex)+parseInt(i)); var cffThumbHref=photoItem.source, cffPhotoItemWidth=photoItem.width, cffPhotoItemHeight=photoItem.height; if(typeof photoItem.images[0]!=='undefined'){ cffThumbHref=photoItem.images[0].source; cffPhotoItemWidth=photoItem.images[0].width; cffPhotoItemHeight=photoItem.images[0].height; } if(typeof photoItem.images[ photoItem.images.length-2 ]!=='undefined'){ var cffThumbImg=photoItem.images[ photoItem.images.length-2 ].source; }else{ var cffThumbImg=cffThumbHref; } albumThumbs +=''; thumbsData.push([cffThumbHref, cffPhotoItemWidth, cffPhotoItemHeight, 'http://facebook.com/'+photoItem.id, dataCaption, origCaption, undefined, undefined, cffThumbImg]); if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, cffThumbHref, dataCaption, 'http://facebook.com/'+photoItem.id, thisPostId, albumsonly, true, cffThumbImg); }}); }else{ if(typeof data.attachments!=='undefined'){ $.each(data.attachments.data[0].subattachments.data, function(i, subattachment){ var dataCaption=''; if(subattachment.description) dataCaption=subattachment.description; origCaption=String(origCaption).replace(/"/g, '"'); dataCaption=cffLinkify(dataCaption); dataCaption=dataCaption.replace(hashRegex , cffReplaceHashtags); dataCaption=String(dataCaption).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
      "); var lightboxImageOrder=(parseInt(self.currentImageIndex)+parseInt(i)); albumThumbs +=''; thumbsData.push([subattachment.media.image.src, subattachment.media.image.width, subattachment.media.image.height, subattachment.url, dataCaption, origCaption, author_name, date_in_correct_format]); if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, subattachment.media.image.src, dataCaption, subattachment.url, thisPostId, albumsonly, true, author_name, date_in_correct_format, subattachment.media.image.src); }}); }} if(albumThumbs.length > 0){ $('.cff-lightbox-thumbs-holder').html('
      ' + albumThumbs + '
      ').addClass('cff-animate'); $('.cff-lightbox-wrapper').addClass('cff-has-thumbs'); } jQuery(".cff-lightbox-thumbs-holder .cff-lightbox-attachment").imgLiquid({fill:true, useBackgroundSize:true}); $('.cff-loader').hide(); $('.cff-lightbox-thumbs-holder').css('min-height', 0); thumbsArr[ thisPostId ]=thumbsData; if(albumsonly){ jQuery('.cff-lightbox-container').removeClass('cff-album-loading'); jQuery('.cff-lightbox-prev, .cff-lightbox-next').show(); }}; $('.cff-gdpr-more-link').remove(); if(window.cff.feeds[ this.album[this.currentImageIndex].feedIndex ].settings.consentGiven){ if(albumsonly){ jQuery('.cff-lightbox-container').addClass('cff-album-loading'); jQuery('.cff-lightbox-prev, .cff-lightbox-next').hide(); } cffAjax(submitData,onSuccess); }else{ if(parseInt(this.album[this.currentImageIndex].count) > 0){ $('.cff-lightbox-facebook').after('
      +' + this.album[this.currentImageIndex].count + '
      '); $('.cff-gdpr-more-link').imgLiquid({fill:true, useBackgroundSize:true}); setTimeout(function (){ $('.cff-gdpr-more-link span').css({ 'margin-top': '-' + ($('.cff-gdpr-more-link span').height() / 2) + 'px', 'margin-right': '-' + ($('.cff-gdpr-more-link span').width() / 2) + 'px', 'display': 'block' }); }, 200); }} }}else{ $('.cff-lightbox-thumbs').hide(); } $(".cff-lightbox-attachment").removeClass('cff-selected'); $(".cff-lightbox-attachment[href='"+$('.cff-lightbox-image').attr('src')+"']").addClass('cff-selected'); function cffInsertLightboxImage(currentImageIndex, link, title, facebookurl, postid, albumsonly, isThumbnail, cffThumbImg){ var found=false; $.each(self.album, function(i, thumbitem){ if(( thumbitem.link==link)&&(thumbitem.postid==postid)){ found=true; return; }}); if(found==true) return; (albumsonly) ? postType='albumsonly':postType=''; (albumsonly) ? lbcomments='false':lbcomments='true'; self.album.splice(currentImageIndex, 0, { link: link, title: title, postid: postid, showthumbs: 'true', facebookurl: facebookurl, video: '', iframe: '', type: postType, cffgroupalbums: undefined, isthumbnail: isThumbnail, lbcomments: lbcomments, thumbimg: cffThumbImg }); } this.$lightbox.find('.cff-lightbox-caption').fadeIn('fast'); if(typeof this.album[this.currentImageIndex].title!=='undefined'&&this.album[this.currentImageIndex].title!==""){ var origCaption=this.album[this.currentImageIndex].title; origCaption=origCaption.replace(hashRegex , cffReplaceHashtags); origCaption=String(origCaption).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"'); var $lightboxCaption=this.$lightbox.find('.cff-lightbox-caption'), $lightboxCaptionText=$lightboxCaption.find('.cff-lightbox-caption-text'); if(this.album[this.currentImageIndex].link==$('.cff-lightbox-image').attr('src')) $lightboxCaptionText.html(origCaption); if($lightboxCaptionText.text()==' '||$lightboxCaptionText.text()==''){ $lightboxCaption.addClass('cff-no-caption'); }else{ $lightboxCaption.removeClass('cff-no-caption'); }}else{ if(albumsonly||this.album[this.currentImageIndex].title===undefined) this.$lightbox.find('.cff-lightbox-caption-text').html(''); if(this.$lightbox.find('.cff-lightbox-caption .cff-lightbox-caption-text').text().length < 1) this.$lightbox.find('.cff-lightbox-caption').addClass('cff-no-caption').find('.cff-lightbox-caption-text').html(''); } this.$lightbox.find('.cff-lightbox-facebook, .cff-lightbox-caption-text a, .cff-lightbox-sidebar a:not(.cff-comment-replies-a), .cff_gdpr_notice, .cff-gdpr-more-link').off('click').on('click', function(event){ window.open($(this).attr('href'), '_blank' ) } ); if(this.album.length > 1&&this.options.showImageNumberLabel){ this.$lightbox.find('.cff-lightbox-number').text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn('fast'); }else{ this.$lightbox.find('.cff-lightbox-number').hide(); } if(typeof cffLightboxAction==='function'){ setTimeout(function(){ cffLightboxAction(); },100); } this.$outerContainer.removeClass('animating'); this.$lightbox.find('.cff-lightbox-dataContainer').fadeIn(this.options.resizeDuration, function(){ return self.sizeOverlay(); }); }; Lightbox.prototype.preloadNeighboringImages=function(){ if(this.album.length > this.currentImageIndex + 1){ var preloadNext=new Image(); preloadNext.src=this.album[this.currentImageIndex + 1].link; } if(this.currentImageIndex > 0){ var preloadPrev=new Image(); preloadPrev.src=this.album[this.currentImageIndex - 1].link; }}; Lightbox.prototype.enableKeyboardNav=function(){ $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); }; Lightbox.prototype.disableKeyboardNav=function(){ $(document).off('.keyboard'); }; Lightbox.prototype.keyboardAction=function(event){ var KEYCODE_ESC=27; var KEYCODE_LEFTARROW=37; var KEYCODE_RIGHTARROW=39; var keycode=event.keyCode; var key=String.fromCharCode(keycode).toLowerCase(); if(keycode===KEYCODE_ESC||key.match(/x|o|c/)){ if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); this.end(); }else if(key==='p'||keycode===KEYCODE_LEFTARROW){ if(jQuery('.cff-lightbox-container').hasClass('cff-album-loading')){ return; } if(this.currentImageIndex!==0){ this.changeImage(this.currentImageIndex - 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(this.album.length - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); }else if(key==='n'||keycode===KEYCODE_RIGHTARROW){ if(jQuery('.cff-lightbox-container').hasClass('cff-album-loading')){ return; } if(this.currentImageIndex!==this.album.length - 1){ this.changeImage(this.currentImageIndex + 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(0); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); }}; Lightbox.prototype.end=function(){ this.disableKeyboardNav(); $(window).off("resize", this.sizeOverlay); this.$lightbox.fadeOut(this.options.fadeDuration); this.$overlay.fadeOut(this.options.fadeDuration); $('select, object, embed').css({ visibility: "visible" }); }; return Lightbox; })(); $(function(){ var options=new LightboxOptions(); var lightbox=new Lightbox(options); }); }).call(this); function cff_supports_video(){ return !!document.createElement('video').canPlayType; }} if(jQuery('#cff.cff-lb').length) cffLightbox(); }; ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return F("animationName")},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;fn;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},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,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);t&&e&&(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],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=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 n in t){var r=t[n];for(var s in this.waypoints[n]){var a,l,h,p,u,c=this.waypoints[n][s],d=c.options.offset,f=c.triggerPoint,w=0,y=null==f;c.element!==c.element.window&&(w=c.adapter.offset()[r.offsetProp]),"function"==typeof d?d=d.apply(c):"string"==typeof d&&(d=parseFloat(d),c.options.offset.indexOf("%")>-1&&(d=Math.ceil(r.contextDimension*d/100))),a=r.contextScroll-r.contextOffset,c.triggerPoint=w+a-d,l=f=r.oldScroll,p=l&&h,u=!l&&!h,!y&&p?(c.queueTrigger(r.backward),o[c.group.id]=c.group):!y&&u?(c.queueTrigger(r.forward),o[c.group.id]=c.group):y&&r.oldScroll>=c.triggerPoint&&(c.queueTrigger(r.forward),o[c.group.id]=c.group)}}for(var g in o)o[g].flushTriggers();return 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(e,t,n,r){function d(t,n){this.element=t;this.options=e.extend({},s,n);this._defaults=s;this._name=i;this.init()}var i="stellar",s={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:true,verticalScrolling:true,horizontalOffset:0,verticalOffset:0,responsive:true,parallaxBackgrounds:true,parallaxElements:true,hideDistantElements:true,hideElement:function(e){e.hide()},showElement:function(e){e.show()}},o={scroll:{getLeft:function(e){return e.scrollLeft()},setLeft:function(e,t){e.scrollLeft(t)},getTop:function(e){return e.scrollTop()},setTop:function(e,t){e.scrollTop(t)}},position:{getLeft:function(e){return parseInt(e.css("left"),10)*-1},getTop:function(e){return parseInt(e.css("top"),10)*-1}},margin:{getLeft:function(e){return parseInt(e.css("margin-left"),10)*-1},getTop:function(e){return parseInt(e.css("margin-top"),10)*-1}},transform:{getLeft:function(e){var t=getComputedStyle(e[0])[f];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[4],10)*-1:0},getTop:function(e){var t=getComputedStyle(e[0])[f];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[5],10)*-1:0}}},u={position:{setLeft:function(e,t){e.css("left",t)},setTop:function(e,t){e.css("top",t)}},transform:{setPosition:function(e,t,n,r,i){e[0].style[f]="translate3d("+(t-n)+"px, "+(r-i)+"px, 0)"}}},a=function(){var t=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,n=e("script")[0].style,r="",i;for(i in n){if(t.test(i)){r=i.match(t)[0];break}}if("WebkitOpacity"in n){r="Webkit"}if("KhtmlOpacity"in n){r="Khtml"}return function(e){return r+(r.length>0?e.charAt(0).toUpperCase()+e.slice(1):e)}}(),f=a("transform"),l=e("
      ",{style:"background:#fff"}).css("background-position-x")!==r,c=l?function(e,t,n){e.css({"background-position-x":t,"background-position-y":n})}:function(e,t,n){e.css("background-position",t+" "+n)},h=l?function(e){return[e.css("background-position-x"),e.css("background-position-y")]}:function(e){return e.css("background-position").split(" ")},p=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};d.prototype={init:function(){this.options.name=i+"_"+Math.floor(Math.random()*1e9);this._defineElements();this._defineGetters();this._defineSetters();this._handleWindowLoadAndResize();this._detectViewport();this.refresh({firstLoad:true});if(this.options.scrollProperty==="scroll"){this._handleScrollEvent()}else{this._startAnimationLoop()}},_defineElements:function(){if(this.element===n.body)this.element=t;this.$scrollElement=e(this.element);this.$element=this.element===t?e("body"):this.$scrollElement;this.$viewportElement=this.options.viewportElement!==r?e(this.options.viewportElement):this.$scrollElement[0]===t||this.options.scrollProperty==="scroll"?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var e=this,t=o[e.options.scrollProperty];this._getScrollLeft=function(){return t.getLeft(e.$scrollElement)};this._getScrollTop=function(){return t.getTop(e.$scrollElement)}},_defineSetters:function(){var t=this,n=o[t.options.scrollProperty],r=u[t.options.positionProperty],i=n.setLeft,s=n.setTop;this._setScrollLeft=typeof i==="function"?function(e){i(t.$scrollElement,e)}:e.noop;this._setScrollTop=typeof s==="function"?function(e){s(t.$scrollElement,e)}:e.noop;this._setPosition=r.setPosition||function(e,n,i,s,o){if(t.options.horizontalScrolling){r.setLeft(e,n,i)}if(t.options.verticalScrolling){r.setTop(e,s,o)}}},_handleWindowLoadAndResize:function(){var n=this,r=e(t);if(n.options.responsive){r.bind("load."+this.name,function(){n.refresh()})}r.bind("resize."+this.name,function(){n._detectViewport();if(n.options.responsive){n.refresh()}})},refresh:function(n){var r=this,i=r._getScrollLeft(),s=r._getScrollTop();if(!n||!n.firstLoad){this._reset()}this._setScrollLeft(0);this._setScrollTop(0);this._setOffsets();this._findParticles();this._findBackgrounds();if(n&&n.firstLoad&&/WebKit/.test(navigator.userAgent)){e(t).load(function(){var e=r._getScrollLeft(),t=r._getScrollTop();r._setScrollLeft(e+1);r._setScrollTop(t+1);r._setScrollLeft(e);r._setScrollTop(t)})}this._setScrollLeft(i);this._setScrollTop(s)},_detectViewport:function(){var e=this.$viewportElement.offset(),t=e!==null&&e!==r;this.viewportWidth=this.$viewportElement.width();this.viewportHeight=this.$viewportElement.height();this.viewportOffsetTop=t?e.top:0;this.viewportOffsetLeft=t?e.left:0},_findParticles:function(){var t=this,n=this._getScrollLeft(),i=this._getScrollTop();if(this.particles!==r){for(var s=this.particles.length-1;s>=0;s--){this.particles[s].$element.data("stellar-elementIsActive",r)}}this.particles=[];if(!this.options.parallaxElements)return;this.$element.find("[data-stellar-ratio]").each(function(n){var i=e(this),s,o,u,a,f,l,c,h,p,d=0,v=0,m=0,g=0;if(!i.data("stellar-elementIsActive")){i.data("stellar-elementIsActive",this)}else if(i.data("stellar-elementIsActive")!==this){return}t.options.showElement(i);if(!i.data("stellar-startingLeft")){i.data("stellar-startingLeft",i.css("left"));i.data("stellar-startingTop",i.css("top"))}else{i.css("left",i.data("stellar-startingLeft"));i.css("top",i.data("stellar-startingTop"))}u=i.position().left;a=i.position().top;f=i.css("margin-left")==="auto"?0:parseInt(i.css("margin-left"),10);l=i.css("margin-top")==="auto"?0:parseInt(i.css("margin-top"),10);h=i.offset().left-f;p=i.offset().top-l;i.parents().each(function(){var t=e(this);if(t.data("stellar-offset-parent")===true){d=m;v=g;c=t;return false}else{m+=t.position().left;g+=t.position().top}});s=i.data("stellar-horizontal-offset")!==r?i.data("stellar-horizontal-offset"):c!==r&&c.data("stellar-horizontal-offset")!==r?c.data("stellar-horizontal-offset"):t.horizontalOffset;o=i.data("stellar-vertical-offset")!==r?i.data("stellar-vertical-offset"):c!==r&&c.data("stellar-vertical-offset")!==r?c.data("stellar-vertical-offset"):t.verticalOffset;t.particles.push({$element:i,$offsetParent:c,isFixed:i.css("position")==="fixed",horizontalOffset:s,verticalOffset:o,startingPositionLeft:u,startingPositionTop:a,startingOffsetLeft:h,startingOffsetTop:p,parentOffsetLeft:d,parentOffsetTop:v,stellarRatio:i.data("stellar-ratio")!==r?i.data("stellar-ratio"):1,width:i.outerWidth(true),height:i.outerHeight(true),isHidden:false})})},_findBackgrounds:function(){var t=this,n=this._getScrollLeft(),i=this._getScrollTop(),s;this.backgrounds=[];if(!this.options.parallaxBackgrounds)return;s=this.$element.find("[data-stellar-background-ratio]");if(this.$element.data("stellar-background-ratio")){s=s.add(this.$element)}s.each(function(){var s=e(this),o=h(s),u,a,f,l,p,d,v,m,g,y=0,b=0,w=0,E=0;if(!s.data("stellar-backgroundIsActive")){s.data("stellar-backgroundIsActive",this)}else if(s.data("stellar-backgroundIsActive")!==this){return}if(!s.data("stellar-backgroundStartingLeft")){s.data("stellar-backgroundStartingLeft",o[0]);s.data("stellar-backgroundStartingTop",o[1])}else{c(s,s.data("stellar-backgroundStartingLeft"),s.data("stellar-backgroundStartingTop"))}p=s.css("margin-left")==="auto"?0:parseInt(s.css("margin-left"),10);d=s.css("margin-top")==="auto"?0:parseInt(s.css("margin-top"),10);v=s.offset().left-p-n;m=s.offset().top-d-i;s.parents().each(function(){var t=e(this);if(t.data("stellar-offset-parent")===true){y=w;b=E;g=t;return false}else{w+=t.position().left;E+=t.position().top}});u=s.data("stellar-horizontal-offset")!==r?s.data("stellar-horizontal-offset"):g!==r&&g.data("stellar-horizontal-offset")!==r?g.data("stellar-horizontal-offset"):t.horizontalOffset;a=s.data("stellar-vertical-offset")!==r?s.data("stellar-vertical-offset"):g!==r&&g.data("stellar-vertical-offset")!==r?g.data("stellar-vertical-offset"):t.verticalOffset;t.backgrounds.push({$element:s,$offsetParent:g,isFixed:s.css("background-attachment")==="fixed",horizontalOffset:u,verticalOffset:a,startingValueLeft:o[0],startingValueTop:o[1],startingBackgroundPositionLeft:isNaN(parseInt(o[0],10))?0:parseInt(o[0],10),startingBackgroundPositionTop:isNaN(parseInt(o[1],10))?0:parseInt(o[1],10),startingPositionLeft:s.position().left,startingPositionTop:s.position().top,startingOffsetLeft:v,startingOffsetTop:m,parentOffsetLeft:y,parentOffsetTop:b,stellarRatio:s.data("stellar-background-ratio")===r?1:s.data("stellar-background-ratio")})})},_reset:function(){var e,t,n,r,i;for(i=this.particles.length-1;i>=0;i--){e=this.particles[i];t=e.$element.data("stellar-startingLeft");n=e.$element.data("stellar-startingTop");this._setPosition(e.$element,t,t,n,n);this.options.showElement(e.$element);e.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null)}for(i=this.backgrounds.length-1;i>=0;i--){r=this.backgrounds[i];r.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null);c(r.$element,r.startingValueLeft,r.startingValueTop)}},destroy:function(){this._reset();this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name);this._animationLoop=e.noop;e(t).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var n=this,r=e(t);r.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name);if(typeof this.options.horizontalOffset==="function"){this.horizontalOffset=this.options.horizontalOffset();r.bind("resize.horizontal-"+this.name,function(){n.horizontalOffset=n.options.horizontalOffset()})}else{this.horizontalOffset=this.options.horizontalOffset}if(typeof this.options.verticalOffset==="function"){this.verticalOffset=this.options.verticalOffset();r.bind("resize.vertical-"+this.name,function(){n.verticalOffset=n.options.verticalOffset()})}else{this.verticalOffset=this.options.verticalOffset}},_repositionElements:function(){var e=this._getScrollLeft(),t=this._getScrollTop(),n,r,i,s,o,u,a,f=true,l=true,h,p,d,v,m;if(this.currentScrollLeft===e&&this.currentScrollTop===t&&this.currentWidth===this.viewportWidth&&this.currentHeight===this.viewportHeight){return}else{this.currentScrollLeft=e;this.currentScrollTop=t;this.currentWidth=this.viewportWidth;this.currentHeight=this.viewportHeight}for(m=this.particles.length-1;m>=0;m--){i=this.particles[m];s=i.isFixed?1:0;if(this.options.horizontalScrolling){h=(e+i.horizontalOffset+this.viewportOffsetLeft+i.startingPositionLeft-i.startingOffsetLeft+i.parentOffsetLeft)*-(i.stellarRatio+s-1)+i.startingPositionLeft;d=h-i.startingPositionLeft+i.startingOffsetLeft}else{h=i.startingPositionLeft;d=i.startingOffsetLeft}if(this.options.verticalScrolling){p=(t+i.verticalOffset+this.viewportOffsetTop+i.startingPositionTop-i.startingOffsetTop+i.parentOffsetTop)*-(i.stellarRatio+s-1)+i.startingPositionTop;v=p-i.startingPositionTop+i.startingOffsetTop}else{p=i.startingPositionTop;v=i.startingOffsetTop}if(this.options.hideDistantElements){l=!this.options.horizontalScrolling||d+i.width>(i.isFixed?0:e)&&d<(i.isFixed?0:e)+this.viewportWidth+this.viewportOffsetLeft;f=!this.options.verticalScrolling||v+i.height>(i.isFixed?0:t)&&v<(i.isFixed?0:t)+this.viewportHeight+this.viewportOffsetTop}if(l&&f){if(i.isHidden){this.options.showElement(i.$element);i.isHidden=false}this._setPosition(i.$element,h,i.startingPositionLeft,p,i.startingPositionTop)}else{if(!i.isHidden){this.options.hideElement(i.$element);i.isHidden=true}}}for(m=this.backgrounds.length-1;m>=0;m--){o=this.backgrounds[m];s=o.isFixed?0:1;u=this.options.horizontalScrolling?(e+o.horizontalOffset-this.viewportOffsetLeft-o.startingOffsetLeft+o.parentOffsetLeft-o.startingBackgroundPositionLeft)*(s-o.stellarRatio)+"px":o.startingValueLeft;a=this.options.verticalScrolling?(t+o.verticalOffset-this.viewportOffsetTop-o.startingOffsetTop+o.parentOffsetTop-o.startingBackgroundPositionTop)*(s-o.stellarRatio)+"px":o.startingValueTop;c(o.$element,u,a)}},_handleScrollEvent:function(){var e=this,t=false;var n=function(){e._repositionElements();t=false};var r=function(){if(!t){p(n);t=true}};this.$scrollElement.bind("scroll."+this.name,r);r()},_startAnimationLoop:function(){var e=this;this._animationLoop=function(){p(e._animationLoop);e._repositionElements()};this._animationLoop()}};e.fn[i]=function(t){var n=arguments;if(t===r||typeof t==="object"){return this.each(function(){if(!e.data(this,"plugin_"+i)){e.data(this,"plugin_"+i,new d(this,t))}})}else if(typeof t==="string"&&t[0]!=="_"&&t!=="init"){return this.each(function(){var r=e.data(this,"plugin_"+i);if(r instanceof d&&typeof r[t]==="function"){r[t].apply(r,Array.prototype.slice.call(n,1))}if(t==="destroy"){e.data(this,"plugin_"+i,null)}})}};e[i]=function(n){var r=e(t);return r.stellar.apply(r,Array.prototype.slice.call(arguments,0))};e[i].scrollProperty=o;e[i].positionProperty=u;t.Stellar=d})(jQuery,this,document); ;(function(d){d.flexslider=function(j,l){var a=d(j),c=d.extend({},d.flexslider.defaults,l),e=c.namespace,q="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,u=q?"touchend":"click",m="vertical"===c.direction,n=c.reverse,h=0g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()}, function(){!a.manualPause&&!a.manualPlay&&a.play()}),0');if(1':""+b+"",a.controlNavScaffold.append("
    • "+g+"
    • "),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNavScaffold.delegate("a", "click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"), a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1"+a.count+"")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1
    • '+c.prevText+'
    • '+c.nextText+"
    ");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(u,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)}); q&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('
    ');a.controlsContainer? (a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(u,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});q&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+ "play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){k=m?d-b.touches[0].pageY:d-b.touches[0].pageX;q=m?Math.abs(k)k||a.currentSlide===a.last&&0Number(new Date)-l&&50r/2)?a.flexAnimate(m,c.pauseOnAction):s||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}j.removeEventListener("touchend",g,!1);f=k=e=d=null}var d,e,f,r,k,l,q=!1;j.addEventListener("touchstart",function(k){a.animating?k.preventDefault():1===k.touches.length&&(a.pause(),r=m?a.h:a.w,l=Number(new Date),f=h&&n&&a.animatingTo===a.last?0:h&&n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)*r:(a.currentSlide+a.cloneOffset)*r,d=m?k.touches[0].pageY:k.touches[0].pageX,e=m?k.touches[0].pageX:k.touches[0].pageY,j.addEventListener("touchmove",b,!1),j.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),s?f.smoothHeight():h?(a.slides.width(a.computedW), a.update(a.pagingCount),a.setProps()):m?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!m||s){var c=s?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&& !g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,p,j,l){t&&1===a.pagingCount&&(a.direction=a.currentItema.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo, b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?n?(a.count+a.cloneOffset)*r:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?n?0:(a.count+1)*r:n?(a.count-1-b+a.cloneOffset)*r:(b+a.cloneOffset)*r;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend", function(){a.wrapup(r)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(r)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!s&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause= function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=t?a.pagingCount-1:a.last;return g?!0:t&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:t&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&& !t?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:n&&a.animatingTo===a.last?0:n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:f;switch(g){case "setTotal":return n?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return n?b:a.count*b;case "jumpStart":return n?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=m?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(s)a.slides.css({width:"100%", "float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(q?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,p;"init"===b&&(a.viewport=d('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset= 0,n&&(p=d.makeArray(a.slides).reverse(),a.slides=d(p),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=n?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;m&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"), setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(), d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxWa.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0a.w?(a.itemW+2*d)*a.count-a.w- d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1), f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;m&&n?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():m&&n?a.slides.eq(a.last).remove(): a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"",nextText:"", keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(j){void 0===j&&(j={});if("object"===typeof j)return this.each(function(){var a=d(this),c=a.find(j.selector?j.selector:".slides > li");1===c.length?(c.fadeIn(400), j.start&&j.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,j)});var l=d(this).data("flexslider");switch(j){case "play":l.play();break;case "pause":l.pause();break;case "next":l.flexAnimate(l.getTarget("next"),!0);break;case "prev":case "previous":l.flexAnimate(l.getTarget("prev"),!0);break;default:"number"===typeof j&&l.flexAnimate(j,!0)}}})(jQuery); ;(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
    ').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery); function isScrolledIntoView(e){var t="#"+e;var n=$(window).scrollTop();var r=n+$(window).height();if($(t).length>0){var i=$(t).offset().top;var s=i+$(t).height()}return s>=n&&i<=r&&s<=r&&i>=n}function sliding_horizontal_graph(e,t){$("#"+e+" li span").each(function(n){var r=n+1;var i=$("#"+e+" li:nth-child("+r+") span");var s=i.attr("title");i.animate({width:s+"%"},t)})}function graph_init(e,t){$(window).scroll(function(){if(isScrolledIntoView(e)){sliding_horizontal_graph(e,t)}else{}});if(isScrolledIntoView(e)){sliding_horizontal_graph(e,t)}}function htmlDecode(e){var t=$("
    ").html(e).text();return t}function playpause(e){if(e.hasClass("playing")){$("#slider_container").cameraResume();e.removeClass("playing").addClass("paused")}else{$("#slider_container").cameraPause();e.removeClass("paused").addClass("playing")}} ;(function(e){jQuery.browser={};jQuery.browser.mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.opera=/opera/.test(navigator.userAgent.toLowerCase());jQuery.browser.msie=/msie/.test(navigator.userAgent.toLowerCase());if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e){var t=this.length>>>0;var n=Number(arguments[1])||0;n=n<0?Math.ceil(n):Math.floor(n);if(n<0)n+=t;for(;n0){h();m()}else{v()}};var h=function(){i=e("
    ").appendTo("body").css({display:"none",width:0,height:0,overflow:"hidden"});for(var n=0;t.length>n;n++){e.ajax({url:t[n],type:"HEAD",complete:function(e){if(!r){a++;p(this["url"])}}})}};var p=function(t){var n=e("").attr("src",t).bind("load error",function(){d()}).appendTo(i)};var d=function(){n++;var t=n/a*100;e(o).stop().animate({width:t+"%",minWidth:t+"%"},{duration:200});if(l.percentage==true){e(u).text(Math.ceil(t)+"%");e("#des_website_load .percentage").text(Math.ceil(t)+"%")}if(n==a){v()}};var v=function(){e(i).remove();l.onLoadComplete();r=true};var m=function(){s=e("
    ").appendTo("body");if(l.percentage==true){u=e("
    ").text("0%").css({height:"40px",width:"300px",position:"absolute",top:"50%",marginTop:"-"+(59+l.barHeight)+"px",textAlign:"center"}).appendTo(s);e("#des_website_load .percentage").css({height:"40px",width:"300px",position:"absolute",top:"50%",marginTop:59+l.barHeight+"px",textAlign:"center"})}if(!t.length){v()}};var g=function(n){var r="";if(e(n).css("background-image")!="none"){var r=e(n).css("background-image")}else if(typeof e(n).attr("src")!="undefined"&&n.nodeName.toLowerCase()=="img"){var r=e(n).attr("src")}if(r.indexOf("gradient")==-1){r=r.replace(/url\(\"/g,"");r=r.replace(/url\(/g,"");r=r.replace(/\"\)/g,"");r=r.replace(/\)/g,"");var i=r.split(", ");for(var s=0;s0&&t.indexOf(i[s])==-1&&!i[s].match(/^(data:)/i)){var o="";if(e.browser.msie&&e.browser.version<9){o="?"+Math.floor(Math.random()*3e3)}t.push(i[s]+o)}}}};e.fn.queryLoader2=function(t){if(t){e.extend(l,t)}this.each(function(){g(this);if(l.deepSearch==true){e(this).find("*:not(script)").each(function(){g(this)})}});c();return this};var y={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(e){for(var t=0;t/g,"^>")}function u(e,t){return e.replace(r,function(e){var n=/^[a-z]+:/i.test(e)?e:"http://"+e;var r=e;for(var i=0;i'+o(r)+""})}function a(e){return Date.parse(e.replace(/^([a-z]{3})([a-z]{3} \d\d?)(.*)(\d{4})$/i,"$1,$2$4$3"))}function f(e){var t=arguments.length>1?arguments[1]:new Date;var n=parseInt((t.getTime()-e)/1e3,10);var r="";if(n<1){r="just now"}else if(n<60){r=n+" seconds ago"}else if(n<120){r="about a minute ago"}else if(n<45*60){r="about "+parseInt(n/60,10).toString()+" minutes ago"}else if(n<2*60*60){r="about an hour ago"}else if(n<24*60*60){r="about "+parseInt(n/3600,10).toString()+" hours ago"}else if(n<48*60*60){r="about a day ago"}else{r="about "+parseInt(n/86400,10).toString()+" days ago"}return r}function l(e){if(e.match(/^(@([A-Za-z0-9-_]+)) .*/i)){return n.auto_join_text_reply}else if(e.match(r)){return n.auto_join_text_url}else if(e.match(/^((\w+ed)|just) .*/im)){return n.auto_join_text_ed}else if(e.match(/^(\w*ing) .*/i)){return n.auto_join_text_ing}else{return n.auto_join_text_default}}function c(){var t=n.modpath,r=n.fetch===null?n.count:n.fetch,i={include_entities:1};if(n.list){return{host:n.twitter_api_url,url:"/1.1/lists/statuses.json",parameters:e.extend({},i,{list_id:n.list_id,slug:n.list,owner_screen_name:n.username,page:n.page,count:r,include_rts:n.retweets?1:0})}}else if(n.favorites){return{host:n.twitter_api_url,url:"/1.1/favorites/list.json",parameters:e.extend({},i,{list_id:n.list_id,screen_name:n.username,page:n.page,count:r})}}else if(n.query===null&&n.username.length===1){return{host:n.twitter_api_url,url:"/1.1/statuses/user_timeline.json",parameters:e.extend({},i,{screen_name:n.username,page:n.page,count:r,include_rts:n.retweets?1:0})}}else{var s=n.query||"from:"+n.username.join(" OR from:");return{host:n.twitter_search_url,url:"/search.json",parameters:e.extend({},i,{page:n.page,q:s,rpp:r})}}}function h(e,t){if(t){return"user"in e?e.user.profile_image_url_https:h(e,false).replace(/^http:\/\/[a-z0-9]{1,3}\.twimg\.com\//,"https://s3.amazonaws.com/twitter_production/")}else{return e.profile_image_url||e.user.profile_image_url}}function p(t){var r={};r.item=t;r.source=t.source;r.name=t.from_user_name||t.user.name;r.screen_name=t.from_user||t.user.screen_name;r.avatar_size=n.avatar_size;r.avatar_url=h(t,document.location.protocol==="https:");r.retweet=typeof t.retweeted_status!="undefined";r.tweet_time=a(t.created_at);r.join_text=n.join_text=="auto"?l(t.text):n.join_text;r.tweet_id=t.id_str;r.twitter_base="http://"+n.twitter_url+"/";r.user_url=r.twitter_base+r.screen_name;r.tweet_url=r.user_url+"/status/"+r.tweet_id;r.reply_url=r.twitter_base+"intent/tweet?in_reply_to="+r.tweet_id;r.retweet_url=r.twitter_base+"intent/retweet?tweet_id="+r.tweet_id;r.favorite_url=r.twitter_base+"intent/favorite?tweet_id="+r.tweet_id;r.retweeted_screen_name=r.retweet&&t.retweeted_status.user.screen_name;r.tweet_relative_time=f(r.tweet_time);r.entities=t.entities?(t.entities.urls||[]).concat(t.entities.media||[]):[];r.tweet_raw_text=r.retweet?"RT @"+r.retweeted_screen_name+" "+t.retweeted_status.text:t.text;r.tweet_text=e([u(r.tweet_raw_text,r.entities)]).linkUser().linkHash()[0];r.tweet_text_fancy=e([r.tweet_text]).makeHeart()[0];r.user=i('{screen_name}',r);r.join=n.join_text?i(' {join_text} ',r):" ";r.avatar=r.avatar_size?i('{screen_name}\'s avatar',r):"";r.time=i('{tweet_relative_time}',r);r.text=i('{tweet_text_fancy}',r);r.reply_action=i('reply',r);r.retweet_action=i('retweet',r);r.favorite_action=i('favorite',r);return r}var n=e.extend({modpath:"./twitter/",username:null,list_id:null,list:null,favorites:false,query:null,avatar_size:null,count:3,fetch:null,page:1,retweets:true,intro_text:null,outro_text:null,join_text:null,auto_join_text_default:"i said,",auto_join_text_ed:"i",auto_join_text_ing:"i am",auto_join_text_reply:"i replied to",auto_join_text_url:"i was looking at",loading_text:null,refresh_interval:null,twitter_url:"twitter.com",twitter_api_url:"api.twitter.com",twitter_search_url:"search.twitter.com",template:"{avatar}{time}{join}{text}",comparator:function(e,t){return t["tweet_time"]-e["tweet_time"]},filter:function(e){return true}},t);var r=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;e.extend({tweet:{t:i}});e.fn.extend({linkUser:s(/(^|[\W])@(\w+)/gi,'$1@$2'),linkHash:s(/(?:^|)[\#]+([\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0600-\u06ff]+)/gi,' #$1'),makeHeart:s(/(<)+[3]/gi,"")});return this.each(function(t,r){var s=e('
      ');var o='

      '+n.intro_text+"

      ";var u='

      '+n.outro_text+"

      ";var a=e('

      '+n.loading_text+"

      ");if(n.username&&typeof n.username=="string"){n.username=[n.username]}e(r).unbind("tweet:load").bind("tweet:load",function(){if(n.loading_text)e(r).empty().append(a);e.ajax({dataType:"json",type:"post",async:false,url:n.modpath||"/twitter/",data:{request:c()},success:function(t,a){if(t.message){console.log(t.message)}var f=t.response;e(r).empty().append(s);if(n.intro_text)s.before(o);s.empty();if(f.statuses!==undefined){resp=f.statuses}else if(f.results!==undefined){resp=f.results}else{resp=f}var l=e.map(resp,p);l=e.grep(l,n.filter).sort(n.comparator).slice(0,n.count);s.append(e.map(l,function(e){return"
    • "+i(n.template,e)+"
    • "}).join("")).children("li:first").addClass("tweet_first").end().children("li:odd").addClass("tweet_even").end().children("li:even").addClass("tweet_odd");if(n.outro_text)s.after(u);e(r).trigger("loaded").trigger(l?"empty":"full");if(n.refresh_interval){window.setTimeout(function(){e(r).trigger("tweet:load")},1e3*n.refresh_interval)}}})}).trigger("tweet:load")})}}); var mejs=mejs||{};mejs.version="2.9.1";mejs.meIndex=0;mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo"]}]}; mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='x';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script"),j=f.length,h=a.length;b -1){d=g.substring(0,g.indexOf(e));break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,g=Math.floor(a/60)%60,f=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(g<10?"0"+g:g)+":"+(f<10?"0"+f:f)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;a=a.split(":");b=parseInt(a[0], 10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")if(mejs.MediaFeatures.isIE){b.style.display="none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}}; mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],g;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&& !(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)h.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")){if(!d){f=document.createElement(h.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";h.htmlMediaElement=a=f}for(f= 0;f0)h.url=g[0].url;return h},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.substring(a.lastIndexOf(".")+1);return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){var b= a;mejs.$.each({mp4:["mp4","m4v"],ogg:["ogg","ogv","oga"],webm:["webm","webmv","webma"]},function(c,d){if(d.indexOf(a)>-1)b=c});return b},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(g){}e.innerHTML=c!==""?'':'Download File';d.parentNode.insertBefore(e,d); d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,g){c=a.htmlMediaElement;var f=1,j=1,h="me_"+a.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(h,a.method,a.url),k=document.createElement("div"),m;l.tagName=c.tagName;for(m=0;m0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);j=mejs.Utility.encodeUrl(j)}else if(b.enablePluginDebug){f=320;j=240}l.success=b.success;mejs.MediaPluginBridge.registerPluginElement(h,l,c);k.className="me-plugin";k.id=h+"_container";a.isVideo?c.parentNode.insertBefore(k, c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+h,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"height="+j];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");g&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML= '';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div"); k.appendChild(a);a.outerHTML=''}else k.innerHTML= '';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:l,pluginId:h,videoId:b, height:j,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":l.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML=''}c.style.display="none";return l},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}}; mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="http://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId, {height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused; c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]= a;var b,c="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML= ''},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e, c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b, c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender; (function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,iPadUseNativeControls:false, iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration> 0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!="undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]}; mejs.mepIndex=0;mejs.players=[];mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);mejs.players.push(this);this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false, controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(e,g){a.meReady(e,g)},error:function(e){a.handleError(e)}}),d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls","controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load(); a.media.play()}}else if(!(b.isAndroid&&a.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.id="mep_"+mejs.mepIndex++;a.container=f('
      ').addClass(a.$media[0].className).insertBefore(a.$media);a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ": "")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";d=b.substring(0,1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")> -1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+d+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):a.options["default"+d+"Height"];a.setPlayerSize(a.width,a.height); c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c)},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true});b.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility", "visible").css("display","block");b.controlsAreVisible=true}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(b.controlsAreVisible)if(a){b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible=false});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display", "block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false}},controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer(); this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a,b){var c=this,d=mejs.MediaFeatures,e=b.getAttribute("autoplay");e=!(typeof e=="undefined"||e===null||e==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(d.isAndroid&&c.options.AndroidUseNativeControls)&&!(d.isiPad&&c.options.iPadUseNativeControls)&&!(d.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers, c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features){d=c.options.features[g];if(c["build"+d])try{c["build"+d](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)}); else{(c.media.pluginType=="native"?c.$media:f(c.media.pluginElement)).click(function(){a.paused?a.play():a.pause()});c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&& !c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}e&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(h){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(h.target.videoHeight)){c.setPlayerSize(h.target.videoWidth,h.target.videoHeight);c.setControlsSize();c.media.setVideoSize(h.target.videoWidth,h.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var h=0,o=mejs.players.length;h< o;h++){var n=mejs.players[h];n.id!=c.id&&c.options.pauseOtherPlayers&&!n.paused&&!n.ended&&n.pause();n.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){try{c.media.setCurrentTime(0)}catch(h){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&& c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);f(window).resize(function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(e&&a.pluginType=="native"){a.load(); a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0){var c=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,d=this.media.videoHeight&& this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,e=this.container.parent().width();c=parseInt(e*d/c,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}if(c!=0){this.container.width(e).height(c);this.$media.width("100%").height("100%");this.container.find("object, embed, iframe").width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(e,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height); this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var e=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){e.each(function(){if(f(this).css("position")!="absolute")a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)- c.width())}c.width(b);d.width(b-(d.outerWidth(true)-d.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,d){var e=f('
      ').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){if(a.isVideo){var e=f('
      ').hide().appendTo(c),g=f('
      ').hide().appendTo(c),k=f('
      ').appendTo(c).click(function(){d.paused?d.play(): d.pause()});d.addEventListener("play",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("playing",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("seeking",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("seeked",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||k.show()}, false);d.addEventListener("waiting",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("error",function(){e.hide();b.find(".mejs-time-buffering").hide();g.show();g.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){f(document).keydown(function(e){if(a.hasFocus&& a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g
    ').appendTo(b).click(function(g){g.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false); d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,d){f('
    ').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left","0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0)); b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,d){f('
    00:00
    ').appendTo(b);b.find(".mejs-time-buffering").hide();var e= b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var g=b.find(".mejs-time-current"),k=b.find(".mejs-time-handle"),h=b.find(".mejs-time-float"),o=b.find(".mejs-time-float-current"),n=function(l){l=l.pageX;var q=e.offset(),i=e.outerWidth(),j=0;j=0;var m=l-q.left;if(l>q.left&&l<=i+q.left&&d.duration){j=(l-q.left)/i;j=j<=0.02?0:j*d.duration;p&&d.setCurrentTime(j);if(!mejs.MediaFeatures.hasTouch){h.css("left",m);o.html(mejs.Utility.secondsToTimeCode(j));h.show()}}},p=false;e.bind("mousedown",function(l){if(l.which===1){p=true;n(l);f(document).bind("mousemove.dur",function(q){n(q)}).bind("mouseup.dur",function(){p=false;h.hide();f(document).unbind(".dur")});return false}}).bind("mouseenter",function(){f(document).bind("mousemove.dur",function(l){n(l)});mejs.MediaFeatures.hasTouch||h.show()}).bind("mouseleave",function(){if(!p){f(document).unbind(".dur");h.hide()}});d.addEventListener("progress",function(l){a.setProgressRail(l);a.setCurrentRail(l)},false);d.addEventListener("timeupdate",function(l){a.setProgressRail(l); a.setCurrentRail(l)},false);this.loaded=c;this.total=e;this.current=g;this.handle=k},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()* c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,b=a-this.handle.outerWidth(true)/2;this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,d){f('
    '+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
    ").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a, b,c,d){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); f('
    '+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
    ").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",function(){a.updateDuration()}, false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=this.isVideo?this.options.videoVolume:this.options.audioVolume,g=e=="horizontal"?f('
    ').appendTo(b):f('
    ').appendTo(b), k=this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),h=this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),o=this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),n=this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),p=function(j,m){if(!k.is(":visible")&&typeof m!="undefined"){k.show();p(j,true);k.hide()}else{j=Math.max(0,j);j=Math.min(j,1);j==0?g.removeClass("mejs-mute").addClass("mejs-unmute"):g.removeClass("mejs-unmute").addClass("mejs-mute"); if(e=="vertical"){var r=h.height(),s=h.position(),t=r-r*j;n.css("top",s.top+t-n.height()/2);o.height(r-t);o.css("top",s.top+t)}else{r=h.width();s=h.position();r=r*j;n.css("left",s.left+r-n.width()/2);o.width(r)}}},l=function(j){var m=null,r=h.offset();if(e=="vertical"){m=h.height();parseInt(h.css("top").replace(/px/,""),10);m=(m-(j.pageY-r.top))/m;if(r.top==0||r.left==0)return}else{m=h.width();m=(j.pageX-r.left)/m}m=Math.max(0,m);m=Math.min(m,1);p(m);m==0?d.setMuted(true):d.setMuted(false);d.setVolume(m)}, q=false,i=false;g.hover(function(){k.show();i=true},function(){i=false;!q&&e=="vertical"&&k.hide()});k.bind("mouseover",function(){i=true}).bind("mousedown",function(j){l(j);f(document).bind("mousemove.vol",function(m){l(m)}).bind("mouseup.vol",function(){q=false;f(document).unbind(".vol");!i&&e=="vertical"&&k.hide()});q=true;return false});g.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!q)if(d.muted){p(0);g.removeClass("mejs-mute").addClass("mejs-unmute")}else{p(d.volume); g.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){p(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:"Fullscreen"});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,b,c,d){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=null;c=mejs.MediaFeatures.hasMozNativeFullScreen?f(document):a.container;c.bind(mejs.MediaFeatures.fullScreenEventName, function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=false;a.exitFullScreen()}})}var e=this,g=f('
    ').appendTo(b);if(e.media.pluginType==="native"||!e.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()|| a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var i=document.createElement("x"),j=document.documentElement,m=window.getComputedStyle;if(!("pointerEvents"in i.style))return false;i.style.pointerEvents="auto";i.style.pointerEvents="x";j.appendChild(i);m=m&&m(i,"").pointerEvents==="auto";j.removeChild(i);return!!m}()&&!mejs.MediaFeatures.isOpera){var h=false,o=function(){if(h){n.hide();p.hide();l.hide();g.css("pointer-events","");e.controls.css("pointer-events", "");h=false}},n=f('
    ').appendTo(e.container).mouseover(o),p=f('
    ').appendTo(e.container).mouseover(o),l=f('
    ').appendTo(e.container).mouseover(o),q=function(){var i={position:"absolute",top:0,left:0};n.css(i);p.css(i);l.css(i);n.width(e.container.width()).height(e.container.height()-e.controls.height());i=g.offset().left-e.container.offset().left;fullScreenBtnWidth=g.outerWidth(true);p.width(i).height(e.controls.height()).css({top:e.container.height()- e.controls.height()});l.width(e.container.width()-i-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:i+fullScreenBtnWidth})};f(document).resize(function(){q()});g.mouseover(function(){if(!e.isFullScreen){var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,false);g.css("pointer-events","none");e.controls.css("pointer-events","none");n.show();l.show();p.show();q();h=true}});d.addEventListener("fullscreenchange", function(){o()})}else g.mouseover(function(){if(k!==null){clearTimeout(k);delete k}var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;f(document).bind("keydown",function(i){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||e.isFullScreen)&&i.keyCode==27)a.exitFullScreen()})}},enterFullScreen:function(){var a= this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==screen.width? a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,"top=0,left=0,width="+ screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find("object, embed, iframe").width("100%").height("100%");a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%"); a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();document.documentElement.style.overflow=docStyleOverflow;this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight); if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFullScreen=false}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles"});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.isVideo)if(a.tracks.length!=0){var e;a.chapters=f('
    ').prependTo(c).hide();a.captions=f('
    ').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text"); a.captionsButton=f('
    ').appendTo(b).hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility", "hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e0&&b.drawChapters(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]|| a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('
  • "));this.adjustLanguageBox(); this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a=b.entries.times[a].start&& this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},displayChapters:function(){var a;for(a=0;a100||c==a.entries.times.length-1&&d+e<100)d=100-e;b.chapters.append(f('
    '+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+ "
    "));e+=d}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German", el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/, pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,split2:function(a,b){return a.split(b)},parse:function(a){var b=0;a=this.split2(a,/\r?\n/);for(var c={text:[],times:[]},d,e;b
    ').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled= true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,b){for(var c=this,d="",e=c.options.contextMenuItems,g=0,k=e.length;g< k;g++)if(e[g].isSeparator)d+='
    ';else{var h=e[g].render(c);if(h!=null)d+='
    '+h+"
    "}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var o=f(this),n=parseInt(o.data("itemindex"),10),p=c.options.contextMenuItems[n];typeof p.show!="undefined"&&p.show(o,c);o.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); !function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",d=document.createElement("div");d.innerHTML='

    x

    ",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));a=a.not("object object"),a=a.not(r),a.each(function(e){var i=t(this);if(!(i.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length)){i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16));var a="object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height(),d=isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10),o=a/d;if(!i.attr("id")){var h="fitvid"+e;i.attr("id",h)}i.wrap('
    ').parent(".fluid-width-video-wrapper").css("padding-top",100*o+"%"),i.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto); if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); ;(function(e, t, n){ "use strict"; var r=t.Modernizr, i=e("body"); e.DLMenu=function(t, n){ this.$el=e(n); this._init(t) }; e.DLMenu.defaults={ animationClasses: { classin: "dl-animate-in-1", classout: "dl-animate-out-1" }, onLevelClick: function(e, t){ return false }, onLinkClick: function(e, t){ return false }}; e.DLMenu.prototype={ _init: function(t){ this.options=e.extend(true, {}, e.DLMenu.defaults, t); this._config(); var n={ WebkitAnimation: "webkitAnimationEnd", OAnimation: "oAnimationEnd", msAnimation: "MSAnimationEnd", animation: "animationend" }, i={ WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", msTransition: "MSTransitionEnd", transition: "transitionend" }; this.animEndEventName=n[r.prefixed("animation")] + ".dlmenu"; this.transEndEventName=i[r.prefixed("transition")] + ".dlmenu", this.supportAnimations=r.cssanimations, this.supportTransitions=r.csstransitions; this._initEvents() }, _config: function(){ this.open=false; this.$trigger=this.$el.find(".dl-trigger"); this.$menu=this.$el.children("ul.dl-menu"); this.$menuitems=this.$menu.find("li:not(.dl-back)"); this.$el.find("ul.dl-submenu-smart").prepend('
  • back
  • '); this.$back=this.$menu.find("li.dl-back") }, _initEvents: function(){ var n=this; this.$trigger.on("click.dlmenu", function(){ if(n.open){ n._closeMenu() }else{ n._openMenu(); t.pagePositionY=e(t).scrollTop() } return false }); this.$menuitems.on("click.dlmenu", function(r){ r.stopPropagation(); var i=e(this), s=i.children("ul.dl-submenu-smart"); if(s.length > 0){ var o=s.clone().css({"opacity": 0, "top": "100%", "margin-top": s.css('margin-top')}).insertAfter(n.$menu), u=function(){ n.$menu.off(n.animEndEventName).removeClass(n.options.animationClasses.classout).addClass("dl-subview"); i.addClass("dl-subviewopen").parents(".dl-subviewopen:first").removeClass("dl-subviewopen").addClass("dl-subview"); t.maxTransform=0; t.startPoint=e(t).scrollTop(); t.maxTransform=e(".dl-subviewopen").height() - (e(t).height() - (e(".dl-subviewopen").offset().top - e(t).scrollTop())) + 25; o.remove() }; setTimeout(function(){ o.addClass(n.options.animationClasses.classin); n.$menu.addClass(n.options.animationClasses.classout); if(n.supportAnimations){ n.$menu.on(n.animEndEventName, u) }else{ u.call() } n.options.onLevelClick(i, i.children("a:first").text()) }); return false }else{ n.options.onLinkClick(i, r) }}); this.$back.on("click.dlmenu", function(r){ var i=e(this), s=i.parents("ul.dl-submenu-smart:first"), o=s.parent(), u=s.clone().css('top','100%').css('margin-top',s.css('margin-top')).insertAfter(n.$menu); var a=function(){ n.$menu.off(n.animEndEventName).removeClass(n.options.animationClasses.classin); u.remove() }; setTimeout(function(){ u.addClass(n.options.animationClasses.classout); n.$menu.addClass(n.options.animationClasses.classin); if(n.supportAnimations){ n.$menu.on(n.animEndEventName, a) }else{ a.call() } o.removeClass("dl-subviewopen"); var r=i.parents(".dl-subview:first"); if(r.is("li")){ r.addClass("dl-subviewopen") } r.removeClass("dl-subview"); t.maxTransform=0; t.startPoint=e(t).scrollTop(); t.maxTransform=r.height() - (e(t).height() - (r.offset().top - e(t).scrollTop())) + 25 }); return false }) }, closeMenu: function(){ if(this.open){ this._closeMenu() }}, _closeMenu: function(){ var t=this, n=function(){ t.$menu.off(t.transEndEventName); t._resetMenu() }; this.$menu.removeClass("dl-menuopen"); this.$menu.addClass("dl-menu-toggle"); this.$trigger.removeClass("dl-active"); if(this.supportTransitions){ this.$menu.on(this.transEndEventName, n) }else{ n.call() } this.open=false }, openMenu: function(){ if(!this.open){ this._openMenu() }}, _openMenu: function(){ var n=this; i.off("click").on("click.dlmenu", function(){ n._closeMenu() }); this.$menu.addClass("dl-menuopen dl-menu-toggle").on(this.transEndEventName, function(){ t.maxTransform=0; if(e(".dl-menuopen").length){ t.startPoint=e(t).scrollTop(); t.maxTransform=e(".dl-menuopen").height() - (e(t).height() - (e(".dl-menuopen").offset().top - e(t).scrollTop())) + 25 } e(this).removeClass("dl-menu-toggle") }); this.$trigger.addClass("dl-active"); this.open=true }, _resetMenu: function(){ this.$menu.removeClass("dl-subview"); this.$menuitems.removeClass("dl-subview dl-subviewopen") }}; var s=function(e){ if(t.console){ t.console.error(e) }}; e.fn.dlmenu=function(t){ if(typeof t==="string"){ var n=Array.prototype.slice.call(arguments, 1); this.each(function(){ var r=e.data(this, "dlmenu"); if(!r){ s("cannot call methods on dlmenu prior to initialization; " + "attempted to call method '" + t + "'"); return } if(!e.isFunction(r[t])||t.charAt(0)==="_"){ s("no such method '" + t + "' for dlmenu instance"); return } r[t].apply(r, n) }) }else{ this.each(function(){ var n=e.data(this, "dlmenu"); if(n){ n._init() }else{ n=e.data(this, "dlmenu", new e.DLMenu(t, this)) }}) } return this }})(jQuery, window); ;(function($){$.fn.tytabs=function(options){var defaults={prefixtabs:"tab",prefixcontent:"content",classcontent:"tabscontent",tabinit:"1",catchget:"tab",fadespeed:"normal"},opts=$.extend({},defaults,options);return this.each(function(){var obj=$(this);opts.classcontent="."+opts.classcontent;opts.prefixcontent="#"+opts.prefixcontent;function showTab(id){$(opts.classcontent,obj).stop(true,true);var contentvisible=$(opts.classcontent+":visible",obj);if(contentvisible.length>0){contentvisible.fadeOut(opts.fadespeed,function(){fadeincontent(id)})}else{fadeincontent(id)}$("#"+opts.prefixtabs+opts.tabinit).removeAttr("class");$("#"+opts.prefixtabs+id).attr("class","current");opts.tabinit=id}function fadeincontent(id){$(opts.prefixcontent+id,obj).fadeIn(opts.fadespeed)}$("ul.tabs li",obj).click(function(){showTab($(this).attr("id").replace(opts.prefixtabs,""));return false});var tab=getvars(opts.catchget);showTab(((tab&&$(opts.prefixcontent+tab).length==1)?tab:($(opts.prefixcontent+opts.tabinit).length==1)?opts.tabinit:"1"))})};function getvars(q,s){s=(s)?s:window.location.search;var re=new RegExp("&"+q+"=([^&]*)","i");return(s=s.replace(/^\?/,"&").match(re))?s=s[1]:s=""}})(jQuery); var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(e){for(var t=0;t');$(this).parent('.'+m.container+'').css({'position':'relative'});$(this).parent('.'+m.container+'').append('');$(this).next('.canv').css({'position':'absolute','top':'0','left':'0','z-index':10});if(m.overlay=="top"){$(this).css({'z-index':-1})}else{$(this).css({'z-index':1});$(this).next('.canv').css({'display':'none'})}var a=$(this).width();var b=$(this).height();$(this).next('.canv').attr({"width":a,"height":b});var c=$(this).next('.canv').get(0);var d=c.getContext("2d");var f=$(this).get(0);d.drawImage(f,0,0);if(m.effect!='noise'&&'blur'){try{try{var g=d.getImageData(0,0,a,b)}catch(e){netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");var g=d.getImageData(0,0,a,b)}}catch(e){throw new Error("unable to access image data: "+e)}var h=g.data}switch(m.effect){case"invert":for(var i=0,n=h.length;i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(A 3c.3q!=="9"){3c.3q=9(e){9 t(){}t.5S=e;p 5R t}}(9(e,t,n){h r={1N:9(t,n){h r=c;r.$k=e(n);r.6=e.4M({},e.37.2B.6,r.$k.v(),t);r.2A=t;r.4L()},4L:9(){9 r(e){h n,r="";7(A t.6.33==="9"){t.6.33.R(c,[e])}l{1A(n 38 e.d){7(e.d.5M(n)){r+=e.d[n].1K}}t.$k.2y(r)}t.3t()}h t=c,n;7(A t.6.2H==="9"){t.6.2H.R(c,[t.$k])}7(A t.6.2O==="2Y"){n=t.6.2O;e.5K(n,r)}l{t.3t()}},3t:9(){h e=c;e.$k.v("d-4I",e.$k.2x("2w")).v("d-4F",e.$k.2x("H"));e.$k.z({2u:0});e.2t=e.6.q;e.4E();e.5v=0;e.1X=14;e.23()},23:9(){h e=c;7(e.$k.25().N===0){p b}e.1M();e.4C();e.$S=e.$k.25();e.E=e.$S.N;e.4B();e.$G=e.$k.17(".d-1K");e.$K=e.$k.17(".d-1p");e.3u="U";e.13=0;e.26=[0];e.m=0;e.4A();e.4z()},4z:9(){h e=c;e.2V();e.2W();e.4t();e.30();e.4r();e.4q();e.2p();e.4o();7(e.6.2o!==b){e.4n(e.6.2o)}7(e.6.O===j){e.6.O=4Q}e.19();e.$k.17(".d-1p").z("4i","4h");7(!e.$k.2m(":3n")){e.3o()}l{e.$k.z("2u",1)}e.5O=b;e.2l();7(A e.6.3s==="9"){e.6.3s.R(c,[e.$k])}},2l:9(){h e=c;7(e.6.1Z===j){e.1Z()}7(e.6.1B===j){e.1B()}e.4g();7(A e.6.3w==="9"){e.6.3w.R(c,[e.$k])}},3x:9(){h e=c;7(A e.6.3B==="9"){e.6.3B.R(c,[e.$k])}e.3o();e.2V();e.2W();e.4f();e.30();e.2l();7(A e.6.3D==="9"){e.6.3D.R(c,[e.$k])}},3F:9(){h e=c;t.1c(9(){e.3x()},0)},3o:9(){h e=c;7(e.$k.2m(":3n")===b){e.$k.z({2u:0});t.18(e.1C);t.18(e.1X)}l{p b}e.1X=t.4d(9(){7(e.$k.2m(":3n")){e.3F();e.$k.4b({2u:1},2M);t.18(e.1X)}},5x)},4B:9(){h e=c;e.$S.5n(\'\').4a(\'\');e.$k.17(".d-1p").4a(\'\');e.1H=e.$k.17(".d-1p-49");e.$k.z("4i","4h")},1M:9(){h e=c,t=e.$k.1I(e.6.1M),n=e.$k.1I(e.6.2i);7(!t){e.$k.I(e.6.1M)}7(!n){e.$k.I(e.6.2i)}},2V:9(){h t=c,n,r;7(t.6.2Z===b){p b}7(t.6.48===j){t.6.q=t.2t=1;t.6.1h=b;t.6.1s=b;t.6.1O=b;t.6.22=b;t.6.1Q=b;t.6.1R=b;p b}n=e(t.6.47).1f();7(n>(t.6.1s[0]||t.2t)){t.6.q=t.2t}7(t.6.1h!==b){t.6.1h.5g(9(e,t){p e[0]-t[0]});1A(r=0;rt.E&&t.6.46===j){t.6.q=t.E}},4r:9(){h n=c,r,i;7(n.6.2Z!==j){p b}i=e(t).1f();n.3d=9(){7(e(t).1f()!==i){7(n.6.O!==b){t.18(n.1C)}t.5d(r);r=t.1c(9(){i=e(t).1f();n.3x()},n.6.45)}};e(t).44(n.3d)},4f:9(){h e=c;e.2g(e.m);7(e.6.O!==b){e.3j()}},43:9(){h t=c,n=0,r=t.E-t.6.q;t.$G.2f(9(i){h s=e(c);s.z({1f:t.M}).v("d-1K",3p(i));7(i%t.6.q===0||i===r){7(!(i>r)){n+=1}}s.v("d-24",n)})},42:9(){h e=c,t=e.$G.N*e.M;e.$K.z({1f:t*2,T:0});e.43()},2W:9(){h e=c;e.40();e.42();e.3Z();e.3v()},40:9(){h e=c;e.M=1F.4O(e.$k.1f()/e.6.q)},3v:9(){h e=c,t=(e.E*e.M-e.6.q*e.M)*-1;7(e.6.q>e.E){e.D=0;t=0;e.3z=0}l{e.D=e.E-e.6.q;e.3z=t}p t},3Y:9(){p 0},3Z:9(){h t=c,n=0,r=0,i,s,o;t.J=[0];t.3E=[];1A(i=0;i\').5m("5l",!t.F.15).5c(t.$k)}7(t.6.1v===j){t.3T()}7(t.6.2a===j){t.3S()}},3S:9(){h t=c,n=e(\'\');t.B.1o(n);t.1u=e("",{"H":"d-1n",2y:t.6.2U[0]||""});t.1q=e("",{"H":"d-U",2y:t.6.2U[1]||""});n.1o(t.1u).1o(t.1q);n.w("2X.B 21.B",\'L[H^="d"]\',9(e){e.1l()});n.w("2n.B 28.B",\'L[H^="d"]\',9(n){n.1l();7(e(c).1I("d-U")){t.U()}l{t.1n()}})},3T:9(){h t=c;t.1k=e(\'\');t.B.1o(t.1k);t.1k.w("2n.B 28.B",".d-1j",9(n){n.1l();7(3p(e(c).v("d-1j"))!==t.m){t.1g(3p(e(c).v("d-1j")),j)}})},3P:9(){h t=c,n,r,i,s,o,u;7(t.6.1v===b){p b}t.1k.2y("");n=0;r=t.E-t.E%t.6.q;1A(s=0;s",{"H":"d-1j"});u=e("<3N>",{4R:t.6.39===j?n:"","H":t.6.39===j?"d-59":""});o.1o(u);o.v("d-1j",r===s?i:s);o.v("d-24",n);t.1k.1o(o)}}t.35()},35:9(){h t=c;7(t.6.1v===b){p b}t.1k.17(".d-1j").2f(9(){7(e(c).v("d-24")===e(t.$G[t.m]).v("d-24")){t.1k.17(".d-1j").Z("2d");e(c).I("2d")}})},3e:9(){h e=c;7(e.6.2a===b){p b}7(e.6.2e===b){7(e.m===0&&e.D===0){e.1u.I("1b");e.1q.I("1b")}l 7(e.m===0&&e.D!==0){e.1u.I("1b");e.1q.Z("1b")}l 7(e.m===e.D){e.1u.Z("1b");e.1q.I("1b")}l 7(e.m!==0&&e.m!==e.D){e.1u.Z("1b");e.1q.Z("1b")}}},30:9(){h e=c;e.3P();e.3e();7(e.B){7(e.6.q>=e.E){e.B.3K()}l{e.B.3J()}}},55:9(){h e=c;7(e.B){e.B.3k()}},U:9(e){h t=c;7(t.1E){p b}t.m+=t.6.12===j?t.6.q:1;7(t.m>t.D+(t.6.12===j?t.6.q-1:0)){7(t.6.2e===j){t.m=0;e="2k"}l{t.m=t.D;p b}}t.1g(t.m,e)},1n:9(e){h t=c;7(t.1E){p b}7(t.6.12===j&&t.m>0&&t.m=i.D){e=i.D}l 7(e<=0){e=0}i.m=i.d.m=e;7(i.6.2o!==b&&r!=="4e"&&i.6.q===1&&i.F.1x===j){i.1t(0);7(i.F.1x===j){i.1L(i.J[e])}l{i.1r(i.J[e],1)}i.2r();i.4l();p b}s=i.J[e];7(i.F.1x===j){i.1T=b;7(n===j){i.1t("1w");t.1c(9(){i.1T=j},i.6.1w)}l 7(n==="2k"){i.1t(i.6.2v);t.1c(9(){i.1T=j},i.6.2v)}l{i.1t("1m");t.1c(9(){i.1T=j},i.6.1m)}i.1L(s)}l{7(n===j){i.1r(s,i.6.1w)}l 7(n==="2k"){i.1r(s,i.6.2v)}l{i.1r(s,i.6.1m)}}i.2r()},2g:9(e){h t=c;7(A t.6.1Y==="9"){t.6.1Y.R(c,[t.$k])}7(e>=t.D||e===-1){e=t.D}l 7(e<=0){e=0}t.1t(0);7(t.F.1x===j){t.1L(t.J[e])}l{t.1r(t.J[e],1)}t.m=t.d.m=e;t.2r()},2r:9(){h e=c;e.26.2D(e.m);e.13=e.d.13=e.26[e.26.N-2];e.26.5f(0);7(e.13!==e.m){e.35();e.3e();e.2l();7(e.6.O!==b){e.3j()}}7(A e.6.3y==="9"&&e.13!==e.m){e.6.3y.R(c,[e.$k])}},X:9(){h e=c;e.3A="X";t.18(e.1C)},3j:9(){h e=c;7(e.3A!=="X"){e.19()}},19:9(){h e=c;e.3A="19";7(e.6.O===b){p b}t.18(e.1C);e.1C=t.4d(9(){e.U(j)},e.6.O)},1t:9(e){h t=c;7(e==="1m"){t.$K.z(t.2z(t.6.1m))}l 7(e==="1w"){t.$K.z(t.2z(t.6.1w))}l 7(A e!=="2Y"){t.$K.z(t.2z(e))}},2z:9(e){p{"-1G-1a":"2C "+e+"1z 2s","-1W-1a":"2C "+e+"1z 2s","-o-1a":"2C "+e+"1z 2s",1a:"2C "+e+"1z 2s"}},3H:9(){p{"-1G-1a":"","-1W-1a":"","-o-1a":"",1a:""}},3I:9(e){p{"-1G-P":"1i("+e+"V, C, C)","-1W-P":"1i("+e+"V, C, C)","-o-P":"1i("+e+"V, C, C)","-1z-P":"1i("+e+"V, C, C)",P:"1i("+e+"V, C,C)"}},1L:9(e){h t=c;t.$K.z(t.3I(e))},3L:9(e){h t=c;t.$K.z({T:e})},1r:9(e,t){h n=c;n.29=b;n.$K.X(j,j).4b({T:e},{54:t||n.6.1m,3M:9(){n.29=j}})},4E:9(){h e=c,r="1i(C, C, C)",i=n.56("L"),s,o,u,a;i.2w.3O=" -1W-P:"+r+"; -1z-P:"+r+"; -o-P:"+r+"; -1G-P:"+r+"; P:"+r;s=/1i\\(C, C, C\\)/g;o=i.2w.3O.5i(s);u=o!==14&&o.N===1;a="5z"38 t||t.5Q.4P;e.F={1x:u,15:a}},4q:9(){h e=c;7(e.6.27!==b||e.6.1U!==b){e.3Q();e.3R()}},4C:9(){h e=c,t=["s","e","x"];e.16={};7(e.6.27===j&&e.6.1U===j){t=["2X.d 21.d","2N.d 3U.d","2n.d 3V.d 28.d"]}l 7(e.6.27===b&&e.6.1U===j){t=["2X.d","2N.d","2n.d 3V.d"]}l 7(e.6.27===j&&e.6.1U===b){t=["21.d","3U.d","28.d"]}e.16.3W=t[0];e.16.2K=t[1];e.16.2J=t[2]},3R:9(){h t=c;t.$k.w("5y.d",9(e){e.1l()});t.$k.w("21.3X",9(t){p e(t.1d).2m("5C, 5E, 5F, 5N")})},3Q:9(){9 s(e){7(e.2b!==W){p{x:e.2b[0].2c,y:e.2b[0].41}}7(e.2b===W){7(e.2c!==W){p{x:e.2c,y:e.41}}7(e.2c===W){p{x:e.52,y:e.53}}}}9 o(t){7(t==="w"){e(n).w(r.16.2K,a);e(n).w(r.16.2J,f)}l 7(t==="Q"){e(n).Q(r.16.2K);e(n).Q(r.16.2J)}}9 u(n){h u=n.3h||n||t.3g,a;7(u.5a===3){p b}7(r.E<=r.6.q){p}7(r.29===b&&!r.6.3f){p b}7(r.1T===b&&!r.6.3f){p b}7(r.6.O!==b){t.18(r.1C)}7(r.F.15!==j&&!r.$K.1I("3b")){r.$K.I("3b")}r.11=0;r.Y=0;e(c).z(r.3H());a=e(c).2h();i.2S=a.T;i.2R=s(u).x-a.T;i.2P=s(u).y-a.5o;o("w");i.2j=b;i.2L=u.1d||u.4c}9 a(o){h u=o.3h||o||t.3g,a,f;r.11=s(u).x-i.2R;r.2I=s(u).y-i.2P;r.Y=r.11-i.2S;7(A r.6.2E==="9"&&i.3C!==j&&r.Y!==0){i.3C=j;r.6.2E.R(r,[r.$k])}7((r.Y>8||r.Y<-8)&&r.F.15===j){7(u.1l!==W){u.1l()}l{u.5L=b}i.2j=j}7((r.2I>10||r.2I<-10)&&i.2j===b){e(n).Q("2N.d")}a=9(){p r.Y/5};f=9(){p r.3z+r.Y/5};r.11=1F.3v(1F.3Y(r.11,a()),f());7(r.F.1x===j){r.1L(r.11)}l{r.3L(r.11)}}9 f(n){h s=n.3h||n||t.3g,u,a,f;s.1d=s.1d||s.4c;i.3C=b;7(r.F.15!==j){r.$K.Z("3b")}7(r.Y<0){r.1y=r.d.1y="T"}l{r.1y=r.d.1y="3i"}7(r.Y!==0){u=r.4j();r.1g(u,b,"4e");7(i.2L===s.1d&&r.F.15!==j){e(s.1d).w("3a.4k",9(t){t.4S();t.4T();t.1l();e(t.1d).Q("3a.4k")});a=e.4N(s.1d,"4V").3a;f=a.4W();a.4X(0,0,f)}}o("Q")}h r=c,i={2R:0,2P:0,4Y:0,2S:0,2h:14,4Z:14,50:14,2j:14,51:14,2L:14};r.29=j;r.$k.w(r.16.3W,".d-1p",u)},4j:9(){h e=c,t=e.4m();7(t>e.D){e.m=e.D;t=e.D}l 7(e.11>=0){t=0;e.m=0}p t},4m:9(){h t=c,n=t.6.12===j?t.3E:t.J,r=t.11,i=14;e.2f(n,9(s,o){7(r-t.M/20>n[s+1]&&r-t.M/20(n[s+1]||n[s]-t.M)&&t.34()==="3i"){7(t.6.12===j){i=n[s+1]||n[n.N-1];t.m=e.4p(i,t.J)}l{i=n[s+1];t.m=s+1}}});p t.m},34:9(){h e=c,t;7(e.Y<0){t="3i";e.3u="U"}l{t="T";e.3u="1n"}p t},4A:9(){h e=c;e.$k.w("d.U",9(){e.U()});e.$k.w("d.1n",9(){e.1n()});e.$k.w("d.19",9(t,n){e.6.O=n;e.19();e.32="19"});e.$k.w("d.X",9(){e.X();e.32="X"});e.$k.w("d.1g",9(t,n){e.1g(n)});e.$k.w("d.2g",9(t,n){e.2g(n)})},2p:9(){h e=c;7(e.6.2p===j&&e.F.15!==j&&e.6.O!==b){e.$k.w("57",9(){e.X()});e.$k.w("58",9(){7(e.32!=="X"){e.19()}})}},1Z:9(){h t=c,n,r,i,s,o;7(t.6.1Z===b){p b}1A(n=0;n=t.m}l{o=j}7(o&&i=n.$S.N||r===-1){n.$S.1S(-1).5X(e)}l{n.$S.1S(r).5Y(e)}n.23()},5Z:9(e){h t=c,n;7(t.$k.25().N===0){p b}7(e===W||e===-1){n=-1}l{n=e}t.1V();t.$S.1S(n).3k();t.23()}};e.37.2B=9(t){p c.2f(9(){7(e(c).v("d-1N")===j){p b}e(c).v("d-1N",j);h n=3c.3q(r);n.1N(t,c);e.v(c,"2B",n)})};e.37.2B.6={q:5,1h:b,1s:[60,4],1O:[61,3],22:[62,2],1Q:b,1R:[63,1],48:b,46:b,1m:2M,1w:64,2v:65,O:b,2p:b,2a:b,2U:["1n","U"],2e:j,12:b,1v:j,39:b,2Z:j,45:2M,47:t,1M:"d-66",2i:"d-2i",1Z:b,4v:j,4x:"4y",1B:b,2O:b,33:b,3f:j,27:j,1U:j,2F:b,2o:b,3B:b,3D:b,2H:b,3s:b,1Y:b,3y:b,3w:b,2E:b,2T:b}})(67,68,69)',62,382,'||||||options|if||function||false|this|owl||||var||true|elem|else|currentItem|||return|items|||||data|on|||css|typeof|owlControls|0px|maximumItem|itemsAmount|browser|owlItems|class|addClass|positionsInArray|owlWrapper|div|itemWidth|length|autoPlay|transform|off|apply|userItems|left|next|px|undefined|stop|newRelativeX|removeClass||newPosX|scrollPerPage|prevItem|null|isTouch|ev_types|find|clearInterval|play|transition|disabled|setTimeout|target|loaded|width|goTo|itemsCustom|translate3d|page|paginationWrapper|preventDefault|slideSpeed|prev|append|wrapper|buttonNext|css2slide|itemsDesktop|swapSpeed|buttonPrev|pagination|paginationSpeed|support3d|dragDirection|ms|for|autoHeight|autoPlayInterval|visibleItems|isTransition|Math|webkit|wrapperOuter|hasClass|src|item|transition3d|baseClass|init|itemsDesktopSmall|origin|itemsTabletSmall|itemsMobile|eq|isCss3Finish|touchDrag|unWrap|moz|checkVisible|beforeMove|lazyLoad||mousedown|itemsTablet|setVars|roundPages|children|prevArr|mouseDrag|mouseup|isCssFinish|navigation|touches|pageX|active|rewindNav|each|jumpTo|position|theme|sliding|rewind|eachMoveUpdate|is|touchend|transitionStyle|stopOnHover|100|afterGo|ease|originalItems|opacity|rewindSpeed|style|attr|html|addCssSpeed|userOptions|owlCarousel|all|push|startDragging|addClassActive|height|beforeInit|newPosY|end|move|targetElement|200|touchmove|jsonPath|offsetY|completeImg|offsetX|relativePos|afterLazyLoad|navigationText|updateItems|calculateAll|touchstart|string|responsive|updateControls|clearTransStyle|hoverStatus|jsonSuccess|moveDirection|checkPagination|endCurrent|fn|in|paginationNumbers|click|grabbing|Object|resizer|checkNavigation|dragBeforeAnimFinish|event|originalEvent|right|checkAp|remove|get|endPrev|visible|watchVisibility|Number|create|unwrap|afterInit|logIn|playDirection|max|afterAction|updateVars|afterMove|maximumPixels|apStatus|beforeUpdate|dragging|afterUpdate|pagesInArray|reload|clearEvents|removeTransition|doTranslate|show|hide|css2move|complete|span|cssText|updatePagination|gestures|disabledEvents|buildButtons|buildPagination|mousemove|touchcancel|start|disableTextSelect|min|loops|calculateWidth|pageY|appendWrapperSizes|appendItemsSizes|resize|responsiveRefreshRate|itemsScaleUp|responsiveBaseWidth|singleItem|outer|wrap|animate|srcElement|setInterval|drag|updatePosition|onVisibleItems|block|display|getNewPosition|disable|singleItemTransition|closestItem|transitionTypes|owlStatus|inArray|moveEvents|response|continue|buildControls|loading|lazyFollow|lazyPreload|lazyEffect|fade|onStartup|customEvents|wrapItems|eventTypes|naturalWidth|checkBrowser|originalClasses|outClass|inClass|originalStyles|abs|perspective|loadContent|extend|_data|round|msMaxTouchPoints|5e3|text|stopImmediatePropagation|stopPropagation|buttons|events|pop|splice|baseElWidth|minSwipe|maxSwipe|dargging|clientX|clientY|duration|destroyControls|createElement|mouseover|mouseout|numbers|which|lazyOwl|appendTo|clearTimeout|checked|shift|sort|removeAttr|match|fadeIn|400|clickable|toggleClass|wrapAll|top|prop|tagName|DIV|background|image|url|wrapperWidth|img|500|dragstart|ontouchstart|controls|out|input|relative|textarea|select|webkitAnimationEnd|oAnimationEnd|MSAnimationEnd|animationend|getJSON|returnValue|hasOwnProperty|option|onstartup|baseElement|navigator|new|prototype|destroy|removeData|reinit|addItem|after|before|removeItem|1199|979|768|479|800|1e3|carousel|jQuery|window|document'.split('|'),0,{})); ;(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
    ').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery); !function(a){"use strict";var b=null,c=null,d=[],e=!1,f=!1,g=function(b){b=a.extend({},{fadingDuration:b&&b.fadeSpeed||0,containerMargin:5,displayContainerInside:"window"},b),this.each(function(){var c=a(this).addClass("simpleselected"),d=a('
    '),f=a('
    ').appendTo(d),g=a('
    ').appendTo(d),h=c.attr("id");h&&d.attr("id","simpleselect_"+h),c.off("change"),c.attr("size",2);var i={select:c,selectOptions:null,simpleselect:d,ssPlaceholder:f,ssOptionsContainer:g,ssOptionsContainerHeight:null,ssOptions:null,canBeClosed:!0,isActive:!1,isScrollable:!1,isDisabled:!1,options:b};d.data("simpleselect",i).on({mousedown:function(){i.canBeClosed=!1},click:function(b){var c=a(b.target);c.hasClass("placeholder")?t.setActive.call(i):c.hasClass("option")&&(e=!0,o.call(i,c),t.setInactive.call(i))},mouseup:function(){i.canBeClosed=!0},mouseover:function(b){var c=a(b.target);c.hasClass("option")&&m.call(i,c)}}),c.data("simpleselect",i).on({keydown:function(a){13==a.keyCode&&t.setInactive.call(i)},focus:function(){e||t.setActive.call(i)},blur:function(){i.canBeClosed&&t.setInactive.call(i)},change:function(a,b){b||a.stopImmediatePropagation();var c=n.call(i);m.call(i,c,!0)},click:function(a){a.stopPropagation()}}),c.after(d);var j=a('
    ');c.after(j).appendTo(j),k.call(i),l.call(i),t.updatePresentationDependentVariables.call(i)})},h=function(){b=a(window).height()},i=function(a){d.push(a)},j=function(b){d=a.grep(d,function(a){return a!==b})},k=function(){this.selectOptions=this.select.find("option");var b="",c=function(a){b+='
    '+a.text()+"
    "},d=function(d){b+='
    ';var f=d.attr("label");f&&(b+='
    '+e(f)+"
    "),d.children("option").each(function(){c(a(this))}),b+="
    "},e=function(a){return a.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")},f=this.select.children("optgroup, option"),g=!1;f.each(function(){var b=a(this);b.is("optgroup")?(d(b),g=!0):c(b)}),this.ssOptions=this.ssOptionsContainer.html(b).find(".option"),this.ssPlaceholder.text(n.call(this).text())},l=function(){this.isDisabled=this.select.prop("disabled"),this.simpleselect[this.isDisabled?"addClass":"removeClass"]("disabled")},m=function(a,b){if(this.ssOptions.removeClass("active"),a.addClass("active"),b&&this.isScrollable){var g,c=a.position(),d=this.ssOptionsContainer.scrollTop(),e=c.top,f=this.ssOptionsContainer.height()-(c.top+a.outerHeight());0>e?g=d+e:0>f&&(g=d-f),this.ssOptionsContainer.scrollTop(g)}},n=function(){var b=p.call(this),c=b.length?this.selectOptions.index(b):0;return a(this.ssOptions[c])},o=function(b){var c=a(this.selectOptions[this.ssOptions.index(b)]);this.select.val(c.val())},p=function(){return this.selectOptions.filter(":selected").first()},q=function(){this.ssOptionsContainer.css({height:"auto","overflow-y":"visible"})},r=function(){this.ssOptionsContainer.hide(),this.ssOptionsContainer[0].offsetHeight,this.ssOptionsContainer.show()},s=function(d){q.call(this);var e,f,g,h,i,j,k,l="window"==this.options.displayContainerInside,m=a.proxy(function(){e=d.position(),f=this.ssPlaceholderOffset.top-this.options.containerMargin-(l?a(window).scrollTop():0),g=(l?b:c)-f-this.ssPlaceholderHeight-2*this.options.containerMargin,h=f-e.top,i=g-(this.ssOptionsContainerOuterHeight-e.top-this.ssPlaceholderHeight),j=0>h?Math.abs(h):0,k=0>i?Math.abs(i):0},this);m();var n=this.isScrollable;if(this.isScrollable=0>h||0>i,this.isScrollable){this.ssOptionsContainer.css({height:"auto","overflow-y":"scroll"}),this.ssOptionsContainer.height()!=this.ssOptionsContainerHeight&&(r.call(this),t.updatePresentationDependentVariables.call(this,"ssOptionsContainer",!1),m());var o=this.ssOptionsContainer.height()-j-k;this.ssOptionsContainer.css({top:-(e.top-j)}).height(o).scrollTop(j)}else this.ssOptionsContainer.css({top:-e.top}),n&&r.call(this)},t={updatePresentationDependentVariables:function(a,b){a&&"ssPlaceholder"!=a||(this.ssPlaceholderOffset=this.ssPlaceholder.offset(),this.ssPlaceholderHeight=this.ssPlaceholder.outerHeight()),a&&"ssOptionsContainer"!=a||(b!==!1&&q.call(this),this.ssOptionsContainerOuterHeight=this.ssOptionsContainer.outerHeight(!0),this.ssOptionsContainerHeight=this.ssOptionsContainer.height())},refreshContents:function(){k.call(this),t.updatePresentationDependentVariables.call(this)},refreshState:function(){l.call(this)},disable:function(){this.select.prop("disabled",!0),t.refreshState.call(this)},enable:function(){this.select.prop("disabled",!1),t.refreshState.call(this)},setActive:function(){if(!this.isActive&&!this.isDisabled&&this.ssOptions.length){this.lastValue=this.select.val(),this.simpleselect.addClass("active"),this.isActive=!0,i.call(this,this.simpleselect);var b=n.call(this);m.call(this,b),c=a(document).height(),this.ssOptionsContainer.fadeTo(0,0).fadeTo(this.options.fadingDuration,1),this.select.is(":focus")||this.select.focus(),s.call(this,b),f=!0}},setInactive:function(){if(this.isActive){this.simpleselect.removeClass("active"),this.isActive=!1,j.call(this,this.simpleselect),this.ssOptionsContainer.fadeOut(this.options.fadingDuration),this.select.is(":focus")&&this.select.blur();var a=this.select.val();this.lastValue!=a&&(this.ssPlaceholder.text(p.call(this).text()),this.select.trigger("change",[!0]))}}};a.fn.simpleselect=function(b){if(t[b]){var c=Array.prototype.slice.call(arguments,1);this.each(function(){t[b].apply(a(this).data("simpleselect"),c)})}else g.apply(this,arguments);return this},a(document).ready(function(){h(),a(window).on("resize.simpleselect",function(){h()}),a(document).on("click.simpleselect keyup.simpleselect",function(a){if("click"==a.type&&(setTimeout(function(){e=!1},0),f))return f=!1,void 0;if("click"==a.type||"keyup"==a.type&&27==a.keyCode){var b=d.length;if(b)for(var c=d.slice(0),g=0;b>g;g++)c[g].simpleselect("setInactive")}})})}(jQuery); function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}jQuery(document).ready(function(){function a(a){var b=a.isVdoOnScreen();b?a.playYTP():a.pauseYTP()}jQuery(".upb_video_class .utube").each(function(b,c){var d=jQuery(this),e=d.data("vdo"),f=d.data("muted"),g=d.data("loop"),h=d.data("poster"),i=d.data("start"),j=d.data("stop"),k={videoURL:e,ratio:"16/9",quality:"hd720",showControls:!1,containment:"self",startAt:i,mute:f,loop:g,stopAt:j,optimizeDisplay:!0};if(""!==h&&d.css({"background-image":"url("+h+")"}),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))return!1;var l=d.mb_YTPlayer(k);l.on("YTPStart",function(){if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var b=d.parent().find(".enable-on-viewport").length;b>0&&(l.pauseYTP(),a(l),jQuery(window).scroll(function(){a(l)})),jQuery(".video-controls").click(function(a){})}})}),jQuery.fn.isVdoOnScreen=function(){var a=jQuery(window),b={top:a.scrollTop(),left:a.scrollLeft()};b.right=b.left+a.width(),b.bottom=b.top+a.height()-200;var c=this.offset();return c.right=c.left+this.outerWidth(),c.bottom=c.top+this.outerHeight()-300,!(b.rightc.right||b.bottomc.bottom)}});var ytp=ytp||{};!function(jQuery,ytp){var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.fn.CSSAnimate=function(a,b,c,d,e){function f(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function g(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+$/)?""+a+b:a}return jQuery.support.CSStransition=function(){var a=(document.body||document.documentElement).style;return void 0!==a.transition||void 0!==a.WebkitTransition||void 0!==a.MozTransition||void 0!==a.MsTransition||void 0!==a.OTransition}(),this.each(function(){var h=this,i=jQuery(this);h.id=h.id||"CSSA_"+(new Date).getTime();var j=j||{type:"noEvent"};if(h.CSSAIsRunning&&h.eventType==j.type)h.CSSqueue=function(){i.CSSAnimate(a,b,c,d,e)};else if(h.CSSqueue=null,h.eventType=j.type,0!==i.length&&a){if(h.CSSAIsRunning=!0,"function"==typeof b&&(e=b,b=jQuery.fx.speeds._default),"function"==typeof c&&(e=c,c=0),"function"==typeof d&&(e=d,d="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof b)for(var k in jQuery.fx.speeds){if(b==k){b=jQuery.fx.speeds[k];break}b=jQuery.fx.speeds._default}if(b||(b=jQuery.fx.speeds._default),jQuery.support.CSStransition){j={"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)"},j[d]&&(d=j[d]);var l="",m="transitionEnd";jQuery.browser.webkit?(l="-webkit-",m="webkitTransitionEnd"):jQuery.browser.mozilla?(l="-moz-",m="transitionend"):jQuery.browser.opera?(l="-o-",m="otransitionend"):jQuery.browser.msie&&(l="-ms-",m="msTransitionEnd"),j=[];for(n in a)k=n,"transform"===k&&(k=l+"transform",a[k]=a[n],delete a[n]),"filter"===k&&(k=l+"filter",a[k]=a[n],delete a[n]),("transform-origin"===k||"origin"===k)&&(k=l+"transform-origin",a[k]=a[n],delete a[n]),"x"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" translateX("+g(a[n],"px")+")",delete a[n]),"y"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" translateY("+g(a[n],"px")+")",delete a[n]),"z"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" translateZ("+g(a[n],"px")+")",delete a[n]),"rotate"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" rotate("+g(a[n],"deg")+")",delete a[n]),"rotateX"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" rotateX("+g(a[n],"deg")+")",delete a[n]),"rotateY"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" rotateY("+g(a[n],"deg")+")",delete a[n]),"rotateZ"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" rotateZ("+g(a[n],"deg")+")",delete a[n]),"scale"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" scale("+g(a[n],"")+")",delete a[n]),"scaleX"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" scaleX("+g(a[n],"")+")",delete a[n]),"scaleY"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" scaleY("+g(a[n],"")+")",delete a[n]),"scaleZ"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" scaleZ("+g(a[n],"")+")",delete a[n]),"skew"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" skew("+g(a[n],"deg")+")",delete a[n]),"skewX"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" skewX("+g(a[n],"deg")+")",delete a[n]),"skewY"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" skewY("+g(a[n],"deg")+")",delete a[n]),"perspective"===k&&(k=l+"transform",a[k]=a[k]||"",a[k]+=" perspective("+g(a[n],"px")+")",delete a[n]),0>j.indexOf(k)&&j.push(f(k));var n=j.join(","),o=function(){i.off(m+"."+h.id),clearTimeout(h.timeout),i.css(l+"transition",""),"function"==typeof e&&e(i),h.called=!0,h.CSSAIsRunning=!1,"function"==typeof h.CSSqueue&&(h.CSSqueue(),h.CSSqueue=null)},p={};jQuery.extend(p,a),p[l+"transition-property"]=n,p[l+"transition-duration"]=b+"ms",p[l+"transition-delay"]=c+"ms",p[l+"transition-style"]="preserve-3d",p[l+"transition-timing-function"]=d,setTimeout(function(){i.one(m+"."+h.id,o),i.css(p)},1),h.timeout=setTimeout(function(){i.called||!e?(i.called=!1,h.CSSAIsRunning=!1):(i.css(l+"transition",""),e(i),h.CSSAIsRunning=!1,"function"==typeof h.CSSqueue&&(h.CSSqueue(),h.CSSqueue=null))},b+c+100)}else{for(var n in a)"transform"===n&&delete a[n],"filter"===n&&delete a[n],"transform-origin"===n&&delete a[n],"auto"===a[n]&&delete a[n];e&&"string"!=typeof e||(e="linear"),i.animate(a,b,e)}}})},!function(a){/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase());var b="ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch||!1;a.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:b?"touchstart":"mousedown",end:b?"touchend":"mouseup",move:b?"touchmove":"mousemove"},init:function(c){return this.each(function(){var d=this,e=a(d);e.addClass("simpleSlider"),d.opt={},a.extend(d.opt,a.simpleSlider.defaults,c),a.extend(d.opt,e.data());var f="h"==d.opt.orientation?"horizontal":"vertical",g=a("
    ").addClass("level").addClass(f);e.prepend(g),d.level=g,e.css({cursor:"default"}),"auto"==d.opt.scale&&(d.opt.scale=a(d).outerWidth()),e.updateSliderVal(),d.opt.readonly||(e.on(a.simpleSlider.events.start,function(a){b&&(a=a.changedTouches[0]),d.canSlide=!0,e.updateSliderVal(a),e.css({cursor:"col-resize"}),a.preventDefault(),a.stopPropagation()}),a(document).on(a.simpleSlider.events.move,function(c){b&&(c=c.changedTouches[0]),d.canSlide&&(a(document).css({cursor:"default"}),e.updateSliderVal(c),c.preventDefault(),c.stopPropagation())}).on(a.simpleSlider.events.end,function(){a(document).css({cursor:"auto"}),d.canSlide=!1,e.css({cursor:"auto"})}))})},updateSliderVal:function(b){function c(a,b){return Math.floor(100*a/b)}var d=this,e=d.get(0);e.opt.initialval="number"==typeof e.opt.initialval?e.opt.initialval:e.opt.initialval(e);var f=a(e).outerWidth(),g=a(e).outerHeight();e.x="object"==typeof b?b.clientX+document.body.scrollLeft-d.offset().left:"number"==typeof b?b*f/e.opt.scale:e.opt.initialval*f/e.opt.scale,e.y="object"==typeof b?b.clientY+document.body.scrollTop-d.offset().top:"number"==typeof b?(e.opt.scale-e.opt.initialval-b)*g/e.opt.scale:e.opt.initialval*g/e.opt.scale,e.y=d.outerHeight()-e.y,e.scaleX=e.x*e.opt.scale/f,e.scaleY=e.y*e.opt.scale/g,e.outOfRangeX=e.scaleX>e.opt.scale?e.scaleX-e.opt.scale:e.scaleX<0?e.scaleX:0,e.outOfRangeY=e.scaleY>e.opt.scale?e.scaleY-e.opt.scale:e.scaleY<0?e.scaleY:0,e.outOfRange="h"==e.opt.orientation?e.outOfRangeX:e.outOfRangeY,e.value="undefined"!=typeof b?"h"==e.opt.orientation?e.x>=d.outerWidth()?e.opt.scale:e.x<=0?0:e.scaleX:e.y>=d.outerHeight()?e.opt.scale:e.y<=0?0:e.scaleY:"h"==e.opt.orientation?e.scaleX:e.scaleY,"h"==e.opt.orientation?e.level.width(c(e.x,f)+"%"):e.level.height(c(e.y,g)),"function"==typeof e.opt.callback&&e.opt.callback(e)}},a.fn.simpleSlider=a.simpleSlider.init,a.fn.updateSliderVal=a.simpleSlider.updateSliderVal}(jQuery),jQuery.mbStorage={set:function(a,b){b=JSON.stringify(b),localStorage.setItem(a,b)},get:function(a){return localStorage[a]?JSON.parse(localStorage[a]):null},remove:function(a){a?localStorage.removeItem(a):localStorage.clear()}};var getYTPVideoID=function(a){var b,c;return a.indexOf("youtu.be")>0?(b=a.substr(a.lastIndexOf("/")+1,a.length),c=b.indexOf("?list=")>0?b.substr(b.lastIndexOf("="),b.length):null,b=c?b.substr(0,b.lastIndexOf("?")):b):a.indexOf("http")>-1?(b=a.match(/[\\?&]v=([^&#]*)/)[1],c=a.indexOf("list=")>0?a.match(/[\\?&]list=([^&#]*)/)[1]:null):(b=a.length>15?null:a,c=b?null:a),{videoID:b,playlistID:c}};jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"2.9.1",author:"Matteo Bicocchi",apiKey:"",defaults:{containment:"body",ratio:"auto",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:50,addRaster:!1,opacity:1,quality:"default",mute:!1,loop:!0,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnBlur:!0,realfullscreen:!0,gaTrack:!0,optimizeDisplay:!0,onReady:function(a){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},locationProtocol:"https:",buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={},YTPlayer.state={},YTPlayer.filtersEnabled=!0,YTPlayer.filters={grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},$YTPlayer.addClass("mb_YTPlayer");var property=$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property");"undefined"!=typeof property&&"undefined"!=typeof property.vol&&(property.vol=0==property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.hasChanged||(YTPlayer.defaultOpt={},jQuery.extend(YTPlayer.defaultOpt,jQuery.mbYTPlayer.defaults,options,property)),YTPlayer.isRetina=window.retina||window.devicePixelRatio>1;var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","video_"+(new Date).getTime());var playerID="mbYTP_"+YTPlayer.id;YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0;var videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).videoID:!1,playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).playlistID:!1;YTPlayer.videoID=videoID,YTPlayer.playlistID=playlistID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations};document.createElement("video").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1);var playerBox=jQuery("
    ").attr("id",playerID).addClass("playerBox"),overlay=jQuery("
    ").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");if(YTPlayer.isSelf="self"==YTPlayer.opt.containment,YTPlayer.defaultOpt.containment=YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground="body"==YTPlayer.opt.containment.get(0).tagName.toLowerCase(),!YTPlayer.isBackground||!ytp.backgroundIsInited){var isPlayer=YTPlayer.opt.containment.is(jQuery(this));if(YTPlayer.canPlayOnMobile=isPlayer&&0==jQuery(this).children().length,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide(),jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile)return void $YTPlayer.remove();var wrapper=jQuery("
    ").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID);if(wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0}),playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not("script, style").each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide()):"static"==YTPlayer.opt.containment.css("position")&&YTPlayer.opt.containment.css({position:"relative"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){YTPlayer.controlBar&&YTPlayer.controlBar.addClass("visible")}).on("mouseleave",function(){YTPlayer.controlBar&&YTPlayer.controlBar.removeClass("visible")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100);else{jQuery("#YTAPI").remove();var tag=jQuery("").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/iframe_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"});jQuery("head").prepend(tag)}jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay="undefined"==typeof YTPlayer.opt.autoPlay?YTPlayer.isBackground?!0:!1:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromAPI(YTPlayer),jQuery(YTPlayer).on("YTPChanged",function(){if(!YTPlayer.isInit){if(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile){if(YTPlayer.opt.containment.outerWidth()>jQuery(window).width()){YTPlayer.opt.containment.css({maxWidth:"100%"});var a=.6*YTPlayer.opt.containment.outerWidth();YTPlayer.opt.containment.css({maxHeight:a})}return void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),height:"100%",width:"100%",events:{onReady:function(a){YTPlayer.player=a.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1})}}})}new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(a){if(YTPlayer.player=a.target,!YTPlayer.isReady){YTPlayer.isReady=YTPlayer.isPlayer&&!YTPlayer.opt.autoPlay?!1:!0,YTPlayer.playerEl=YTPlayer.player.getIframe(),$YTPlayer.optimizeDisplay(),YTPlayer.videoID=videoID,jQuery(window).on("resize.YTP",function(){$YTPlayer.optimizeDisplay()}),jQuery.mbYTPlayer.checkForState(YTPlayer);var b=jQuery.Event("YTPUnstarted");b.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(b)}},onStateChange:function(a){if("function"==typeof a.target.getPlayerState){var b=a.target.getPlayerState();if(YTPlayer.state!=b){YTPlayer.state=b;var c;switch(b){case-1:c="YTPUnstarted";break;case 0:c="YTPEnd";break;case 1:c="YTPStart",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause);break;case 2:c="YTPPause",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 3:YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),c="YTPBuffering",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 5:c="YTPCued"}var d=jQuery.Event(c);d.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(d)}}},onPlaybackQualityChange:function(a){var b=a.target.getPlaybackQuality(),c=jQuery.Event("YTPQualityChange");c.quality=b,jQuery(YTPlayer).trigger(c)},onError:function(a){150==a.data&&(console.log("Embedding this video is restricted by Youtube."),YTPlayer.isPlayList&&jQuery(YTPlayer).playNext()),2==a.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,a)}}})}}))})}})},getDataFromAPI:function(a){if(a.videoData=jQuery.mbStorage.get("YYTPlayer_data_"+a.videoID),a.videoData)setTimeout(function(){"auto"==a.opt.ratio?a.opt.ratio="16/9":a.opt.ratio,a.dataReceived=!0,jQuery(a).trigger("YTPChanged");var b=jQuery.Event("YTPData");b.prop={};for(var c in a.videoData)b.prop[c]=a.videoData[c];jQuery(a).trigger(b)},500);else if(jQuery.mbYTPlayer.apiKey)jQuery.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+a.videoID+"&key="+jQuery.mbYTPlayer.apiKey+"&part=snippet",function(b){function c(b){a.videoData={},a.videoData.id=a.videoID,a.videoData.channelTitle=b.channelTitle,a.videoData.title="",a.videoData.description=b.description.length<400?b.description:b.description.substring(0,400)+" ...",a.videoData.aspectratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.opt.ratio=a.videoData.aspectratio,a.videoData.thumb_max=b.thumbnails.maxres?b.thumbnails.maxres.url:null,a.videoData.thumb_high=b.thumbnails.high?b.thumbnails.high.url:null,a.videoData.thumb_medium=b.thumbnails.medium?b.thumbnails.medium.url:null,jQuery.mbStorage.set("YYTPlayer_data_"+a.videoID,a.videoData)}a.dataReceived=!0,jQuery(a).trigger("YTPChanged"),c(b.items[0].snippet);var d=jQuery.Event("YTPData");d.prop={};for(var e in a.videoData)d.prop[e]=a.videoData[e];jQuery(a).trigger(d)});else{if(a.hasData=!1,setTimeout(function(){jQuery(a).trigger("YTPChanged")},50),a.isPlayer&&!a.opt.autoPlay){var b="https://i.ytimg.com/vi/"+a.videoID+"/hqdefault.jpg";a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"})}a.videoData=null,"auto"==a.opt.ratio?"16/9":a.opt.ratio}jQuery(a).off("YTPData.YTPlayer").on("YTPData.YTPlayer",function(){if(!a.hasData&&(a.hasData=!0,a.isPlayer&&!a.opt.autoPlay)){var b=a.videoData.thumb_max||a.videoData.thumb_high||a.videoData.thumb_medium;a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"})}}),a.isPlayer&&!a.opt.autoPlay&&(a.loading=jQuery("
    ").addClass("loading").html("Loading").hide(),jQuery(a).append(a.loading),a.loading.fadeIn())},removeStoredData:function(){jQuery.mbStorage.remove()},getVideoData:function(){var a=this.get(0);return a.videoData},getVideoID:function(){var a=this.get(0);return a.videoID||!1},setVideoQuality:function(a){var b=this.get(0);jQuery.browser.chrome||b.player.setPlaybackQuality(a)},playlist:function(a,b,c){var d=this,e=d.get(0);return e.isPlayList=!0,b&&(a=jQuery.shuffle(a)),e.videoID||(e.videos=a,e.videoCounter=0,e.videoLength=a.length,jQuery(e).data("property",a[0]),jQuery(e).mb_YTPlayer()),"function"==typeof c&&jQuery(e).on("YTPChanged",function(){c(e)}),jQuery(e).on("YTPEnd",function(){jQuery(e).playNext()}),d},playNext:function(){var a=this.get(0);a.videoCounter++,a.videoCounter>=a.videoLength&&(a.videoCounter=0),jQuery(a).changeMovie(a.videos[a.videoCounter])},playPrev:function(){var a=this.get(0);a.videoCounter--,a.videoCounter<0&&(a.videoCounter=a.videoLength-1),jQuery(a).changeMovie(a.videos[a.videoCounter])},changeMovie:function(a){var b=this.get(0);b.opt.startAt=0,b.opt.stopAt=0,b.opt.mute=!0,b.hasData=!1,b.hasChanged=!0,a&&jQuery.extend(b.opt,b.defaultOpt,a),b.videoID=getYTPVideoID(b.opt.videoURL).videoID,jQuery(b.playerEl).CSSAnimate({opacity:0},200,function(){jQuery(b).YTPGetPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+b.videoID),1,b.opt.quality),jQuery.mbYTPlayer.checkForState(b),jQuery(b).optimizeDisplay(),jQuery.mbYTPlayer.getDataFromAPI(b)})},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var a=this.get(0);ytp.YTAPIReady=!1,ytp.backgroundIsInited=!1,a.isInit=!1,a.videoID=null;var b=a.wrapper;b.remove(),jQuery("#controlBar_"+a.id).remove(),clearInterval(a.checkForStartAt),clearInterval(a.getState)},fullscreen:function(real){function hideMouse(){YTPlayer.overlay.css({cursor:"none"})}function RunPrefixMethod(a,b){for(var c,d,e=["webkit","moz","ms","o",""],f=0;f0||a&&b.opt.vol==a?b.isMute?jQuery(b).YTPUnmute():jQuery(b).YTPMute():(b.opt.vol=a,b.player.setVolume(b.opt.vol),b.volumeBar&&b.volumeBar.length&&b.volumeBar.updateSliderVal(a)):jQuery(b).YTPUnmute()},mute:function(){var a=this.get(0);if(!a.isMute){a.player.mute(),a.isMute=!0,a.player.setVolume(0),a.volumeBar&&a.volumeBar.length&&a.volumeBar.updateSliderVal(0);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.unmute),jQuery(a).addClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.addClass("muted");var d=jQuery.Event("YTPMuted");d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d)}},unmute:function(){var a=this.get(0);if(a.isMute){a.player.unMute(),a.isMute=!1,a.player.setVolume(a.opt.vol),a.volumeBar&&a.volumeBar.length&&a.volumeBar.updateSliderVal(a.opt.vol>10?a.opt.vol:10);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.mute),jQuery(a).removeClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.removeClass("muted");var d=jQuery.Event("YTPUnmuted");d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d)}},applyFilter:function(a,b){var c=this.get(0);return c.filters[a].value=b,c.filtersEnabled&&this.YTPEnableFilters(),this},applyFilters:function(a){var b=this.get(0);return this.on("YTPReady",function(){for(var c in a)b.filters[c].value=a[c],jQuery(b).YTPApplyFilter(c,a[c]);jQuery(b).trigger("YTPFiltersApplied")}),this},toggleFilter:function(a,b){var c=this.get(0);return c.filters[a].value?c.filters[a].value=0:c.filters[a].value=b,c.filtersEnabled&&this.YTPEnableFilters(),this},disableFilters:function(){var a=this.get(0),b=jQuery(a.playerEl);return b.css("-webkit-filter",""),b.css("filter",""),a.filtersEnabled=!1,this},enableFilters:function(){var a=this.get(0),b=jQuery(a.playerEl),c="";for(var d in a.filters)a.filters[d].value&&(c+=d.replace("_","-")+"("+a.filters[d].value+a.filters[d].unit+") ");return b.css("-webkit-filter",c),b.css("filter",c),a.filtersEnabled=!0,this},toggleFilters:function(a){var b=this.get(0);return b.filtersEnabled?(jQuery(b).trigger("YTPDisableFilters"),jQuery(b).YTPDisableFilters()):(jQuery(b).YTPEnableFilters(),jQuery(b).trigger("YTPEnableFilters")),"function"==typeof a&&a(b.filtersEnabled),this},removeFilter:function(a,b){"function"==typeof a&&(b=a,a=null);var c=this.get(0);if(a)this.YTPApplyFilter(a,0),"function"==typeof b&&b(a);else for(var d in c.filters)this.YTPApplyFilter(d,0),"function"==typeof b&&b(d);return this},manageProgress:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPProgress"),d=b.find(".mb_YTPLoaded"),e=b.find(".mb_YTPseekbar"),f=c.outerWidth(),g=Math.floor(a.player.getCurrentTime()),h=Math.floor(a.player.getDuration()),i=g*f/h,j=0,k=100*a.player.getVideoLoadedFraction();return d.css({left:j,width:k+"%"}),e.css({left:0,width:i}),{totalTime:h,currentTime:g}},buildControls:function(YTPlayer){var data=YTPlayer.opt;if(data.showYTLogo=data.showYTLogo||data.printUrl,!jQuery("#controlBar_"+YTPlayer.id).length){YTPlayer.controlBar=jQuery("").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();var buttonBar=jQuery("
    ").addClass("buttonBar"),playpause=jQuery(""+jQuery.mbYTPlayer.controls.play+"").addClass("mb_YTPPlaypause ytpicon").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).YTPPause():jQuery(YTPlayer).YTPPlay()}),MuteUnmute=jQuery(""+jQuery.mbYTPlayer.controls.mute+"").addClass("mb_YTPMuteUnmute ytpicon").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).YTPUnmute():jQuery(YTPlayer).YTPMute()}),volumeBar=jQuery("
    ").addClass("mb_YTPVolumeBar").css({display:"inline-block"});YTPlayer.volumeBar=volumeBar;var idx=jQuery("").addClass("mb_YTPTime"),vURL=data.videoURL?data.videoURL:"";vURL.indexOf("http")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL);var movieUrl=jQuery("").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT"); }),onlyVideo=jQuery("").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).YTPFullscreen(data.realfullscreen)}),progressBar=jQuery("
    ").addClass("mb_YTPProgress").css("position","absolute").click(function(a){timeBar.css({width:a.clientX-timeBar.offset().left}),YTPlayer.timeW=a.clientX-timeBar.offset().left,YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0});var b=Math.floor(YTPlayer.player.getDuration());YTPlayer["goto"]=timeBar.outerWidth()*b/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer["goto"]),!0),YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0})}),loadedBar=jQuery("
    ").addClass("mb_YTPLoaded").css("position","absolute"),timeBar=jQuery("
    ").addClass("mb_YTPseekbar").css("position","absolute");progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(volumeBar).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),YTPlayer.controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery("body").after(YTPlayer.controlBar):(YTPlayer.controlBar.addClass("inlinePlayer"),YTPlayer.wrapper.before(YTPlayer.controlBar)),volumeBar.simpleSlider({initialval:YTPlayer.opt.vol,scale:100,orientation:"h",callback:function(a){0==a.value?jQuery(YTPlayer).YTPMute():jQuery(YTPlayer).YTPUnmute(),YTPlayer.player.setVolume(a.value),YTPlayer.isMute||(YTPlayer.opt.vol=a.value)}})}},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?100:1e3;return clearInterval(YTPlayer.getState),jQuery.contains(document,YTPlayer)?(jQuery.mbYTPlayer.checkForStart(YTPlayer),void(YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).YTPManageProgress(),$YTPlayer=jQuery(YTPlayer),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt?YTPlayer.opt.startAt:0,stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0;if(stopAt=stopAt400&&YTPlayer.isCompact&&(YTPlayer.controlBar.removeClass("compact"),YTPlayer.isCompact=!1,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)),1==YTPlayer.player.getPlayerState()&&(parseFloat(YTPlayer.player.getDuration()-3)0&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)){if(YTPlayer.isEnded)return;if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},2e3),YTPlayer.isPlayList){clearInterval(YTPlayer.getState);var YTPEnd=jQuery.Event("YTPEnd");return YTPEnd.time=YTPlayer.player.time,void jQuery(YTPlayer).trigger(YTPEnd)}data.loop?YTPlayer.player.seekTo(startAt,!0):(YTPlayer.player.pauseVideo(),YTPlayer.wrapper.CSSAnimate({opacity:0},1e3,function(){var a=jQuery.Event("YTPEnd");if(a.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(a),YTPlayer.player.seekTo(startAt,!0),!YTPlayer.isBackground){var b=YTPlayer.videoData.thumb_max||YTPlayer.videoData.thumb_high||YTPlayer.videoData.thumb_medium;YTPlayer.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"})}}))}},interval))):(jQuery(YTPlayer).YTPPlayerDestroy(),clearInterval(YTPlayer.getState),void clearInterval(YTPlayer.checkForStartAt))},checkForStart:function(a){var b=jQuery(a);if(!jQuery.contains(document,a))return void jQuery(a).YTPPlayerDestroy();if(jQuery.browser.chrome&&(a.opt.quality="default"),a.player.pauseVideo(),jQuery(a).muteYTPVolume(),jQuery("#controlBar_"+a.id).remove(),a.opt.showControls&&jQuery.mbYTPlayer.buildControls(a),a.opt.addRaster){var c="dot"==a.opt.addRaster?"raster-dot":"raster";a.overlay.addClass(a.isRetina?c+" retina":c)}else a.overlay.removeClass(function(a,b){var c=b.split(" "),d=[];return jQuery.each(c,function(a,b){/raster.*/.test(b)&&d.push(b)}),d.push("retina"),d.join(" ")});a.checkForStartAt=setInterval(function(){jQuery(a).YTPMute();var c=a.opt.startAt?a.opt.startAt:1,d=a.player.getVideoLoadedFraction()>c/a.player.getDuration();if(a.player.getDuration()>0&&a.player.getCurrentTime()>=c&&d){clearInterval(a.checkForStartAt),a.isReady=!0,"function"==typeof a.opt.onReady&&a.opt.onReady(a);var e=jQuery.Event("YTPReady");jQuery(a).trigger(e),a.player.pauseVideo(),a.opt.mute||jQuery(a).YTPUnmute(),a.canTrigger=!0,a.opt.autoPlay?(b.YTPPlay(),b.css("background-image","none"),jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},1e3)):a.player.pauseVideo(),a.isPlayer&&!a.opt.autoPlay&&(a.loading.html("Ready"),setTimeout(function(){a.loading.fadeOut()},100)),a.controlBar&&a.controlBar.slideDown(1e3)}else c>=0&&a.player.seekTo(c,!0)},1e3)},formatTime:function(a){var b=Math.floor(a/60),c=Math.floor(a-60*b);return(9>=b?"0"+b:b)+":"+(9>=c?"0"+c:c)}},jQuery.fn.toggleVolume=function(){var a=this.get(0);if(a)return a.player.isMuted()?(jQuery(a).YTPUnmute(),!0):(jQuery(a).YTPMute(),!1)},jQuery.fn.optimizeDisplay=function(){var a=this.get(0),b=a.opt,c=jQuery(a.playerEl),d={},e=a.wrapper;d.width=e.outerWidth(),d.height=e.outerHeight();var f=24,g=100,h={};b.optimizeDisplay?(h.width=d.width+d.width*f/100,h.height="16/9"==b.ratio?Math.ceil(9*d.width/16):Math.ceil(3*d.width/4),h.marginTop=-((h.height-d.height)/2),h.marginLeft=-(d.width*(f/2)/100),h.height").css({display:"none",left:"0",position:"absolute",top:"0"}).attr({width:e,height:d}).addClass("gsCanvas");ctx=can[0].getContext("2d");ctx.drawImage(f,0,0,e,d);imageData=ctx.getImageData(0,0,e,d);px=imageData.data;for(i=0;i');gsWrapper=a(this).parent();gsWrapper.css({position:"relative",display:"inline-block"});if(window.location.hostname!==this.src.split("/")[2]){a.getImageData({url:a(this).attr("src"),success:a.proxy(function(e){can=b(e,e.width,e.height);if($options.reverse){can.appendTo(gsWrapper).css({display:"block",opacity:"0"})}else{can.appendTo(gsWrapper).fadeIn($options.fadeTime)}},gsWrapper),error:function(f,e){}})}else{can=b(a(this)[0],a(this).width(),a(this).height());if($options.reverse){can.appendTo(gsWrapper).css({display:"block",opacity:"0"})}else{can.appendTo(gsWrapper).fadeIn($options.fadeTime)}}});a(this).parent().delegate(".gsCanvas","mouseover mouseout",function(d){over=$options.reverse?1:0;out=$options.reverse?0:1;(d.type=="mouseover")&&a(this).stop().animate({opacity:over},$options.fadeTime);(d.type=="mouseout")&&a(this).stop().animate({opacity:out},$options.fadeTime)})}}})(jQuery);(function(X,V){function O(){}function H(c){E=[c]}function W(c,g,e){return c&&c.apply(g.context||g,e)}function U(A){function s(K){!n++&&V(function(){g();e&&(z[w]={s:[K]});x&&(K=x.apply(A,[K]));W(A.success,A,[K,G]);W(h,A,[A,G])},0)}function o(K){!n++&&V(function(){g();e&&K!=F&&(z[w]=K);W(A.error,A,[A,K]);W(h,A,[A,K])},0)}A=X.extend({},B,A);var h=A.complete,x=A.dataFilter,J=A.callbackParameter,I=A.callback,t=A.cache,e=A.pageCache,D=A.charset,w=A.url,u=A.data,C=A.timeout,c,n=0,g=O;A.abort=function(){!n++&&g()};if(W(A.beforeSend,A,[A])===false||n){return A}w=w||y;u=u?typeof u=="string"?u:X.param(u,A.traditional):y;w+=u?(/\?/.test(w)?"&":"?")+u:y;J&&(w+=(/\?/.test(w)?"&":"?")+encodeURIComponent(J)+"=?");!t&&!e&&(w+=(/\?/.test(w)?"&":"?")+"_"+(new Date).getTime()+"=");w=w.replace(/=\?(&|$)/,"="+I+"$1");e&&(c=z[w])?c.s?s(c.s[0]):o(c):V(function(L,K,M){if(!n){M=C>0&&V(function(){o(F)},C);g=function(){M&&clearTimeout(M);L[q]=L[v]=L[p]=L[r]=null;R[m](L);K&&R[m](K)};window[I]=H;L=X(l)[0];L.id=k+b++;if(D){L[a]=D}var N=function(P){(L[v]||O)();P=E;E=undefined;P?s(P[0]):o(j)};if(f.msie){L.event=v;L.htmlFor=L.id;L[q]=function(){/loaded|complete/.test(L.readyState)&&N()}}else{L[r]=L[p]=N;f.opera?(K=X(l)[0]).text="jQuery('#"+L.id+"')[0]."+r+"()":L[d]=d}L.src=w;R.insertBefore(L,R.firstChild);K&&R.insertBefore(K,R.firstChild)}},0);return A}var d="async",a="charset",y="",j="error",k="_jqjsp",v="onclick",r="on"+j,p="onload",q="onreadystatechange",m="removeChild",l="