/**
 * @author michal
 */
$(document).ready(function(){
	
	//images preload
	jQuery.preLoadImages('/images/mainmenuliH.png','/images/mainmenuaH.png');
	//end images preload
	
	//mainmenu tab fix
	$('#mainmenu > li').each(function(){
		var thislink = $(this).find('a').attr('href');
		$(this).prepend('<a class="mm_fixlink" href="' + thislink + '"></a>');	
	});
	//endmainmenu tab fix
	
	//innerfade
	if ($('ul#fadingitems').find('li').length > 1) {
		$('ul#fadingitems').innerfade({
			speed: 2000,
			timeout: 5000,
			type: 'random',
			containerheight: '207px'
		});
		
		$('ul#fadingitems').find('li').each(function(){
			$(this).find('a').each(function(){
				if($(this).attr('href') == ''){
					$(this).parent().prepend($(this).html());
					$(this).remove();	
				}
			});
		});
		
	}
	//end innerfade	
	
	//kruimelpad
	if($('.kruimelpad').find('a').html() != 'Home'){
		$('.kruimelpad').prepend('<a href="/Basis.aspx">Home</a>&nbsp;&gt;&nbsp;');
	}
	//end kruimelpad
	
});//end document ready

$(window).load(function(){
	
	
	
});//end window load

//preload images
(function($){var cache=[];$.preLoadImages=function(){var args_len=arguments.length;for(var i=args_len;i--;){var cacheImage=document.createElement('img');cacheImage.src=arguments[i];cache.push(cacheImage);}}})(jQuery)
//end preload images

