/** * Hosted by Overblog.com (JFG Networks) * All rights reserved 2011-2012 */ YUI.add("ob-nbcomments",function(c){var g="data-ob-comments",e="data-ob-comments-none",a="data-ob-comments-one",b="data-ob-comments-many",d="data-ob-comments-done",f=function(){var i=c.all("["+g+"]"),h=[];i.each(function(j){var k=j.getAttribute(g).replace(/^post_/,"");if(!k||(j.getAttribute(d)&&j.getAttribute(d)==="true")){return}h.push(k)});c.jsonp(c.config.host.comment+"/count/{callback}/["+h.join(",")+"]",function(j){if(j.results){c.each(j.results,function(o){var l=c.one("["+g+'="post_'+o.id+'"]'),k,n,p,m;if(!l){return}m=parseInt(o.count);k=l.getAttribute(e);n=l.getAttribute(a);p=l.getAttribute(b);if(m===1||!k&&n){k=n}if(m>1){k=p}if(k){if(k.match(/%c/)){k=k.replace(/%c/,m)}}else{k=m}l.set("innerHTML",k);l.setAttribute(d,"true")})}})};c.on("domready",f)},"1",{requires:["jsonp","node"]}); YUI.add("selector-css2",function(e,t){var n="parentNode",r="tagName",i="attributes",s="combinator",o="pseudos",u=e.Selector,a={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:!0,_isXML:function(){var t=e.config.doc.createElement("div").tagName!=="DIV";return t}(),shorthand:{"\\#(-?[_a-z0-9]+[-\\w\\uE000]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w\\uE000]*)":"[className~=$1]"},operators:{"":function(t,n){return e.DOM.getAttribute(t,n)!==""},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(t){return e.DOM._children(t[n])[0]===t}},_bruteQuery:function(t,n,r){var i=[],s=[],o=u._tokenize(t),a=o[o.length-1],f=e.DOM._getDoc(n),l,c,h,p;if(a){c=a.id,h=a.className,p=a.tagName||"*";if(n.getElementsByTagName)c&&(n.all||n.nodeType===9||e.DOM.inDoc(n))?s=e.DOM.allById(c,n):h?s=n.getElementsByClassName(h):s=n.getElementsByTagName(p);else{l=n.firstChild;while(l)l.tagName&&(p==="*"||l.tagName===p)&&s.push(l),l=l.nextSibling||l.firstChild}s.length&&(i=u._filterNodes(s,o,r))}return i},_filterNodes:function(t,n,r){var i=0,s,o=n.length,a=o-1,f=[],l=t[0],c=l,h=e.Selector.getters,p,d,v,m,g,y,b,w;for(i=0;c=l=t[i++];){a=o-1,m=null;e:while(c&&c.tagName){v=n[a],b=v.tests,s=b.length;if(s&&!g)while(w=b[--s]){p=w[1],h[w[0]]?y=h[w[0]](c,w[0]):(y=c[w[0]],w[0]==="tagName"&&!u._isXML&&(y=y.toUpperCase()),typeof y!="string"&&y!==undefined&&y.toString?y=y.toString():y===undefined&&c.getAttribute&&(y=c.getAttribute(w[0],2)));if(p==="="&&y!==w[2]||typeof p!="string"&&p.test&&!p.test(y)||!p.test&&typeof p=="function"&&!p(c,w[0],w[2])){if(c=c[m])while(c&&(!c.tagName||v.tagName&&v.tagName!==c.tagName))c=c[m];continue e}}a--;if(!!g||!(d=v.combinator)){f.push(l);if(r)return f;break}m=d.axis,c=c[m];while(c&&!c.tagName)c=c[m];d.direct&&(m=null)}}return l=c=null,f},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:!0},"+":{axis:"previousSibling",direct:!0}},_parsers:[{name:i,re:/^\uE003(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\uE004'"]*)['"]?\uE004/i,fn:function(t,n){var r=t[2]||"",i=u.operators,s=t[3]?t[3].replace(/\\/g,""):"",o;if(t[1]==="id"&&r==="="||t[1]==="className"&&e.config.doc.documentElement.getElementsByClassName&&(r==="~="||r==="="))n.prefilter=t[1],t[3]=s,n[t[1]]=t[1]==="id"?t[3]:s;r in i&&(o=i[r],typeof o=="string"&&(t[3]=s.replace(u._reRegExpTokens,"\\$1"),o=new RegExp(o.replace("{val}",t[3]))),t[2]=o);if(!n.last||n.prefilter!==t[1])return t.slice(1)}},{name:r,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(e,t){var n=e[1];u._isXML||(n=n.toUpperCase()),t.tagName=n;if(n!=="*"&&(!t.last||t.prefilter))return[r,"=",n];t.prefilter||(t.prefilter="tagName")}},{name:s,re:/^\s*([>+~]|\s)\s*/,fn:function(e,t){}},{name:o,re:/^:([\-\w]+)(?:\uE005['"]?([^\uE005]*)['"]?\uE006)*/i,fn:function(e,t){var n=u[o][e[1]];return n?(e[2]&&(e[2]=e[2].replace(/\\/g,"")),[e[2],n]):!1}}],_getToken:function(e){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]}},_tokenize:function(t){t=t||"",t=u._parseSelector(e.Lang.trim(t));var n=u._getToken(),r=t,i=[],o=!1,a,f,l,c;e:do{o=!1;for(l=0;c=u._parsers[l++];)if(a=c.re.exec(t)){c.name!==s&&(n.selector=t),t=t.replace(a[0],""),t.length||(n.last=!0),u._attrFilters[a[1]]&&(a[1]=u._attrFilters[a[1]]),f=c.fn(a,n);if(f===!1){o=!1;break e}f&&n.tests.push(f);if(!t.length||c.name===s)i.push(n),n=u._getToken(n),c.name===s&&(n.combinator=e.Selector.combinators[a[1]]);o=!0}}while(o&&t.length);if(!o||t.length)i=[];return i},_replaceMarkers:function(e){return e=e.replace(/\[/g,"\ue003"),e=e.replace(/\]/g,"\ue004"),e=e.replace(/\(/g,"\ue005"),e=e.replace(/\)/g,"\ue006"),e},_replaceShorthand:function(t){var n=e.Selector.shorthand,r;for(r in n)n.hasOwnProperty(r)&&(t=t.replace(new RegExp(r,"gi"),n[r]));return t},_parseSelector:function(t){var n=e.Selector._replaceSelector(t),t=n.selector;return t=e.Selector._replaceShorthand(t),t=e.Selector._restore("attr",t,n.attrs),t=e.Selector._restore("pseudo",t,n.pseudos),t=e.Selector._replaceMarkers(t),t=e.Selector._restore("esc",t,n.esc),t},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(t,n){return e.DOM.getAttribute(t,n)},id:function(t,n){return e.DOM.getId(t)}}};e.mix(e.Selector,a,!0),e.Selector.getters.src=e.Selector.getters.rel=e.Selector.getters.href,e.Selector.useNative&&e.config.doc.querySelector&&(e.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]")},"@VERSION@",{requires:["selector-native"]}); YUI.add("selector-css3",function(e,t){e.Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/,e.Selector._getNth=function(t,n,r,i){e.Selector._reNth.test(n);var s=parseInt(RegExp.$1,10),o=RegExp.$2,u=RegExp.$3,a=parseInt(RegExp.$4,10)||0,f=[],l=e.DOM._children(t.parentNode,r),c;u?(s=2,c="+",o="n",a=u==="odd"?1:0):isNaN(s)&&(s=o?1:0);if(s===0)return i&&(a=l.length-a+1),l[a-1]===t?!0:!1;s<0&&(i=!!i,s=Math.abs(s));if(!i){for(var h=a-1,p=l.length;h=0&&l[h]===t)return!0}else for(var h=l.length-a,p=l.length;h>=0;h-=s)if(h-1},checked:function(e){return e.checked===!0||e.selected===!0},enabled:function(e){return e.disabled!==undefined&&!e.disabled},disabled:function(e){return e.disabled}}),e.mix(e.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"}),e.Selector.combinators["~"]={axis:"previousSibling"}},"@VERSION@",{requires:["selector-native","selector-css2"]}); YUI().add("ob-slideshow",function(d){var c="ob-slideshow",b="ob-redered",a=function(e){a.superclass.constructor.apply(this,arguments)};d.Slider=d.extend(a,d.Base,{_slider:null,_events:null,initializer:function(){this._events=[];this._loadLib()},_loadLib:function(){var j="",i=f=e=null;d.Get.css("/slider/css/slider.css");this._slider=new d.Slideshow({srcNode:this.get("container"),transition:d.Slideshow.PRESETS.fade,currentIndex:0,autoplay:true,pauseOnChange:false,pauseOnHover:true});this._slider.render();d.each(this._slider.get("slides"),function(m,l){var n=(j=="")?"active":"";j+='
  • '+(l+1)+"
  • "});var h=this.get("container").ancestor("div"),g=d.Node.create(''),k=d.Node.create('");this.get("container").insert(g,"after");this.get("container").insert(k,"after");var i=h.one(".ob-slider-directionNav .prevNav"),f=h.one(".ob-slider-directionNav .nextNav"),e=h.all(".ob-slider-controlNav .ob-slider-control");this.get("container").ancestor("div").one(".ob-slider-directionNav").setStyle("width",this.get("container").ancestor("div").one(".yui3-slideshow-content").getComputedStyle("width"));this.get("container").ancestor("div").one(".ob-slider-directionNav").setStyle("height",this.get("container").ancestor("div").one(".yui3-slideshow-content").getComputedStyle("height"));this._events.push(f.on("click",function(l){this._slider.next()},this));this._events.push(i.on("click",function(l){this._slider.previous()},this));this._events.push(e.on("click",function(l){this._slider.slide(l.target.getAttribute("rel"))},this));this._events.push(this._slider.on("_incomingSlideChange",function(l){this._changeNav(this._slider.get("currentIndex"))},this));this._events.push(d.one(".ob-slider-directionNav").on("mouseover",function(){this._slider.pause()},this));this._events.push(d.one(".ob-slider-directionNav").on("mouseout",function(){this._slider.play()},this))},_changeNav:function(e){this.get("container").ancestor("div").all(".ob-slider-controlNav .ob-slider-control").removeClass("active");this.get("container").ancestor("div").all('.ob-slider-controlNav .ob-slider-control[rel="'+e+'"]').addClass("active")},destructor:function(){this._slider.detach?this._slider.detach():this._slider.cancel();d.Array.each(this._events,function(f){f.detach?f.detach():f.cancel()},this)}},{NAME:"Slider",ATTRS:{container:{value:null}}});d.Slider.initsources=function(){d.all("."+c+":not(."+b+")").each(function(e){new d.Slider({container:e});e.addClass(b)})};d.on("domready",d.Slider.initsources)},"1",{requires:["base","node","get","gallery-yui-slideshow","selector-css3"]}); YUI().add("ob-soundplayer",function(c){var d=false,b="lib:loaded",a=function(e){a.superclass.constructor.apply(this,arguments)};c.SoundPlayer=c.extend(a,c.Base,{_playevent:null,_volumeevent:null,_logoevent:null,initializer:function(){if(c.config.win.soundManager){this._displaySound()}else{if(d){c.on(b,this._displaySound,this)}else{this._loadLib()}}},_loadLib:function(){d=true;c.Get.css("/soundplayer/css/soundplayer.css");c.Get.script("/soundplayer/soundmanager2-nodebug-jsmin.js",{onSuccess:c.bind(function(f){c.config.win.soundManager=new SoundManager();c.config.win.soundManager.url="/soundplayer/swf/";c.config.win.soundManager.beginDelayedInit();c.config.win.soundManager.onready(c.bind(function(e){d=false;c.fire(b);this._displaySound()},this))},this),context:this})},_displaySound:function(){var k=null,j=null,g=null,i=null,f=this.get("container").ancestor("div"),e=c.Node.create('
    '+this.get("title")+''+this.get("artist")+'
    '),l="s"+Math.floor(Math.random()*1000000),h=c.config.win.soundManager.createSound({id:l,url:this.get("url"),autoPlay:false,autoLoad:true,volume:100,stream:false,loops:100});this.get("container").insert(e,"before");k=f.one(".obsoundplayer .obsoundplayerplay");j=f.one(".obsoundplayer .obsoundplayercover");g=f.one(".obsoundplayer .obsoundplayervolume");i=f.one(".obsoundplayer .obsoundplayerlogo");if(this.get("cover")){j.setStyle("backgroundImage","url("+this.get("cover")+")")}this._playevent=k.on("click",c.bind(function(o,n,m){if(n.playState===0){n.play();o.addClass("pause")}else{if(n.paused){n.resume();o.addClass("pause")}else{n.pause();o.removeClass("pause")}}},this,k,h));this._volumeevent=g.on("click",c.bind(function(m,o,n){if(o.muted){o.unmute();m.removeClass("mute")}else{o.mute();m.addClass("mute")}},this,g,h));this._logoevent=i.on("click",function(m){window.open("http://www.deezer.com")});f.removeChild(this.get("container"))},destructor:function(){this._playevent.detach?this._playevent.detach():this._playevent.cancel();this._volumeevent.detach?this._volumeevent.detach():this._volumeevent.cancel()}},{NAME:"SoundPlayer",ATTRS:{container:{value:null},artist:{value:""},title:{value:""},cover:{value:""},url:{value:""}}});c.SoundPlayer.initsources=function(){c.all(".obsoundplayersource").each(function(h){var e=h.getAttribute("data-artist"),i=h.getAttribute("data-title"),g=h.getAttribute("data-cover"),f=h.getAttribute("src");new c.SoundPlayer({container:h,artist:e,title:i,cover:g,url:f})})};c.SoundPlayer.initsources()},"1",{requires:["base","node","get"]}); YUI.add("widget-stdmod",function(e,t){function H(t){this._stdModNode=this.get(w),e.before(this._renderUIStdMod,this,O),e.before(this._bindUIStdMod,this,M),e.before(this._syncUIStdMod,this,_)}var n=e.Lang,r=e.Node,i=e.UA,s=e.Widget,o="",u="hd",a="bd",f="ft",l="header",c="body",h="footer",p="fillHeight",d="stdmod",v="Node",m="Content",g="firstChild",y="childNodes",b="ownerDocument",w="contentBox",E="height",S="offsetHeight",x="auto",T="headerContentChange",N="bodyContentChange",C="footerContentChange",k="fillHeightChange",L="heightChange",A="contentUpdate",O="renderUI",M="bindUI",_="syncUI",D="_applyParsedConfig",P=e.Widget.UI_SRC;H.HEADER=l,H.BODY=c,H.FOOTER=h,H.AFTER="after",H.BEFORE="before",H.REPLACE="replace";var B=H.HEADER,j=H.BODY,F=H.FOOTER,I=B+m,q=F+m,R=j+m;H.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:H.BODY,validator:function(e){return this._validateFillHeight(e)}}},H.HTML_PARSER={headerContent:function(e){return this._parseStdModHTML(B)},bodyContent:function(e){return this._parseStdModHTML(j)},footerContent:function(e){return this._parseStdModHTML(F)}},H.SECTION_CLASS_NAMES={header:s.getClassName(u),body:s.getClassName(a),footer:s.getClassName(f)},H.TEMPLATES={header:'
    ',body:'
    ',footer:'
    '},H.prototype={_syncUIStdMod:function(){var e=this._stdModParsed;(!e||!e[I])&&this._uiSetStdMod(B,this.get(I)),(!e||!e[R])&&this._uiSetStdMod(j,this.get(R)),(!e||!e[q])&&this._uiSetStdMod(F,this.get(q)),this._uiSetFillHeight(this.get(p))},_renderUIStdMod:function(){this._stdModNode.addClass(s.getClassName(d)),this._renderStdModSections(),this.after(T,this._afterHeaderChange),this.after(N,this._afterBodyChange),this.after(C,this._afterFooterChange)},_renderStdModSections:function(){n.isValue(this.get(I))&&this._renderStdMod(B),n.isValue(this.get(R))&&this._renderStdMod(j),n.isValue(this.get(q))&&this._renderStdMod(F)},_bindUIStdMod:function(){this.after(k,this._afterFillHeightChange),this.after(L,this._fillHeight),this.after(A,this._fillHeight)},_afterHeaderChange:function(e){e.src!==P&&this._uiSetStdMod(B,e.newVal,e.stdModPosition)},_afterBodyChange:function(e){e.src!==P&&this._uiSetStdMod(j,e.newVal,e.stdModPosition)},_afterFooterChange:function(e){e.src!==P&&this._uiSetStdMod(F,e.newVal,e.stdModPosition)},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal)},_validateFillHeight:function(e){return!e||e==H.BODY||e==H.HEADER||e==H.FOOTER},_uiSetFillHeight:function(e){var t=this.getStdModNode(e),n=this._currFillNode;n&&t!==n&&n.setStyle(E,o),t&&(this._currFillNode=t),this._fillHeight()},_fillHeight:function(){if(this.get(p)){var e=this.get(E);e!=o&&e!=x&&this.fillHeight(this._currFillNode)}},_uiSetStdMod:function(e,t,r){if(n.isValue(t)){var i=this.getStdModNode(e,!0);this._addStdModContent(i,t,r),this.set(e+m,this._getStdModContent(e),{src:P})}else this._eraseStdMod(e);this.fire(A)},_renderStdMod:function(e){var t=this.get(w),n=this._findStdModSection(e);return n||(n=this._getStdModTemplate(e)),this._insertStdModSection(t,e,n),this[e+v]=n,this[e+v]},_eraseStdMod:function(e){var t=this.getStdModNode(e);t&&(t.remove(!0),delete this[e+v])},_insertStdModSection:function(e,t,n){var r=e.get(g);if(t===F||!r)e.appendChild(n);else if(t===B)e.insertBefore(n,r);else{var i=this[F+v];i?e.insertBefore(n,i):e.appendChild(n)}},_getStdModTemplate:function(e){return r.create(H.TEMPLATES[e],this._stdModNode.get(b))},_addStdModContent:function(e,t,n){switch(n){case H.BEFORE:n=0;break;case H.AFTER:n=undefined;break;default:n=H.REPLACE}e.insert(t,n)},_getPreciseHeight:function(e){var t=e?e.get(S):0,n="getBoundingClientRect";if(e&&e.hasMethod(n)){var r=e.invoke(n);r&&(t=r.bottom-r.top)}return t},_findStdModSection:function(e){return this.get(w).one("> ."+H.SECTION_CLASS_NAMES[e])},_parseStdModHTML:function(t){var n=this._findStdModSection(t);return n?(this._stdModParsed||(this._stdModParsed={},e.before(this._applyStdModParsedConfig,this,D)),this._stdModParsed[t+m]=1,n.get("innerHTML")):null},_applyStdModParsedConfig:function(e,t,n){var r=this._stdModParsed;r&&(r[I]=!(I in t)&&I in r,r[R]=!(R in t)&&R in r,r[q]=!(q in t)&&q in r)},_getStdModContent:function(e){return this[e+v]?this[e+v].get(y):null},setStdModContent:function(e,t,n){this.set(e+m,t,{stdModPosition:n})},getStdModNode:function(e,t){var n=this[e+v]||null;return!n&&t&&(n=this._renderStdMod(e)),n},fillHeight:function(e){if(e){var t=this.get(w),r=[this.headerNode,this.bodyNode,this.footerNode],s,o,u=0,a=0,f=!1;for(var l=0,c=r.length;l=0&&e.set(S,a)))}}},e.WidgetStdMod=H},"@VERSION@",{requires:["base-build","widget"]}); YUI.add("widget-position",function(e,t){function d(t){this._posNode=this.get(u),e.after(this._renderUIPosition,this,f),e.after(this._syncUIPosition,this,c),e.after(this._bindUIPosition,this,l)}var n=e.Lang,r=e.Widget,i="xy",s="position",o="positioned",u="boundingBox",a="relative",f="renderUI",l="bindUI",c="syncUI",h=r.UI_SRC,p="xyChange";d.ATTRS={x:{setter:function(e){this._setX(e)},getter:function(){return this._getX()},lazyAdd:!1},y:{setter:function(e){this._setY(e)},getter:function(){return this._getY()},lazyAdd:!1},xy:{value:[0,0],validator:function(e){return this._validateXY(e)}}},d.POSITIONED_CLASS_NAME=r.getClassName(o),d.prototype={_renderUIPosition:function(){this._posNode.addClass(d.POSITIONED_CLASS_NAME)},_syncUIPosition:function(){var e=this._posNode;e.getStyle(s)===a&&this.syncXY(),this._uiSetXY(this.get(i))},_bindUIPosition:function(){this.after(p,this._afterXYChange)},move:function(){var e=arguments,t=n.isArray(e[0])?e[0]:[e[0],e[1]];this.set(i,t)},syncXY:function(){this.set(i,this._posNode.getXY(),{src:h})},_validateXY:function(e){return n.isArray(e)&&n.isNumber(e[0])&&n.isNumber(e[1])},_setX:function(e){this.set(i,[e,this.get(i)[1]])},_setY:function(e){this.set(i,[this.get(i)[0],e])},_getX:function(){return this.get(i)[0]},_getY:function(){return this.get(i)[1]},_afterXYChange:function(e){e.src!=h&&this._uiSetXY(e.newVal)},_uiSetXY:function(e){this._posNode.setXY(e)}},e.WidgetPosition=d},"@VERSION@",{requires:["base-build","node-screen","widget"]}); YUI.add("widget-position-align",function(e,t){function c(t){this._posNode||e.error("WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added"),e.after(this._bindUIPosAlign,this,"bindUI"),e.after(this._syncUIPosAlign,this,"syncUI")}var n=e.Lang,r="align",i="alignOn",s="visible",o="boundingBox",u="offsetWidth",a="offsetHeight",f="region",l="viewportRegion";c.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:!1,value:!1},alignOn:{value:[],validator:e.Lang.isArray}},c.TL="tl",c.TR="tr",c.BL="bl",c.BR="br",c.TC="tc",c.RC="rc",c.BC="bc",c.LC="lc",c.CC="cc",c.prototype={_posAlignUIHandles:null,destructor:function(){this._detachPosAlignUIHandles()},_bindUIPosAlign:function(){this.after("alignChange",this._afterAlignChange),this.after("alignOnChange",this._afterAlignOnChange),this.after("visibleChange",this._syncUIPosAlign)},_syncUIPosAlign:function(){var e=this.get(r);this._uiSetVisiblePosAlign(this.get(s)),e&&this._uiSetAlign(e.node,e.points)},align:function(e,t){return arguments.length?this.set(r,{node:e,points:t}):this._syncUIPosAlign(),this},centered:function(e){return this.align(e,[c.CC,c.CC])},_setAlignCenter:function(e){return e&&this.set(r,{node:e===!0?null:e,points:[c.CC,c.CC]}),e},_uiSetAlign:function(t,r){if(!n.isArray(r)||r.length!==2){e.error("align: Invalid Points Arguments");return}var i=this._getRegion(t),s,o,u;if(!i)return;s=r[0],o=r[1];switch(o){case c.TL:u=[i.left,i.top];break;case c.TR:u=[i.right,i.top];break;case c.BL:u=[i.left,i.bottom];break;case c.BR:u=[i.right,i.bottom];break;case c.TC:u=[i.left+Math.floor(i.width/2),i.top];break;case c.BC:u=[i.left+Math.floor(i.width/2),i.bottom];break;case c.LC:u=[i.left,i.top+Math.floor(i.height/2)];break;case c.RC:u=[i.right,i.top+Math.floor(i.height/2)];break;case c.CC:u=[i.left+Math.floor(i.width/2),i.top+Math.floor(i.height/2)];break;default:}u&&this._doAlign(s,u[0],u[1])},_uiSetVisiblePosAlign:function(e){e?this._attachPosAlignUIHandles():this._detachPosAlignUIHandles()},_attachPosAlignUIHandles:function(){if(this._posAlignUIHandles)return;var t=this.get(o),n=e.bind(this._syncUIPosAlign,this),r=[];e.Array.each(this.get(i),function(i){var s=i.eventName,o=e.one(i.node)||t;s&&r.push(o.on(s,n))}),this._posAlignUIHandles=r},_detachPosAlignUIHandles:function(){var t=this._posAlignUIHandles;t&&((new e.EventHandle(t)).detach(),this._posAlignUIHandles=null)},_doAlign:function(e,t,n){var r=this._posNode,i;switch(e){case c.TL:i=[t,n];break;case c.TR:i=[t-r.get(u),n];break;case c.BL:i=[t,n-r.get(a)];break;case c.BR:i=[t-r.get(u),n-r.get(a)];break;case c.TC:i=[t-r.get(u)/2,n];break;case c.BC:i=[t-r.get(u)/2,n-r.get(a)];break;case c.LC:i=[t,n-r.get(a)/2];break;case c.RC:i=[t-r.get(u),n-r.get(a)/2];break;case c.CC:i=[t-r.get(u)/2,n-r.get(a)/2];break;default:}i&&this.move(i)},_getRegion:function(t){var n;return t?(t=e.Node.one(t),t&&(n=t.get(f))):n=this._posNode.get(l),n},_afterAlignChange:function(e){var t=e.newVal;t&&this._uiSetAlign(t.node,t.points)},_afterAlignOnChange:function(e){this._detachPosAlignUIHandles(),this.get(s)&&this._attachPosAlignUIHandles()}},e.WidgetPositionAlign=c},"@VERSION@",{requires:["widget-position"]}); YUI.add("widget-stack",function(e,t){function O(t){this._stackNode=this.get(f),this._stackHandles={},e.after(this._renderUIStack,this,l),e.after(this._syncUIStack,this,h),e.after(this._bindUIStack,this,c)}var n=e.Lang,r=e.UA,i=e.Node,s=e.Widget,o="zIndex",u="shim",a="visible",f="boundingBox",l="renderUI",c="bindUI",h="syncUI",p="offsetWidth",d="offsetHeight",v="parentNode",m="firstChild",g="ownerDocument",y="width",b="height",w="px",E="shimdeferred",S="shimresize",x="visibleChange",T="widthChange",N="heightChange",C="shimChange",k="zIndexChange",L="contentUpdate",A="stacked";O.ATTRS={shim:{value:r.ie==6},zIndex:{value:0,setter:"_setZIndex"}},O.HTML_PARSER={zIndex:function(e){return this._parseZIndex(e)}},O.SHIM_CLASS_NAME=s.getClassName(u),O.STACKED_CLASS_NAME=s.getClassName(A),O.SHIM_TEMPLATE='',O.prototype={_syncUIStack:function(){this._uiSetShim(this.get(u)),this._uiSetZIndex(this.get(o))},_bindUIStack:function(){this.after(C,this._afterShimChange),this.after(k,this._afterZIndexChange)},_renderUIStack:function(){this._stackNode.addClass(O.STACKED_CLASS_NAME)},_parseZIndex:function(e){var t;return!e.inDoc()||e.getStyle("position")==="static"?t="auto":t=e.getComputedStyle("zIndex"),t==="auto"?null:t},_setZIndex:function(e){return n.isString(e)&&(e=parseInt(e,10)),n.isNumber(e)||(e=0),e},_afterShimChange:function(e){this._uiSetShim(e.newVal)},_afterZIndexChange:function(e){this._uiSetZIndex(e.newVal)},_uiSetZIndex:function(e){this._stackNode.setStyle(o,e)},_uiSetShim:function(e){e?(this.get(a)?this._renderShim():this._renderShimDeferred(),r.ie==6&&this._addShimResizeHandlers()):this._destroyShim()},_renderShimDeferred:function(){this._stackHandles[E]=this._stackHandles[E]||[];var e=this._stackHandles[E],t=function(e){e.newVal&&this._renderShim()};e.push(this.on(x,t))},_addShimResizeHandlers:function(){this._stackHandles[S]=this._stackHandles[S]||[];var e=this.sizeShim,t=this._stackHandles[S];t.push(this.after(x,e)),t.push(this.after(T,e)),t.push(this.after(N,e)),t.push(this.after(L,e))},_detachStackHandles:function(e){var t=this._stackHandles[e],n;if(t&&t.length>0)while(n=t.pop())n.detach()},_renderShim:function(){var e=this._shimNode,t=this._stackNode;e||(e=this._shimNode=this._getShimTemplate(),t.insertBefore(e,t.get(m)),this._detachStackHandles(E),this.sizeShim())},_destroyShim:function(){this._shimNode&&(this._shimNode.get(v).removeChild(this._shimNode),this._shimNode=null,this._detachStackHandles(E),this._detachStackHandles(S))},sizeShim:function(){var e=this._shimNode,t=this._stackNode;e&&r.ie===6&&this.get(a)&&(e.setStyle(y,t.get(p)+w),e.setStyle(b,t.get(d)+w))},_getShimTemplate:function(){return i.create(O.SHIM_TEMPLATE,this._stackNode.get(g))}},e.WidgetStack=O},"@VERSION@",{requires:["base-build","widget"],skinnable:!0}); YUI.add("widget-position-constrain",function(e,t){function m(t){this._posNode||e.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added"),e.after(this._bindUIPosConstrained,this,a)}var n="constrain",r="constrain|xyChange",i="constrainChange",s="preventOverlap",o="align",u="",a="bindUI",f="xy",l="x",c="y",h=e.Node,p="viewportRegion",d="region",v;m.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:!1}},v=m._PREVENT_OVERLAP={x:{tltr:1,blbr:1,brbl:1,trtl:1},y:{trbr:1,tlbl:1,bltl:1,brtr:1}},m.prototype={getConstrainedXY:function(e,t){t=t||this.get(n);var r=this._getRegion(t===!0?null:t),i=this._posNode.get(d);return[this._constrain(e[0],l,i,r),this._constrain(e[1],c,i,r)]},constrain:function(e,t){var r,i,s=t||this.get(n);s&&(r=e||this.get(f),i=this.getConstrainedXY(r,s),(i[0]!==r[0]||i[1]!==r[1])&&this.set(f,i,{constrained:!0}))},_setConstrain:function(e){return e===!0?e:h.one(e)},_constrain:function(e,t,n,r){if(r){this.get(s)&&(e=this._preventOverlap(e,t,n,r));var i=t==l,o=i?r.width:r.height,u=i?n.width:n.height,a=i?r.left:r.top,f=i?r.right-u:r.bottom-u;if(ef)uf&&(e=f):e=a}return e},_preventOverlap:function(e,t,n,r){var i=this.get(o),s=t===l,a,f,c,h,p,d;return i&&i.points&&v[t][i.points.join(u)]&&(f=this._getRegion(i.node),f&&(a=s?n.width:n.height,c=s?f.left:f.top,h=s?f.right:f.bottom,p=s?f.left-r.left:f.top-r.top,d=s?r.right-f.right:r.bottom-f.bottom),e>c?da&&(e=c-a):pa&&(e=h)),e},_bindUIPosConstrained:function(){this.after(i,this._afterConstrainChange),this._enableConstraints(this.get(n))},_afterConstrainChange:function(e){this._enableConstraints(e.newVal)},_enableConstraints:function(e){e?(this.constrain(),this._cxyHandle=this._cxyHandle||this.on(r,this._constrainOnXYChange)):this._cxyHandle&&(this._cxyHandle.detach(),this._cxyHandle=null)},_constrainOnXYChange:function(e){e.constrained||(e.newVal=this.getConstrainedXY(e.newVal))},_getRegion:function(e){var t;return e?(e=h.one(e),e&&(t=e.get(d))):t=this._posNode.get(p),t}},e.WidgetPositionConstrain=m},"@VERSION@",{requires:["widget-position"]}); YUI.add("overlay",function(e,t){e.Overlay=e.Base.create("overlay",e.Widget,[e.WidgetStdMod,e.WidgetPosition,e.WidgetStack,e.WidgetPositionAlign,e.WidgetPositionConstrain])},"@VERSION@",{requires:["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],skinnable:!0}); YUI.add("ob-toolbar",function(d){var a="yui3-toolbar-ctn",e="ob-admin-toolbar",i="ob-btn",h="lnk_notif",b="lnk_flashpost",g="lnk_repost",c=4,m='',l=d.config.host.admin+"/api/notification/count/{callback}",j=d.config.host.admin+"/api/auth",f,k=d.Base.create("OBPanel",d.Overlay,[],{_uiSetVisible:function(n){if(!n&&this.get("smooth")){this._hideSmoothly()}else{k.superclass._uiSetVisible.apply(this,arguments)}},_hidesmoothanim:null,_hideSmoothly:function(){var n=this.get("boundingBox");this._hidesmoothanim=new d.Anim({node:n,to:{opacity:0},duration:0.2,on:{end:function(){this.get("node").setStyle("opacity",1);this.get("node").addClass("yui3-obpanel-hidden")}}});this._hidesmoothanim.run()}});f=d.Base.create("Toolbar",d.Widget,[],{_notifon:false,initializer:function(){this._checkNotif();f.superclass.initializer.apply(this,arguments)},render:function(){var n=this.get("contentBox");if(!OB.isPost){n.one("."+g).remove(true)}f.superclass.render.apply(this,arguments)},bindUI:function(){var n=this.get("contentBox"),q=encodeURIComponent(window.location),p=n.one("."+h+" a"),r=n.one("."+b+" a"),o=n.one("."+g+" a");if(o){o._overlay=new k({bodyContent:'
    ',width:"428px",visible:false,zIndex:99999});o._overlay.render();o.once("click",function(s){this._overlay.get("bodyContent").append(d.Node.create(''))})}p._overlay=new k({bodyContent:'
    ',width:"396px",visible:false,zIndex:99999});p._overlay.render();p.once("click",function(s){this._overlay.get("bodyContent").append(d.Node.create(''))});r._overlay=new k({bodyContent:'
    ',width:"428px",visible:false,zIndex:99999});r._overlay.render();r.once("click",function(s){this._overlay.get("bodyContent").append(d.Node.create(''))});d.each([p,r,o],function(s){s&&s._overlay&&s.on("click",function(v,t,u){v.preventDefault();if(u.get("visible")){u.set("visible",false);this._checkIfCanClose()}else{u.set("align",{node:t,points:[d.WidgetPositionAlign.TR,d.WidgetPositionAlign.BR]});u.set("visible",true);this._checkIfCanClose();t.get("parentNode").removeClass("moving");if(u.get("contentBox").one("form")){u.get("contentBox").one("form input").focus()}}},this,s,s._overlay)},this);d.one("html").on("click",function(t,s){d.each(s,function(u){if(!u){return}if(u.contains(t.target)||u._overlay.get("boundingBox").contains(t.target)){return}u._overlay.set("visible",false);this._checkIfCanClose()},this)},this,[p,r,o]);d.one(window).on("message",d.bind(function(u){var t,s;if(u._event.origin!==d.config.host.admin){return}t=u._event.data;try{t=d.JSON.parse(t);if(t.event==="notifications:height"){s=this.get("contentBox").one("."+h+" a");s._overlay&&s._overlay.get("boundingBox").one("iframe").setStyle("height",Math.max(t.height,40)+"px")}if(t.event==="flashpost:height"){s=this.get("contentBox").one("."+b+" a");s._overlay&&s._overlay.get("boundingBox").one("iframe").setStyle("height",Math.max(t.height,40)+"px")}if(t.event==="repost:height"){s=this.get("contentBox").one("."+g+" a");s._overlay&&s._overlay.get("boundingBox").one("iframe").setStyle("height",Math.max(t.height,40)+"px")}if(t.event==="flashpost:close"){s=this.get("contentBox").one("."+b+" a");d.later(3000,s,function(){this._overlay&&this._overlay.set("smooth",true)&&this._overlay.set("visible",false)&&this._overlay.set("smooth",false)})}if(t.event==="repost:close"){s=this.get("contentBox").one("."+g+" a");d.later(3000,s,function(){this._overlay&&this._overlay.set("smooth",true)&&this._overlay.set("visible",false)&&this._overlay.set("smooth",false)})}}catch(u){}},this))},syncUI:function(){var n=this.get("contentBox"),p=n.all("."+i),o=9999+p.size();p.each(function(q){q.setStyle("zIndex",o);o--});if(this._notifon){n.one("."+h).setStyle("zIndex",o+p.size()+1)}},_checkNotif:function(){d.jsonp(l,{on:{success:function(n){this._displayNotifications(n.results)},failure:function(o){this.set("connected",false);this.syncUI();var n=d.Node.create('');n.on("load",function(p){this.set("connected",true);this.syncUI()},this);d.one("body").append(n);n.setAttribute("src",j)}},context:this})},_checkIfCanClose:function(){var n=this.get("contentBox").all("."+i+" a"),o=true;n.some(function(p){if(p._overlay&&p._overlay.get("visible")){o=false;return true}});this.set("canclose",o)},_open:function(){var n=this.get("contentBox"),p=n.all("."+i+":not(.hidden)"),q=p.item(0).get("region").width,o=p.size()-1;if(this.get("opened")){return}n.addClass("open");this._stopAnims();p.each(function(r){var s=new d.Anim({node:r,to:{right:(q+c)*o},duration:0.2,easing:d.Easing.easeOutStrong});s.run();o--;this._anims.push(s)},this);this.set("opened",true)},_close:function(){var n=this.get("contentBox"),o=n.all("."+i);if(!this.get("opened")||!this.get("canclose")){return}n.removeClass("open");this._stopAnims();o.each(function(p){var q=new d.Anim({node:p,to:{right:0},duration:0.2,easing:d.Easing.easeOutStrong});q.run();this._anims.push(q)},this);this.set("opened",false)},_displayNotifications:function(o){var n=this.get("contentBox"),q=n.one("."+h+" a"),p=q&&q.ancestor("."+i);if(!q){return}if(o&&o.nb>0){if(o.nb>9){o.nb="9+"}q.set("innerHTML",''+o.nb+"");this._notifon=true;p.addClass("pulse");p.once("click",function(){var r=this.get("contentBox"),t=r.one("."+h+" a"),s=t.ancestor("."+i);t.set("innerHTML","");this._notifon=false;s.removeClass("pulse");this.syncUI()},this);this.syncUI()}}},{ATTRS:{contentBox:{valueFn:function(){return d.Node.create(m)}},opened:{value:false,setter:function(n){return !!n}},canclose:{value:true,setter:function(n){return !!n}},connected:{value:false,validator:function(n){return d.Lang.isBoolean(n)}}}});if(!d.one("."+a)){d.one("body").append(d.Node.create('
    '));d.jsonp(d.config.host.sso+"/ping?jsonp={callback}",d.bind(function(n){d.Global.fire("sso:ping",{ping:!!n});if(parseInt(n)===1){var o=new f();o.render(d.one("."+a))}},this))}},"1",{requires:["widget","node","jsonp","overlay","anim","json"]}); YUI.add("ob-gmaps",function(OB){var DATA_OB_GMAPS="ob-js-gmaps-data",init=function(){var gmapInfos=OB.all("."+DATA_OB_GMAPS);gmapInfos.each(function(gmapInfo){var data;try{data=OB.JSON.parse(gmapInfo.get("innerHTML"))}catch(e){data={}}try{data.toEval&&eval(data.toEval)}catch(e){null}gmapInfo.remove()},this)};OB.on("domready",init)},"1",{requires:["json","node"]}); YUI.add("plugin",function(e,t){function n(t){!this.hasImpl||!this.hasImpl(e.Plugin.Base)?n.superclass.constructor.apply(this,arguments):n.prototype.initializer.apply(this,arguments)}n.ATTRS={host:{writeOnce:!0}},n.NAME="plugin",n.NS="plugin",e.extend(n,e.Base,{_handles:null,initializer:function(e){this._handles=[]},destructor:function(){if(this._handles)for(var e=0,t=this._handles.length;ed.DOM.docWidth()){h.set("align",{node:this.get("host"),points:i?[d.WidgetPositionAlign.TR,d.WidgetPositionAlign.BR]:[d.WidgetPositionAlign.BR,d.WidgetPositionAlign.TR]});g.removeClass("arrow-left");g.addClass("arrow-right")}else{g.removeClass("arrow-left");g.removeClass("arrow-right")}}},_increaseCount:function(){var g=this.get("host"),e=g.one(".ob-repost-count"),f=parseInt(e.get("innerText"));if(!d.Lang.isNumber(f)){f=0}f++;e.set("innerHTML",f)},_getOverlay:function(){var f=this.get("host"),e=f.getAttribute("href"),g=this._overlay;if(!g){g=new b({bodyContent:'
    ',width:"428px",visible:false,zIndex:99999});g.render();g.get("boundingBox").addClass("button-overlay");d.one(window).on("resize",this._positionOverlay,this);d.one(window).on("message",d.bind(function(j){var i,h;if(j._event.origin!==d.config.host.admin&&j._event.origin!==d.config.host.sso){return}i=j._event.data;try{i=d.JSON.parse(i);if(i.event==="repost:height"||i.event==="iframe:height"){if(this._lastheight!=i.height){this._lastheight=i.height;this._positionOverlay(Math.max(i.height,40))}}if(i.event==="repost:close"){d.later(3000,this,function(){this._overlay&&this._overlay.set("smooth",true)&&this._overlay.set("visible",false)&&this._overlay.set("smooth",false)})}if(i.event==="repost:reposted"){this._increaseCount()}}catch(j){}},this));this._overlay=g}return g}},{NS:"repostbutton",NAME:"RepostButton"});a=d.all("a.ob-repost-btn");a.unplug(c);a.plug(c)},"1",{requires:["node","overlay","plugin"]}); YUI.add("ob-popup",function(a){a.all("a.popup").each(function(b){b.on("click",function(d){var c=window.open();if(!c){return}c.location=this.getAttribute("href");d.preventDefault()})})},"1",{requires:["node","event"]}); YUI.add("ob-resize",function(a){var b="ob-section-video",c=function(){var d=a.all("."+b+" iframe");d.each(function(i){var h=i.get("width"),e=i.get("height"),j=e/h,g=i.get("offsetWidth"),f,k=i.get("src");if(g");d.set("innerHTML",e.get("innerHTML"));d.setAttribute("href",c.Base64.decode(e.getAttribute(a)));e.removeAttribute(a);e.get("attributes").each(function(f){d.setAttribute(f.get("name"),f.get("nodeValue"))});e.insert(d,"before");e.remove()};c.all("span["+a+"]").each(b)},"1",{requires:["node","gallery-base64"]}); YUI.add("cookie",function(e,t){function h(e){throw new TypeError(e)}function p(e){(!s(e)||e==="")&&h("Cookie name must be a non-empty string.")}function d(e){(!s(e)||e==="")&&h("Subcookie name must be a non-empty string.")}var n=e.Lang,r=e.Object,i=null,s=n.isString,o=n.isObject,u=n.isUndefined,a=n.isFunction,f=encodeURIComponent,l=decodeURIComponent,c=e.config.doc;e.Cookie={_createCookieString:function(e,t,n,r){r=r||{};var i=f(e)+"="+(n?f(t):t),u=r.expires,a=r.path,l=r.domain;return o(r)&&(u instanceof Date&&(i+="; expires="+u.toUTCString()),s(a)&&a!==""&&(i+="; path="+a),s(l)&&l!==""&&(i+="; domain="+l),r.secure===!0&&(i+="; secure")),i},_createCookieHashString:function(e){o(e)||h("Cookie._createCookieHashString(): Argument must be an object.");var t=[];return r.each(e,function(e,n){!a(e)&&!u(e)&&t.push(f(n)+"="+f(String(e)))}),t.join("&")},_parseCookieHash:function(e){var t=e.split("&"),n=i,r={};if(e.length)for(var s=0,o=t.length;s0){var o=t===!1?function(e){return e}:l,a=e.split(/;\s/g),f=i,c=i,h=i;for(var p=0,d=a.length;p");f.setAttribute("src",a.getAttribute("data-iframe-src"));f.on("load",function(h){this.setStyle("visibility","visible");a.setStyle("overflow","hidden");a.one("a").setStyle("visibility","hidden")});f.setStyle("visibility","hidden");a.append(f)}});if(!d.Cookie.get("ob_follow")){c=d.later(20000,a,function(){var e=a.one(".bubble-text").get("innerHTML");b=new d.Node.create('
    '+e+'
    ');d.one("body").append(b);d.Cookie.set("ob_follow",true,{expires:new Date(2050,1,1)});b.on("click",function(){b.remove()});a.on("click",function(){b.remove()})});d.one(window).on("message",function(f){if(f._event.origin.match(d.config.host.admin)){if("click"===f._event.data||"followed"===f._event.data){b&&b.remove();c&&c.cancel()}}})}},"1.0",{requires:["event","node","cookie"]});