$(document).ready(function(){
	$('#index_16').jHelperTip({
		trigger: "hover",
		source: "ajax",
		type: "GET", 
		url: 'catering.html',
		loadingText: 'loading...',
		autoClose: true,
		topOff: -500,
		leftOff: -200
	});
	
	//Buttons
	
	var path = location.pathname.substring(1);

	function placeButtons()
	{	
		if( '' == path || 'index.html' == path )
		{
			$('#eskimo, #caddy, #party')
				.css('position', 'absolute')
				.css('cursor', 'pointer')
				.css('left', $('table:first').position().left + $('table:first').width() - 160 );
			
			$('#eskimo').css('top', 150);
			$('#party').css('top', $('#eskimo').position().top + 100 );
			
			if(jQuery.browser.safari)
				$('#eskimo, #caddy').css('left', $('#index_06').position().left - 30 );
		}
		else if('specials.html' == path)
		{
			$('#5dollar')
				.css('position', 'absolute')
				.css('cursor', 'pointer')
				.css('left', $('table:first').position().left + $('table:first').width() - 140 )
				.css('top', 130);
		}
		else if( 'events.html' == path )
		{
			$('#hours')
				.css('position', 'absolute')
				.css('cursor', 'pointer')
				.css('left', $(document).width() / 2 - 185)
				.css('top', $('table:first').position().top + 675);
			
		}
		
		if($.browser.mozilla || $.browser.msie)
			$('#party').css('left', $('#party').position().left - 70 );
	}
	
	
	if( '' == path || 'index.html' == path )
	{
		// Add buttons
		$("<div id='party'><a href='#'><img src='images/party.png' width='93' height='93' /></a></div>").appendTo('body');
		//$("<div id='caddy'><a href='http://www.cadillacbardallas.com/'><img src='images/caddy.png' width='72' height='44' /></a></div>").appendTo('body');
		$("<div id='eskimo'><a href='eskimo.html'><img src='images/eskimo.png' width='85' height='85' /></a></div>").appendTo('body');
		placeButtons();
		$(window).resize(placeButtons);
	}
	else if('specials.html' == path)
	{
//		$("<div id='5dollar'><img src='images/5dollar.gif' width='120' height='120' /></div>").appendTo('body');
//		placeButtons();
//		$(window).resize(placeButtons);
	}
	else if( 'events.html' == path )
	{	
		//$("<div id='hours'><img src='/images/holiday-hours.png' width='389' height='90' /></div>").appendTo('body');
		placeButtons();
		$(window).resize(placeButtons);
	}
	
	// Apply PNG fix to website
	if(jQuery.browser.msie)
	{
		$('img').pngfix();
	}
	
	
	$('#party').jHelperTip({
		trigger: "hover",
		source: "ajax",
		type: "GET", 
		url: 'party.html',
		loadingText: '',
		autoClose: true,
		topOff: -550,
		leftOff: -550
	});
});
