");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('
");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(D),x("BeforeChange",function(e,t,n){t!==n&&(t===D?Y():n===D&&Y(!0))}),x(l+"."+D,function(){Y()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var U=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},G=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=G(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?G(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=U(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=U(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=U(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var X="retina";e.magnificPopup.registerModule(X,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+X,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+X,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}()})(window.jQuery||window.Zepto);
// source --> https://better-than-ever.com/wp-content/plugins/vibe-shortcodes/js/jquery.fitvids.js?ver=1.0
/*global jQuery */
/*!
* FitVids 1.0
*
* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
* Date: Thu Sept 01 18:00:00 2011 -0500
*/
(function( $ ){
$.fn.fitVids = function( options ) {
var settings = {
customSelector: null
}
var div = document.createElement('div'),
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
div.className = 'fit-vids-style';
div.innerHTML = '';
ref.parentNode.insertBefore(div,ref);
if ( options ) {
$.extend( settings, options );
}
return this.each(function(){
var selectors = [
"iframe[src*='player.vimeo.com']",
"iframe[src*='www.youtube.com']",
"iframe[src*='www.kickstarter.com']",
"object",
"embed"
];
if (settings.customSelector) {
selectors.push(settings.customSelector);
}
var $allVideos = $(this).find(selectors.join(','));
$allVideos.each(function(){
var $this = $(this);
if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
var height = ( this.tagName.toLowerCase() == 'object' || $this.attr('height') ) ? $this.attr('height') : $this.height(),
width = $this.attr('width') ? $this.attr('width') : $this.width(),
aspectRatio = height / width;
if(!$this.attr('id')){
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
$this.attr('id', videoID);
}
$this.wrap('').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
$this.removeAttr('height').removeAttr('width');
});
});
}
})( jQuery );
// source --> https://better-than-ever.com/wp-includes/js/thickbox/thickbox.js?ver=3.1-20121105
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
if ( typeof tb_pathToImage != 'string' ) {
var tb_pathToImage = thickboxL10n.loadingAnimation;
}
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
//on page load call tb_init
jQuery(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
/*
* Add thickbox to href & area elements that have a class of .thickbox.
* Remove the loading indicator when content in an iframe has loaded.
*/
function tb_init(domChunk){
jQuery( 'body' )
.on( 'click', domChunk, tb_click )
.on( 'thickbox:iframe:loaded', function() {
jQuery( '#TB_window' ).removeClass( 'thickbox-loading' );
});
}
function tb_click(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
return false;
}
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
var $closeBtn;
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
jQuery("body","html").css({height: "100%", width: "100%"});
jQuery("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
jQuery("body").append("");
jQuery("#TB_overlay").click(tb_remove);
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
jQuery("body").append("");
jQuery("#TB_overlay").click(tb_remove);
jQuery( 'body' ).addClass( 'modal-open' );
}
}
if(tb_detectMacXFF()){
jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
}else{
jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
}
if(caption===null){caption="";}
jQuery("body").append("
");//add loader to the page
jQuery('#TB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
TB_PrevCaption = "";
TB_PrevURL = "";
TB_PrevHTML = "";
TB_NextCaption = "";
TB_NextURL = "";
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
if(imageGroup){
TB_TempArray = jQuery("a[rel="+imageGroup+"]").get();
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if (!(TB_TempArray[TB_Counter].href == url)) {
if (TB_FoundURL) {
TB_NextCaption = TB_TempArray[TB_Counter].title;
TB_NextURL = TB_TempArray[TB_Counter].href;
TB_NextHTML = ""+thickboxL10n.next+"";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[TB_Counter].href;
TB_PrevHTML = ""+thickboxL10n.prev+"";
}
} else {
TB_FoundURL = true;
TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - original by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
jQuery("#TB_window").append(""+thickboxL10n.close+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
");
jQuery("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML === "")) {
function goPrev(){
if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);}
jQuery("#TB_window").remove();
jQuery("body").append("");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
jQuery("#TB_prev").click(goPrev);
}
if (!(TB_NextHTML === "")) {
function goNext(){
jQuery("#TB_window").remove();
jQuery("body").append("");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
jQuery("#TB_next").click(goNext);
}
jQuery(document).bind('keydown.thickbox', function(e){
if ( e.which == 27 ){ // close
tb_remove();
} else if ( e.which == 190 ){ // display previous image
if(!(TB_NextHTML == "")){
jQuery(document).unbind('thickbox');
goNext();
}
} else if ( e.which == 188 ){ // display next image
if(!(TB_PrevHTML == "")){
jQuery(document).unbind('thickbox');
goPrev();
}
}
return false;
});
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_ImageOff").click(tb_remove);
jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html
var queryString = url.replace(/^[^\?]+\??/,'');
var params = tb_parseQuery( queryString );
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no parameters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no parameters were added to URL
ajaxContentW = TB_WIDTH - 30;
ajaxContentH = TB_HEIGHT - 45;
if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
urlNoQuery = url.split('TB_');
jQuery("#TB_iframeContent").remove();
if(params['modal'] != "true"){//iframe no modal
jQuery("#TB_window").append("
"+caption+"
");
}else{//iframe modal
jQuery("#TB_overlay").unbind();
jQuery("#TB_window").append("");
}
}else{// not an iframe, ajax
if(jQuery("#TB_window").css("visibility") != "visible"){
if(params['modal'] != "true"){//ajax no modal
jQuery("#TB_window").append("
"+caption+"
");
}else{//ajax modal
jQuery("#TB_overlay").unbind();
jQuery("#TB_window").append("");
}
}else{//this means the window is already up, we are just loading new content via ajax
jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
jQuery("#TB_ajaxContent")[0].scrollTop = 0;
jQuery("#TB_ajaxWindowTitle").html(caption);
}
}
jQuery("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
jQuery("#TB_window").bind('tb_unload', function () {
jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'});
}else{
var load_url = url;
load_url += -1 === url.indexOf('?') ? '?' : '&';
jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
jQuery("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
jQuery("#TB_window").css({'visibility':'visible'});
});
}
}
if(!params['modal']){
jQuery(document).bind('keydown.thickbox', function(e){
if ( e.which == 27 ){ // close
tb_remove();
return false;
}
});
}
$closeBtn = jQuery( '#TB_closeWindowButton' );
/*
* If the native Close button icon is visible, move focus on the button
* (e.g. in the Network Admin Themes screen).
* In other admin screens is hidden and replaced by a different icon.
*/
if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
$closeBtn.focus();
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' );
}
function tb_remove() {
jQuery("#TB_imageOff").unbind("click");
jQuery("#TB_closeWindowButton").unbind("click");
jQuery( '#TB_window' ).fadeOut( 'fast', function() {
jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).unbind().remove();
jQuery( 'body' ).trigger( 'thickbox:removed' );
});
jQuery( 'body' ).removeClass( 'modal-open' );
jQuery("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
jQuery("body","html").css({height: "auto", width: "auto"});
jQuery("html").css("overflow","");
}
jQuery(document).unbind('.thickbox');
return false;
}
function tb_position() {
var isIE6 = typeof document.body.style.maxHeight === "undefined";
jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( ! isIE6 ) { // take away IE6
jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
function tb_detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
};
// source --> https://better-than-ever.com/wp-content/plugins/vibe-shortcodes/js/shortcodes.js?ver=1.0
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
(function($) {
$.expr[":"].onScreen = function(elem) {
var $window = $(window);
var viewport_top = $window.scrollTop()
var viewport_height = $window.height()
var viewport_bottom = viewport_top + viewport_height
var $elem = $(elem)
var top = $elem.offset().top
var height = $elem.height()
var bottom = top + height
return (top >= viewport_top && top < viewport_bottom) ||
(bottom > viewport_top && bottom <= viewport_bottom) ||
(height > viewport_height && top <= viewport_top && bottom >= viewport_bottom)
}
})(jQuery);
jQuery(document).ready(function($){
$(window).scroll( function (){
$('.animate').filter(":onScreen").not('.load').each(function(i){
var $this=$(this);
var ind = i * 100;
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $this.offset().top;
if (docViewBottom >= elemTop) {
setTimeout(function(){
$this.trigger('load');
}, ind);
}
});
//End function
});
$('.animate').on('load',function(){
$(this).addClass('load');
});
$('.form_field').click(function(){
$(this).removeAttr('style');
});
});
jQuery(document).ready(function($){
$('.v_parallax_block').each(function(){
var $bgobj = $(this);
var i = parseInt($bgobj.attr('data-scroll'));
var rev = parseInt($bgobj.attr('data-rev'));
var ptop = $bgobj.parent().position().top;
var adjust = parseInt($bgobj.attr('data-adjust'));
var height = $bgobj.height();
var v_parallax_block_height = $bgobj.find('.parallax_content').height();
if(height",
nextText: "",
});
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
alignTop: true,
fixedContentPos: true,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in'
});
jQuery('.pop').magnificPopup({
type: 'image',
gallery:{
enabled:true
}
});
jQuery('.gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: 'The image #%curr% could not be loaded.',
titleSrc: function(item) {
return item.el.attr('title');
}
}
});
$('.knob').each(function(){
var $this = $(this).find('.dial');
var myVal = $this.val();
$this.knob({
draw : function () {
// "tron" case
if(this.$.data('skin') == 'tron') {
var a = this.angle(this.cv) // Angle
, sa = this.startAngle // Previous start angle
, sat = this.startAngle // Start angle
, ea // Previous end angle
, eat = sat + a // End angle
, r = true;
this.g.lineWidth = this.lineWidth;
this.o.cursor
&& (sat = eat - 0.3)
&& (eat = eat + 0.3);
if (this.o.displayPrevious) {
ea = this.startAngle + this.angle(this.value);
this.o.cursor
&& (sa = ea - 0.3)
&& (ea = ea + 0.3);
this.g.beginPath();
this.g.strokeStyle = this.previousColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false);
this.g.stroke();
}
this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
this.g.stroke();
this.g.lineWidth = 2;
this.g.beginPath();
this.g.strokeStyle = this.o.fgColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke();
return false;
}
}
});
$({
value: 0
}).animate({
value: myVal
}, {
duration: 2400,
easing: 'swing',
step: function () {
$this.val(Math.ceil(this.value)).trigger('change');
}
})
});
});
//AJAX CONTACT FORM
jQuery(document).ready(function ($) {
// SUBSCRIPTION FORM AJAX HANDLE
$( 'body' ).delegate( '.form .form_submit', 'click', function(event){
event.preventDefault();
var parent = $(this).parent();
var $response= parent.find(".response");
var nonce = $response.attr('data-security');
var error= '';
var to = []
var data = [];
var label = [];
var regex = [];
var to = parent.attr('data-to');
var subject = parent.attr('data-subject');
regex['email'] = /^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i;
regex['phone'] = /[A-Z0-9]{7}|[A-Z0-9][A-Z0-9-]{7}/i;
regex['numeric'] = /^[0-9]+$/i;
regex['captcha'] = /^[0-9]+$/i;
regex['required'] = /([^\s])/;
var i=0;
parent.find('.form_field').each(function(){
i++;
var validate=$(this).attr('data-validate');
var value = $(this).val();
if(!value.match(regex[validate])){
error += ' '+vibe_shortcode_strings.invalid_string+$(this).attr('placeholder');
$(this).css('border-color','#e16038');
}else{
data[i]=value;
label[i]=$(this).attr('placeholder');
if(parent.hasClass('isocharset')){
label[i]=encodeURI(label[i]);
data[i]=encodeURI(value);
}
}
if(validate === 'captcha' && error === ""){
var $num = $(this).attr('id');
var $sum=$(this).closest('.math-sum');
var num1 = parseInt($('#'+$num+'-1').text());
var num2 = parseInt($('#'+$num+'-2').text());
var sumval = parseInt($(this).val());
if( sumval != (num1+num2))
error += vibe_shortcode_strings.captcha_mismatch;
}
});
if (error !== "") {
$response.fadeIn("slow");
$response.html(""+vibe_shortcode_strings.error_string+" " + error + "");
} else {
$response.css("display", "block");
$response.html(""+vibe_shortcode_strings.sending_mail+"... ");
$response.fadeIn("slow");
setTimeout(function(){sendmail(to,subject,data,label,parent,nonce);}, 2000);
}
return false;
});
function sendmail(to,subject,formdata,labels,parent,nonce) {
var $response= parent.find(".response");
var isocharset = false;
if(parent.hasClass('isocharset'))
isocharset=true;
$.ajax({
type: "POST",
url: ajaxurl,
data: { action: 'vibe_form_submission',
to: to,
subject : subject,
data:JSON.stringify(formdata),
label:JSON.stringify(labels),
isocharset:isocharset,
security:nonce
},
cache: false,
success: function (html) {
console.log(html);
$response.fadeIn("slow");
$response.html(html);
if(html.indexOf(' 0){
return;
}
var itemwidth = parseInt($this.attr('data-block-width'));
var min= parseInt($this.attr('data-block-min'));
var max = parseInt($this.attr('data-block-max'));
var vibe_carousel={
animation: "slide",
controlNav: false,
directionNav: true,
animationLoop: false,
slideshow: false,
itemWidth: itemwidth,
maxItems: max,
minItems: min,
itemMargin: 30,
prevText: "",
nextText: "",
start: function() {
$this.removeClass('loading');
}
};
if($this.length > 0){
var custom=eval('op'+$this.attr('id'));
$.extend(vibe_carousel,custom);
$this.flexslider(vibe_carousel);
}
});
});
/*======= FILTERABLE=======*/
jQuery(window).load(function ($) {
var $ = jQuery;
$('.custom_post_filterable').each(function(){
var $container = $(this).find('.filterableitems_container'),
$filtersdiv = $(this).find('.vibe_filterable'),
$checkboxes = $(this).find('.vibe_filterable a');
if(jQuery.fn.imagesLoaded){
$container.imagesLoaded( function(){
$container.isotope({
itemSelector: '.filteritem'
});
});
} else{
$container.isotope({
itemSelector: '.filteritem'
});
}
$checkboxes.click(function(event){
event.preventDefault();
var me = $(this);
$filtersdiv.find('.active').removeClass();
var filters = me.attr('data-filter');
me.parent().addClass('active');
$container.isotope({filter: filters});
});
$('.vibe_filterable a:first').trigger('click');
$('.vibe_filterable a:first').parent().addClass('active');
});
});
jQuery(window).load(function ($) {
jQuery('.grid.masonry').each(function($){
var $container = jQuery(this);
$container.imagesLoaded( function(){
var width= parseInt($container.attr('data-width'));
var gutter= parseInt($container.attr('data-gutter'));
$container.masonry({
itemSelector: '.grid-item',
columnWidth: width,
gutterWidth: gutter,
isAnimated: true
});
});
});
});
jQuery(document).ready(function ($) {
$('.fitvids').fitVids();
if($('.vibe_grid').length && $('.vibe_grid').hasClass('inifnite_scroll')){
var $this= $('.vibe_grid.inifnite_scroll:not(.loaded)');
var end = $this.parent().find('.end_grid');
var load = $this.parent().find('.load_grid');
var args = $this.find('.wp_query_args').html();
var max = parseInt($this.find('.wp_query_args').attr('data-max-pages'));
var top = $('.vibe_grid.inifnite_scroll:not(.loaded) li:last').offset().top -500;
var rel = parseInt($('.vibe_grid.inifnite_scroll:not(.loaded)').attr('data-page'));
$(window).data('ajaxready', true).scroll(function(e) {
if ($(window).data('ajaxready') == false) return;
if(!$('.vibe_grid.inifnite_scroll').hasClass('loaded'))
top = $('.vibe_grid.inifnite_scroll:not(.loaded) li:last').offset().top -500;
else
rel = max;
if ($(window).scrollTop() >= top && rel < max ) {
$(window).data('ajaxready', false);
$.ajax({
type: "POST",
url: ajaxurl,
data: {action: 'grid_scroll',
args: args,
page: rel
},
cache: false,
success: function (html) {
if(html){
rel++;
$this.attr('data-page',rel);
if($this.hasClass('masonry')){
$('.vibe_grid.inifnite_scroll:not(.loaded) .grid.masonry').append(html).masonry('reload');
$(window).trigger('resize');
$('.vibe_grid.inifnite_scroll .grid.masonry').imagesLoaded( function(){
$('.vibe_grid.inifnite_scroll .grid.masonry').masonry('reload');});
}else{
$('.vibe_grid.inifnite_scroll:not(.loaded)>.grid>li:last').after(html);
}
}
$(window).data('ajaxready', true);
}
});
}else{
if(rel == max){
end.fadeIn(200);
load.fadeOut(200);
$this.addClass('loaded');
}
}
});
}
});
jQuery(document).ready(function($){
// Uploading files
var zip_uploader;
jQuery('#upload_zip_button').on('click', function( event ){
event.preventDefault();
var url = $(this).attr('data-admin-url')+'media-upload.php?type=upload&tab=upload&TB_iframe=1';
tb_show('Upload ZIP package', url );
});
});
// source --> https://better-than-ever.com/wp-content/plugins/better-wp-security/core/modules/wordpress-tweaks/js/blankshield/blankshield.min.js?ver=4114
/**
* blankshield - Prevent reverse tabnabbing phishing attacks caused by _blank
*
* @version 0.6.0
* @link https://github.com/danielstjules/blankshield
* @author Daniel St. Jules
* @license MIT
*/
!function(e){"use strict";function n(e){if("undefined"==typeof e.length)o(e,"click",t);else if("string"!=typeof e&&!(e instanceof String))for(var n=0;n https://better-than-ever.com/wp-content/plugins/better-wp-security/core/modules/wordpress-tweaks/js/block-tabnapping.min.js?ver=4114
document.addEventListener("DOMContentLoaded",function(){function n(r,e){var i=e.match(r);return i&&i.length>0&&i[1]||""}function a(r,e){var i=e.match(r);return i&&i.length>1&&i[2]||""}var t=/version\/(\d+(\.?_?\d+)+)/i;var s=[{test:[/googlebot/i],i:function r(r){var e={name:"Googlebot"};var i=n(/googlebot\/(\d+(\.\d+))/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/opera/i],i:function r(r){var e={name:"Opera"};var i=n(t,r)||n(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/opr\/|opios/i],i:function r(r){var e={name:"Opera"};var i=n(/(?:opr|opios)[\s/](\S+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/SamsungBrowser/i],i:function r(r){var e={name:"Samsung Internet for Android"};var i=n(t,r)||n(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/Whale/i],i:function r(r){var e={name:"NAVER Whale Browser"};var i=n(t,r)||n(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/MZBrowser/i],i:function r(r){var e={name:"MZ Browser"};var i=n(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/focus/i],i:function r(r){var e={name:"Focus"};var i=n(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/swing/i],i:function r(r){var e={name:"Swing"};var i=n(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/coast/i],i:function r(r){var e={name:"Opera Coast"};var i=n(t,r)||n(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/yabrowser/i],i:function r(r){var e={name:"Yandex Browser"};var i=n(t,r)||n(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/ucbrowser/i],i:function r(r){var e={name:"UC Browser"};var i=n(t,r)||n(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/Maxthon|mxios/i],i:function r(r){var e={name:"Maxthon"};var i=n(t,r)||n(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/epiphany/i],i:function r(r){var e={name:"Epiphany"};var i=n(t,r)||n(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/puffin/i],i:function r(r){var e={name:"Puffin"};var i=n(t,r)||n(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/sleipnir/i],i:function r(r){var e={name:"Sleipnir"};var i=n(t,r)||n(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/k-meleon/i],i:function r(r){var e={name:"K-Meleon"};var i=n(t,r)||n(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/micromessenger/i],i:function r(r){var e={name:"WeChat"};var i=n(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/msie|trident/i],i:function r(r){var e={name:"Internet Explorer"};var i=n(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/edg([ea]|ios)/i],i:function r(r){var e={name:"Microsoft Edge"};var i=a(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/vivaldi/i],i:function r(r){var e={name:"Vivaldi"};var i=n(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/seamonkey/i],i:function r(r){var e={name:"SeaMonkey"};var i=n(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/sailfish/i],i:function r(r){var e={name:"Sailfish"};var i=n(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);if(i){e.version=i}return e}},{test:[/silk/i],i:function r(r){var e={name:"Amazon Silk"};var i=n(/silk\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/phantom/i],i:function r(r){var e={name:"PhantomJS"};var i=n(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/slimerjs/i],i:function r(r){var e={name:"SlimerJS"};var i=n(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],i:function r(r){var e={name:"BlackBerry"};var i=n(t,r)||n(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/(web|hpw)[o0]s/i],i:function r(r){var e={name:"WebOS Browser"};var i=n(t,r)||n(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/bada/i],i:function r(r){var e={name:"Bada"};var i=n(/dolfin\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/tizen/i],i:function r(r){var e={name:"Tizen"};var i=n(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/qupzilla/i],i:function r(r){var e={name:"QupZilla"};var i=n(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/firefox|iceweasel|fxios/i],i:function r(r){var e={name:"Firefox"};var i=n(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/chromium/i],i:function r(r){var e={name:"Chromium"};var i=n(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/chrome|crios|crmo/i],i:function r(r){var e={name:"Chrome"};var i=n(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:function e(r){var e=!/like android/i.test(r);var i=/android/i.test(r);return e&&i},i:function r(r){var e={name:"Android Browser"};var i=n(t,r);if(i){e.version=i}return e}},{test:[/safari|applewebkit/i],i:function r(r){var e={name:"Safari"};var i=n(t,r);if(i){e.version=i}return e}},{test:[/.*/i],i:function r(r){return{name:n(/^(.*)\/(.*) /,r),version:a(/^(.*)\/(.*) /,r)}}}];function i(r,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var n=d(r);var a=d(e);var t=Math.max(n,a);var s=0;var o=f([r,e],function(r){var e=t-d(r);var i=r+new Array(e+1).join(".0");return f(i.split("."),function(r){return new Array(20-r.length).join("0")+r}).reverse()});if(i){s=t-Math.min(n,a)}t-=1;while(t>=s){if(o[0][t]>o[1][t]){return 1}if(o[0][t]===o[1][t]){if(t===s){return 0}t-=1}else if(o[0][t]0){w+=" noopener"}else{w+="noopener"}l.setAttribute("rel",w)}}else{blankshield(document.querySelectorAll("a[target=_blank]"))}});
// source --> https://better-than-ever.com/wp-includes/js/mediaelement/wp-mediaelement.min.js?ver=4.9.28
!function(e,n){e.wp=e.wp||{},e.wp.mediaelement=new function(){var e={};return{initialize:function(){(e="undefined"!=typeof _wpmejsSettings?n.extend(!0,{},_wpmejsSettings):e).classPrefix="mejs-",e.success=e.success||function(e){var n,t;e.rendererName&&-1!==e.rendererName.indexOf("flash")&&(n=e.attributes.autoplay&&"false"!==e.attributes.autoplay,t=e.attributes.loop&&"false"!==e.attributes.loop,n&&e.addEventListener("canplay",function(){e.play()},!1),t&&e.addEventListener("ended",function(){e.play()},!1))},e.customError=function(e,n){if(-1!==e.rendererName.indexOf("flash")||-1!==e.rendererName.indexOf("flv"))return''+mejsL10n.strings["mejs.download-video"]+""},n(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(e)}}},n(e.wp.mediaelement.initialize)}(window,jQuery);
// source --> https://better-than-ever.com/wp-content/plugins/wp-spamshield/js/jscripts-ftr-min.js
function wpss_get_ckf(e){var t=document.cookie.split(";");for(var s in t)if(t.hasOwnProperty(s))if(-1!=t[s].indexOf(e+"="))return decodeURIComponent(t[s].split("=")[1]);return""}function wpss_set_ckf(e,t,s,n,i,_){var c=new Date;c.setTime(c.getTime()),s&&(s=1e3*s*60*60*24);var r=new Date(c.getTime()+s);document.cookie=e+"="+escape(t)+(s?";expires="+r.toGMTString():"")+(n?";path="+n:"")+(i?";domain="+i:"")+(_?";secure":"")}function wpss_init_ckf(){var e=wpss_get_ckf("JCS_INENREF"),t=wpss_get_ckf("JCS_INENTIM"),s=new Date,n=s.getTime(),i=document.referrer;e||wpss_set_ckf("JCS_INENREF",i,1/24,"/"),t||wpss_set_ckf("JCS_INENTIM",n,1/24,"/");var h=window.history.length;var p=navigator.plugins.length;var q="N:"+p.toString();var u="";for(var j=0;j
").attr("type","hidden").attr("name","WP55T3S7XJS2").attr("value","7H5W8K53HX").appendTo(f);return true;})});
// source --> https://better-than-ever.com/wp-includes/js/wp-embed.min.js?ver=4.9.28
!function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c https://better-than-ever.com/wp-content/plugins/vibe-course-module/includes/js/course-module-js.min.js?ver=1.9.6
/*
html2canvas 0.5.0-alpha1
Copyright (c) 2015 Niklas von Hertzen
Released under MIT License
*/
(function(window, document, exports, global, define, undefined){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.0.1
*/
(function(){function r(a,b){n[l]=a;n[l+1]=b;l+=2;2===l&&A()}function s(a){return"function"===typeof a}function F(){return function(){process.nextTick(t)}}function G(){var a=0,b=new B(t),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}function H(){var a=new MessageChannel;a.port1.onmessage=t;return function(){a.port2.postMessage(0)}}function I(){return function(){setTimeout(t,1)}}function t(){for(var a=0;a= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
/** Convenience shortcuts */
baseMinusTMin = base - tMin,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
/** Temporary variable */
key;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, fn) {
var length = array.length;
var result = [];
while (length--) {
result[length] = fn(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {Array} A new string of characters returned by the callback
* function.
*/
function mapDomain(string, fn) {
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
string = parts[1];
}
var labels = string.split(regexSeparators);
var encoded = map(labels, fn).join('.');
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
var output = [],
counter = 0,
length = string.length,
value,
extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// high surrogate, and there is a next character
extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// unmatched surrogate; only append this code unit, in case the next
// code unit is the high surrogate of a surrogate pair
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/
function ucs2encode(array) {
return map(array, function(value) {
var output = '';
if (value > 0xFFFF) {
value -= 0x10000;
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
value = 0xDC00 | value & 0x3FF;
}
output += stringFromCharCode(value);
return output;
}).join('');
}
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
function basicToDigit(codePoint) {
if (codePoint - 48 < 10) {
return codePoint - 22;
}
if (codePoint - 65 < 26) {
return codePoint - 65;
}
if (codePoint - 97 < 26) {
return codePoint - 97;
}
return base;
}
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
}
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* http://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
function adapt(delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
}
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/
function decode(input) {
// Don't use UCS-2
var output = [],
inputLength = input.length,
out,
i = 0,
n = initialN,
bias = initialBias,
basic,
j,
index,
oldi,
w,
k,
digit,
t,
/** Cached calculation results */
baseMinusT;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base || digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output
output.splice(i++, 0, n);
}
return ucs2encode(output);
}
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
bias,
j,
m,
q,
k,
t,
currentValue,
output = [],
/** `inputLength` will hold the number of code points in `input`. */
inputLength,
/** Cached calculation results */
handledCPCountPlusOne,
baseMinusT,
qMinusT;
// Convert the input in UCS-2 to Unicode
input = ucs2decode(input);
// Cache the length
inputLength = input.length;
// Initialize the state
n = initialN;
delta = 0;
bias = initialBias;
// Handle the basic code points
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
handledCPCount = basicLength = output.length;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a delimiter
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
for (m = maxInt, j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's state to ,
// but guard against overflow
handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer
for (q = delta, k = base; /* no condition */; k += base) {
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
qMinusT = q - t;
baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
}
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
function toUnicode(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
}
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
function toASCII(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
}
/*--------------------------------------------------------------------------*/
/** Define the public API */
punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '1.3.1',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
/** Expose `punycode` */
// Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following:
if (
typeof define == 'function' &&
typeof define.amd == 'object' &&
define.amd
) {
define('punycode', function() {
return punycode;
});
} else if (freeExports && freeModule) {
if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+
freeModule.exports = punycode;
} else { // in Narwhal or RingoJS v0.7.0-
for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
}
}
} else { // in Rhino or a web browser
root.punycode = punycode;
}
}(this));
var html2canvasNodeAttribute = "data-html2canvas-node";
var html2canvasCanvasCloneAttribute = "data-html2canvas-canvas-clone";
var html2canvasCanvasCloneIndex = 0;
var html2canvasCloneIndex = 0;
window.html2canvas = function(nodeList, options) {
var index = html2canvasCloneIndex++;
options = options || {};
if (options.logging) {
window.html2canvas.logging = true;
window.html2canvas.start = Date.now();
}
options.async = typeof(options.async) === "undefined" ? true : options.async;
options.allowTaint = typeof(options.allowTaint) === "undefined" ? false : options.allowTaint;
options.removeContainer = typeof(options.removeContainer) === "undefined" ? true : options.removeContainer;
options.javascriptEnabled = typeof(options.javascriptEnabled) === "undefined" ? false : options.javascriptEnabled;
options.imageTimeout = typeof(options.imageTimeout) === "undefined" ? 10000 : options.imageTimeout;
options.renderer = typeof(options.renderer) === "function" ? options.renderer : CanvasRenderer;
options.strict = !!options.strict;
if (typeof(nodeList) === "string") {
if (typeof(options.proxy) !== "string") {
return Promise.reject("Proxy must be used when rendering url");
}
var width = options.width != null ? options.width : window.innerWidth;
var height = options.height != null ? options.height : window.innerHeight;
return loadUrlDocument(absoluteUrl(nodeList), options.proxy, document, width, height, options).then(function(container) {
return renderWindow(container.contentWindow.document.documentElement, container, options, width, height);
});
}
var node = ((nodeList === undefined) ? [document.documentElement] : ((nodeList.length) ? nodeList : [nodeList]))[0];
node.setAttribute(html2canvasNodeAttribute + index, index);
return renderDocument(node.ownerDocument, options, node.ownerDocument.defaultView.innerWidth, node.ownerDocument.defaultView.innerHeight, index).then(function(canvas) {
if (typeof(options.onrendered) === "function") {
log("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas");
options.onrendered(canvas);
}
return canvas;
});
};
window.html2canvas.punycode = this.punycode;
window.html2canvas.proxy = {};
function renderDocument(document, options, windowWidth, windowHeight, html2canvasIndex) {
return createWindowClone(document, document, windowWidth, windowHeight, options, document.defaultView.pageXOffset, document.defaultView.pageYOffset).then(function(container) {
log("Document cloned");
var attributeName = html2canvasNodeAttribute + html2canvasIndex;
var selector = "[" + attributeName + "='" + html2canvasIndex + "']";
document.querySelector(selector).removeAttribute(attributeName);
var clonedWindow = container.contentWindow;
var node = clonedWindow.document.querySelector(selector);
var oncloneHandler = (typeof(options.onclone) === "function") ? Promise.resolve(options.onclone(clonedWindow.document)) : Promise.resolve(true);
return oncloneHandler.then(function() {
return renderWindow(node, container, options, windowWidth, windowHeight);
});
});
}
function renderWindow(node, container, options, windowWidth, windowHeight) {
var clonedWindow = container.contentWindow;
var support = new Support(clonedWindow.document);
var imageLoader = new ImageLoader(options, support);
var bounds = getBounds(node);
var width = options.type === "view" ? windowWidth : documentWidth(clonedWindow.document);
var height = options.type === "view" ? windowHeight : documentHeight(clonedWindow.document);
var renderer = new options.renderer(width, height, imageLoader, options, document);
var parser = new NodeParser(node, renderer, support, imageLoader, options);
return parser.ready.then(function() {
log("Finished rendering");
var canvas;
if (options.type === "view") {
canvas = crop(renderer.canvas, {width: renderer.canvas.width, height: renderer.canvas.height, top: 0, left: 0, x: 0, y: 0});
} else if (node === clonedWindow.document.body || node === clonedWindow.document.documentElement || options.canvas != null) {
canvas = renderer.canvas;
} else {
canvas = crop(renderer.canvas, {width: options.width != null ? options.width : bounds.width, height: options.height != null ? options.height : bounds.height, top: bounds.top, left: bounds.left, x: clonedWindow.pageXOffset, y: clonedWindow.pageYOffset});
}
cleanupContainer(container, options);
return canvas;
});
}
function cleanupContainer(container, options) {
if (options.removeContainer) {
container.parentNode.removeChild(container);
log("Cleaned up container");
}
}
function crop(canvas, bounds) {
var croppedCanvas = document.createElement("canvas");
var x1 = Math.min(canvas.width - 1, Math.max(0, bounds.left));
var x2 = Math.min(canvas.width, Math.max(1, bounds.left + bounds.width));
var y1 = Math.min(canvas.height - 1, Math.max(0, bounds.top));
var y2 = Math.min(canvas.height, Math.max(1, bounds.top + bounds.height));
croppedCanvas.width = bounds.width;
croppedCanvas.height = bounds.height;
log("Cropping canvas at:", "left:", bounds.left, "top:", bounds.top, "width:", (x2-x1), "height:", (y2-y1));
log("Resulting crop with width", bounds.width, "and height", bounds.height, " with x", x1, "and y", y1);
croppedCanvas.getContext("2d").drawImage(canvas, x1, y1, x2-x1, y2-y1, bounds.x, bounds.y, x2-x1, y2-y1);
return croppedCanvas;
}
function documentWidth (doc) {
return Math.max(
Math.max(doc.body.scrollWidth, doc.documentElement.scrollWidth),
Math.max(doc.body.offsetWidth, doc.documentElement.offsetWidth),
Math.max(doc.body.clientWidth, doc.documentElement.clientWidth)
);
}
function documentHeight (doc) {
return Math.max(
Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight),
Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight),
Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
);
}
function smallImage() {
return "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
}
function isIE9() {
return document.documentMode && document.documentMode <= 9;
}
// https://github.com/niklasvh/html2canvas/issues/503
function cloneNodeIE9(node, javascriptEnabled) {
var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false);
var child = node.firstChild;
while(child) {
if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') {
clone.appendChild(cloneNodeIE9(child, javascriptEnabled));
}
child = child.nextSibling;
}
return clone;
}
function createWindowClone(ownerDocument, containerDocument, width, height, options, x ,y) {
labelCanvasElements(ownerDocument);
var documentElement = isIE9() ? cloneNodeIE9(ownerDocument.documentElement, options.javascriptEnabled) : ownerDocument.documentElement.cloneNode(true);
var container = containerDocument.createElement("iframe");
container.className = "html2canvas-container";
container.style.visibility = "hidden";
container.style.position = "fixed";
container.style.left = "-10000px";
container.style.top = "0px";
container.style.border = "0";
container.width = width;
container.height = height;
container.scrolling = "no"; // ios won't scroll without it
containerDocument.body.appendChild(container);
return new Promise(function(resolve) {
var documentClone = container.contentWindow.document;
cloneNodeValues(ownerDocument.documentElement, documentElement, "textarea");
cloneNodeValues(ownerDocument.documentElement, documentElement, "select");
/* Chrome doesn't detect relative background-images assigned in inline ").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return u.ui.ddmanager&&(u.ui.ddmanager.current=this),u.ui.ddmanager&&!r.dropBehaviour&&u.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,o,r=this.options,n=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?c:r",i.document[0]).addClass(s||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),u("
');
setTimeout(function(){statusdiv.hide(300).html('').show();}, 2000);
}
}
});
return false;
});
});
} // END Function
//Cookie evaluation
jQuery(document).ready( function($) {
$('.open_popup_link').magnificPopup({
type:'inline',
midClick: true
});
$('.item-list').each(function(){
var cookie_name = 'bp-'+$('.item-list').attr('id');
var cookieValue = $.cookie(cookie_name);
if ((cookieValue !== null) && cookieValue == 'grid') {
$('.item-list').addClass('grid');
$('#list_view').removeClass('active');
$('#grid_view').addClass('active');
}
});
function bp_course_extras_cookies(){
$('.category_filter .bp-course-category-filter,.type_filter .bp-course-free-filter,.level_filter .bp-course-level-filter,.instructor_filter .bp-course-instructor-filter').on('click',function(){
var category_filter=[];
$('.bp-course-category-filter:checked').each(function(){
var category={'type':'course-cat','value':$(this).val()};
category_filter.push(category);
});
$('.bp-course-free-filter:checked').each(function(){
var free={'type':'free','value':$(this).val()};
category_filter.push(free);
});
$('.bp-course-level-filter:checked').each(function(){
var level={'type':'level','value':$(this).val()};
category_filter.push(level);
});
$('.bp-course-instructor-filter:checked').each(function(){
var level={'type':'instructor','value':$(this).val()};
category_filter.push(level);
});
$.cookie('bp-course-extras', JSON.stringify(category_filter), { expires: 1 ,path: '/'});
});
}
function bp_course_category_filter_cookie(){
var category_filter_cookie = $.cookie("bp-course-extras");
if ((category_filter_cookie !== null)) {
var category_filter = JSON.parse(category_filter_cookie);
if($('#active_filters').length){
$('#active_filters').fadeIn(200);
}else{
$('#course-dir-list').before('
'+vibe_course_module_strings.active_filters+'
');
}
//Detect and activate specific filters
jQuery.each(category_filter, function(index, item) {
$('input[value="'+item['value']+'"]').prop('checked', true);
var id = $('input[value="'+item['value']+'"]').attr('id');
var text = $('label[for="'+id+'"]').text();
if(!$('#active_filters span[data-id="'+id+'"]').length)
$('#active_filters').append('
'+text+'
');
});
// Delete a specific filter
$('#active_filters li span').on('click',function(){
var id = $(this).attr('data-id');
$(this).parent().fadeOut(200,function(){
$(this).remove();
if($('#active_filters li').length < 3)
$('#active_filters').fadeOut(200);
else
$('#active_filters').fadeIn(200);
});
$('#'+id).prop('checked',false);
/*===== */
var category_filter=[];
$('.bp-course-category-filter:checked').each(function(){
var category={'type':'course-cat','value':$(this).val()};
category_filter.push(category);
});
$('.bp-course-free-filter:checked').each(function(){
var free={'type':'free','value':$(this).val()};
category_filter.push(free);
});
$('.bp-course-level-filter:checked').each(function(){
var level={'type':'level','value':$(this).val()};
category_filter.push(level);
});
$('.bp-course-instructor-filter:checked').each(function(){
var level={'type':'instructor','value':$(this).val()};
category_filter.push(level);
});
$.cookie('bp-course-extras', JSON.stringify(category_filter), { expires: 1 ,path: '/'});
$('#submit_filters').trigger('click');
/* ==== */
});
if(!$('#active_filters .all-filter-clear').length)
$('#active_filters').append('