$(function(){
	$(".js_hide").hide();
	$(".js_remove").remove();
	$(".js_unhide").removeClass("js_unhide").removeClass("hidden");

	if ($.jcorners) {
		$.jcorners(".rounded", {radius:12});
	}

	/* UI effects for search button Begin*/
	$("a.search_button").bind("mouseover", function() {
		$("img", this).attr("src", '/cd-common/images/buttons/search_over.gif');
	});
	$("a.search_button").bind("mouseout", function() {
			$("img", this).attr("src", '/cd-common/images/buttons/search.gif');
	});
	$("a.search_button").bind("mousedown", function() {
		$("img", this).attr("src", '/cd-common/images/buttons/search_click.gif');
	});
	$("a.search_button").bind("mouseup", function() {
		$("img", this).attr("src", '/cd-common/images/buttons/search_over.gif');
	});
	$("a.search_button").bind("click", function() {
		$(this).parents("form").submit();
	});
	/* UI effects for search button End*/
	
	/* Expand clickable area of letter nav to whole TD */
	$(".alphabet td").bind("click", function() {
		location.href=$("a", this).attr('href');
	});
	/* Expand clickable area of letter nav to whole TD End */
});

function createMapWindow(cssText,scrollLeft,scrollTop, imageName) {
	var mapWindow = null;

	var htmlDoc = "";
	htmlDoc += "<html><head><title>";
	htmlDoc += "CitiDex: Location Finder";
	htmlDoc += "</title>";
	htmlDoc += "<style type='text/css'>";
	htmlDoc += "      img.ie     { position:absolute; top=5; left=5 }";
	htmlDoc += "      img.not_ie { position:absolute; top=5; left=0 }";
	htmlDoc += cssText;
	htmlDoc += "</style>";
	htmlDoc += "</head>";
	htmlDoc += "<body>";
	var notIe = "not_";
	if (document.all) {
		notIe = "";
	}
	htmlDoc += "<img class='" + notIe + "ie' src='http://www.citidexli.com/map/" + imageName + "' />";
	htmlDoc += "<div id='mover'>";
        htmlDoc += "<img src='http://www.citidexli.com/pics/flashingball.gif' />";
	htmlDoc += "</div>";
	htmlDoc += "</body></html>";

	var mapWindow = window.open(
		'', 
		'', 
		'height=550,width=600,left=0,top=0,screenX=0,screenY=0,toolbar=no,menubar=no,resizable=yes,scrollbars=1'
	);
	mapWindow.document.open();
	mapWindow.document.write(htmlDoc);
	mapWindow.document.close();
	mapWindow.focus();
	setTimeout(function(){ mapWindow.scrollTo(scrollLeft, scrollTop); },1);
	return false;
}
