//::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);
	});
*/

	/* Colorbox */
	$j("a[rel='gallery']").colorbox({
		opacity: '.35',
		maxWidth: '98%',
		maxHeight: '98%',
		current: '{current} of {total}',
		slideshow: true,
		slideshowAuto: false
	});

	$j("a[title='QuickPoint']").colorbox({
		opacity: '.35',
		rel: 'nofollow',
		overlayClose: false,
		width: '860px',
		height: '80%',
		iframe: true
	});

	$j("a[title='GoToMeeting']").colorbox({
		opacity: '.35',
		rel: 'nofollow',
		overlayClose: false,
		width: '660px',
		height: '95%',
		iframe: true
	});

	$j("a[rel='news']").colorbox({
		opacity: '.35',
		overlayClose: true,
		width: '700px',
		height: '70%',
		iframe: true,
		current: '{current} of {total}'
	});

	$j("a[title='Send Page']").colorbox({
		opacity: '.35',
		rel: 'nofollow',
		overlayClose: false,
		scrolling: false,
		width: '495px',
		height: '260px',
		iframe: true
	});
});
