  var currentElement;
 
 $(document).ready(function(){
 	
 	if($("#flash_inner").children().length >0 ) {
 		$("#inner").css("display", "none");
	}
 	
 	$(".imggrid a").click(function() {return false});
 	
	 // Handle image elements
 	$(".imggrid").mouseover(function(){
	   $("#inner").css("display","none");
	   $("#flash_inner").css("display","none");
	   $("#flash_inner").html("");
	   	
	   	var id = $(this).attr("id");
	   	if(! id) {
	   		id = $(this).children().attr("id");
   		}
	   	if(currentElement != id) {
	    	var plaatje = "url(user_files/grid_images/grid_"+id+".jpg)";
  		 	$("#imagegrid").css("background", plaatje);
  		 	currentElement = id;
		}
	 });
	$(".imggrid").mouseout(function(){
	   $("#inner").css("display","block");

	 });
 	
 	
   $(".imggrid_s").mouseover(function(){

	   var plaatje = "url(user_files/grid_images/grid_"+$(this).attr("id")+".jpg)";
	   
	   $("#inner_img").html ("<div style='position:relative; top: -10px; left: -10px;'><img src='user_files/grid_images/grid_"+$(this).attr("id")+".jpg'/></div>");  
	   //$("#imagegrid").css("background", plaatje);
	   return false;
	 });
	 
	$(".flash_link a").click(function() {return false});
	
	$(".flash_link").mouseover(function(){

		$("#inner").css("display","none");
		$("#flash_inner").css("display","block");
		
	   	// Get the request url
	   	var elm = $(this).attr("href");
	   	// If no href attribute is found then get it from it's child, this happends with a td event
	   	if(!elm) {
  			elm = $(this).children().attr("href");
	   	}
	   	
	   	if(elm != currentElement) {
		   	// Show the flash div and load the new content
			
			$("#flash_inner").load(elm + '?is_ajax=1');
			currentElement = elm;
		}
		return false;
	});
	 
	$(".flash_links").mouseout(function(){
	   $("#inner").css("display","block");
	   $("#flash_inner").html("");
	   $("#flash_inner").css("display","none");


	 });

	$(".ajax_link").mouseover(function(){
 		$("#flash_inner").html("");
 		$("#flash_inner").css("display","none");
 		$("#inner").css("display","block");
 				currentElement = 0;
	});
	
 	$(".ajax_link").click(function(){
 		$("#flash_inner").html("");
 		$("#flash_inner").css("display","none");
 		$("#inner").css("display","block");
 		
 		// Get the request url
	   	var elm = $(this).attr("href");
	   	// If no href attribute is found then get it from it's child, this happends with a td event
	   	if(!elm) {
  			elm = $(this).children().attr("href");
	   	}
	   	
	   	if(elm != currentElement) {
		   	// Show the flash div and load the new content
			
			$("#inner").load(elm + '?is_ajax=1','',function() {
	 			if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"#inner h1", sFlashSrc:"js/tradegothic.swf", sColor:"#00704a", sLinkColor:"#00704a", sBgColor:"#FFFFFF", sHoverColor:"#00704a", nPaddingTop:15, nPaddingBottom:15, sFlashVars:"textalign=top&offsetTop=0", sWmode:"transparent" }));
				};
				
 			});
 			currentElement = elm;
		}
 		return false;
 	});
 	
 	$(".ajax_hover_link").click(function(){
 		return false;
	});
		
 	$(".ajax_hover_link").mouseover(function(){
 		$("#flash_inner").css("display","none");
 		$("#inner").css("display","block");
 		
 		// Only update the content if it is new content
 		if(currentElement != $(this).attr("href")) {
 			currentElement = $(this).attr("href");
	 		$("#inner").load($(this).attr("href") + '?is_ajax=1','',function() {
	 			if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"#inner h1", sFlashSrc:"js/tradegothic.swf", sColor:"#00704a", sLinkColor:"#00704a", sBgColor:"#FFFFFF", sHoverColor:"#00704a", nPaddingTop:15, nPaddingBottom:15, sFlashVars:"textalign=top&offsetTop=0", sWmode:"transparent" }));
				};
	 			
	 		});
	 		
 		}
 		return false;
 	});
 	
 	$("#top_login_field_user").focus(function () {

 		if($(this).attr("value") == 'gebruikersnaam'){
 			$(this).attr("value", '');
 		}
	
 	});
 	
 	$("#top_login_field_user").blur(function () {

 		if($(this).attr("value") == ''){
 			$(this).attr("value", 'gebruikersnaam');
 		}
	
 	});
 	
 	$("#top_login_field_password").focus(function () {
 		if($(this).attr("value") == 'wachtwoord'){
 			$(this).attr("value", '');
 		}
	
 	});
 	
 	$("top_#login_field_password").blur(function () {

 		if($(this).attr("value") == ''){
 			$(this).attr("value", 'wachtwoord');
 		}
	
 	});
 });
 

