$(function() {
	$(".questionMarkMediumLeft").Tooltip({
		delay: 0,
		showURL: false,
		opacity: 1,
		fixPNG: true,
		showBody: " - ",
		extraClass: "mediumAnswerLeft",
		top: -143,
		left: -285
	});	
	$(".questionMarkSmallLeft").Tooltip({
		delay: 0,
		showURL: false,
		fixPNG: true,
		showBody: " - ",
		extraClass: "smallAnswerLeft",
		top: -107,
		left: -285
	});	
	$(".questionMarkMediumRight").Tooltip({
		delay: 0,
		showURL: false,
		opacity: 1,
		fixPNG: true,
		showBody: " - ",
		extraClass: "mediumAnswerRight",
		top: -143,
		left: 0
	});	
	$(".questionMarkSmallRight").Tooltip({
		delay: 0,
		showURL: false,
		fixPNG: true,
		showBody: " - ",
		extraClass: "smallAnswerRight",
		top: -52,
		left: 0
	});	

	$(".cityNames").Tooltip({
		delay: 0,
		showURL: false,
		fixPNG: true,
		showBody: " - ",
		extraClass: "smallAnswerRight",
		top: -107,
		left: 0
	});	

	$(".questionMarkLargeRight").Tooltip({
		delay: 0,
		showURL: false,
		opacity: 1,
		fixPNG: true,
		showBody: " - ",
		extraClass: "largeAnswerRight",
		top: -107,
		left: 0
	});	

	$(".questionMarkMediumRightDown").Tooltip({
		delay: 0,
		showURL: false,
		opacity: 1,
		fixPNG: true,
		showBody: " - ",
		extraClass: "mediumRightDown",
		top: -107,
		left: 0
	});



});

var isHelpShowing= false;

$(document).ready(function(){
	$('.mainHelpButton').hover( function(){
			$(this).children("img").attr("src","images/b_help_h.gif");
		}, function(){
			if(!isHelpShowing){
				$(this).children("img").attr("src","images/b_help.gif");
			}
		}).click( function(){

			var helpTarget = $(this).attr("target");
			showHelpSection(helpTarget );

			return false;
		})
	
	$(".helpBox .close a").click( function () { 
		hideHelpSection();
	})
})

function showHelpSection(helpID){
	$("#"+helpID).slideDown("fast");
	isHelpShowing= true;
	$('.mainHelpButton').children("img").attr("src","images/b_help_h.gif");
}

function hideHelpSection(){
	$('.helpBox').slideUp("fast");
	$('.mainHelpButton').children("img").attr("src","images/b_help.gif");
	isHelpShowing = false;
}