text: var biTurboProps={debug:!0,pauseAll:!1,minDelay:.15,instantDelay:.1,checkLoadedInterval:500};if("undefined"===typeof biTurbo)var biTurbo={};biTurbo.proto={debug:!1,pauseThis:!1,loop:0,height:0,width:0,insertionPoint:"",currentFrameIndex:0,elementsCreated:[],limitToWaitPreload:5,banner_id:"",eventBannerLoadedId:"",readyEvent:null,readyToPlay:!1,alreadyStarted:!1,addImagesToPreloadQueue:!0,preloadCheckerInterval:null};
  biTurbo.proto.init=function(a){var b=document.createElement("style");b.type="text/css";b.appendChild(document.createTextNode(""));document.head.appendChild(b);this.log("\n                               biTurbo.js \n \n                                  by \n \n                         \u00c1ngel Quijada \u00c1lvarez \n \n   A lightweight JS animation library for fast banner ads development! \n ");this.createTween("default_instant",biTurboProps.instantDelay,5);this.banner_id=a=this.defaultParameter(a,
  "defaultBanner");this.eventBannerLoadedId="loadedEnough_"+this.banner_id;"function"===typeof Event?this.readyEvent=new Event(this.eventBannerLoadedId):(this.readyEvent=document.createEvent("Event"),this.readyEvent.initEvent(this.eventBannerLoadedId,!0,!0));this.imagesToLoad=[];this.timeLine=[];this.htmlLogTxt=this.cssLogTxt=""};
  biTurbo.proto.writeClass=function(a,b){var c=document.createElement("style");c.type="text/css";a=this.defaultParameter(a,"");b=this.defaultParameter(b,"");document.getElementsByTagName("head")[0].appendChild(c);this.log("new CSS class : "+a+" : "+b);c.sheet.insertRule(a+"{"+b+"}",0);this.printCSS(""+a+"{"+b+"}")};
  biTurbo.proto.createClass=function(a,b){var c="";if(1>arguments.length)this.log("Error: createClass: no parameters");else{var d=arguments[0];var e=arguments[1];this.isParameterDefined(e)&&(c+=e);this.writeClass("."+d,c)}};
  biTurbo.proto.applyClass=function(a,b){a=this.defaultParameter(a,null);if(null!==a){b=this.defaultParameter(b,"");a=this.getDomElement(a);var c=a.className;a.className=c+" "+b}else{var d=this.elementsCreated.length;b=this.defaultParameter(b,"");for(c=0;c<d;c++)a=this.getDomElement(this.elementsCreated[c]),this.applyClass(a,b)}};
  biTurbo.proto.tweenClass=function(a,b,c,d){var e="",f=this;c=this.defaultParameter(c,biTurboProps.instantDelay);c+=biTurboProps.minDelay;d=this.defaultParameter(d,"default_instant");e="tween_"+d;a=this.getDomElement(a);var g=a.id;setTimeout(function(){!1===biTurboProps.pauseAll&&!1===f.pauseThis&&(a.className="",f.applyClass(a,g),f.applyClass(a,b),f.applyClass(a,e))},1E3*c)};
  biTurbo.proto.animateClass=function(a,b){var c,d=0;a=this.getDomElement(a);if(void 0===b||1>b.length)this.log("animateClass error: no keyframes array");else{var e=b.length;this.log("animateClass keyframes for "+a.id+": "+e);for(c=0;c<e;c++){var f=b[c][0];if(!0===this.isParameterDefined(b[c][1])){var g=b[c][1];g-=biTurboProps.minDelay}else g=d;g+=biTurboProps.minDelay;g===d&&(g+=biTurboProps.minDelay);d=g=Math.round(100*g)/100;var h=!0===this.isParameterDefined(b[c][2])?b[c][2]:"default_instant";this.log("animateClass keyframe["+
  c+"]: "+f+" , "+g+" , "+h);this.tweenClass(a,f,g,h)}}};biTurbo.proto.clearClass=function(a){switch(typeof a){case "string":this.log("ClearClass from "+a);a=this.getDomElement(a);var b=a.id;a.className="";this.applyClass(a,b);break;case "object":var c=a.length;for(b=0;b<c;b++)this.clearClass(a[b]);break;default:this.log("clearClass arguments error")}};
  biTurbo.proto.CSS=function(a){var b="",c=1,d=1,e=0,f=!1,g=a.a,h=a.l,m=a.t,k=a.x,l=a.y,n=a.w,p=a.h,q=a.r,r=a.s,t=a.sx;a=a.sy;!0===this.isParameterDefined(g)&&(b+="opacity: "+g+" ; ");!0===this.isParameterDefined(n)&&(b+="width: "+n+"px ; ");!0===this.isParameterDefined(p)&&(b+="height: "+p+"px ; ");!0===this.isParameterDefined(h)&&(b+="left: "+h+"px ; ");!0===this.isParameterDefined(m)&&(b+="top: "+m+"px ; ");!0===this.isParameterDefined(k)?f=!0:k=0;!0===this.isParameterDefined(l)?f=!0:l=0;!0===this.isParameterDefined(q)&&
  (f=!0,e=Math.PI/180*q);!0===this.isParameterDefined(r)&&(f=!0,d=c=r);!0===this.isParameterDefined(t)&&(f=!0,c=t);!0===this.isParameterDefined(a)&&(f=!0,d=a);1==f&&(b+="transform: matrix("+Math.cos(e)*c+" , "+Math.sin(e)*d+" , "+-Math.sin(e)*c+" , "+Math.cos(e)*d+" , "+k+" , "+l+" ) ; ",b+="-ms-transform: matrix("+Math.cos(e)*c+" , "+Math.sin(e)*d+" , "+-Math.sin(e)*c+" , "+Math.cos(e)*d+" , "+k+" , "+l+" ) ; ",b+="-webkit-transform: matrix("+Math.cos(e)*c+" , "+Math.sin(e)*d+" , "+-Math.sin(e)*c+
  " , "+Math.cos(e)*d+" , "+k+" , "+l+" ) ; ",b+="-moz-transform: matrix("+Math.cos(e)*c+" , "+Math.sin(e)*d+" , "+-Math.sin(e)*c+" , "+Math.cos(e)*d+" , "+k+" , "+l+" ) ; ");return b};biTurbo.proto.createBorder=function(a,b){this.createDivElement("border_frame","","opacity:1 ; left:0px ; top:0px ; background-color:transparent ; width:"+(this.width-2*b)+"px ; height:"+(this.height-2*b)+"px ; "+("border-style: solid; border-color: "+a+" ; border-width: "+b+"px"),!0)};
  biTurbo.proto.createDivElement=function(a,b,c,d){var e="display:block ; position:absolute ; ";a=this.defaultParameter(a,"");c=this.defaultParameter(c,"");d=this.defaultParameter(d,!1);var f="img_preload_"+a;var g="."+a;if(null===this.insertionPoint)this.log(" Error: missing this instance insertionPoint valur. Should be a string pointing to a div id element present in the HTML");else{var h=document.getElementById(this.insertionPoint);if(""===b){e+=" overflow: hidden; ";var m="</div>"}else e+=" background: url("+
  b+") ; ",m='<img id="'+f+'" src="'+b+'" style="visibility: hidden ; display : block;" /></div>',!0===this.addImagesToPreloadQueue&&this.addImagesToLoad(this,f,b);this.writeClass(g,e+c);b='<div id="'+a+'" class="'+a+'">'+m;h.innerHTML+=b;this.printHTML(b);!1===d&&this.elementsCreated.push(a)}};
  biTurbo.proto.createTextElement=function(a,b,c){var d=a+"_container",e=this.insertionPoint,f="."+a;this.createDivElement(d,"","",!0);this.insertionPoint=d;d=document.getElementById(this.insertionPoint);this.writeClass(f,c);b='<p id="'+a+'" class="'+a+'">'+b+"</p>";d.innerHTML+=b;this.printHTML(b);this.insertionPoint=e;this.elementsCreated.push(a)};
  biTurbo.proto.createSpriteSheet=function(a){var b=0,c=-1;var d=a.htmlElementName+"_content";var e="width : "+a.frameWidth+"px; height : "+a.frameHeight+"px;  overflow:hidden";var f=this.insertionPoint;a.framesArray=[];this.createDivElement(a.htmlElementName,"",e,!1);this.insertionPoint=a.htmlElementName;this.createDivElement(d,a.source," display : block; ",!0);this.insertionPoint=f;for(f=0;f<a.totalFrames;f++)c++,c>a.frameColumns-1&&(b++,c-=a.frameColumns),d=-c*a.frameWidth,e=-b*a.frameHeight,a.framesArray.push([d,
  e]),!0===a.verbose&&this.log("Spritesheet building frame table: "+f+"  x: "+a.framesArray[f][0]+" y: "+a.framesArray[f][1])};
  biTurbo.proto.nextFrameSpriteSheet=function(a,b,c,d){var e=b.htmlElementName+"_content";0<c?b.currentFrame<b.framesArray.length?b.currentFrame++:b.currentFrame=1:1<b.currentFrame?b.currentFrame--:b.currentFrame=b.framesArray.length;b.framesToPlay--;0<b.framesToPlay?(b.positionX=b.framesArray[b.currentFrame-1][0],b.positionY=b.framesArray[b.currentFrame-1][1],a.CSS({x:b.positionX,y:b.positionY,r:b.framesToPlay}),document.getElementById(e).style.transform="translate("+b.positionX+"px,"+b.positionY+
  "px)"):a.stopSpriteSheet(a,b,d)};biTurbo.proto.playSpriteSheet=function(a,b,c,d,e,f){var g=this;e=this.defaultParameter(e,1);b=this.defaultParameter(b,0);a.currentFrame=c;a.framesToPlay=d;setTimeout(function(b){a.temporalInterval=setInterval(g.nextFrameSpriteSheet,a.frameDuration,g,a,b,f)},1E3*b)};biTurbo.proto.stopSpriteSheet=function(a,b,c){clearInterval(b.temporalInterval);void 0!==c&&(a.log("should be executed function "+c),window[c]())};
  biTurbo.proto.setTimeLine=function(){this.timeLine=arguments;this.currentFrameIndex=0};biTurbo.proto.nextFrameInTimeLine=function(a){var b=this;a=this.defaultParameter(a,.1);setTimeout(function(){b.currentFrameIndex<b.timeLine.length&&!1===biTurboProps.pauseAll&&!1===b.pauseThis&&(b.log(b.currentFrameIndex+": "+b.timeLine[b.currentFrameIndex]),b.gotoFrame(b.timeLine[b.currentFrameIndex]),b.currentFrameIndex++)},1E3*a)};biTurbo.proto.gotoFrame=function(a){window[a]()};
  biTurbo.proto.createTween=function(a,b,c){c=this.defaultParameter(c,0);switch(c){default:case 0:c="linear";break;case 1:c="ease-in";break;case 2:c="ease-out";break;case 3:c="ease-in-out";break;case 4:c="cubic-bezier(0.175, 0.885, 0.32, 1.275)";break;case 5:c="step-end"}this.writeClass(".tween_"+a,"transition: all "+b+"s "+c+" ; "+("-webkit-transition: all "+b+"s "+c+" ; ")+("-moz-transition: all "+b+"s "+c+" ; ")+("-o-transition: all "+b+"s "+c+" ; ")+("-ms-transition: all "+b+"s "+c+" ; "))};
  biTurbo.proto.setBTN=function(a,b,c,d){var e=this;a=this.getDomElement(a);c=this.defaultParameter(c,!1);d=this.defaultParameter(d,"");a.addEventListener("click",function(){e.userClickedFunction(b,c,d)});this.createClass("a_cursor","cursor: pointer;");this.applyClass(a,"a_cursor")};
  biTurbo.proto.userClickedFunction=function(a,b,c){!0===b&&(this.pauseThis=biTurboProps.pauseAll=!0,window[c]());this.log('-- \n biTurboProps.pauseAll , this.pauseThis=true ; animation goes to frame "'+c+'" and invokes function: '+a+"()");window[a]()};
  biTurbo.proto.preload=function(a,b){b=this.defaultParameter(b,"undefined");var c=this;addEventListener(c.eventBannerLoadedId,function(d){clearInterval(c.preloadCheckerInterval);if(!0===a)!1===c.alreadyStarted&&c.play(!1,c);else if(c.log("loaded, executing callback function :"+b),"undefined"!==b)window[b]()});c.preloadCheckerInterval=setInterval(function(){c.checkLoaded(c)},biTurboProps.checkLoadedInterval);setTimeout(function(){!1===c.alreadyStarted&&(c.log("preloader timeOut : "+c.eventBannerLoadedId),
  c.readyToPlay=!0,this.dispatchEvent(c.readyEvent))},1E3*this.limitToWaitPreload)};biTurbo.proto.play=function(a,b){b=this.defaultParameter(b,this);b.log(b.banner_id+" : is ready to play : "+b.readyToPlay+"  forced play : "+a);if(!0===b.readyToPlay||!0===a)b.alreadyStarted=!0,b.nextFrameInTimeLine()};biTurbo.proto.addImagesToLoad=function(a,b,c){var d,e=a.imagesToLoad.length,f=!1;for(d=0;d<e;d++)a.imagesToLoad[d][1]===c&&(f=!0);!1===f&&a.imagesToLoad.push([b,c])};
  biTurbo.proto.checkLoaded=function(a){var b,c=0,d=a.imagesToLoad.length;for(b=0;b<d;b++){var e=a.getDomElement(a.imagesToLoad[b][0]);!0===e.complete&&c++}a.log("imagesLoaded "+c+"/"+d);c===d&&!1===a.addImagesToPreloadQueue&&!1===a.readyToPlay&&(a.readyToPlay=!0,a.log("preload complete : "+a.eventBannerLoadedId),dispatchEvent(a.readyEvent))};biTurbo.proto.defaultParameter=function(a,b){return void 0===a||null===a?b:a};biTurbo.proto.isParameterDefined=function(a){return void 0===a||null===a?!1:!0};
  biTurbo.proto.log=function(a){!0===biTurboProps.debug&&!0===this.isParameterDefined(a)&&console.log(this.banner_id+" : "+a)};biTurbo.proto.longLog=function(a){biTurboProps.debug=!1;console.clear();var b;a=a.split("_biTurboLB_");for(b=0;b<a.length;b++)console.log(a[b])};biTurbo.proto.printCSS=function(a){void 0!==a?this.cssLogTxt+="_biTurboLB_"+a:this.longLog(this.cssLogTxt)};biTurbo.proto.printHTML=function(a){void 0!==a?this.htmlLogTxt+="_biTurboLB_"+a:this.longLog(this.htmlLogTxt)};
  biTurbo.proto.getDomElement=function(a){"string"===typeof a.valueOf()&&(a=document.getElementById(a));return a};biTurbo.create=function(){return Object.create(this.proto)};