var jQueryScriptOutputted = false; var sliderIntervalId = 0; var sliderHeight = 0; var sliderWidth = 0; var prQuery; var sliding = false; var slideSpeed = 10; var height = '136'; var width = '100%'; var bgColor = '##06F'; var widgetWrapper; function prCreateWidget(){ c = prReadCookie('prHideSliderpr5975'); widgetWrapper = document.createElement('div'); widgetWrapper.id = 'prSliderpr5975'; widgetWrapper.setAttribute('style',"font-family:Tahoma,Geneva,sans-serif;font-size:12px;height:136px;left:0;position:fixed;opacity:0;overflow:hidden;right:0;width:auto;z-index:100000;bottom:-136px;"); widget = document.createElement('div'); widget.id = 'prSliderWidgetpr5975'; widget.setAttribute('style',"height:116px;width:100%;"); lShad = document.createElement('div'); rShad = document.createElement('div'); shad = document.createElement('div'); iframeWrapper = document.createElement('div'); lShad.setAttribute('style',"background-image:url('http://twiant.com/img/slider/colors/lightgrey.png');background-position:9px top;background-repeat:no-repeat;display:inline-block;float:left;height:123px;margin-top:13px;width:25px;"); rShad.setAttribute('style',"background-image:url('http://twiant.com/img/slider/colors/lightgrey.png');background-position:-18px top;background-repeat:no-repeat;display:inline-block;float:right;height:123px;margin-top:13px;width:25px;"); shad.setAttribute('style',"height:7px;margin-top:13px;;"); iframeWrapper.setAttribute('style',"background-image:url('http://twiant.com/img/slider/colors/lightgrey.png');background-position:0 -312px;background-repeat:repeat-x;height:116px;margin:0 25px;margin-top:13px;padding-top:7px;"); closeLink = document.createElement('a'); closeLink.setAttribute('style',"background-image:url('http://twiant.com/img/slider/close_btn.png');background-repeat:no-repeat;color:#FFF;cursor:pointer;display:inline-block;font-weight:bold;height:28px;position:absolute;right:2px;text-decoration:none;width:28px;z-index:100;top:6px;"); closeLink.innerHTML = ' '; closeLink.id = 'prCloseLinkpr5975'; showLink = document.createElement('a'); showLink.id = 'prShowLinkpr5975'; jQuery(showLink).click(function(){prToggle();}); if(c){ showLink.setAttribute('style',"background-image:url('http://twiant.com/img/slider/show_bottom.png');background-repeat:no-repeat;cursor:pointer;display:inline-block;height:28px;position:fixed;right:4px;text-decoration:none;width:28px;z-index:100001;bottom:4px;"); }else{ showLink.setAttribute('style',"background-image:url('http://twiant.com/img/slider/show_bottom.png');background-repeat:no-repeat;cursor:pointer;display:inline-block;height:28px;position:fixed;right:4px;text-decoration:none;width:28px;z-index:100001;bottom:-28px;"); } jQuery(closeLink).click(function(){prToggle();}); iframe = document.createElement('iframe'); iframe.height = 116; iframe.setAttribute('allowtransparency',1); iframe.setAttribute('frameborder',0); iframe.setAttribute('scrolling','no'); iframe.src = 'http://widget.plugrush.com/pervertgallery.com/hd5'; iframe.width = '100%'; widget.appendChild(iframe); iframeWrapper.appendChild(widget); widgetWrapper.appendChild(lShad); widgetWrapper.appendChild(rShad); widgetWrapper.appendChild(iframeWrapper); widgetWrapper.appendChild(closeLink); homeLink = document.createElement('a'); homeLink.setAttribute('style',"background-image:url('http://twiant.com/img/slider/pr_logo.png');background-repeat:no-repeat;color:#FFF;cursor:pointer;display:inline-block;font-weight:bold;height:28px;left:2px;position:absolute;text-decoration:none;width:94px;z-index:100;top:6px;"); homeLink.setAttribute('href','http://www.plugrush.com/?ref=2z0'); homeLink.setAttribute('target','_blank'); homeLink.innerHTML = ' '; homeLink.id = 'prLinkpr5975'; widgetWrapper.appendChild(homeLink); document.body.appendChild(widgetWrapper); document.body.appendChild(showLink); if(c){ // jQuery('#prShowLinkpr5975').animate({bottom:4},500,'easeInCirc'); }else{ prSlide(2000); } } function prTheSlider(){ if(typeof(jQuery)=='undefined'||jQuery.fn.jquery=='1.2.6'){ if(!jQueryScriptOutputted){ jQueryScriptOutputted = true; script = document.createElement('script'); script.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'); document.head.appendChild(script); script = document.createElement('script'); script.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js'); document.head.appendChild(script); script = document.createElement('script'); script.innerHtml = '$.noConflict();'; document.head.appendChild(script); } setTimeout('prTheSlider()',50); }else{ prCreateWidget(); } } function prToggle(){ opacity = jQuery('#prSliderpr5975').css('opacity'); if(opacity==1){ jQuery('#prSliderpr5975').animate({opacity:0,bottom:'-136'},500,'easeInCirc',function(){jQuery('#prShowLinkpr5975').animate({bottom:4},500,'easeOutCirc')}); prCreateCookie('prHideSliderpr5975',1,1); } if(opacity==0){ jQuery('#prSliderpr5975').animate({opacity: 1,bottom:0},500,'easeOutCirc'); jQuery('#prShowLinkpr5975').animate({bottom:-28},500,'easeInCirc'); prDeleteCookie('prHideSliderpr5975'); } } function prSlide(delay){ jQuery('#prSliderpr5975').delay(delay).animate({opacity:1,bottom:0},500,'easeOutCirc'); } function prCreateCookie(name,value,days){ if(days){ var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); }else{ var expires = ""; } document.cookie = name+"="+value+expires+"; path=/"; } function prReadCookie(name){ var nameEQ = name+"="; var ca = document.cookie.split(';'); for(var i=0;i