﻿$(document).ready(function () {
	$("#topNavList li").hover(function() {
		if($(this).children("a:first").attr("class") != "topMenuActive" && $(this).children("a:first").attr("id") != "inpath" && $(this).parent().attr("id") == "topNavList") {
			if($(this).children("ul:first").attr("class") == "topSubNavList") {
				$(this).children("ul:first").fadeIn();
				$(this).children("ul:first").toggleClass("topSubNavList");
			}
			else {
				$(this).children("ul:first").fadeOut();
				$(this).children("ul:first").toggleClass("topSubNavList");
			}
		}
	});
});

function readyNewsletter() {
	$("#AccessUserName_713").val("Indtast navn...");
	$("#AccessUserEmail_713").val("Indtast email...");
	
	$("#AccessUserName_713").focus(function () {
		if($(this).val()=="Indtast navn...") {
			$(this).val("");
		}
	});
	
	$("#AccessUserName_713").blur(function () {
		if($(this).val()=="") {
			$(this).val("Indtast navn...");
		}
	});
	
	$("#AccessUserEmail_713").focus(function () {
		if($(this).val()=="Indtast email...") {
			$(this).val("");
		}
	});
	
	$("#AccessUserEmail_713").blur(function () {
		if($(this).val()=="") {
			$(this).val("Indtast email...");
		}
	});
}

function readyFormular() {
	$("#cbKontaktFormular_navn").val("Indtast navn...");
	$("#cbKontaktFormular_email").val("Indtast email...");
	$("#cbKontaktFormular_telefon").val("Indtast Telefon...");
	$("#cbKontaktFormular_comment").val("Hvad kan vi hjælpe dig med?");
	
	$("#cbKontaktFormular_navn").focus(function () {
		if($(this).val()=="Indtast navn...") {
			$(this).val("");
		}
	});
	
	$("#cbKontaktFormular_navn").blur(function () {
		if($(this).val()=="") {
			$(this).val("Indtast navn...");
		}
	});
	
	$("#cbKontaktFormular_email").focus(function () {
		if($(this).val()=="Indtast email...") {
			$(this).val("");
		}
	});
	
	$("#cbKontaktFormular_email").blur(function () {
		if($(this).val()=="") {
			$(this).val("Indtast email...");
		}
	});
	
	$("#cbKontaktFormular_telefon").focus(function () {
		if($(this).val()=="Indtast Telefon...") {
			$(this).val("");
		}
	});
	
	$("#cbKontaktFormular_telefon").blur(function () {
		if($(this).val()=="") {
			$(this).val("Indtast Telefon...");
		}
	});
	
	$("#cbKontaktFormular_comment").focus(function () {
		if($(this).val()=="Hvad kan vi hjælpe dig med?") {
			$(this).val("");
		}
	});
	
	$("#cbKontaktFormular_comment").blur(function () {
		if($(this).val()=="") {
			$(this).val("Hvad kan vi hjælpe dig med?");
		}
	});
}
