// prevents conflicts
var $j = jQuery.noConflict();

/* ---------- start - jQuery ---------- */

$j(document).ready(function() {

	// suckerfish navigation	
	$j("ul#navigation li.mainLink").hover(
		function() {
			//$j(this).find("ul").css("display","block");
			$j(this).find("ul").fadeIn(100);
			$j(this).find("a:first").addClass("active");
			// forces the content under the navigation
			$j("body").find(".content").removeClass("ziAuto");
			$j("body").find(".content").addClass("ziNegative");
		},
		function() {
			//$j(this).find("ul").css("display","none");
			$j(this).find("ul").fadeOut(50);
			$j(this).find("a:first").removeClass("active");
			// resets the content back to normal stage
			$j("body").find(".content").removeClass("ziNegative");
			$j("body").find(".content").addClass("ziAuto");
		}
	);

	
	// suckerfish form behavior fix
	// hides the subnavigation when mouse is moved on top of input
	$j("input").hover(
		function() {
			// checks if the navigation is active
			if ($j("ul#navigation li.mainLink").find("a:first").hasClass("active")) {
				$j("ul#navigation li ul").fadeOut(50);
				$j("ul#navigation li.mainLink").find("a:first").removeClass("active");
				// resets the content back to normal stage, just in case
				$j("body").find(".content").removeClass("ziNegative");
				$j("body").find(".content").addClass("ziAuto");
			}
			// otherwise doesn't do anything
			return false;
		},
		function() {
			// otherwise doesn't do anything
			return false;
		}		
	); 


	// tooltip helptexts
	$j("img.toolclick").click(function(e) {
		// gets the text from img alt attribute
		var infoAttr = "alt";
		var offset = $j(this).offset();
		toolclicks(e, this, infoAttr, offset);

		return false;
	});
	
});

/* ----------- end - jQuery ----------- */