// NXS jQuery.Image Preloader
$.fn.imgPreload = function(search,replace){
	return this.each(function() {
		var Bild = new Image();
		Bild.src = $(this).attr("src").replace(search,replace);

		$(this).mouseover(function(){
			var imgSrc = $(this).attr("src");
			$(this).attr("src",imgSrc.replace(search,replace));
		});
		$(this).mouseout(function(){
			var imgSrc = $(this).attr("src");
			$(this).attr("src",imgSrc.replace(replace,search));
		});
	});
}

$(document).ready(function(){
	// Preload Funktionen
	$(".navigation .active img").removeClass("preload");
	$(".preload").imgPreload("norm", "active");

	// IE 6 Hover Fix
	if( $.browser.msie && $.browser.version.substr(0,1)=="6" )
	{
		$(".nav_point").each(function(){
			if( !$(this).hasClass("active") )
			{
				$(this).children("img").mouseover(function(){
					$(this).css("border-color", "#9B9B9D");
				});
				$(this).children("img").mouseout(function(){
					$(this).css("border-color", "#38383A");
				});
			}
		});
		$("a.active img").css("border-color", "#9B9B9D");
	}
	
	// Min-Height Fix
	var vHeight = $(".shadow").height();
	if( vHeight < 600 )
	{
		$(".shadow").css("height", "600px");
	}
});

