jQuery(document).ready(function() {
								
	jQuery("a[name='mainitem']").click(function(e) {
		if (jQuery(this).attr("class") == "aktiv") return(false);
		
		jQuery("a[name='mainitem']").removeClass("aktiv");
		jQuery("#top_navigation ul").each(function(i){
			
			jQuery(this).hide();
		});
		
		
		var child = jQuery(this).parent("li").children("ul");
		jQuery(child).slideDown("slow");
		jQuery(this).addClass("aktiv");
		e.preventDefault();		
	});
	
	jQuery("a[name='subitem']").mouseover(function(e) {
		var parent = jQuery(this).parent("li");
		jQuery("img", parent).show();
	}).mouseout(function(){
	    var parent = jQuery(this).parent("li");
		jQuery("img", parent).hide();
    });
	
	jQuery("img.aktiv").show();
	
	jQuery("#startseite .content_element_singlepic").mouseover(function(e) {
		jQuery(this).css('opacity', 0.75);
	}).mouseout(function(){
	    jQuery(this).css('opacity', 1);
		jQuery(this).css('filter', '');
    });
	jQuery("#startseite .content_element_singlepic").click(function(e) {
		var target = jQuery("a", this).attr("href");
		if (target)
			window.location.href = target;
		else 
			e.preventDefault();
	});
	
	/*
	jQuery("#produktauswahl .content_element").mouseover(function(e) {
		jQuery(this).css('opacity', 0.75);
	}).mouseout(function(){
	    jQuery(this).css('opacity', 1);
		jQuery(this).css('filter', '');
    });
	jQuery("#produktauswahl .content_element").click(function(e) {
		var target = jQuery("a", this).attr("href");
		window.location.href = target;
	});
	
	jQuery(".tx-indexedsearch-res table").mouseover(function(e) {
		// jQuery(this).css('opacity', 0.75);
	}).mouseout(function(){
	    // jQuery(this).css('opacity', 1);
		// jQuery(this).css('filter', '');
    });
	jQuery(".tx-indexedsearch-res table").click(function(e) {
		var target = jQuery("a", this).attr("href");
		window.location.href = target;
	});
	*/
	
	jQuery(".helper").mouseover(function(e) {
		jQuery(this).css('opacity', 0.25);
	}).mouseout(function(){
	    jQuery(this).css('opacity', 0);
    });
	jQuery(".helper").click(function(e) {
		var parent = jQuery(this).parent()
		var target = jQuery("a", parent).attr("href");
		window.location.href = target;
	});
	
	jQuery(".helper").each(function(i){
			var height = jQuery(this).parent().height();
			jQuery(this).height(height);
			jQuery(this).css('opacity', 0);
	});
	
});
