Appt Icon Pin Icon Phone Icon
logo

Thank you for choosing to make Bay Colony Dentistry your dental home. Our dentist and team are dedicated to making our patients’ experience exceptional, and we value your thoughts. Please leave us a review about your experience in our office. If you are new to the area, we invite you to read some of our reviews to get a feel for the quality of care we provide. If you have questions, or to schedule an appointment with Dr. Deborah Blanchard at our friendly dental office in Virginia Beach, Virginia, call us today at 757-333-0922.

"); jQuery("#TB_overlay").click(tb_remove); } }else{ 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"); }else{ jQuery("#TB_overlay").addClass("TB_overlayBG"); } if(caption===null){caption="";} jQuery("body").append("
"); jQuery('#TB_load').show(); var baseURL; if(url.indexOf("?")!==-1){ 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'){ 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; 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; } } TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+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 ){ tb_remove(); } else if ( e.which == 190 ){ if(!(TB_NextHTML == "")){ jQuery(document).unbind('thickbox'); goNext(); } } else if ( e.which == 188 ){ 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'}); }; imgPreloader.src = url; }else{ var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; TB_HEIGHT = (params['height']*1) + 40 || 440; ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){ urlNoQuery = url.split('TB_'); jQuery("#TB_iframeContent").remove(); if(params['modal'] != "true"){ jQuery("#TB_window").append("
"+caption+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append(""); } }else{ if(jQuery("#TB_window").css("visibility") != "visible"){ if(params['modal'] != "true"){ jQuery("#TB_window").append("
"+caption+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append("
"); } }else{ 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() ); }); 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(){ 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 ){ tb_remove(); return false; } }); } $closeBtn = jQuery( '#TB_closeWindowButton' ); if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) { $closeBtn.focus(); } } catch(e) { }}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") { 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 ) { jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); }}function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;} 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; }}(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);window.wp=window.wp||{},function(){wp.shortcode={next:function(a,b,c){var d,e,f=wp.shortcode.regexp(a);if(f.lastIndex=c||0,d=f.exec(b))return"["===d[1]&&"]"===d[7]?wp.shortcode.next(a,b,f.lastIndex):(e={index:d.index,content:d[0],shortcode:wp.shortcode.fromMatch(d)},d[1]&&(e.content=e.content.slice(1),e.index++),d[7]&&(e.content=e.content.slice(0,-1)),e)},replace:function(a,b,c){return b.replace(wp.shortcode.regexp(a),function(a,b,d,e,f,g,h,i){if("["===b&&"]"===i)return a;var j=c(wp.shortcode.fromMatch(arguments));return j?b+j+i:a})},string:function(a){return new wp.shortcode(a).string()},regexp:_.memoize(function(a){return new RegExp("\\[(\\[?)("+a+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(a){var b,c,d={},e=[];for(b=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g,a=a.replace(/[\u00a0\u200b]/g," ");c=b.exec(a);)c[1]?d[c[1].toLowerCase()]=c[2]:c[3]?d[c[3].toLowerCase()]=c[4]:c[5]?d[c[5].toLowerCase()]=c[6]:c[7]?e.push(c[7]):c[8]?e.push(c[8]):c[9]&&e.push(c[9]);return{named:d,numeric:e}}),fromMatch:function(a){var b;return b=a[4]?"self-closing":a[6]?"closed":"single",new wp.shortcode({tag:a[2],attrs:a[3],type:b,content:a[5]})}},wp.shortcode=_.extend(function(a){_.extend(this,_.pick(a||{},"tag","attrs","type","content"));var b=this.attrs;this.attrs={named:{},numeric:[]},b&&(_.isString(b)?this.attrs=wp.shortcode.attrs(b):_.isEqual(_.keys(b),["named","numeric"])?this.attrs=b:_.each(a.attrs,function(a,b){this.set(b,a)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(a){return this.attrs[_.isNumber(a)?"numeric":"named"][a]},set:function(a,b){return this.attrs[_.isNumber(a)?"numeric":"named"][a]=b,this},string:function(){var a="["+this.tag;return _.each(this.attrs.numeric,function(b){a+=/\s/.test(b)?' "'+b+'"':" "+b}),_.each(this.attrs.named,function(b,c){a+=" "+c+'="'+b+'"'}),"single"===this.type?a+"]":"self-closing"===this.type?a+" /]":(a+="]",this.content&&(a+=this.content),a+"[/"+this.tag+"]")}})}(),function(){wp.html=_.extend(wp.html||{},{attrs:function(a){var b,c;return"/"===a[a.length-1]&&(a=a.slice(0,-1)),b=wp.shortcode.attrs(a),c=b.named,_.each(b.numeric,function(a){/\s/.test(a)||(c[a]="")}),c},string:function(a){var b="<"+a.tag,c=a.content||"";return _.each(a.attrs,function(a,c){b+=" "+c,_.isBoolean(a)&&(a=a?"true":"false"),b+='="'+a+'"'}),a.single?b+" />":(b+=">",b+=_.isObject(c)?wp.html.string(c):c,b+"")}})}();var wpActiveEditor,send_to_editor;send_to_editor=function(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=tinymce.get(wpActiveEditor));else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;if(b&&!b.isHidden()?b.execCommand("mceInsertContent",!1,a):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a,window.tb_remove)try{window.tb_remove()}catch(e){}};var tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=833 0) { jQuery('tr.found').hide(); } else { jQuery('tr.found').show(); } return true; }); jQuery('input[name=primary_insurance]').bind('change',function(){ v = jQuery('input[name=primary_insurance]:checked').val(); if (v > 0) { jQuery('tr.primaryins').hide(); } else { jQuery('tr.primaryins').show(); } return true; }); jQuery('input[name=secondary_insurance]').bind('change',function(){ v = jQuery('input[name=secondary_insurance]:checked').val(); if (v > 0) { jQuery('tr.secondaryins').hide(); } else { jQuery('tr.secondaryins').show(); } return true; }); jQuery('input[name=field_accept_cc]').bind('change',function(){ v = jQuery('input[name=field_accept_cc]:checked').val(); if (v > 0) { jQuery('tr.creditcards').hide(); } else { } return true; }); jQuery('input[name=field_accept_carecredit]').bind('change',function(){ v = jQuery('input[name=field_accept_carecredit]:checked').val(); if (v > 0) { jQuery('tr.carecredit').hide(); } else { jQuery('tr.carecredit').show(); } return true; }); jQuery('.individual_fields_checkbox').change( function(){ checked = jQuery(this).attr('checked'); name = jQuery(this).val(); if (checked) { jQuery('tbody#'+name).show(); } else { jQuery('tbody#'+name).hide(); } } ); jQuery('.multifield_header input[type=radio], .submodule input[type=radio]').bind('change',function() { change_multihead(); }); jQuery('.custom_text').change( function(){ if (jQuery(this).val()) { jQuery(this).parent().parent().find('input[type=radio][value=0]').trigger('click'); } else { jQuery(this).parent().parent().find('input[type=radio][value=1]').trigger('click'); } } ); jQuery('body.toplevel_page_patient_form_settings div.wrap div.icon32 + h2, body.patient-forms_page_patient_forms_top div.wrap div.icon32 + h2, body.patient-forms_page_patient_form_pdf_options div.wrap div.icon32 + h2').prependTo('#wpbody-content'); jQuery('body.toplevel_page_patient_form_settings div.wrap div#icon-bpi-patient-forms, body.patient-forms_page_patient_forms_top div.wrap div#icon-bpi-patient-forms, body.patient-forms_page_patient_form_pdf_options div.wrap div#icon-bpi-patient-forms').prependTo('#wpbody-content'); jQuery('#patient_search #clear_search').click( function() { } ); jQuery('#custom_info_sections').change( function(){ custom_info_sections_change() } ); custom_info_sections_change(); change_multihead(); module_change();});function custom_info_sections_change(){ jQuery('.custom_info_section').hide(); for (i=0; i<=jQuery('#custom_info_sections').val();i++) { jQuery('#custom_info_section_'+i).show(); }}function module_change() { jQuery('tr.module input[type=radio], tr.module input[type=checkbox]').each(function(){ if (jQuery(this).attr('name')) { n=jQuery(this).attr('name'); } else if (jQuery(this).attr('id')) { n=jQuery(this).attr('id'); } n=n.replace(/_fields$/); v = jQuery('tr.module input[name='+n+']:checked').val(); c = jQuery('input[type=checkbox][value='+n+']:checked').length; if (v > 0 || !c) { jQuery('tr.'+n).hide(); } else { jQuery('tr.'+n).show(); } }); return true;}function change_multihead() { jQuery('.multifield_header, .submodule').each(function(){ which = jQuery(this).find('input[type=radio]').first().attr('name'); val = jQuery('input[name='+which+'][type=radio]:checked').val(); if (val == 1) { jQuery('tr.'+which).hide(); } else { jQuery('tr.'+which).show(); } });}"use strict";var ReviewMain = function (cache, myModalEle){ this.cache = cache; this.myModalEle = myModalEle; if (cache.colEle1) { this.setup(); }};ReviewMain.prototype ={ constructor: ReviewMain, setup: function () { this.getReviews(); this.setupModal(); this.submitModal(); }, settings: null, reviews: null, getReviews: function () { var $ = jQuery, colNum = 0, columns = this.cache, self = this; this.settings = $('.col-box').data('settings'); this.reviews = JSON.parse(reviews); for (var i = 0, len = this.reviews.length; i < len; i++) { colNum = self.setColNum() + 1; var review = this.reviews[i].review, reviewer_name = this.reviews[i].reviewer_name, stars = this.reviews[i].stars; columns['colEle' + colNum].innerHTML += self.reviewBuilder(review.replace(/\\/g, ''), reviewer_name.replace(/\\/g, ''), stars); } self.showFirst(); }, reviewBuilder: function (review, reviewer, stars) { var self = this; var putStars = this.makeStars(stars); var putDiv = "
"; putDiv += putStars + "
"; return putDiv; }, getHeight: function (num) { var doc = document, ele = doc.getElementById('col-' + num); if (ele) { return ele.clientHeight; } return 0; }, setColNum: function () { var columnHeights = [], self = this, doc = document, cols = doc.getElementsByClassName('review-column'); for (var i = 1, len = cols.length; i <= len; i++) { var colHeight = self.getHeight(i); columnHeights.push(colHeight); } var shortColumn = this.indexOfSmallest(columnHeights); return shortColumn; }, indexOfSmallest: function (columnHeights) { var shortestHeight = 0; for (var i = 0, len = columnHeights.length; i < len; i++) { if (columnHeights[i] < columnHeights[shortestHeight]) { shortestHeight = i; } } return shortestHeight; }, makeStars: function (stars) { var starBox = "
", self = this; if (self.settings[0].showStars === 'true') { starBox += "
    "; for (var i = 5; i > 0; i--) { if (i === Number(stars)) { starBox += "
  • "; } else { starBox += "
  • "; } } starBox += '
'; } else { starBox += "
    "; } starBox += '
    '; return starBox; }, showFirst: function () { var $ = jQuery, doc = document, cols = doc.getElementsByClassName('review-column'); for (var i = 1, len = cols.length; i <= len; i++) { $('#col-' + i + ' div').first().addClass(this.settings[0].animation).css({ "opacity": '1', "margin-top": '0' }); } }, addException: function () { if (typeof bpMain.addException === 'function') { bpMain.addException('bpfrModal'); } else { modalArray.push('bpfrModal'); } }, setupModal: function () { var $ = jQuery, firstModal = this.myModalEle; $("").insertAfter(firstModal); this.addException(); var modalForm = ""; modalForm += ""; $('#bpfrModal').html(modalForm); }, validate: function () { var $ = jQuery, url = $('#url').val(); if (url === '' || url === 'URL') { var review = $('#review').val(), reviewer = $('#reviewer').val(), manualSuccess = $('#modal_success_manual'), msg = ''; if (review === '' || review === 'Insert Review Here:') { msg += "
    Please enter a review
    "; } if (reviewer === '' || reviewer === 'Display Name:') { msg += "
    Please enter a reviewer
    "; } if (msg !== '') { manualSuccess.html(msg); } else { return true; } } return false; }, prepareJsonUrl: function() { var $ = jQuery; return { review: $('#review').val(), reviewer: $('#reviewer').val(), stars: $('input[name="modal-rating"]:checked').val(), publish: 0, should_review: 1, send_email: 1 }; }, submitModal: function() { var $ = jQuery, saveReview = $('#modal-save-review-btn'), self = this; saveReview.on('click', function () { if (self.validate()) { var data = { action: 'storeReview', review: self.prepareJsonUrl() }, ajaxurl = '/wp-admin/admin-ajax.php'; $.post(ajaxurl, data, function () { $("#modal_success_manual").html("
    Your review has been edited. Thank you!
    "); $('#review').val(''); $('#reviewer').val(''); $('input[name="modal-rating"]:checked').attr('checked', false); $('input#star5').attr('checked', true); setTimeout(msgFade, 3000); setTimeout(msgClear, 5000); function msgFade() { $('.saveSuccess').addClass('fadeOut'); } function msgClear() { $('#modal_success_manual').html(''); } }); } else { $("#success_manual").html("
    Thank you for your submission
    "); } }); }};jQuery(function (){ var doc = document, cache = this.cache = {}, cols = doc.getElementsByClassName('review-column'); for (var i = 0, len = cols.length; i < len; i++) { var child = cols[i]; cache['colEle' + (i + 1)] = child; } var reviewController = new ReviewMain(cache, doc.getElementById('myModal'));});var BPForms = {};BPForms.ajax = { request: function(action, data, callback) { var url = '/wp-admin/admin-ajax.php'; if (typeof ajaxurl !== 'undefined') { url = ajaxurl; } if (typeof ajax_url !== 'undefined') { url = ajax_url; } var params = {}; if (data && typeof data === 'object') { params = data; } params.action = action; var formData = new FormData(); for (var i in params) { formData.append(i, params[i]); } jQuery.ajax({ url: url, type: 'POST', data: formData, success: callback, cache: false, contentType: false, processData: false }); }, post: function(action, formData, callback) { var self = this; jQuery.ajax({ url: '/wp-admin/admin-ajax.php', type: 'POST', data: formData, success: callback, cache: false, contentType: false, processData: false }); },};BPForms.getParams = function(){ var str = window.location.search; var objURL = {}; var regExp = /([^?=&]+)(=([^&]*))?/g; str.replace(regExp, function(a, b, c, d) { objURL[b] = d; }); return objURL;};BPForms.fillPDFViewer = function(){ var queryString = this.getParams(); var label = document.getElementById('bp-form-viewer-name'); var obj = document.getElementById('bp-form-viewer'); var frame = obj.children[0]; var params = { id: queryString.id }; this.ajax.request('bp_forms_get_form', params, function(data) { data = JSON.parse(data); label.textContent = data.name; var url = '/wp-content/uploads/bp-forms/' + data.path; obj.data = url; });};BPForms.markAsRead = function(id){ var params = { id: id }; this.ajax.request('bpforms_fr_markread', params, function(data) { });};(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
    ').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
    ').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery);(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);(function ($) { "use strict"; var F = $.fancybox, format = function( url, rez, params ) { params = params || ''; if ( $.type( params ) === "object" ) { params = $.param(params, true); } $.each(rez, function(key, value) { url = url.replace( '$' + key, value || '' ); }); if (params.length) { url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; } return url; }; F.helpers.media = { defaults : { youtube : { matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, params : { autoplay : 1, autohide : 1, fs : 1, rel : 0, hd : 1, wmode : 'opaque', enablejsapi : 1 }, type : 'iframe', url : '//www.youtube.com/embed/$3' }, vimeo : { matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, params : { autoplay : 1, hd : 1, show_title : 1, show_byline : 1, show_portrait : 0, fullscreen : 1 }, type : 'iframe', url : '//player.vimeo.com/video/$1' }, metacafe : { matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, params : { autoPlay : 'yes' }, type : 'swf', url : function( rez, params, obj ) { obj.swf.flashVars = 'playerVars=' + $.param( params, true ); return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; } }, dailymotion : { matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, params : { additionalInfos : 0, autoStart : 1 }, type : 'swf', url : '//www.dailymotion.com/swf/video/$1' }, twitvid : { matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, params : { autoplay : 0 }, type : 'iframe', url : '//www.twitvid.com/embed.php?guid=$1' }, twitpic : { matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, type : 'image', url : '//twitpic.com/show/full/$1/' }, instagram : { matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, type : 'image', url : '//$1/p/$2/media/?size=l' }, google_maps : { matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, type : 'iframe', url : function( rez ) { return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); } } }, beforeLoad : function(opts, obj) { var url = obj.href || '', type = false, what, item, rez, params; for (what in opts) { if (opts.hasOwnProperty(what)) { item = opts[ what ]; rez = url.match( item.matcher ); if (rez) { type = item.type; params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); break; } } } if (type) { obj.href = url; obj.type = type; obj.autoHeight = false; } } };}(jQuery));(function(k){if(k.base)return!1;var h=function(){this.version="1.7.1";this.errors=[]};h.prototype={constructor:h,augment:function(a){if(a&&"object"===typeof a){var c=this.constructor.prototype,d;for(d in a)a.hasOwnProperty(d)&&(c[d]=a[d])}return this}};h.prototype.extend=h.prototype;var b=k._b=k.base=new h;b.augment({parseQueryString:function(a){a=a||k.location.search;var c={};a.replace(/([^?=&]+)(=([^&]*))?/g,function(a,b,f,g){c[b]=g});return!1===this.isEmpty(c)?c:!1},isEmpty:function(a){if(a&&"object"===typeof a)for(var c in a)if(a.hasOwnProperty(c))return!1;return!0},listToArray:function(a){return Array.prototype.slice.call(a)},curry:function(a){var c=this;return function(){return a.apply(c,c.listToArray(arguments))}},overrideMethod:function(a,c,d,b){return(a[c]=d).apply(a,this.listToArray(b))},camelCase:function(a){return"string"===typeof a?a.replace(/(-|\s|_)+\w{1}/g,function(a){return a[1].toUpperCase()}):!1},uncamelCase:function(a,c){return"string"===typeof a?(c=c||"-",a.replace(/([A-Z]{1,})/g,function(a){return c+a.toLowerCase()}).toLowerCase()):!1},_createEvent:function(){return this.overrideMethod(this,"_createEvent","CustomEvent"in window?function(a,c,d,b,f){return"HTMLEvents"===d?new Event(c):"MouseEvents"===d?new MouseEvent(c,b):new CustomEvent(c,f)}:"createEventObject"in document?function(a,c,d,b,f){a=document.createEventObject();a.eventType=c;return a}:function(a,c,d,b,f){var e=document.createEvent(d);"HTMLEvents"===d?a.initEvent(c,b.bubbles,b.cancelable):"MouseEvents"===d?e.initMouseEvent(c,b.canBubble,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget):"CustomEvent"===d&&e.initCustomEvent(c,b.bubbles,b.cancelable,f);return e},arguments)},createEvent:function(a,c,d,e){if(c&&"object"===typeof c){var f={pointerX:0,pointerY:0,button:0,view:window,detail:1,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,bubbles:!0,cancelable:!0,relatedTarget:null};d&&"object"===typeof d&&(f=b.extendObject(f,d));d={HTMLEvents:/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvents:/^(?:click|dblclick|mouse(?:down|up|over|move|out))$/};var g="CustomEvent",l;for(l in d)if(d.hasOwnProperty(l)&&a.match(d[l])){g=l;break}return this._createEvent(c,a,g,f,e)}return!1},_trigger:function(){return this.overrideMethod(this,"_trigger","createEvent"in document?function(a,c){a.dispatchEvent(c)}:function(a,c){a.fireEvent("on"+c.type,c)},arguments)},trigger:function(a,c,b){c&&"object"===typeof c&&(a="string"===typeof a?this.createEvent(a,c,null,b):a,this._trigger(c,a));return this},mouseWheelEventType:null,getMouseWheelEventType:function(){var a;(a=this.mouseWheelEventType)||(a="wheel","onmousewheel"in k?a="mousewheel":"DOMMouseScroll"in k&&(a="DOMMouseScroll"),a=this.mouseWheelEventType=a);return a},onMouseWheel:function(a,c,b,e){"undefined"===typeof c&&(c=window);var d=this,g=this.getMouseWheelEventType();jQuery(c).on(g,function(c){c=c||window.event;var f=Math.max(-1,Math.min(1,-c.deltaY||c.wheelDelta||-c.detail));"function"===typeof a&&a(f,c);"undefined"!==typeof b&&1==b&&d.preventDefault(c)},e);return this},offMouseWheel:function(a){"undefined"===typeof a&&(a=window);var c=this.getMouseWheelEventType();jQuery(a).off(c)},preventDefault:function(a){a=a||window.event;"function"===typeof a.preventDefault?a.preventDefault():a.returnValue=!1;return this},stopPropagation:function(a){a=a||window.event;"function"===typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;return this},getValue:function(a,c,b){return this.getProperty(a,c,b)},getProperty:function(a,c,b){return a&&"object"===typeof a&&a[c]?a[c]:"undefined"!==typeof b?b:""},getType:function(a){var c=typeof a;"object"===c&&!0===this.isArray(a)&&(c="array");return c},_isArray:function(){return this.overrideMethod(this,"_isArray","function"===typeof Array.isArray?function(a){return Array.isArray(a)}:function(a){return a instanceof Array?!0:!1},arguments)},isArray:function(a){return this._isArray(a)},_inArray:function(){return this.overrideMethod(this,"_inArray","function"===typeof Array.prototype.indexOf?function(a,c,b){return a.indexOf(c,b)}:function(a,c,b){var d=a.length;for(b=isNaN(b)?0:b;b)/i.test(f)?b.innerHTML=f:b.textContent=f);else if("data-"===g.substring(0,5))e.data(g,f);else{var l=typeof f;if("undefined"!==l&&""!=f){var m=g;switch(m){case "class":m="className";break;case "for":m="htmlFor";break;case "readonly":m="readOnly";break;case "maxlength":m="maxLength";break;case "cellspacing":m="cellSpacing";break;case "rowspan":m="rowSpan";break;case "colspan":m="colSpan";break;case "tabindex":m="tabIndex";break;case "cellpadding":m="cellPadding";break;case "usemap":m="useMap";break;case "frameborder":m="frameBorder";break;case "contenteditable":m="contentEditable"}"function"===l?(l=m,"undefined"!==typeof l&&"on"===l.substring(0,2)&&(l=l.substring(2)),m=l,e.on(m,f)):b[m]=f}}}!0===d?this.prepend(c,b):this.append(c,b);return b},createDocFragment:function(){return document.createDocumentFragment()},createTextNode:function(b,a){var c=document.createTextNode(b);a&&this.append(a,c);return c},addElement:function(b,a,c,d,e,f){return this.create(b,{id:a,className:c,innerHTML:d},e,f)},addButton:function(b,a,c,d,e,f,g){a={id:a,className:c,innerHTML:d};"button"===b&&(a.type="button");"function"===typeof e&&(a.onclick=e);return this.create(b,a,f,g)},addCheckbox:function(b,a,c,d,e,f){b={id:b,className:a,type:"checkbox"};"undefined"!==typeof f&&1==f&&(b.onclick=base.stopPropagation);"function"===typeof c&&(b.onchange=c);1==d&&(b.checked=!0);return this.create("input",b,e)},addRadio:function(b,a,c,d,e,f,g,l){b={id:b,name:a,className:c,value:d,type:"radio"};"undefined"!==typeof l&&1==l&&(b.onclick=base.stopPropagation);"function"===typeof e&&(b.onchange=e);1==f&&(b.checked=!0);return this.create("input",b,g)},addInput:function(b,a,c,d,e,f,g,l){b={id:a,className:c,value:d,type:b};b.onfocus=h;"function"===typeof e&&(e=base.createCallBack(null,e,[this.value]),b.onkeyup=e);f&&(b.placeholder=f);return this.create("input",b,g,l)},addTextarea:function(b,a,c,d,e,f){b={id:b,className:a,value:c};b.onfocus=h;"function"===typeof d&&(b.onblur=d,b.onkeyup=d);return this.create("textarea",b,e,f)},addSelect:function(b,a,c,d,e,f){var g={id:b,className:a,value:c};"function"===typeof d&&(g.onchange=function(){d.call(null,this.value);e=g=null});return this.create("select",g,e,f)},setupSelectOptions:function(b,a,c){if(null!==b&&("object"!==typeof b&&(b=document.getElementById(b)),a&&a.length))for(var d=0,e=a.length;da.length)return!1;this._remoteStates=[];this.setupStateManager();for(var b=this.state,d,e=0,f=a.length;ea.length)return!1;this.setupEventManager();for(var b=this.events,d=0,e=a.length;d= 0) { this.objects.splice(indexNumber, 1); } } } } }, stopTimer: function(animation) { if(animation) { var timer = animation.timer; window.clearTimeout(timer); } }, checkAnimating: function(obj) { var animationArray = []; for(var i = 0, maxLength = this.objects.length; i < maxLength; i++) { var animation = this.objects[i]; if(animation.object === obj) { animationArray.push(animation); } } return (animationArray.length >= 1)? animationArray : false; }, stopPreviousAnimations: function(obj) { this.removeObject(obj, 1); }, reset: function() { this.objects = []; } }, setupSelectingObject: function(object) { return (typeof object === 'string')? document.getElementById(object) : object; }, hide: function(object, animationClass, duration) { var obj = this.setupSelectingObject(object); jQuery(obj).addClass(animationClass); var callBack = base.createCallBack(null, removeClassAndHide, [obj, animationClass]); var timer = window.setTimeout(callBack, duration); this.animating.add(obj, animationClass, timer); }, show: function(object, animationClass, duration) { var obj = this.setupSelectingObject(object); jQuery(obj).addClass(animationClass); obj.style.display = 'block'; var callBack = base.createCallBack(null, removeAnimationClass, [obj, animationClass]); var timer = window.setTimeout(callBack, duration); this.animating.add(obj, animationClass, timer); }, set: function(object, animationClass, duration) { var obj = this.setupSelectingObject(object); jQuery(obj).addClass(animationClass); var callBack = base.createCallBack(null, removeAnimationClass, [obj, animationClass]); var timer = window.setTimeout(callBack, duration); this.animating.add(obj, animationClass, timer); } };(function(bpApp){ "use strict"; var Navigation = base.Component.extend( { constructor: function(scrollContainer, container) { base.Component.call(this, container); this.scrollContainer = scrollContainer; }, setup: function() { this.setupCurrentPage(); this.setupNav(); this.groups.selectPrimaryGroup(); }, setupGroups: function(optionsArray) { var self = this; this.groups = { lastSelectedGroup: null, options: [], createPanel: function() { var buttonBack = self.addButton('button', self.id + '_button_back', 'bttn back', '', '', 'main-nav-container'); }, addGroup: function(level, parent) { var container = self.scrollContainer, style = (level === 0)? 'primary' : 'sub-menu', number = (this.options.length); var groupPanel = self.addElement('div', self.id + '_nav_' + number + level, 'group-nav-container', '', self.scrollContainer); var navContainer = self.addElement('nav', self.id + '_nav_container', 'main-nav-container', '', groupPanel); var ul = self.addElement('ul', self.id + '_nav_ul_' + number + level, 'dropdown-menu ' + style, '', navContainer); var group = { level: level, parent: parent, element: groupPanel, list: ul, options: [], selected: false }; this.options.push(group); return group; }, reset: function() { this.lastSelectedGroup = null; this.options = []; this.optionNumber = 0; }, createGroup: function(optionsArray, level, parent) { level = level || 0; var group = this.addGroup(level, parent); var selected = false; if(typeof optionsArray !== 'undefined') { for(var i = 0, maxLength = optionsArray.length; i < maxLength; i++) { var element = optionsArray[i]; if(element) { var $ele = jQuery(element); var id = '[data-id=' + $ele.data('id') + ']'; var url = jQuery(id + ' > a').attr('href'); var childOptions = element.querySelectorAll(id + ' > ul > li'); var option = { element: element, url: url, number: this.optionNumber++, selected: 'no', pages: childOptions.length }; var childSelected = false; if(childOptions.length) { var data = this.createGroup(childOptions, (level + 1), group); childSelected = data.selected; group.options = childOptions; } option.child = (data)? data.group : null; var li = this.addOption(option, group.list, childSelected); if(selected !== true && option.selected === 'yes') { selected = true; group.active = true; } } } } return { group: group, selected: selected }; }, setup: function(optionsArray) { this.createPanel(); this.createGroup(optionsArray); }, createCallBack: function(group) { return base.createCallBack(this, this.selectGroup, [group]); }, selectGroup: function(group) { if(group && typeof group === 'object') { if(group.selected === false) { group.selected = true; this.selectGroupPanel(group); this.updateBackButton(group); this.lastSelectedGroup = group; } } }, selectPrimaryGroup: function() { var groups = this.options; var length = groups.length; if(length) { var selected = groups[0]; for(var i = length - 1; i >= 0; i--) { var group = groups[i]; if(group.active === true) { selected = group; break; } } this.selectGroup(selected); } }, getAnimationClass: function(lastNum, currentNum) { var animation = { selecting: 'pullRightIn', removing: 'pullLeft' }; if(lastNum === null) { animation.removing = 'no-change'; animation.selecting = 'no-change'; } else if(currentNum > lastNum) { animation.removing = 'pullLeft'; animation.selecting = 'pullRightIn'; } else if(currentNum < lastNum) { animation.removing = 'pullRight'; animation.selecting = 'pullLeftIn'; } return animation; }, selectGroupPanel: function(group) { var groups = this.options; var groupNumber = group.level; var lastOption = this.lastSelectedGroup, lastGroupNumber = (lastOption && typeof lastOption !== 'undefined')? lastOption.level: null, animations = this.getAnimationClass(lastGroupNumber, groupNumber); for(var i = 0, maxLength = groups.length; i < maxLength; i++) { var option = groups[i], panel = option.element; if(panel && group.element) { if(panel === group.element) { panel.style.zIndex = 5; var animationClass = animations.selecting; bpApp.animate.show(panel, animationClass, 800); } else { if(option === lastOption) { panel.style.zIndex = 4; var animationClass = animations.removing; bpApp.animate.hide(panel, animationClass, 1000); } else { panel.style.zIndex = 2; bpApp.animate.hide(panel, 'none', 0); } option.selected = false; } } } }, updateBackButton: function(group) { var button = document.getElementById(self.id + '_button_back'); if(group && typeof group.parent !== 'undefined') { button.onclick = base.createCallBack(this, this.selectGroup, [group.parent]); button.style.visibility = 'visible'; } else { button.style.visibility = 'hidden'; } }, optionNumber: 0, addOption: function(option, container, childSelected) { container.appendChild(option.element); option.selected = (childSelected === true)? 'yes' : self.checkSelection(option); return this.addNavOption(option, container); }, addNavOption: function(option, container) { var element = option.element; if(option.selected === 'yes') { jQuery(element).addClass('selected'); } if(option.pages && option.child) { var a = element.querySelector('a'); if(a) { var $caret = jQuery(a).find('.caret'); var callBack = this.createCallBack(option.child); $caret.on('click', function(e) { e.preventDefault(); callBack(); }); } } return option; } }; this.groups.setup(optionsArray); }, setupNav: function() { var currentPage = this.getCurrentPage(); var options = document.querySelectorAll('#' + this.scrollContainer + ' nav > ul > li'); this.setupGroups(options); }, getPageUrl: function(url) { var path = url.split('/'); var length = path.length - 1; var page = path[length]; if(page === '') { page = path[length - 1]; } return page; }, checkSelection: function(option) { var currentPage = this.currentPage; currentPage = currentPage.split('&')[0]; var url = option.url; url = this.getPageUrl(url); if(currentPage === url) { return 'yes'; } else if(!currentPage && url == '') { return 'yes'; } else if(currentPage === 'blog-post' && url === 'blog') { return 'yes'; } else { return 'no'; } }, getCurrentPage: function() { var path = window.location.pathname, page; var pattern = /\//g, pageSlashCount = path.match(pattern); if(pageSlashCount.length > 1) { var parts = path.split('/'), length = parts.length - 1; var end = parts[length]; if(end === '') { end = parts[length - 1]; } page = end; } else { page = path.substring(path.lastIndexOf("/") + 1); } return page.replace("/", ""); }, setupCurrentPage: function() { this.currentPage = this.getCurrentPage(); }, getOptionStyle: function(tmpOption) { var optionStyle = (tmpOption.selected === 'yes')? 'nav-option selected' : 'nav-option'; return optionStyle; }, resetContainer: function() { var container = document.getElementById(this.container); if(container) { container.innerHTML = ''; } } }); bpApp.navigation = Navigation; })(bpApp); (function(bpApp){ "use strict"; var SlideController = function(container, onNumber, defaultPathUrl) { this.init(); this.animationMode = 'fade'; this.defaultPathUrl = (defaultPathUrl)? defaultPathUrl : '/slideshow/'; this.lastSelectedOption = null; this.onNumber = typeof onNumber !== 'undefined' ? onNumber: 0; this.optionsArray = []; this.timer = null; this.container = container; }; base.Component.extend( { constructor: SlideController, addKeyboardSupport: function() { var self = this; jQuery(document).on('keydown', function(e){ self.keyPress(e); }); }, keyPress: function(e) { var keyCode = e.keyCode; switch(keyCode) { case 37: this.selectPreviousOption(); break; case 39: this.selectNextOption(); break; } }, addOption: function(element) { var options = this.optionsArray; var number = options.length; var option = { optionNumber: number, element: element, crumbId: this.id + '_crumb_number_' + number, selected: 'no', setup: false }; options.push(option); this.createCrumb(option); return option; }, resetContainer: function() { var container = document.getElementById(this.container); container.innerHTML = ''; }, setup: function() { var containerEle = this.getContainerEle(); if(containerEle) { this.setupControlPanel(); this.setupOptions(); this.addKeyboardSupport(); } }, getContainerEle: function() { var container = this.container; return this.mainContainer || ( this.mainContainer = typeof container !== 'object'? document.getElementById(container) : container ); }, setupControlPanel: function() { var self = this; var containerEle = this.getContainerEle(); if(containerEle) { var button = this.addButton('a', '', 'arrow arrow_left', '', function(){ self.selectPreviousOption(); }, containerEle); button = this.addButton('a', '', 'arrow arrow_right', '', function(){ self.selectNextOption(); }, containerEle); var numberContainer = this.addElement('div', this.id + '_crumb_container', 'number_crumb_container', '', containerEle); this.addElement('div', this.id + '_slide_tab', 'slideTab', '', numberContainer); containerEle.onmouseover = base.createCallBack(this, this.stopTimer); containerEle.onmouseout = base.createCallBack(this, this.startTimer); } }, selectPrimaryOption: function() { if(typeof this.onNumber !== 'undefined') { this.selectOptionByNumber(this.onNumber); } else { this.selectNewPanel(); } }, setupOptions: function() { var container = typeof this.container === 'object'? this.container : document.getElementById(this.container); if(!container) { return false; } var optionsArray = container.querySelectorAll('.splash_container'); var maxLength = optionsArray.length; if(maxLength > 0) { for(var i = 0; i < maxLength; i++) { var tmpOption = this.addOption(optionsArray[i]); } } this.selectPrimaryOption(); }, loadSlideSrc: function(option) { if(option.setup === false) { option.setup = true; var path = this.defaultPathUrl || '', element = jQuery(option.element), src = element.data('bg-src'); if(src) { element.css('background-image', 'url(' + path + src + ')'); } else { src = element.data('src'); if(src) { var img = element.find('.image_container > img'); img.attr('src', path + src); } } } }, getAnimation: function() { var animations = ['pullLeftIn', 'pullRightIn']; var animationNumber = Math.round(Math.random() * (animations.length - 1)); return animations[animationNumber]; }, createCrumb: function(tmpOption) { var self = this; var crumbContainer = this.id + '_crumb_container'; var optionClass = this.getCrumbClass(tmpOption); var option = this.addButton('div', tmpOption.crumbId, optionClass, tmpOption.crumbContent, function(){ self.selectOption(tmpOption); }, crumbContainer); }, getCrumbClass: function(tmpOption) { return (tmpOption.selected === 'yes')? 'option selected' : 'option'; }, selectNewPanel: function() { if(this.onNumber < (this.optionsArray.length - 1) && this.onNumber != null) { this.onNumber++; } else { this.onNumber = 0; } this.selectOptionByNumber(this.onNumber); }, getPanelClass: function(lastNum, currentNum) { var animation = { selecting: 'same', removing: '' }; var mode = this.animationMode || 'fade'; if(mode === 'left_right') { if(currentNum > lastNum) { animation.removing = 'pullLeft'; animation.selecting = 'pullRightIn'; } else if(currentNum < lastNum) { animation.removing = 'pullRight'; animation.selecting = 'pullLeftIn'; } } else { animation.removing = 'fadeOut'; animation.selecting = 'fadeIn'; } return animation; }, getPanelAnimations: function() { var selection = this.getSelectedOption(); var panelNumber = selection.optionNumber; var lastPanelNumber = (typeof this.lastSelectedOption !== 'undefined')? jQuery.inArray(this.lastSelectedOption, this.optionsArray): 0; return this.getPanelClass(lastPanelNumber, panelNumber); }, selectPanel: function(tmpOption) { var animations = this.getPanelAnimations(); var options = this.optionsArray; for(var i = 0, maxLength = options.length; i < maxLength; i++) { var option = options[i], panel = option.element; if(panel) { var panelStyle = panel.style; if(tmpOption.element === panel) { this.loadSlideSrc(option); panelStyle.zIndex = 2; panelStyle.position = (this.setAsBg === true)? 'absolute' : 'relative'; bpApp.animate.show(panel, animations.selecting, 1000); } else { var lastSelected = this.lastSelectedOption; if(lastSelected && lastSelected.element === panel) { panelStyle.zIndex = 1; panelStyle.position = 'absolute'; panelStyle.top = '0px'; bpApp.animate.hide(panel, animations.removing, 1000); } } } var crumbId = option.crumbId; if(typeof crumbId !== 'undefined') { var crumbClass = this.getCrumbClass(option), crumb = document.getElementById(crumbId); if(crumb) { crumb.className = crumbClass; } } } }, getNextOption: function() { var lastSelectedOption = (this.lastSelectedOption !== null)? this.lastSelectedOption.optionNumber : 0; var nextOptionNumber = ++lastSelectedOption; var index = (nextOptionNumber < this.optionsArray.length)? nextOptionNumber : 0; return this.optionsArray[index]; }, selectNextOption: function() { var nextOption = this.getNextOption(); if(nextOption) { this.selectOption(nextOption); } }, getPreviousOption: function() { var lastSelectedOption = (this.lastSelectedOption !== null)? this.lastSelectedOption.optionNumber : 0; var previousOptionNumber = --lastSelectedOption; var index = (previousOptionNumber >= 0)? previousOptionNumber : (this.optionsArray.length - 1); return this.optionsArray[index]; }, selectPreviousOption: function() { var previousOption = this.getPreviousOption(); if(previousOption) { this.selectOption(previousOption); } }, setLastSelectedOption: function(option) { this.lastSelectedOption = option; }, unselectOption: function(tmpOption) { for(var j = 0, maxLength = this.optionsArray.length; j < maxLength; j++) { var option = this.optionsArray[j]; if(option !== tmpOption) { if(option.selected === 'yes') { option.selected = 'no'; } } } }, moveSlideTab: function(e) { var offset = jQuery(e).position(); var slideTab = jQuery('#' + this.id + '_slide_tab').css('left', offset.left + 'px'); }, selectOption: function(tmpOption) { this.stopTimer(); var object = tmpOption.element; var slideTab = document.getElementById(tmpOption.crumbId); if(slideTab) { this.moveSlideTab(slideTab); } if(tmpOption.selected === 'no') { tmpOption.selected = 'yes'; this.onNumber = jQuery.inArray(tmpOption, this.optionsArray); } else { tmpOption.selected = 'no'; } this.unselectOption(tmpOption); this.selectPanel(tmpOption); this.setLastSelectedOption(tmpOption); this.startTimer(); }, selectOptionByNumber: function(index) { var option = this.optionsArray[index]; if(option) { this.selectOption(option); } }, getSelectedOption: function() { for(var j = 0, maxLength = this.optionsArray.length; j < maxLength; j++) { var option = this.optionsArray[j]; if(option.selected === 'yes') { return option; } } return false; }, duration: 7000, startTimer: function() { var self = this; this.stopTimer(); this.timer = window.setTimeout(function(){ self.selectNewPanel(); }, this.duration); }, stopTimer: function() { window.clearTimeout(this.timer); } }); var SlideShow = function(container, defaultPathUrl, setAsBg, onNumber) { this.init(); this.defaultPathUrl = (defaultPathUrl)? defaultPathUrl : '/slideshow/'; this.setAsBg = (setAsBg)? setAsBg : false; this.animationMode = 'fade'; this.lastSelectedOption = null; this.onNumber = typeof onNumber !== 'undefined' ? onNumber: null; this.optionsArray = []; this.timer = null; this.container = container; }; SlideController.extend( { constructor: SlideShow, addOption: function(option) { var number = this.optionsArray.length; option.optionNumber = number; option.crumbId = this.id + '_crumb_number_' + number; option.selected = 'no'; this.optionsArray.push(option); this.createCrumb(option); option.element = this.createOptionPanel(option,this.container); }, setupOptions: function(optionsArray) { var maxLength = optionsArray.length; if(maxLength > 0) { var tmpNumber = 0; for(var i = 0; i < maxLength; i++) { var tmpOption = optionsArray[i]; this.addOption(tmpOption); } } this.selectPrimaryOption(); }, setup: function(optionsArray) { var containerEle = this.getContainerEle(); if(containerEle) { this.resetContainer(); this.setupControlPanel(); this.setupOptions(optionsArray); this.addKeyboardSupport(); } }, createOptionPanel: function(tmpOption, container) { if(tmpOption && tmpOption.url) { container = this.addLink('a','','','',tmpOption.url,container); } var spotlightContainer = this.addElement('div', '', 'splash_container', '', container); spotlightContainer.onmouseover = base.createCallBack(this, this.stopTimer); spotlightContainer.onmouseout = base.createCallBack(this, this.startTimer); spotlightContainer.style.display = 'none'; var imageURL = tmpOption.image; if(this.setAsBg == true) { if(imageURL) { spotlightContainer.style.backgroundImage = 'url(' + wpThemeUrl + this.defaultPathUrl + imageURL + ')'; } } else { if(imageURL) { var imageContainer = this.addElement('div','','image_container','',spotlightContainer); var image = this.addImage('','',wpThemeUrl + this.defaultPathUrl + imageURL,tmpOption.alt,imageContainer); } } var articleContainer = this.addElement('article', '', 'content_container ' + tmpOption.className, '', spotlightContainer); var animation = this.getAnimation(); var sectionContainer = this.addElement('section', '', 'spotlight dark ' + animation, '', articleContainer); var h2 = this.addElement('h2', '', 'title_text blue', tmpOption.title, sectionContainer); var text = this.addElement('div', '', 'light', tmpOption.content, sectionContainer); return spotlightContainer; } }); var OfficeSlideController = function(container, onNumber) { this.init(); this.animationMode = 'fade'; this.lastSelectedOption = null; this.onNumber = typeof onNumber !== 'undefined' ? onNumber: 0; this.optionsArray = []; this.timer = null; this.container = container; }; SlideController.extend( { constructor: OfficeSlideController, getPanelClass: function(lastNum, currentNum) { var animation = { selecting: 'same', removing: '' }; var mode = this.animationMode || 'fade'; if(mode === 'left_right') { if(currentNum > lastNum) { animation.removing = 'pullLeft'; animation.selecting = 'pullRightIn'; } else if(currentNum < lastNum) { animation.removing = 'pullRight'; animation.selecting = 'pullLeftIn'; } } else { animation.removing = 'fadeOut'; animation.selecting = 'slideDown'; } return animation; }, getAnimation: function() { var animations = ['pullLeftIn', 'pullRightIn']; var animationNumber = Math.round(Math.random() * (animations.length - 1)); return animations[animationNumber]; } }); bpApp.slideController = SlideController; bpApp.slideShow = SlideShow; window.spotlightPanel = SlideShow; bpApp.officeSlideController = OfficeSlideController; })(bpApp); (function(bpApp){ "use strict"; var LazyAnimator = base.Class.extend( { constructor: function(attrName, cacheElements) { this.attrName = (typeof attrName === 'string')? attrName : 'data-animate'; this.cacheElements = cacheElements === true? true : false; this.elements = []; this.setup(); }, setup: function() { this.setupEvents(); this.update(); return this; }, update: function() { this.elements = this.getElements(); this.checkScroll(); return this; }, removeElement: function(element) { var index = jQuery.inArray(element, this.elements); if(index > -1) { this.elements.splice(index, 1); } return this; }, getElements: function() { return jQuery('[' + this.attrName + ']:not(.animated)'); }, checkScroll: function() { var optionsArray = (this.cacheElements === true)? this.elements : this.getElements(); if(optionsArray.length) { var viewPortTop = jQuery(document).scrollTop(); var viewPortBottom = jQuery(window).height() + viewPortTop; var self = this; optionsArray.each(function(index, ele) { ele = jQuery(this); if(ele) { var optionDelay = ele.data('delay'); var delay = optionDelay !== null? optionDelay : 20; var position = ele.offset(); var optionTop = position.top + delay; var optionBottom = position.top + ele.height(); if(optionTop < viewPortBottom && optionTop >= viewPortTop) { self.animate(ele); } else if(optionBottom >= viewPortTop && optionBottom <= viewPortBottom) { self.animate(ele); } } }); } return this; }, animate: function(ele) { var animation = ele.attr(this.attrName); animation = animation || 'pullUp'; ele.addClass(animation); ele.addClass('animated'); this.removeElement(ele); return this; }, setupEvents: function() { var ele = jQuery(window); var self = this; var callBack = function() { self.checkScroll(); }; this.addEvents = function() { ele.on('scroll', callBack); }; this.removeEvents = function() { ele.off('scroll', callBack); }; this.addEvents(); return this; } }); bpApp.lazyAnimator = LazyAnimator; })(bpApp); (function(bpApp){ "use strict"; var ScrollHeader = base.Class.extend( { constructor: function(header, miniHeaderClass, distance) { this.header = (typeof header === 'string')? document.getElementById(header) : header; this.$header = jQuery(this.header); this.miniClassName = miniHeaderClass; this.headerMinified = false; this.distance = (typeof distance !== 'undefined')? distance : 300; this.$document = jQuery(document); this.$window = jQuery(window); this.setup(); }, setup: function() { var header = this.header; if(!header) { return false; } this.checkScroll(); this.addScroll(); }, addScroll: function() { var child = this; var tmpFunction = function(){ child.checkScroll(); }; var win = this.$window; win.on('scroll', tmpFunction); win.on('resize', tmpFunction); }, checkScroll: function() { var wind = this.$window; var scrollTop = wind.scrollTop(), documentHeight = (this.$document.height() - wind.height()); if(scrollTop >= this.distance) { if(this.headerMinified === false) { this.$header.addClass(this.miniClassName); this.headerMinified = true; } } else { if(this.headerMinified === true) { this.headerMinified = false; this.$header.removeClass(this.miniClassName); } } }, scrollToTop: function() { window.scrollTo(window.scrollX, 0); } }); bpApp.scrollHeader = ScrollHeader; })(bpApp); "use strict"; var Modal = base.Component.extend( { constructor: function(container) { base.Component.call(this, container); }, getLayout: function() { return this.cache('panel', { id: this.id, className: 'modal ' + this.modalClassName, header: this.addHeader(), body: this.addBody(), footer: this.addFooter() }); }, modalClassName: '', addHeader: function() { var id = this.id; return this.cache('titleContainer', { node: 'header', id: id + '_title_container', className: 'title-container', titleButtonGroup: { id: id + '_title_button_group', className: 'title-button-group', close: { node: 'button', className: 'title-bttn close', innerHTML: '', click: base.bind(this, this.decline) } }, titleLabel: { node: 'h4', id: id + '_title', className: 'title dark', textContent: this.getTitle() } }); }, addBody: function() { return this.cache('bodyContainer', { className: 'body-container', body: this.addBodyContent() }); }, addContentPanel: function(title, childeren) { return { title: { node: 'h2', className: 'left dark', textContent: title }, panel: { className: 'content-panel', children: childeren } }; }, addBodyContent: function() { return { panel: this.addContentPanel('Title', [ ]) }; }, addFooter: function() { var id = this.id; return { node: 'footer', id: id + '_button_container', className: 'button-container', buttons: this.addFooterButtons() }; }, addFooterButton: function(id, className, label, callBack) { var buttonAttr = { className: 'bttn ' + className, textContent: label, onclick: callBack }; if(id) { buttonAttr.id = this.id + id; } return buttonAttr; }, addFooterButtons: function() { return [ this.addFooterButton('_button_1', 'bttn-red', 'Cancel', base.bind(this, this.decline)), this.addFooterButton('_button_2', 'bttn-green', 'Save', base.bind(this, this.accept)) ]; }, getTitle: function() { return 'Edit Panel'; }, remove: function() { var panel = this.panel; if(panel) { this.removeElement(panel); } panel = document.getElementById(this.id + '_shadow'); if(panel) { this.removeElement(panel); } }, setup: function() { this.render(); this.setupHeaderOptions(); }, setupHeaderOptions: function() { }, checkToClose: function() { this.decline(); }, createShadow: function() { var self = this; this.addButton('div', this.id + '_shadow', 'modal-shadow fadeIn', '', function(){self.checkToClose();}, self.container); }, returnCallBack: function(data) { var callBack = this.callbackFunction; if(typeof callBack === 'function') { callBack(data); } }, removeAndCallBack: function(data) { this.returnCallBack(data); window.setTimeout(base.bind(this, this.display), 200); }, accept: function() { this.removeAndCallBack(); }, decline: function() { this.display(); }, display: function() { this.toggleDisplay(); if(this.toggleMode === 'block') { } }, toggleMode: null, toggleDisplay: function() { var obj = this.panel, display = obj.style.display; if(display === '' || display === 'none') { obj.style.display = 'block'; this.toggleMode = 'block'; this.createShadow(); } else { obj.style.display = 'none'; this.toggleMode = 'none'; this.remove(); } } });"use strict"; var ModalFormPanel = Modal.extend( { constructor: function(container) { container = container || document.body; Modal.call(this, container); }, addBody: function() { return this.cache('bodyContainer', { className: 'body-container', form: this.cache('form', this.addMainForm( this.addBodyContent() )) }); }, addMainForm: function(body) { return { node: 'form', id: this.id + '_form', method: 'POST', autocomplete: 'off', novalidate: true, body: body }; }, addBodyContent: function() { }, setupValidation: function() { BpFormValidator.monitor(jQuery(this.form)); }, addToggle: function() { var id = this.id + '_check'; return { className: 'data-toggle-panel', field: this.addInput('checkbox', 'Current Patient', '', '', 'toggle', id), label: { node: 'label', className: 'toggle-bttn', htmlFor: id } }; }, addRow: function(className, cols) { return { className: 'row ' + className, children: cols }; }, addInput: function(type, name, placeholder, value, className, id) { var layout = { node: 'input', type: type, name: name, autocomplete: 'off', value: value, className: className }; if(placeholder != '') { layout.placeholder = placeholder; } if(id != '') { layout.id = id; } return layout; }, addTextarea: function(name, placeholder, className) { return { node: 'textarea', name: name, autocomplete: 'off', placeholder: placeholder, className: className }; }, addHiddenFields: function(reason, id, name, excludes) { return [ this.addInput('text', 'URL', '', '', 'honey'), this.addInput('hidden', 'the_reason', '', reason, 'the_reason', 'the_reason'), this.addInput('hidden', 'bpi_form_id', '', id), this.addInput('hidden', 'bpi_form_name', '', name), this.addInput('hidden', 'exclude_fields', '', excludes), { innerHTML: '
    Your request has been sent -- we will be in contact with you shortly.
    Please make sure ALL fields are filled out correctly.
    ' } ]; }, setup: function() { this.render(); this.setupHeaderOptions(); this.setupToggleEvent(); this.setupValidation(); }, setupToggleEvent: function() { var $element = jQuery(this.form).find("input.toggle"); $element.val("No"); $element.on('change', function() { if($element.is(':checked')) { $element.val('Yes'); } else { $element.val("No"); } }); }, addCol: function(colSpan, label, inputAttr) { var layout = { className: 'col-xs-' + colSpan }; if(label != '') { layout.lable = { node: 'label', textContent: label }; } layout.input = inputAttr; return layout; }, decline: function() { var form = this.form; if(form) { form.reset(); var $form = jQuery(form); $form.removeClass('form_failure'); $form.find('input, select, textarea').each(function() { var $element = jQuery(this); $element.removeClass('success_val'); $element.removeClass('error_val'); }); } this.display(); }});"use strict"; var ModalAppointmentRequest = ModalFormPanel.extend( { modalClassName: 'appointment-request', addBodyContent: function() { var self = this; var date = new Date().toISOString().slice(0, 10); return { children: [ this.addRow('', [ this.addCol('6', '', this.addInput('text', 'Name', 'Name:', '', 'name val field_text') ), this.addCol('6', '', this.addInput('text', 'Phone', 'Phone:', '', 'telephone val field_phone') ) ]), this.addRow('', [ this.addCol('12', '', this.addInput('text', 'Email', 'Email:', '', 'email val field_email') ) ]), this.addRow('', [ this.addCol('6', 'Preferred Date', this.addInput('date', 'Preferred Date', '', date, '') ), this.addCol('6', 'Preferred Time', this.addInput('text', 'time', '', '09:00:00', '') ) ]), this.addRow('', [ this.addCol('12', '', this.addTextarea('Message', 'Message:', '', 'val message') ) ]), this.addRow('radiobtns', [ { className: 'col-xs-12', toggle: this.addToggle(), text: { node: 'p', className: 'current_patient', textContent: 'Are you a current patient?' } } ]), this.addRow('text-right', [ { className: 'col-xs-12', link: { node: 'button', className: 'send_button transition', textContent: 'Submit', click: function(e) { e.preventDefault(); var form = self.form; jQuery(form).submit(); } } } ]), { className: 'hidden-fields', children: this.addHiddenFields('appoint_request', 'appoint_request', 'Appointment Request', 'the_reason,bpi_form_id,bpi_form_name') } ] }; }, addFooter: function() { return {}; }, getTitle: function() { return 'Request An Appointment'; } });"use strict";var ReviewModel = base.Model.extend( { defaults: { rating: 5, publish: 0, should_review: 1, send_email: 1 } });var LeaveReviewForm = ModalFormPanel.extend({ constructor: function(container) { this.model = new ReviewModel(); ModalFormPanel.call(this, container); }, modalClassName: 'review-modal', addHiddenFields: function() { return [ this.addInput('text', 'URL', '', '', 'honey') ]; }, addBodyContent: function() { return { panel: this.addContentPanel('Please leave a review', [ this.addRow('', [ this.addCol('12', '', this.addDataInput('text', 'reviewer', 'Display Name:', 'entry-reviewer val') ) ]), this.addRow('', [ this.addRatingContainer() ]), this.addRow('', [ this.addCol('12', '', this.addDataReview('review', 'Add Comments', 'entry-review val') ) ]), this.addHiddenFields(), { innerHTML: '
    Thank you for your submission
    Please make sure ALL fields are filled out correctly.
    ' }, this.cache('alertContainer', { className: 'alert-container' }) ]) }; }, addFooterButtons: function() { return [ this.addFooterButton('_button_1', 'bttn-red', 'Cancel', base.bind(this, this.decline)), this.addFooterButton('_button_2', 'bttn-green', 'Save', base.bind(this, this.accept)) ]; }, accept: function() { this.request(); }, validate: function() { var model = this.model.get(); if (!model.url) { var review = model.review, reviewer = model.reviewer, msg = ''; if (!review) { msg += '- Please enter a review
    '; } if (!reviewer) { msg += '- Please enter a display name'; } if (msg !== '') { this.addAlert('failure', msg); } else { return true; } } return false; }, request: function() { var $ = jQuery; if (this.validate()) { var model = this.model.get(); var data = { action: 'newStoreReview', review: base.prepareJsonUrl(model) }, ajaxurl = '/wp-admin/admin-ajax.php'; $.post(ajaxurl, data, base.bind(this, this.requestResponse)); } }, requestResponse: function(response) { this.addAlert('success', response); this.form.reset(); this.removeAndCallBack(); }, addAlert: function(type, msg) { var alertPanel = new AlertPanel( type, msg, this.alertContainer ); alertPanel.setup(); }, addRatingContainer: function() { var layout = { className: 'stars-container', children: [] }; var ratings = 5, self = this; for (var i = ratings; i > 0; i--) { var number = i, id = 'ratingStar' + number, starInput = { node: 'input', type: 'radio', id: id, name: 'modal-rating', value: number, checked: (number === 5), change: function() { self.model.set('rating', this.value) } }, starLabel = { node: 'label', for: id, innerHTML: '' + number + ' stars' }; layout.children.push(starInput); layout.children.push(starLabel); } return layout; }, addDataInput: function(type, prop, placeholder, className) { var layout = { node: 'input', type: type, autocomplete: 'off', className: className, bind: this.bind(this.model, prop) }; if(placeholder !== '') { layout.placeholder = placeholder; } return layout; }, addDataReview: function(name, placeholder, className) { var layout = { node: 'textarea', name: name, autocomplete: 'off', className: className, bind: this.bind(this.model, name) }; if (placeholder !== '') { layout.placeholder = placeholder; } return layout; }, getTitle: function() { return 'Leave a Review'; }});var AlertPanel = function(type, msg, container){ this.init(); this.type = type; this.msg = msg; this.container = container;};base.Component.extend({ constructor: AlertPanel, getLayout: function() { return this.cache('panel', { id: this.id, className: this.getPanelClass(), innerHTML: this.msg }); }, setup: function() { this.render(); this.msgTimeOut(3000); }, getPanelClass: function() { return this.type === 'success' ? 'saveSuccess' : 'saveFailure'; }, msgTimeOut: function (fade) { var self = this; window.setTimeout(function() { bpApp.animate.hide(self.panel, 'fadeOut', 500, function() { self.destroy(); } ); }, fade); }});(function(bpApp){ "use strict"; var VideoPanel = base.Component.extend( { constructor: function(video, callbackFunction, container) { base.Component.call(this, container); this.video = video; this.callbackFunction = callbackFunction; }, remove: function() { var panel = this.panel; if(panel) { panel.parentNode.removeChild(panel); } panel = document.getElementById(this.id + '_shadow'); if(panel) { panel.parentNode.removeChild(panel); } }, getLayout: function() { var self = this; return this.cache('panel', { id: this.getId(), className: 'panel video-panel slideIn', title: { className: 'title-container', titleLabel: { node: 'h1', className: 'title title-text left dark', textContent: this.video.title } }, body: this.cache('iframeContainer', { className: 'body-container' }), footer: { className: 'button-container', closeButton: { node: 'button', className: 'bttn bttn-decline', textContent: 'Close', click: function(){ self.decline(); } } } }); }, setup: function() { this.render(); this.setupVideoIframe(); }, setupVideoIframe: function() { var self = this; window.setTimeout(function() { self.addIframe('', '', self.video.source, self.iframeContainer); }, 500); }, decline: function() { this.display(); }, display: function() { this.toggleDisplay(); }, createShadow: function() { var self = this; var backdrop = this.addButton('div', this.id + '_shadow','panel-shadow video-shadow fadeIn','', function(){ self.decline(); }, document.body); this.addButton('button', '', 'bttn top close', '', '', backdrop); }, toggleMode: null, toggleDisplay: function() { var obj = document.getElementById(this.id); var display = obj.style.display; if(!display || display === 'none') { obj.style.display = 'block'; this.toggleMode = 'block'; this.createShadow(); } else { obj.style.display = 'none'; this.toggleMode = 'none'; this.remove(); } } }); bpApp.videoPanel = VideoPanel; })(bpApp); "use strict"; var bpMain = { setupAppDefault: function() { this.Navigation.setup(); this.Videos.setup(); this.Services.setup(); this.Modals.setup(); this.setupFancyBox(); this.setupAutoScroll(); this.setupPeekThrough(); }, setupFancyBox: function() { jQuery(".pics").fancybox({ openEffect:'elastic', closeEffect:'elastic', helpers: { overlay : { locked: false } } }); jQuery(".videos").click(function() { jQuery.fancybox({ openEffect:'elastic', closeEffect:'elastic', helpers: { overlay : { locked: false } }, 'padding' : 0, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'title' : this.title, 'width' : 680, 'height' : 495, 'href' : this.href.replace(new RegExp("watch\?v=", "i"), 'v/'), 'type' : 'swf', 'swf' : { 'wmode' : 'transparent', 'allowfullscreen' : 'true' } }); return false; }); }, exceptions: ['myModal'], addException: function(exception) { this.exceptions.push(exception); }, setupAutoScroll: function() { var exceptions = this.exceptions; var pattern = /^\//; jQuery('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(pattern,'') === this.pathname.replace(pattern,'') && location.hostname === this.hostname) { var hash = this.hash.slice(1), index = jQuery.inArray(hash, exceptions); if(index === -1) { var target = jQuery(this.hash); target = target.length ? target : jQuery('[id=' + hash +']'); if (target.length) { jQuery('html,body').animate({ scrollTop: target.offset().top }, 800); return false; } } } }); }, mapsSetup: false, setupGoogleMaps: function(attrName) { attrName = attrName || 'data-map-src'; jQuery('iframe[' + attrName + ']').each(function(index, element) { element = jQuery(element); var src = element.attr(attrName); if(src) { element.addClass('fadeIn'); element.attr('src', src); } }); }, setupCoolMap: function() { var self = this; jQuery('.map-overlay').click(function() { if(self.mapsSetup !== true) { self.setupGoogleMaps(); self.mapsSetup = true; } jQuery(this).fadeOut(); }); jQuery('.map-area').mouseleave(function() { jQuery('.map-overlay').fadeIn(); }); }, setupPeekThrough: function() { var $elements = jQuery('section[data-type="background"]'); if($elements[0]) { var $win = jQuery(window); $win.scroll(function() { var winScrollTop = $win.scrollTop(); $elements.each(function() { var $bgobj = jQuery(this); var yPos = -(winScrollTop / $bgobj.data('speed')); var coords = '50% '+ yPos + 'px'; $bgobj.css({ backgroundPosition: coords }); }); }); } }}; bpMain.Services = { setup: function() { var IframeLoader = function(id) { this.id = id; this.element = null; this.document = null; }; IframeLoader.prototype = { constructor: IframeLoader, setup: function() { this.element = document.getElementById(this.id); if(this.element) { this.addEvents(); } }, getDocument: function() { var ifrm = this.element; if(this.document === null && ifrm) { this.document = ifrm.contentDocument? ifrm.contentDocument : ifrm.contentWindow.document; } return this.document; }, setHeight: function() { var getHeight = function(doc) { var body = doc.body, html = doc.documentElement; var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); return height; }; var ifrm = this.element; var doc = this.getDocument(); if(doc) { ifrm.style.visibility = 'hidden'; ifrm.style.height = getHeight(doc) + "px"; ifrm.style.visibility = 'visible'; } window.setTimeout(function() { ifrm.style.height = getHeight(doc) + "px"; }, 120); }, resetHeight: function() { var ifrm = this.element; ifrm.style.height = 'auto'; }, addEvents: function() { var self = this; jQuery(this.element).on('load', function() { self.setHeight(); }); jQuery(window).on('resize', function() { self.resetHeight(); self.setHeight(); }); } }; var iframeLoader = new IframeLoader('servicesIframe'); iframeLoader.setup(); }}; bpMain.Navigation = { setup: function() { this.setupMinifyNavigation(); this.setupNavEvents(); }, setupMinifyNavigation: function() { var scroller = new bpApp.scrollHeader('navarea', 'sticky', 400); }, setupNavEvents: function() { var self = this; var button = jQuery('#main-nav-toggle'); button.on('click', function(){ self.toggleNav(); }); }, navHidden: true, toggleNav: function() { var header = jQuery('.top-banner-row'), button = jQuery('#main-nav-toggle'), nav = jQuery('#main-nav-container'), footBar = jQuery('.bottom-bar'), address = jQuery('.bottom-bar.inner'); if(this.navHidden === true) { this.navHidden = false; header.addClass('opened nav-d'); nav.addClass('open'); button.addClass('nav-close'); footBar.addClass('nav-d'); if(jQuery(window).width() < 767) { address.css({'bottom': '60px', 'position': 'fixed'}); } else { address.css('position', 'fixed'); } appNav.groups.selectPrimaryGroup(); } else { this.navHidden = true; header.removeClass('opened nav-d'); nav.removeClass('open'); button.removeClass('nav-close'); footBar.removeClass('nav-d'); address.css({'position': 'relative', 'bottom': '0px'}); } }}; bpMain.Modals = { setup: function() { this.setupModals(); }, setupModals: function() { var attrName = 'data-modal'; var self = this; var elements = jQuery('[' + attrName + ']').each(function(index, element) { element = jQuery(element); var modalName = element.attr(attrName); if(modalName) { element.on('click', function() { var modalClass = window[modalName]; if(modalClass) { var modal = new modalClass(); modal.setup(); modal.display(); } }); } }); }}; bpMain.Videos = { setup: function(attrName) { attrName = attrName || 'data-video-src'; var self = this; var elements = jQuery('[' + attrName + ']').each(function(index, element) { element = jQuery(element); var src = element.attr('data-video-src'); if(src) { var title = element.attr('data-title'); element.on('click', function() { self.view(title, src); }); } }); }, createBackgroundVideo: function(container, src) { return new bpApp.BackgroundVideo(container, src); }, view: function(title, src) { var vid = { title: title, source: src }; var panel = new bpApp.videoPanel(vid, '', document.body); panel.setup(); panel.display(); }}; bpMain.SlideShow = { setup: function(type) { type = type || 'modern'; switch(type) { case 'controller': this.setupSlideController(); break; case 'tour': this.setupSlideshow1(); break; case 'reviews': this.setupSlideshow3(); break; case 'nivo': this.setupNivoSlider(); break; } }, setupSlideController: function(container) { container = container || 'slides'; var spotlight = new bpApp.slideController(container, 0, '/wp-content/themes/alpha'); spotlight.duration = 7000; spotlight.setup(); }, createSlideShow: function(container, path, bg, optionsArray, duration) { duration = duration || 7000; var startNumber = Math.round(Math.random() * (optionsArray.length - 1)); var slideShow = new bpApp.slideShow(container, path, bg, startNumber); slideShow.duration = duration; slideShow.setup(optionsArray); return slideShow; }, createSlideOption: function(image, alt, title, content, className, url, crumbContent) { return { title: title, content: content, className: className, image: image, alt: alt, url: url, crumbContent: crumbContent }; }, setupSlideshow1: function() { var optionsArray = [ this.createSlideOption('tour.jpg'), this.createSlideOption('tour.jpg'), this.createSlideOption('tour.jpg') ]; this.createSlideShow('tour', '/images/', true, optionsArray); }, setupSlideshow3: function() { var optionsArray = [ this.createSlideOption('', '', '', '“Absolutely the best there is. I have never been a good dental patient, and recently having some issues with anxiety have made it very difficult for me. Dr. Blanchard is the best, she not only does great work (all of my crowns, fillings, etc have been perfect), but she has been very patient in helping me with my anxiety... I couldnt have done this anywhere else, my deepest thanks to Dr Blanchard and Adriana for their love and care today.”

    - Thomas S. (Facebook)

    ' ), this.createSlideOption('', '', '', '“First dentist that Ive had to get for myself since turning 18 three years ago. All of the staff, and I mean ALL of it, are very professional, caring, and knowledgeable. Dr. Blanchard is absolutely wonderful, and actually texts after a doozy of an appointment to ensure that Im feeling alright. If youre around the oceanfront area and searching for a quality dentist, Bay Colony Dentistry is the way to go.”

    - Brinn D. (Google)

    ' ), this.createSlideOption('', '', '', 'Dr. Blanchard is a perfectionist! Just exactly what you want when it comes to your teeth...When our son was in college he used the dental school in San Antonio. The dental school remarked on his superior dental work. He was glad to state that Dr. Blanchard had done his dental work. This even more remarkable where you realize he has birth defects that effect the development of his mouth. Dr Blanchard is more than excellent in her dental practice with us.

    - Julia B. (Google)

    ' ) ]; this.createSlideShow('reviews', '', false, optionsArray); }}; var appNav = new bpApp.navigation('nav-scroll-container', 'main-nav-container'); appNav.setup(); jQuery(function() { if(wpPageID === '2') { bpMain.SlideShow.setup('reviews'); } else { } bpMain.SlideShow.setup('controller'); bpMain.setupCoolMap(); var lazyAnimator = new bpApp.lazyAnimator(); bpMain.setupAppDefault(); });