/**
 *
 * Functies die uitgevoerd moeten worden na het laden
 *
 **/
 $(document).ready(function(){
	// Hoveren van een tabel rij
	$(".ColorRow").hover(
	 	function() {
	 		$(this).css('background-color','#EBEBEB');
	 	},
	 	function() {
	 		$(this).css('background-color','');
	 	}
	)
	
	// Weghalen H1 op hoofdpgina als hij leeg is
	if($('#ContentTitel').html() == "") {
		$('#ContentTitel').hide()
	}
	
	// Achtergrond kleur
	//$('html').css("background-color", "#C7E0B8")
	
	/**
	 * @name input text fix
	 * Zorgen dat nooit meer dan database aankan ingevoerd wordt
	 */
	$('input[type="text"]').each(
		function() {
			if($(this).attr("maxlength") > 255) {
				$(this).attr("maxlength", "250")
			}
		}
	)
	
	$('.ReadMoreBox').each(function() {
		// Ophalen ID
		var strId	= $(this).attr('id').toString();
		// Toevoegen link
		$(this).before('<a href="javascript:;" id="'+strId+'_link" onclick="switchRead(\''+strId+'\')">Lees meer..</a>')
		// Verbergen die hap
		$(this).hide();
	})
	
	
	/**
	 * @name GoogleAnalytics
	 *
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	// Via jQuery vind ik mooier!
	$.getScript(gaJsHost + "google-analytics.com/ga.js", function() {
		try {
			var pageTracker = _gat._getTracker("UA-11894630-1");
			pageTracker._trackPageview();
		} catch(err) {} 	
	})*/
	
})


