var helpTexts;

function initPage() {
	$('img[@src$=.png]').ifixpng();

	// Initing the validation of the helpform
	$("#contactForm").validate({
			rules: {
				fullname: "required",
				company: "required",
				email: {
					required: true,
					email: true
				},
				message: "required"
			},
			messages: {
				fullname: "Var god ange Fullständigt namn",
				company: "Var god ange Företag",
				email: "Var god ange en gilig E-post adress",
				message: "Var god ange ett Meddelande"
			}
		});
		
	// Initing the validation of the helpform
	$("#applyForm").validate({
		rules: {
			fullname: "required",
			email: {
				required: true,
				email: true
			},
			message: "required"
		},
		messages: {
			fullname: "Var god ange Fullständigt namn",
			email: "Var god ange en gilig E-post adress",
			message: "Var god ange ett Meddelande"
		}
	});
	
	$(".news_header").click(function(){
		var id = $(this).attr("id").split("_")[2];
		$(".news_body").each(function(){
			if($(this).attr("id").split("_")[2] == id)
				$(this).slideDown("slow");
			else
				$(this).slideUp("slow");
		})

		return false;
	})
}

function setHelp(contentObject) {
	helpTexts = contentObject;
}

$(document).ready(initPage);
