jQuery.noConflict();



function libLANG() {
	jQuery('#lang ul li').hover(
		function() {
			jQuery(this).find('ul:first').slideDown('fast');
		},
		function() {
			jQuery(this).find('ul:first').slideUp(1);
		}
	);
}

function AGENTUR_NET() {
	jQuery('#agentur_net ul li').hover(
		function() {
			jQuery(this).find('ul:first').slideDown('fast');
		},
		function() {
			jQuery(this).find('ul:first').slideUp(1);
		}
	);
	
	jQuery('#agentur_net').click(
		function() {
			//alert(jQuery(this).find('a').attr('href'));
			//window.parent.location = jQuery(this).find('a').attr('href');
			window.open(jQuery(this).find('a').attr('href'));
		}
	)
	
}

function Prod_uebersicht_HOVER() {
	jQuery('#csc-menu ul li div.teaser_image').hover(
		function() {
			jQuery(this).css({'filter' : 'alpha(opacity=60)', '-moz-opacity' : '.60', 'opacity' : '.60'});
		},
		function() {
			jQuery(this).css({'filter' : 'alpha(opacity=99)', '-moz-opacity' : '.99', 'opacity' : '.99'});
		}
	);
	jQuery('#csc-menu ul li div.teaser_image2').hover(
		function() {
			jQuery(this).prev().css({'filter' : 'alpha(opacity=60)', '-moz-opacity' : '.60', 'opacity' : '.60'});
		},
		function() {
			jQuery(this).prev().css({'filter' : 'alpha(opacity=99)', '-moz-opacity' : '.99', 'opacity' : '.99'});
		}
	);
}



function tableformat(){
	var anz_tr = jQuery('#col2 table.contenttable tbody').find("tr").length;
	for (zaehler = 1; zaehler <= anz_tr; zaehler += 2) {
		jQuery('#col2 table.contenttable tbody tr:eq('+zaehler+')').css({'background' : '#ffffff'});
	}

	
}
	

	
	
function fake_locator(){	
	jQuery('#gaulwelt').click(
		function() {
			jQuery("#gaulwelt_stoerer").show("slow");
		}
	)
}



function check_country(land){	
	if(land == "at"){
		jQuery("#gaulwelt_stoerer2").show("slow");
	}
	if(land == "de"){
		jQuery("#gaulwelt_stoerer_de").show("slow");
	}
}


function closest(){	
	jQuery('#x_close').click(
		function() {
			jQuery("#gaulwelt_stoerer2").hide("slow");
		}
	)
	jQuery('#de_close').click(
		function() {
			jQuery("#gaulwelt_stoerer_de").hide("slow");
		}
	)
}




function checkFields_werte(city,zip,lnd){
	//alert(city+'_____'+zip+'______'+lnd);
	if(lnd == "--"){
		alert("Bitte wählen Sie ein Land aus!");
		return false;
	}
	if(lnd == "at"){
		jQuery("#gaulwelt_stoerer2").show("slow");
		return false;
	}
	if(lnd == "de"){
		jQuery("#gaulwelt_stoerer_de").show("slow");
		return false;
	}
	if(city == "" && zip == ""){
		alert("Bitte geben Sie eine Postleitzahl oder einen Ort an!");
		return false;
	} else {
		document.forms.locator.submit();
	}
}


function setFooterPos(){


	var menu2_h = jQuery("#menu2").height();

	if(jQuery("#path").html().indexOf("Werbung") > -1){
		var multiply = (menu2_h-430)*-1;
		jQuery("#footer").css({'bottom' : ''+multiply+'px'});
	
	}else if(jQuery("#path").html().indexOf("Schnittzeichnungen") > -1){
		var multiply = (menu2_h-450)*-1;
		jQuery("#footer").css({'bottom' : ''+multiply+'px'});
	}else if(jQuery("#path").html().indexOf("Prüfzeugnisse") > -1){
		var multiply = (menu2_h-450)*-1;
		jQuery("#footer").css({'bottom' : ''+multiply+'px'});
	}else{
		/* jQuery("#footer").css({'bottom' : '-300px'}); */
	}
}

jQuery(document).ready(
	function() {
		libLANG();
		AGENTUR_NET();
		Prod_uebersicht_HOVER();
		tableformat();
		fake_locator();
		check_country();
		closest();
		setFooterPos();
	}
);








