");
this.getitnow.setBody("
");
this.getitnow.render(document.body);
YAHOO.util.Event.addListener(_2+"ginClose","click",this.getitnow.hide,this.getitnow,true);
}
this.getitnow.show();
},getthisfuncOutside:function(){
var _2a=(_1)?pid:$.a.pipe_id;
var _2b=(_1)?"":$.f.queryparams;
var url="http://pipes.yahoo.com/pipes/badge.config?page=1&_btype=list&_id="+_2a+_2b;
window.open(url);
},listbadge:{init:function(r){
if(typeof (YAHOO)=="undefined"){
$.f.timeoutCount--;
if($.f.timeoutCount==0){
}else{
window.setTimeout(function(){
$.f.listbadge.init(r);
},1000);
}
return;
}
YAHOO.util.Dom.removeClass($.w.ajaxwait,"PBajaxwait");
if(!$.f.inpipe){
var _2e=document.getElementById("YUICscript");
if(_2e==null){
$.f.runScript("http://yui.yahooapis.com/2.4.1/build/container/container-min.js","YUICscript");
}
$.w.dtf.style.display="block";
if(r.value.published!=""){
this.checkViewport();
}
}
YAHOO.util.Event.addListener(window,"resize",this.resized,this,true);
var w=$.w.r.offsetWidth;
if(!$.f.inpipe){
var _30=(parseInt($.a.containerPadding,10)*2);
var h=$.w.offsetHeight-$.w.h.offsetHeight-$.w.dtf.offsetHeight-_30-5;
if(h>0){
$.w.r.style.height=h+"px";
}
}
this.w=w;
this.remove();
if(r&&r.value&&r.value.items&&r.value.items.length){
this.startnum=0;
this.orglen=r.value.items.length;
this.countby=$.a.count;
this.results=r;
var _32=(this.orglen
=422&&YAHOO.util.Dom.getViewportHeight()>=415){
YAHOO.util.Event.addListener($.f.getThisDiv,"click",$.f.getthisfuncInside,this,true);
}else{
YAHOO.util.Event.addListener($.f.getThisDiv,"click",$.f.getthisfuncOutside,this,true);
}
},resized:function(){
if(this.currheight!=document.documentElement.clientHeight&&this.currheight!=""){
this.checkViewport();
}
this.currheight=document.documentElement.clientHeight;
},createDescription:function(_34,_35){
var _36=(_34.smallimg==undefined)?"":"";
var _37=(_35=="imgBadge")?"":"
"+_36+"
";
var _38=(_36==""||_35=="imgBadge")?"style='margin-left:0px;'":"style='margin-left:55px;'";
var _39="
";
return _39;
},createDescThumbs:function(obj,w,_3c){
var _3d=obj.getElementsByTagName("ul");
this.smallthumbholder=_3d[0];
var ww=w-55;
this.smallitemimgcount=Math.round(ww/50);
var _3f="";
var _40=(this.smallitemimgcount>_3c.usethisimgarr.length)?_3c.usethisimgarr.length:this.smallitemimgcount;
for(var x=1;x<_40;x++){
_3f+="
";
}
if(_3f==""){
this.smallthumbholder.style.marginTop="0px";
}else{
var t=this.smallthumbholder.cloneNode(true);
t.innerHTML=_3f;
this.smallthumbholder.parentNode.replaceChild(t,this.smallthumbholder);
this.smallthumbholder=t;
var _43=this.smallthumbholder.getElementsByTagName("img");
this.thumbnails=_43;
for(i=0;i<_43.length;i++){
new this.makeGrow(_43[i]);
}
}
},makeGrow:function(img){
var _45=null;
var _46=img;
var _47,w,h;
var _4a=function(obj){
_47=YAHOO.util.Dom.getXY(_46);
w=parseInt(YAHOO.util.Dom.getStyle(_46,"width"));
h=parseInt(YAHOO.util.Dom.getStyle(_46,"height"));
_45=obj.cloneNode(false);
_45.style.position="absolute";
_45.style.width="32px";
_45.style.height="32px";
_45.style.top=_47[1]+"px";
_45.style.left=_47[0]+"px";
_45.style.zIndex="999";
_45.style.display="none";
_45.style.padding="2px";
_45.style.border="1px solid #eee";
_45.className="clonedSmallImg";
YAHOO.util.Event.addListener(_45,"mouseout");
document.body.appendChild(_45);
_4c();
};
var _4c=function(e){
if(_45==null){
_4a(_46);
return;
}
_45.style.display="inline";
var _4e=new YAHOO.util.Anim(_45,{width:{to:200},height:{to:200}},0.6,YAHOO.util.Easing.backOut);
var _4f=_4e.getEl();
_4e.onTween.subscribe(function(){
var nx=_47[0]-((_4f.offsetWidth-w)>>1);
var ny=_47[1]-((_4f.offsetHeight-h)>>1);
if(nx<0){
nx=0;
}
if(ny<0){
ny=0;
}
YAHOO.util.Dom.setXY(_4f,[nx,ny]);
});
_4e.animate();
$.f.listbadge.growAnim=_4e;
YAHOO.util.Event.addListener(_45,"mouseout",_52);
};
var _52=function(){
if($.f.listbadge.growAnim.isAnimated()==true){
window.setTimeout(function(){
_52();
},50);
return;
}
YAHOO.util.Event.removeListener(_45,"mouseout");
var _53=new YAHOO.util.Anim(_45,{width:{to:32},height:{to:32}},0.2);
var _54=_53.getEl();
_53.onTween.subscribe(function(){
var nx=_47[0]-((_54.offsetWidth-w)>>1);
var ny=_47[1]-((_54.offsetHeight-h)>>1);
if(nx<0){
nx=0;
}
if(ny<0){
ny=0;
}
YAHOO.util.Dom.setXY(_54,[nx,ny]);
});
_53.onComplete.subscribe(function(){
var _57=_53.getEl();
_57.style.display="none";
});
_53.animate();
};
YAHOO.util.Event.addListener(_46,"mouseover",_4c);
},remove:function(){
$.w.r.innerHTML="";
},create:function(_58,_59){
for(var i=_58;i<_59;i++){
var _5b=this.results.value.items[i];
var _5c=_5b.media.regular.length;
var _5d=_5b.media.thumbnails.length;
var _5e=(_5c>_5d)?_5b.media.regular:_5b.media.thumbnails;
_5b.usethisimgarr=_5e;
if(_5e.length!=0){
if(_5b.media.thumbnails.length!=0){
_5b.smallimg=_5b.media.thumbnails[0].url;
}else{
_5b.smallimg=_5e[0].url;
}
}
var li=document.createElement("LI");
this.li=li;
li.className="ybi";
if(i%2){
li.className+=" odd";
}
li.innerHTML=this.createDescription(_5b);
this.createDescThumbs(this.li,this.w,_5b);
var _60=li.getElementsByTagName("div")[2];
var _61=li.getElementsByTagName("div")[3];
var _62=li.getElementsByTagName("div")[4];
var _63=li.getElementsByTagName("div")[5];
if(_60.innerHTML!=""){
YAHOO.util.Dom.setStyle(_60,"margin-right","8px");
}
YAHOO.util.Dom.setStyle(_61,"margin-left","0px");
$.w.r.appendChild(li);
}
if($.f.inpipe){
if(this.orglen>_59||_58!=0){
this.pagDiv=document.createElement("div");
this.pagDiv.className="paginate";
}
if(this.orglen>_59){
var _64=document.createElement("a");
_64.innerHTML="Next >";
YAHOO.util.Event.addListener(_64,"click",this.next_pag,this,true);
this.pagDiv.appendChild(_64);
}
if(_58!=0){
var _65=document.createElement("a");
_65.innerHTML="< Prev";
if(this.orglen>_59){
_65.style.right="40px";
_65.style.position="absolute";
}else{
_65.style.right="";
_65.style.position="";
}
YAHOO.util.Event.addListener(_65,"click",this.prev_pag,this,true);
this.pagDiv.appendChild(_65);
}
if(this.orglen>_59||_58!=0){
$.w.r.appendChild(this.pagDiv);
this.pagDiv=null;
}
}
},prev_pag:function(){
this.remove();
var _66=this.startorg-this.countby;
var _67=_66+this.countby;
if(_67>=this.orglen){
_67=this.orglen;
}
this.create(_66,_67);
location.href="#";
this.startnum=_67;
this.startorg=_66;
},next_pag:function(){
this.remove();
var _68=this.startnum;
var _69=this.countby+_68;
if(_69>=this.orglen){
_69=this.orglen;
}
this.create(_68,_69);
location.href="#";
this.startnum=_69;
this.startorg=_68;
}}};
}();
var _6a=/listbadge.js$/;
var _6b=function(){
$.f.init(_6a);
};
if(_1){
_6b();
}else{
if(typeof window.addEventListener!=="undefined"){
if(window.opera){
_6b();
}else{
window.addEventListener("load",_6b,false);
}
}else{
if(typeof window.attachEvent!=="undefined"){
window.attachEvent("onload",_6b);
}
}
}
})();
0 comments:
Post a Comment