(function($){
	$(document).ready(function(){
		
		
		
		// Metanav
		$('#metanav li:last-child').addClass('last');
		
		// Vergibt jeder 3. Referenz die Klasse "last"
		$('#unterseite #content div.box:nth-child(3n)').toggleClass('boxlast');
		$('#referenzseite #content div.box:nth-child(3n+1)').toggleClass('boxlast');

		// Search-Box: Value leeren onfocus
	  $("#ajaxSearch_input").focus(function () {
			$(this).attr("value","");
	  });
	  $("#ajaxSearch_input").blur(function () {
			$(this).attr("value","Suchbegriff eingeben");
	  });
	
		// Anfrageformular
		//$("#RequestForm .details").hide();
		
		/*
		$('#product').change(function() {
			 $("#RequestForm .details").hide();
		   //$("#" + this.value).show().siblings().remove();
		   $("#" + this.value).show();
		});
    */
		
		/*
		$("#RequestForm #intro input").click(function () {
			$("#" + this.value).show().siblings().remove();
			$("#RequestForm #intro").remove();
	  });
    */
	

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

		
		// Colorbox
	  $(".zoom").colorbox();
	
	  // Cycle
		$('#slider').cycle({ 
		    fx:     'scrollHorz', 
		    speed:   300, 
		    timeout: 0, 
				next:   '#next2', 
		    prev:   '#prev2',
		    pause:   1 
		});
		
		// Cycle
		$('#slider2').cycle({ 
		    fx:     'fade', 
		    speed:   300, 
		    timeout: 0, 
				next:   '.next', 
		    prev:   '.prev',
		    pause:   1 
		});
		
		// ImgHover
		$(".hover").imghover({suffix: "_hover"});
		$(".btn").imghover({suffix: "_hover"});

	});
})(jQuery);
