$(function()
{
	$(".js-enabled").show();
	$("ul#nav li:not(ul#nav ul li)").hover(function()
	{
		$("ul", $(this)).show();
		$(this).addClass("active");
	}, function()
	{
		$("ul", $(this)).hide();
		$(this).removeClass("active");
	});
	$("form.subscribe input").data("value", $("form.subscribe input").val());
	$("form.subscribe input").focus(function()
	{
		($(this).val() == $(this).data("value")) ? $(this).val("") : null;
	}).blur(function()
	{
		($(this).val() == "") ? $(this).val($(this).data("value")) : null;
	});
	/*$("a.btn_register").click(function()
	{
		$("body").append('<div id="modal-layer"></div>');
		$("#sitewrapper").append('<div id="modal"></div>');
		$("#modal").load($(this).attr("href"), function() { $("#modal-layer, #modal").fadeIn(300); });
		scrollTo(0, 0);
		return false;
	});*/
	$("#modal-layer, #modal button").live("click", function()
	{
		$("#modal-layer, #modal").fadeOut(300, function() { $(this).remove(); } );
		return false;
	});
	$("#translate select").change(function()
	{
		($("option:selected", $(this)).val() == "") ? null : window.location = "http://www.google.com/translate_c?hl=en" + $("option:selected", $(this)).val() + "&u=" + window.location.href;
	});
});