(function($){
	$(document).ready(function(){
		
		
		
		// Last
		$('#metanav li:last-child').addClass('last');
		$('.box li:last-child').addClass('last');
		
		// Vergibt jedem 3. Teaser die Klasse "last"
		$('#bereichseite .small:nth-child(3n-0)').toggleClass('smalllast');
		
		// Vergibt jedem 3. Teaser die Klasse "last"
		$("<br class='clear' />").insertAfter("#bereichseite .small:nth-child(3n-0)");


		// Search-Box: Value leeren onfocus
	  $("#ajaxSearch_input").focus(function () {
			$(this).attr("value","");
	  });
	  $("#ajaxSearch_input").blur(function () {
			$(this).attr("value","Suchbegriff eingeben");
	  });
	

		// Search-Box: Button-Mouse-Over
		$("#ajaxSearch_submit").mouseover(function () {
			$(this).attr("src","images/btn_search_mo.png");
	  });
		$("#ajaxSearch_submit").mouseout(function () {
			$(this).attr("src","images/btn_search.png");
	  });

		
		// Colorbox
	  $(".zoom").colorbox();
	
	  // Cycle
		$('#subline').cycle({ 
		    fx:    'fade',
		    speed:   600, 
		    timeout: 5000, 
		    pause:   0 
		});
		
		$('.goto1').click(function() { 
		    $('#subline').cycle(0); 
		    return false; 
		}); 

		$('.goto2').click(function() {  
		    $('#subline').cycle(1);  
		    return false;  
		});
		
		$('.goto3').click(function() {  
		    $('#subline').cycle(2);  
		    return false;  
		});
		
		// Zebra-Effekt für Listen
		$('.zebra tr:nth-child(odd)').addClass('alt');
		
		// ImgHover
		$(".hover").imghover({suffix: "_hover"});
		$(".btn").imghover({suffix: "_hover"});

	});
})(jQuery);