var jQueryScriptOutputted = false; var cp_im_called = false; var cp_im_called_interval = null; function cp_im_initialize(cp_affiliate_link, cp_width, cp_height) { if (typeof(jQuery) == 'undefined') { var headTag = document.getElementsByTagName("head")[0]; var jqTag = document.createElement('script'); jqTag.type = 'text/javascript'; jqTag.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'; jqTag.onload = function(){ cp_im_initialize_banner(cp_affiliate_link, cp_width, cp_height); } headTag.appendChild(jqTag); } else cp_im_initialize_banner(cp_affiliate_link, cp_width, cp_height); } function cp_im_initialize_banner(cp_affiliate_link, cp_width, cp_height) { (function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){var pluses=/\+/g;function raw(s){return s}function decoded(s){return decodeURIComponent(s.replace(pluses,' '))}function converted(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\')}try{return config.json?JSON.parse(s):s}catch(er){}}var config=jQuery.cookie=function(key,value,options){if(value!==undefined){options=jQuery.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}value=config.json?JSON.stringify(value):String(value);return(document.cookie=[config.raw?key:encodeURIComponent(key),'=',config.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}var decode=config.raw?raw:decoded;var cookies=document.cookie.split('; ');var result=key?undefined:{};for(var i=0,l=cookies.length;i'; jQuery('body').append(html); jQuery("#im_container").prepend('x'); jQuery('#im_close').css({ position: 'absolute', display: 'block', width: '18px', height: '18px', top: '0px', right: '0px', cursor: 'pointer', background: '#000', 'font-size': '14px', 'font-family': 'Arial', color: '#FFF', 'line-height': 1.2, 'text-align': 'center', 'z-index': '99999999' }); setTimeout(function(){ jQuery("#im_container").animate({bottom: "0px"}, 1000); }, 2000); jQuery("#im_close").click(function(){ jQuery("#im_container").animate({bottom: '-' + (cp_height + 20) + 'px'}, 1000); var date = new Date(); date.setTime(date.getTime() + 5000000); jQuery.cookie("cp"+cp_affiliate, "1",{}); }); } function cp_force_execution(cp_affiliate_link, cp_width, cp_height) { cp_im_called_interval = setInterval(function(){ if(!cp_im_called) cp_im_initialize(cp_affiliate_link, cp_width, cp_height); else clearInterval(cp_im_called_interval); }, 3000); } var cp_im_height_forced = typeof cp_im_height != 'undefined' ? cp_im_height : (typeof cp_height != 'undefined' ? cp_height : 0); var cp_im_width_forced = typeof cp_im_width != 'undefined' ? cp_im_width : (typeof cp_width != 'undefined' ? cp_width : 0); var cp_im_affiliate_link_forced = typeof cp_im_affiliate_link != 'undefined' ? cp_im_affiliate_link : (typeof cp_affiliate_link != 'undefined' ? cp_affiliate_link : ''); cp_force_execution(cp_im_affiliate_link_forced, cp_im_width_forced, cp_im_height_forced);