(function( blueConic, undefined ) {var p='http://plugins.blueconic.net/';var ps='https://plugins.blueconic.net/';(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.BCClass=function(){};BCClass.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();var InteractionType=BCClass.extend({init:function(a){},getPreloadProperties:function(){return[]},getContent:function(){},onEvent:function(){},importLibraries:function(c){var e=[];var a=[];if(!c||c.length===0){return}for(var b=0;b<c.length;b++){var d=c[b];if(d&&d.sharing==="none"){e.push(d.url)}else{a.push(d.url)}}blueConic.fn.importLibraries.call(this,e);blueConic.fn.importAndCacheLibraries.call(this,a)}});(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"tlpf",init:function(a,b){this.blueConicClient=a;this.context=b||null;this.profile=this.context.getProfile();this.parameters=this.context.getParameters();this.connectionContext={LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),push_frequency:this.parameters.push_frequency&&this.parameters.push_frequency[0]?this.parameters.push_frequency[0]:
null,profile:this.profile,variables:[]};this.preloadProperties=[this.connectionContext.LAST_PUSH_PROPERTY,this.connectionContext.VARIABLE_STATE_PUSH_PROPERTY];this._getVariablesFromParameters()},getPreloadProperties:function(){return this.preloadProperties},onLoad:function(){var a=this.parameters.usecases;this.parameters.version&&this.parameters.version[0]&&this.parameters.version[0]&&-1===a.indexOf("pixel")||(this.eventName=this.parameters.eventName&&this.parameters.eventName[0]?this.parameters.eventName[0]:
"BlueConic",this.pixelId=this.parameters.pixelId&&this.parameters.pixelId[0]?this.parameters.pixelId[0]:"BlueConic",this._doCall())},_doCall:function(){this.bcConnectionUtil.doPush(this.connectionContext)?this._doPush():"plc"===this.connectionContext.push_frequency&&this.blueConicClient.event.subscribe(this.blueConicClient.event.onProfilePermissionChange,this,function(){this._doPush()})},_doPush:function(){for(var a={},b=!1,c=0;c<this.connectionContext.variables.length;c++){var d=this.connectionContext.variables[c];
if(d.key){var e=this.bcConnectionUtil.getVariableValue(d,this.connectionContext,!0);e&&(a[d.key]=1===e.length?e[0]:e,b=!0)}}b&&(b=window._fbq||(window._fbq=[]),b.loaded||(c=document.createElement("script"),c.async=!0,c.src="//connect.facebook.net/en_US/fbds.js",d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(c,d),b.loaded=!0),b.push(["addPixelId",this.pixelId]),window._fbq=window._fbq||[],window._fbq.push(["track",this.eventName,a]))},_getVariablesFromParameters:function(){var a=
this.parameters.variables&&this.parameters.variables[0]?this.blueConicClient.json.parse(this.parameters.variables[0]):null;if(a&&0<a.length){this.connectionContext.variables=a;for(var b=0;b<a.length;b++){var c=a[b];c.key&&"property"===c.type&&c.property&&this.preloadProperties.push(c.property)}}}});var a = [];var i='connection_facebook_ads';a.push({url: p + i + '/2.0.21/js/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/2.0.21/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b?b:null;this.profile=a.profile.getProfile();this.element=this.context.getDOMElement();a=this.context.getParameters().content+"";this.htmlFragment=this.createElement(a)},getPreloadProperties:function(){for(var a=this.context.getParameters().content+"",b=/data-bc-preload="([^"]*)"/g,c=[],d;null!==(d=b.exec(a));){d=d[1].split(",");for(var e=0;e<d.length;e++)c.push(d[e])}return c?c:[]},getContent:function(){if(!this.htmlFragment)return null;
this.element||(this.element=this.context.getDOMElement());this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external");return this.htmlFragment.innerHTML},onUpdate:function(a){this.placeContent()},onLoad:function(){this.placeContent()},placeContent:function(){this.blueConicClient.isInEditMode()||this.blueConicClient.createEvent("VIEW",this.context.getInteractionId());var a=this.element||this.context.getDOMElement();if(a){var b=this.context.getParameters().content+"";this.htmlFragment=
this.createElement(b);this.assureVisibilty(a);if(b=this.getContent()){var c=a.nodeName?a.nodeName.toLowerCase():a.nodeName;if(-1===this.blueConicClient.util.array.indexOfArray("area base br col command embed hr img input keygen link meta param source track wbr".split(" "),c))a.innerHTML!==b&&(a.innerHTML=b);else if(a.parentNode){var c=a.parentNode.innerHTML,d=document.createElement("div");d.appendChild(a.cloneNode(!0));b=c.replace(d.innerHTML,b);a.parentNode.innerHTML!==b&&(a.parentNode.innerHTML=
b)}a=this.getElementsWithAttribute(a,"div","data-bc-pluginid");for(b=0;b<a.length;b++){var c=a[b],d=c.getAttribute("data-bc-pluginid"),e=c.getAttribute("data-bc-config");if(e)try{var f=e.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t"),e=this.blueConicClient.json.parse(f)}catch(g){e=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:d,config:e,node:c,interactionId:this.context.getInteractionId()});this.blueConicClient.isInEditMode()||(c.removeAttribute("data-bc-pluginid"),
c.removeAttribute("data-bc-config"))}}}},emptyElementsWithAttribute:function(a,b,c){a=this.getElementsWithAttribute(a,b,c);b=0;for(c=a.length;b<c;b++)a[b].innerHTML=""},getElementsWithAttribute:function(a,b,c){var d=[];a=a.getElementsByTagName(b);b=0;for(var e=a.length;b<e;b++){var f=a[b];f.getAttribute(c)&&d.push(f)}return d},createElement:function(a){var b;if(!a)return null;try{b=document.createElement("div"),b.innerHTML=a,this.assureVisibilty(b)}catch(c){return null}return b},assureVisibilty:function(a){this.blueConicClient.isInEditMode&&
this.blueConicClient.isInEditMode()&&(a.style.minWidth="10px",a.style.minHeight="10px")}});
var a = [];var i='contentinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.13/'},{ id : 'html', baseUrl : ps + 'html/1.0.10/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b?b:null;this.profile=a.profile.getProfile();this.element=this.context.getDOMElement();this.identifier="bc_"+this.context.getInteractionId();this.parameters=this.context.getParameters();this.htmlFragment=this.createElement(this.parameters.content+"");this.lastEvent=null;this.currentInsertType=this.parameters.inserttype&&this.parameters.inserttype[0]?this.parameters.inserttype[0]:"";"replacecontainer"!==
this.currentInsertType||document.getElementById(this.identifier)||this._hidePosition()},getPreloadProperties:function(){return this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[]},getContent:function(){if(!this.htmlFragment)return null;this.element||(this.element=this.context.getDOMElement());if("replace"===this.currentInsertType)return this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this.htmlFragment.innerHTML},onUpdate:function(){this.currentInsertType!==
this.context.getParameters().inserttype[0]&&document.location.reload()},onLoad:function(){this._placeContent()},_hidePosition:function(){this.styleIdentifier="bcCS"+this.context.getInteractionId();var a=this.context.getPosition()+" {opacity: 0 !important}",b=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0],c=document.createElement("style");c.type="text/css";c.id=this.styleIdentifier;c.styleSheet?c.styleSheet.cssText=a:c.innerHTML=a;b.appendChild(c)},_showPosition:function(){this.jQuery("#"+
this.styleIdentifier).remove()},_placeContent:function(){var a=this.element||this.context.getDOMElement();if(a){this.blueConicClient.isInEditMode()||this.handleURLs(this.htmlFragment);if("replace"!==this.currentInsertType)this.htmlFragment&&(this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this._setContent()&&!this.blueConicClient.isInEditMode()&&this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));else{this.assureVisibilty(a);var b=this.getContent();
if(!b)return;this.blueConicClient.isInEditMode()||this.blueConicClient.createEvent("VIEW",this.context.getInteractionId());var c=a.nodeName?a.nodeName.toLowerCase():a.nodeName;if(-1===this.blueConicClient.util.array.indexOfArray("area base br col command embed hr img input keygen link meta param source track wbr".split(" "),c))this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?a.innerHTML!==b&&(a.innerHTML=b):this.jQuery(a).html(b);else if(a.parentNode){var c=a.parentNode.innerHTML,
e=document.createElement("div");e.appendChild(a.cloneNode(!0));b=c.replace(e.innerHTML,b);a.parentNode.innerHTML!==b&&(a.parentNode.innerHTML=b)}this.handleComplexObjects(a)}if(!this.blueConicClient.isInEditMode()){if(a=this.parameters.clickselector&&this.parameters.clickselector[0]?this.parameters.clickselector[0]:""){this.jQuery("body").one("click",a,this.jQuery.proxy(function(a){this.lastEvent&&this.lastEvent.originalEvent===a.originalEvent||this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())},
this));try{this.jQuery(a).one("click",this.jQuery.proxy(function(a){this.lastEvent=a;this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())},this))}catch(d){}}!this.parameters.forceclick||"true"!==this.parameters.forceclick[0]&&!0!==this.parameters.forceclick[0]||this.blueConicClient.createEvent("CLICK",this.context.getInteractionId());(a=this.parameters.javascript&&this.parameters.javascript[0]?this.parameters.javascript[0]:"")&&this.jQuery("<script>"+a+"\x3c/script>").appendTo(this.jQuery("body"))}}},
_setContent:function(){var a=this._getElementByPosition(this.context.getPosition());if(a){if(a.attr("data-bc-id")===this.identifier||0<this.jQuery("#"+this.identifier).length)return!1;var b=a.parent().get(0);if("prepend"===this.currentInsertType){var c=a.prev();if(0<c.length&&c.attr("data-bc-id")===this.identifier)return!1;this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?(a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode("#bc_"+
this.context.getInteractionId(),{positionName:"before",lockPosition:!0,redrawPosition:!0})):(a.before(this.htmlFragment.innerHTML),a.prev().attr("data-bc-id",this.identifier))}if("append"===this.currentInsertType){c=a.next();if(0<c.length&&c.attr("data-bc-id")===this.identifier)return!1;this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?(a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0).nextSibling),this.blueConicClient.functions.setEditableNode("#bc_"+this.context.getInteractionId(),
{positionName:"after",lockPosition:!0,redrawPosition:!0})):(a.after(this.htmlFragment.innerHTML),a.next().attr("data-bc-id",this.identifier))}"replacecontainer"===this.currentInsertType&&(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?(a.get(0).parentNode.replaceChild(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode("#bc_"+this.context.getInteractionId(),{positionName:"after",lockPosition:!0,redrawPosition:!0})):a.replaceWith(this.htmlFragment.innerHTML),
this._showPosition());this.handleComplexObjects(b);return!0}},_getElementByPosition:function(a){var b=document.getElementById(a);return b=b?this.jQuery(b):this.jQuery(a)},createElement:function(a){var b;if(!a)return null;try{b=document.createElement("div"),b.id=this.identifier,b.innerHTML=a}catch(c){return null}return b},handleURLs:function(a){if(this.parameters.newwindow&&this.parameters.newwindow[0]&&"true"===this.parameters.newwindow[0])for(var b=a.getElementsByTagName("a"),c=0,e=b.length;c<e;c++){var d=
b[c];d.getAttribute("target")||d.setAttribute("target","_blank")}this.handlePlaceholders(a)},assureVisibilty:function(a){this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()&&(a.style.minWidth="10px",a.style.minHeight="10px")},handlePlaceholders:function(a){for(var b=this._getPropertiesFromPlaceholders(a.innerHTML),c=0;c<b.length;c++){var e=b[c],d=this.profile.getValue(e)||"";a.innerHTML=a.innerHTML.replace(new RegExp("\\$\\{"+e+"\\}","g"),encodeURI(d))}},_getPropertiesFromPlaceholders:function(a){for(var b,
c=/\$\{([a-zA-Z\-_0-9]+)\}/g,e=[];null!==(b=c.exec(a));)e.push(b[1]);for(var c=/data-bc-preload="([^"]*)"/g,d=[];null!==(b=c.exec(a));){b=b[1].split(",");for(var f=0;f<b.length;f++)d.push(b[f])}return e.concat(d)},emptyElementsWithAttribute:function(a,b,c){a=this.getElementsWithAttribute(a,b,c);b=0;for(c=a.length;b<c;b++)a[b].innerHTML=""},getElementsWithAttribute:function(a,b,c){var e=[];a=a.getElementsByTagName(b);b=0;for(var d=a.length;b<d;b++){var f=a[b];f.getAttribute(c)&&e.push(f)}return e},
handleComplexObjects:function(a){a=this.getElementsWithAttribute(a,"div","data-bc-pluginid");for(var b=0;b<a.length;b++){var c=a[b],e=c.getAttribute("data-bc-pluginid"),d=c.getAttribute("data-bc-config");if(d)try{var f=d.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t"),d=this.blueConicClient.json.parse(f)}catch(g){d=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:e,config:d,node:c,interactionId:this.context.getInteractionId()});this.blueConicClient.isInEditMode()||
(c.removeAttribute("data-bc-pluginid"),c.removeAttribute("data-bc-config"))}}});
var a = [];var i='contentinteractiontypespecial';a.push({url: '/plugins/contentinteractiontypespecial/js/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : 'https://centric.blueconic.net/plugins/contentinteractiontypespecial/ts_24580a7d937da67e279eb676a9f1e82e/'},{ id : 'boolean', baseUrl : ps + 'boolean/1.0.1/'},{ id : 'html', baseUrl : ps + 'html/1.0.10/'},{ id : 'string', baseUrl : ps + 'string/1.0.1/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(b,a){this.blueConicClient=b;this.context=a},onLoad:function(){function b(g){if(g)for(var b=0,c=g.length;b<c;b++){var d=this.blueConicClient.json.parse(g[b]);if(d&&d.words&&d.selecterarea){var e=this._getSelector(d.selecterarea);try{0<this.jQuery(e).length?a.call(this,d):this.blueConicClient.position.subscribe(e,this,this.jQuery.proxy(a,this,d))}catch(f){}}}}function a(a){if(!f){var b=this.jQuery(this._getSelector(a.selecterarea));if(0<
b.length){var c=!1;b.text()&&(c=a.words,c=this.textContains(b.text(),c));c&&(f=a.interactionId,this.blueConicClient.createEvent("CONVERSION",a.interactionId,this,function(){this.blueConicClient.util.log("CONVERSION event registered for words in content. Interaction: ["+a.interactionId+"]")}))}}}function h(a){if(a)for(var b=0,e=a.length;b<e;b++){var d=this.blueConicClient.json.parse(a[b]);if(d&&d.selecterarea)try{0<this.jQuery(d.selecterarea).length?c.call(this,d):this.blueConicClient.position.subscribe(d.selecterarea,
this,this.jQuery.proxy(c,this,d))}catch(f){}}}function c(a){-1===k.indexOf(a.selecterarea)&&(k.push(a.selecterarea),this.jQuery(a.selecterarea).off("click.conversionlistener"),this.jQuery(a.selecterarea).one("click.conversionlistener",this.jQuery.proxy(function(){l||f===a.interactionId||(l=!0,this.blueConicClient.createEvent("CONVERSION",a.interactionId,this,function(){this.blueConicClient.util.log("CONVERSION event registered for click. Interaction: ["+a.interactionId+"]")}))},this)))}var e=this.context.getParameters();
if(e){var f=null,l=null,k=[],m=e.clickcandidates;m&&h.call(this,m);(e=e.contentcandidates)&&b.call(this,e)}},textContains:function(b,a){if(!b||!this.jQuery.isArray(a))return!1;if(0===a.length||1===a.length&&(""===a[0]||"pre_any"===a[0]))return!0;for(var h=b.toLowerCase(),c=0,e=a.length;c<e;c++)if(a[c]&&this.jQuery.trim(a[c])&&-1!==h.indexOf(a[c].toLowerCase()))return!0;return!1},_getSelector:function(b){var a=null;b&&(0===b.indexOf("pre_")?(a=b.substring(4),"any"===a?a="html":"header"===a&&(a="h1, h2, h3, h4, h5, h6")):
a=b);return a}});
var a = [];var i='conversionlistenerinteractiontype';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.1.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){return[this.context.getParameters().to,"interactions_viewed"]},onLoad:function(){var a=this.context.getParameters(),b=a.to?a.to[0]:void 0,d=a.to_static?a.to_static[0]:void 0,e="false"!==a.delivery[0],g=a.trigger[0];a=this.jQuery;var h=this.context.getProfile(),c=this.context.getInteractionId(),f=function(a,b){this.blueConicClient.mail.sendEmail(a,b);this.blueConicClient.createEvent("VIEW",
a)};if((b||d)&&(h.getValue(b)||d)&&c&&(b=this.blueConicClient.json.parse(g)))if("page"===b.type)f.call(this,c,e);else if("button"===b.type&&b.selector&&a)a("body").one("click",b.selector,a.proxy(function(){f.call(this,c,e)},this))}});var a = [];var i='emailinteractiontype';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/2.0.9/'},{ id : 'email_address_from', baseUrl : ps + 'email_address_from/1.0.0/'},{ id : 'email_message', baseUrl : ps + 'email_message/1.0.3/'},{ id : 'string', baseUrl : ps + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(d,a){this.blueConicClient=d;this.interaction=a;this.parameters=this.interaction.getParameters();if(a=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null){a=d.json.parse(a);this.preLoadProperties=[];for(var b=d=0;b<a.length;b++){var c=a[b];c.profileproperty&&c.decay&&c.nr&&(this.preLoadProperties.push(c.profileproperty+"_index"),c.decay>d&&(d=c.decay,this.property=c.profileproperty))}}else if(a=
this.parameters.property?this.parameters.property[0]:this.parameters.property)this.property=this.blueConicClient.json.parse(a)[0].profileproperty,this.preLoadProperties=[this.property+"_index"]},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(0<this.preLoadProperties.length){var d=this.interaction.getProfile(),a=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(a&&(a=this.blueConicClient.json.parse(a),0!==a.length)){var b=
this.parameters.interests?this.parameters.interests[0]:this.parameters.interests;b=b?this.blueConicClient.json.parse(b).values:[];b=new this.BlueConicEngagement(this.blueConicClient,d,this.property,!0,b,this.jQuery);b.applyEngagementRules(a);if(b.isChanged())b.save();else{a=!1;for(b=0;b<this.preLoadProperties.length;b++){var c=this.preLoadProperties[b];d.getValue(c)||(d.setValue(c,"0"),a=!0)}a&&this.blueConicClient.profile.updateProfile()}}}}});var a = [];var i='engagement_interest_ranking';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: p + i + '/6.2.6/js/engagement_service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/6.2.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(c,a){this.blueConicClient=c;this.interaction=a;this.parameters=this.interaction.getParameters();if(a=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null){a=c.json.parse(a);this.preLoadProperties=[];for(var b=c=0;b<a.length;b++){var d=a[b];d.profileproperty&&d.decay&&(this.preLoadProperties.push(d.profileproperty),d.decay>c&&(c=d.decay,this.property=d.profileproperty))}}else if(a=this.parameters.property?
this.parameters.property[0]:this.parameters.property)this.property=this.blueConicClient.json.parse(a)[0].profileproperty,this.preLoadProperties=[this.property]},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(0<this.preLoadProperties.length){var c=this.interaction.getProfile(),a=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(a&&(a=this.blueConicClient.json.parse(a),0!==a.length)){var b=new this.BlueConicEngagement(this.blueConicClient,
c,this.property,!1,"",this.jQuery);b.applyEngagementRules(a);if(b.isChanged())b.save();else{a=!1;for(b=0;b<this.preLoadProperties.length;b++){var d=this.preLoadProperties[b];c.getValue(d)||(c.setValue(d,"0"),a=!0)}a&&this.blueConicClient.profile.updateProfile()}}}}});var a = [];var i='engagement_score';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: p + i + '/6.2.8/js/engagement_service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/6.2.8/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){this.preloadProperties=[];this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters(this.context.getParameters()));return this.preloadProperties},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters();if(b=b.listener_rules?b.listener_rules[0]:b.listener_rules)b=this.blueConicClient.json.parse(b),a=new this.RuleService(this.blueConicClient,
a,this.jQuery),a.applyRules(b),a.save()},getProfilePropertiesFromParameters:function(a){var b=[];a=a.listener_rules?a.listener_rules[0]:a.listener_rules;if(!a)return b;a=this.blueConicClient.json.parse(a);for(var d=0;d<a.rules.length;d++){var c=a.rules[d];!c.profileproperty||"set_if_empty"!==c.addset&&"merge"!==c.addset||b.push(c.profileproperty[0].profileproperty)}return b}});var a = [];var i='enrichprofilebyvisitorbehavior';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: p + 'enrichProfileByVisitorBehavior/5.1.22/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + 'enrichProfileByVisitorBehavior/5.1.22/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){this.preloadProperties=[];this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters(this.context.getParameters()));return this.preloadProperties},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters();if(b=b.form_listener_rules?b.form_listener_rules[0]:b.form_listener_rules)b=this.blueConicClient.json.parse(b),(new window.FormRuleService(this.blueConicClient,
a,this.jQuery)).applyRules(b)},getProfilePropertiesFromParameters:function(a){var b=[];a=a.form_listener_rules?a.form_listener_rules[0]:a.form_listener_rules;if(!a)return b;a=this.blueConicClient.json.parse(a);for(var c=0;c<a.rules.length;c++){var d=a.rules[c];d.profileproperty&&"set_if_empty"===d.addset&&b.push(d.profileproperty[0].profileproperty)}return b}});var a = [];var i='enrichprofilewithvisitorinput';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: p + 'enrichProfileWithVisitorInput/4.3.9/js/form_rule_service/formRuleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + 'enrichProfileWithVisitorInput/4.3.9/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a},_ouibounce:function(){var a=this;this.ouibounce({aggressive:!0,timer:0,callback:function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown||a.blueConicClient.createEvent("exitintent");window.blueConicClient&&(window.blueConicClient.exitIntentThrown=!0)}})},onLoad:function(){this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown&&
(window.blueConicClient.exitIntentThrown=!1,this._ouibounce())});this._ouibounce()}});var a = [];var i='exitintent';a.push({url: p + i + '/2.0.3/js/ouibounce.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/2.0.3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({languageLabels:{nl:{defaultValidation:"Vul een valide waarde in"},"default":{defaultValidation:"Please enter a valid value"}},_editorOpen:!1,init:function(a,b){this.blueConicClient=a;this.context=b;this.baseURL=this.blueConicClient.getBaseURL("forms");var c=this;this.blueConicClient.event.subscribe("bcComplexObject",this,function(a,b){b.node&&b.node.$&&(b.node=b.node.$);b&&"forms"===b.plugin&&(c.interactionId=b.interactionId,c._loadLibraries(b.config).done(function(){c._loadData(b)}))});
this.blueConicClient.isInEditMode()&&(this._sendMessage("forms.formLoaded"),this.blueConicClient.event.subscribe("forms.updateName",this,function(a,b){a=b.message.field;c.jQuery(".bcForm[data-bc-id\x3d'"+b.message.form+"']").find(".fieldHolder[data-bc-id\x3d'"+a.id+"'] .bcLabel").text(a.settings.label);c.jQuery(".bcForm[data-bc-id\x3d'"+b.message.form+"']").find(".fieldHolder[data-bc-id\x3d'"+a.id+"'] .buttonInput").attr("value",a.settings.label)}),this.blueConicClient.event.subscribe("forms.updateField",
this,function(a,b){c._updateField(b.message.form,b.message.field)}),this.blueConicClient.event.subscribe("forms.updateLabelLocation",this,function(a,b){c._updateLabelLocation(b.message.form,b.message.show_labels_inline)}),this.blueConicClient.event.subscribe("forms.updateStyling",this,function(a,b){c._updateStyling(b.message.styling)}),this.blueConicClient.event.subscribe("forms.addField",this,function(a,b){c._addField(b.message.form,b.message.field,!0)}),this.blueConicClient.event.subscribe("forms.deleteField",
this,function(a,b){c.jQuery(".bcForm[data-bc-id\x3d'"+b.message.form+"']").find(".fieldHolder[data-bc-id\x3d'"+b.message.fieldId+"']").remove();c._removeSelectedState()}),this.blueConicClient.event.subscribe("forms.updateConfig",this,function(a,b){c.jQuery(".bcForm[data-bc-id\x3d'"+b.message.id+"']").closest(".bccomplexobject").attr("data-bc-config",JSON.stringify(b.message))}),this.blueConicClient.event.subscribe("forms.updateOrdering",this,function(a,b){c._updateOrdering(b.message.form,b.message.ordering)}),
this.blueConicClient.event.subscribe("editorOpened",this,function(){this._editorOpen=!0;var a=this;this._loadLibraries().done(function(){a._addBindings()})}),this.blueConicClient.event.subscribe("editorClosed",this,function(){this._editorOpen=!1;c._removeSelectedState();c._sendMessage("forms.closeConfigurator")}))},getPreloadProperties:function(){return[]},_loadLibraries:function(a){if(this.blueConicClient.isInEditMode()){var b=this._getLoadScriptDeferred(this.baseURL+"lib/datepicker.min.js");var c=
this._getLoadScriptDeferred(this.baseURL+"lib/jquery-ui.min.js")}else for(var d=0;d<a.fields.length;d++)"DatePicker"===a.fields[d].fieldType&&(b=this._getLoadScriptDeferred(this.baseURL+"lib/datepicker.min.js"));a=this.jQuery;window.BlueConicJQuery=a;return a.when(b,c)},_getLoadScriptDeferred:function(a){var b=this.jQuery.Deferred();this.blueConicClient.util.loadScript(a,this,function(){b.resolve()});return b},_updateOrdering:function(a,b){var c=this.jQuery,d=c(".bcForm[data-bc-id\x3d'"+a+"']"),e=
null;b.forEach(function(a){a=d.find(".fieldHolder[data-bc-id\x3d'"+a+"']");e?a.insertAfter(e):a.prependTo(d.find("fieldset"));e=a})},_removeSelectedState:function(){var a=this.jQuery;a(".fieldHolder").removeClass("bcSelected")},_updateStyling:function(a){var b=this.jQuery;this._stylingUrl&&b("link[href\x3d'"+this._stylingUrl+"']").remove();this._inlineCss&&this._inlineCss.remove();this._handleStyling(a)},_handleStyling:function(a){var b=this.jQuery;a&&a.css&&(this._stylingUrl=a.css,this.blueConicClient.util.loadCSS(this._stylingUrl));
a&&a.css_inline&&(this._inlineCss=b("\x3cstyle\x3e"+a.css_inline+"\x3c/style\x3e"),this._inlineCss.appendTo(b("body")))},_selectField:function(a,b){this._removeSelectedState();a.addClass("bcSelected");b||(b=a.closest(".bccomplexobject").attr("data-bc-config"),b=this._jsonEscape(b),this._sendMessage("forms.fieldSelected",{form:JSON.parse(b),field:a.attr("data-bc-id")}))},_jsonEscape:function(a){return a.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t")},_addBindings:function(){var a=
window.CKEDITOR;if(a&&a.currentInstance){this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId());this.blueConicClient.util.loadCSS(this.baseURL+"css/formsinline.css");var b=this.jQuery,c=this;b(document).on("click",".bcForm .fieldHolder",function(){c._editorOpen&&c._selectField(b(this))});for(var d in a.currentInstance.widgets.instances)if("bccomplexobject"===a.currentInstance.widgets.instances[d].name){var e=a.currentInstance.widgets.instances[d];"forms"===b(e.wrapper.$).find(".bccomplexobject").attr("data-bc-pluginid")&&
(e.on("select",function(a){b(a.sender.wrapper.$).removeClass("cke_widget_selected")}),e.on("deselect",function(){c._removeSelectedState();c._sendMessage("forms.closeConfigurator")}))}b(".bcForm fieldset").sortable({handle:".bcDragHandle",stop:function(a){var d=[];b(".fieldHolder",b(this)).each(function(){b(this).attr("data-bc-id")&&d.push(b(this).attr("data-bc-id"))});c._sendMessage("forms.updateOrdering",{form:JSON.parse(b(this).closest(".bccomplexobject").attr("data-bc-config")),order:d});a=b(a.toElement);
a.attr("data-bc-config")||(a=a.closest(".fieldHolder"));c._selectField(a,!0)}})}},_sendMessage:function(a,b){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(a,b)},_addField:function(a,b,c){var d=this.jQuery,e=this,f=d(this._getFieldsHTML(b));f.appendTo(d(".bcForm[data-bc-id\x3d'"+a+"'] fieldset"));this._selectField(f,!0);c&&setTimeout(function(){e._isElementInViewport(f.get(0))||f.get(0).scrollIntoView()},100)},_isElementInViewport:function(a){a=a.getBoundingClientRect();
return 0<=a.top&&0<=a.left&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)},_updateField:function(a,b){var c=this.jQuery,d=this._getFieldsHTML(b,!0);c(".bcForm[data-bc-id\x3d'"+a+"']").find(".fieldHolder[data-bc-id\x3d'"+b.id+"']").html(d);this._addDatePickerHandleForField(b)},_updateLabelLocation:function(a,b){var c=this.jQuery;b?c(".bcForm[data-bc-id\x3d'"+a+"']").find("fieldset").addClass("inlineLabels"):
c(".bcForm[data-bc-id\x3d'"+a+"']").find("fieldset").removeClass("inlineLabels")},_loadData:function(a){var b=this,c=this.jQuery,d=a.node;d.innerHTML="";this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId());var e=c('\x3clink type\x3d"text/css" href\x3d"'+this.baseURL+'css/default.uni-form.css" rel\x3d"stylesheet" /\x3e');e.on("load",function(){b._handleStyling(a.config.styling);b._loadForm(d,a.config);b._editorOpen&&b._addBindings()});c("head").append(e)},_loadForm:function(a,
b){var c=this.jQuery;this._node=a;var d=c('\x3cdiv class\x3d"bcForm" data-bc-external\x3d"true" data-bc-id\x3d"'+b.id+'"\x3e\x3c/div\x3e');d.appendTo(c(a));d.html(this._getFormHTML(b));this.blueConicClient.isInEditMode()?this._addDatePickerHandler(d,b):(this._prefillForm(d,b),this._addFormListeners(d,b))},_getFormHTML:function(a){a.styling||(a.styling={});var b=[];b.push('\x3cdiv id\x3d"'+a.id+'" class\x3d"uniForm" action\x3d"#"\x3e\x3cdiv class\x3d"formHolder"\x3e');a.routing&&a.routing.inline_message&&
b.push('\x3cdiv id\x3d"okMsg"\x3e\x3cp\x3e'+a.routing.inline_message+"\x3c/p\x3e\x3c/div\x3e");a.styling.show_labels_inline?b.push('\x3cfieldset class\x3d"inlineLabels"\x3e'):b.push("\x3cfieldset\x3e");a=a.fields;for(var c=0;c<a.length;c++){var d=this._getFieldsHTML(a[c]);b.push(d)}b.push("\x3c/fieldset\x3e\x3c/div\x3e\x3c/div\x3e");return b.join("")},_getFieldsHTML:function(a,b){var c="";switch(a.fieldType){case "PlainText":c='\x3cdiv class\x3d"plaintext"\x3e\x3c%\x3d settings.text %\x3e\x3c/div\x3e';
break;case "SingleLineText":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3cinput type\x3d"text" class\x3d"'+("small"===a.settings.fieldSize?"bcSmall":"large"===a.settings.fieldSize?"bcLarge":"bcMedium")+' textInput" placeholder\x3d"\x3c%\x3d settings.value %\x3e" /\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "TextArea":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3ctextarea rows\x3d"'+("small"===a.settings.fieldSize?3:"large"===a.settings.fieldSize?10:5)+'" placeholder\x3d"\x3c%\x3d settings.value %\x3e"\x3e\x3c/textarea\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "Select":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3cselect class\x3d"selectInput"\x3e\x3c% if (settings.values) for(var i\x3d0; i \x3c settings.values.length; i++) { %\x3e\x3coption\x3c% if(settings.values[i].defaultOn) { %\x3e selected\x3d"selected"\x3c% } %\x3e value\x3d"\x3c%\x3d escape(settings.values[i].identifier || "") %\x3e"\x3e\x3c%\x3d settings.values[i].name %\x3e\x3c/option\x3e\x3c% } %\x3e\x3c/select\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "CheckboxList":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3cul \x3c% if(settings.repeatdirection \x3d\x3d\x3d "horizontal") { %\x3eclass\x3d"horizontal"\x3c% } %\x3e\x3e\x3c%  if (settings.values) for(var i\x3d0; i \x3c settings.values.length; i++) { %\x3e\x3cli\x3e\x3cinput\x3c% if(settings.values[i].defaultOn) { %\x3e checked\x3d"checked"\x3c% } %\x3e type\x3d"checkbox" name\x3d"bcCList_\x3c%\x3d id %\x3e" id\x3d"bcCList_\x3c%\x3d id %\x3e_\x3c%\x3d i %\x3e" value\x3d"\x3c%\x3d escape(settings.values[i].identifier || "") %\x3e"/\x3e\x3clabel for\x3d"bcCList_\x3c%\x3d id %\x3e_\x3c%\x3d i %\x3e"\x3e\x3c%\x3d settings.values[i].name %\x3e\x3c/label\x3e\x3c/li\x3e\x3c% } %\x3e\x3c/ul\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "RadioButtonList":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3cul \x3c% if(settings.repeatdirection \x3d\x3d\x3d "horizontal") { %\x3eclass\x3d"horizontal"\x3c% } %\x3e\x3e\x3c%  if (settings.values) for(var i\x3d0; i \x3c settings.values.length; i++) { %\x3e\x3cli\x3e\x3cinput\x3c% if(settings.values[i].defaultOn) { %\x3e checked\x3d"checked"\x3c% } %\x3e type\x3d"radio" name\x3d"bcRadioList_\x3c%\x3d id %\x3e" id\x3d"bcRadioList_\x3c%\x3d id %\x3e_\x3c%\x3d i %\x3e" value\x3d"\x3c%\x3d escape(settings.values[i].identifier || "") %\x3e"/\x3e\x3clabel for\x3d"bcRadioList_\x3c%\x3d id %\x3e_\x3c%\x3d i %\x3e"\x3e\x3c%\x3d settings.values[i].name %\x3e\x3c/label\x3e\x3c/li\x3e\x3c% } %\x3e\x3c/ul\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "DatePicker":c='\x3cdiv\x3c% if (settings.className) {%\x3e class\x3d"\x3c%\x3d settings.className %\x3e"\x3c% } %\x3e\x3e\x3clabel\x3e\x3c% if(settings.required) { %\x3e\x3cem\x3e*\x3c/em\x3e\x3c% } %\x3e\x3cspan class\x3d"bcLabel"\x3e\x3c%\x3d settings.label %\x3e\x3c/span\x3e\x3c/label\x3e\x3c% if(settings.flat) { %\x3e\x3cdiv class\x3d"datepicker"/\x3e\x3cinput type\x3d"hidden" class\x3d"hiddenInput"/\x3e\x3c% } else { %\x3e\x3cinput type\x3d"text" class\x3d"textInput" placeholder\x3d"\x3c%\x3d settings.value %\x3e" /\x3e\x3cinput type\x3d"hidden" class\x3d"hiddenInput"/\x3e\x3c% } %\x3e\x3c% if(settings.description) { %\x3e\x3cspan class\x3d"formHint"\x3e\x3c%\x3d settings.description %\x3e\x3c/span\x3e\x3c% } %\x3e\x3c/div\x3e';
break;case "Button":c='\x3cdiv class\x3d"buttonHolder\x3c% if (settings.className) {%\x3e \x3c%\x3d settings.className %\x3e\x3c% } %\x3e"\x3e\x3cinput type\x3d"submit" class\x3d"buttonInput primaryAction" value\x3d"\x3c%\x3d settings.label %\x3e"/\x3e\x3c/div\x3e'}this.blueConicClient.isInEditMode()&&(c+='\x3cdiv class\x3d"bcDragHandle"\x3e\x3cdiv class\x3d"bcInnerDragHandle"\x3e\x3c/div\x3e\x3c/div\x3e');b||(c='\x3cdiv class\x3d"fieldHolder blueConic\x3c%\x3d fieldType %\x3e" data-bc-id\x3d"\x3c%\x3d id %\x3e"\x3e'+
c+"\x3c/div\x3e");return this._tmpl(c,a)},_prefillForm:function(a,b){var c=this.context.getProfile(),d=a.find(".fieldHolder, .buttonHolder");a=[];for(var e=0;e<b.fields.length;e++){var f=b.fields[e];f.settings.prefillproperty&&a.push(f.settings.prefillproperty)}0!==a.length&&c.loadValues(a,this,function(){for(var a=0;a<b.fields.length;a++){var e=b.fields[a],f=this.jQuery(d[a]).find("input, textarea, select");if(e.settings.prefillproperty){var l=c.getValues(e.settings.prefillproperty);if(0<l.length)switch(e.fieldType){case "CheckboxList":case "Checkbox":case "RadioButtonList":case "RadioButton":for(e=
0;e<l.length;e++)f.filter('[value\x3d"'+l[e]+'"]').attr("checked","checked");break;default:f.val(l[0])}}}})},_addDatePickerHandler:function(a,b){for(a=0;a<b.fields.length;a++)this._addDatePickerHandleForField(b.fields[a])},_addDatePickerHandleForField:function(a){var b=this.jQuery;if("DatePicker"===a.fieldType){var c="nl"===this.context.getLocale()?"NL":"EN";var d=a.settings.pickerOffset?new Date(a.settings.pickerOffset):new Date;var e=b("div[data-bc-id\x3d'"+a.id+"']");b("input.textInput, div.datepicker",
e).DatePicker({flat:a.settings.flat,lang:c,calendars:a.settings.calendars,date:d,current:d,onChange:b.proxy(function(a,c){var d=b("div[data-bc-id\x3d'"+this.id+"']");b("input.hiddenInput",d).val(c.getTime());0<b("input.textInput",d).length&&(b("input.textInput",d).val(a),b("input.textInput",d).DatePickerHide())},a)});if(!a.settings.flat)e.on("focus","input.textInput",function(){b("input.textInput, div.datepicker",e).DatePickerShow()})}},_submit:function(a,b){var c=this,d=c._validateForm(a,b);d||c.blueConicClient.createEvent("CLICK",
c.interactionId);d&&(c.blueConicClient.createEvent("CLICK",c.interactionId,c,function(){c.blueConicClient.createEvent("CONVERSION",c.interactionId)}),c._storeFormValues(a,function(){"form_routing_inline"===b.routing.type?b.routing.inline_message?(c.jQuery("fieldset",a).hide(),c.jQuery("#okMsg",a).show(),c.jQuery.fancybox&&c.jQuery.fancybox.update()):c._closeOverlay():"form_routing_url"!==b.routing.type&&b.routing.type?"form_routing_close_lightbox"===b.routing.type&&c._closeOverlay():setTimeout(function(){document.location=
b.routing.go_to_url},0)},b))},_closeOverlay:function(){this.blueConicClient.event.publish("closeoverlay",[this.interactionId])},_addFormListeners:function(a,b){this._addDatePickerHandler(a,b);this.jQuery('input[type\x3d"submit"]',a).click(this.jQuery.proxy(function(c){c.preventDefault();this._submit(a,b)},this));1===b.fields.length&&"RadioButtonList"===b.fields[0].fieldType&&this.jQuery('input[type\x3d"radio"]',a).click(this.jQuery.proxy(function(c){c.preventDefault();this._submit(a,b)},this))},_validateForm:function(a,
b){var c=a.find(".fieldHolder, .buttonHolder");a.find("span.errormsg").remove();c.removeClass("error");a=!0;for(var d=0;d<b.fields.length;d++){var e=b.fields[d],f=this.jQuery(c[d]),g=f.find("input, textarea, select"),h=!1;if(e.settings.required)switch(e.fieldType){case "CheckboxList":case "Checkbox":case "RadioButtonList":case "RadioButton":0===g.filter(":checked").length&&(h=!0);break;case "DatePicker":g.filter(".hiddenInput").val()||(h=!0);break;default:g.val()||(h=!0)}var k=!1;if(!h&&e.settings.validation&&
(g=this.jQuery.trim(g.val())))switch(e.settings.validation){case "email":g.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)||(k=!0);break;case "number":g.match(/^\d+$/)||(k=!0);break;case "regexp":e.settings.validation_regexp&&!g.match(e.settings.validation_regexp)&&(k=!0)}if(h||k)if(a=!1,f.addClass("error"),k||e.settings.validation_failed_msg)h="nl"===this.context.getLocale()?"nl":"default",f.before('\x3cspan class\x3d"errormsg"\x3e'+
(e.settings.validation_failed_msg?e.settings.validation_failed_msg:this.languageLabels[h].defaultValidation)+"\x3c/span")}return a},_storeFormValues:function(a,b,c){for(var d=this.context.getProfile(),e=0;e<c.fields.length;e++){var f=c.fields[e],g=this.jQuery(a).find("div[data-bc-id \x3d '"+f.id+"']").find("input, textarea, select");if(f.settings.storeproperty)switch(f.fieldType){case "CheckboxList":case "Checkbox":case "RadioButtonList":case "RadioButton":var h=[];g=g.filter(":checked");for(var k=
0;k<g.length;k++){var l=this.jQuery(g[k]).val();l=unescape(l);h.push(l)}if("set"===f.settings.overwriteValue)d.setValues(f.settings.storeproperty,h);else for(g=0;g<h.length;g++)d.addValue(f.settings.storeproperty,h[g]);break;case "DatePicker":h=g.filter(".hiddenInput").val();"set"===f.settings.overwriteValue?d.setValue(f.settings.storeproperty,h):d.addValue(f.settings.storeproperty,h);break;default:h=unescape(g.val()),"set"===f.settings.overwriteValue?d.setValue(f.settings.storeproperty,h):d.addValue(f.settings.storeproperty,
h)}}this.blueConicClient.profile.updateProfile(b)},_tmpl:function(a,b){a=/\W/.test(a)?new Function("obj","var p\x3d[],print\x3dfunction(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g," ").split("\x3c%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%\x3e").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):this.cache[a]=this.cache[a]||tmpl(document.getElementById(a).innerHTML);return b?a(b):a}});var a = [];var i='forms';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.27/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({init:function(b,d){this.blueConicClient=b;this.context=d?d:null;this.clickEventPublished=this.viewEventPublished=!1;var a=this.context.getParameters();if(a&&("true"===a.hasOverlay[0]&&(this.viewEventPublished=!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId())),a=a.positions))for(var c=0;c<a.length;c++)this.blueConicClient.position.subscribe(a[c],this,this._handlePosition)},_handleClick:function(){this.clickEventPublished||(this.clickEventPublished=
!0,this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_handlePosition:function(b){this.viewEventPublished||this.blueConicClient.isInEditMode()||(this.viewEventPublished=!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var d=this;try{var a="bcCtrl"+this.context.getInteractionId();this.jQuery(b+" a").off("click."+a).on("click."+a,function(){d._handleClick()});this.jQuery(document).off("click."+a).on("click."+a,b+" a",function(){d._handleClick()});
this.jQuery(document).off("submit."+a).on("submit."+a,b+" form",function(){d._handleClick()});if(0<this.jQuery(b).find("iframe").length){window.focus();var c=!1,e=this.jQuery(this.jQuery(b).find("iframe"));e.off("mouseenter."+a).on("mouseenter."+a,function(){c=!0});e.off("mouseleave."+a).on("mouseleave."+a,function(){c=!1});this.jQuery(window).off("blur."+a).on("blur."+a,this.jQuery.proxy(function(){c&&this._handleClick()},this))}}catch(f){}},onLoad:function(){}});
var a = [];var i='globallistener_controlgroup';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({_timeout:null,_timeStamp:null,_interval:200,init:function(b,a){this.blueConicClient=b;this.context=a?a:null},_handleInactivity:function(){this.blueConicClient.createEvent("inactivity")},_checkTimeout:function(){var b=this;(new Date).getTime()-this._timeStamp>this._timeout?this._handleInactivity():b._timeoutID=setTimeout(function(){b._checkTimeout()},b._interval)},onLoad:function(){var b=this.jQuery,a=this;this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,
this,function(b,c){this._timeStamp=(new Date).getTime();clearTimeout(a._timeoutID);a._timeoutID=setTimeout(function(){a._checkTimeout()},a._interval)});this._timeStamp=(new Date).getTime();var c=this.context.getParameters(),d="true"===c.clicks[0],e="true"===c.inputs[0];var f=c.scrolling?"true"===c.scrolling[0]:!0;this._timeout=c.timeout[0];this._timeout?isNaN(parseInt(this._timeout))||(this._timeout=1E3*parseInt(this._timeout)):this._timeout=6E4;if(d||e||f){if(d)b(document).on("click","*",function(){a._timeStamp=
(new Date).getTime()});e&&(b("input").on("keyup",function(){a._timeStamp=(new Date).getTime()}),b("textarea").on("keyup",function(){a._timeStamp=(new Date).getTime()}),b("select").on("change",function(){a._timeStamp=(new Date).getTime()}),b("input").on("change",function(){a._timeStamp=(new Date).getTime()}));f&&(window.onscroll=function(b){a._timeStamp=(new Date).getTime()});this._timeoutID=setTimeout(function(){a._checkTimeout()},a._interval)}}});var a = [];var i='inactivitylistener';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.1.9/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(b,a){this.blueConicClient=b;this.interaction=a},onLoad:function(){var b=this.interaction.getProfile(),a=this.interaction.getParameters(),c=a.ip_range_rules?a.ip_range_rules[0]:a.ip_range_rules;a=a.property?a.property[0]:a.property;var e=this.blueConicClient.getIPAddress();if(c&&a&&e&&(c=this.blueConicClient.json.parse(c),0!==c.length)){for(var m=!1,k=0;k<c.rules.length;k++){var d=c.rules[k],f=d.lowest,g=d.highest,h=d.addset;d=d.values;
if(f&&g&&d&&0<d.length){if(1<f.split(":").length&&1<g.split(":").length&&1<e.split(":").length){var l=this.ip2num(this.ip6hexToNumber(e));f=this.ip2num(this.ip6hexToNumber(f));g=this.ip2num(this.ip6hexToNumber(g))}else l=this.ip2num(e),f=this.ip2num(f),g=this.ip2num(g);if(l<=g&&l>=f)if(m=!0,"add"===h)for(h=0;h<d.length;h++)b.addValue(a,d[h]);else b.setValues(a,d)}}m&&this.blueConicClient.profile.updateProfile()}},ip2num:function(b){var a=b.split(".");0===a.length&&(a=b.split(":"));4===a.length&&a.unshift(0,
0,0,0);return 256*(256*(256*(256*(256*(256*(256*+a[0]+ +a[1])+ +a[2])+ +a[3])+ +a[4])+ +a[5])+ +a[6])+1*+a[7]},ip6hexToNumber:function(b){b=b.split(":");for(var a=[],c=0;c<b.length;c++)if(""===b[c])for(var e=0;e<=8-b.length;e++)a.push(0);else a.push(parseInt(b[c],16));return a.join(".")}});var a = [];var i='iplistenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/2.0.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b;this.parameters=this.context.getParameters();this.isInEditMode=this.blueConicClient.isInEditMode();this.fancyBoxLib="lib/fancybox/jquery.fancybox.pack.js";b=this.context.getInteractionTypeId();this.baseURL=this.blueConicClient.getBaseURL(b);this.htmlFragment=this.createElement(this.parameters.content+"");this.profile=a.profile.getProfile();this._eventListenerFunction=this._observer=this._timestamp=
this.inlineCss=null;this._librariesLoaded=this._lightboxTriggered=!1;this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[];this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.blueConicClient._renderedInteractions.splice(this.blueConicClient._renderedInteractions.indexOf(this.context.getInteractionId()),1)})},getPreloadProperties:function(){for(var a=this.context.getParameters().content+"",b=/data-bc-preload="([^"]*)"/g,
c=[],d;null!==(d=b.exec(a));){d=d[1].split(",");for(var f=0;f<d.length;f++)c.push(d[f])}a=this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[];for(b=0;b<c.length;b++)a.push(c[b]);return a},onMessageReceived:function(a){this.blueConicClient.event.publish("lightbox.messageReceived",a)},onLoad:function(){this.blueConicClient._lightboxinteractiontypeFancybox?(this.jQuery.fancybox=this.blueConicClient._lightboxinteractiontypeFancybox,this._librariesLoaded=!0,this._onLoadWithLibrary()):
this.blueConicClient.util.loadScript(this.baseURL+this.fancyBoxLib,this,function(){this.blueConicClient._loadLightboxInteractionTypeFancyBox(window,document,this.jQuery);this.blueConicClient._lightboxinteractiontypeFancybox=this.jQuery.fancybox;delete this.blueConicClient._loadLightboxInteractionTypeFancyBox;this._librariesLoaded=!0;this._onLoadWithLibrary()})},_onLoadWithLibrary:function(){if(this.isInEditMode)this.showLightbox();else{var a=this.parameters.selected_when||[],b=this.getParameter("click_selector");
b&&-1!==a.indexOf("click_selector")&&this._addClickTriggerBindings(b);(b=this.getParameter("content_condition"))&&-1!==a.indexOf("content_condition")&&this._addContentPolling(b);(b=this.parameters.scroll_depth&&this.parameters.scroll_depth[0]&&!isNaN(this.parameters.scroll_depth[0])?parseInt(this.parameters.scroll_depth[0]):0)&&-1!==a.indexOf("scroll_depth")&&this._addScrollBinding(b);0===a.length&&this.showLightbox();this._addCloseEventHandler()}},_checkScrollCondition:function(a){var b=this.jQuery(window).scrollTop(),
c=this.jQuery(document).height();b/(c-window.innerHeight)*100>=a&&this.showLightbox()},_addScrollBinding:function(a){this._checkScrollCondition(a);this.jQuery(window).scroll(this.jQuery.proxy(function(){this._checkScrollCondition(a)},this))},_addClickTriggerBindings:function(a){try{var b=this.jQuery(a);if(0<b.length)b.off("click.lightboxinteractiontype").on("click.lightboxinteractiontype",this.jQuery.proxy(function(a){this.showLightbox(!0)},this));else this.blueConicClient.position.subscribe(a,this,
this.jQuery.proxy(this._addClickTriggerBindings,this,a))}catch(c){}},_addContentPolling:function(a){this._checkContentCondition(a);var b=this,c=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver(function(){b._observeContentChanges(a)}),this._observer.observe(c,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){b._observeContentChanges(a)},c.addEventListener("DOMNodeInserted",
this._eventListenerFunction,!1);else var d=setInterval(function(){b._lightboxTriggered?clearInterval(d):b._checkContentCondition(a)},500)},_observeContentChanges:function(a){if(this._lightboxTriggered)this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else{var b=this,c=(new Date).getTime();this._timestamp=c;setTimeout(function(){b._timestamp!==c||b._lightboxTriggered||b._checkContentCondition(a)},
250)}},_checkContentCondition:function(a){0<this.jQuery(a).length&&this.jQuery(a).html()&&0<this.jQuery(a).html().length&&this.showLightbox()},closeLightbox:function(){this.isInEditMode||this.jQuery.fancybox.close()},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,function(a,b){b instanceof Array&&b[0]===this.context.getInteractionId()&&this.closeLightbox()})},showLightbox:function(a){-1===this.blueConicClient._renderedInteractions.indexOf(this.context.getInteractionId())&&
(this.blueConicClient._renderedInteractions.push(this.context.getInteractionId()),!this._lightboxTriggered||this.isInEditMode||a)&&(a=this.parameters.delay&&this.parameters.delay[0]&&!isNaN(this.parameters.delay[0])?1E3*parseInt(this.parameters.delay[0]):0,!this.isInEditMode&&0<a?window.setTimeout(this.jQuery.proxy(function(){this._showLightbox()},this),a):this._showLightbox())},getSettings:function(){var a=null,b=this.getParameter("width"),c=this.getParameter("height");b=b&&!isNaN(parseInt(b))?parseInt(b):
null;c=c&&!isNaN(parseInt(c))?parseInt(c):null;this.htmlFragment&&(a=this.htmlFragment.innerHTML);var d=!(b||c),f=this.getParameter("show_close"),h=this.getParameter("alternative_close");b={parent:"body",autoSize:d,autoCenter:!1,autoWidth:!b,autoHeight:!c,closeBtn:"false"!==f,width:b||"auto",height:c||"auto",keys:{close:"false"===h||this.isInEditMode?null:[27]},helpers:{overlay:{locked:!0,closeClick:"false"!==h&&!this.isInEditMode}}};this.getParameter("template")&&(b.padding=0);if(a||this.isInEditMode)b.content=
" ",b.type="inline";var e=this,g=this.jQuery;c=function(){e.emptyElementsWithAttribute(e.htmlFragment,"div","data-bc-external");g(".fancybox-inner").html(e.htmlFragment.innerHTML);e.isInEditMode&&e.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:e});e.handleComplexElements(g(".fancybox-inner").get(0));var a=e.getParameter("javascript");if(a&&!e.blueConicClient.isInEditMode()){e._inlineJs=e.jQuery("\x3cscript\x3e"+a+"\x3c/script\x3e");try{e._inlineJs.appendTo(e.jQuery("body"))}catch(l){console.error(l)}}};
d=this.getParameter("effect");var k=this.getParameter("effect_slide_direction")||"left";this.isInEditMode&&(d="noEffect");d&&"noEffect"!==d&&("fadeIn"===d?g.fancybox.transitions.openEffect=function(){var a=g.fancybox._getPosition(!0);a.opacity=0;g.fancybox.wrap.css(a).show().animate({opacity:1},{duration:g.fancybox.current.openSpeed,complete:g.fancybox._afterZoomIn})}:"slideIn"===d&&(g.fancybox.transitions.openEffect=function(){var a=g.fancybox._getPosition(!0),b=g(window).height(),c=g(window).width(),
d=g(".fancybox-wrap").get(0).getBoundingClientRect(),e="top"===k||"bottom"===k?"top":"left";if("top"===k||"bottom"===k)var f=b-(b-d.height)/2;else if("left"===k||"right"===k)f=c-(c-d.width)/2;a[e]="top"===k||"left"===k?parseInt(a[e])-f+"px":parseInt(a[e])+f+"px";b={};b[e]=("top"===k||"left"===k?"+":"-")+"\x3d"+f+"px";g.fancybox.wrap.css(a).show().animate(b,{duration:g.fancybox.current.openSpeed,complete:g.fancybox._afterZoomIn})}),g.fancybox.transitions.openEffect&&(b.openMethod="openEffect",b.openSpeed=
1E3));a?b.afterLoad=c:e.isInEditMode&&(b.afterLoad=function(){e.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:e})});this.isInEditMode&&(b.afterShow=function(){g(".fancybox-close").off("click.fb")});b.afterClose=function(){e.blueConicClient._renderedInteractions.splice(e.blueConicClient._renderedInteractions.indexOf(e.context.getInteractionId()),1)};return b},updateLightbox:function(){this.jQuery.fancybox.update()},getCurrentFancyBox:function(){return this.jQuery.fancybox.current},
_showLightbox:function(){function a(){var f=c('\x3cdiv class\x3d"fancybox-wrap jq_tmp" style\x3d"display:none"\x3e\x3c/div\x3e');c("body").append(f);var h=f.css("top");f.remove();"auto"===h?5<d||(d++,window.setTimeout(c.proxy(a,this),200)):b.call(this,c)}function b(){if(!this.isInEditMode){this.blueConicClient.createEvent("VIEW",this.context.getInteractionId());!this.parameters.forceclick||"true"!==this.parameters.forceclick[0]&&!0!==this.parameters.forceclick[0]||this.blueConicClient.createEvent("CLICK",
this.context.getInteractionId());var a=this.getParameter("click_event_selector");if(a){this.jQuery("body").one("click",a,this.jQuery.proxy(function(a){this.lastClickEvent&&this.lastClickEvent.originalEvent===a.originalEvent||this._logClickEvent(a)},this));try{this.jQuery(a).one("click",this.jQuery.proxy(function(a){this.lastClickEvent=a;this._logClickEvent(a)},this))}catch(h){}}}c(".fancybox-wrap").remove();c(".fancybox-overlay").remove();this.highZindex=function(a){a=document.getElementsByTagName(a);
var b=0,c;for(c=0;c<a.length;c++){var d=document.defaultView.getComputedStyle(a[c],null).getPropertyValue("z-index");"auto"!==d&&parseInt(d)>b&&(b=parseInt(d))}return b}("*");this.htmlFragment&&(this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this.isInEditMode||this.handlePlaceholders(this.htmlFragment));c.fancybox(this.getSettings());8E3<this.highZindex&&2147483647>this.highZindex+1030&&(c(".fancybox-opened").css("z-index",this.highZindex+1030),c(".fancybox-wrap").css("z-index",
this.highZindex+920),c(".fancybox-overlay").css("z-index",this.highZindex+910));2147483647<=this.highZindex+1030&&(c(".fancybox-opened").css("z-index",2147483647),c(".fancybox-wrap").css("z-index",2147483646),c(".fancybox-overlay").css("z-index",2147483645));this.isInEditMode||this._setupFrontEndBindings()}this._lightboxTriggered=!0;var c=this.jQuery;this.blueConicClient.util.loadCSS(this.baseURL+"lib/fancybox/jquery.fancybox.css");this.handleStyling(this.getParameter("close_icon"),this.getParameter("close_icon_hover"));
this.handleJavascript();var d=0;a.call(this)},_logClickEvent:function(a){a&&a.originalEvent&&a.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||a&&a.target&&a.target.pathname&&a.target.hostname&&0===a.target.pathname.indexOf("/s/")&&-1!==a.target.hostname.indexOf("blueconic")||(a.originalEvent&&(a.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_setupFrontEndBindings:function(){var a=
this.jQuery(".bcLightboxDontShowAgainLink"),b=this.jQuery(".bcLightboxCloseButton");if(0<a.length)a.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",this.jQuery.proxy(function(a){a.preventDefault();this.blueConicClient.doNotShowAgain(this.context.getInteractionId());this.closeLightbox()},this));if(0<b.length)b.off("click.closeButtons").on("click.closeButtons",this.jQuery.proxy(function(a){this.closeLightbox()},this))},handleComplexElements:function(a){a=this.getElementsWithAttribute(a,
"div","data-bc-pluginid");for(var b=0;b<a.length;b++){var c=a[b],d=c.getAttribute("data-bc-pluginid"),f=c.getAttribute("data-bc-config");if(f)try{var h=f.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");f=this.blueConicClient.json.parse(h)}catch(e){f=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:d,config:f,node:c,interactionId:this.context.getInteractionId()});this.isInEditMode||(c.removeAttribute("data-bc-pluginid"),c.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(a,
b,c){a=this.getElementsWithAttribute(a,b,c);b=0;for(c=a.length;b<c;b++)a[b].innerHTML=""},getElementsWithAttribute:function(a,b,c){var d=[];a=a.getElementsByTagName(b);b=0;for(var f=a.length;b<f;b++){var h=a[b];h.getAttribute(c)&&d.push(h)}return d},createElement:function(a){if(!a)return null;try{var b=document.createElement("div");b.innerHTML=a}catch(c){return null}return b},handlePlaceholders:function(a){for(var b=this._getPropertiesFromPlaceholders(a.innerHTML),c=0;c<b.length;c++){var d=b[c],f=
this.profile.getValue(d)||"";a.innerHTML=a.innerHTML.replace(new RegExp("\\$\\{"+d+"\\}","g"),encodeURI(f))}},_getPropertiesFromPlaceholders:function(a){for(var b=/\$\{([a-zA-Z\-_0-9]+)\}/g,c=[],d;d=b.exec(a);)c.push(d[1]);return c},getParameter:function(a){return this.parameters[a]&&this.parameters[a][0]?this.parameters[a][0]:null},getParameters:function(a){return this.parameters[a]||null},handleJavascript:function(){var a=this.jQuery,b=this.getParameters("javascript_urls"),c=[];if(b){this.javascriptUrls=
b;for(var d=0;d<b.length;d++)c.push(this._getLoadScriptDeferred(b[d]))}return a.when.apply(a,c)},_getLoadScriptDeferred:function(a){var b=this.jQuery.Deferred();this.blueConicClient.util.loadScript(a,this,function(){b.resolve()});return b},handleStyling:function(a,b){var c=this.getParameter("content");c&&-1!==c.indexOf("bcLightboxTemplate")||this.blueConicClient.util.loadCSS(this.baseURL+"css/lightbox.css");if(c=this.getParameter("styling_css"))this.stylingUrl=c,this.blueConicClient.util.loadCSS(c);
c="";"true"===this.getParameter("custom_close")&&a&&(c+=".fancybox-close {background-image: url('"+a+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}",b&&(c+=".fancybox-close:hover {background-image: url('"+b+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}"));a=this.getParameter("close_position");b=this.getParameter("close_padding");c+=this._getClosePositionStyling(a,b);(a=this.getParameter("styling_css_inline"))&&
(c+=a.replace(/&#xd;/gi,""));c&&(this.inlineCss=this.jQuery("\x3cstyle\x3e"+c+"\x3c/style\x3e"),this.inlineCss.appendTo(this.jQuery("body")))},_getClosePositionStyling:function(a,b){if(!a)return"";if(null===b||"NaN"===b)b="-18";var c=".fancybox-close {";switch(a){case "TOP_LEFT":c+="top:"+b+"px; right: unset; bottom: unset; left:"+b+"px;";break;case "BOTTOM_RIGHT":c+="top: unset; right: "+b+"px; bottom: "+b+"px; left: unset;";break;default:c+="top: "+b+"px; right: "+b+"px; bottom: unset; left: unset;"}return c+
"}"}});var a = [];var i='lightboxinteractiontype';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/2.1.6/'},{ id : 'html', baseUrl : ps + 'html/1.0.10/'},{ id : 'image', baseUrl : ps + 'image/1.0.2/'},{ id : 'number', baseUrl : ps + 'number/1.0.2/'},{ id : 'string', baseUrl : ps + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){var a=this.context.getParameters();return(a=a.property?a.property[0]:a.property)?[a]:[]},onLoad:function(){var a=this,b=this.context.getProfile(),d=this.context.getParameters(),c=d.property?d.property[0]:d.property;c||(c="adblock_detected");d=function(){"no"!==b.getValue(c)&&(b.setValue(c,"no"),a.blueConicClient.profile.updateProfile())};var e=function(){"yes"!==
b.getValue(c)&&(b.setValue(c,"yes"),a.blueConicClient.profile.updateProfile())};window.blockAdBlock?(window.blockAdBlock.on(!1,d),window.blockAdBlock.on(!0,e),window.blockAdBlock.check()):e()}});var a = [];var i='listener_adblock';a.push({url: p + i + '/1.0.8/lib/blockadblock.min.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.8/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){var a=this.context.getParameters();if(a=a.responseProperty?a.responseProperty[0]:a.responseProperty)return this.campaignIdentifierProperty=a,[a];this.campaignIdentifierProperty="responded_to_campaigns";return["responded_to_campaigns"]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),e=this.blueConicClient,c=!1,d=!1;if(b=b.config?
b.config[0]:b.config){b=this.blueConicClient.json.parse(b);for(var g=0;g<b.length;g++){var f=b[g],h=this.getParameterByName(f.parameter);h&&f.profileProperty&&(a.addValue(f.profileProperty,h),c=!0,f.isCampaignIdentifier&&!d&&(this._bindHandlers(h),d=!0))}c&&e.profile.updateProfile()}},_bindHandlers:function(a){var b=this,e=this.context.getProfile(),c=this.blueConicClient,d=this.jQuery;d("a").click(function(){e.addValue(b.campaignIdentifierProperty,a);c.profile.updateProfile()});d("form").submit(function(){e.addValue(b.campaignIdentifierProperty,
a);c.profile.updateProfile()})},getParameterByName:function(a){if(!a)return"";a=a.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?\x26]"+a+"\x3d([^\x26#]*)")).exec(location.search);return null===a?"":decodeURIComponent(a[1].replace(/\+/g," "))}});var a = [];var i='listener_campaign_tracker';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.8/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,c){this.blueConicClient=a;this.context=c;a=new Date(2015,0,1,0,0,0,0);a=(new Date).getTime()-a.getTime();this.days=Math.floor(a/864E5);this.weekNr=Math.floor(this.days/7)},getPreloadProperties:function(){return["_engagement","visits","clickcount"]},onLoad:function(){var a=this.context.getProfile(),c=this.context.getParameters(),k=parseInt(c.lowTreshold?c.lowTreshold[0]:c.lowTreshold);c=parseInt(c.highTreshold?c.highTreshold[0]:c.highTreshold);
var e=parseInt(a.getValue("clickcount")),b=parseInt(a.getValue("visits")),d=a.getValue("_engagement")?JSON.parse(a.getValue("_engagement")):{},f=!1;d["v"+this.weekNr]||(d["v"+this.weekNr]=b,f=!0);d["c"+this.weekNr]||(d["c"+this.weekNr]=e,f=!0);e=this._getCalculated(d,b,e);for(var g=b=0;g<e.length;g++){var h=.1;5>g?h=1:10>g?h=.8:20>g?h=.5:50>g&&(h=.3);var l=e[g];b+=(l.clickCount+5*l.visits)*h}b=Math.floor(b);isNaN(b)||(a.setValue("engagement_score",b),f&&a.setValue("_engagement",JSON.stringify(d)),
b<k?a.setValue("engagement","low"):b>c?a.setValue("engagement","high"):a.setValue("engagement","medium"),this.blueConicClient.profile.updateProfile())},_getCalculated:function(a,c,k){for(var e=[],b=this.weekNr;0<b;b--){var d=0;a["v"+b]&&(d=c-a["v"+b],c-=d);var f=0;a["c"+b]&&(f=k-a["c"+b],k-=f);e.push({week:b,visits:d,clickCount:f})}return e}});var a = [];var i='listener_engagement';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.10/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b},getPreloadProperties:function(){return[]},onLoad:function(){}});var a = [];var i='listener_geolocation';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.7/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;this.context=b;a=new Date(2017,8,1,0,0,0,0);a=this.blueConicClient.getCurrentDate().getTime()-a.getTime();this.days=Math.floor(a/864E5)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),c=b.property?b.property[0]:b.property;if(c){c=this.blueConicClient.json.parse(c)[0].profileproperty;var d=this.blueConicClient.getCurrentDate();b=this._getTimeFrame(d.getHours(),
b.locale[0]);d={TIME:(new Date).getTime(),data:[]};d.data.push({n:b,p:1,d:this.days});a.addValue("_hl_"+c,this.blueConicClient.json.stringify(d));this.blueConicClient.profile.updateProfile()}},_getTimeFrame:function(a,b){return this._getHour(a,b)+" - "+this._getHour(a+1,b)},_getHour:function(a,b){return"en-us"===b?(b=12<=a?"PM":"AM",a%=12,(0===a?12:a)+" "+b):(10>a?"0"+a:a)+":00"}});var a = [];var i='listener_preferred_hour';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.2.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=a.profile.getProfile(),this.referrer=document.referrer,this.currentUrl=window.location.href},onPrepare:function(){var a=this.profile,b=function(){var a=window.navigator.userLanguage||navigator.systemLanguage||window.navigator.language;if(!a)return null;var b=-1===a.indexOf('-')?a.indexOf('_'):a.indexOf('-');return-1!==b&&(a=a.substring(0,b)),a=a.toLowerCase(),a}();b&&a.setValue('language',b);var c=screen.width,d=screen.height,e=c+'x'+d;a.setValue('currentresolution',e),a.setValue('currentscreenwidth',c),a.setValue('currentscreenheight',d),a.addValue('resolution',e);var f=this.referrer,g=this.HELPER.decodeReferrer(f),h=[];if(g&&0<g.length)for(var j=0;j<g.length;j++)g[j]&&(a.addValue('keywords',g[j]),h.push(g[j]));0<h.length&&a.setValues('currentkeywords',h);var i=f.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,'$1'),k=window.location.hostname;i!==k&&''!==i&&a.setValue('referrerhost',i);var l=this.currentUrl,m=this.HELPER.substringToHash(this.HELPER.decodeReferrerQS(l,'utm_source')),n=this.HELPER.substringToHash(this.HELPER.decodeReferrerQS(l,'utm_medium')),o=this.HELPER.substringToHash(this.HELPER.decodeReferrerQS(l,'utm_term')),p=this.HELPER.substringToHash(this.HELPER.decodeReferrerQS(l,'utm_content')),q=this.HELPER.substringToHash(this.HELPER.decodeReferrerQS(l,'utm_campaign'));(m||n||o||p||q)&&(a.setValue('current_utm_source',m),a.setValue('current_utm_medium',n),a.setValue('current_utm_term',o),a.setValue('current_utm_content',p),a.setValue('current_utm_campaign',q),m&&a.addValue('utm_source',m),n&&a.addValue('utm_medium',n),o&&a.addValue('utm_term',o),p&&a.addValue('utm_content',p),q&&a.addValue('utm_campaign',q))},getPreloadProperties:function(){return['clickcount','visits','visitclicks','lastvisitdate','visitedsites','entrypage','hostentrypage','hostaveragetime','lastreferreraverage','averageTime','resolution']},onLoad:function(){var a,b,c=Math.round,d=this.profile,e=this.referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,'$1'),f=window.location.hostname;if(e!==f){''!==e&&d.addValue('referrerhosts',e);var g=this.currentUrl;d.setValue('entrypage',g);var h=d.getValue('hostentrypage');if(!h)h={};else try{h=eval(h)}catch(a){h={}}h[f]={entrypage:g};var i='{';for(a in h)'}'===i.substring(i.length-1)&&(i+=','),b=''+a,i+='"'+b+'" : {',i+='"entrypage" : "'+h[a].entrypage,i+='"}';i+='}',d.setValue('hostentrypage',i)}var j=this.blueConicClient.getCurrentDate().getTime(),k=d.getValue('hostaveragetime');if(!k)k={};else try{k=k.replace(/'/g,'"'),k=this.blueConicClient.json.parse(k)}catch(a){k={}}'undefined'==typeof k[f]&&(k[f]={startdate:j,enddate:j,averageTime:0,visits:0});var l=d.getValue('lastreferreraverage'),m=0,n=0,o='{';for(a in k){b=''+a;var p=new Date;if(p.setTime(k[a].enddate),p.setMinutes(p.getMinutes()+15),j>p.getTime()){var q=k[a].enddate-k[a].startdate;if(0<q){var r=k[a].visits+1,s=c((k[a].visits*k[a].averageTime+q)/r/1e3);k[a].averageTime=s,k[a].visits=r}k[a].startdate=j,k[a].enddate=j}else b===f?k[a].enddate=j:b===e&&l!==e&&(k[a].enddate=j,d.setValue('lastreferreraverage',e));'}'===o.substring(o.length-1)&&(o+=','),o+='"'+b+'" : {',o+='"startdate" : '+k[a].startdate,o+=', "enddate" : '+k[a].enddate,o+=', "averageTime" : '+k[a].averageTime,o+=', "visits" : '+k[a].visits,o+='}',0!==k[a].averageTime&&(n+=1,m+=k[a].averageTime)}o+='}';var t=0;0<n&&(t=c(m/n)),d.setValue('hostaveragetime',o),d.setValue('averagetime',t);var u=this._getNumberProperty('clickcount'),v=d.getValues('visitedsites'),w=blueConicClient.util.array?blueConicClient.util.array.indexOfArray:indexOfArray;(null===v||0===v.length||-1===w.call(this,v,document.domain))&&d.addProperty('visitedsites',document.domain),d.setValue('clickcount',u+1);var x=d.getValue('lastvisitdate');''===x&&(x=0);var y=new Date(parseInt(x));y.setMinutes(y.getMinutes()+30);var z=this.blueConicClient.getCurrentDate(),A=this._getNumberProperty('visits');if(z>y||0===A)d.setValue('visitclicks',1),d.setValue('visits',A+1),d.addValue('resolution',screen.width+'x'+screen.height);else{var B=this._getNumberProperty('visitclicks');d.setValue('visitclicks',B+1)}d.setValue('lastvisitdate',z.getTime()),blueConicClient.profile.updateProfile()},HELPER:{search_engines:[['google\\.','q'],['bing\\.','q'],['search\\.yahoo\\.','p'],['search\\.msn\\.','q'],['search\\.live\\.','query'],['search\\.aol\\.','userQuery'],['ask\\.com','q'],['altavista\\.','q'],['feedster\\.','q'],['search\\.lycos\\.','q'],['alltheweb\\.','q'],['technorati\\.com/search/([^\\?/]+)',1],['dogpile\\.com/info\\.dogpl/search/web/([^\\?/]+)',1,!0]],substringToHash:function(a){if(a){var b=a.indexOf('#');if(-1!==b)return a.substring(0,b)}return a},decodeReferrer:function(a){for(var b,c=/(?:)/,d=0;d<this.search_engines.length;d++){b=this.search_engines[d],c.compile('^http(s?)://(www\\.)?'+b[0],'i');var e=a.match(c);if(e){var f;if(f=isNaN(b[1])?this.decodeReferrerQS(a,b[1]):e[b[1]+1],f)return f=decodeURIComponent(f),2<b.length&&b[2]&&(f=decodeURIComponent(f)),f=f.replace(/'|"/g,''),f=f.split(/[\s,+.]+/),f;break}}return null},decodeReferrerQS:function(a,b){if(null===b||'undefined'==typeof b||''===b)return null;if(null===a||'undefined'==typeof a||''===a)return null;a=decodeURIComponent(a);var c,d=a.indexOf('?');if(0<=d){var e=new String(a.substring(d+1));d=0,c=0;for(var f=0;0<=d&&0<=(c=e.indexOf('=',d));){f++;var g;if(g=e.substring(d,c),d=e.indexOf('&',c)+1,g===b)return 0>=d?e.substring(c+1):e.substring(c+1,d-1);if(0>=d)return null;if(1e3<f)return null}}return null}},_getNumberProperty:function(a){var b=this.profile.getValue(a);try{b=parseInt(b)}catch(a){b=0}return isNaN(b)&&(b=0),b}});var a = [];var i='listenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.25/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.currentList=[],this.decay=30,this.nrItems=5,this.property=this.parameters.property&&this.parameters.property[0]?this.parameters.property[0]:'',this.rules=this.parameters.rules?this.blueConicClient.json.parse(this.parameters.rules[0]):this.parameters.rules},getPreloadProperties:function(){if(this.property)return[this.property,'_'+this.property]},onLoad:function(){if(this.property&&this.rules&&this.jQuery.isArray(this.rules)){var a=this.profile.getValue('_'+this.property);a&&(this.currentList=this.blueConicClient.json.parse(a)),this.decay=this.parameters.decay&&this.parameters.decay[0]?parseInt(this.parameters.decay[0]):30,this.nrItems=this.parameters.nritems&&this.parameters.nritems[0]?parseInt(this.parameters.nritems[0]):10,this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this._handleRules()}),this._handleRules()}},_handleRules:function(){for(var a,b=0;b<this.rules.length;b++){a=this.rules[b];try{'pageview'===a.type?this._handleContentRule(a):this._handleClickRule(a)}catch(a){this.blueConicClient.util.log('[ERROR] '+a.message)}}},_handleContentRule:function(a){if(!a.area.any_area&&a.area.selector&&0===this.jQuery(a.area.selector).length)return void this.blueConicClient.position.subscribe(a.area.selector,this,function(){this._handleContentRule(a)});if(this._executeRule(a)){var b=a.title.predefined?a.title.selectedoption:a.title.selector;if(b){var c=this._evaluateSelector(b);if(c){var d=document.location.href,e=null;if(a.image){var f='selector'===a.image.selectedoption?a.image.selector:null;f&&(e=0<this.jQuery(f).length?this.jQuery(f).attr('src'):null)}this._updateList(c,d,e)}}}},_handleClickRule:function(a){var b=a.click.selector;return b&&0===this.jQuery(b).length?void this.blueConicClient.position.subscribe(b,this,function(){this._handleClickRule(a)}):void(this._executeRule(a)&&b&&this.jQuery(b).off('click.'+a.id).on('click.'+a.id,this.jQuery.proxy(function(b){this._trackClick(b.target,a)},this)))},_executeRule:function(a){var b,c;if(a.area.any_area){if(a.any_word)return!0;if(a.words&&0<a.words.length)return b=this.jQuery('body').text(),c=a.words.join('|'),this._contentContainsWords(b,c)}else{var d=a.area.selector?this.jQuery(a.area.selector):null;if(d&&0<d.length){if(b=this._getText(d),a.any_word)return b&&0<b.length;if(a.words&&0<a.words.length){if('contains'===a.containsmatches)return c=a.words.join('|'),this._contentContainsWords(b,c);for(var e,f=0;f<a.words.length;f++)if(e=a.words[f],b===e)return!0}}}},_contentContainsWords:function(a,b){var c=this._escapeRegularExpressionCharacters(b),d=new RegExp(c,'i');if(d.test(a))return!0},_setList:function(){for(var a,b=this.parameters.titleMode&&this.parameters.titleMode[0]?this.parameters.titleMode[0]:'',c=[],d=0;d<this.currentList.length;d++)a=this.currentList[d],'url'===b?c.push(a.href):c.push(a.name);this.profile.setValues(this.property,c)},_updateList:function(a,b,c){var d={name:a,href:b,image:c||'',ts:new Date().getTime()};this._removeDuplicates(a),this.currentList.push(d),this._processDecay(),this._sortListByTimestamp(),this.currentList=this.currentList.slice(0,this.nrItems),this.profile.setValue('_'+this.property,this.blueConicClient.json.stringify(this.currentList)),this._setList(),this.blueConicClient.profile.updateProfile()},_removeDuplicates:function(a){for(var b,c=this.currentList.length-1;0<=c;c--)b=this.currentList[c],b.name===a&&this.currentList.splice(c,1)},_processDecay:function(){var a=new Date;a.setDate(a.getDate()-this.decay);for(var b,c=this.currentList.length-1;0<=c;c--)b=this.currentList[c],b.ts<a.getTime()&&this.currentList.splice(c,1)},_getText:function(a){var b;return b=a.attr('content')?a.attr('content'):a.text(),b?this.jQuery.trim(b).replace(/\r\n+|\r+|\n+/gi,'').replace(/\s+/gi,' '):b},_trackClick:function(a,b){var c=this.jQuery(a);'a'!==c.prop('tagName')&&(c=c.closest('a'));var d='';if(d=b.title.predefined||!b.title.selector?this._getText(c):0<c.find(b.title.selector).length?this._getText(c.find(b.title.selector)):this._getText(this.jQuery(b.title.selector)),d){var e=c.attr('href');if(e&&'#'!==e&&-1===e.indexOf('javascript:')){e=this._makeAbsoluteDOM(e);var f=null;b.image&&'selector'===b.image.selectedoption&&b.image.selector&&(f=c.find(b.image.selector).attr('src')||this.jQuery(b.image.selector).attr('src')),this._updateList(d,e,f)}}},_makeAbsoluteDOM:function(a){var b=document.createElement('a');return b.href=a,b.href},_sortListByTimestamp:function(){return this.currentList.sort(function(c,a){var b=new Date(c.ts),d=new Date(a.ts);return b>d?-1:b<d?1:0})},_escapeRegularExpressionCharacters:function(a){return a=a.replace(/[\\?.{}+]/g,function(a){return'\\'+a}),a=a.replace(/\*/g,'.*'),a},_evaluateSelector:function(a){var b=null;if(-1!==a.indexOf('jQuery('))b=null,b=function(a,b){return eval('var jQuery = arguments[1]'),eval(a)}(a,this.jQuery);else try{b=this.jQuery(a)}catch(a){return}return b&&b instanceof this.jQuery&&0<b.length?this._getText(b):null}});var a = [];var i='recentlyvieweditemslistener';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.14/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({open:!1,data:{},nrOfTries:0,closeButtonWidth:10,borderWidth:1,html:{nl:{content:"\x3cp\x3eInhoud\x3c/p\x3e"},"default":{content:"\x3cp\x3eContent\x3c/p\x3e"}},init:function(a,b){this.blueConicClient=a;this.context=b;this.parameters=this.context.getParameters();this._manuallyClosed=this._viewEventThrown=!1;this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId());this._eventListenerFunction=this._observer=this._timestamp=this._inlineCss=
null;this.isInEditMode=this.blueConicClient.isInEditMode();this.clickTrigger=!1;this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[];this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.blueConicClient._renderedInteractions.splice(this.blueConicClient._renderedInteractions.indexOf(this.context.getInteractionId()),1)})},getPreloadProperties:function(){for(var a=this.context.getParameters().content+"",b=/data-bc-preload="([^"]*)"/g,
c=[],d;null!==(d=b.exec(a));){d=d[1].split(",");for(var e=0;e<d.length;e++)c.push(d[e])}return c?c:[]},onMessageReceived:function(a){this.blueConicClient.event.publish("toaster.messageReceived",a)},onSave:function(){var a=this.jQuery;return a(".bcToasterContent").html()},onLoad:function(){var a=this,b=this.jQuery,c=this.getParameter("content");c=c&&-1!==c.indexOf("bcToasterTemplate")?"_clean":"";var d=this.getParameter("version");c=b('\x3clink type\x3d"text/css" href\x3d"'+this.baseURL+(c||"3"!==
d?"css/toaster":"css/toaster_v3")+c+'.css" rel\x3d"stylesheet" /\x3e');this.template=this.getParameter("template");c.on("load",function(){a.handleStyling(a.getParameter("close_icon"),a.getParameter("close_icon_hover"));a.handleJavascript().done(function(){a.loadToaster()})});b("head").append(c)},loadToaster:function(){var a=this.context.getParameters(),b=this.jQuery,c=this.getParameter("close_icon");c&&(this._closeIcon=c);if(c=this.getParameter("close_icon_hover"))this._closeIconHover=c;var d=this;
this._addContent(a,b);b(".bcToaster .bcClose").click(function(){d._manuallyClosed=!0;d._hideToaster()});this.emptyElementsWithAttribute(b(".bcToaster").get(0),"div","data-bc-external");this.handleComplexElements(b(".bcToaster").get(0));this.positionDivs();if(this.isInEditMode)d._showToaster();else{b=[];c=0;var e=this.getParameter("triggerWhen");e?(c=100,b.push(this._convertWhenSettingPreviousToasterVersion(e))):(b=a.selected_when&&0!==a.selected_when.length?a.selected_when:["onPageLoad"],c=a.scroll_depth&&
a.scroll_depth[0]&&!isNaN(a.scroll_depth[0])?parseInt(a.scroll_depth[0]):0);a=this.getParameter("click_selector");e=this.getParameter("content_condition");for(var f=0;f<b.length;f++)switch(b[f]){case "click_selector":this._addClickTriggerBindings(a);break;case "content_condition":this._addContentPolling(e);break;case "scroll_depth":this._addScrollBinding(c);break;case "triggerOn":this._addScrollOn(d);break;default:d._checkDelayBeforeTrigger()}this._setupFrontEndBindings()}},_setupFrontEndBindings:function(){var a=
this.jQuery(".bcToasterDontShowAgainLink"),b=this.jQuery(".bcToasterCloseButton");if(0<a.length)a.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",this.jQuery.proxy(function(a){a.preventDefault();this.blueConicClient.doNotShowAgain(this.context.getInteractionId());this._hideToaster()},this));if(0<b.length)b.off("click.closeButtons").on("click.closeButtons",this.jQuery.proxy(function(){this._hideToaster()},this));this._addCloseEventHandler()},_convertWhenSettingPreviousToasterVersion:function(a){switch(a){case "scroll":return"triggerOn";
case "reachedBottom":return"scroll_depth";default:return"onPageLoad"}},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,function(a,b){b instanceof Array&&b[0]===this.context.getInteractionId()&&this._hideToaster()})},_addScrollOn:function(a){var b=this.jQuery;b(window).scroll(function(){a._checkDelayBeforeTrigger()})},_checkScrollCondition:function(a){var b=this.jQuery(window).scrollTop(),c=this.jQuery(document).height();b/(c-window.innerHeight)*100>=a&&this._checkDelayBeforeTrigger()},
_addScrollBinding:function(a){this._checkScrollCondition(a);this.jQuery(window).scroll(this.jQuery.proxy(function(){this._checkScrollCondition(a)},this))},_addClickTriggerBindings:function(a){try{var b=this.jQuery(a);this.clickTrigger=!0;if(0<b.length)b.off("click.toaster").on("click.toaster",this.jQuery.proxy(function(){this.jQuery(".bcToaster").get(0)?this._checkDelayBeforeTrigger(!0):this.open||this._setupToasterBeforeToShow()},this));else this.blueConicClient.position.subscribe(a,this,this.jQuery.proxy(this._addClickTriggerBindings,
this,a))}catch(c){}},_setupToasterBeforeToShow:function(){this.handleStyling(this.getParameter("close_icon"),this.getParameter("close_icon_hover"));this.handleJavascript();this._addContent(null,this.jQuery);var a=this;this.jQuery(".bcToaster .bcClose").click(function(){a._hideToaster()});this.clickTrigger=!0;this._checkDelayBeforeTrigger()},_addContentPolling:function(a){this._checkContentCondition(a);var b=this,c=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||
window.MozMutationObserver)this._observer=new MutationObserver(function(){b._observeContentChanges(a)}),this._observer.observe(c,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){b._observeContentChanges(a)},c.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var d=setInterval(function(){b.open?clearInterval(d):b._checkContentCondition(a)},500)},_observeContentChanges:function(a){if(this.open)this._observer?this._observer.disconnect():
document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else{var b=this,c=(new Date).getTime();this._timestamp=c;setTimeout(function(){b._timestamp!==c||b.open||b._checkContentCondition(a)},250)}},_checkContentCondition:function(a){0<this.jQuery(a).length&&this.jQuery(a).html()&&0<this.jQuery(a).html().length&&this._checkDelayBeforeTrigger()},_addContent:function(a,b){(a=this.getParameter("content"))&&-1!==a.indexOf("\x3cbody\x3e\x3c/body\x3e")&&
(a="");a||(a="nl"===this.context.getLocale()?"nl":"default",a=this.html[a].content);a=this.template?'\x3cdiv class\x3d"bcToaster" style\x3d"visibility:hidden;"\x3e\x3cdiv class\x3d"bcCloseWrapper"\x3e\x3cdiv class\x3d"bcClose"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"bcToasterContent bcTemplateContent"\x3e'+a+"\x3c/div\x3e\x3c/div\x3e":'\x3cdiv class\x3d"bcToaster" style\x3d"visibility:hidden;"\x3e\x3cdiv class\x3d"bcCloseWrapper"\x3e\x3cdiv class\x3d"bcClose"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"bcToasterContent"\x3e'+
a+"\x3c/div\x3e\x3c/div\x3e";a=b(a);var c=this.getParameter("close_icon");"true"===this.getParameter("custom_close")&&c?a.removeClass("bcDefaultClose"):a.addClass("bcDefaultClose");try{a.appendTo(b("body"))}catch(d){this.isInEditMode&&console.error("Error caught: "+d)}},handleComplexElements:function(a){a=this.getElementsWithAttribute(a,"div","data-bc-pluginid");for(var b=0;b<a.length;b++){var c=a[b],d=c.getAttribute("data-bc-pluginid"),e=c.getAttribute("data-bc-config");if(e)try{var f=e.replace(/\n/g,
"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");e=this.blueConicClient.json.parse(f)}catch(g){e=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:d,config:e,node:c,interactionId:this.context.getInteractionId()});this.isInEditMode||(c.removeAttribute("data-bc-pluginid"),c.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(a,b,c){a=this.getElementsWithAttribute(a,b,c);b=0;for(c=a.length;b<c;b++)a[b].innerHTML=""},getElementsWithAttribute:function(a,b,c){var d=
[];a=a.getElementsByTagName(b);b=0;for(var e=a.length;b<e;b++){var f=a[b];f.getAttribute(c)&&d.push(f)}return d},_positionFromPerpendicularEdge:function(){var a=this.jQuery,b=this.getParameter("location")||"right",c=this.getParameter("pixelsFrom")?this.getParameter("pixelsFrom"):"",d=this.getParameter("locationFrom")?this.getParameter("locationFrom"):"left_or_top";this.getParameter("locationFrom")||this.getParameter("version")||(d="right_or_bottom");c||0===c?(d="left"===b||"right"===b?"left_or_top"===
d?"top":"bottom":"left_or_top"===d?"left":"right",a(".bcToaster").css(d,c+"px"),a(".bcToaster").css(b,0)):(c=a(".bcToasterContent").get(0).getBoundingClientRect(),"left"===b||"right"===b?(d=window.innerHeight||document.documentElement.clientHeight,c=c.height||c.bottom-c.top,a(".bcToaster").css("top",Math.max((d-c)/2,0)+"px"),a(".bcToaster").css("left"===b?"left":"right",0)):(d=window.innerWidth||document.documentElement.clientWidth,c=c.width||c.right-c.left,a(".bcToaster").css("left",Math.max((d-
c)/2,0)+"px"),a(".bcToaster").css("top"===b?"top":"bottom",0)))},positionDivs:function(){var a=this.jQuery,b=this.getParameter("location")||"right",c=this._getShowClose();this._positionFromPerpendicularEdge();"left"===b?a(".bcToaster").removeClass("bcRight").removeClass("bcTop").removeClass("bcBottom").addClass("bcLeft"):"right"===b?a(".bcToaster").removeClass("bcLeft").removeClass("bcTop").removeClass("bcBottom").addClass("bcRight"):"top"===b?(a(".bcToaster .bcToasterContent").after(a(".bcToaster .bcCloseWrapper")),
a(".bcToaster").removeClass("bcRight").removeClass("bcBottom").removeClass("bcLeft").addClass("bcTop")):a(".bcToaster").removeClass("bcRight").removeClass("bcTop").removeClass("bcLeft").addClass("bcBottom");c?a(".bcToaster").addClass("bcShowClose"):a(".bcToaster").removeClass("bcShowClose")},handleStyling:function(a,b){var c=this.jQuery,d="";this._getShowClose()?c(".bcToaster").addClass("bcShowClose"):c(".bcToaster").removeClass("bcShowClose");if("true"===this.getParameter("custom_close")&&a){c(".bcToaster").removeClass("bcDefaultClose");
d+=".bcToaster .bcClose \x3e div { background-image: none;}";var e=this.getParameter("version");a=".bcToaster .bcClose {background-image: url('"+a+"');background-repeat: no-repeat;background-color: transparent;";var f=".bcToaster .bcClose:hover {background-image: url('"+b+"');";"3"===e?(d+=a+"background-position: center center;background-size: contain;}",b&&(d+=f+"}")):(d+=a+"}",b?d+=f+"background-position: 0px 0px;}":c(".bcToaster .bcClose:hover").css("background-position",""))}else c(".bcToaster").addClass("bcDefaultClose");
b=this.getParameter("close_position");e=this.getParameter("close_padding");d+=this._addClosePositionStyling(b,e);if(b=this.getParameter("styling_css"))this.stylingUrl=b,this.blueConicClient.util.loadCSS(b);(b=this.getParameter("styling_css_inline"))&&(d+=b.replace(/&#xd;/gi,""));d&&(this.inlineCss=c("\x3cstyle\x3e"+d+"\x3c/style\x3e"),this.inlineCss.appendTo(c("head")))},handleJavascript:function(){var a=this.jQuery,b=this.getParameters("javascript_urls"),c=[];if(b){this.javascriptUrls=b;for(var d=
0;d<b.length;d++)c.push(this._getLoadScriptDeferred(b[d]))}return a.when.apply(a,c)},_getLoadScriptDeferred:function(a){var b=this.jQuery.Deferred();this.blueConicClient.util.loadScript(a,this,function(){b.resolve()});return b},_getShowClose:function(){var a=this.getParameter("show_close");if("true"===a||"false"===a||!0===a||!1===a)return"true"===a||!0===a?!0:!1;a=this.getParameter("close")?"showClose"===this.getParameter("close"):!1;this.getParameter("showClose")&&(a=!0);return a},_hideToaster:function(){if(!this.isInEditMode){this.blueConicClient._renderedInteractions.splice(this.blueConicClient._renderedInteractions.indexOf(this.context.getInteractionId()),
1);var a=this.jQuery,b=a(".bcToasterContent").get(0).getBoundingClientRect(),c=this.getParameter("location")||"right",d=this._getShowClose();this._setToasterEffect(!0,d,"left"===c||"right"===c?b.width:b.height);window.setTimeout(a.proxy(function(){this.clickTrigger&&(this.open=!1)},this),501)}},_checkDelayBeforeTrigger:function(a){var b=this.context.getParameters();b=b.delay&&b.delay[0]&&!isNaN(b.delay[0])?1E3*parseInt(b.delay[0]):0;0<b?window.setTimeout(this.jQuery.proxy(function(){this._showToaster(a)},
this),b):this._showToaster(a)},_showToaster:function(a){var b=this,c=this.jQuery;if(!this._manuallyClosed||this.isInEditMode||a)if(0===c(".bcToasterContent").width()&&!a)10<this.nrOfTries||(this.nrOfTries++,setTimeout(function(){b._showToaster(a)},500));else if(!this.open&&-1===this.blueConicClient._renderedInteractions.indexOf(this.context.getInteractionId())){this.blueConicClient._renderedInteractions.push(this.context.getInteractionId());this.isInEditMode||this._viewEventThrown||(this._viewEventThrown=
!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var d=this._getShowClose();this.positionDivs();c(".bcToaster").css("visibility","visible");c(".bcToaster").css("display","block");c(".bcToaster").addClass("bcToasterOpen");c(window).resize(c.proxy(function(){this.positionDivs()},this));if(c=this.getParameter("click_event_selector")){this.jQuery("body").one("click",c,this.jQuery.proxy(function(a){this.lastClickEvent&&this.lastClickEvent.originalEvent===a.originalEvent||this._logClickEvent(a)},
this));try{this.jQuery(c).one("click",this.jQuery.proxy(function(a){this.lastClickEvent=a;this._logClickEvent(a)},this))}catch(e){}}this._setToasterEffect(!1,d);if((d=b.getParameter("javascript"))&&!b.isInEditMode){d=b.jQuery("\x3cscript\x3e"+d+"\x3c/script\x3e");try{d.appendTo(b.jQuery("body"))}catch(e){console.error(e)}}this.open=!0;this.isInEditMode&&this.blueConicClient.event.publish("toaster.interactionLoaded",{interaction:this})}},_logClickEvent:function(a){a&&a.originalEvent&&a.originalEvent._blueConicLoggedClickEvent===
this.context.getInteractionId()||a&&a.target&&a.target.pathname&&a.target.hostname&&0===a.target.pathname.indexOf("/s/")&&-1!==a.target.hostname.indexOf("blueconic")||(a.originalEvent&&(a.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_setToasterEffect:function(a,b,c){var d=this.jQuery,e={},f=this.getParameter("location")||"right";b=b?this.closeButtonWidth+this.borderWidth:this.borderWidth;var g=
this.getParameter("effect");g||this.getParameter("version")||(g="slideIn");var h=this.getParameter("effect_slide_direction")||"left";e[f]="-"+(c+b)+"px";c=g+"_"+h===this._effect;this.isInEditMode&&c&&(g="noEffect");g&&"noEffect"!==g?"fadeIn"!==g||a?"fadeIn"===g&&a?d(".bcToaster").fadeOut(500):"slideIn"!==g||a?"slideIn"===g&&a&&d(".bcToaster").animate(e,500,function(){d(".bcToaster").css("display","none")}):(e[f]="0px",a=d(".bcToasterContent").get(0).getBoundingClientRect(),a="left"===f||"right"===
f?a.width:a.height,d(".bcToaster").css(f,"-"+(a+b)+"px"),d(".bcToaster").animate(e,500,function(){d(".bcToaster").addClass("bcToasterOpen")})):(d(".bcToaster").hide(),d(".bcToaster").fadeIn(500,function(){d(".bcToaster").addClass("bcToasterOpen")})):a&&d(".bcToaster").css("display","none")},_addClosePositionStyling:function(a,b){var c="3"===this.getParameter("version");if(!a||!c)return"";if(null===b||"NaN"===b)b="5";c=".bcToaster .bcClose {";switch(a){case "TOP_LEFT":c+="top:"+b+"px; right: unset; bottom: unset; left:"+
b+"px;";break;case "BOTTOM_RIGHT":c+="top: unset; right: "+b+"px; bottom: "+b+"px; left: unset;";break;default:c+="top: "+b+"px; right: "+b+"px; bottom: unset; left: unset;"}return c+"}"},getParameter:function(a){return this.parameters[a]&&this.parameters[a][0]?this.parameters[a][0]:null},getParameters:function(a){return this.parameters[a]||null}});var a = [];var i='toaster';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.1.4/'},{ id : 'html', baseUrl : ps + 'html/1.0.10/'},{ id : 'image', baseUrl : ps + 'image/1.0.2/'},{ id : 'number', baseUrl : ps + 'number/1.0.2/'},{ id : 'string', baseUrl : ps + 'string/1.0.1/'}]);})();(function(){ 
var InteractionTypeImpl=InteractionType.extend({languageLabels:{nl:{noProperty:"Selecteer een profieleigenschap die gelinkt is aan een listener van het type 'Recent bekeken items'."},"default":{noProperty:"Select a Profile Property which is linked with a Listener of the type 'Recently Viewed Items'."}},_editorOpen:!1,init:function(a,b){this.blueConicClient=a;this.context=b;var c=this;this.blueConicClient.event.subscribe("bcComplexObject",this,function(a,b){b&&"toolbar_recent_items"===b.plugin&&(c.interactionId=
b.interactionId,c._loadData(b))});this.blueConicClient.isInEditMode()&&(this.blueConicClient.event.subscribe("recentitems.updateAmount",this,function(b,a){var f=c.jQuery(".bcRecentItems[data-bc-id='"+a.message.id+"']");0<f.length&&(f.get(0).innerHTML="",c._loadRecentItems(f.get(0),a.message))}),this.blueConicClient.event.subscribe("recentitems.updateStyling",this,function(b,a){c._updateStyling(a.message.styling)}),this.blueConicClient.event.subscribe("recentitems.updateConfig",this,function(b,a){c.jQuery(".bcRecentItems[data-bc-id='"+
a.message.id+"']").closest(".bccomplexobject").attr("data-bc-config",JSON.stringify(a.message))}),this.blueConicClient.event.subscribe("editorOpened",this,function(){this._editorOpen=!0;this._addBindings()}),this.blueConicClient.event.subscribe("editorClosed",this,function(){this._editorOpen=!1;c._sendMessage("recentitems.closeConfigurator")}))},getPreloadProperties:function(){return[]},_updateStyling:function(a){var b=this.jQuery;this._stylingUrl&&b("link[href='"+this._stylingUrl+"']").remove();
this._inlineCss&&this._inlineCss.remove();this._handleStyling(a)},_handleStyling:function(a){var b=this.jQuery;a&&a.css&&(this._stylingUrl=a.css,this.blueConicClient.util.loadCSS(this._stylingUrl));a&&a.css_inline&&(this._inlineCss=b("<style>"+a.css_inline+"</style>"),this._inlineCss.appendTo(b("body")))},_addBindings:function(){var a=window.CKEDITOR;if(a&&a.currentInstance){var b=this.jQuery,c=this,d;for(d in a.currentInstance.widgets.instances)if("bccomplexobject"===a.currentInstance.widgets.instances[d].name){var e=
a.currentInstance.widgets.instances[d];"toolbar_recent_items"===b(e.wrapper.$).find(".bccomplexobject").attr("data-bc-pluginid")&&(e.on("select",function(a){(a=b(a.sender.wrapper.$).find(".bccomplexobject").attr("data-bc-config"))&&c._sendMessage("recentitems.openConfigurator",{config:c.blueConicClient.json.parse(a)})}),e.on("deselect",function(){c._sendMessage("recentitems.closeConfigurator")}))}}},_sendMessage:function(a,b){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(a,
b)},_loadData:function(a){var b=a.node;b.innerHTML="";this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId());this._handleStyling(a.config.styling);this._loadRecentItems(b,a.config);this._editorOpen&&this._addBindings()},_loadRecentItems:function(a,b){var c=this,d=this.jQuery,e=d('<div class="bcRecentItems" data-bc-external="true" data-bc-id="'+b.id+'"></div>');e.appendTo(d(a));this.propertyId=b.propertyId;var f=Math.min(parseInt(b.amount)||5,100);if(this.blueConicClient.isInEditMode())if(this.propertyId){var g=
[],h;for(h=0;h<f;h++)g.push({href:"",name:"Item "+(h+1)});e.html(this._getHTML(g))}else g="nl"===this.context.getLocale()?"nl":"default",e.html('<span color="#999">'+this.languageLabels[g].noProperty+"</span>");else if(b.propertyId){var k=this.context.getProfile();k.loadValues("_"+b.propertyId,this,function(){var a=k.getValue("_"+b.propertyId);a&&(a=c.blueConicClient.json.parse(a))&&(a.length>f&&(a=a.splice(0,f)),e.html(this._getHTML(a)),d(".bcRecentItems").on("click","a",function(a){a.preventDefault();
a.stopPropagation();c._handleClick(d(this))}))})}},_handleClick:function(a){var b=a.attr("href");this.interactionId?this.blueConicClient.createEvent("CLICK",this.interactionId,this,function(){b&&setTimeout(function(){document.location=b},0)}):setTimeout(function(){document.location=b},0)},_getHTML:function(a){var b='<ul class="bcRecentItems">',c,d;for(c=0;c<a.length;c++)d=a[c],b+='<li><a href="'+d.href+'" title="'+d.name+'">'+(d.image?'<img src="'+d.image+'">':"")+d.name+"</a></li>";return b+"</ul>"}});
var a = [];var i='toolbar_recent_items';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : ps + i + '/1.0.9/'}]);})();})(blueConicClient);