var domain = "tuanhbui.com";

$(document).ready(function() {
	$("#title").click(function() {
		$("#content").html('<img id="text" src="i/text.gif" alt="" /><img id="splash" src="i/splash.jpg" alt="" />');
	});
	$("#fashion-button").click(function() {
		$("#content").load("fashion.html");
	});
	$("#portrait-button").click(function() {
		$("#content").load("portrait.html");
	});
	$("#beauty-button").click(function() {
		$("#content").load("beauty.html");
	});
	$("#food-button").click(function() {
		$("#content").load("food.html");
	});
	$("#whet-button").click(function() {
		$("#content").load("whet.html");
	});
	$("#tourist-button").click(function() {
		$("#content").load("tourist.html");
	});
	$("#allure-button").click(function() {
		$("#content").load("allure.html");
	});
	$("#information-button").click(function() {
		$("#content").load("information.html");
	});
	
	$("#menu .navbutton").hover(
		function() {
			$(this).attr("src", $(this).attr("src").split("_off")[0] + "_on" + $(this).attr("src").split("_off")[1]);
		},
		function() {
			$(this).attr("src", $(this).attr("src").split("_on")[0] + "_off" + $(this).attr("src").split("_on")[1]);
		}
	);
	
	$(".email-off").parent().bind('mouseenter.createEmailLink', function() {
		$(this).find(".email-off").attr("href", "mailto:" + $(this).find(".email-off").attr("href") + "@" + domain);
		$(this).find(".email-off").removeClass("email-off");
		$(this).unbind('mouseenter.createEmailLink');
	});
});
