$(document).ready(function(){

	$('#loginLink').click(function () {
		$('#top').addClass('hidden');
		$('#loginForm').show("slow");
	});


	$('.titleStats').click(function () {
		window.open($('.titleStats').children().attr("href"),'titlestats');
		return false;
	});


	$('.menuButtons').makeAccordion({
		header: '.menuButton',
		active: false,
		autoheight: false
	});



	


	// wrap as a jQuery plugin and pass jQuery in to our anoymous function
	(function ($) {
		$.fn.cross = function (options) {
			return this.each(function (i) {
				// cache the copy of jQuery(this) - the start image
				var $$ = $(this);

				// get the target from the backgroundImage + regexp
				var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, '');

				// nice long chain: wrap img element in span
				$$.wrap('<span style="position: relative;"></span>')
				// change selector to parent - i.e. newly created span
				.parent()
				// prepend a new image inside the span
				.prepend('<img>')
				// change the selector to the newly created image
				.find(':first-child')
				// set the image to the target
				.attr('src', target);

				// the CSS styling of the start image needs to be handled
				// differently for different browsers
				if ($.browser.msie || $.browser.mozilla) {
					$$.css({
					'position' : 'absolute',
					'left' : 0,
					'background' : '',
					'top' : this.offsetTop
					});
				} else if ($.browser.opera && $.browser.version < 9.5) {
					// Browser sniffing is bad - however opera < 9.5 has a render bug
					// so this is required to get around it we can't apply the 'top' : 0
					// separately because Mozilla strips the style set originally somehow...
					$$.css({
					'position' : 'absolute',
					'left' : 0,
					'background' : '',
					'top' : "0"
					});
				} else { // Safari
					$$.css({
					'position' : 'absolute',
					'left' : 0,
					'background' : ''
					});
				}

				// similar effect as single image technique, except using .animate
				// which will handle the fading up from the right opacity for us
				$$.hover(function () {
					$$.stop().animate({
						opacity: 0
					}, 250);
				}, function () {
					$$.stop().animate({
						opacity: 1
					}, 250);
				});
			});
		};

	})(jQuery);

	// note that this uses the .bind('load') on the window object, rather than $(document).ready()
	// because .ready() fires before the images have loaded, but we need to fire *after* because
	// our code relies on the dimensions of the images already in place.
	$(window).bind('load', function () {
		$('img.fade').cross();
	});


});


<!--

button1 = new Image();
button1.src = "images/nl/account_over.gif";

button2 = new Image();
button2.src = "images/nl/verdiensten_over.gif";

button3 = new Image();
button3.src = "images/nl/uitleg_over.gif";

button4 = new Image();
button4.src = "images/nl/vragen_over.gif";

button5 = new Image();
button5.src = "images/nl/promotools_over.gif";


menuButton = new Image();
menuButton.src = "images/menu_button_over.jpg";

//-->


var submitcount=0;
function validateLogin(thisform)
{

	thisform.id.className = 'field fld1';
	thisform.password.className = 'field fld1';

	if (thisform.id.value == null || thisform.id.value == "")
	{
		alert("Je bent vergeten je promotor id in te vullen !");
		thisform.id.className = 'loginFieldError fld1';
		thisform.id.focus();
		thisform.id.select();
		return false;
	}
	else if (thisform.password.value == null || thisform.password.value == "")
	{
		alert("Je bent vergeten je wachtwoord in te vullen !");
		thisform.password.className = 'loginFieldError fld1';
		thisform.password.focus();
		thisform.password.select();
		return false;
	}
	else
	{
		if (submitcount == 0)
		{
			submitcount++;
			return true;
		}
		else
		{
			alert("Het formulier is reeds verstuurd en wordt verwerkt !");
			return false;
		}
	}
}


function copyit(theField) {

	var tempval=eval("document."+theField)
	tempval.focus()
	tempval.select()
	therange=tempval.createTextRange()
	therange.execCommand("Copy")
}


function checkPromoInfo(alphane)
{
	var numaric = alphane;
	for(var j=0; j<numaric.length; j++)
	{
		var alphaa = numaric.charAt(j);
		var hh = alphaa.charCodeAt(0);
		if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh == 95 || hh == 45 || hh == 46)
		{
		}
		else{
			return false;
		}
	}
	return true;
}

function FullScreen(url) {
	var window_height = screen.availHeight - 30;
	var window_width = screen.availWidth - 6;
	var window_top = (screen.availHeight-window_height)/2-10;
	var window_left = (screen.availWidth-window_width)/2-5;
	nw = window.open('','newwindoes','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=toolbar=no,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,maximize=yes,minimize=yes');
	if(!nw) nw = top;
	nw.location.href = url;
	return false;
}


function jsEscape(theField, textarea, mode) {

	if(mode=="1") var newurl = unescape(theField);
	if(mode=="2") var newurl = escape(theField);


	document.getElementById(textarea).value = newurl;

}

