oPlugin = { PluginWidth:80, PluginHeight:1, SlideBig:'Small', LabelBgColor:'#f7f7f7', BgColor:'#fefefe', Color:'#6A6A6A', FontSize:'11', LinkColor:'#587cc8', Timer:null, LastBox:null, Browser: { Explorer: !!(navigator.appName=='Microsoft Internet Explorer'), Other: !!!(navigator.appName=='Microsoft Internet Explorer'), Chrome: !!(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) }, boxDialog: function(sId){ if(document.getElementById('content_'+sId).style.display=='block'){ if(oPlugin.LastBox){ if(document.getElementById('boxDialog_'+oPlugin.LastBox)){ jQuery('#boxDialog_'+oPlugin.LastBox).hide('slow'); document.getElementById('boxDialog_'+oPlugin.LastBox).style.zIndex=0; } jQuery('#content_'+oPlugin.LastBox).show('fast'); document.getElementById('arrow_'+oPlugin.LastBox).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow.png'; } if(document.getElementById('boxDialog_'+sId)){ jQuery('#boxDialog_'+sId).show('slow'); document.getElementById('boxDialog_'+sId).style.zIndex=10; } jQuery('#content_'+sId).hide('fast'); oPlugin.LastBox=sId; document.getElementById('arrow_'+sId).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow_s.png'; }else{ oPlugin.LastBox=null; if(document.getElementById('boxDialog_'+sId)){ jQuery('#boxDialog_'+sId).hide('slow'); } jQuery('#content_'+sId).show('fast'); document.getElementById('arrow_'+sId).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow.png'; } }, boxDialogShow: function(sId){ if(document.getElementById('content_'+sId).style.display=='block'){ if(oPlugin.LastBox){ if(document.getElementById('boxDialog_'+oPlugin.LastBox)){ jQuery('#boxDialog_'+oPlugin.LastBox).hide('slow'); document.getElementById('boxDialog_'+oPlugin.LastBox).style.zIndex=0; } jQuery('#content_'+oPlugin.LastBox).show('fast'); document.getElementById('arrow_'+oPlugin.LastBox).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow.png'; } if(document.getElementById('boxDialog_'+sId)){ jQuery('#boxDialog_'+sId).show('slow'); document.getElementById('boxDialog_'+sId).style.zIndex=10; } jQuery('#content_'+sId).hide('fast'); oPlugin.LastBox=sId; document.getElementById('arrow_'+sId).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow_s.png'; } }, hideShowToolbar: function(){ if(document.getElementById('wpPlugin-MainFrame').style.display=='none'){ jQuery('#wpPlugin-MainFrame').show(1500); document.getElementById('wpSocciable').className= 'wpSocciable'+oPlugin.SlideBig+''; document.getElementById('wpSocciable').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-sociable.png)"; document.getElementById('wpSocciableClose').className= 'wpSocciableClose'; document.getElementById('wpSocciableClose').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-close.png)"; document.getElementById('wpSocciable').style.marginLeft = '-20px'; document.getElementById('wpSocciableClose').style.marginLeft = '-20px'; }else{ document.getElementById('wpPlugin-MainFrame').style.display='none'; document.getElementById('wpSocciable').className= 'wpSocciable'+oPlugin.SlideBig+'-c'; document.getElementById('wpSocciable').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-sociable-c.png)"; document.getElementById('wpSocciableClose').className= 'wpSocciableClose-c'; document.getElementById('wpSocciableClose').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-close-c.png)"; } }, focus:function(obj){ obj.style.opacity='1'; obj.style.filter="alpha(opacity='100')"; }, blur:function(obj){ obj.style.opacity='0.4'; obj.style.filter="alpha(opacity='40')"; }, refreshPosition: function(){ var scrolltop = jQuery('html,body').scrollTop(); if (oPlugin.Browser.Chrome){ scrolltop = document.body.scrollTop; } var div = jQuery('#wpPlugin-BOX'); var start = jQuery(div).offset().top; var p = jQuery(window).scrollTop(); jQuery(div).css('position','fixed'); //document.getElementById('wpPlugin-BOX').style.top = (scrolltop+40) + 'px'; /*if(parseInt(document.getElementById('wpPlugin-BOX').style.top.replace('px',''))!=(scrolltop+40)){ document.getElementById('wpPlugin-BOX').style.display='none'; document.getElementById('wpPlugin-BOX').style.top = (scrolltop+40) + 'px'; if(parseInt(document.getElementById('wpPlugin-BOX').style.top.replace('px',''))>(scrolltop+40)){ document.getElementById('wpPlugin-BOX').style.top = (parseInt(document.getElementById('wpPlugin-BOX').style.top.replace('px',''))-1) + 'px'; }else{ document.getElementById('wpPlugin-BOX').style.top = (parseInt(document.getElementById('wpPlugin-BOX').style.top.replace('px',''))+1) + 'px'; } document.getElementById('wpPlugin-BOX').style.display=''; }else{ clearInterval(oPlugin.Timer); oPlugin.Timer=null; } */ }, toolbarStart: function(sID_Parent,sMove,sHeight,sWidth,sBgColor,sLabelBgColor,sSlideBig,sColor,sFontSize,sLinkColor){ if(sLinkColor){ oPlugin.LinkColor = sLinkColor; } if(sFontSize){ oPlugin.FontSize = sFontSize; } if(sColor){ oPlugin.Color = sColor; } if(sBgColor){ oPlugin.BgColor = sBgColor; } if(sSlideBig){ oPlugin.SlideBig = "Big"; }//If Null == Small! if(sLabelBgColor){ oPlugin.LabelBgColor = sLabelBgColor; } if(sWidth){ oPlugin.PluginWidth = sWidth; } if(sHeight){ oPlugin.PluginHeight = sHeight; } if(sMove){ window.onscroll = function (e) { if(!oPlugin.Timer){ oPlugin.Timer = setInterval("oPlugin.refreshPosition();", 50); } } } jQuery(document).ready(function(){ document.getElementById('wpPlugin-BOX').style.marginLeft = (21 - jQuery("body").css("padding-left").replace('px','')) + 'px'; }); var Base = '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
'+ '
'+ ''+ '
    '+ '
'+ '
'+ '
'+ '
'; document.getElementById(sID_Parent).innerHTML = Base + document.getElementById(sID_Parent).innerHTML; oPlugin.InitializeShowObj = 'wpPlugin-MainFrame'; document.getElementById(oPlugin.InitializeShowObj).style.display='none'; oPlugin.InitializeShow = setInterval("jQuery('#'+oPlugin.InitializeShowObj).show(3000);clearInterval(oPlugin.InitializeShow);", 1000); //oPlugin.blur(document.getElementById(oPlugin.InitializeShowObj)); //http://onmouseover="oPlugin.focus(this);" onmouseout="oPlugin.blur(this);" onmouseover"this.style.opacity=1;" onmouseout"this.style.opacity=0.4;" /*if(!oPlugin.Browser.Explorer){ document.getElementById(sID_Parent).style.display='none'; oPlugin.InitializeShowObj = sID_Parent; oPlugin.InitializeShow = setInterval("jQuery('#'+oPlugin.InitializeShowObj).show(3000);clearInterval(oPlugin.InitializeShow);", 1000); }else{ document.getElementById('wpPlugin-MainFrame').style.filter='alpha(opacity=40)'; }*/ document.getElementById('wpPlugin-BOX').style.top = '20px'; document.getElementById('wpSocciable').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-sociable.png)"; document.getElementById('wpSocciableClose').style.backgroundImage="url("+jQuery("#skyscraper_dir").val()+"images/toolbar/slide-close.png)"; }, CreateGoToTop:function(sId,sTitle,sContent){ oLi = oPlugin.createElement('li',sId,'item',null,'',null); var oLi_Functions; oLi_Functions = Array(); oLi_Functions[0]= new Array(); oLi_Functions[0][0] = 'click'; oLi_Functions[0][1] = function(){ // var scrolltop = jQuery('html,body').scrollTop(); if (oPlugin.Browser.Chrome){ document.body.scrollTop = 0; } else{ jQuery('html,body').scrollTop(0); } }; oLabel = oPlugin.createElement('div','title_' +sId,'title',oLi_Functions,''+sTitle+'',null); oLabel.style.background=oPlugin.LabelBgColor; oLi.appendChild(oLabel); oLi_Content = oPlugin.createElement('div','content_' +sId,'content',oLi_Functions,sContent,null); if(sContent==''){oLi_Content.style.lineHeight='1px';oLi_Content.style.height='1px';oLi_Content.innerHTML='';} oLi_Content.align='center'; oLi_Content.style.display='block'; oLi_Content.style.cursor='pointer'; oLi.appendChild(oLi_Content); document.getElementById('toolbar').appendChild(oLi); }, CreateSimpleNode:function(sId,sTitle,sContent,display){ oLi = oPlugin.createElement('li',sId,'item',null,'',null); var oLi_Functions; oLi_Functions = Array(); oLi_Functions[0]= new Array(); oLi_Functions[0][0] = 'click'; oLi_Functions[0][1] = function(){ if(document.getElementById('content_'+sId).style.display=='none'){ document.getElementById('content_'+sId).style.display='block'; document.getElementById('arrow_'+sId).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow.png'; }else{ document.getElementById('content_'+sId).style.display='none'; document.getElementById('arrow_'+sId).src=jQuery("#skyscraper_dir").val()+'images/toolbar/arrow_s.png'; } }; if(display){ arrow=''; }else{ arrow='_s'; } oLabel = oPlugin.createElement('div','title_' +sId,'title',oLi_Functions,''+sTitle+'',null); oLabel.style.background=oPlugin.LabelBgColor; oLi.appendChild(oLabel); oLi_Content = oPlugin.createElement('div','content_' +sId,'content',oLi_Functions,sContent,null); if(sContent==''){oLi_Content.style.lineHeight='1px';oLi_Content.style.height='1px';oLi_Content.innerHTML='';} oLi_Content.align='center'; if(display){ oLi_Content.style.display='block'; }else{ oLi_Content.style.display='none'; } oLi.appendChild(oLi_Content); document.getElementById('toolbar').appendChild(oLi); }, CreateGoToHome:function(sId,sTitle,sContent){ oLi = oPlugin.createElement('li',sId,'item',null,'',null); var oLi_Functions; oLi_Functions = Array(); oLi_Functions[0]= new Array(); oLi_Functions[0][0] = 'click'; oLi_Functions[0][1] = function(){document.location.href ='http://'+ document.location.href.split("/")[2];}; oLabel = oPlugin.createElement('div','title_' +sId,'title',oLi_Functions,''+sTitle+'',null); oLabel.style.background=oPlugin.LabelBgColor; oLi.appendChild(oLabel); oLi_Content = oPlugin.createElement('div','content_' +sId,'content',oLi_Functions,sContent,null); if(sContent==''){oLi_Content.style.lineHeight='1px';oLi_Content.style.height='1px';oLi_Content.innerHTML='';} oLi_Content.align='center'; oLi_Content.style.display='block'; oLi_Content.style.cursor='pointer'; oLi.appendChild(oLi_Content); document.getElementById('toolbar').appendChild(oLi); }, CreateNode: function(sId,sTitle,sContent,sContentDialog,sContentDialogStyle,dialogHeight,dialogWidth){ oLi = oPlugin.createElement('li',sId,'item',null,'',null); var oLi_Functions; oLi_Functions = Array(); oLi_Functions[0]= new Array(); if (sContentDialogStyle == "banner"){ oLi_Functions[0][0] = ''; oLi_Functions[0][1] = ''; oLabel = oPlugin.createElement('div','title_' +sId,'title',oLi_Functions,'',null); oLabel.style.display = 'none'; } else{ oLi_Functions[0][0] = 'click'; oLi_Functions[0][1] = function(){oPlugin.boxDialog(sId);}; oLabel = oPlugin.createElement('div','title_' +sId,'title',oLi_Functions,''+sTitle+'',null); oLabel.style.background = oPlugin.LabelBgColor; } oLi.appendChild(oLabel); if(sContentDialog){ var oLi_BoxShape = ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
'+ '
 '; oLi_BoxShape += ''; oLi_BoxShape += 'x'; oLi_BoxShape += '
    '+sTitle+'
'; switch(sContentDialogStyle){ case 'List': oLi_BoxShape += '
'; oLi_BoxShape += '
    '; for(i=0;i'; oLi_BoxShape += ''+sContentDialog[i][0]+'  '; oLi_BoxShape += ''+sContentDialog[i][1]+'  '; oLi_BoxShape += ''+sContentDialog[i][2]+''; oLi_BoxShape += ''; } oLi_BoxShape += '
'; oLi_BoxShape += '
'; break; case 'Urls': oLi_BoxShape += '
'; oLi_BoxShape += ''; oLi_BoxShape += '
'; break; case 'Notice': //http://oPlugin.Browser.Explorer oLi_BoxShape += '
    '; for(i=0;i'+sContentDialog[i][0]+' '; oLi_BoxShape += ''+sContentDialog[i][1]+'
    '; oLi_BoxShape += ''+sContentDialog[i][2]+''; oLi_BoxShape += ' - '+sContentDialog[i][3]+'
    '; oLi_BoxShape += ''+sContentDialog[i][4]+''; oLi_BoxShape += ''; } oLi_BoxShape += '
'; break; case 'Item': oLi_BoxShape += '
'; oLi_BoxShape += '
    '; oLi_BoxShape += '
  • '; oLi_BoxShape += ''+sContentDialog+''; oLi_BoxShape += '
  • '; oLi_BoxShape += '
'; oLi_BoxShape += '
'; break; default: oLi_BoxShape += '
'; oLi_BoxShape += sContentDialog ; oLi_BoxShape += '
'; break; } oLi_BoxShape += '
 
'+ '
'; oLi_BoxDialog = oPlugin.createElement('div','boxDialog_' +sId,'boxDialog',null,oLi_BoxShape,null); oLi_BoxDialog.align='left'; if(dialogWidth){ oLi_BoxDialog.style.width=(dialogWidth+10)+'px'; } if(dialogHeight){ if(oPlugin.Browser.Explorer){ oLi_BoxDialog.style.height=(dialogHeight+100)+'px'; }else{ oLi_BoxDialog.style.height=(dialogHeight+10)+'px'; } } oLi_BoxDialog.style.display='none'; oLi_BoxDialog.style.left=(oPlugin.PluginWidth-7+7)+'px'; oLi_BoxDialog.style.marginTop='-35px'; oLi.appendChild(oLi_BoxDialog); } oLi_Content = oPlugin.createElement('div','content_' +sId,'content',null,sContent,null); if(sContent==''){oLi_Content.style.lineHeight='1px';oLi_Content.style.height='1px';oLi_Content.innerHTML='';} oLi_Content.align='center'; oLi_Content.style.display='block'; oLi.appendChild(oLi_Content); document.getElementById('toolbar').appendChild(oLi); }, createElement: function(sType,sId,sClass,aFunctions,sHtml,oParent){ var oElement; oElement=document.createElement(sType); oElement.setAttribute('id',sId); oElement.className=sClass; if(sHtml) { oElement.innerHTML=sHtml; } if (aFunctions) { for (iFunctions=0;iFunctions< aFunctions.length;iFunctions++) { if (oPlugin.Browser.Other) { oElement.addEventListener(aFunctions[iFunctions][0],eval(aFunctions[iFunctions][1]),false); } if (oPlugin.Browser.Explorer) { oElement['on' + aFunctions[iFunctions][0]]= aFunctions[iFunctions][1]; } } } if (oParent) { oParent.appendChild(oElement); }else{ return oElement; } } }; function twitter(url,title){ return 'Tweet'; } function facebook(url){ return '' } function plus(url){ return ''; } function counters(){ jQuery("span#socialstats").each( function(i) { var url = jQuery(this).attr("url"); var title = jQuery(this).attr("title"); var append = ''; append += '' ; append += '' ; append += '' ; append += '
'+twitter(url,title)+''+plus(url)+''+facebook(url)+'
'; jQuery(this).html(append); }); } var repeatBanner = 0; function showBanner(timer, colorBack, colorLabel, colorFont, fontSize){ if (repeatBanner < 2){ jQuery('#boxDialog_New_Id_14 .frame').css("background-color", colorBack); jQuery('#boxDialog_New_Id_14 .boxTitleContent').css("background-color", colorLabel); jQuery('#boxDialog_New_Id_14 .boxTitleContent').css("color", colorFont); jQuery('#boxDialog_New_Id_14 .boxTitleContent').css("font-size", fontSize); oPlugin.boxDialog('New_Id_14'); setTimeout('showBanner('+timer+')', timer); repeatBanner ++; } }