dojo.declare("SiteController",null,{goTo:function(_1){
window.location=_1;
},headerSearchBoxClick:function(_2){
if(_2.value=="Search..."||_2.value=="Find Photos..."){
_2.value="";
}
},widgetNewsletterBoxClick:function(_3){
if(_3.value=="Email Address"){
_3.value="";
}
},channelBoxOver:function(id){
var _4=id+"Off";
var _5=id+"Over";
var _6=dojo.byId(id);
dojo.removeClass(_6,_4);
dojo.addClass(_6,_5);
},channelBoxOff:function(id){
var _7=id+"Off";
var _8=id+"Over";
var _9=dojo.byId(id);
dojo.removeClass(_9,_8);
dojo.addClass(_9,_7);
},revealSearchOverlay:function(id){
dojo.removeClass(dojo.byId("overlayContainer"),"hidden");
dojo.removeClass(dojo.byId(id),"hidden");
},hideSearchOverlay:function(id){
dojo.addClass(dojo.byId("overlayContainer"),"hidden");
dojo.addClass(dojo.byId(id),"hidden");
},revealOverlay:function(){
var _a=dojo.byId("overlayContainer");
var _b=dojo.byId("overlay");
var _c=dojo.byId("overlayTable");
var _d=document.body.scrollTop||document.documentElement.scrollTop;
_c.style.marginTop=(_d+50)+"px";
_a.style.height=(document.height||document.body.offsetHeight)+"px";
if(dojo.byId("carousel")){
dojo.addClass(dojo.byId("carousel"),"invisible");
}
dojo.removeClass(_a,"hidden");
dojo.removeClass(_b,"hidden");
this.revealOverlayLoader();
},revealOverlayLoader:function(){
var _e=dojo.byId("overlayLoader");
var _f=document.body.scrollTop||document.documentElement.scrollTop;
_e.style.marginTop=(_f+100)+"px";
dojo.removeClass(_e,"hidden");
},hideOverlay:function(){
var _10=dojo.byId("overlayContainer");
var _11=dojo.query(".hideOverlayTarget");
dojo.addClass(_10,"hidden");
for(var i in _11){
dojo.addClass(_11[i],"hidden");
}
if(dojo.byId("carousel")){
dojo.removeClass(dojo.byId("carousel"),"invisible");
}
this.hideOverlayLoader();
},hideOverlayLoader:function(){
var _12=dojo.byId("overlayLoader");
dojo.addClass(_12,"hidden");
},fadeOverlay:function(){
dojo.byId("overlay").xOpacity=1;
this.timeout=setTimeout(dojo.hitch(this,this.fadeOverlayAction),5000);
},fadeOverlayAction:function(){
var _13=dojo.byId("overlay");
var _14=_13.xOpacity;
if(_14>=0){
var _15=1*_14-0.1;
this.setOverlayOpacity(_15);
this.timeout=setTimeout(dojo.hitch(this,this.fadeOverlayAction),25);
}else{
this.hideOverlay();
this.setOverlayOpacity(1);
}
},setOverlayOpacity:function(_16){
var _17=dojo.byId("overlay");
_17.xOpacity=_16;
_17.style.opacity=_16;
_17.style.MozOpacity=_16;
_17.style.filter="alpha(opacity="+(_16*100)+")";
},loadInOverlay:function(url,_18,_19){
if(_19&&omniTracking){
omniTracking("MAIN","PAGEVIEW",_19,_19);
}
overlayDiv=dojo.byId("overlay");
if(overlayDiv){
overlayDiv.innerHTML="";
this.revealOverlay();
dojo.xhrPost({url:url,load:function(_1a){
siteController.hideOverlayLoader();
dojo.byId("overlay").innerHTML=_1a;
},sync:_18?true:false,error:function(_1b){
console.error("Error: ",_1b);
siteController.hideOverlay();
}});
}else{
}
},loadInDiv:function(url,_1c,_1d,_1e,_1f){
if(_1d&&_1e&&omniTracking){
omniTracking("MAIN",_1d,_1e,_1e);
}
dojo.xhrGet({url:url,load:function(_20){
dojo.byId(_1c).innerHTML=_20;
},sync:_1f?true:false,error:function(_21){
console.error("Error: ",_21);
}});
},archiveSortOrderUpdate:function(url,_22){
if(_22.value!="newest"&&_22.value!=""){
url=url+"/sort/"+_22.value;
}
document.location=url;
},archiveChannelUpdate:function(url,_23){
if(_23.value!=""){
url=url+"/channel/"+_23.value;
}
document.location=url;
},searchItemsperpageUpdate:function(url,_24){
document.location=url+_24.value;
},widgetNewsletterFormSubmission:function(){
dojo.xhrPost({sync:true,form:"newsletterForm",load:function(_25,_26){
dojo.byId("overlay").innerHTML=_25;
if(dojo.byId("newsletterFormComplete")){
siteController.fadeOverlay();
}
},error:function(err,_27){
console.error(err);
}});
},bookmarkThisPage:function(){
var url=location.href;
var _28=document.title;
if(window.sidebar){
window.sidebar.addPanel(_28,url,"http://www.life.com");
}else{
if(document.all){
window.external.AddFavorite(url,_28);
}else{
window.alert("Please bookmark this site manually.");
}
}
},makeHomepage:function(_29,_2a,_2b){
if(dojo.isIE){
_29.style.behavior="url(#default#homepage)";
_29.setHomePage(_2a);
}else{
document.location.href=_2b;
}
},selectAll:function(_2c){
_2c.focus();
_2c.select();
},refreshSet:function(){
this.refreshTimer=setTimeout(dojo.hitch(this,this.refreshPerform),600000);
},refreshUnset:function(){
if(this.refreshTimer){
clearTimeout(this.refreshTimer);
}
},refreshPerform:function(){
this.goTo("");
}});
var siteController=new SiteController();
dojo.connect(window,"onload",function(){
siteController.refreshSet();
});

