$(document).ready(function () {
	$(".menulist a[href$='huisuitzettingen.aspx']").attr('href', 'http://huisuitzetting.info');
	$(".menulist a[href$='eropaf.aspx']").attr('href', 'http://eropaf.org');

	$('.hu .logo .logo2').css({backgroundImage : "url(/images/huisuitzet.png)", backgroundRepeat :"no-repeat"});
	$('.logo2 img').css({display : "none"});
	
	$('.hu .logo').mouseenter(function(){
		$('.hu .logo .logo2').css({backgroundImage : "url(/images/huisuitzet2.png)", backgroundRepeat :"no-repeat"});
	});
	$('.hu .logo').mouseleave(function(){
		$('.hu .logo .logo2').css({backgroundImage : "url(/images/huisuitzet.png)", backgroundRepeat :"no-repeat"});
	});
	
	//De extra margin wanneer er een submenu aanwezig is
	var liCount = $("#mainnav li:has(ul)").length;
	if (liCount > 0) {
		$('.contentvlak h1').first().css('margin-top', '45px');
	} else {
	}
	//============hideTips============
	$.fn.hideTips = function(){
		  // when building a plugin, "this" references the jquery object that the plugin was called on.
		  // iterate through each element and return the elements.
		  return this.each(function(){
				// save element for referencing later
				var $elem = $(this)
				// save alt and title
				var savealt = $elem.attr('alt');
				var savetitle = $elem.attr('title');
				// on mouseover, remove attributes
				// on mouseout, set attributes
				$elem.hover(function(){
					  $elem.removeAttr('title').removeAttr('alt');
				},function(){
					  $elem.attr({title:savetitle,alt:savealt});
				});
		  });
	};

	$('img').hideTips();
	$('a').hideTips();
	
});
