/*
 * JS-Funktionen cubeoffice.de
 * Copyright 2008 cubeoffice GmbH & Co. KG
 */
/*
	function pageShadow(vis) {
		
		if (!$.browser.msie) {

			if (vis) {
				
				if (vis == 2 && $.cookie("style") != "white") {
					$("#page").css("border", "none");
					$("#page").removeShadow();
					$("#page").dropShadow({
						left: 0,
						top: 0,
						blur: 2,
						opacity: 1
					});
				} else {
					$("#page").removeShadow();
					$("#page").redrawShadow();
				}
		
				
			} else {
		
				$("#page").removeShadow();
				
			}
			
		}
		
	}
	
	
	function replaceSrc(original, replaceWith) {
		for (var i = 0; i < document.images.length; i++) {
			var path = document.images[i].src;
			if (path.match(/_skinned/)) {
				document.images[i].src = path.replace(original, replaceWith);			
			}
		}		
	}


	$(function() {
		
		
		// Leere Content-Navs ausblenden
		if ($("#nav_content ul li").length == 0) {
			$("#nav_content").hide();
		}

		// Letzten Navigationspunkt verlängern
		$("#nav_main ul li:last").css("width", "200px");		
		$("#nav_main ul li:last a").css("width", "200px");	
		
		// Wenn das Untermenü keine Klasse abbekommen hat...
		if ($("#nav_sub ul > li").length == 0 && !$("#nav_sub").hasClass("empty")) {
			$("#nav_sub").addClass("empty");
		};	

		// Kürzeres Hintergrundbild für den aktiven HM-Punkt, wenn kein Submenü vorhanden
		if ($("#nav_sub").hasClass("empty")) {
			$("#nav_main ul li.current a").addClass("shortimg");
		}
		
		// Abstandskorrektur erster Headlines in den Spalten
		//$(".subcolumns h1:first, .subcolumns h2:first").css("margin-top", "0");
		
		// Drucklink aktivieren
		$("#printlink").click(function() {
			window.print();
		});
		
		// Shadowbox initialisieren
	//	var boxoptions = {
	  //      resizeLgImages:     true,
	    //    displayNav:         true,
	    //    handleUnsupported:  'remove',
	    //    keysClose:          ['s', 27],
	    //    autoplayMovies:     false
	    //};
	
	//	Shadowbox.init(boxoptions);
		
		
		// Überschriften, die "comain", "coport" oder "iKongress" enthalten durch Bild ergänzen
		//$("h1:contains('coport')").prepend('<img src="../../media/produkte/coport_box_logo_skinned.gif" alt="coport" class="productlogo" />');
		//$("h1:contains('comain')").prepend('<img src="../../media/produkte/comain_box_logo_skinned.gif" alt="comain" class="productlogo" />');
		//$("h1:contains('iKongress')").prepend('<img src="../../media/produkte/ikongress_box_logo_skinned.gif" alt="iKongress" class="productlogo" />');

		// Überschriften 2. Grades auf der Startseite, die "comain", "coport" oder "codm" enthalten durch Bild ersetzen
		//$(".products h2:contains('coport')").html('<img src="media/produkte/coport_box_logo_skinned.gif" alt="coport" />').css("padding-bottom","5px");
		//$(".products h2:contains('comain')").html('<img src="../media/produkte/comain_box_logo_skinned.gif" alt="comain" />').css("padding-bottom","5px");
		//$(".products h2:contains('iKongress')").html('<img src="../media/produkte/ikongress_logo_skinned.gif" alt="" />').css("padding-bottom","5px");
		
		// Fix: Längere Seitenspalte zieht keinen Border
	//	if ($(".c66l_content").height() != null && ($(".c66l_content").height() < $(".c33r_content").height())) {
	//		$(".c66l_content").css("border-right", "none");
	//		$(".c33r_content").css("border-left", "1px solid #898989");
		}
		
		// Fix flackernde Menübullets im IE
		//$("#nav_content_list").css("list-style-type", "none");
		//$("#nav_content_list li").css("list-style-type", "none");

		// Styleswitcher aktivieren
		// 080902 (cv) Styleswitcher erstmal deaktiviert
		// $("#sideswitch_container").show();

	//	if ($.cookie("switcher_we") == "white") {
	//		replaceSrc(/media/, "media/whiteTheme");
	//	}

		// Alle Links, die auf Bilder zeigen (.JPG, .jpg, .PNG, .png, .GIF, .gif), zur Lightbox wandeln
	//	$("a[href$=.JPG], a[href$=.jpg], a[href$=.PNG], a[href$=.png], a[href$=.GIF], a[href$=.gif]").shadowbox();
		
		// Schattenwurf erstellen
		//pageShadow(2);	
		
	});*/
