function photoHoverLeft(photoID,photoImageID,waited){var position=SM.PhotoBar.config.position||'right';var hoverPhoto=YD.get(photoID);if(!showPhotoBar||hoverPhoto.offsetWidth*hoverPhoto.offsetHeight<30000||photoInfo[photoImageID]==undefined||photoHovering||photoInfo[photoImageID]['Format']=="MPG"||(YD.inDocument('themeChoicesContainer')&&parseInt(YD.getStyle('themeChoicesContainer','height'))!=0)){return;}
if(waited!=true){YE.addListener(document,'mousemove',watchPhotoBar,photoID);photoBarTimeout=setTimeout("photoHoverLeft('"+photoID+"', '"+photoImageID+"', true)",photoBarDelay*1000);return;}
if(YD.inDocument('photoBarBg')&&YD.inDocument('photoBarContent')&&!YD.hasClass('photoBarContent','photoId_'+photoImageID)){removeFromDOM('photoBarBg');removeFromDOM('photoBarContent');}
var hoverRegion=YAHOO.util.Region.getRegion(hoverPhoto);var photoBarBg=YD.get('photoBarBg');var photoBarContent=YD.get('photoBarContent');if(!photoBarBg){photoBarBg=document.createElement('div');photoBarBg.setAttribute('id','photoBarBg');photoBarBg.className=position;document.body.appendChild(photoBarBg);YD.setStyle(photoBarBg,'zIndex',getZindex(hoverPhoto)+1);photoBarBg.innerHTML='<div class="first"></div><div class="middle"></div><div class="last"></div>';YE.on(window,'resize',function(){if(photoBarBg&&photoBarBg.offsetWidth<=1){YD.setStyle(photoBarBg,'left',0);if(photoBarContent){YD.setStyle(photoBarContent,'left',0);}}});}
if(!photoBarContent){photoBarContent=document.createElement("div");photoBarContent.setAttribute('id','photoBarContent');YD.addClass(photoBarContent,position);YD.addClass(photoBarContent,'photoId_'+photoImageID)
document.body.appendChild(photoBarContent);YD.setStyle(photoBarContent,'zIndex',getZindex(photoBarBg)+1);if(displaySmugPopular){if(photoInfo[photoImageID]['displayPopular']!=''){var photoRank=document.createElement('div');YD.addClass(photoRank,'photoRank');photoRank.id='photoRank';if(photoBarContent.childNodes.length==0){YD.addClass(photoRank,'first');}
photoBarContent.appendChild(photoRank);var postArray=[];postArray['tool']='smugPopular';postArray['Type']="Image";postArray['TypeID']=photoImageID;}}
if(photoInfo[photoImageID]['Format']!="MP4"){if(YD.getStyle(YD.get('lightBoxStage'),'display')!="block"){var photoSizes=document.createElement("div");YD.addClass(photoSizes,"photoSizes");photoSizes.setAttribute("id","photoSizes");if(photoBarContent.childNodes.length==0){YD.addClass(photoSizes,'first');}
photoBarContent.appendChild(photoSizes);photoSizes.innerHTML='<h4>Photo Sizes</h4>';var photoSizesContent=document.createElement("ul");photoSizes.appendChild(photoSizesContent);photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-S-LB">Small<\/a></li>';photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-M-LB">Medium<\/a></li>';if(photoInfo[photoImageID]['albumLarges']){photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-L-LB">Large<\/a></li>';if(photoInfo[photoImageID]['hasXLarges']){if(photoInfo[photoImageID]['albumXLarges']){photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-XL-LB">XLarge<\/a></li>';}
if(photoInfo[photoImageID]['albumX2Larges']){photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-X2-LB">X2Large<\/a></li>';}
if(photoInfo[photoImageID]['albumX3Larges']){photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-X3-LB">X3Large<\/a></li>';}}
if(photoInfo[photoImageID]['albumOriginals']){photoSizesContent.innerHTML+='<li><a href="#'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-O-LB">Original<\/a></li>';}}}}
else{var photoSizes=document.createElement("div");YD.addClass(photoSizes,"photoSizes");photoSizes.setAttribute("id","photoSizes");if(photoBarContent.childNodes.length==0){YD.addClass(photoSizes,'first');}
photoBarContent.appendChild(photoSizes);photoSizes.innerHTML='<h4>Save Movie</h4>';photoSizes.innerHTML+='<img id="savePhotoButton" src="/img/spacer.gif" width="28" height="31" border="0" />';YE.on('savePhotoButton','click',function(){if(YD.getStyle('photoSizesContent','display')!='block'){YD.setStyle('photoSizesContent','display','block');}
else{YD.setStyle('photoSizesContent','display','none');}
YD.setStyle(photoBarBg.childNodes[1],'height',photoBarContent.offsetHeight-photoBarBg.childNodes[0].offsetHeight+'px');YD.setStyle(photoBarBg,'height',YD.getStyle(photoBarBg.childNodes[1],'height'));});var photoSizesContent=document.createElement("ul");photoSizesContent.id='photoSizesContent';YD.setStyle(photoSizesContent,'display','none');YD.setStyle(photoSizesContent,'marginTop','3px');photoSizes.appendChild(photoSizesContent);photoSizesContent.innerHTML+='<li style="margin-bottom: 3px;"><strong style="text-decoration: underline;">Size:</strong></li>';photoSizesContent.innerHTML+='<li><a href="/photos/'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-320D.mp4">Web<\/a></li>';if(photoInfo[photoImageID]['640Movie']){photoSizesContent.innerHTML+='<li><a href="/photos/'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-640D.mp4">iPod/DVD<\/a></li>';}
if(photoInfo[photoImageID]['960Movie']){photoSizesContent.innerHTML+='<li><a href="/photos/'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-960D.mp4">Mid-Def<\/a></li>';}
if(photoInfo[photoImageID]['1280Movie']){photoSizesContent.innerHTML+='<li><a href="/photos/'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-1280D.mp4">HiDef<\/a></li>';}}
if(photoInfo[photoImageID]['displayEXIF']!=''&&photoInfo[photoImageID]['Format']!="MP4"){var photoExif=document.createElement("div");photoExif.setAttribute("id","photoExif");if(photoBarContent.childNodes.length==0){YD.addClass(photoExif,'first');}
photoBarContent.appendChild(photoExif);photoExif.innerHTML='<h4>Photo Info</h4>';photoExif.innerHTML+='<a href="javascript:exifDetails('+photoImageID+', \''+photoInfo[photoImageID]['ImageKey']+'\');"><img id="photoInfoButton" src="/img/spacer.gif" width="27" height="27" border="0" /></a>';}
if(photoInfo[photoImageID]['albumOriginals']&&photoInfo[photoImageID]['protected']==''&&photoInfo[photoImageID]['Format']!="MP4"){var photoSave=document.createElement("div");photoSave.setAttribute("id","photoSave");if(photoBarContent.childNodes.length==0){YD.addClass(photoSave,'first');}
photoBarContent.appendChild(photoSave);photoSave.innerHTML='<h4>Save Photo</h4>';photoSave.innerHTML+='<a href="/photos/'+photoImageID+'_'+photoInfo[photoImageID]['ImageKey']+'-D.jpg"><img id="savePhotoButton" src="/img/spacer.gif" width="28" height="31" border="0" /></a>';}if(hoverPhoto.offsetHeight<photoBarContent.offsetHeight+20){YD.setStyle(YD.get('photoTools'),'visibility','hidden');}}
switch(position){case'right':YD.setStyle(photoBarBg.childNodes[1],'height',photoBarContent.offsetHeight-photoBarBg.childNodes[0].offsetHeight+'px');YD.setStyle(photoBarBg,'height',YD.getStyle(photoBarBg.childNodes[1],'height'));YD.setXY(photoBarBg,[hoverRegion.left,hoverRegion.top]);YD.setXY(photoBarContent,[hoverRegion.left-photoBarContent.offsetWidth,hoverRegion.top]);var attr={'left':{'by':-97},'width':{'to':96}};break;case'bottom':YD.setStyle(photoBarBg.childNodes[1],'width',photoBarContent.offsetWidth+'px');YD.setStyle(photoBarBg,'width',YD.getStyle(photoBarBg.childNodes[1],'width'));YD.setXY(photoBarBg,[hoverRegion.left-(hoverPhoto.offsetWidth/2)-(photoBarBg.offsetWidth/2),hoverRegion.bottom]);YD.setXY(photoBarContent,[hoverRegion.left-(hoverPhoto.offsetWidth/2)-(photoBarBg.offsetWidth/2)+photoBarBg.childNodes[0].offsetWidth,hoverRegion.bottom+7]);var attr={'height':{'to':100}};YD.setStyle('photoTools','visibility','hidden');}
photoHovering=true;switch(position){case'right':if(parseInt(YD.getStyle(photoBarBg,'width'))>0){YD.setStyle(photoBarBg,'width',0);}
break;case'bottom':if(parseInt(YD.getStyle(photoBarBg,'height'))>0){YD.setStyle(photoBarBg,'height',0);}
break;}
photoHoveringAnimation=new YAHOO.util.Anim(photoBarBg,attr,.5,YAHOO.util.Easing.backOut);photoHoveringAnimation.onComplete.subscribe(function(e){var postArray=[];postArray['tool']='smugPopular';postArray['Type']="Image";postArray['TypeID']=photoImageID;ajax_query(smugPopularResponse,webServer+'/hack/RPC/gallery.mg',postArray,true);if(photoHovering){YD.setStyle('photoBarContent','visibility','visible');}});photoHoveringAnimation.animate();}
showPhotoBar = false; 



// fix the pesky pipes

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});







