(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)

function init()
{
	$('#nav img,#bio a img, #wec a img, .hover').mouseover(function() {
		$(this).attr("src", 'img/'+$(this).attr("alt")+'_h.png');
	});

	$('#nav img,#bio a img, #wec a img, .hover').mouseout(function() {
		$(this).attr("src", 'img/'+$(this).attr("alt")+'.png');
	});
	

	
	$('.olay').mouseover(function() {
		$(this).addClass('opac');
	});

	$('.olay').mouseout(function() {
		$(this).removeClass('opac');
	});
	
	$('#thumbs a').click(function() {
		$('#galimg img').attr("src",$(this).attr("href"));
		return false;
	});
	
	jQuery.preLoadImages("img/Aktuelles_h.png","img/Band_h.png","img/Musik_h.png","img/Termine_h.png","img/Galerie_h.png","img/Kontakt_h.png");
}

function eintragen() {
	$('#nlea').attr('value','e');
	document.getElementById('nlform').submit();
}

function gbeintragen() {
	$('#ckk').attr('value','true');
	document.getElementById('gbform').submit();
}

function austragen() {
	$('#nlea').attr('value','a');
	document.getElementById('nlform').submit();
}
