function encrypt(f) {
	var password = f.password.value;
	if (password !="") {
		var encrypted = hex_md5(hex_md5(password) + salt);
		f.password.value = encrypted;
	}
}

$(function() {	
	// initialize scrollable
	//$(".scrollable").scrollable({circular:true});
	/* @eg: zet onderstaande aan voor autoscroll. Ziet er alleen raar uit bij het laaste item
	
	*/
	$(".scrollable").scrollable({circular: true}).autoscroll({ autoplay: true, interval: 6000 });
	$(":input").placeholder();
});

$(document).ready(function() {
	var categoryId = getUrlVars()["categrory_id"];
	

	
	
	$("#map area").hover(function () {
		showMap(this);
	}, function () {
		hideMap(this);
	});
	
	$("#map_list a").hover(function () {
		showMap(this);
	}, function () {
		hideMap(this);
	});
	
	$("div.dot").hover( function () {
		$(this).find("div").css("zIndex", 231);
		$(this).find("div").show();
	}, function () {
		$(this).find("div").hide();
	});
	
	$(".ocs").click(function(){
		$(".vvselection").submit();
	});
});
function showMap(who) {
	
	m = $(who).attr("rel");
	
	$("#" + m).show();
	$(".pop_up_continent div").hide();
	$(".pop_up_continent").show();
	$("#pop" + m).show();
	
}
function hideMap(who) {
	m = $(who).attr("rel");
	$("#" + m).hide();
	$(".pop_up_continent").hide();
}

function getUrlVars() {
	var vars = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
		vars[key] = value;
	});
	return vars;
}

