//console.log("no pub nuggsid : 1263525185"); var nuggCall= new Image(); var adserverurl= encodeURIComponent("http://as.ebz.io/api/nCookie.htm?NUGGVARS"); var nuggrid= encodeURIComponent(location.href); nuggCall.src = "http://beeadit.nuggad.net/bk?nuggn=2139309186&nuggsid=1263525185&nuggrid="+nuggrid+"&nuggl="+adserverurl+"&random="+Math.random(); var _comscore = _comscore || []; _comscore.push({ c1: "8", c2: "9881420" ,c3: "3000000000000000000" }); _comscore.push({ c1: "8", c2: "9881420" ,c3: "2000000000000000000" }); (function() { var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js"; el.parentNode.insertBefore(s, el); })(); function beead_upload(){ return true; } function beead_hasNoAds(){ if(typeof(BeeadAds)!='undefined' && typeof(BeeadAds.onNoAds)!='undefined') BeeadAds.onNoAds(); if(typeof(beead_noAds)!='undefined') beead_noAds(); return false; } function beead_hasAds(){ if(typeof(BeeadAds)!='undefined' && typeof(BeeadAds["onAds"])!='undefined') BeeadAds.onAds(); if(typeof(this["beead_activeAds"])!='undefined') beead_activeAds(); } function beead_failed(){ beead_upload(); return false; } var beead_isSafari = beead_isSafari(navigator.userAgent); function beead_isSafari(userAgent) { if ( navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1 && navigator.userAgent.indexOf('Firefox') == -1 ) { return true; } else return false; } function BeeadDomBuilder(){ this.body = document.getElementsByTagName("body")[0]; this.createTag = function (name, attributes) { var tag = document.createElement(name); if (attributes != null){ this.addSetOfAttributes(tag, attributes); } return tag; } this.addSetOfAttributes = function(tag, attributes){ for (var attrName in attributes) { if (Object.prototype.hasOwnProperty.call(attributes, attrName)) { this.addAttribute(tag, attrName, attributes[attrName]); } } } this.addAttribute = function (tag, attrName, attrValue){ if(attrName == "style"){ for (var styleName in attrValue) { if (Object.prototype.hasOwnProperty.call(attrValue, styleName)) { tag.style[styleName] = attrValue[styleName]; } } } else tag[attrName] = attrValue; } this.setLastTagOfBody = function(tag){ this.setLastChildOf(this.body, tag); } this.setLastChildOf= function (parentTag, tag){ parentTag.appendChild(tag); } this.setFirstChildOf= function (parentTag, tag){ if(parentTag.firstChild!=null) parentTag.insertBefore(tag,parentTag.firstChild); else parentTag.appendChild(tag); } this.insertAFter = function(prevTag, tag){ var isIE = navigator.appName.indexOf("Microsoft") != -1; if(isIE){ this.body.insertBefore(tag, prevTag.nextSibling); } else { this.body.insertBefore(tag, prevTag.nextElementSibling); } } this.removeTag = function(tag){ this.body.removeChild(tag); } this.quirksModeOrNot = function(){ var ie = (document.all && !window.opera)?true:false; if (document.compatMode==='BackCompat' && ie == true) return true; else return false; } } var beeadHideOtherAds = { 'iframes' : document.getElementsByTagName('iframe'), 'objects' : document.getElementsByTagName('object'), 'embeds' : document.getElementsByTagName('embed') } var mobileUserAgent = false; /*! * jQuery JavaScript Library v1.8.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) */ (function(a2,aB){var w,af,o=a2.document,aI=a2.location,d=a2.navigator,bg=a2.jQuery,I=a2.$,am=Array.prototype.push,a4=Array.prototype.slice,aK=Array.prototype.indexOf,z=Object.prototype.toString,V=Object.prototype.hasOwnProperty,aO=String.prototype.trim,bG=function(e,bZ){return new bG.fn.init(e,bZ,w)},bx=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,aa=/\S/,aV=/\s+/,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,bo=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bf=/^[\],:{}\s]*$/,bi=/(?:^|:|,)(?:\s*\[)+/g,bD=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,a0=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,bP=/^-ms-/,aU=/-([\da-z])/gi,N=function(e,bZ){return(bZ+"").toUpperCase()},aF=function(){if(o.addEventListener){o.removeEventListener("DOMContentLoaded",aF,false);bG.ready()}else{if(o.readyState==="complete"){o.detachEvent("onreadystatechange",aF);bG.ready()}}},Z={};bG.fn=bG.prototype={constructor:bG,init:function(e,b2,b1){var b0,b3,bZ,b4;if(!e){return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b0=[null,e,null]}else{b0=bo.exec(e)}if(b0&&(b0[1]||!b2)){if(b0[1]){b2=b2 instanceof bG?b2[0]:b2;b4=(b2&&b2.nodeType?b2.ownerDocument||b2:o);e=bG.parseHTML(b0[1],b4,true);if(a.test(b0[1])&&bG.isPlainObject(b2)){this.attr.call(e,b2,true)}return bG.merge(this,e)}else{b3=o.getElementById(b0[2]);if(b3&&b3.parentNode){if(b3.id!==b0[2]){return b1.find(e)}this.length=1;this[0]=b3}this.context=o;this.selector=e;return this}}else{if(!b2||b2.jquery){return(b2||b1).find(e)}else{return this.constructor(b2).find(e)}}}else{if(bG.isFunction(e)){return b1.ready(e)}}if(e.selector!==aB){this.selector=e.selector;this.context=e.context}return bG.makeArray(e,this)},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return a4.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[this.length+e]:this[e])},pushStack:function(bZ,b1,e){var b0=bG.merge(this.constructor(),bZ);b0.prevObject=this;b0.context=this.context;if(b1==="find"){b0.selector=this.selector+(this.selector?" ":"")+e}else{if(b1){b0.selector=this.selector+"."+b1+"("+e+")"}}return b0},each:function(bZ,e){return bG.each(this,bZ,e)},ready:function(e){bG.ready.promise().done(e);return this},eq:function(e){e=+e;return e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(a4.apply(this,arguments),"slice",a4.call(arguments).join(","))},map:function(e){return this.pushStack(bG.map(this,function(b0,bZ){return e.call(b0,bZ,b0)}))},end:function(){return this.prevObject||this.constructor(null)},push:am,sort:[].sort,splice:[].splice};bG.fn.init.prototype=bG.fn;bG.extend=bG.fn.extend=function(){var b7,b0,e,bZ,b4,b5,b3=arguments[0]||{},b2=1,b1=arguments.length,b6=false;if(typeof b3==="boolean"){b6=b3;b3=arguments[1]||{};b2=2}if(typeof b3!=="object"&&!bG.isFunction(b3)){b3={}}if(b1===b2){b3=this;--b2}for(;b20){return}af.resolveWith(o,[bG]);if(bG.fn.trigger){bG(o).trigger("ready").off("ready")}},isFunction:function(e){return bG.type(e)==="function"},isArray:Array.isArray||function(e){return bG.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):Z[z.call(e)]||"object"},isPlainObject:function(b1){if(!b1||bG.type(b1)!=="object"||b1.nodeType||bG.isWindow(b1)){return false}try{if(b1.constructor&&!V.call(b1,"constructor")&&!V.call(b1.constructor.prototype,"isPrototypeOf")){return false}}catch(b0){return false}var bZ;for(bZ in b1){}return bZ===aB||V.call(b1,bZ)},isEmptyObject:function(bZ){var e;for(e in bZ){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b1,b0,e){var bZ;if(!b1||typeof b1!=="string"){return null}if(typeof b0==="boolean"){e=b0;b0=0}b0=b0||o;if((bZ=a.exec(b1))){return[b0.createElement(bZ[1])]}bZ=bG.buildFragment([b1],b0,e?null:[]);return bG.merge([],(bZ.cacheable?bG.clone(bZ.fragment):bZ.fragment).childNodes)},parseJSON:function(e){if(!e||typeof e!=="string"){return null}e=bG.trim(e);if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e)}if(bf.test(e.replace(bD,"@").replace(a0,"]").replace(bi,""))){return(new Function("return "+e))()}bG.error("Invalid JSON: "+e)},parseXML:function(b1){var bZ,b0;if(!b1||typeof b1!=="string"){return null}try{if(a2.DOMParser){b0=new DOMParser();bZ=b0.parseFromString(b1,"text/xml")}else{bZ=new ActiveXObject("Microsoft.XMLDOM");bZ.async="false";bZ.loadXML(b1)}}catch(b2){bZ=aB}if(!bZ||!bZ.documentElement||bZ.getElementsByTagName("parsererror").length){bG.error("Invalid XML: "+b1)}return bZ},noop:function(){},globalEval:function(e){if(e&&aa.test(e)){(a2.execScript||function(bZ){a2["eval"].call(a2,bZ)})(e)}},camelCase:function(e){return e.replace(bP,"ms-").replace(aU,N)},nodeName:function(bZ,e){return bZ.nodeName&&bZ.nodeName.toLowerCase()===e.toLowerCase()},each:function(b3,b4,b0){var bZ,b1=0,b2=b3.length,e=b2===aB||bG.isFunction(b3);if(b0){if(e){for(bZ in b3){if(b4.apply(b3[bZ],b0)===false){break}}}else{for(;b10&&e[0]&&e[bZ-1])||bZ===0||bG.isArray(e));if(b1){for(;b0-1){b5.splice(ca,1);if(b2){if(ca<=b3){b3--}if(ca<=b4){b4--}}}})}return this},has:function(b9){return bG.inArray(b9,b5)>-1},empty:function(){b5=[];return this},disable:function(){b5=b6=b1=aB;return this},disabled:function(){return !b5},lock:function(){b6=aB;if(!b1){b7.disable()}return this},locked:function(){return !b6},fireWith:function(ca,b9){b9=b9||[];b9=[ca,b9.slice?b9.slice():b9];if(b5&&(!e||b6)){if(b2){b6.push(b9)}else{bZ(b9)}}return this},fire:function(){b7.fireWith(this,arguments);return this},fired:function(){return !!e}};return b7};bG.extend({Deferred:function(b0){var bZ=[["resolve","done",bG.Callbacks("once memory"),"resolved"],["reject","fail",bG.Callbacks("once memory"),"rejected"],["notify","progress",bG.Callbacks("memory")]],b1="pending",b2={state:function(){return b1},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b3=arguments;return bG.Deferred(function(b4){bG.each(bZ,function(b6,b5){var b8=b5[0],b7=b3[b6];e[b5[1]](bG.isFunction(b7)?function(){var b9=b7.apply(this,arguments);if(b9&&bG.isFunction(b9.promise)){b9.promise().done(b4.resolve).fail(b4.reject).progress(b4.notify)}else{b4[b8+"With"](this===e?b4:this,[b9])}}:b4[b8])});b3=null}).promise()},promise:function(b3){return b3!=null?bG.extend(b3,b2):b2}},e={};b2.pipe=b2.then;bG.each(bZ,function(b4,b3){var b6=b3[2],b5=b3[3];b2[b3[1]]=b6.add;if(b5){b6.add(function(){b1=b5},bZ[b4^1][2].disable,bZ[2][2].lock)}e[b3[0]]=b6.fire;e[b3[0]+"With"]=b6.fireWith});b2.promise(e);if(b0){b0.call(e,e)}return e},when:function(b2){var b0=0,b4=a4.call(arguments),e=b4.length,bZ=e!==1||(b2&&bG.isFunction(b2.promise))?e:0,b7=bZ===1?b2:bG.Deferred(),b1=function(b9,ca,b8){return function(cb){ca[b9]=this;b8[b9]=arguments.length>1?a4.call(arguments):cb;if(b8===b6){b7.notifyWith(ca,b8)}else{if(!(--bZ)){b7.resolveWith(ca,b8)}}}},b6,b3,b5;if(e>1){b6=new Array(e);b3=new Array(e);b5=new Array(e);for(;b0
a";ca=b0.getElementsByTagName("*");b8=b0.getElementsByTagName("a")[0];b8.style.cssText="top:1px;float:left;opacity:.5";if(!ca||!ca.length){return{}}b9=o.createElement("select");b2=b9.appendChild(o.createElement("option"));b7=b0.getElementsByTagName("input")[0];cb={leadingWhitespace:(b0.firstChild.nodeType===3),tbody:!b0.getElementsByTagName("tbody").length,htmlSerialize:!!b0.getElementsByTagName("link").length,style:/top/.test(b8.getAttribute("style")),hrefNormalized:(b8.getAttribute("href")==="/a"),opacity:/^0.5/.test(b8.style.opacity),cssFloat:!!b8.style.cssFloat,checkOn:(b7.value==="on"),optSelected:b2.selected,getSetAttribute:b0.className!=="t",enctype:!!o.createElement("form").enctype,html5Clone:o.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(o.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};b7.checked=true;cb.noCloneChecked=b7.cloneNode(true).checked;b9.disabled=true;cb.optDisabled=!b2.disabled;try{delete b0.test}catch(b5){cb.deleteExpando=false}if(!b0.addEventListener&&b0.attachEvent&&b0.fireEvent){b0.attachEvent("onclick",bZ=function(){cb.noCloneEvent=false});b0.cloneNode(true).fireEvent("onclick");b0.detachEvent("onclick",bZ)}b7=o.createElement("input");b7.value="t";b7.setAttribute("type","radio");cb.radioValue=b7.value==="t";b7.setAttribute("checked","checked");b7.setAttribute("name","t");b0.appendChild(b7);b6=o.createDocumentFragment();b6.appendChild(b0.lastChild);cb.checkClone=b6.cloneNode(true).cloneNode(true).lastChild.checked;cb.appendChecked=b7.checked;b6.removeChild(b7);b6.appendChild(b0);if(b0.attachEvent){for(b3 in {submit:true,change:true,focusin:true}){b4="on"+b3;b1=(b4 in b0);if(!b1){b0.setAttribute(b4,"return;");b1=(typeof b0[b4]==="function")}cb[b3+"Bubbles"]=b1}}bG(function(){var cc,cg,ce,cf,cd="padding:0;margin:0;border:0;display:block;overflow:hidden;",e=o.getElementsByTagName("body")[0];if(!e){return}cc=o.createElement("div");cc.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";e.insertBefore(cc,e.firstChild);cg=o.createElement("div");cc.appendChild(cg);cg.innerHTML="
t
";ce=cg.getElementsByTagName("td");ce[0].style.cssText="padding:0;margin:0;border:0;display:none";b1=(ce[0].offsetHeight===0);ce[0].style.display="";ce[1].style.display="none";cb.reliableHiddenOffsets=b1&&(ce[0].offsetHeight===0);cg.innerHTML="";cg.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";cb.boxSizing=(cg.offsetWidth===4);cb.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){cb.pixelPosition=(a2.getComputedStyle(cg,null)||{}).top!=="1%";cb.boxSizingReliable=(a2.getComputedStyle(cg,null)||{width:"4px"}).width==="4px";cf=o.createElement("div");cf.style.cssText=cg.style.cssText=cd;cf.style.marginRight=cf.style.width="0";cg.style.width="1px";cg.appendChild(cf);cb.reliableMarginRight=!parseFloat((a2.getComputedStyle(cf,null)||{}).marginRight)}if(typeof cg.style.zoom!=="undefined"){cg.innerHTML="";cg.style.cssText=cd+"width:1px;padding:1px;display:inline;zoom:1";cb.inlineBlockNeedsLayout=(cg.offsetWidth===3);cg.style.display="block";cg.style.overflow="visible";cg.innerHTML="
";cg.firstChild.style.width="5px";cb.shrinkWrapBlocks=(cg.offsetWidth!==3);cc.style.zoom=1}e.removeChild(cc);cc=cg=ce=cf=null});b6.removeChild(b0);ca=b8=b9=b2=b7=b6=b0=null;return cb})();var bt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aL=/([A-Z])/g;bG.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(bG.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?bG.cache[e[bG.expando]]:e[bG.expando];return !!e&&!O(e)},data:function(b1,bZ,b3,b2){if(!bG.acceptData(b1)){return}var b4,b6,b7=bG.expando,b5=typeof bZ==="string",b8=b1.nodeType,e=b8?bG.cache:b1,b0=b8?b1[b7]:b1[b7]&&b7;if((!b0||!e[b0]||(!b2&&!e[b0].data))&&b5&&b3===aB){return}if(!b0){if(b8){b1[b7]=b0=bG.deletedIds.pop()||bG.guid++}else{b0=b7}}if(!e[b0]){e[b0]={};if(!b8){e[b0].toJSON=bG.noop}}if(typeof bZ==="object"||typeof bZ==="function"){if(b2){e[b0]=bG.extend(e[b0],bZ)}else{e[b0].data=bG.extend(e[b0].data,bZ)}}b4=e[b0];if(!b2){if(!b4.data){b4.data={}}b4=b4.data}if(b3!==aB){b4[bG.camelCase(bZ)]=b3}if(b5){b6=b4[bZ];if(b6==null){b6=b4[bG.camelCase(bZ)]}}else{b6=b4}return b6},removeData:function(b1,bZ,b2){if(!bG.acceptData(b1)){return}var b5,b4,b3,b6=b1.nodeType,e=b6?bG.cache:b1,b0=b6?b1[bG.expando]:bG.expando;if(!e[b0]){return}if(bZ){b5=b2?e[b0]:e[b0].data;if(b5){if(!bG.isArray(bZ)){if(bZ in b5){bZ=[bZ]}else{bZ=bG.camelCase(bZ);if(bZ in b5){bZ=[bZ]}else{bZ=bZ.split(" ")}}}for(b4=0,b3=bZ.length;b41,null,false)},removeData:function(e){return this.each(function(){bG.removeData(this,e)})}});function bv(b1,b0,b2){if(b2===aB&&b1.nodeType===1){var bZ="data-"+b0.replace(aL,"-$1").toLowerCase();b2=b1.getAttribute(bZ);if(typeof b2==="string"){try{b2=b2==="true"?true:b2==="false"?false:b2==="null"?null:+b2+""===b2?+b2:bt.test(b2)?bG.parseJSON(b2):b2}catch(b3){}bG.data(b1,b0,b2)}else{b2=aB}}return b2}function O(bZ){var e;for(e in bZ){if(e==="data"&&bG.isEmptyObject(bZ[e])){continue}if(e!=="toJSON"){return false}}return true}bG.extend({queue:function(b0,bZ,b1){var e;if(b0){bZ=(bZ||"fx")+"queue";e=bG._data(b0,bZ);if(b1){if(!e||bG.isArray(b1)){e=bG._data(b0,bZ,bG.makeArray(b1))}else{e.push(b1)}}return e||[]}},dequeue:function(b3,b2){b2=b2||"fx";var bZ=bG.queue(b3,b2),b4=bZ.length,b1=bZ.shift(),e=bG._queueHooks(b3,b2),b0=function(){bG.dequeue(b3,b2)};if(b1==="inprogress"){b1=bZ.shift();b4--}if(b1){if(b2==="fx"){bZ.unshift("inprogress")}delete e.stop;b1.call(b3,b0,e)}if(!b4&&e){e.empty.fire()}},_queueHooks:function(b0,bZ){var e=bZ+"queueHooks";return bG._data(b0,e)||bG._data(b0,e,{empty:bG.Callbacks("once memory").add(function(){bG.removeData(b0,bZ+"queue",true);bG.removeData(b0,e,true)})})}});bG.fn.extend({queue:function(e,bZ){var b0=2;if(typeof e!=="string"){bZ=e;e="fx";b0--}if(arguments.length1)},removeAttr:function(e){return this.each(function(){bG.removeAttr(this,e)})},prop:function(e,bZ){return bG.access(this,bG.prop,e,bZ,arguments.length>1)},removeProp:function(e){e=bG.propFix[e]||e;return this.each(function(){try{this[e]=aB;delete this[e]}catch(bZ){}})},addClass:function(b2){var b4,b0,bZ,b1,b3,b5,e;if(bG.isFunction(b2)){return this.each(function(b6){bG(this).addClass(b2.call(this,b6,this.className))})}if(b2&&typeof b2==="string"){b4=b2.split(aV);for(b0=0,bZ=this.length;b0=0){b2=b2.replace(" "+b1[b5]+" "," ")}}b3.className=b4?bG.trim(b2):""}}}return this},toggleClass:function(b1,bZ){var b0=typeof b1,e=typeof bZ==="boolean";if(bG.isFunction(b1)){return this.each(function(b2){bG(this).toggleClass(b1.call(this,b2,this.className,bZ),bZ)})}return this.each(function(){if(b0==="string"){var b4,b3=0,b2=bG(this),b5=bZ,b6=b1.split(aV);while((b4=b6[b3++])){b5=e?b5:!b2.hasClass(b4);b2[b5?"addClass":"removeClass"](b4)}}else{if(b0==="undefined"||b0==="boolean"){if(this.className){bG._data(this,"__className__",this.className)}this.className=this.className||b1===false?"":bG._data(this,"__className__")||""}}})},hasClass:function(e){var b1=" "+e+" ",b0=0,bZ=this.length;for(;b0=0){return true}}return false},val:function(b1){var e,bZ,b2,b0=this[0];if(!arguments.length){if(b0){e=bG.valHooks[b0.type]||bG.valHooks[b0.nodeName.toLowerCase()];if(e&&"get" in e&&(bZ=e.get(b0,"value"))!==aB){return bZ}bZ=b0.value;return typeof bZ==="string"?bZ.replace(ai,""):bZ==null?"":bZ}return}b2=bG.isFunction(b1);return this.each(function(b4){var b5,b3=bG(this);if(this.nodeType!==1){return}if(b2){b5=b1.call(this,b4,b3.val())}else{b5=b1}if(b5==null){b5=""}else{if(typeof b5==="number"){b5+=""}else{if(bG.isArray(b5)){b5=bG.map(b5,function(b6){return b6==null?"":b6+""})}}}e=bG.valHooks[this.type]||bG.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b5,"value")===aB){this.value=b5}})}});bG.extend({valHooks:{option:{get:function(e){var bZ=e.attributes.value;return !bZ||bZ.specified?e.value:e.text}},select:{get:function(e){var b4,bZ,b3,b1,b2=e.selectedIndex,b5=[],b6=e.options,b0=e.type==="select-one";if(b2<0){return null}bZ=b0?b2:0;b3=b0?b2+1:b6.length;for(;bZ=0});if(!e.length){bZ.selectedIndex=-1}return e}}},attrFn:{},attr:function(b4,b1,b5,b3){var b0,e,b2,bZ=b4.nodeType;if(!b4||bZ===3||bZ===8||bZ===2){return}if(b3&&bG.isFunction(bG.fn[b1])){return bG(b4)[b1](b5)}if(typeof b4.getAttribute==="undefined"){return bG.prop(b4,b1,b5)}b2=bZ!==1||!bG.isXMLDoc(b4);if(b2){b1=b1.toLowerCase();e=bG.attrHooks[b1]||(M.test(b1)?bV:a7)}if(b5!==aB){if(b5===null){bG.removeAttr(b4,b1);return}else{if(e&&"set" in e&&b2&&(b0=e.set(b4,b5,b1))!==aB){return b0}else{b4.setAttribute(b1,b5+"");return b5}}}else{if(e&&"get" in e&&b2&&(b0=e.get(b4,b1))!==null){return b0}else{b0=b4.getAttribute(b1);return b0===null?aB:b0}}},removeAttr:function(b1,b3){var b2,b4,bZ,e,b0=0;if(b3&&b1.nodeType===1){b4=b3.split(aV);for(;b0=0)}}})});var bE=/^(?:textarea|input|select)$/i,br=/^([^\.]*|)(?:\.(.+)|)$/,ba=/(?:^|\s)hover(\.\S+|)\b/,a3=/^key/,bK=/^(?:mouse|contextmenu)|click/,by=/^(?:focusinfocus|focusoutblur)$/,aq=function(e){return bG.event.special.hover?e:e.replace(ba,"mouseenter$1 mouseleave$1")};bG.event={add:function(b1,b5,cc,b3,b2){var b6,b4,cd,cb,ca,b8,e,b9,bZ,b0,b7;if(b1.nodeType===3||b1.nodeType===8||!b5||!cc||!(b6=bG._data(b1))){return}if(cc.handler){bZ=cc;cc=bZ.handler;b2=bZ.selector}if(!cc.guid){cc.guid=bG.guid++}cd=b6.events;if(!cd){b6.events=cd={}}b4=b6.handle;if(!b4){b6.handle=b4=function(ce){return typeof bG!=="undefined"&&(!ce||bG.event.triggered!==ce.type)?bG.event.dispatch.apply(b4.elem,arguments):aB};b4.elem=b1}b5=bG.trim(aq(b5)).split(" ");for(cb=0;cb=0){ca=ca.slice(0,-1);b1=true}if(ca.indexOf(".")>=0){b0=ca.split(".");ca=b0.shift();b0.sort()}if((!b4||bG.event.customEvent[ca])&&!bG.event.global[ca]){return}bZ=typeof bZ==="object"?bZ[bG.expando]?bZ:new bG.Event(ca,bZ):new bG.Event(ca);bZ.type=ca;bZ.isTrigger=true;bZ.exclusive=b1;bZ.namespace=b0.join(".");bZ.namespace_re=bZ.namespace?new RegExp("(^|\\.)"+b0.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b2=ca.indexOf(":")<0?"on"+ca:"";if(!b4){e=bG.cache;for(b7 in e){if(e[b7].events&&e[b7].events[ca]){bG.event.trigger(bZ,b6,e[b7].handle.elem,true)}}return}bZ.result=aB;if(!bZ.target){bZ.target=b4}b6=b6!=null?bG.makeArray(b6):[];b6.unshift(bZ);b9=bG.event.special[ca]||{};if(b9.trigger&&b9.trigger.apply(b4,b6)===false){return}b5=[[b4,b9.bindType||ca]];if(!cd&&!b9.noBubble&&!bG.isWindow(b4)){cc=b9.delegateType||ca;cb=by.test(cc+ca)?b4:b4.parentNode;for(b3=b4;cb;cb=cb.parentNode){b5.push([cb,cc]);b3=cb}if(b3===(b4.ownerDocument||o)){b5.push([b3.defaultView||b3.parentWindow||a2,cc])}}for(b7=0;b7=0:bG.find(b1,this,null,[ce]).length}if(b7[b1]){b6.push(cc)}}if(b6.length){cb.push({elem:ce,matches:b6})}}}}if(b2.length>b3){cb.push({elem:this,matches:b2.slice(b3)})}for(b5=0;b50?this.on(e,null,b1,b0):this.trigger(e)};if(a3.test(e)){bG.event.fixHooks[e]=bG.event.keyHooks}if(bK.test(e)){bG.event.fixHooks[e]=bG.event.mouseHooks}}); /*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ (function(cS,ch){var cX,ca,cL,b0,cm,cA,cd,cg,cc,cJ,b9=true,cu="undefined",cZ=("sizcache"+Math.random()).replace(".",""),b4=String,b8=cS.document,cb=b8.documentElement,cr=0,cf=0,cE=[].pop,cW=[].push,cl=[].slice,co=[].indexOf||function(c8){var c7=0,e=this.length;for(;c7cL.cacheLength){delete e[c7.shift()]}return(e[c8]=c9)},e)},cU=c5(),cV=c5(),cn=c5(),cy="[\\x20\\t\\r\\n\\f]",ck="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",ci=ck.replace("w","w#"),c4="([*^$|!~]?=)",cP="\\["+cy+"*("+ck+")"+cy+"*(?:"+c4+cy+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ci+")|)|)"+cy+"*\\]",c6=":("+ck+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+cP+")|[^:]|\\\\.)*|.*))\\)|)",cz=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+cy+"*((?:-\\d)?\\d*)"+cy+"*\\)|)(?=[^-]|$)",cT=new RegExp("^"+cy+"+|((?:^|[^\\\\])(?:\\\\.)*)"+cy+"+$","g"),b5=new RegExp("^"+cy+"*,"+cy+"*"),cH=new RegExp("^"+cy+"*([\\x20\\t\\r\\n\\f>+~])"+cy+"*"),cM=new RegExp(c6),cO=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,cD=/^:not/,cR=/[\x20\t\r\n\f]*[+~]/,c0=/:not\($/,cs=/h\d/i,cN=/input|select|textarea|button/i,ct=/\\(?!\\)/g,cG={ID:new RegExp("^#("+ck+")"),CLASS:new RegExp("^\\.("+ck+")"),NAME:new RegExp("^\\[name=['\"]?("+ck+")['\"]?\\]"),TAG:new RegExp("^("+ck.replace("w","w*")+")"),ATTR:new RegExp("^"+cP),PSEUDO:new RegExp("^"+c6),POS:new RegExp(cz,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+cy+"*(even|odd|(([+-]|)(\\d*)n|)"+cy+"*(?:([+-]|)"+cy+"*(\\d+)|))"+cy+"*\\)|)","i"),needsContext:new RegExp("^"+cy+"*[>+~]|"+cz,"i")},cK=function(c7){var c9=b8.createElement("div");try{return c7(c9)}catch(c8){return false}finally{c9=null}},b7=cK(function(e){e.appendChild(b8.createComment(""));return !e.getElementsByTagName("*").length}),cC=cK(function(e){e.innerHTML="";return e.firstChild&&typeof e.firstChild.getAttribute!==cu&&e.firstChild.getAttribute("href")==="#"}),cq=cK(function(c7){c7.innerHTML="";var e=typeof c7.lastChild.getAttribute("multiple");return e!=="boolean"&&e!=="string"}),cB=cK(function(e){e.innerHTML="";if(!e.getElementsByClassName||!e.getElementsByClassName("e").length){return false}e.lastChild.className="e";return e.getElementsByClassName("e").length===2}),bZ=cK(function(c7){c7.id=cZ+0;c7.innerHTML="
";cb.insertBefore(c7,cb.firstChild);var e=b8.getElementsByName&&b8.getElementsByName(cZ).length===2+b8.getElementsByName(cZ+0).length;ca=!b8.getElementById(cZ);cb.removeChild(c7);return e});try{cl.call(cb.childNodes,0)[0].nodeType}catch(c3){cl=function(c7){var c8,e=[];for(;(c8=this[c7]);c7++){e.push(c8)}return e}}function cQ(c9,e,db,de){db=db||[];e=e||b8;var dc,c7,dd,c8,da=e.nodeType;if(!c9||typeof c9!=="string"){return db}if(da!==1&&da!==9){return[]}dd=cm(e);if(!dd&&!de){if((dc=cO.exec(c9))){if((c8=dc[1])){if(da===9){c7=e.getElementById(c8);if(c7&&c7.parentNode){if(c7.id===c8){db.push(c7);return db}}else{return db}}else{if(e.ownerDocument&&(c7=e.ownerDocument.getElementById(c8))&&cA(e,c7)&&c7.id===c8){db.push(c7);return db}}}else{if(dc[2]){cW.apply(db,cl.call(e.getElementsByTagName(c9),0));return db}else{if((c8=dc[3])&&cB&&e.getElementsByClassName){cW.apply(db,cl.call(e.getElementsByClassName(c8),0));return db}}}}}return cY(c9.replace(cT,"$1"),e,db,de,dd)}cQ.matches=function(c7,e){return cQ(c7,null,null,e)};cQ.matchesSelector=function(e,c7){return cQ(c7,null,null,[e]).length>0};function cI(e){return function(c8){var c7=c8.nodeName.toLowerCase();return c7==="input"&&c8.type===e}}function b3(e){return function(c8){var c7=c8.nodeName.toLowerCase();return(c7==="input"||c7==="button")&&c8.type===e}}function cF(e){return c1(function(c7){c7=+c7;return c1(function(c8,dc){var da,c9=e([],c8.length,c7),db=c9.length;while(db--){if(c8[(da=c9[db])]){c8[da]=!(dc[da]=c8[da])}}})})}b0=cQ.getText=function(da){var c9,c7="",c8=0,e=da.nodeType;if(e){if(e===1||e===9||e===11){if(typeof da.textContent==="string"){return da.textContent}else{for(da=da.firstChild;da;da=da.nextSibling){c7+=b0(da)}}}else{if(e===3||e===4){return da.nodeValue}}}else{for(;(c9=da[c8]);c8++){c7+=b0(c9)}}return c7};cm=cQ.isXML=function(e){var c7=e&&(e.ownerDocument||e).documentElement;return c7?c7.nodeName!=="HTML":false};cA=cQ.contains=cb.contains?function(c7,e){var c9=c7.nodeType===9?c7.documentElement:c7,c8=e&&e.parentNode;return c7===c8||!!(c8&&c8.nodeType===1&&c9.contains&&c9.contains(c8))}:cb.compareDocumentPosition?function(c7,e){return e&&!!(c7.compareDocumentPosition(e)&16)}:function(c7,e){while((e=e.parentNode)){if(e===c7){return true}}return false};cQ.attr=function(c8,c7){var c9,e=cm(c8);if(!e){c7=c7.toLowerCase()}if((c9=cL.attrHandle[c7])){return c9(c8)}if(e||cq){return c8.getAttribute(c7)}c9=c8.getAttributeNode(c7);return c9?typeof c8[c7]==="boolean"?c8[c7]?c7:null:c9.specified?c9.value:null:null};cL=cQ.selectors={cacheLength:50,createPseudo:c1,match:cG,attrHandle:cC?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:ca?function(c9,c8,c7){if(typeof c8.getElementById!==cu&&!c7){var e=c8.getElementById(c9);return e&&e.parentNode?[e]:[]}}:function(c9,c8,c7){if(typeof c8.getElementById!==cu&&!c7){var e=c8.getElementById(c9);return e?e.id===c9||typeof e.getAttributeNode!==cu&&e.getAttributeNode("id").value===c9?[e]:ch:[]}},TAG:b7?function(e,c7){if(typeof c7.getElementsByTagName!==cu){return c7.getElementsByTagName(e)}}:function(e,da){var c9=da.getElementsByTagName(e);if(e==="*"){var db,c8=[],c7=0;for(;(db=c9[c7]);c7++){if(db.nodeType===1){c8.push(db)}}return c8}return c9},NAME:bZ&&function(e,c7){if(typeof c7.getElementsByName!==cu){return c7.getElementsByName(name)}},CLASS:cB&&function(c8,c7,e){if(typeof c7.getElementsByClassName!==cu&&!e){return c7.getElementsByClassName(c8)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(ct,"");e[3]=(e[4]||e[5]||"").replace(ct,"");if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1]==="nth"){if(!e[2]){cQ.error(e[0])}e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd"));e[4]=+((e[6]+e[7])||e[2]==="odd")}else{if(e[2]){cQ.error(e[0])}}return e},PSEUDO:function(c7){var c8,e;if(cG.CHILD.test(c7[0])){return null}if(c7[3]){c7[2]=c7[3]}else{if((c8=c7[4])){if(cM.test(c8)&&(e=b1(c8,true))&&(e=c8.indexOf(")",c8.length-e)-c8.length)){c8=c8.slice(0,e);c7[0]=c7[0].slice(0,e)}c7[2]=c8}}return c7.slice(0,3)}},filter:{ID:ca?function(e){e=e.replace(ct,"");return function(c7){return c7.getAttribute("id")===e}}:function(e){e=e.replace(ct,"");return function(c8){var c7=typeof c8.getAttributeNode!==cu&&c8.getAttributeNode("id");return c7&&c7.value===e}},TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(ct,"").toLowerCase();return function(c7){return c7.nodeName&&c7.nodeName.toLowerCase()===e}},CLASS:function(e){var c7=cU[cZ][e];if(!c7){c7=cU(e,new RegExp("(^|"+cy+")"+e+"("+cy+"|$)"))}return function(c8){return c7.test(c8.className||(typeof c8.getAttribute!==cu&&c8.getAttribute("class"))||"")}},ATTR:function(c8,c7,e){return function(db,da){var c9=cQ.attr(db,c8);if(c9==null){return c7==="!="}if(!c7){return true}c9+="";return c7==="="?c9===e:c7==="!="?c9!==e:c7==="^="?e&&c9.indexOf(e)===0:c7==="*="?e&&c9.indexOf(e)>-1:c7==="$="?e&&c9.substr(c9.length-e.length)===e:c7==="~="?(" "+c9+" ").indexOf(e)>-1:c7==="|="?c9===e||c9.substr(0,e.length+1)===e+"-":false}},CHILD:function(e,c8,c9,c7){if(e==="nth"){return function(dc){var db,dd,da=dc.parentNode;if(c9===1&&c7===0){return true}if(da){dd=0;for(db=da.firstChild;db;db=db.nextSibling){if(db.nodeType===1){dd++;if(dc===db){break}}}}dd-=c7;return dd===c9||(dd%c9===0&&dd/c9>=0)}}return function(db){var da=db;switch(e){case"only":case"first":while((da=da.previousSibling)){if(da.nodeType===1){return false}}if(e==="first"){return true}da=db;case"last":while((da=da.nextSibling)){if(da.nodeType===1){return false}}return true}}},PSEUDO:function(c9,c8){var e,c7=cL.pseudos[c9]||cL.setFilters[c9.toLowerCase()]||cQ.error("unsupported pseudo: "+c9);if(c7[cZ]){return c7(c8)}if(c7.length>1){e=[c9,c9,"",c8];return cL.setFilters.hasOwnProperty(c9.toLowerCase())?c1(function(dc,de){var db,da=c7(dc,c8),dd=da.length;while(dd--){db=co.call(dc,da[dd]);dc[db]=!(de[db]=da[dd])}}):function(da){return c7(da,0,e)}}return c7}},pseudos:{not:c1(function(e){var c7=[],c8=[],c9=cd(e.replace(cT,"$1"));return c9[cZ]?c1(function(db,dg,de,dc){var df,da=c9(db,null,dc,[]),dd=db.length;while(dd--){if((df=da[dd])){db[dd]=!(dg[dd]=df)}}}):function(dc,db,da){c7[0]=dc;c9(c7,null,da,c8);return !c8.pop()}}),has:c1(function(e){return function(c7){return cQ(e,c7).length>0}}),contains:c1(function(e){return function(c7){return(c7.textContent||c7.innerText||b0(c7)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var c7=e.nodeName.toLowerCase();return(c7==="input"&&!!e.checked)||(c7==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !cL.pseudos.empty(e)},empty:function(c7){var e;c7=c7.firstChild;while(c7){if(c7.nodeName>"@"||(e=c7.nodeType)===3||e===4){return false}c7=c7.nextSibling}return true},header:function(e){return cs.test(e.nodeName)},text:function(c8){var c7,e;return c8.nodeName.toLowerCase()==="input"&&(c7=c8.type)==="text"&&((e=c8.getAttribute("type"))==null||e.toLowerCase()===c7)},radio:cI("radio"),checkbox:cI("checkbox"),file:cI("file"),password:cI("password"),image:cI("image"),submit:b3("submit"),reset:b3("reset"),button:function(c7){var e=c7.nodeName.toLowerCase();return e==="input"&&c7.type==="button"||e==="button"},input:function(e){return cN.test(e.nodeName)},focus:function(e){var c7=e.ownerDocument;return e===c7.activeElement&&(!c7.hasFocus||c7.hasFocus())&&!!(e.type||e.href)},active:function(e){return e===e.ownerDocument.activeElement},first:cF(function(e,c8,c7){return[0]}),last:cF(function(e,c8,c7){return[c8-1]}),eq:cF(function(e,c8,c7){return[c7<0?c7+c8:c7]}),even:cF(function(e,c9,c8){for(var c7=0;c7=0;){e.push(c7)}return e}),gt:cF(function(e,c9,c8){for(var c7=c8<0?c8+c9:c8;++c71?function(da,c9,c7){var c8=e.length;while(c8--){if(!e[c8](da,c9,c7)){return false}}return true}:e[0]}function cv(e,c7,c8,c9,dc){var da,df=[],db=0,dd=e.length,de=c7!=null;for(;db-1},dg,true),e=[function(dj,di,dh){return(!df&&(dh||di!==cJ))||((c7=di).nodeType?dd(dj,di,dh):de(dj,di,dh))}];for(;c91&&ce(e),c9>1&&dc.slice(0,c9-1).join("").replace(cT,"$1"),da,c90,da=c9.length>0,c7=function(dk,de,dj,di,dr){var df,dg,dl,dq=[],dp=0,dh="0",db=dk&&[],dm=dr!=null,dn=cJ,dd=dk||da&&cL.find.TAG("*",dr&&de.parentNode||de),dc=(cr+=dn==null?1:Math.E);if(dm){cJ=de!==b8&&de;cX=c7.el}for(;(df=dd[dh])!=null;dh++){if(da&&df){for(dg=0;(dl=c9[dg]);dg++){if(dl(df,de,dj)){di.push(df);break}}if(dm){cr=dc;cX=++c7.el}}if(e){if((df=!dl&&df)){dp--}if(dk){db.push(df)}}}dp+=dh;if(e&&dh!==dp){for(dg=0;(dl=c8[dg]);dg++){dl(db,dq,de,dj)}if(dk){if(dp>0){while(dh--){if(!(db[dh]||dq[dh])){dq[dh]=cE.call(di)}}}dq=cv(dq)}cW.apply(di,dq);if(dm&&!dk&&dq.length>0&&(dp+c8.length)>1){cQ.uniqueSort(di)}}if(dm){cr=dc;cJ=dn}return db};c7.el=0;return e?c1(c7):c7}cd=cQ.compile=function(e,db){var c8,c7=[],da=[],c9=cn[cZ][e];if(!c9){if(!db){db=b1(e)}c8=db.length;while(c8--){c9=cx(db[c8]);if(c9[cZ]){c7.push(c9)}else{da.push(c9)}}c9=cn(e,b6(da,c7))}return c9};function cp(c7,db,da,c8){var c9=0,e=db.length;for(;c92&&(c7=dh[0]).type==="ID"&&e.nodeType===9&&!dd&&cL.relative[dh[1].type]){e=cL.find.ID(c7.matches[0].replace(ct,""),e,dd)[0];if(!e){return da}c8=c8.slice(dh.shift().length)}for(db=cG.POS.test(c8)?-1:dh.length-1;db>=0;db--){c7=dh[db];if(cL.relative[(dg=c7.type)]){break}if((df=cL.find[dg])){if((de=df(c7.matches[0].replace(ct,""),cR.test(dh[0].type)&&e.parentNode||e,dd))){dh.splice(db,1);c8=de.length&&dh.join("");if(!c8){cW.apply(da,cl.call(de,0));return da}break}}}}}cd(c8,dc)(de,e,dd,da,cR.test(c8));return da}if(b8.querySelectorAll){(function(){var db,dc=cY,da=/'|\\/g,c8=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,c7=[":focus"],e=[":active",":focus"],c9=cb.matchesSelector||cb.mozMatchesSelector||cb.webkitMatchesSelector||cb.oMatchesSelector||cb.msMatchesSelector;cK(function(dd){dd.innerHTML="";if(!dd.querySelectorAll("[selected]").length){c7.push("\\["+cy+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!dd.querySelectorAll(":checked").length){c7.push(":checked")}});cK(function(dd){dd.innerHTML="

";if(dd.querySelectorAll("[test^='']").length){c7.push("[*^$]="+cy+"*(?:\"\"|'')")}dd.innerHTML="";if(!dd.querySelectorAll(":enabled").length){c7.push(":enabled",":disabled")}});c7=new RegExp(c7.join("|"));cY=function(dj,de,dl,dp,dn){if(!dp&&!dn&&(!c7||!c7.test(dj))){var dh,dm,dg=true,dd=cZ,df=de,dk=de.nodeType===9&&dj;if(de.nodeType===1&&de.nodeName.toLowerCase()!=="object"){dh=b1(dj);if((dg=de.getAttribute("id"))){dd=dg.replace(da,"\$&")}else{de.setAttribute("id",dd)}dd="[id='"+dd+"'] ";dm=dh.length;while(dm--){dh[dm]=dd+dh[dm].join("")}df=cR.test(dj)&&de.parentNode||de;dk=dh.join(",")}if(dk){try{cW.apply(dl,cl.call(df.querySelectorAll(dk),0));return dl}catch(di){}finally{if(!dg){de.removeAttribute("id")}}}}return dc(dj,de,dl,dp,dn)};if(c9){cK(function(de){db=c9.call(de,"div");try{c9.call(de,"[test!='']:sizzle");e.push("!=",c6)}catch(dd){}});e=new RegExp(e.join("|"));cQ.matchesSelector=function(de,dg){dg=dg.replace(c8,"='$1']");if(!cm(de)&&!e.test(dg)&&(!c7||!c7.test(dg))){try{var dd=c9.call(de,dg);if(dd||db||de.document&&de.document.nodeType!==11){return dd}}catch(df){}}return cQ(dg,null,null,[de]).length>0}}})()}cL.pseudos.nth=cL.pseudos.eq;function cj(){}cL.filters=cj.prototype=cL.pseudos;cL.setFilters=new cj();cQ.attr=bG.attr;bG.find=cQ;bG.expr=cQ.selectors;bG.expr[":"]=bG.expr.pseudos;bG.unique=cQ.uniqueSort;bG.text=cQ.getText;bG.isXMLDoc=cQ.isXML;bG.contains=cQ.contains})(a2);var ag=/Until$/,bq=/^(?:parents|prev(?:Until|All))/,al=/^.[^:#\[\.,]*$/,y=bG.expr.match.needsContext,bu={children:true,contents:true,next:true,prev:true};bG.fn.extend({find:function(e){var b2,bZ,b4,b5,b3,b1,b0=this;if(typeof e!=="string"){return bG(e).filter(function(){for(b2=0,bZ=b0.length;b20){for(b5=b4;b5=0:bG.filter(e,this).length>0:this.filter(e).length>0)},closest:function(b2,b1){var b3,b0=0,e=this.length,bZ=[],b4=y.test(b2)||typeof b2!=="string"?bG(b2,b1||this.context):0;for(;b0-1:bG.find.matchesSelector(b3,b2)){bZ.push(b3);break}b3=b3.parentNode}}bZ=bZ.length>1?bG.unique(bZ):bZ;return this.pushStack(bZ,"closest",b2)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return bG.inArray(this[0],bG(e))}return bG.inArray(e.jquery?e[0]:e,this)},add:function(e,bZ){var b1=typeof e==="string"?bG(e,bZ):bG.makeArray(e&&e.nodeType?[e]:e),b0=bG.merge(this.get(),b1);return this.pushStack(aR(b1[0])||aR(b0[0])?b0:bG.unique(b0))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bG.fn.andSelf=bG.fn.addBack;function aR(e){return !e||!e.parentNode||e.parentNode.nodeType===11}function aY(bZ,e){do{bZ=bZ[e]}while(bZ&&bZ.nodeType!==1);return bZ}bG.each({parent:function(bZ){var e=bZ.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bG.dir(e,"parentNode")},parentsUntil:function(bZ,e,b0){return bG.dir(bZ,"parentNode",b0)},next:function(e){return aY(e,"nextSibling")},prev:function(e){return aY(e,"previousSibling")},nextAll:function(e){return bG.dir(e,"nextSibling")},prevAll:function(e){return bG.dir(e,"previousSibling")},nextUntil:function(bZ,e,b0){return bG.dir(bZ,"nextSibling",b0)},prevUntil:function(bZ,e,b0){return bG.dir(bZ,"previousSibling",b0)},siblings:function(e){return bG.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bG.sibling(e.firstChild)},contents:function(e){return bG.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bG.merge([],e.childNodes)}},function(e,bZ){bG.fn[e]=function(b2,b0){var b1=bG.map(this,bZ,b2);if(!ag.test(e)){b0=b2}if(b0&&typeof b0==="string"){b1=bG.filter(b0,b1)}b1=this.length>1&&!bu[e]?bG.unique(b1):b1;if(this.length>1&&bq.test(e)){b1=b1.reverse()}return this.pushStack(b1,e,a4.call(arguments).join(","))}});bG.extend({filter:function(b0,e,bZ){if(bZ){b0=":not("+b0+")"}return e.length===1?bG.find.matchesSelector(e[0],b0)?[e[0]]:[]:bG.find.matches(b0,e)},dir:function(b0,bZ,b2){var e=[],b1=b0[bZ];while(b1&&b1.nodeType!==9&&(b2===aB||b1.nodeType!==1||!bG(b1).is(b2))){if(b1.nodeType===1){e.push(b1)}b1=b1[bZ]}return e},sibling:function(b0,bZ){var e=[];for(;b0;b0=b0.nextSibling){if(b0.nodeType===1&&b0!==bZ){e.push(b0)}}return e}});function aM(b1,b0,e){b0=b0||0;if(bG.isFunction(b0)){return bG.grep(b1,function(b3,b2){var b4=!!b0.call(b3,b2,b3);return b4===e})}else{if(b0.nodeType){return bG.grep(b1,function(b3,b2){return(b3===b0)===e})}else{if(typeof b0==="string"){var bZ=bG.grep(b1,function(b2){return b2.nodeType===1});if(al.test(b0)){return bG.filter(b0,bZ,!e)}else{b0=bG.filter(b0,bZ)}}}}return bG.grep(b1,function(b3,b2){return(bG.inArray(b3,b0)>=0)===e})}function A(e){var b0=c.split("|"),bZ=e.createDocumentFragment();if(bZ.createElement){while(b0.length){bZ.createElement(b0.pop())}}return bZ}var c="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",av=/ jQuery\d+="(?:null|\d+)"/g,bY=/^\s+/,ay=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,p=/<([\w:]+)/,bT=/]","i"),aE=/^(?:checkbox|radio)$/,bR=/checked\s*(?:[^=]|=\s*.checked.)/i,bw=/\/(java|ecma)script/i,aH=/^\s*\s*$/g,T={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},aQ=A(o),l=aQ.appendChild(o.createElement("div"));T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;if(!bG.support.htmlSerialize){T._default=[1,"X
","
"]}bG.fn.extend({text:function(e){return bG.access(this,function(bZ){return bZ===aB?bG.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(bZ))},null,e,arguments.length)},wrapAll:function(e){if(bG.isFunction(e)){return this.each(function(b0){bG(this).wrapAll(e.call(this,b0))})}if(this[0]){var bZ=bG(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bZ.insertBefore(this[0])}bZ.map(function(){var b0=this;while(b0.firstChild&&b0.firstChild.nodeType===1){b0=b0.firstChild}return b0}).append(this)}return this},wrapInner:function(e){if(bG.isFunction(e)){return this.each(function(bZ){bG(this).wrapInner(e.call(this,bZ))})}return this.each(function(){var bZ=bG(this),b0=bZ.contents();if(b0.length){b0.wrapAll(e)}else{bZ.append(e)}})},wrap:function(e){var bZ=bG.isFunction(e);return this.each(function(b0){bG(this).wrapAll(bZ?e.call(this,b0):e)})},unwrap:function(){return this.parent().each(function(){if(!bG.nodeName(this,"body")){bG(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.insertBefore(e,this.firstChild)}})},before:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(e,this),"before",this.selector)}},after:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this.nextSibling)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(this,e),"after",this.selector)}},remove:function(e,b1){var b0,bZ=0;for(;(b0=this[bZ])!=null;bZ++){if(!e||bG.filter(e,[b0]).length){if(!b1&&b0.nodeType===1){bG.cleanData(b0.getElementsByTagName("*"));bG.cleanData([b0])}if(b0.parentNode){b0.parentNode.removeChild(b0)}}}return this},empty:function(){var bZ,e=0;for(;(bZ=this[e])!=null;e++){if(bZ.nodeType===1){bG.cleanData(bZ.getElementsByTagName("*"))}while(bZ.firstChild){bZ.removeChild(bZ.firstChild)}}return this},clone:function(bZ,e){bZ=bZ==null?false:bZ;e=e==null?bZ:e;return this.map(function(){return bG.clone(this,bZ,e)})},html:function(e){return bG.access(this,function(b2){var b1=this[0]||{},b0=0,bZ=this.length;if(b2===aB){return b1.nodeType===1?b1.innerHTML.replace(av,""):aB}if(typeof b2==="string"&&!aj.test(b2)&&(bG.support.htmlSerialize||!K.test(b2))&&(bG.support.leadingWhitespace||!bY.test(b2))&&!T[(p.exec(b2)||["",""])[1].toLowerCase()]){b2=b2.replace(ay,"<$1>");try{for(;b01&&typeof b5==="string"&&bR.test(b5)){return this.each(function(){bG(this).domManip(b4,b8,b7)})}if(bG.isFunction(b5)){return this.each(function(ca){var b9=bG(this);b4[0]=b5.call(this,ca,b8?b9.html():aB);b9.domManip(b4,b8,b7)})}if(this[0]){b0=bG.buildFragment(b4,this,bZ);b3=b0.fragment;b2=b3.firstChild;if(b3.childNodes.length===1){b3=b2}if(b2){b8=b8&&bG.nodeName(b2,"tr");for(b6=b0.cacheable||e-1;b10?this.clone(true):this).get();bG(b6[b4])[bZ](b2);b3=b3.concat(b2)}return this.pushStack(b3,e,b6.selector)}}});function m(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function bS(e){if(aE.test(e.type)){e.defaultChecked=e.checked}}bG.extend({clone:function(b2,b4,b0){var e,bZ,b1,b3;if(bG.support.html5Clone||bG.isXMLDoc(b2)||!K.test("<"+b2.nodeName+">")){b3=b2.cloneNode(true)}else{l.innerHTML=b2.outerHTML;l.removeChild(b3=l.firstChild)}if((!bG.support.noCloneEvent||!bG.support.noCloneChecked)&&(b2.nodeType===1||b2.nodeType===11)&&!bG.isXMLDoc(b2)){F(b2,b3);e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){if(bZ[b1]){F(e[b1],bZ[b1])}}}if(b4){ao(b2,b3);if(b0){e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){ao(e[b1],bZ[b1])}}}e=bZ=null;return b3},clean:function(cb,b0,e,b1){var b8,b7,ca,cf,b4,ce,b5,b2,bZ,b9,cd,b6,b3=b0===o&&aQ,cc=[];if(!b0||typeof b0.createDocumentFragment==="undefined"){b0=o}for(b8=0;(ca=cb[b8])!=null;b8++){if(typeof ca==="number"){ca+=""}if(!ca){continue}if(typeof ca==="string"){if(!J.test(ca)){ca=b0.createTextNode(ca)}else{b3=b3||A(b0);b5=b0.createElement("div");b3.appendChild(b5);ca=ca.replace(ay,"<$1>");cf=(p.exec(ca)||["",""])[1].toLowerCase();b4=T[cf]||T._default;ce=b4[0];b5.innerHTML=b4[1]+ca+b4[2];while(ce--){b5=b5.lastChild}if(!bG.support.tbody){b2=bT.test(ca);bZ=cf==="table"&&!b2?b5.firstChild&&b5.firstChild.childNodes:b4[1]===""&&!b2?b5.childNodes:[];for(b7=bZ.length-1;b7>=0;--b7){if(bG.nodeName(bZ[b7],"tbody")&&!bZ[b7].childNodes.length){bZ[b7].parentNode.removeChild(bZ[b7])}}}if(!bG.support.leadingWhitespace&&bY.test(ca)){b5.insertBefore(b0.createTextNode(bY.exec(ca)[0]),b5.firstChild)}ca=b5.childNodes;b5.parentNode.removeChild(b5)}}if(ca.nodeType){cc.push(ca)}else{bG.merge(cc,ca)}}if(b5){ca=b5=b3=null}if(!bG.support.appendChecked){for(b8=0;(ca=cc[b8])!=null;b8++){if(bG.nodeName(ca,"input")){bS(ca)}else{if(typeof ca.getElementsByTagName!=="undefined"){bG.grep(ca.getElementsByTagName("input"),bS)}}}}if(e){cd=function(cg){if(!cg.type||bw.test(cg.type)){return b1?b1.push(cg.parentNode?cg.parentNode.removeChild(cg):cg):e.appendChild(cg)}};for(b8=0;(ca=cc[b8])!=null;b8++){if(!(bG.nodeName(ca,"script")&&cd(ca))){e.appendChild(ca);if(typeof ca.getElementsByTagName!=="undefined"){b6=bG.grep(bG.merge([],ca.getElementsByTagName("script")),cd);cc.splice.apply(cc,[b8+1,0].concat(b6));b8+=b6.length}}}}return cc},cleanData:function(bZ,b7){var b2,b0,b1,b6,b3=0,b8=bG.expando,e=bG.cache,b4=bG.support.deleteExpando,b5=bG.event.special;for(;(b1=bZ[b3])!=null;b3++){if(b7||bG.acceptData(b1)){b0=b1[b8];b2=b0&&e[b0];if(b2){if(b2.events){for(b6 in b2.events){if(b5[b6]){bG.event.remove(b1,b6)}else{bG.removeEvent(b1,b6,b2.handle)}}}if(e[b0]){delete e[b0];if(b4){delete b1[b8]}else{if(b1.removeAttribute){b1.removeAttribute(b8)}else{b1[b8]=null}}bG.deletedIds.push(b0)}}}}}});(function(){var e,bZ;bG.uaMatch=function(b1){b1=b1.toLowerCase();var b0=/(chrome)[ \/]([\w.]+)/.exec(b1)||/(webkit)[ \/]([\w.]+)/.exec(b1)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b1)||/(msie) ([\w.]+)/.exec(b1)||b1.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}};e=bG.uaMatch(d.userAgent);bZ={};if(e.browser){bZ[e.browser]=true;bZ.version=e.version}if(bZ.chrome){bZ.webkit=true}else{if(bZ.webkit){bZ.safari=true}}bG.browser=bZ;bG.sub=function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bG.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bG&&!(b4 instanceof b0)){b4=b0(b4)}return bG.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(o);return b0}})();var E,az,aW,be=/alpha\([^)]*\)/i,aS=/opacity=([^)]*)/,bk=/^(top|right|bottom|left)$/,G=/^(none|table(?!-c[ea]).+)/,aZ=/^margin/,a8=new RegExp("^("+bx+")(.*)$","i"),W=new RegExp("^("+bx+")(?!px)[a-z%]+$","i"),S=new RegExp("^([-+])=("+bx+")","i"),bh={},a9={position:"absolute",visibility:"hidden",display:"block"},bA={letterSpacing:0,fontWeight:400},bQ=["Top","Right","Bottom","Left"],ar=["Webkit","O","Moz","ms"],aJ=bG.fn.toggle;function b(b1,bZ){if(bZ in b1){return bZ}var b2=bZ.charAt(0).toUpperCase()+bZ.slice(1),e=bZ,b0=ar.length;while(b0--){bZ=ar[b0]+b2;if(bZ in b1){return bZ}}return e}function Q(bZ,e){bZ=e||bZ;return bG.css(bZ,"display")==="none"||!bG.contains(bZ.ownerDocument,bZ)}function s(b3,e){var b2,b4,bZ=[],b0=0,b1=b3.length;for(;b01)},show:function(){return s(this,true)},hide:function(){return s(this)},toggle:function(b0,bZ){var e=typeof b0==="boolean";if(bG.isFunction(b0)&&bG.isFunction(bZ)){return aJ.apply(this,arguments)}return this.each(function(){if(e?b0:Q(this)){bG(this).show()}else{bG(this).hide()}})}});bG.extend({cssHooks:{opacity:{get:function(b0,bZ){if(bZ){var e=E(b0,"opacity");return e===""?"1":e}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bG.support.cssFloat?"cssFloat":"styleFloat"},style:function(b1,b0,b7,b2){if(!b1||b1.nodeType===3||b1.nodeType===8||!b1.style){return}var b5,b6,b8,b3=bG.camelCase(b0),bZ=b1.style;b0=bG.cssProps[b3]||(bG.cssProps[b3]=b(bZ,b3));b8=bG.cssHooks[b0]||bG.cssHooks[b3];if(b7!==aB){b6=typeof b7;if(b6==="string"&&(b5=S.exec(b7))){b7=(b5[1]+1)*b5[2]+parseFloat(bG.css(b1,b0));b6="number"}if(b7==null||b6==="number"&&isNaN(b7)){return}if(b6==="number"&&!bG.cssNumber[b3]){b7+="px"}if(!b8||!("set" in b8)||(b7=b8.set(b1,b7,b2))!==aB){try{bZ[b0]=b7}catch(b4){}}}else{if(b8&&"get" in b8&&(b5=b8.get(b1,false,b2))!==aB){return b5}return bZ[b0]}},css:function(b4,b2,b3,bZ){var b5,b1,e,b0=bG.camelCase(b2);b2=bG.cssProps[b0]||(bG.cssProps[b0]=b(b4.style,b0));e=bG.cssHooks[b2]||bG.cssHooks[b0];if(e&&"get" in e){b5=e.get(b4,true,bZ)}if(b5===aB){b5=E(b4,b2)}if(b5==="normal"&&b2 in bA){b5=bA[b2]}if(b3||bZ!==aB){b1=parseFloat(b5);return b3||bG.isNumeric(b1)?b1||0:b5}return b5},swap:function(b2,b1,b3){var b0,bZ,e={};for(bZ in b1){e[bZ]=b2.style[bZ];b2.style[bZ]=b1[bZ]}b0=b3.call(b2);for(bZ in b1){b2.style[bZ]=e[bZ]}return b0}});if(a2.getComputedStyle){E=function(b5,bZ){var e,b2,b1,b4,b3=a2.getComputedStyle(b5,null),b0=b5.style;if(b3){e=b3[bZ];if(e===""&&!bG.contains(b5.ownerDocument,b5)){e=bG.style(b5,bZ)}if(W.test(e)&&aZ.test(bZ)){b2=b0.width;b1=b0.minWidth;b4=b0.maxWidth;b0.minWidth=b0.maxWidth=b0.width=e;e=b3.width;b0.width=b2;b0.minWidth=b1;b0.maxWidth=b4}}return e}}else{if(o.documentElement.currentStyle){E=function(b2,b0){var b3,e,bZ=b2.currentStyle&&b2.currentStyle[b0],b1=b2.style;if(bZ==null&&b1&&b1[b0]){bZ=b1[b0]}if(W.test(bZ)&&!bk.test(b0)){b3=b1.left;e=b2.runtimeStyle&&b2.runtimeStyle.left;if(e){b2.runtimeStyle.left=b2.currentStyle.left}b1.left=b0==="fontSize"?"1em":bZ;bZ=b1.pixelLeft+"px";b1.left=b3;if(e){b2.runtimeStyle.left=e}}return bZ===""?"auto":bZ}}}function aG(e,b0,b1){var bZ=a8.exec(b0);return bZ?Math.max(0,bZ[1]-(b1||0))+(bZ[2]||"px"):b0}function at(b1,bZ,e,b3){var b0=e===(b3?"border":"content")?4:bZ==="width"?1:0,b2=0;for(;b0<4;b0+=2){if(e==="margin"){b2+=bG.css(b1,e+bQ[b0],true)}if(b3){if(e==="content"){b2-=parseFloat(E(b1,"padding"+bQ[b0]))||0}if(e!=="margin"){b2-=parseFloat(E(b1,"border"+bQ[b0]+"Width"))||0}}else{b2+=parseFloat(E(b1,"padding"+bQ[b0]))||0;if(e!=="padding"){b2+=parseFloat(E(b1,"border"+bQ[b0]+"Width"))||0}}}return b2}function u(b1,bZ,e){var b2=bZ==="width"?b1.offsetWidth:b1.offsetHeight,b0=true,b3=bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box";if(b2<=0||b2==null){b2=E(b1,bZ);if(b2<0||b2==null){b2=b1.style[bZ]}if(W.test(b2)){return b2}b0=b3&&(bG.support.boxSizingReliable||b2===b1.style[bZ]);b2=parseFloat(b2)||0}return(b2+at(b1,bZ,e||(b3?"border":"content"),b0))+"px"}function bC(b0){if(bh[b0]){return bh[b0]}var e=bG("<"+b0+">").appendTo(o.body),bZ=e.css("display");e.remove();if(bZ==="none"||bZ===""){az=o.body.appendChild(az||bG.extend(o.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!aW||!az.createElement){aW=(az.contentWindow||az.contentDocument).document;aW.write("");aW.close()}e=aW.body.appendChild(aW.createElement(b0));bZ=E(e,"display");o.body.removeChild(az)}bh[b0]=bZ;return bZ}bG.each(["height","width"],function(bZ,e){bG.cssHooks[e]={get:function(b2,b1,b0){if(b1){if(b2.offsetWidth===0&&G.test(E(b2,"display"))){return bG.swap(b2,a9,function(){return u(b2,e,b0)})}else{return u(b2,e,b0)}}},set:function(b1,b2,b0){return aG(b1,b2,b0?at(b1,e,b0,bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box"):0)}}});if(!bG.support.opacity){bG.cssHooks.opacity={get:function(bZ,e){return aS.test((e&&bZ.currentStyle?bZ.currentStyle.filter:bZ.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":e?"1":""},set:function(b2,b3){var b1=b2.style,bZ=b2.currentStyle,e=bG.isNumeric(b3)?"alpha(opacity="+b3*100+")":"",b0=bZ&&bZ.filter||b1.filter||"";b1.zoom=1;if(b3>=1&&bG.trim(b0.replace(be,""))===""&&b1.removeAttribute){b1.removeAttribute("filter");if(bZ&&!bZ.filter){return}}b1.filter=be.test(b0)?b0.replace(be,e):b0+" "+e}}}bG(function(){if(!bG.support.reliableMarginRight){bG.cssHooks.marginRight={get:function(bZ,e){return bG.swap(bZ,{display:"inline-block"},function(){if(e){return E(bZ,"marginRight")}})}}}if(!bG.support.pixelPosition&&bG.fn.position){bG.each(["top","left"],function(e,bZ){bG.cssHooks[bZ]={get:function(b2,b1){if(b1){var b0=E(b2,bZ);return W.test(b0)?bG(b2).position()[bZ]+"px":b0}}}})}});if(bG.expr&&bG.expr.filters){bG.expr.filters.hidden=function(e){return(e.offsetWidth===0&&e.offsetHeight===0)||(!bG.support.reliableHiddenOffsets&&((e.style&&e.style.display)||E(e,"display"))==="none")};bG.expr.filters.visible=function(e){return !bG.expr.filters.hidden(e)}}bG.each({margin:"",padding:"",border:"Width"},function(e,bZ){bG.cssHooks[e+bZ]={expand:function(b2){var b1,b3=typeof b2==="string"?b2.split(" "):[b2],b0={};for(b1=0;b1<4;b1++){b0[e+bQ[b1]+bZ]=b3[b1]||b3[b1-2]||b3[0]}return b0}};if(!aZ.test(e)){bG.cssHooks[e+bZ].set=aG}});var bs=/%20/g,aP=/\[\]$/,U=/\r?\n/g,bz=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aD=/^(?:select|textarea)/i;bG.fn.extend({serialize:function(){return bG.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?bG.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||aD.test(this.nodeName)||bz.test(this.type))}).map(function(e,bZ){var b0=bG(this).val();return b0==null?null:bG.isArray(b0)?bG.map(b0,function(b2,b1){return{name:bZ.name,value:b2.replace(U,"\r\n")}}):{name:bZ.name,value:b0.replace(U,"\r\n")}}).get()}});bG.param=function(e,b0){var b1,bZ=[],b2=function(b3,b4){b4=bG.isFunction(b4)?b4():(b4==null?"":b4);bZ[bZ.length]=encodeURIComponent(b3)+"="+encodeURIComponent(b4)};if(b0===aB){b0=bG.ajaxSettings&&bG.ajaxSettings.traditional}if(bG.isArray(e)||(e.jquery&&!bG.isPlainObject(e))){bG.each(e,function(){b2(this.name,this.value)})}else{for(b1 in e){k(b1,e[b1],b0,b2)}}return bZ.join("&").replace(bs,"+")};function k(b0,b2,bZ,b1){var e;if(bG.isArray(b2)){bG.each(b2,function(b4,b3){if(bZ||aP.test(b0)){b1(b0,b3)}else{k(b0+"["+(typeof b3==="object"?b4:"")+"]",b3,bZ,b1)}})}else{if(!bZ&&bG.type(b2)==="object"){for(e in b2){k(b0+"["+e+"]",b2[e],bZ,b1)}}else{b1(b0,b2)}}}var bX,Y,an=/#.*$/,ad=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,B=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,r=/^(?:GET|HEAD)$/,aC=/^\/\//,bN=/\?/,g=/)<[^<]*)*<\/script>/gi,P=/([?&])_=[^&]*/,aT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,bW=bG.fn.load,v={},a6={},aX=["*/"]+["*"];try{Y=aI.href}catch(bd){Y=o.createElement("a");Y.href="";Y=Y.href}bX=aT.exec(Y.toLowerCase())||[];function bI(e){return function(b2,b4){if(typeof b2!=="string"){b4=b2;b2="*"}var bZ,b5,b6,b1=b2.toLowerCase().split(aV),b0=0,b3=b1.length;if(bG.isFunction(b4)){for(;b0=0){e=b1.slice(b3,b1.length);b1=b1.slice(0,b3)}if(bG.isFunction(b4)){b5=b4;b4=aB}else{if(b4&&typeof b4==="object"){b2="POST"}}bG.ajax({url:b1,type:b2,dataType:"html",data:b4,complete:function(b7,b6){if(b5){bZ.each(b5,b0||[b7.responseText,b6,b7])}}}).done(function(b6){b0=arguments;bZ.html(e?bG("
").append(b6.replace(g,"")).find(e):b6)});return this};bG.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bZ){bG.fn[bZ]=function(b0){return this.on(bZ,b0)}});bG.each(["get","post"],function(e,bZ){bG[bZ]=function(b0,b2,b3,b1){if(bG.isFunction(b2)){b1=b1||b3;b3=b2;b2=aB}return bG.ajax({type:bZ,url:b0,data:b2,success:b3,dataType:b1})}});bG.extend({getScript:function(e,bZ){return bG.get(e,aB,bZ,"script")},getJSON:function(e,bZ,b0){return bG.get(e,bZ,b0,"json")},ajaxSetup:function(bZ,e){if(e){t(bZ,bG.ajaxSettings)}else{e=bZ;bZ=bG.ajaxSettings}t(bZ,e);return bZ},ajaxSettings:{url:Y,isLocal:B.test(bX[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a2.String,"text html":true,"text json":bG.parseJSON,"text xml":bG.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:bI(v),ajaxTransport:bI(a6),ajax:function(b4,b1){if(typeof b4==="object"){b1=b4;b4=aB}b1=b1||{};var b7,cl,b2,cg,b9,cd,b0,cf,b8=bG.ajaxSetup({},b1),cn=b8.context||b8,cb=cn!==b8&&(cn.nodeType||cn instanceof bG)?bG(cn):bG.event,cm=bG.Deferred(),ci=bG.Callbacks("once memory"),b5=b8.statusCode||{},cc={},cj={},b3=0,b6="canceled",ce={readyState:0,setRequestHeader:function(co,cp){if(!b3){var e=co.toLowerCase();co=cj[e]=cj[e]||co;cc[co]=cp}return this},getAllResponseHeaders:function(){return b3===2?cl:null},getResponseHeader:function(co){var e;if(b3===2){if(!b2){b2={};while((e=ad.exec(cl))){b2[e[1].toLowerCase()]=e[2]}}e=b2[co.toLowerCase()]}return e===aB?null:e},overrideMimeType:function(e){if(!b3){b8.mimeType=e}return this},abort:function(e){e=e||b6;if(cg){cg.abort(e)}ca(0,e);return this}};function ca(cs,co,ct,cq){var e,cw,cu,cr,cv,cp=co;if(b3===2){return}b3=2;if(b9){clearTimeout(b9)}cg=aB;cl=cq||"";ce.readyState=cs>0?4:0;if(ct){cr=h(b8,ce,ct)}if(cs>=200&&cs<300||cs===304){if(b8.ifModified){cv=ce.getResponseHeader("Last-Modified");if(cv){bG.lastModified[b7]=cv}cv=ce.getResponseHeader("Etag");if(cv){bG.etag[b7]=cv}}if(cs===304){cp="notmodified";e=true}else{e=ae(b8,cr);cp=e.state;cw=e.data;cu=e.error;e=!cu}}else{cu=cp;if(!cp||cs){cp="error";if(cs<0){cs=0}}}ce.status=cs;ce.statusText=(co||cp)+"";if(e){cm.resolveWith(cn,[cw,cp,ce])}else{cm.rejectWith(cn,[ce,cp,cu])}ce.statusCode(b5);b5=aB;if(b0){cb.trigger("ajax"+(e?"Success":"Error"),[ce,b8,e?cw:cu])}ci.fireWith(cn,[ce,cp]);if(b0){cb.trigger("ajaxComplete",[ce,b8]);if(!(--bG.active)){bG.event.trigger("ajaxStop")}}}cm.promise(ce);ce.success=ce.done;ce.error=ce.fail;ce.complete=ci.add;ce.statusCode=function(co){if(co){var e;if(b3<2){for(e in co){b5[e]=[b5[e],co[e]]}}else{e=co[ce.status];ce.always(e)}}return this};b8.url=((b4||b8.url)+"").replace(an,"").replace(aC,bX[1]+"//");b8.dataTypes=bG.trim(b8.dataType||"*").toLowerCase().split(aV);if(b8.crossDomain==null){cd=aT.exec(b8.url.toLowerCase())||false;b8.crossDomain=cd&&(cd.join(":")+(cd[3]?"":cd[1]==="http:"?80:443))!==(bX.join(":")+(bX[3]?"":bX[1]==="http:"?80:443))}if(b8.data&&b8.processData&&typeof b8.data!=="string"){b8.data=bG.param(b8.data,b8.traditional)}q(v,b8,b1,ce);if(b3===2){return ce}b0=b8.global;b8.type=b8.type.toUpperCase();b8.hasContent=!r.test(b8.type);if(b0&&bG.active++===0){bG.event.trigger("ajaxStart")}if(!b8.hasContent){if(b8.data){b8.url+=(bN.test(b8.url)?"&":"?")+b8.data;delete b8.data}b7=b8.url;if(b8.cache===false){var bZ=bG.now(),ck=b8.url.replace(P,"$1_="+bZ);b8.url=ck+((ck===b8.url)?(bN.test(b8.url)?"&":"?")+"_="+bZ:"")}}if(b8.data&&b8.hasContent&&b8.contentType!==false||b1.contentType){ce.setRequestHeader("Content-Type",b8.contentType)}if(b8.ifModified){b7=b7||b8.url;if(bG.lastModified[b7]){ce.setRequestHeader("If-Modified-Since",bG.lastModified[b7])}if(bG.etag[b7]){ce.setRequestHeader("If-None-Match",bG.etag[b7])}}ce.setRequestHeader("Accept",b8.dataTypes[0]&&b8.accepts[b8.dataTypes[0]]?b8.accepts[b8.dataTypes[0]]+(b8.dataTypes[0]!=="*"?", "+aX+"; q=0.01":""):b8.accepts["*"]);for(cf in b8.headers){ce.setRequestHeader(cf,b8.headers[cf])}if(b8.beforeSend&&(b8.beforeSend.call(cn,ce,b8)===false||b3===2)){return ce.abort()}b6="abort";for(cf in {success:1,error:1,complete:1}){ce[cf](b8[cf])}cg=q(a6,b8,b1,ce);if(!cg){ca(-1,"No Transport")}else{ce.readyState=1;if(b0){cb.trigger("ajaxSend",[ce,b8])}if(b8.async&&b8.timeout>0){b9=setTimeout(function(){ce.abort("timeout")},b8.timeout)}try{b3=1;cg.send(cc,ca)}catch(ch){if(b3<2){ca(-1,ch)}else{throw ch}}}return ce},active:0,lastModified:{},etag:{}});function h(b7,b6,b3){var b2,b4,b1,e,bZ=b7.contents,b5=b7.dataTypes,b0=b7.responseFields;for(b4 in b0){if(b4 in b3){b6[b0[b4]]=b3[b4]}}while(b5[0]==="*"){b5.shift();if(b2===aB){b2=b7.mimeType||b6.getResponseHeader("content-type")}}if(b2){for(b4 in bZ){if(bZ[b4]&&bZ[b4].test(b2)){b5.unshift(b4);break}}}if(b5[0] in b3){b1=b5[0]}else{for(b4 in b3){if(!b5[0]||b7.converters[b4+" "+b5[0]]){b1=b4;break}if(!e){e=b4}}b1=b1||e}if(b1){if(b1!==b5[0]){b5.unshift(b1)}return b3[b1]}}function ae(b9,b1){var b7,bZ,b5,b3,b6=b9.dataTypes.slice(),b0=b6[0],b8={},b2=0;if(b9.dataFilter){b1=b9.dataFilter(b1,b9.dataType)}if(b6[1]){for(b7 in b9.converters){b8[b7.toLowerCase()]=b9.converters[b7]}}for(;(b5=b6[++b2]);){if(b5!=="*"){if(b0!=="*"&&b0!==b5){b7=b8[b0+" "+b5]||b8["* "+b5];if(!b7){for(bZ in b8){b3=bZ.split(" ");if(b3[1]===b5){b7=b8[b0+" "+b3[0]]||b8["* "+b3[0]];if(b7){if(b7===true){b7=b8[bZ]}else{if(b8[bZ]!==true){b5=b3[0];b6.splice(b2--,0,b5)}}break}}}}if(b7!==true){if(b7&&b9["throws"]){b1=b7(b1)}else{try{b1=b7(b1)}catch(b4){return{state:"parsererror",error:b7?b4:"No conversion from "+b0+" to "+b5}}}}}b0=b5}}return{state:"success",data:b1}}var bp=[],aw=/\?/,a5=/(=)\?(?=&|$)|\?\?/,bl=bG.now();bG.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=bp.pop()||(bG.expando+"_"+(bl++));this[e]=true;return e}});bG.ajaxPrefilter("json jsonp",function(b8,b3,b7){var b6,e,b5,b1=b8.data,bZ=b8.url,b0=b8.jsonp!==false,b4=b0&&a5.test(bZ),b2=b0&&!b4&&typeof b1==="string"&&!(b8.contentType||"").indexOf("application/x-www-form-urlencoded")&&a5.test(b1);if(b8.dataTypes[0]==="jsonp"||b4||b2){b6=b8.jsonpCallback=bG.isFunction(b8.jsonpCallback)?b8.jsonpCallback():b8.jsonpCallback;e=a2[b6];if(b4){b8.url=bZ.replace(a5,"$1"+b6)}else{if(b2){b8.data=b1.replace(a5,"$1"+b6)}else{if(b0){b8.url+=(aw.test(bZ)?"&":"?")+b8.jsonp+"="+b6}}}b8.converters["script json"]=function(){if(!b5){bG.error(b6+" was not called")}return b5[0]};b8.dataTypes[0]="json";a2[b6]=function(){b5=arguments};b7.always(function(){a2[b6]=e;if(b8[b6]){b8.jsonpCallback=b3.jsonpCallback;bp.push(b6)}if(b5&&bG.isFunction(e)){e(b5[0])}b5=e=aB});return"script"}});bG.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){bG.globalEval(e);return e}}});bG.ajaxPrefilter("script",function(e){if(e.cache===aB){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});bG.ajaxTransport("script",function(b0){if(b0.crossDomain){var e,bZ=o.head||o.getElementsByTagName("head")[0]||o.documentElement;return{send:function(b1,b2){e=o.createElement("script");e.async="async";if(b0.scriptCharset){e.charset=b0.scriptCharset}e.src=b0.url;e.onload=e.onreadystatechange=function(b4,b3){if(b3||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bZ&&e.parentNode){bZ.removeChild(e)}e=aB;if(!b3){b2(200,"success")}}};bZ.insertBefore(e,bZ.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var ah,aN=a2.ActiveXObject?function(){for(var e in ah){ah[e](0,1)}}:false,au=0;function bB(){try{return new a2.XMLHttpRequest()}catch(bZ){}}function bb(){try{return new a2.ActiveXObject("Microsoft.XMLHTTP")}catch(bZ){}}bG.ajaxSettings.xhr=a2.ActiveXObject?function(){return !this.isLocal&&bB()||bb()}:bB;(function(e){bG.extend(bG.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(bG.ajaxSettings.xhr());if(bG.support.ajax){bG.ajaxTransport(function(e){if(!e.crossDomain||bG.support.cors){var bZ;return{send:function(b5,b0){var b3,b2,b4=e.xhr();if(e.username){b4.open(e.type,e.url,e.async,e.username,e.password)}else{b4.open(e.type,e.url,e.async)}if(e.xhrFields){for(b2 in e.xhrFields){b4[b2]=e.xhrFields[b2]}}if(e.mimeType&&b4.overrideMimeType){b4.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!b5["X-Requested-With"]){b5["X-Requested-With"]="XMLHttpRequest"}try{for(b2 in b5){b4.setRequestHeader(b2,b5[b2])}}catch(b1){}b4.send((e.hasContent&&e.data)||null);bZ=function(ce,b8){var b9,b7,b6,cc,cb;try{if(bZ&&(b8||b4.readyState===4)){bZ=aB;if(b3){b4.onreadystatechange=bG.noop;if(aN){delete ah[b3]}}if(b8){if(b4.readyState!==4){b4.abort()}}else{b9=b4.status;b6=b4.getAllResponseHeaders();cc={};cb=b4.responseXML;if(cb&&cb.documentElement){cc.xml=cb}try{cc.text=b4.responseText}catch(ce){}try{b7=b4.statusText}catch(cd){b7=""}if(!b9&&e.isLocal&&!e.crossDomain){b9=cc.text?200:404}else{if(b9===1223){b9=204}}}}}catch(ca){if(!b8){b0(-1,ca)}}if(cc){b0(b9,b7,cc,b6)}};if(!e.async){bZ()}else{if(b4.readyState===4){setTimeout(bZ,0)}else{b3=++au;if(aN){if(!ah){ah={};bG(a2).unload(aN)}ah[b3]=bZ}b4.onreadystatechange=bZ}}},abort:function(){if(bZ){bZ(0,1)}}}}})}var L,ab,bO=/^(?:toggle|show|hide)$/,bH=new RegExp("^(?:([-+])=|)("+bx+")([a-z%]*)$","i"),bM=/queueHooks$/,ax=[i],a1={"*":[function(e,b5){var b1,b6,b7=this.createTween(e,b5),b2=bH.exec(b5),b3=b7.cur(),bZ=+b3||0,b0=1,b4=20;if(b2){b1=+b2[2];b6=b2[3]||(bG.cssNumber[e]?"":"px");if(b6!=="px"&&bZ){bZ=bG.css(b7.elem,e,true)||b1||1;do{b0=b0||".5";bZ=bZ/b0;bG.style(b7.elem,e,bZ+b6)}while(b0!==(b0=b7.cur()/b3)&&b0!==1&&--b4)}b7.unit=b6;b7.start=bZ;b7.end=b2[1]?bZ+(b2[1]+1)*b1:b1}return b7}]};function bj(){setTimeout(function(){L=aB},0);return(L=bG.now())}function bc(bZ,e){bG.each(e,function(b4,b2){var b3=(a1[b4]||[]).concat(a1["*"]),b0=0,b1=b3.length;for(;b0-1,b7={},b6={},b0,b2;if(b9){b6=b3.position();b0=b6.top;b2=b6.left}else{b0=parseFloat(e)||0;b2=parseFloat(b8)||0}if(bG.isFunction(ca)){ca=ca.call(b1,b4,bZ)}if(ca.top!=null){b7.top=(ca.top-bZ.top)+b0}if(ca.left!=null){b7.left=(ca.left-bZ.left)+b2}if("using" in ca){ca.using.call(b1,b7)}else{b3.css(b7)}}};bG.fn.extend({position:function(){if(!this[0]){return}var b0=this[0],bZ=this.offsetParent(),b1=this.offset(),e=bm.test(bZ[0].nodeName)?{top:0,left:0}:bZ.offset();b1.top-=parseFloat(bG.css(b0,"marginTop"))||0;b1.left-=parseFloat(bG.css(b0,"marginLeft"))||0;e.top+=parseFloat(bG.css(bZ[0],"borderTopWidth"))||0;e.left+=parseFloat(bG.css(bZ[0],"borderLeftWidth"))||0;return{top:b1.top-e.top,left:b1.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.body;while(e&&(!bm.test(e.nodeName)&&bG.css(e,"position")==="static")){e=e.offsetParent}return e||o.body})}});bG.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b0,bZ){var e=/Y/.test(bZ);bG.fn[b0]=function(b1){return bG.access(this,function(b2,b5,b4){var b3=bn(b2);if(b4===aB){return b3?(bZ in b3)?b3[bZ]:b3.document.documentElement[b5]:b2[b5]}if(b3){b3.scrollTo(!e?b4:bG(b3).scrollLeft(),e?b4:bG(b3).scrollTop())}else{b2[b5]=b4}},b0,b1,arguments.length,null)}});function bn(e){return bG.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}bG.each({Height:"height",Width:"width"},function(e,bZ){bG.each({padding:"inner"+e,content:bZ,"":"outer"+e},function(b0,b1){bG.fn[b1]=function(b5,b4){var b3=arguments.length&&(b0||typeof b5!=="boolean"),b2=b0||(b5===true||b4===true?"margin":"border");return bG.access(this,function(b7,b6,b8){var b9;if(bG.isWindow(b7)){return b7.document.documentElement["client"+e]}if(b7.nodeType===9){b9=b7.documentElement;return Math.max(b7.body["scroll"+e],b9["scroll"+e],b7.body["offset"+e],b9["offset"+e],b9["client"+e])}return b8===aB?bG.css(b7,b6,b8,b2):bG.style(b7,b6,b8,b2)},bZ,b3?b5:aB,b3,null)}})});a2.beeAd=a2.$bee=bG;})(window); $bee("body").append( $bee("", { "href" : "http://as.ebz.io/css/api/beeadCommon.css", "rel" : "stylesheet", "media" : "all", "type" : "text/css" }) ); /* BeeAdApi */ (function( $bee) { var declarationClass = {}, singleInstances = {}; var BeeAdApi = function(){}; BeeAdApi.prototype = { /** * Ajoute toutes les déclarations de classes * Crée une nouvelle instance pour chaque class qui ne doit avoir une seule instance * @param name * @param declClass * @param isSingle */ addDeclaration : function(name, declClass, isSingle){ declarationClass[name] = declClass; if(isSingle && declClass.prototype == undefined) { singleInstances[name] = declClass; }else if(isSingle){ singleInstances[name] = true; } }, /** * Retourne la class 'name' donnée en paramètre, si elle existe * @param name * @returns */ getDeclaration : function(name){ if(declarationClass[name] == undefined){ //singleInstances[this.logger].debug( name + " non déclaré dans beeAdApi!"); if(window.console) console.warn("## classe " + name + " non declare dans beeAdApi!"); return {}; } return declarationClass[name]; }, /** * Renvoie une instance de 'name' donnée en paramètre. * @param name * @returns */ getInstance : function(name){ if(singleInstances[name] != undefined){ if(typeof(singleInstances[name]) == "boolean"){ singleInstances[name] = new declarationClass[name](); } return singleInstances[name]; } else if(declarationClass[name] != undefined) { return new declarationClass[name](); } if(window.console) console.warn( "## Instance demandée n'existe pas! " + name); return {}; }, heriter : function(destination, source){ for (var element in source) { destination[element] = source[element]; } }, /* Globals variable */ isDragging : false, /******* common *******/ logger : "logger", utils : "utils", player : "player", playerHtml5 : "playerHtml5", playerHtml5WebIpad : "playerHtml5WebIpad", loaderApiYoutube : "loaderApiYoutube", playerYoutube : "playerYoutube", playerYoutubeWebIpad : "playerYoutubeWebIpad", playerYoutubeWebAndroid : "playerYoutubeWebAndroid", playerYoutubeWebAndroid4 : "playerYoutubeWebAndroid4", mobManualFullScreen : "mobManualFullScreen", commonVars : "commonVars", abstractMain : "abstractMain", mobileAbstractLayer : "mobileAbstractLayer", mobileWebLayer : "mobileWebLayer", mobileLayer : "mobileLayer", sdkCameraController : "sdkCameraController", soundRecordController : "soundRecordController", sdkLocation : "sdkLocation", ebzSDK : "ebzSDK", fullScreenApi : "fullScreenApi", canvasLoader : "canvasLoader", // tracker tracker : "tracker", trackerBase : "trackerBase", trackerWeb : "trackerWeb", trackerSDK : "trackerSDK", /******* tab mobile *******/ templateShareBtn : "templateShareBtn", staticVars : "staticVars", // html5 layer playerHtml5Layer : "playerHtml5Layer", playerHtml5LayerBase : "playerHtml5LayerBase", // website layer openWebSiteLayer : "openWebSiteLayer", openWebSiteLayerBase : "openWebSiteLayerBase", openWebSiteLayerWeb : "openWebSiteLayerWeb", openWebSiteLayerSDKIphone : "openWebSiteLayerSDKIphone", openWebSiteLayerSDKTablet : "openWebSiteLayerSDKTablet", // youtube layer youtubeLayer : "youtubeLayer", youtubeLayerBase : "youtubeLayerBase", youtubeLayerWeb : "youtubeLayerWeb", // initTabLayer initTabLayer : "initTabLayer", initTabLayerBase : "initTabLayerBase", initTabLayerWeb : "initTabLayerWeb", initTabLayerWebIphone : "initTabLayerWebIphone", initTabLayerSDKphone : "initTabLayerSDKphone", initTabLayerWebTablet : "initTabLayerWebTablet", // openTabLayer openTabLayer : "openTabLayer", openTabLayerBase : "openTabLayerBase", openTabLayerWebIphone : "openTabLayerWebIphone", openTabLayerSDKIphone : "openTabLayerSDKIphone", openTabLayerSDKTablet : "openTabLayerSDKTablet", // mTabManager mTabManager : "mTabManager", mTabManagerBase : "mTabManagerBase", mTabManagerWebIphone : "mTabManagerWebIphone", mTabManagerSDKIphone : "mTabManagerSDKIphone", mTabManagerWeb : "mTabManagerWeb", mTabManagerMraidIphone : "mTabManagerMraidIphone", mTabManagerMraidTablet : "mTabManagerMraidTablet", // mainTabCrea mainTabCrea : "mainTabCrea", mainTabCreaBase : "mainTabCreaBase", mainTabCreaWebIphone : "mainTabCreaWebIphone", mainTabCreaMraidIphone : "mainTabCreaMraidIphone", mainTabCreaMraidTablet : "mainTabCreaMraidTablet", mainTabCreaWebAndroid : "mainTabCreaWebAndroid", mainTabCreaWebAndroidWebkit : "mainTabCreaWebAndroidWebkit", mainTabCreaSDKTablet : "mainTabCreaSDK", mainTabCreaSDKTablet : "mainTabCreaSDKTablet", mainTabCreaSDKIphone : "mainTabCreaSDKIphone", mainTabCreaWeb : "mainTabCreaWeb", /******* tab web *******/ adsManager : "adsManager", /******* captiview mobile *******/ templateSelector : "templateSelector", mainCaptiviewCrea : "mainCaptiviewCrea", mainCaptiviewCreaWeb : "mainCaptiviewCreaWeb", templateRedirect : "templateRedirect", templateResume : "templateResume", templatePlayerHtml5 : "TemplatePlayerHtml5", // youtube layer mCaptiviewYoutube : "mCaptiviewYoutube", mCaptiviewYoutubeBase : "mCaptiviewYoutubeBase", mCaptiviewYoutubeWeb : "mCaptiviewYoutubeWeb", // mCaptiviewManager mCaptiviewManager : "mCaptiviewManager", mCaptiviewManagerBase : "mCaptiviewManagerBase", mCaptiviewManagerWebIphone : "mCaptiviewManagerWebIphone", mCaptiviewManagerSDKIphone : "mCaptiviewManagerSDKIphone", mainCaptiviewSelector : "mainCaptiviewSelector", mainCaptiviewSelectorBase : "mainCaptiviewSelectorBase", mainCaptiviewSelectorSDKIphone : "mainCaptiviewSelectorSDKIphone", mainCaptiviewSelectorWebIphone : "mainCaptiviewSelectorWebIphone" }; window.beeAdApi = new BeeAdApi(); })( beeAd ); (function( window, $bee, api ) { var commonVars = { // Tous les noms qui commencent par tck, seront traités comme des tracking ( envoyés via iframe donc referrer obligatoire) TRACK_NAME_FACTURATION_BEEAD : "pxFactuBeead", TRACK_NAME_PX_AFF_ANNONCEUR : "tckAffAnn", TRACK_NAME_PUBLISHER : "tckPublisher", TRACK_NAME_PX_OPEN_FORMAT_ANNONCEUR : "tckOpenFormatAnn", TRACK_NAME_USER_ACTION : "tckLaunchUserAction", TRACK_NAME_SHOW_PREVIEW : "tckShowPreview", TRACK_NAME_VIDEO_START : "tckVideoStart", TRACK_NAME_BILLABLE_ANNONCEUR : "tckBillable", STAT_NAME_PX_AFF_FORMAT : "pxAffFormat", STAT_NAME_PX_AFF : "pxAff", STAT_NAME_PX_CLOSE_FORMAT : "close", STAT_NAME_PX_SHARE_FB : "ouvertureFacebook", STAT_NAME_PX_SHARE_TWI : "ouvertureTwitter", STAT_NAME_PX_SHARE_PIN : "ouverturePinterest", STAT_NAME_PX_SHARE_GG : "ouvertureGoogle", STAT_NAME_PX_CLIC_ON_VIDEO : "clicOnVideo",// géré par flash pour le web STAT_NAME_PX_VIDEO_COMPLETE : "videoComplete",// géré par flash pour le web STAT_NAME_PX_VIDEO_INCOMPLETE : "videoIncomplete",// géré par flash pour le web STAT_NAME_PX_VIDEO_START : "videoStart",// géré par flash pour le web STAT_NAME_PX_TAUX_LECT : "tauxLecture",// géré par flash pour le web STAT_NAME_PX_REPLIEMENT : "repliement", STAT_NAME_PX_CLIC_BACKGROUND : "clicBackground", STAT_NAME_PX_CLIC_VIGNETTE : "clicOnVignette", STAT_NAME_PX_ROLLOVER_VIGNETTE : "rolloverOnVignette", STAT_NAME_PX_CLIC_REDIRECT : "trackingClickRedirect", STAT_NAME_PX_VUA25 : 'vuA25', STAT_NAME_PX_VUA50 : 'vuA50', STAT_NAME_PX_VUA75 : 'vuA75', STAT_NAME_PX_VUA90 : 'vuA90' }; api.addDeclaration(api.commonVars, commonVars, true); })( window, beeAd, beeAdApi ); (function( window, $bee, api ) { var staticVars = { AD_FORMAT_ENGAGEMENT_TAB : 3, AD_FORMAT_ENGAGEMENT_FOOTER : 4, AD_FORMAT_BATTLE_TAB : 5, AD_FORMAT_CLICKY_TAB : 10, AD_FORMAT_CLICKY_FOOTER : 9, AD_FORMAT_CLICKY_BATTLE : 11, AD_FORMAT_E_SELECTOR : 12, AD_FORMAT_CAPTIVIEW_MOBILE : 13, DISPLAY_TAB_LEFT : "L", DISPLAY_TAB_RIGHT : "R", DISPLAY_TAB_TOP : "T", DISPLAY_TAB_BOTTOM : "B", DISPLAY_FOOTER : "F", ANIM_SLIDE : 0, ANIM_FADE : 1, MOUSE_EVENT_CLICK : 0, MOUSE_EVENT_CLICK_ROLLOVER : 1, MOUSE_EVENT_NONE : 2, CLOSE_BTN_OUTSIDE : 1, CLOSE_BTN_INSIDE : 0, EVENT_ANIM : "anim", SUPPORT_WEB_MOBILE : 0, SUPPORT_APPLI_MOBILE : 1, STATE_INIT : 0, STATE_OPEN : 1, STATE_REDUCE : 2 }; api.addDeclaration(api.staticVars, staticVars, true); })( window, beeAd, beeAdApi ); /* Logger est une classe qui manage les différents tabs qui peuvent être dans une page (ex : cas battle tab) */ (function( $bee, api ) { var debugMode = false; var Logger = function(){}; Logger.prototype = { debug : function(log) { if(!debugMode) return; if(console) console.log(log); else alert(log); }, activeDebugMode : function() { alert("Mode Debug actif!!"); debugMode = true; } }; api.addDeclaration(api.logger, Logger, true); })( beeAd, beeAdApi ); /** * Classe qui ne sert qu'a imprimer les url de tracking */ (function( window, $bee, api ) { /* Imports */ var logger = api.getInstance(api.logger), commonVars = api.getInstance(api.commonVars); var TrackerBase = function(){ this.config; this.statSent={}; }; TrackerBase.prototype = { init : function(settings){ this.config = $bee.extend( { 'affichageId' : 1, 'campagnName' : '', 'pixelType' : 'pixel', 'localstorage' : '', }, settings); }, impress : function(url, data){ if(data.name.indexOf("tck") == 0){// tous les noms avec ce préfix seront traités comme des tracking data.pixelType = this.config.pixelType; if(data.referrer == undefined){ logger.debug("Erreur il faut un referrer pour le tracking de : " + data.name); return; } if(data.sendByDiv == undefined){ // par défaut, on envoie par iframe data.sendByDiv = false; } this.track(url, data); } else { if(data.name == commonVars.TRACK_NAME_FACTURATION_BEEAD || data.name == commonVars.STAT_NAME_PX_AFF_FORMAT || data.name == commonVars.STAT_NAME_PX_AFF){ data.pixelType = this.config.pixelType; data.sendByDiv = true; } else {// Toutes les stats data.pixelType = "pixel"; data.sendByDiv = true; } this.stat(url, data); } }, // Stats stat : function(url, data){ if(url==null) return; if(data.crea == undefined) data.crea = ""; // Pour px affichage format, il ne faut pas le l'id crea if(commonVars.STAT_NAME_PX_AFF_FORMAT != data.name && commonVars.STAT_NAME_PX_AFF != data.name){ if(data.params == null){ data.params = {}; } data.params[data.name] = 1; } if(data.updateValue){ data = this.update(data); if(data.params[data.name] == 0){ // Evite les doublons d'envoi de stat inutile. return; } } this.build(url, data); }, // Tracking track : function(url, data){ logger.debug("# Envoi du tracking #"); logger.debug(url); logger.debug(data); if(url==null) return; this.build(url, data); }, /** * Détermine si la stat est vraiment un update. Si elle n'est pas un update, sauvegarde la valeur dans statSent pour que lors du prochain appel ce soit * un vrai update. * @param data * @returns */ update : function(data){ if(this.statSent["crea" + data.crea] == undefined){ this.statSent["crea" + data.crea] = {}; this.statSent["crea" + data.crea][data.name] = data.updateValue; if(data.params == null){ data.params = {}; } data.params.update = false; data.params[data.name] = data.updateValue; } else { var newVal = data.updateValue; var diff = newVal - this.statSent["crea" + data.crea][data.name]; this.statSent["crea" + data.crea][data.name] = newVal; // nouvelle valeur if(data.params == null){ data.params = {}; } data.params.update = true; data.params[data.name] = diff; } return data; }, formatUrl : function(url, data, rank) { if (url == null || url == '') return; if(data.params != null){ for(var _key in data.params) url += "&" + _key + "=" + data.params[_key]; var _timestamp = "t=" + (new Date().getTime()); url += (url.indexOf('?') == -1 ? "?" + _timestamp : "&" + _timestamp); } // pr les urls qui pointent vers visionnagePub if(data.name == commonVars.TRACK_NAME_FACTURATION_BEEAD || data.name == commonVars.STAT_NAME_PX_AFF_FORMAT || data.name == commonVars.STAT_NAME_PX_AFF){ url += "&type=" + data.pixelType; var _timestamp = "t=" + (new Date().getTime()); url += (url.indexOf('?') == -1 ? "?" + _timestamp : "&" + _timestamp); } return url; }, /******** Methods to be implemented ********/ build : function(){} }; api.addDeclaration(api.trackerBase, TrackerBase); })( window, beeAd, beeAdApi ); /** * Classe qui ne sert qu'a imprimer les url de tracking */ (function( window, $bee, api ) { /* imports déclarations de classe */ var TrackerBase = api.getDeclaration(api.trackerBase); var TrackerWeb = function(){ TrackerBase.call(this); this.trackIframeLoaded=false; this.trackIFrame; this.trackDiv; }; api.heriter(TrackerWeb.prototype, TrackerBase.prototype); WebPrototype = { build : function(url, data){ if(url instanceof Array ){ for(var rank=0; rank", { 'src' : data.referrer +'/api/ref/track.htm', 'width' : '1px', 'height' : '1px', 'id' : 'beead_track_frame' } ).on('load', dataToIFrame, function(event){ var jsonString = JSON.stringify(event.data); $bee(this)[0].contentWindow.postMessage(jsonString, data.referrer); _this.trackIframeLoaded=true; }); _frame.css({ "border" : "0" }); this.trackIFrame = _frame[0]; $bee("body").append(this.trackIFrame); } }, //create img src or script impressOnDiv : function(url,data,rank) { var _fullId="beead_" + data.name + data.crea; if(rank!=null && rank!=0) // le premier id est le même si on a une liste ou pas. _fullId+="-"+rank; var _tag = $bee("#" + _fullId); if (_tag != null && _tag.length > 0 && data.updateValue == null) return; if(this.trackDiv == null || this.trackDiv.length == 0){ this.trackDiv = $bee("
", {'id' : 'beead_stats'}); $bee("body").append(this.trackDiv); } if(data.pixelType == "pixel") { var _tagAttr = {'class' : 'beead_trackingPixel', 'src' : url}; if(data.params == null || data.params.update == null || !data.params.update) _tagAttr.id = _fullId; _tag = $bee("", _tagAttr); this.trackDiv.append(_tag); } else if(data.pixelType == "script") { url += (this.config.localStorage != "" ? "&localstorage=" + this.config.localStorage : ""); var _domTag = document.createElement("script"); _domTag.setAttribute("src",url); if(data.params == null || data.params.update == null || !data.params.update) _domTag.setAttribute("id", _fullId); _domTag.setAttribute("class", "beead_trackingPixel"); _domTag.setAttribute("type", "text/javascript"); this.trackDiv[0].appendChild(_domTag); } } }; api.heriter(TrackerWeb.prototype, WebPrototype); api.addDeclaration(api.trackerWeb, TrackerWeb); api.addDeclaration(api.tracker, TrackerWeb, true); })( window, beeAd, beeAdApi ); /* WesUtils */ (function( window, $bee, api ) { var CanvasLoader = api.getDeclaration(api.canvasLoader); /* Imports */ var logger = api.getInstance(api.logger); var Utils = function(){ this.config = {}; }; Utils.prototype = { init : function(settings){ this.config = $bee.extend( {}, settings); }, /** * retourne la valeur du paramètre name dans le json de base. * ex : * { 'rootUrl' : 'http://localhost' } retourne http://localhost * @param name * @returns valeur */ getJsonElement : function(name){ return this.config[name]; }, /** * Retourne la configuration de l'élément 'name' dans la config d'un layer * ex : * 'layer' : { * "name" : 'initTab', * 'elements' : [ { 'name' : 'image', 'type' : "img", 'width': "500" } ] } retourne donc { 'name' : 'image', 'type' : "img", 'width' : "500" } * @param layerConfig, name * @returns valeur * */ getConfigElement : function(layerConfig, name){ for(var _i in layerConfig.elements){ if(layerConfig.elements[_i].name == name){ return layerConfig.elements[_i]; } } logger.debug("Erreur : pas d'élément " + name + " trouvé dans :"); logger.debug(layerConfig); return {}; }, /** * Converti une string en numérique * @param str * @returns */ toNum : function(str){ if($bee.isNumeric(str)) { return parseInt(str); } else { logger.debug("Erreur : " + str + "n'est pas un numéric"); } return -1; }, /** * Fait le ratio entre une valeur racine et la valeur 'num' donné en paramètre * @param num * @param numRef * @returns {Number} */ getRatio : function(num, numRef) { if($bee.isNumeric(num) && $bee.isNumeric(numRef)){ return num * 100 / numRef; } else { logger.debug("Erreur : ratio de " + num + " * 100 / " + numRef +" impossible!"); } return -1; }, /** * Fait le ratio entre la largeur de la window et la valeur 'num' donné en paramètre * @param num * @returns {Number} */ getRatioByScreenWidth : function(num) { return this.getRatio(num, window.innerWidth); }, /** * Fait le ratio entre la hauteur de la window et la valeur 'num' donné en paramètre * @param num * @returns {Number} */ getRatioByScreenHeight : function(num) { return this.getRatio(num, window.innerHeight); }, isPortrait : function(){ var _portrait = true; if (window.orientation == -90 || window.orientation == 90){ _portrait = false; } return _portrait; }, isViewport : function(){ for(var i in document.head.children){ if(document.head.children[i].name && document.head.children[i].name == 'viewport') return true; } return false; }, /* Add a loading layer, black background with 0.9 opacity, width&height 100%, and an animated canvas and rotation animation on target element. toggle, so call it again to disable loadingLayer */ /* @param selector - nodeElement, Jquery object or css selector string /* @param noAnim(optional) - boolean - if true, no anim when you call first time loadingAnimation, just put black layer with canvas, but no CSS3 rotation /* @param layerCSS(optional) - object - object css to apply on black layer, ex: {'width':'100%','background-color':'black'} /* @param canvasCSS(optional) - object - object css to apply on animated canvas container, ex: {'width':'100%','background-color':'black'} */ loadingAnimation : function(selector,noAnim,layerCSS,canvasCSS){ var isAlreadyHere = false, _num = new Date().getTime(), target = $bee(selector), diameter = 40, loadingLayer, cl; target.children().each(function(i,e){ if(e.id && e.id.indexOf('loadingLayer') != -1) isAlreadyHere = e; }); if(isAlreadyHere){ for(var i in this.canvasLoaderEbzArray){ if(this.canvasLoaderEbzArray[i][0] == isAlreadyHere.id){ this.canvasLoaderEbzArray[i][1].hide(); clearInterval(this.canvasLoaderEbzArray[i][2]); $bee(isAlreadyHere).css('opacity','0'); setTimeout(function(){isAlreadyHere.parentNode.removeChild(isAlreadyHere)},500); } } }else{ if(target.css('position') == '' || target.css('position') == 'static') target.css('position','relative'); loadingLayer = $bee("
",{'id':'loadingLayer'+_num}).css({ 'width':'100%', 'height':'100%', 'background-color':'rgb(0,0,0)', 'position':'absolute', 'top':'0px', 'left':'0px', 'z-index':'10000000', 'opacity': noAnim ? '0.9' : '0.01', '-webkit-transition': 'opacity '+(noAnim ? 0.5:1)+'s ease-in-out' }); target.append(loadingLayer); diameter = target.get(0).offsetWidth ? (target.get(0).offsetWidth / 4) : diameter; cl = new CanvasLoader( 'loadingLayer'+_num , {id:'loadingShape'+_num} ); cl.setColor('#ffffff'); cl.setShape('square'); cl.setDiameter(diameter || 100); cl.setDensity(13); cl.setRange(0.9); cl.setSpeed(1); cl.show(); $bee('#loadingShape'+_num).css({ 'margin': (25+(25/2)) + '%', 'max-width': '25%', 'max-height': '25%' }); if(!noAnim){ target.css('-webkit-transition' , '-webkit-transform 1s ease-in-out'); target.css('-webkit-perspective' , '800px'); target.css('-webkit-transform' , 'rotateY(180deg)'); } setTimeout(function(){ $bee('#loadingLayer'+_num).css('opacity','0.9'); }, 0); if(!this.canvasLoaderEbzArray) this.canvasLoaderEbzArray = []; var checkInter = setInterval(function(){ diameter = target.get(0).offsetWidth/4; cl.setDiameter(diameter); },100); this.canvasLoaderEbzArray.push(['loadingLayer'+_num,cl,checkInter]); if(layerCSS) $bee('#loadingLayer'+_num).css(layerCSS); if(canvasCSS) $bee('#loadingShape'+_num).css(canvasCSS); } }, clearAllLoadingAnimation : function(){ for(var i in this.canvasLoaderEbzArray){ var _canvasWrapper = this.canvasLoaderEbzArray[i][0], _canvas = this.canvasLoaderEbzArray[i][1], _intervalId = this.canvasLoaderEbzArray[i][2]; _canvas.hide(); clearInterval(_intervalId); $bee('#'+_canvasWrapper).css('opacity','0'); } } }; api.addDeclaration(api.utils, Utils, true); })( window, beeAd, beeAdApi ); var beeadDomBuilderInst = new BeeadDomBuilder(); beeadDomBuilderInst.setLastTagOfBody(beeadDomBuilderInst.createTag("link", {href:"http://as.ebz.io/css/api/wesTabs.css", rel:"stylesheet", media:"all", type:"text/css"})); function BeeadNavVerification(){ this.isChrome = function (){ return navigator.userAgent.toLowerCase().indexOf('chrome') > -1; } this.isFirefox = function (){ return navigator.userAgent.toLowerCase().indexOf('firefox') > -1; } this.isIE = function (){ return navigator.userAgent.toLowerCase().indexOf('msie') > -1; } this.isNavigatorCompatible = function () { var isCompatible = true; if (!beead_swfobject.hasFlashPlayerVersion("10.1.53")) isCompatible = false; if (this.isIE() && this.IENavigatorVersion() < 7) { isCompatible = false; } return isCompatible; } this.IENavigatorVersion = function (){ var navVersion = 0; var userAgentTxt = navigator.userAgent.toUpperCase(); var msiePos = userAgentTxt.indexOf("MSIE"); if (msiePos > -1 ){ try { var userAgentParams = userAgentTxt.substring(msiePos, userAgentTxt.length).split(";"); navVersion = eval(userAgentParams[0].split(" ")[1]); } catch (e){ navVersion = 0; } } return navVersion; } } var beeadNavVerification = new BeeadNavVerification(); if (beeadNavVerification.isIE() && beeadNavVerification.IENavigatorVersion() < 9){ beeadDomBuilderInst.setLastTagOfBody(beeadDomBuilderInst.createTag("link", {href:"http://as.ebz.io/css/api/wesTab_ie8.css", rel:"stylesheet", media:"all", type:"text/css"})); } /*! SWFObject v2.2 is released under the MIT License */ var beead_swfobject = function() { var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", FLASH_MIME_TYPE = "application/x-shockwave-flash", EXPRESS_INSTALL_ID = "SWFObjectExprInst", ON_READY_STATE_CHANGE = "onreadystatechange", win = window, doc = document, nav = navigator, plugin = false, domLoadFnArr = [main], regObjArr = [], objIdArr = [], listenersArr = [], storedAltContent, storedAltContentId, storedCallbackFn, storedCallbackObj, isDomLoaded = false, isExpressInstallActive = false, dynamicStylesheet, dynamicStylesheetMedia, autoHideShow = true, /* Centralized function for browser feature detection - User agent string detection is only used when no good alternative is possible - Is executed directly for optimal performance */ ua = function() { var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, u = nav.userAgent.toLowerCase(), p = nav.platform.toLowerCase(), windows = p ? /win/.test(p) : /win/.test(u), mac = p ? /mac/.test(p) : /mac/.test(u), webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html playerVersion = [0,0,0], d = null; if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { d = nav.plugins[SHOCKWAVE_FLASH].description; if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ plugin = true; ie = false; // cascaded feature detection for Internet Explorer d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; } } else if (typeof win.ActiveXObject != UNDEF) { try { var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); if (a) { // a will return null when ActiveX is disabled d = a.GetVariable("$version"); if (d) { ie = true; // cascaded feature detection for Internet Explorer d = d.split(" ")[1].split(","); playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; } } } catch(e) {} } return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; }(), /* Cross-browser onDomLoad - Will fire an event as soon as the DOM of a web page is loaded - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/ - Regular onload serves as fallback */ onDomLoad = function() { if (!ua.w3) { return; } if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically callDomLoadFunctions(); } if (!isDomLoaded) { if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); } if (ua.ie && ua.win) { doc.attachEvent(ON_READY_STATE_CHANGE, function() { if (doc.readyState == "complete") { doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); callDomLoadFunctions(); } }); if (win == top) { // if not inside an iframe (function(){ if (isDomLoaded) { return; } try { doc.documentElement.doScroll("left"); } catch(e) { setTimeout(arguments.callee, 0); return; } callDomLoadFunctions(); })(); } } if (ua.wk) { (function(){ if (isDomLoaded) { return; } if (!/loaded|complete/.test(doc.readyState)) { setTimeout(arguments.callee, 0); return; } callDomLoadFunctions(); })(); } addLoadEvent(callDomLoadFunctions); } }(); function callDomLoadFunctions() { if (isDomLoaded) { return; } try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); t.parentNode.removeChild(t); } catch (e) { return; } isDomLoaded = true; var dl = domLoadFnArr.length; for (var i = 0; i < dl; i++) { domLoadFnArr[i](); } } function addDomLoadEvent(fn) { if (isDomLoaded) { fn(); } else { domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+ } } /* Cross-browser onload - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/ - Will fire an event as soon as a web page including all of its assets are loaded */ function addLoadEvent(fn) { if (typeof win.addEventListener != UNDEF) { win.addEventListener("load", fn, false); } else if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("load", fn, false); } else if (typeof win.attachEvent != UNDEF) { addListener(win, "onload", fn); } else if (typeof win.onload == "function") { var fnOld = win.onload; win.onload = function() { fnOld(); fn(); }; } else { win.onload = fn; } } /* Main function - Will preferably execute onDomLoad, otherwise onload (as a fallback) */ function main() { if (plugin) { testPlayerVersion(); } else { matchVersions(); } } /* Detect the Flash Player version for non-Internet Explorer browsers - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: a. Both release and build numbers can be detected b. Avoid wrong descriptions by corrupt installers provided by Adobe c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available */ function testPlayerVersion() { var b = doc.getElementsByTagName("body")[0]; var o = createElement(OBJECT); var t = b.appendChild(o); o.setAttribute("type", FLASH_MIME_TYPE); if (t) { var counter = 0; (function(){ if (typeof t.GetVariable != UNDEF) { var d = t.GetVariable("$version"); if (d) { d = d.split(" ")[1].split(","); ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; } } else if (counter < 10) { counter++; setTimeout(arguments.callee, 10); return; } b.removeChild(o); t = null; matchVersions(); })(); } else { matchVersions(); } } /* Perform Flash Player and SWF version matching; static publishing only */ function matchVersions() { var rl = regObjArr.length; if (rl > 0) { for (var i = 0; i < rl; i++) { // for each registered object element var id = regObjArr[i].id; var cb = regObjArr[i].callbackFn; var cbObj = {success:false, id:id}; if (ua.pv[0] > 0) { var obj = getElementById(id); if (obj) { if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match! setVisibility(id, true); if (cb) { cbObj.success = true; cbObj.ref = getObjectById(id); cb(cbObj); } } else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported var att = {}; att.data = regObjArr[i].expressInstall; att.width = obj.getAttribute("width") || "0"; att.height = obj.getAttribute("height") || "0"; if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } // parse HTML object param element's name-value pairs var par = {}; var p = obj.getElementsByTagName("param"); var pl = p.length; for (var j = 0; j < pl; j++) { if (p[j].getAttribute("name").toLowerCase() != "movie") { par[p[j].getAttribute("name")] = p[j].getAttribute("value"); } } showExpressInstall(att, par, id, cb); } else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF displayAltContent(obj); if (cb) { cb(cbObj); } } } } else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content) setVisibility(id, true); if (cb) { var o = getObjectById(id); // test whether there is an HTML object element or not if (o && typeof o.SetVariable != UNDEF) { cbObj.success = true; cbObj.ref = o; } cb(cbObj); } } } } } function getObjectById(objectIdStr) { var r = null; var o = getElementById(objectIdStr); if (o && o.nodeName == "OBJECT") { if (typeof o.SetVariable != UNDEF) { r = o; } else { var n = o.getElementsByTagName(OBJECT)[0]; if (n) { r = n; } } } return r; } /* Requirements for Adobe Express Install - only one instance can be active at a time - fp 6.0.65 or higher - Win/Mac OS only - no Webkit engines older than version 312 */ function canExpressInstall() { return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); } /* Show the Adobe Express Install dialog - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 */ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { isExpressInstallActive = true; storedCallbackFn = callbackFn || null; storedCallbackObj = {success:false, id:replaceElemIdStr}; var obj = getElementById(replaceElemIdStr); if (obj) { if (obj.nodeName == "OBJECT") { // static publishing storedAltContent = abstractAltContent(obj); storedAltContentId = null; } else { // dynamic publishing storedAltContent = obj; storedAltContentId = replaceElemIdStr; } att.id = EXPRESS_INSTALL_ID; if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; if (typeof par.flashvars != UNDEF) { par.flashvars += "&" + fv; } else { par.flashvars = fv; } // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work if (ua.ie && ua.win && obj.readyState != 4) { var newObj = createElement("div"); replaceElemIdStr += "SWFObjectNew"; newObj.setAttribute("id", replaceElemIdStr); obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf obj.style.display = "none"; (function(){ if (obj.readyState == 4) { obj.parentNode.removeChild(obj); } else { setTimeout(arguments.callee, 10); } })(); } createSWF(att, par, replaceElemIdStr); } } /* Functions to abstract and display alternative content */ function displayAltContent(obj) { if (ua.ie && ua.win && obj.readyState != 4) { // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work var el = createElement("div"); obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content el.parentNode.replaceChild(abstractAltContent(obj), el); obj.style.display = "none"; (function(){ if (obj.readyState == 4) { obj.parentNode.removeChild(obj); } else { setTimeout(arguments.callee, 10); } })(); } else { obj.parentNode.replaceChild(abstractAltContent(obj), obj); } } function abstractAltContent(obj) { var ac = createElement("div"); if (ua.win && ua.ie) { ac.innerHTML = obj.innerHTML; } else { var nestedObj = obj.getElementsByTagName(OBJECT)[0]; if (nestedObj) { var c = nestedObj.childNodes; if (c) { var cl = c.length; for (var i = 0; i < cl; i++) { if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { ac.appendChild(c[i].cloneNode(true)); } } } } } return ac; } /* Cross-browser dynamic SWF creation */ function createSWF(attObj, parObj, id) { var r, el = getElementById(id); if (ua.wk && ua.wk < 312) { return r; } if (el) { if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content attObj.id = id; } if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML var att = ""; for (var i in attObj) { if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries if (i.toLowerCase() == "data") { parObj.movie = attObj[i]; } else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword att += ' class="' + attObj[i] + '"'; } else if (i.toLowerCase() != "classid") { att += ' ' + i + '="' + attObj[i] + '"'; } } } var par = ""; for (var j in parObj) { if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries par += ''; } } el.outerHTML = '' + par + ''; objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) r = getElementById(attObj.id); } else { // well-behaving browsers var o = createElement(OBJECT); o.setAttribute("type", FLASH_MIME_TYPE); for (var m in attObj) { if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword o.setAttribute("class", attObj[m]); } else if (m.toLowerCase() != "classid") { // filter out IE specific attribute o.setAttribute(m, attObj[m]); } } } for (var n in parObj) { if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element createObjParam(o, n, parObj[n]); } } el.parentNode.replaceChild(o, el); r = o; } } return r; } function createObjParam(el, pName, pValue) { var p = createElement("param"); p.setAttribute("name", pName); p.setAttribute("value", pValue); el.appendChild(p); } /* Cross-browser SWF removal - Especially needed to safely and completely remove a SWF in Internet Explorer */ function removeSWF(id) { var obj = getElementById(id); if (obj && obj.nodeName == "OBJECT") { if (ua.ie && ua.win) { obj.style.display = "none"; (function(){ if (obj.readyState == 4) { removeObjectInIE(id); } else { setTimeout(arguments.callee, 10); } })(); } else { obj.parentNode.removeChild(obj); } } } function removeObjectInIE(id) { var obj = getElementById(id); if (obj) { for (var i in obj) { if (typeof obj[i] == "function") { obj[i] = null; } } obj.parentNode.removeChild(obj); } } /* Functions to optimize JavaScript compression */ function getElementById(id) { var el = null; try { el = doc.getElementById(id); } catch (e) {} return el; } function createElement(el) { return doc.createElement(el); } /* Updated attachEvent function for Internet Explorer - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks */ function addListener(target, eventType, fn) { target.attachEvent(eventType, fn); listenersArr[listenersArr.length] = [target, eventType, fn]; } /* Flash Player and SWF content version matching */ function hasPlayerVersion(rv) { var pv = ua.pv, v = rv.split("."); v[0] = parseInt(v[0], 10); v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" v[2] = parseInt(v[2], 10) || 0; return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; } /* Cross-browser dynamic CSS creation - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php */ function createCSS(sel, decl, media, newStyle) { if (ua.ie && ua.mac) { return; } var h = doc.getElementsByTagName("head")[0]; if (!h) { return; } // to also support badly authored HTML pages that lack a head element var m = (media && typeof media == "string") ? media : "screen"; if (newStyle) { dynamicStylesheet = null; dynamicStylesheetMedia = null; } if (!dynamicStylesheet || dynamicStylesheetMedia != m) { // create dynamic stylesheet + get a global reference to it var s = createElement("style"); s.setAttribute("type", "text/css"); s.setAttribute("media", m); dynamicStylesheet = h.appendChild(s); if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; } dynamicStylesheetMedia = m; } // add style rule if (ua.ie && ua.win) { if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { dynamicStylesheet.addRule(sel, decl); } } else { if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); } } } function setVisibility(id, isVisible) { if (!autoHideShow) { return; } var v = isVisible ? "visible" : "hidden"; if (isDomLoaded && getElementById(id)) { getElementById(id).style.visibility = v; } else { createCSS("#" + id, "visibility:" + v); } } /* Filter to avoid XSS attacks */ function urlEncodeIfNecessary(s) { var regex = /[\\\"<>\.;]/; var hasBadChars = regex.exec(s) != null; return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; } /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) */ var cleanup = function() { if (ua.ie && ua.win) { window.attachEvent("onunload", function() { // remove listeners to avoid memory leaks var ll = listenersArr.length; for (var i = 0; i < ll; i++) { listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); } // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect var il = objIdArr.length; for (var j = 0; j < il; j++) { removeSWF(objIdArr[j]); } // cleanup library's main closures to avoid memory leaks for (var k in ua) { ua[k] = null; } ua = null; for (var l in beead_swfobject) { beead_swfobject[l] = null; } beead_swfobject = null; }); } }(); return { /* Public API - Reference: http://code.google.com/p/swfobject/wiki/documentation */ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { if (ua.w3 && objectIdStr && swfVersionStr) { var regObj = {}; regObj.id = objectIdStr; regObj.swfVersion = swfVersionStr; regObj.expressInstall = xiSwfUrlStr; regObj.callbackFn = callbackFn; regObjArr[regObjArr.length] = regObj; setVisibility(objectIdStr, false); } else if (callbackFn) { callbackFn({success:false, id:objectIdStr}); } }, getObjectById: function(objectIdStr) { if (ua.w3) { return getObjectById(objectIdStr); } }, embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { var callbackObj = {success:false, id:replaceElemIdStr}; if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { setVisibility(replaceElemIdStr, false); addDomLoadEvent(function() { widthStr += ""; // auto-convert to string heightStr += ""; var att = {}; if (attObj && typeof attObj === OBJECT) { for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs att[i] = attObj[i]; } } att.data = swfUrlStr; att.width = widthStr; att.height = heightStr; var par = {}; if (parObj && typeof parObj === OBJECT) { for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs par[j] = parObj[j]; } } if (flashvarsObj && typeof flashvarsObj === OBJECT) { for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs if (typeof par.flashvars != UNDEF) { par.flashvars += "&" + k + "=" + flashvarsObj[k]; } else { par.flashvars = k + "=" + flashvarsObj[k]; } } } if (hasPlayerVersion(swfVersionStr)) { // create SWF var obj = createSWF(att, par, replaceElemIdStr); if (att.id == replaceElemIdStr) { setVisibility(replaceElemIdStr, true); } callbackObj.success = true; callbackObj.ref = obj; } else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install att.data = xiSwfUrlStr; showExpressInstall(att, par, replaceElemIdStr, callbackFn); return; } else { // show alternative content setVisibility(replaceElemIdStr, true); } if (callbackFn) { callbackFn(callbackObj); } }); } else if (callbackFn) { callbackFn(callbackObj); } }, switchOffAutoHideShow: function() { autoHideShow = false; }, ua: ua, getFlashPlayerVersion: function() { return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; }, hasFlashPlayerVersion: hasPlayerVersion, createSWF: function(attObj, parObj, replaceElemIdStr) { if (ua.w3) { return createSWF(attObj, parObj, replaceElemIdStr); } else { return undefined; } }, showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { if (ua.w3 && canExpressInstall()) { showExpressInstall(att, par, replaceElemIdStr, callbackFn); } }, removeSWF: function(objElemIdStr) { if (ua.w3) { removeSWF(objElemIdStr); } }, createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { if (ua.w3) { createCSS(selStr, declStr, mediaStr, newStyleBoolean); } }, addDomLoadEvent: addDomLoadEvent, addLoadEvent: addLoadEvent, getQueryParamValue: function(param) { var q = doc.location.search || doc.location.hash; if (q) { if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark if (param == null) { return urlEncodeIfNecessary(q); } var pairs = q.split("&"); for (var i = 0; i < pairs.length; i++) { if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); } } } return ""; }, // For internal usage only expressInstallCallback: function() { if (isExpressInstallActive) { var obj = getElementById(EXPRESS_INSTALL_ID); if (obj && storedAltContent) { obj.parentNode.replaceChild(storedAltContent, obj); if (storedAltContentId) { setVisibility(storedAltContentId, true); if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } } if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } } isExpressInstallActive = false; } } }; }(); var beead_swfIframeObject = function() { function makeiframe(src,attObj,id) { var el = document.getElementById(id); var o = document.createElement('iframe'); o.src=src; for (var m in attObj) { if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword o.setAttribute("class", attObj[m]); } else if (m.toLowerCase() != "classid") { // filter out IE specific attribute o.setAttribute(m, attObj[m]); } } } o.setAttribute("style","height: 100%; width:100%; border-width: 0px"); o.setAttribute("frameborder","0"); o.setAttribute("scrolling","no"); el.parentNode.replaceChild(o, el); return o; } function getWindowDim() { var nav = navigator.appName; var wWidth,wHeight; if(nav == "Microsoft Internet Explorer"){ wWidth = document.documentElement.clientWidth; wHeight = document.documentElement.clientHeight; } else { wWidth = window.innerWidth; wHeight = window.innerHeight; } return {width:wWidth, height:wHeight}; } return { embedSWF : function (url,id,width,height, minVersion,xiSwfUrlStr,flashVars,params, attribute, output,iframeParams,functionNames,dstObject){ var dstObject=window; var functionNames=null; if(typeof(iframeParams)!=="undefined"){ if(typeof(iframeParams.dstObject)!=="undefined") dstObject=iframeParams.dstObject; functionNames=iframeParams.functionNames; } var splittedUrl=url.split("/"); var version=url.split("?")[1]; var domain=splittedUrl.slice(0,3).join("/"); var iframeSrc=domain+"/api/swfIframe.html?"+version; var iframe=makeiframe(iframeSrc,attribute,id); var flashDelegate=new beead_flashDelegate(); if (typeof beead_addLocalStorageListener!=='undefined') beead_addLocalStorageListener(iframe,domain); var eventListener=function (e) { var uniqueId=id+"_"+Math.random(); flashDelegate.init(iframe,dstObject,iframe.contentWindow,iframeSrc,uniqueId); if(functionNames!=null && typeof(functionNames)!=='undefined'){ for(var i=0;i").wesMain(config.modules[_i])).children().last() .wesMain("applyConfig").wesMain("start"); } } // Formats iselector if ($bee.inArray(config.adFormat, iSelectorFormats) != -1 ){ logger.debug("iSelector Format! " ); $bee.fn.BuSe('init', config); for(var _i = 0; _i < config.modules.length ; _i++) { config.modules[_i].num = _i; modules[_i] = $bee("body").append($bee("
").wesMainESelector(config.modules[_i])).children().last() .wesMainESelector("applyConfig"); } for(var _j =0; _j < config.commonElements.length; _j++){ if(config.commonElements[_j].position=="first"){ commonElements[_j] = $bee("
").wesMainESelector(config.commonElements[_j]).wesMainESelector("applyConfig").insertBefore(modules[0]); } if(config.commonElements[_j].position=="last"){ commonElements[_j] = $bee("body").append($bee("
").wesMainESelector(config.commonElements[_j])).children().last() .wesMainESelector("applyConfig"); } } state = staticVars.STATE_INIT; } }, fireEvent : function(event){ switch(event.name){} }, doAction : function(params){ logger.debug("doAction! :"); logger.debug(params); // Engagement Tab, footer, battle tab if($bee.inArray(config.adFormat, engagementFormats) != -1 ) { if(modules[params.num] == undefined) return; switch(params.name) { case "showInitTab": if ((typeof(window['beead_stopMedia'])).toLowerCase() != "undefined"){ beead_stopMedia(); } modules[params.num].find(".wes_OTmainVideo").wesFlashViewer("pauseVideo"); var i , l = modules.length; for(var i = 0 ; i < l;i++){ modules[i].wesMain('fireEvent', {'action' : 'showInitTab'}); } if(state == staticVars.STATE_OPEN){ tracker.impress(config.modules[params.num].urlStatsBeead, { name : commonVars.STAT_NAME_PX_CLOSE_FORMAT, crea : config.modules[params.num].creaId} ); } state = staticVars.STATE_INIT; this.showOtherAds(); break; case "showOpenTab": if ((typeof(window['beead_startMedia'])).toLowerCase() != "undefined"){ beead_startMedia(); } //creas[params.num].find(".wes_OThidenVideo").wesFlashViewer("resetVideo"); modules[params.num].wesMain('fireEvent', {'action' : 'showOpenTab'}); var i , l = modules.length; for(var i = 0 ; i < l;i++){ if(params.num != i){ modules[i].wesMain('fireEvent', {'action' : 'hideTab'}); } } state = staticVars.STATE_OPEN; this.hideOtherAds(); break; case "showReduceTab": var i , l = modules.length; for(var i = 0 ; i < l;i++){ modules[i].wesMain('fireEvent', {'action' : 'showReduceTab'}); } state = staticVars.STATE_REDUCE; tracker.impress(config.modules[params.num].urlStatsBeead , { name : commonVars.STAT_NAME_PX_REPLIEMENT, crea : config.modules[params.num].creaId } ); break; } } // Clicky Tab, clicky footer, clicky battle if($bee.inArray(config.adFormat, clickyTabFormats) != -1 ) { if(modules[params.num] == undefined) return; switch(params.name) { case "showInitTab": if ((typeof(window['beead_stopMedia'])).toLowerCase() != "undefined"){ beead_stopMedia(); } modules[params.num].find(".wes_OTmainVideo").wesFlashViewer("pauseVideo"); var i , l = modules.length; for(var i = 0 ; i < l;i++){ modules[i].wesMain('fireEvent', {'action' : 'showInitTab'}); } if(state == staticVars.STATE_OPEN){ tracker.impress(config.modules[params.num].urlStatsBeead, { name : commonVars.STAT_NAME_PX_CLOSE_FORMAT, crea : config.modules[params.num].creaId} ); } state = staticVars.STATE_INIT; this.showOtherAds(); break; case "showReduceTab": var i , l = modules.length; for(var i = 0 ; i < l;i++){ modules[i].wesMain('fireEvent', {'action' : 'showReduceTab'}); } state = staticVars.STATE_REDUCE; tracker.impress(config.modules[params.num].urlStatsBeead , { name : commonVars.STAT_NAME_PX_REPLIEMENT, crea : config.modules[params.num].creaId } ); break; case "openClickyUrl": logger.debug("####openClickyUrl#### "); //if (!config.modules[params.num].validPixelByParamUrl) { // pixel beead tracker.impress(config.modules[params.num].pixelValidation, { name : commonVars.TRACK_NAME_FACTURATION_BEEAD, crea : config.modules[params.num].creaId, referrer : config.modules[params.num].referrer, sendByDiv : true } ); // pixel publisher tracker.impress(config.modules[params.num].publisherTracking, { name : commonVars.TRACK_NAME_PUBLISHER, referrer : config.modules[params.num].referrer } ); //} // pixel annonceur tracker.impress(config.modules[params.num].pixelComptageOuverture, { name : commonVars.TRACK_NAME_PX_OPEN_FORMAT_ANNONCEUR, crea : config.modules[params.num].creaId, referrer : config.modules[params.num].referrer } ); /*var i , l = modules.length; for(var i = 0 ; i < l;i++){ modules[i].wesMain('fireEvent', {'action' : 'showReduceTab'}); } state = staticVars.STATE_REDUCE;*/ tracker.impress(config.modules[params.num].urlStatsBeead , { name : commonVars.STAT_NAME_PX_REPLIEMENT, crea : config.modules[params.num].creaId } ); break; } } if($bee.inArray(config.adFormat, iSelectorFormats) != -1 ) { switch(params.name) { case "showInitTab": if ((typeof(window['beead_stopMedia'])).toLowerCase() != "undefined"){ beead_stopMedia(); } modules[params.num].find(".wes_OTmainVideo").wesFlashViewer("pauseVideo"); for(var _j =0; _j < commonElements.length; _j++){ commonElements[_j].wesMainESelector('fireEvent', {'action' : 'hideOpenTab'}); } modules[params.num].wesMainESelector('fireEvent', {'action' : 'hideOpenTab'}); $bee.fn.BuSe('open'); currentCrea = -1; if(state == staticVars.STATE_OPEN){ tracker.impress(config.modules[params.num].urlStatsBeead, { name : commonVars.STAT_NAME_PX_CLOSE_FORMAT, crea : config.modules[params.num].creaId} ); } state = staticVars.STATE_INIT; this.showOtherAds(); break; case "showOpenTab": if ((typeof(window['beead_startMedia'])).toLowerCase() != "undefined"){ beead_startMedia(); } for(var _j =0; _j < commonElements.length; _j++){ commonElements[_j].wesMainESelector('fireEvent', {'action' : 'showOpenTab'}); } modules[params.num].wesMainESelector('fireEvent', {'action' : 'showOpenTab'}); state = staticVars.STATE_OPEN; $bee.fn.BuSe('close'); currentCrea = params.num; this.hideOtherAds(); break; case "showPreviousOpenTab": var _numPrev = currentCrea - 1; if(_numPrev == -1) _numPrev = modules.length - 1; modules[currentCrea].find(".wes_OTmainVideo").wesFlashViewer("pauseVideo"); modules[currentCrea].wesMainESelector('fireEvent', {'action' : 'hideOpenTab'}); var _numCreaToHide = currentCrea; currentCrea = _numPrev; completeEvent[staticVars.EVENT_ANIM+_numCreaToHide] = function () { modules[currentCrea].wesMainESelector('fireEvent', {'action' : 'showOpenTab'}); }; break; case "showNextOpenTab": var _numNext = currentCrea + 1; if(_numNext >= modules.length - 1) _numNext = 0; modules[currentCrea].find(".wes_OTmainVideo").wesFlashViewer("pauseVideo"); modules[currentCrea].wesMainESelector('fireEvent', {'action' : 'hideOpenTab'}); var _numCreaToHide = currentCrea; currentCrea = _numNext; completeEvent[staticVars.EVENT_ANIM+_numCreaToHide] = function () { modules[currentCrea].wesMainESelector('fireEvent', {'action' : 'showOpenTab'}); }; break; case "showReduceTab": logger.debug("###### Reduce tab " + state); // stat Repliement pour eselector, quel créa a prendre? /*if(state == staticVars.STATE_INIT){ tracker.impress(config.modules[params.num].urlStatsBeead, { name : commonVars.STAT_NAME_PX_REPLIEMENT, crea : config.modules[params.num].creaId} ); }*/ break; } } }, completeEventCallBack : function(params){ logger.debug("completeEventCallBack"); logger.debug(params); if(completeEvent[params.name] != null) { completeEvent[params.name](); completeEvent[params.name] = null; } } }; api.addDeclaration(api.adsManager, AdsManager, true); })( window, beeAd, beeAdApi ); /*! * jQuery corner plugin: simple corner rounding * Examples and documentation at: http://jquery.malsup.com/corner/ * version 2.12 (23-MAY-2011) * Requires jQuery v1.3.2 or later * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * Authors: Dave Methvin and Mike Alsup */ /** * corner() takes a single string argument: $bee('#myDiv').corner("effect corners width") * * effect: name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). * corners: one or more of: top, bottom, tr, tl, br, or bl. (default is all corners) * width: width of the effect; in the case of rounded corners this is the radius. * specify this value using the px suffix such as 10px (yes, it must be pixels). */ ;(function($bee) { var style = document.createElement('div').style, moz = style['MozBorderRadius'] !== undefined, webkit = style['WebkitBorderRadius'] !== undefined, radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined, mode = document.documentMode || 0, noBottomFold = $bee.browser.msie && (($bee.browser.version < 8 && !mode) || mode < 8), expr = $bee.browser.msie && (function() { var div = document.createElement('div'); try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); } catch(e) { return false; } return true; })(); $bee.support = $bee.support || {}; $bee.support.borderRadius = moz || webkit || radius; // so you can do: if (!$bee.support.borderRadius) $bee('#myDiv').corner(); function sz(el, p) { return parseInt($bee.css(el,p))||0; }; function hex2(s) { s = parseInt(s).toString(16); return ( s.length < 2 ) ? '0'+s : s; }; function gpc(node) { while(node) { var v = $bee.css(node,'backgroundColor'), rgb; if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') { if (v.indexOf('rgb') >= 0) { rgb = v.match(/\d+/g); return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]); } return v; } if (node.nodeName.toLowerCase() == 'html') break; node = node.parentNode; // keep walking if transparent } return '#ffffff'; }; function getWidth(fx, i, width) { switch(fx) { case 'round': return Math.round(width*(1-Math.cos(Math.asin(i/width)))); case 'cool': return Math.round(width*(1+Math.cos(Math.asin(i/width)))); case 'sharp': return width-i; case 'bite': return Math.round(width*(Math.cos(Math.asin((width-i-1)/width)))); case 'slide': return Math.round(width*(Math.atan2(i,width/i))); case 'jut': return Math.round(width*(Math.atan2(width,(width-i-1)))); case 'curl': return Math.round(width*(Math.atan(i))); case 'tear': return Math.round(width*(Math.cos(i))); case 'wicked': return Math.round(width*(Math.tan(i))); case 'long': return Math.round(width*(Math.sqrt(i))); case 'sculpt': return Math.round(width*(Math.log((width-i-1),width))); case 'dogfold': case 'dog': return (i&1) ? (i+1) : width; case 'dog2': return (i&2) ? (i+1) : width; case 'dog3': return (i&3) ? (i+1) : width; case 'fray': return (i%2)*width; case 'notch': return width; case 'bevelfold': case 'bevel': return i+1; case 'steep': return i/2 + 1; case 'invsteep':return (width-i)/2+1; } }; $bee.fn.corner = function(options) { // in 1.3+ we can fix mistakes with the ready state if (this.length == 0) { if (!$bee.isReady && this.selector) { var s = this.selector, c = this.context; $bee(function() { $bee(s,c).corner(options); }); } return this; } return this.each(function(index){ var $beethis = $bee(this), // meta values override options o = [$beethis.attr($bee.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase(), keep = /keep/.test(o), // keep borders? cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]), // corner color sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]), // strip color width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10, // corner width re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog|invsteep|steep/, fx = ((o.match(re)||['round'])[0]), fold = /dogfold|bevelfold/.test(o), edges = { T:0, B:1 }, opts = { TL: /top|tl|left/.test(o), TR: /top|tr|right/.test(o), BL: /bottom|bl|left/.test(o), BR: /bottom|br|right/.test(o) }, // vars used in func later strip, pad, cssHeight, j, bot, d, ds, bw, i, w, e, c, common, $beehorz; if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR ) opts = { TL:1, TR:1, BL:1, BR:1 }; // support native rounding if ($bee.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) { if (opts.TL) $beethis.css(radius ? 'border-top-left-radius' : moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px'); if (opts.TR) $beethis.css(radius ? 'border-top-right-radius' : moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px'); if (opts.BL) $beethis.css(radius ? 'border-bottom-left-radius' : moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px'); if (opts.BR) $beethis.css(radius ? 'border-bottom-right-radius' : moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px'); return; } strip = document.createElement('div'); $bee(strip).css({ overflow: 'hidden', height: '1px', minHeight: '1px', fontSize: '1px', backgroundColor: sc || 'transparent', borderStyle: 'solid' }); pad = { T: parseInt($bee.css(this,'paddingTop'))||0, R: parseInt($bee.css(this,'paddingRight'))||0, B: parseInt($bee.css(this,'paddingBottom'))||0, L: parseInt($bee.css(this,'paddingLeft'))||0 }; if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE if (!keep) this.style.border = 'none'; strip.style.borderColor = cc || gpc(this.parentNode); cssHeight = $bee(this).outerHeight(); for (j in edges) { bot = edges[j]; // only add stips if needed if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) { strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none'); d = document.createElement('div'); $bee(d).addClass('jquery-corner'); ds = d.style; bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); if (bot && cssHeight != 'auto') { if ($bee.css(this,'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.bottom = ds.left = ds.padding = ds.margin = '0'; if (expr) ds.setExpression('width', 'this.parentNode.offsetWidth'); else ds.width = '100%'; } else if (!bot && $bee.browser.msie) { if ($bee.css(this,'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.top = ds.left = ds.right = ds.padding = ds.margin = '0'; // fix ie6 problem when blocked element has a border width if (expr) { bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth'); ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"'); } else ds.width = '100%'; } else { ds.position = 'relative'; ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px'; } for (i=0; i < width; i++) { w = Math.max(0,getWidth(fx,i, width)); e = strip.cloneNode(false); e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px'; bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild); } if (fold && $bee.support.boxModel) { if (bot && noBottomFold) continue; for (c in opts) { if (!opts[c]) continue; if (bot && (c == 'TL' || c == 'TR')) continue; if (!bot && (c == 'BL' || c == 'BR')) continue; common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor }; $beehorz = $bee('
').css(common).css({ width: width + 'px', height: '1px' }); switch(c) { case 'TL': $beehorz.css({ bottom: 0, left: 0 }); break; case 'TR': $beehorz.css({ bottom: 0, right: 0 }); break; case 'BL': $beehorz.css({ top: 0, left: 0 }); break; case 'BR': $beehorz.css({ top: 0, right: 0 }); break; } d.appendChild($beehorz[0]); var $beevert = $bee('
').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' }); switch(c) { case 'TL': $beevert.css({ left: width }); break; case 'TR': $beevert.css({ right: width }); break; case 'BL': $beevert.css({ left: width }); break; case 'BR': $beevert.css({ right: width }); break; } d.appendChild($beevert[0]); } } } } }); }; $bee.fn.uncorner = function() { if (radius || moz || webkit) this.css(radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius', 0); $bee('div.jquery-corner', this).remove(); return this; }; // expose options $bee.fn.corner.defaults = { useNative: true, // true if plugin should attempt to use native browser support for border radius rounding metaAttr: 'data-corner' // name of meta attribute to use for options }; })($bee); //fgnass.github.com/spin.js#v1.2.7 !function(e,t,n){function o(e,n){var r=t.createElement(e||"div"),i;for(var i in n)r[i]=n[i];return r}function u(e){for(var t=1,n=arguments.length;t>1):parseInt(n.left,10)+i)+"px",top:(n.top=="auto"?a.y-u.y+(e.offsetHeight>>1):parseInt(n.top,10)+i)+"px"})),r.setAttribute("aria-role","progressbar"),t.lines(r,t.opts);if(!s){var f=0,l=n.fps,h=l/n.speed,d=(1-n.opacity)/(h*n.trail/100),v=h/n.lines;(function m(){f++;for(var e=n.lines;e;e--){var i=Math.max(1-(f+e*v)%h*d,n.opacity);t.opacity(r,n.lines-e,i,n)}t.timeout=t.el&&setTimeout(m,~~(1e3/l))})()}return t},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=n),this},lines:function(e,t){function i(e,r){return c(o(),{position:"absolute",width:t.length+t.width+"px",height:t.width+"px",background:e,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/t.lines*n+t.rotate)+"deg) translate("+t.radius+"px"+",0)",borderRadius:(t.corners*t.width>>1)+"px"})}var n=0,r;for(;n',t)}var t=c(o("group"),{behavior:"url(#default#VML)"});!l(t,"transform")&&t.adj?(a.addRule(".spin-vml","behavior:url(#default#VML)"),v.prototype.lines=function(t,n){function s(){return c(e("group",{coordsize:i+" "+i,coordorigin:-r+" "+ -r}),{width:i,height:i})}function l(t,i,o){u(a,u(c(s(),{rotation:360/n.lines*t+"deg",left:~~i}),u(c(e("roundrect",{arcsize:n.corners}),{width:r,height:n.width,left:n.radius,top:-n.width>>1,filter:o}),e("fill",{color:n.color,opacity:n.opacity}),e("stroke",{opacity:0}))))}var r=n.length+n.width,i=2*r,o=-(n.width+n.length)*2+"px",a=c(s(),{position:"absolute",top:o,left:o}),f;if(n.shadow)for(f=1;f<=n.lines;f++)l(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=n.lines;f++)l(f);return u(t,a)},v.prototype.opacity=function(e,t,n,r){var i=e.firstChild;r=r.shadow&&r.lines||0,i&&t+r",{'class':"wesCounter_spinner"}), _textDiv = $bee("
",{'class':"wesCounter_text", text:_config.timer}); if($this.data("spinner") != null){ $this.children().last().text(_config.timer); $this.toggle(true); } else { $this.append($bee("
", {'class':"wesCounter_bckgnd"})) .append(_spinnerDiv) .append(_textDiv); var options = { lines: 33, // The number of lines to draw length: 3, // The length of each line width: 2, // The line thickness radius: 17, // The radius of the inner circle corners: 0.9, // Corner roundness (0..1) rotate: -90, // The rotation offset color: '#6a8dff', // #rgb or #rrggbb speed: (1000/_config.freq), // Rounds per second trail: 50, // Afterglow percentage shadow: false, // Whether to render a shadow hwaccel: false, // Whether to use hardware acceleration className: 'spinner', // The CSS class to assign to the spinner zIndex: 1, // The z-index (defaults to 2000000000) top: 'auto', // Top position relative to parent in px left: 'auto' // Left position relative to parent in px }; _spinnerDiv.wesSpin(options); $this.data("spinner", "wesCounter_spinner"); } $this.data("config", _config); $this.data("timeoutRef", setTimeout(function() { $this.wesCounter('stepCallBack'); }, _config.freq)); }); }, stepCallBack:function(){ return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _parentConfig = $this.parents("div.wes_main").data('config'); if(_config.timer == -1){ return; } if(_config.timer == 1) { beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _parentConfig.num, 'name' : 'showOpenTab'}); $bee($this.data("spinner")).stop(); tracker.impress(_parentConfig.urlStatsBeead, { name : commonVars.STAT_NAME_PX_ROLLOVER_VIGNETTE, crea : _parentConfig.creaId }); } else { _config.timer = _config.timer - 1; $this.children().last().text(_config.timer); $this.data("timeoutRef", setTimeout(function() { $this.wesCounter('stepCallBack'); }, _config.freq)); } }); }, destroy:function(){ return this.each(function() { var $this = $bee(this), _config = $this.data("config"); clearTimeout($this.data("timeoutRef")); $bee($this.data("spinner")).stop(); _config.timer = -1; $this.toggle(false); }); } } $bee.fn.wesCounter = function(method){ if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $bee.error( 'Method ' + method + ' does not exist on jQuery.wes' ); } } $bee.fn.wesSpin = function(opts) { this.each(function() { var $this = $bee(this), data = $this.data(); if (data.spinner) { data.spinner.stop(); delete data.spinner; } if (opts !== false) { data.spinner = new beead_spinner($bee.extend({color: $this.css('color')}, opts)).spin(this); } }); return this; }; })( beeAd, beeAdApi ); /* WesInitTab est le plugin qui manage le tab dans son format initial. Affichage, intéractions avec la souris et mouvements */ (function( $bee, api ) { /* imports instances */ var logger = api.getInstance(api.logger), staticVars = api.getInstance(api.staticVars), tracker = api.getInstance(api.tracker), commonVars = api.getInstance(api.commonVars), adsManager = api.getInstance(api.adsManager); var methods = { init: function(settings){ var config = $bee.extend( {'displayMode' : staticVars.DISPLAY_TAB_LEFT}, settings); return this.each(function(){ var $this = $bee(this); logger.debug("initTab"); var _tags = { html : { content : "div." + config.typeTabClass + " div.wesInitTab_content div.wes_div", counter : "div." + config.typeTabClass + " div.wesInitTab_counter div.wesCounter", zoneClic : "div." + config.typeTabClass + " div.wesInitTab_zoneClic div.wes_div", closeBtn : "div." + config.typeTabClass + " div.wesInitTab_closeBtn div.wes_img" } }; if(config.displayMode == staticVars.DISPLAY_FOOTER){ _tags.html.background = "div." + config.typeTabClass + " div.wesInitTab_background div"; } if(config.displayMode == staticVars.DISPLAY_FOOTER){ $this.append($bee("
", {'class':"wesInitTab_background"}).append($bee("
", {'class':"wes_div"}))); } $this.append($bee("
", {'class':"wesInitTab_content"}).append($bee("
", {'class':"wes_div"}))) .append($bee("
", {'class':"wesInitTab_counter"}).append($bee("
", {'class':"wesCounter"}))) .append($bee("
", {'class':"wesInitTab_zoneClic"}).append($bee("
", {'class':"wes_div"}))) .append($bee("
", {'class':"wesInitTab_closeBtn"}).append("
")); $this.data("config", config); $this.data("tags",_tags); $this.data('idIndex', 0); }); }, applyConfigTab : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"); if(_config == undefined || (_config.displayMode != staticVars.DISPLAY_TAB_LEFT && _config.displayMode != staticVars.DISPLAY_TAB_RIGHT)) return; if (_config.initTabContent.url != undefined && _config.initTabContent.url != ""){ var _tagContent = $bee( _tags.html.content ); var _tagCloseBtn = $bee( _tags.html.closeBtn ); var _tagCounter = $bee( _tags.html.counter ); var _tagZoneClic = $bee( _tags.html.zoneClic ); if(_config.initTabContent.type == "img") { _tagContent.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", background: "transparent url(" + _config.initTabContent.url + ") no-repeat top left" } ); } if(_config.initTabContent.type == "flash"){ _tagContent.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", background : 'transparent' } ); var _idIndex = $this.data('idIndex'); $this.data('idIndex', ++_idIndex); var _flashViewer = $bee("
", {'class' : 'wes_flashWrapper'}); _flashViewer.css({ width : _config.initTabContent.width, height : _config.initTabContent.height}); var _flashConfig = {'url' : _config.initTabContent.url, 'wmode' : 'transparent', 'suffixId' : 'IT' + _idIndex}; _tagContent.append( _flashViewer.wesFlashViewer(_config, _flashConfig) ); _flashViewer.wesFlashViewer('applyConfigFlash'); } _tagZoneClic.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", bottom:_config.initTabContent.height } ); var _closeBtnPosition = _config.initTabContent.width + 28; if (_config.initTab.closeBtnPosition == staticVars.CLOSE_BTN_INSIDE){ if(_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ _closeBtnPosition = _config.initTabContent.width - 28; } else if(_config.displayMode == staticVars.DISPLAY_TAB_RIGHT){ _closeBtnPosition = _config.initTabContent.width - 10; } } else { if(_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ _closeBtnPosition = _config.initTabContent.width + 8; } } if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ _tagCloseBtn.css( { left : _closeBtnPosition + "px"} ); _tagCounter.css( {marginLeft : ((_config.initTabContent.width/2) - (52 / 2))} ); $this.css({left : - (_config.initTabContent.width+_closeBtnPosition), 'margin-top' : - (_config.initTabContent.height / 2) + 'px' }); } if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT){ _tagCloseBtn.css( { right: _closeBtnPosition + "px"} ); _tagContent.css( { right:_config.initTabContent.width + "px"} ); _tagCounter.css( { right : ((_config.initTabContent.width/2) - (52 / 2))} ); _tagZoneClic.css( { right:_config.initTabContent.width + "px"} ); $this.css({right : - (_config.initTabContent.width +_closeBtnPosition), 'margin-top' : - (_config.initTabContent.height / 2) + 'px' }); } if(_config.initTab.closeBtnUrl != null) { _tagCloseBtn.css( { 'background' : 'url('+ _config.initTab.closeBtnUrl +') no-repeat scroll left top transparent' } ); } _tagCounter.css( { top : ((_config.initTabContent.height/2) - (52 / 2))} ); } }); }, applyConfigFooter : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"); if(_config == undefined || _config.displayMode != staticVars.DISPLAY_FOOTER) return; //Permet de positionner le footer a - sa hauteur, pour en pas faire apparaitre l'image $this.css({bottom:-_config.initTabContent.height +'px'}); var _tagBackground = $bee( _tags.html.background ); _tagBackground.css( { opacity : _config.initTab.backgroundOpacity, backgroundColor: _config.initTab.backgroundColor, } ); if (_config.initTabContent.url != undefined && _config.initTabContent.url != ""){ var _tagContent = $bee( _tags.html.content ); var _tagZoneClic = $bee( _tags.html.zoneClic ); // contenu de type image if(_config.initTabContent.type == "img") { _tagContent.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", bottom: _config.initTabContent.height + "px", background: "transparent url(" + _config.initTabContent.url + ") no-repeat top left" } ); _tagZoneClic.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", bottom: _config.initTabContent.height } ); } // contenu de type flash if(_config.initTabContent.type == "flash"){ _tagContent.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", /*backgroundColor: "transparent", apparement ca pause prob cf 4676*/ bottom : _config.initTabContent.height + "px" } ); _tagZoneClic.css( { width:_config.initTabContent.width + "px", height:_config.initTabContent.height + "px", bottom: _config.initTabContent.height , 'opacity' : 0 ,'filter' : 'alpha(opacity=0)', 'backgroundColor' : 'red'} ); var _flashViewer = $bee("
", {'class' : 'wes_flashWrapper'}); var _idIndex = $this.data('idIndex'); $this.data('idIndex', ++_idIndex); _flashViewer.css({ width : _config.initTabContent.width, height : _config.initTabContent.height}); var _flashConfig = {'url' : _config.initTabContent.url, 'wmode' : 'transparent', 'suffixId' : 'IT' + _idIndex }; _tagContent.append( _flashViewer.wesFlashViewer(_config, _flashConfig) ); _flashViewer.wesFlashViewer('applyConfigFlash'); } } }); }, applyEvents : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); if(_config.initTab.mouseEvent == staticVars.MOUSE_EVENT_CLICK_ROLLOVER || _config.initTab.mouseEvent == staticVars.MOUSE_EVENT_CLICK) { $bee( $this.data("tags").html.zoneClic ).click( function(){ //$this.parent().wesMain('fireEvent', {'action' : 'showOpenTab'}); beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showOpenTab'}); tracker.impress(_config.urlStatsBeead, { name : commonVars.STAT_NAME_PX_CLIC_VIGNETTE, crea : _config.creaId }); }); } if(_config.initTab.mouseEvent == staticVars.MOUSE_EVENT_CLICK_ROLLOVER) { $bee( $this.data("tags").html.zoneClic ).mouseover(function(){ if(_config.initTabCounter.timer == 0){ beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showOpenTab'}); tracker.impress(_config.urlStatsBeead, { name : commonVars.STAT_NAME_PX_ROLLOVER_VIGNETTE, crea : _config.creaId }); } else{ $bee( $this.data("tags").html.counter ).wesCounter(_config.initTabCounter); } } ); $bee( $this.data("tags").html.zoneClic ).mouseout( function(){ $bee( $this.data("tags").html.counter ).wesCounter("destroy"); }); } if (_config.initTab.mouseEvent == staticVars.MOUSE_EVENT_NONE){ $bee( $this.data("tags").html.zoneClic ).css("display", "none"); $bee( $this.data("tags").html.counter ).css("display", "none"); } $bee( $this.data("tags").html.closeBtn ).click( function(){ beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showReduceTab'}); } ); }); }, applyEventsClicky : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); $bee( $this.data("tags").html.zoneClic ).click( function(){ window.open(_config.initTab.etRedirect); //$this.parent().wesMain('fireEvent', {'action' : 'showReduceTab'}); beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'openClickyUrl'}); }); $bee( $this.data("tags").html.closeBtn ).click( function(){ beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showReduceTab'}); /*$this.parent().wesMain('fireEvent', {'action' : 'showReduceTab'});*/ } ); }); }, show: function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ if(!$this.css('left') == 0) $this.animate({'left':0 },500); } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { if(!$this.css('right') == 0) $this.animate({'right':0 },500); } else if (_config.displayMode == staticVars.DISPLAY_FOOTER){ if(!$this.css('bottom') == 0) $this.animate({'bottom':0 },500); } }); }, hide: function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"); var _contentWidth = $bee( _tags.html.content ).innerWidth() ; var _contentHeight = $bee( _tags.html.content ).innerHeight() ; var _closeBtnWidth = $bee( _tags.html.closeBtn ).innerWidth(); if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ $this.animate({'left':- (_contentWidth + (_closeBtnWidth+28)) },500); } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { $this.animate({'right':- (_contentWidth + (_closeBtnWidth*2)) },500); } else if (_config.displayMode == staticVars.DISPLAY_FOOTER){ $this.animate({'bottom':- _contentHeight },500); } }); } }; $bee.fn.wesInitTab = function( method ) { // Method calling logic if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $bee.error( 'Method ' + method + ' does not exist on jQuery.wesInitTab' ); } }; })( beeAd, beeAdApi ); /* WesReduceTab est le plugin qui manage le tab dans son format reduit. Affichage, intéractions avec la souris et mouvements */ (function( $bee, api ) { /* imports instances */ var logger = api.getInstance(api.logger), staticVars = api.getInstance(api.staticVars); var methods = { init: function(settings){ var config = $bee.extend( {'displayMode' : staticVars.DISPLAY_TAB_LEFT}, settings); return this.each(function(){ var $this = $bee(this); var _tags = { html : { background : "div." + config.typeTabClass + " div.wesReduceTab_background div.wes_div", openBtn : "div." + config.typeTabClass + " div.wesReduceTab_openBtn div.wes_img" } }; $this.append($bee("
", {'class':"wesReduceTab_background"}).append($bee("
", {'class':"wes_div"})).append($bee("
", {'class':"wes_div"}))) .append($bee("
", {'class':"wesReduceTab_openBtn"}).append($bee("
", {'class':"wes_img"}))); $this.data('tags', _tags); $this.data('config', config); }); }, applyConfigTab : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"); $bee( _tags.html.background ).css( { opacity : _config.reduceTab.backgroundOpacity, backgroundColor: _config.reduceTab.backgroundColor } ); //On va arrondir les angles selon la position var _wesDiv = $this.find('div.wesReduceTab_background div.wes_div'); switch(_config.displayMode){ case staticVars.DISPLAY_TAB_LEFT : $bee(_wesDiv[0]).corner('tr 8px').corner('bite br 8px'); $bee(_wesDiv[1]).corner('br 8px').corner('bite tr 8px'); break; case staticVars.DISPLAY_TAB_RIGHT : $bee(_wesDiv[0]).corner('tl 8px').corner('bite bl 8px'); $bee(_wesDiv[1]).corner('bl 8px').corner('bite tl 8px'); break; } if(_config == undefined || (_config.displayMode != staticVars.DISPLAY_TAB_LEFT && _config.displayMode != staticVars.DISPLAY_TAB_RIGHT)) return; //$bee( _tags.html.background ).css( { opacity : _config.reduceTab.backgroundOpacity, backgroundColor: _config.reduceTab.backgroundColor } ); }); }, applyConfigFooter : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"); if(_config == undefined || _config.displayMode != staticVars.DISPLAY_FOOTER) return; $bee( _tags.html.background ).css({ opacity : _config.reduceTab.backgroundOpacity, backgroundColor: _config.reduceTab.backgroundColor }); }); }, applyEvents : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); $bee( $this.data("tags").html.openBtn ).click(function(){ beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showOpenTab'}); }); $bee( $this.data("tags").html.background ).click(function(){ beeAdApi.getInstance(beeAdApi.adsManager).doAction({'num' : _config.num, 'name' : 'showOpenTab'}); }); }); }, applyEventsClicky : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); $bee( $this.data("tags").html.openBtn ).click(function(){ $this.parent().wesMain('fireEvent', {'action' : 'showInitTab'}); }); }); }, show:function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"); if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ $this.animate({'left':0 },500); } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { $this.animate({'right':0 },500); } else if (_config.displayMode == staticVars.DISPLAY_FOOTER){ $this.animate({'bottom':0 },500); } }); }, hide: function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _reduceTabWidth = $bee( _tags.html.background ).innerWidth() + $bee( _tags.html.openBtn ).innerWidth(), _reduceTabHeight = $bee( _tags.html.background ).innerHeight(); if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT){ $this.animate({'left':-_reduceTabWidth },500); } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { $this.animate({'right':-_reduceTabWidth},500); } else if (_config.displayMode == staticVars.DISPLAY_FOOTER){ $this.animate({'bottom':-_reduceTabHeight },500); } }); } }; $bee.fn.wesReduceTab = function( method ) { // Method calling logic if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $bee.error( 'Method ' + method + ' does not exist on jQuery.wesInitTab' ); } }; })( beeAd, beeAdApi ); /* WesMain est le plugin qui manage les 3 états du tab : etat initial(wesInitTab), etat reduit(wesReduceTab) et etat ouvert(wesOpenTab) Ordre de lancement du plugin : init, applyConfig, start */ (function($bee, api) { /* imports */ var logger = api.getInstance(api.logger), tracker = api.getInstance(api.tracker), commonVars = api.getInstance(api.commonVars), staticVars = api.getInstance(api.staticVars); var methods = { init : function(settings) { var config = $bee.extend( { 'rootPath' : '', 'customRefererPath' : '', 'num' : 1, 'urlFlashVideoPlayer' : 'swf/EngTabPlayer.swf', 'urlStatsBeead' : "", 'creaId' : 1, 'affichageId' : 1, 'produit' : 1, 'secureUrl' : false, 'mainClassName' : 'wes_main', 'tabVerticalPosition' : 50, 'displayMode' : staticVars.DISPLAY_TAB_LEFT, 'contentType' : 'iframe', 'validPixelByParamUrl' : false, 'initTab' : { "mouseEvent" : staticVars.MOUSE_EVENT_CLICK_ROLLOVER, "backgroundColor" : "#000000", "backgroundOpacity" : 0.8, "closeBtnPosition" : staticVars.CLOSE_BTN_OUTSIDE, "verticalPosition" : 50 }, 'reduceTab' : { "backgroundColor" : "#000000", "backgroundOpacity" : 0.3 }, 'openTab' : { "effect" : staticVars.ANIM_SLIDE, 'isFullScreenTab' : true }, 'openTabLayers' : [ { 'layer' : 'background', "backgroundColor" : "#000000", "backgroundOpacity" : 0.85, 'closeByBackground' : true },{ 'layer' : 'customBack', "url" : "http", "type" : "flash/img" },{ 'layer' : 'custom', 'closeByYouTubeUrl' : '', 'type' : 'iframe', 'url' : 'http://www.beead.fr', 'width' : 1000, 'height' : 700 }, { 'layer' : 'withHeader', 'closeBtn' : 0, // -1 non visible, 0 visible, 1 visible après 1 seconde... 'type' : 'iframe', 'url' : 'http://www.beead.fr', 'width' : 700, 'height' : 400, 'suppressIframeOnClose' : true, 'pinterestUrl' : 'http://pinterest.com', }, { 'layer' : 'customBackground', 'url' : '', 'urlClickOnBackground' : '', 'type' : '' } ], 'initTabContent' : { 'type' : "img", 'url' : "", 'width' : 981, 'height' : 69 }, 'initTabCounter' : { 'timer' : 5, 'freq' : 1000 }, 'videoBtnReplayText' : 'Replay', }, settings); return this.each(function() { var $this = $bee(this); var _initTab, _reduceTab, _openTab, _applyConfigType; if (config.displayMode == staticVars.DISPLAY_TAB_LEFT) { // EngagementTab // Left config.typeTabClass = "wes_tabLeft"; _applyConfigType = "applyConfigTab"; } else if (config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { // EngagementTab // Right config.typeTabClass = "wes_tabRight"; _applyConfigType = "applyConfigTab"; } else if (config.displayMode == staticVars.DISPLAY_FOOTER) { // EngagementFooter config.typeTabClass = "wes_footer"; _applyConfigType = "applyConfigFooter"; } //ON CACHE LE CONTENEUR PRINCIPALE LE TEMPS DE LA CREATION $this.addClass(config.mainClassName).addClass(config.typeTabClass).attr('id', config.mainClassName).css('display','none'); _initTab = $bee("
", { 'class' : "wesInitTab_wrapper" }).wesInitTab(config); $this.append(_initTab); _reduceTab = $bee("
", { 'class' : "wesReduceTab_wrapper" }).wesReduceTab(config); $this.append(_reduceTab); _openTab = $bee("
", { 'class' : "wesOpenTab_wrapper" }).wesOpenTab(config) $this.append(_openTab); $this.data("config", config); }); }, applyConfig : function() { return this .each(function() { var $this = $bee(this), _config = $this.data("config"), _initTab = $bee($this.children()[0]), _reduceTab = $bee($this.children()[1]), _openTab = $bee($this.children()[2]), _applyConfigType; if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT) {// EngagementTab // Left _applyConfigType = "applyConfigTab"; _initTab.css({ 'top' : _config.tabVerticalPosition + "%" }); } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { // EngagementTab // Right _applyConfigType = "applyConfigTab"; _initTab.css({ 'top' : _config.tabVerticalPosition + "%" }); } else if (_config.displayMode == staticVars.DISPLAY_FOOTER) { // EngagementFooter _applyConfigType = "applyConfigFooter"; } // logger.debug(applyConfigType); // Tableau pour les formats engagmentTab, correspond aux id dans application context var engTab = [ 3, 4, 5 ]; var _callEvent = ($bee.inArray(_config.adFormat, engTab) != -1) ? 'applyEvents' : 'applyEventsClicky'; _initTab.wesInitTab(_applyConfigType).wesInitTab(_callEvent); _reduceTab.wesReduceTab(_applyConfigType).wesReduceTab( _callEvent); _openTab.wesOpenTab('applyConfig'); tracker.impress(_config.pixelComptageAffichage, { name : commonVars.TRACK_NAME_PX_AFF_ANNONCEUR, crea : _config.creaId, referrer : _config.referrer } ); tracker.impress(_config.pixelAffichage, { name : commonVars.STAT_NAME_PX_AFF, crea : _config.creaId }); tracker.impress(_config.pixelAffichageFormat, { name : commonVars.STAT_NAME_PX_AFF_FORMAT }); }); }, fireEvent : function(event) { return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _initTab = $bee($this.children()[0]), _reduceTab = $bee($this.children()[1]), _openTab = $bee($this.children()[2]); switch (event.action) { case 'showInitTab': logger.debug("showInitTab"); _initTab.wesInitTab('show'); _reduceTab.wesReduceTab('hide'); _openTab.wesOpenTab('hide'); break; case 'showReduceTab': logger.debug("showReduceTab"); _initTab.wesInitTab('hide'); _reduceTab.wesReduceTab('show'); _openTab.wesOpenTab('hide'); break; case 'showOpenTab': logger.debug("showOpenTab"); _initTab.wesInitTab('hide'); _reduceTab.wesReduceTab('hide'); _openTab.wesOpenTab('show'); if (!_config.validPixelByParamUrl) { // pixel beead tracker.impress(_config.pixelValidation, { name : commonVars.TRACK_NAME_FACTURATION_BEEAD, crea : _config.creaId, referrer : _config.referrer, sendByDiv : true } ); // pixel publisher tracker.impress(_config.publisherTracking, { name : commonVars.TRACK_NAME_PUBLISHER, referrer : _config.referrer }); } // pixel annonceur tracker.impress(_config.pixelComptageOuverture, { name : commonVars.TRACK_NAME_PX_OPEN_FORMAT_ANNONCEUR, crea : _config.creaId, referrer : _config.referrer } ); break; case 'hideTab': _initTab.wesInitTab('hide'); _reduceTab.wesReduceTab('hide'); _openTab.wesOpenTab('hide'); break; } }); }, start : function() { return this.each(function() { var $this = $bee(this), _initTab = $bee($this.children()[0]); setTimeout(function() { //LE FORMAT EST PRET A ETRE AFFICHE, DISPLAY BLOCK $this.css('display','block'); _initTab.wesInitTab('show'); }, 1000); }); } }; $bee.fn.wesMain = function(method) { // Method calling logic if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call( arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { $bee.error('Method ' + method + ' does not exist on jQuery.wes'); } }; })(beeAd, beeAdApi); (function( $bee, api) { /* imports instances */ var logger = api.getInstance(api.logger), staticVars = api.getInstance(api.staticVars); var methods = { init: function(settings, layerSettings){ var config = $bee.extend( {'displayMode' : staticVars.DISPLAY_TAB_LEFT}, settings); var layerConfig = $bee.extend({ 'type' : 'background' }, layerSettings); return this.each(function(){ var $this = $bee(this); logger.debug(layerConfig); var _tags = { html : { divToBeReplaced : "#divToBeReplaced" + layerConfig.suffixId, flashViewer : "#wesFlashViewer" + layerConfig.suffixId } }; $this.append($bee("
", {'id': _tags.html.divToBeReplaced.replace("#", '') })); $this.data("config", config); $this.data("layerConfig", layerConfig); $this.data("tags", _tags); }); }, applyConfigVideo : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _layerConfig = $this.data("layerConfig"), _tags = $this.data("tags"), _idFlash = _tags.html.flashViewer.replace("#", ''), _idDivToBeReplaced = _tags.html.divToBeReplaced.replace("#", ''), _urlStatsForFlash = ""; if(_config.urlStatsBeead.indexOf("?") > -1){ _urlStatsForFlash = _config.urlStatsBeead.substring(0, _config.urlStatsBeead.indexOf("?")); } var _flashvars = { urlVideo : _layerConfig.url, urlStats : encodeURIComponent(_urlStatsForFlash), urlClicVideo : encodeURIComponent(_layerConfig.urlClicVideo), urlRoot : _config.referrer, crea : _config.creaId, comScoreId : _config.comScoreId, initWidth : _layerConfig.width, initHeight : _layerConfig.height, finalWidth : _layerConfig.width, finalHeight : _layerConfig.height, alentyTagUrl : _layerConfig.alentyTagUrl, secureUrl : _config.secureUrl, num : _layerConfig.num, onPlayingDoAction : _layerConfig.onPlayingDoAction, produit : _config.produitId, replayBtnText : _layerConfig.videoBtnReplayText, autoPlayVideo : _layerConfig.autoPlayVideo, yTubeChromelessPlayer : _layerConfig.yTubeChromelessPlayer, mutePlayer : _layerConfig.mutePlayer }; if(_layerConfig.calqueVideo != undefined) _flashvars.calqueVideo = _layerConfig.calqueVideo; var _params = { allowScriptAccess:"always", allowFullScreen:"true", quality:"high", bgcolor:"#666666", wmode:"window", type:"application/x-shockwave-flash", salign:"tl" }; var functionNames=new Array("pauseFlashVideo","playFlashVideo","showFlashVideo","hideFlashVideo","resetFlashVideo"); if(_layerConfig.wmode != null && _layerConfig.wmode != 'window') _params.wmode = _layerConfig.wmode; if(_layerConfig.scale != null && _layerConfig.scale != 'default') _params.scale = _layerConfig.scale; var _attributes = { id : _idFlash , name : _idFlash }; var iframeParams= {functionNames:functionNames}; beead_swfIframeObject.embedSWF( _config.urlFlashVideoPlayer, _idDivToBeReplaced, "100%", "100%", "10.1.53", _config.rootPath + "/swf/expressInstall.swf", _flashvars, _params, _attributes, function () { $this.wesFlashViewer('flashLoadedCallBack'); },iframeParams); }); }, applyConfigVideoTransparent : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _layerConfig = $this.data("layerConfig"), _tags = $this.data("tags"), _flashvars = { youtube : encodeURIComponent(_layerConfig.urlYoutubeTransparent), youtubeTimer : _layerConfig.youtubeTransparentCloseTimer, width : _layerConfig.width, height : _layerConfig.height, //methode: _layerConfig.methode, methode: _layerConfig.methode.split(".").slice(-1).join("."), num: _layerConfig.num, action : _layerConfig.action, }, _params = { allowScriptAccess:"always", allowFullScreen:"true", quality:"high", bgcolor:"#FFFFFF", wmode:"transparent", type:"application/x-shockwave-flash", salign:"tl" }, _idFlash = _tags.html.flashViewer.replace("#", ''), _idDivToBeReplaced = _tags.html.divToBeReplaced.replace("#", ''), _attributes = { id : _idFlash , name : _idFlash }; _iframeParams = {dstObject : eval(_layerConfig.methode.split(".").slice(0,-1).join('.'))}; logger.debug(_flashvars); beead_swfIframeObject.embedSWF( _config.referrer + "/swf/btyt.swf", _idDivToBeReplaced, "100%", "100%", "10.1.53", _config.rootPath + "/swf/expressInstall.swf", _flashvars, _params, _attributes,null,_iframeParams ); }); }, applyConfigFlash : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _layerConfig = $this.data("layerConfig"), _tags = $this.data("tags"), _flashvars = {}, _params = { allowScriptAccess:"always", allowFullScreen:"true", quality:"high", bgcolor:"#FFFFFF", wmode:"window", type:"application/x-shockwave-flash", salign:"tl" }, _idFlash = _tags.html.flashViewer.replace("#", ''), _idDivToBeReplaced = _tags.html.divToBeReplaced.replace("#", ''), _attributes = { id : _idFlash , name : _idFlash }; if(_layerConfig.wmode != null && _layerConfig.wmode != 'window') _params.wmode = _layerConfig.wmode; logger.debug(_config.rootPath + "/swf/expressInstall.swf"); if(_layerConfig.scale != null && _layerConfig.scale != 'default') _params.scale = _layerConfig.scale; beead_swfobject.embedSWF( _layerConfig.url , _idDivToBeReplaced, "100%", "100%", "10.1.53", _config.rootPath + "/swf/expressInstall.swf", _flashvars, _params, _attributes, function () { $this.wesFlashViewer('flashLoadedCallBack'); }); }); }, flashLoadedCallBack : function() { return this.each(function(){ var $this = $bee(this); //$this.wesFlashViewer('playVideo'); }); }, playVideo : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _flashCallAttemps = $this.data("flashCallAttemps"); logger.debug(_tags.html.flashViewer + " playFlashViewer "); if(_flashCallAttemps == undefined) _flashCallAttemps == 0; try { $bee(_tags.html.flashViewer).toArray()[0].playFlashVideo(); logger.debug(" playFlashViewer ok "); $this.data("flashCallAttemps", 0); } catch(e) { logger.debug("appel impossible vers flash " + e); if(_flashCallAttemps < 10){ // essayer pendant 2 secondes (10 x 200ms) $this.data("flashCallAttemps", ++_flashCallAttemps); setTimeout( function(){ $this.wesFlashViewer("playVideo"); }, 200); } } }); }, pauseVideo : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _flashCallAttemps = $this.data("flashCallAttemps"); logger.debug(_tags.html.flashViewer + " pauseFlashViewer "); logger.debug(" display : " + $this.css("display")); if(_flashCallAttemps == undefined) _flashCallAttemps == 0; try { $bee(_tags.html.flashViewer).toArray()[0].pauseFlashVideo(); logger.debug(" pauseFlashViewer ok "); $this.data("flashCallAttemps", 0); } catch(e) { logger.debug("appel impossible vers flash " + e); if(_flashCallAttemps < 10){ // essayer pendant 2 secondes (10 x 200ms) $this.data("flashCallAttemps", ++_flashCallAttemps); setTimeout( function(){ logger.debug($this); $this.wesFlashViewer("pauseVideo"); }, 200); } } }); }, resetVideo : function(){ return this.each(function(){ var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _flashCallAttemps = $this.data("flashCallAttemps"); logger.debug(_tags.html.flashViewer + " resetFlashViewer "); if(_flashCallAttemps == undefined) _flashCallAttemps == 0; try { $bee(_tags.html.flashViewer).toArray()[0].resetFlashVideo(); logger.debug(" resetFlashViewer ok "); $this.data("flashCallAttemps", 0); } catch(e) { logger.debug("appel impossible vers flash " + e); if(_flashCallAttemps < 10){ // essayer pendant 2 secondes (10 x 200ms) $this.data("flashCallAttemps", ++_flashCallAttemps); setTimeout( function(){ $this.wesFlashViewer("resetVideo"); }, 200); } } }); } }; $bee.fn.wesFlashViewer = function( method ) { // Method calling logic if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $bee.error( 'Method ' + method + ' does not exist on jQuery.wes' ); } }; })( beeAd, beeAdApi); /* * WesOpenTab est le plugin qui manage le tab dans son format ouvert. Affichage, int�ractions avec la souris et mouvements */ (function($bee, api) { /* imports instances */ var logger = api.getInstance(api.logger), staticVars = api.getInstance(api.staticVars), adsManager = api.getInstance(api.adsManager); var methods = { init : function(settings) { var config = $bee.extend({ 'displayMode' : staticVars.DISPLAY_TAB_LEFT }, settings); logger.debug("wesOpenTab init!"); return this.each(function() { var $this = $bee(this); var _tags = { html : { backgroundWrapper : " div.wesOpenTab_layerBackground ", layerCustomWrapper : " div.wesOpenTab_layerCustom ", layerWithHeaderWrapper : " div.wesOpenTab_layerWithHeader ", layerArrows : " div.wesOpenTab_layerArrows " }}; $this.data('tags', _tags); $this.data('config', config); $this.data('isEventInitialised', false); $this.data("animState", 'close'); }); }, applyConfig : function() { return this.each(function() { var $this = $bee(this), _config = $this.data("config"); if (_config == undefined) return; for(var i in _config.openTabLayers) { var _layerConfig = _config.openTabLayers[i]; switch(_layerConfig.layer){ case "background": $this.append($bee("
", { 'class' : "wesOpenTab_layerBackground" }) .OTLayerBackground(_config, _layerConfig)); break; case "withHeader": $this.append($bee("
", { 'class' : "wesOpenTab_layerWithHeader" }).OTLayerWithHeader(_config, _layerConfig)); break; case "arrows": $this.append($bee("
", { 'class' : "wesOpenTab_layerArrows" }).OTLayerArrows(_config)); break; case "layer": $this.append($bee("
", { 'class' : "wesOpenTab_layer"})) $this.find('.wesOpenTab_layer').OTLayer(_config, _layerConfig); break; } } }); }, doAction : function(params){ return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _animState = $this.data("animState"), _layerCustomWrapper = $this.children( _tags.html.layerCustomWrapper ), _layerWithHeaderWrapper = $this.children(_tags.html.layerWithHeaderWrapper); if(_layerWithHeaderWrapper.size() > 0) _layerWithHeaderWrapper.OTLayerWithHeader('toggleDisplayContent', params); if(_layerCustomWrapper.size() > 0) _layerCustomWrapper.OTLayerBackground('toggleDisplayContent', params); }); }, show : function() { return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _animState = $this.data("animState"), _backgroundWrapper = $this.children( _tags.html.backgroundWrapper ), _layerCustomWrapper = $this.children( _tags.html.layerCustomWrapper ), _layerWithHeaderWrapper = $this.children(_tags.html.layerWithHeaderWrapper); if(_animState == 'open') return; if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.css({ display : "block", top : "50%", left : "0", height : "100px", width : "100px" }); $this.animate({ top : "0", left : "0", height : "100%", width : "100%" }, 500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); if(_layerCustomWrapper.size() > 0) _layerCustomWrapper.OTLayerBackground("slideToShow", { 'direction' : 'L' }); if(_layerWithHeaderWrapper.size() > 0) _layerWithHeaderWrapper.OTLayerWithHeader("slideToShow", { 'direction' : 'L' }); } else { if(!_config.openTab.isFullScreenTab) $this.css({ top : "0", left : "0", height : "0", width : "100%" }); $this.fadeIn(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); } } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.css({ display : "block", top : "50%", right : "0", height : "100px", width : "100px" }); $this.animate({ top : "0", right : "0", height : "100%", width : "100%" }, 500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); if(_layerCustomWrapper.size() > 0) _layerCustomWrapper.OTLayerBackground("slideToShow", { 'direction' : 'R' }); if(_layerWithHeaderWrapper.size() > 0) _layerWithHeaderWrapper.OTLayerWithHeader("slideToShow", { 'direction' : 'R' }); } else { if(!_config.openTab.isFullScreenTab) $this.css({ top : "0", left : "0", height : "0", width : "100%" }); $this.fadeIn(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); } } else if (_config.displayMode == staticVars.DISPLAY_FOOTER) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.css({ display : "block", top : $this.innerHeight() }); $this.animate({ 'top' : 0 }, 500,function(){ $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); } else { if(!_config.openTab.isFullScreenTab) $this.css({ top : "0", left : "0", height : "0", width : "100%", display : "none" }); else $this.css({ bottom : "0", display : "none" }); $this.fadeIn(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'open'); }); } } }); }, hide : function() { return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _animState = $this.data("animState"), _backgroundWrapper = $this.children( _tags.html.backgroundWrapper ), _layerCustomWrapper = $this.children(_tags.html.layerCustomWrapper), _layerWithHeaderWrapper = $this.children(_tags.html.layerWithHeaderWrapper); logger.debug("wesOpenTab.hide " + _animState ); if(_animState == 'close') return; if (_config.displayMode == staticVars.DISPLAY_TAB_LEFT) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.css({ top : "0", left : "0", height : "100%", width : "100%" }); $this.animate({ top : "50%", left : "-100px", height : "10px", width : "10px" }, 1000, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); $this.css({display:'none'}); }); _layerCustomWrapper.OTLayerBackground("slideToHide", { 'direction' : 'L' }); _layerWithHeaderWrapper.OTLayerWithHeader("slideToHide", { 'direction' : 'L' }); } else { $this.fadeOut(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); }); } } else if (_config.displayMode == staticVars.DISPLAY_TAB_RIGHT) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.css({ top : "0", right : "0", height : "100%", width : "100%" }); $this.animate({ top : "50%", right : "-100px", height : "10px", width : "10px" }, 1000, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); $this.css({display:'none'}); }); _layerCustomWrapper.OTLayerBackground("slideToHide", { 'direction' : 'R' }); _layerWithHeaderWrapper.OTLayerWithHeader("slideToHide", { 'direction' : 'R' }); } else { $this.fadeOut(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); }); } } else if (_config.displayMode == staticVars.DISPLAY_FOOTER) { if (_config.openTab.effect == staticVars.ANIM_SLIDE) { $this.animate({ 'top' : $this.innerHeight() }, 500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); }); } else { $this.fadeOut(500, function() { $this.wesOpenTab('onAnimFinishedCallBack', 'close'); }); } } }); }, /* * Affection de l'état du openTab, après l'animation : open, close * */ onAnimFinishedCallBack : function(state) { return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _tags = $this.data("tags"), _name = staticVars.EVENT_ANIM + _config.num, _backgroundWrapper = $this.children( _tags.html.backgroundWrapper ), _layerCustomWrapper = $this.children(_tags.html.layerCustomWrapper), _layerWithHeaderWrapper = $this.children(_tags.html.layerWithHeaderWrapper); $this.data("animState", state); logger.debug(_config.openTabLayers[0]); if(_backgroundWrapper.size() > 0) _backgroundWrapper.OTLayerBackground('toggleDisplayContent', { toggle : (state == "open") }); if(_layerWithHeaderWrapper.size() > 0) _layerWithHeaderWrapper.OTLayerWithHeader('toggleDisplayContent', { toggle : (state == "open") }); if(_layerCustomWrapper.size() > 0) _layerCustomWrapper.OTLayerBackground('toggleDisplayContent', { toggle : (state == "open") }); beeAdApi.getInstance(beeAdApi.adsManager).completeEventCallBack({'name' : _name}); // Cette fonction est appelée en callback }); }, }; $bee.fn.wesOpenTab = function(method) { // Method calling logic if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { logger.debug(this); $bee.error('Method ' + method + ' does not exist on jQuery.wesOpenTab'); } }; })(beeAd, beeAdApi); /* * OTLayerArrows est le plugin qui manage les flèches affichés sur le format ouvert. Affichage, int�ractions avec la souris et mouvements */ (function($bee, api) { /* imports instances */ var logger = api.getInstance(api.logger), staticVars = api.getInstance(api.staticVars), adsManager = api.getInstance(api.adsManager); var methods = { init : function(settings) { var config = $bee.extend({ 'displayMode' : staticVars.DISPLAY_TAB_LEFT }, settings); /*var layerConfig = $bee.extend({ 'type' : 'arrow' }, layerSettings);*/ logger.debug("OTLayerArrows init!"); return this.each(function() { var $this = $bee(this); var _tags = { html : { arrowLeft : " div.wes_arrowLeft", arrowRight : " div.wes_arrowRight" }}; $this.append($bee("
", { 'class' : "wes_arrowLeft" })).append($bee("
", { 'class' : "wes_arrowRight" })); $this.data('tags', _tags); $this.data('config', config); $this.OTLayerArrows('applyConfig'); $this.OTLayerArrows('applyEvents'); }); }, applyConfig : function(){ return this.each(function() { var $this = $bee(this), _tags = $this.data("tags"), _config = $this.data("config"); _bodyHeight = $bee(window).innerHeight(); $this.children().css("top", (_bodyHeight/2) + "px"); }); }, applyEvents : function() { return this.each(function() { var $this = $bee(this), _tags = $this.data("tags"), _config = $this.data("config"); logger.debug("OTLayerArrows applyEvents!"); $this.children(_tags.html.arrowLeft).click(function() { logger.debug("click on arrowLeft"); beeAdApi.getInstance(beeAdApi.adsManager).doAction({ 'name' : 'showPreviousOpenTab'}); }); $this.children(_tags.html.arrowRight).click(function() { logger.debug("click on arrowRight"); beeAdApi.getInstance(beeAdApi.adsManager).doAction({ 'name' : 'showNextOpenTab'}); }); }); } }; $bee.fn.OTLayerArrows = function(method) { // Method calling logic if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { $bee.error('Method ' + method + ' does not exist on jQuery.OTLayerArrows'); } }; })(beeAd, beeAdApi); /* * WesOpenTab est le plugin qui manage le tab dans son format ouvert. Affichage, int�ractions avec la souris et mouvements */ (function($bee, api) { /* imports instances */ var logger = api.getInstance(api.logger), utils = api.getInstance(api.utils), staticVars = api.getInstance(api.staticVars), commonVars = api.getInstance(api.commonVars), tracker = api.getInstance(api.tracker), adsManager = api.getInstance(api.adsManager); var methods = { init : function(settings, layerSettings) { var config = $bee.extend({ 'displayMode' : staticVars.DISPLAY_TAB_LEFT }, settings); var layerConfig = $bee.extend({ 'type' : 'background' }, layerSettings); logger.debug("OTLayerWithHeader init!"); return this.each(function() { var $this = $bee(this); var _tags = { html : { wrapper : " div.wes_layerWrapper", headLeft : " div.wes_layerHeader div.wes_layerHeadLeft", headRight : " div.wes_layerHeader div.wes_layerHeadRight", closeBtn : " div.wes_layerHeader div.wes_layerHeadRight div.wes_closeBtn", content : " div.wes_layerContent" } }; $this.append($bee("
")); $this.data('tags', _tags); $this.data('config', config); $this.data('layerConfig', layerConfig); $this.data('isConfigApplyed', false); $this.data('idIndex', 0); // A incrémenter pour ts les éléments dom qui auront un id (exemple : flash) }); }, applyConfig : function() { return this.each(function() { var $this = $bee(this), _config = $this.data("config"), _layerConfig = $this.data('layerConfig'), _tags = $this.data("tags"), _wrapper = $this.find(_tags.html.wrapper), _headLeft = $this.find(_tags.html.headLeft), _headRight = $this.find(_tags.html.headRight), _content = $this.find(_tags.html.content); if (_layerConfig == undefined) return; if (_layerConfig.facebookUrl) { _headLeft.append($bee("
", { 'class' : 'wes_fb' }) .append($bee("").attr({ title : _layerConfig.titleTextBtnShareFb, target : '_blank', href : _layerConfig.facebookUrl }))); } if (_layerConfig.twitterUrl) { _headLeft.append($bee("
", { 'class' : 'wes_twi' }) .append($bee("").attr({ title : _layerConfig.titleTextBtnShareTwi, target : '_blank', href : _layerConfig.twitterUrl }))); } if (_layerConfig.pinterestUrl) { _headLeft.append($bee("
", { 'class' : 'wes_pin' }) .append($bee("").attr({ title : _layerConfig.titleTextBtnPinterest, target : '_blank', href : _layerConfig.pinterestUrl }))); } if (_layerConfig.googleUrl) { _headLeft.append($bee("
", { 'class' : 'wes_gg' }) .append($bee("").attr({ title : _layerConfig.titleTextBtnShareGg, target : '_blank',href : _layerConfig.googleUrl }))); } if(_layerConfig.closeBtn > -1) { _headRight.append($bee("
", { 'class' : 'wes_closeBtn', 'style' : 'display:none' })); if(_layerConfig.urlYoutubeTransparent != null){ // btn fermer youtube var _closeBtn = $this.find(_tags.html.closeBtn), _closeBtnVideoWidth = parseFloat(_closeBtn.css("width").replace("px", '')) + 80, _closeBtnVideoHeight = parseFloat(_closeBtn.css("height").replace("px", '')) + 80, _closeBtnFlashViewer = $bee("
", { 'class' : 'wes_flashWrapper', 'style' : 'width:' + _closeBtn.css("width") + '; height:' + _closeBtn.css("height") }), _idIndex = $this.data('idIndex'); $this.data('idIndex', ++_idIndex); var _layerConfigCloseBtn = { 'urlYoutubeTransparent' : _layerConfig.urlYoutubeTransparent, 'width' : _closeBtnVideoWidth, 'height' : _closeBtnVideoHeight, 'num' : _config.num, 'suffixId' : 'WH' + _config.num + _idIndex, 'methode' : "beeAdApi.getInstance(beeAdApi.adsManager).doAction", 'action' : 'showInitTab', 'wmode': 'transparent' , 'youtubeTransparentCloseTimer' : _layerConfig.youtubeTransparentCloseTimer }; _closeBtn.append(_closeBtnFlashViewer.wesFlashViewer(_config, _layerConfigCloseBtn)); _closeBtnFlashViewer.wesFlashViewer('applyConfigVideoTransparent'); } } var _headerHeight = parseFloat(_wrapper.children().first().css('height').replace("px", "")); _wrapper.css({ 'marginLeft' : -(_layerConfig.width / 2), 'marginTop' : -((_layerConfig.height + _headerHeight / 2) / 2) }); _content.css({ 'width' : _layerConfig.width, 'height' : _layerConfig.height }); if((_layerConfig.height + _headerHeight) > $bee(window).height()){ _wrapper.css({ 'marginLeft' : -(_layerConfig.width / 2), 'marginTop' : -(($bee(window).height() - _headerHeight / 2) / 2) }); _content.css({ 'width' : _layerConfig.width, 'height' : $bee(window).height() }); if (_layerConfig.type == "iframe") { _content.append($bee("