Free javascript Hosting


jscripts-min.js

Uploaded on Sep 22 2009 18:56 by ro.zanchetta

var toolOpen="";function ftool(cual){var cualmostrar=document.getElementById(cual);if(cualmostrar.style.display=='block'){cualmostrar.style.display='none';toolOpen="";}else{if(toolOpen!=""){document.getElementById(toolOpen).style.display='none';}
cualmostrar.style.display='block';toolOpen=cual;}}
function togglebarra(){var labarradiv=document.getElementById('footertools-barra');var labarraimg=document.getElementById('icotoggle');if(labarradiv.className=="footertools-barra-max"){labarradiv.className="footertools-barra-min"
labarraimg.src="http://files.getdropbox.com/u/1359531/Bloggersphera/imagens/open-btn.png";}else{labarradiv.className="footertools-barra-max"
labarraimg.src="http://files.getdropbox.com/u/1359531/Bloggersphera/imagens/close-btn.png";}}
(function($){$.fn.s3Slider=function(vars){var element=this;var timeOut=(vars.timeOut!=undefined)?vars.timeOut:4000;var current=null;var timeOutFn=null;var faderStat=true;var mOver=false;var items=$("#"+element[0].id+"Content ."+element[0].id+"Image");var itemsSpan=$("#"+element[0].id+"Content ."+element[0].id+"Image span");items.each(function(i){$(items[i]).mouseover(function(){mOver=true;});$(items[i]).mouseout(function(){mOver=false;fadeElement(true);});});var fadeElement=function(isMouseOut){var thisTimeOut=(isMouseOut)?(timeOut/2):timeOut;thisTimeOut=(faderStat)?10:thisTimeOut;if(items.length>0){timeOutFn=setTimeout(makeSlider,thisTimeOut);}else{console.log("Poof..");}}
var makeSlider=function(){current=(current!=null)?current:items[(items.length-1)];var currNo=jQuery.inArray(current,items)+1
currNo=(currNo==items.length)?0:(currNo-1);var newMargin=$(element).width()*currNo;if(faderStat==true){if(!mOver){$(items[currNo]).fadeIn((timeOut/6),function(){if($(itemsSpan[currNo]).css('bottom')==0){$(itemsSpan[currNo]).slideUp((timeOut/6),function(){faderStat=false;current=items[currNo];if(!mOver){fadeElement(false);}});}else{$(itemsSpan[currNo]).slideDown((timeOut/6),function(){faderStat=false;current=items[currNo];if(!mOver){fadeElement(false);}});}});}}else{if(!mOver){if($(itemsSpan[currNo]).css('bottom')==0){$(itemsSpan[currNo]).slideDown((timeOut/6),function(){$(items[currNo]).fadeOut((timeOut/6),function(){faderStat=true;current=items[(currNo+1)];if(!mOver){fadeElement(false);}});});}else{$(itemsSpan[currNo]).slideUp((timeOut/6),function(){$(items[currNo]).fadeOut((timeOut/6),function(){faderStat=true;current=items[(currNo+1)];if(!mOver){fadeElement(false);}});});}}}}
makeSlider();};})(jQuery);;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:0,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);(function($){if(!document.defaultView||!document.defaultView.getComputedStyle){var oldCurCSS=jQuery.curCSS;jQuery.curCSS=function(elem,name,force){if(name!=='backgroundPosition'||!elem.currentStyle||elem.currentStyle[name]){return oldCurCSS.apply(this,arguments);}
var style=elem.style;if(!force&&style&&style[name]){return style[name];}
return oldCurCSS(elem,'backgroundPositionX',force)+' '+oldCurCSS(elem,'backgroundPositionY',force);};}})(jQuery);(function($){function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}
$.fx.step.backgroundPosition=function(fx){if(!fx.bgPosReady){var start=$.curCSS(fx.elem,'backgroundPosition');if(!start){start='0px 0px';}
start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.options.curAnim.backgroundPosition);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];fx.bgPosReady=true;}
var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];};})(jQuery);$(function(){$('#animate a').css({backgroundPosition:"0px 0px"}).mouseover(function(){$(this).stop().animate({backgroundPosition:"(-80px -190px)"},{duration:1000})}).mouseout(function(){$(this).stop().animate({backgroundPosition:"(-130px 0px)"},{duration:700,complete:function(){$(this).css({backgroundPosition:"0px 0px"})}})})
$('#animate li li a').css({backgroundPosition:"-640px 0px"}).mouseover(function(){$(this).stop().animate({backgroundPosition:"(0px 0px)"},{duration:500})}).mouseout(function(){$(this).stop().animate({backgroundPosition:"(-640px 0px)"},{duration:400,complete:function(){$(this).css({backgroundPosition:"-640px 0px"})}})})});this.imagePreview=function(){xOffset=10;yOffset=30;$("a.preview").hover(function(e){this.t=this.title;this.title="";var c=(this.t!="")?"<br/>"+this.t:"";$("body").append("<p id='preview'><img src='"+this.href+"' alt='Image preview' />"+c+"</p>");$("#preview").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px").fadeIn("normal");},function(){this.title=this.t;$("#preview").remove();});$("a.preview").mousemove(function(e){$("#preview").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px");});};$(document).ready(function(){imagePreview();});(function($){var conf={},numMSG=20;containerDiv="juitterContainer",loadMSG="Carregando...",imgName="loader.gif",readMore="Leia mais...",nameUser="image"
live:"live-60",aURL="";msgNb=1;var mode,param,time,lang,contDiv,loadMSG,gifName,numMSG,readMore,fromID,ultID;var running=false;apifMultipleUSER="http://search.twitter.com/search.json?from%3A";apifUSER="http://search.twitter.com/search.json?q=from%3A";apitMultipleUSER="http://search.twitter.com/search.json?to%3A";apitUSER="http://search.twitter.com/search.json?q=to%3A";apiSEARCH="http://search.twitter.com/search.json?q=";$.Juitter={registerVar:function(opt){mode=opt.searchType;param=opt.searchObject;timer=opt.live;lang=opt.lang?opt.lang:"";contDiv=opt.placeHolder?opt.placeHolder:containerDiv;loadMSG=opt.loadMSG?opt.loadMSG:loadMSG;gifName=opt.imgName?opt.imgName:imgName;numMSG=opt.total?opt.total:numMSG;readMore=opt.readMore?opt.readMore:readMore;fromID=opt.nameUser?nameUser:nameUser;},start:function(opt){ultID=0;if($("#"+contDiv)){this.registerVar(opt);this.loading();aURL=this.createURL();this.conectaTwitter(1);if(timer!=undefined&&!running)this.temporizador();}},update:function(){this.conectaTwitter(2);if(timer!=undefined)this.temporizador();},loading:function(){if(loadMSG=="image/gif"){$("<img></img>").attr('src',gifName).appendTo("#"+contDiv);}else $("#"+contDiv).html(loadMSG);},createURL:function(){var url="";jlg=lang.length>0?"&lang="+lang:jlg="";var seachMult=param.search(/,/);if(seachMult>0)param="&ors="+param.replace(/,/g,"+");if(mode=="fromUser"&&seachMult<=0)url=apifUSER+param;else if(mode=="fromUser"&&seachMult>=0)url=apifMultipleUSER+param;else if(mode=="toUser"&&seachMult<=0)url=apitUSER+param;else if(mode=="toUser"&&seachMult>=0)url=apitMultipleUSER+param;else if(mode=="searchWord")url=apiSEARCH+param+jlg;url+="&rpp="+numMSG;return url;},delRegister:function(){if(msgNb>=numMSG){$(".twittLI").each(function(o,elemLI){if(o>=numMSG)$(this).hide("slow");});}},conectaTwitter:function(e){$.ajax({url:aURL,type:'GET',dataType:'jsonp',timeout:1000,error:function(){$("#"+contDiv).html("fail#");},success:function(json){if(e==1)$("#"+contDiv).html("");$.each(json.results,function(i,item){if(e==1||(i<numMSG&&item.id>ultID)){if(i==0){tultID=item.id;$("<ul></ul>").attr('id','twittList'+ultID).attr('class','twittList').prependTo("#"+contDiv);}
if(item.text!="undefined"){var link="http://twitter.com/"+item.from_user+"/status/"+item.id;if(fromID=="image")mHTML="<a href='http://www.twitter.com/"+item.from_user+"'><img src='"+item.profile_image_url+"' alt='"+item.from_user+"' class='juitterAvatar' /></a> "+$.Juitter.textFormat(item.text)+" <a href='"+link+"' class='JRM'>"+readMore+"</a>";else mHTML="<a href='http://www.twitter.com/"+item.from_user+"'>@"+item.from_user+":</a> "+$.Juitter.textFormat(item.text)+" <a href='"+link+"'>"+readMore+"</a>";$("<li></li>").html(mHTML).attr('id','twittLI'+msgNb).attr('class','twittLI').appendTo("#twittList"+ultID);$('#twittLI'+msgNb).hide();$('#twittLI'+msgNb).show("slow");$.Juitter.delRegister();msgNb++;}}});ultID=tultID;}});},textFormat:function(texto){var exp=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;texto=texto.replace(exp,"<a href='$1' class='extLink'>$1</a>");var exp=/[\@]+([A-Za-z0-9-_]+)/ig;texto=texto.replace(exp,"<a href='http://twitter.com/$1' class='profileLink'>@$1</a>");var exp=/[\#]+([A-Za-z0-9-_]+)/ig;texto=texto.replace(exp,"<a href='http://juitter.com/#$1' onclick='$.Juitter.start({searchType:\"searchWord\",searchObject:\"$1\"});return false;' class='hashLink'>#$1</a>");if(mode=="searchWord"){tempParam=param.replace(/&ors=/,"");arrParam=tempParam.split("+");$.each(arrParam,function(i,item){regExp=eval('/ '+item+'/ig');newString=new String(' <b>'+item+'</b> ');texto=texto.replace(regExp,newString);});}
return texto;},temporizador:function(){running=true;aTim=timer.split("-");if(aTim[0]=="live"&&aTim[1].length>0){tempo=aTim[1]*1000;setTimeout("$.Juitter.update()",tempo);}}};})(jQuery);

Back to list