/** * Hosted by Overblog.com (JFG Networks) * All rights reserved 2011-2012 */ 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("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)}})},"1.0",{requires:["event","node","cookie"]}); YUI.add("jsonp",function(e,t){function r(){this._init.apply(this,arguments)}var n=e.Lang.isFunction;r.prototype={_init:function(t,r){this.url=t,this._requests={},this._timeouts={},r=n(r)?{on:{success:r}}:r||{};var i=r.on||{};i.success||(i.success=this._defaultCallback(t,r)),this._config=e.merge({context:this,args:[],format:this._format,allowCache:!1},r,{on:i})},_defaultCallback:function(){},send:function(){function u(e,r){return n(e)?function(n){var o=!0,u="_requests";r?(++t._timeouts[s],--t._requests[s]):(t._requests[s]||(o=!1,u="_timeouts"),--t[u][s]),!t._requests[s]&&!t._timeouts[s]&&delete YUI.Env.JSONP[s],o&&e.apply(i.context,[n].concat(i.args))}:null}var t=this,r=e.Array(arguments,0,!0),i=t._config,s=t._proxy||e.guid(),o;return i.allowCache&&(t._proxy=s),t._requests[s]===undefined&&(t._requests[s]=0),t._timeouts[s]===undefined&&(t._timeouts[s]=0),t._requests[s]++,r.unshift(t.url,"YUI.Env.JSONP."+s),o=i.format.apply(t,r),i.on.success?(YUI.Env.JSONP[s]=u(i.on.success),e.Get.script(o,{onFailure:u(i.on.failure),onTimeout:u(i.on.timeout,!0),timeout:i.timeout,charset:i.charset,attributes:i.attributes}),t):t},_format:function(e,t){return e.replace(/\{callback\}/,t)}},e.JSONPRequest=r,e.jsonp=function(t,n){var r=new e.JSONPRequest(t,n);return r.send.apply(r,e.Array(arguments,2,!0))},YUI.Env.JSONP||(YUI.Env.JSONP={})},"@VERSION@",{requires:["get","oop"]}); 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"]});