//::jQuery No Conflict: New Variable
var $j = jQuery.noConflict();

$j(document).ready(function(){
	//Settings
	var intPosY    = 140;
	var intPadY    = 10;
	var strSpeed   = "normal";
	var strConfig  = {
		 sensitivity: 3,
		 interval: 100,
		 over: mouseOver,
		 timeout: 600,
		 out: mouseOut
	};

	//Accordion
	$j("#menu").show();
	$j("#menu").accordion({
		autoHeight: false,
		navigation: false,
		event: "click",
		active: ".selected"
	});

	//Floater
	$j(window).scroll(function() {
		var intCurY = $j(document).scrollTop();
		var intOffY = (intCurY < Math.abs(intPosY)) ? intPosY : 0;
		var strOffY = (intCurY > Math.abs(intPosY)) ? intPadY + intOffY + intCurY + "px" : intPosY + "px";
		$j("#menu_container").animate({top:strOffY},{duration:750,queue:false});
	});

	//Overlays
	$j("#nav ul li div").hoverIntent(strConfig);
	function mouseOver() {
		$j(this).children("em").slideDown(strSpeed);
	}
	function mouseOut() {
		$j(this).children("em").slideUp(strSpeed);
	}
/*
	$j("#nav ul li div").hover(function() {
		$j(this).children("em").slideDown(strSpeed);
	},function() {
		$j(this).children("em").slideUp(strSpeed);
	});
*/

	//Tabs
	var strPath = window.location.pathname;
	var strPage = strPath.substring(strPath.lastIndexOf('/') + 1);
	if (strPage == "" || "default.asp") {
		//Left
		$j(jQueryTab("p1","container"));
		$j(jQueryTab("p1","products"));
		$j(jQueryTab("p1","services"));
		$j(jQueryTab("p1","support"));

		//Right
		$j(jQueryTab("p2","container"));
		$j(jQueryTab("p2","news"));
		$j(jQueryTab("p2","press"));
		$j(jQueryTab("p2","resources"));
	}

	//Kwicks
	//$j(".kwicks").show();
	$j(".kwicks").kwicks({
		max: 506,
		spacing: 5,
		isVertical: false,
		sticky: false,
		defaultKwick: 0,    //0, Math.floor(Math.random()*6)
		event: "mouseover", //mouseover, click, dblclick
		duration: 500,      //500
		easing: ""          //easeOutBounce, easeOutElastic, easeOutBack
	});
});