try {
		var MUdaypart = {
				//variables
				aCurrentSchedule: '',
				iCurrentTimeframe: '',
				iCurrentTab: '',				
				aTimeframes : [],			
				aEditionSchedules : [{"edition": "US", "tabs": ["US","UK","Europe","Asia", "US Most Actives"], "schedule": 
										[
									        //Time in EST
											{"time": "03:30", "tab": 1},
											{"time": "09:50", "tab": 0},
											{"time": "20:30", "tab": 3}
											
									    ]
									   },
									   {"edition": "UK", "tabs": ["UK","US","Europe","Asia", "UK Most Actives"], "schedule": 
										[
											{"time": "00:30", "tab": 0},
											{"time": "13:50", "tab": 0},
											{"time": "19:30", "tab": 0}
									    ]
									   }
									 ],

				//methods
				getCurrentTimeframe: function () {
					for(var i=0;i<this.aTimeframes.length;i++) {
						if(this.d.getTime()>= this.aTimeframes[i]) {
							this.iCurrentTimeframe = i;
							this.iCurrentTab = this.aCurrentSchedule[i].tab;
						}
					}
				},
				getEditionSchedule: function () {
					var returnMatch;
					for(var i=0;i<this.aEditionSchedules.length;i++) {
						if(this.aEditionSchedules[i].edition == strLocalization) {
							returnMatch = i;
						}
					}
					this.aCurrentSchedule = this.aEditionSchedules[returnMatch].schedule;	
				},
				init: function () {
					this.d = new Date();
					this.offset = this.d.getTimezoneOffset()/60;
					this.currentTime = this.d.getTime();
					this.getEditionSchedule();
					this.setTimeframe();
					this.getCurrentTimeframe();
					this.setTab();
				},			
				setTab: function () {					
					if(this.iCurrentTab != 0) { //do nothing if current timeframe is same as first tab
						var tabContainer = document.getElementById("marketUpdateTabs");
						var aTabs = tabContainer.getElementsByTagName("li");
						for(var i=0;i<aTabs.length;i++) {
							aTabs[i].className = "";
						}
						aTabs[this.iCurrentTab].className = "current";
						loadMarketUpdate(this.iCurrentTab);
					}
				},
				setTimeframe: function () {					
					var aTimeframes = [];
					for(var i=0;i<this.aCurrentSchedule.length;i++) {
						var compareDate = new Date();
						var hours = this.aCurrentSchedule[i].time.split(":")[0];
						var mins = this.aCurrentSchedule[i].time.split(":")[1];	
						compareDate.setHours(hours,mins,0,0);
						aTimeframes.push(compareDate.getTime());
						compareDate = '';										
					}					
					this.aTimeframes = aTimeframes;			
				}
		};
		MUdaypart.init();		
} catch (e) {}