var AOF = {
	GetTimeStamp: function()
	{
		var d = new Date();
		var s = [];
		s.push(d.getDate());
		s.push(d.getMonth());
		s.push(d.getFullYear());
		s.push(d.getHours());
		s.push(d.getMinutes());
		s.push(d.getSeconds());
		return s.join('');
	},
	ThickBox: {
		Show: function(url, w, h)
		{
			if (!w) w = 640;
			if (!h) h = 480;
			var settings = {
				containerCss: {width: w + 'px', height: h + 'px'}
			};
			$.modal('<iframe style="width:' + w + 'px; height:' + h + 'px" frameborder="no" scrolling="no" src="' + url + '" id="tbframe"></iframe>', settings);
		}
	},
	Events: {
		Callback: function(html) 
		{
			$('#smallEventsContent').html(html);
			AOF.Events.Init();
		},
		Go: function(page)
		{
			$.post('/smallevents.aspx', {eventpage:page, ts:AOF.GetTimeStamp()}, AOF.Events.Callback);
		},
		Init: function()
		{
			$('#smallEventsContent div.smallEvent').hoverIntent({
			timeout:300,
			over:function()
			{
				$(".smallEventBlueBoxSelected", this).stop().animate({top:'15px'},{queue:false,duration:300});   
			}, 
			out:function() 
			{
				$(".smallEventBlueBoxSelected", this).stop().animate({top:'-240px'},{queue:false,duration:300});   
			}});
		}
	}
}

$(document).ready(function() 
{
	AOF.Events.Init();
});
