Event.observe(window,"load",function(){$$("a").each(function(I){Event.observe(I,"click",function(){if(typeof D!="undefined"){D();
A()
}return true
})
});
onePhoto.autooff="?autoplay=0";
var F=function(I){if(onePhoto.nextPhoto=="?endState=1"){document.location=onePhoto.nextPhoto
}else{document.location=onePhoto.nextPhoto+onePhoto.autooff
}I.stop()
},C=$$("#singlePhotoHold img")[0],B,H,G,D,A,E;
if(C){C.observe("contextmenu",function(I){I.stop()
})
}$$("#photoControlNext a")[0].observe("click",F);
B=$$("#photoControlPrev a")[0];
if(B){B.href=B.href+onePhoto.autooff
}$$("#photoControlMain .photopause")[0].observe("click",function(I){E(false);
A();
I.stop()
});
H=null;
G=function(){H=window.setTimeout(function(){document.location=onePhoto.nextPhoto
},10000)
};
if(onePhoto.autoplay!=0){G()
}D=function(){if(H){window.clearTimeout(H)
}H=null
};
A=function(){if(H==null||onePhoto.autoplay==0){$$("#photoControlMain .photopause")[0].style.display="none";
$$("#photoControlMain .photoplay")[0].style.display="inline"
}else{$$("#photoControlMain .photopause")[0].style.display="inline";
$$("#photoControlMain .photoplay")[0].style.display="none"
}};
A();
E=function(I){if(I){G()
}else{D()
}};
$("globalSearchTextInput").onfocus=function(){if(this.value=="What are you looking for?"){this.value=""
}E(false);
A()
}
});