function initDealsMap(mapStatStr) {
	var mapStatObj = {};

	$('#ht2-worldbutton').click(function() {
		$(this).parents('.ht2:first').toggleClass('ht2-worldmode');
		$.cookie("mapClass", $(this).parents('.ht2:first').attr('class'), {
			expires : 30,
			path : '/'
		});

		return false;
	});

	mapStatsTmp = mapStatStr.split('|');
	var i = mapStatsTmp.length;
	while (i--) {
		var tmp = mapStatsTmp[i].split(';');
		mapStatObj[tmp[0]] = {};
		mapStatObj[tmp[0]].name = tmp[1];
		mapStatObj[tmp[0]].listings = tmp[2];
		mapStatObj[tmp[0]].deals = tmp[3];
	}
	mapStatObj['findarental'] = {
		name : 'World',
		listings : null,
		deals : null
	};

	mapStatsTmp = mapStatStr = null;

	var $hInner = $('#ht2-dealtext-inner');
	var $hState = $('.h-state');
	var $hRentals = $('.h-rentals');
	var $hDeals = $('.h-deals');

	$('#map-image, #world-image').mouseout(function() {
		$hInner.removeClass('on');
		$hState.text('');
		$hRentals.text('');
		$hDeals.text('');
	});

	// We should set these via backend in the imagemap static file
	$('area.usa-area').click(function() {
		$('.ht2').removeClass('ht2-worldmode');
		return false;
	});
	
	$('area').click(function() {
		setSendOmnitureDate();
		$.cookie("VR_OMNITURE_MULTISEARCH", "NewSearch", {
			path : '/vacation-rentals/'
		});
	});

	$('area').each(function() {
		var id = $(this).attr('href').split('/');
		id = id[id.length - 1].split('.')[0];
		$(this).attr('rel', id);
	});

	$('area').mouseover(function areaover() {
		if ($(this).attr('rel') == 'findarental') {
			$hState.text('');
			$hRentals.text('');
			$hDeals.text('');
			return false;
		}
		var id = $(this).attr('rel');
		if (!mapStatObj[id])
			return;
		$hInner.addClass('on');
		$hState.text(mapStatObj[id].name + ':');
		$hRentals.text('Rentals: ' + mapStatObj[id].listings);
		if (mapStatObj[id].deals.replace(/\,/g, "") > 0) {
			$hDeals.text('Deals: ' + mapStatObj[id].deals);
		} else {
			$hDeals.text('');
		}
	});

	$('.map-hover').stop(true).css( {
		top : '90px'
	});
}

