/**
 * @author Kav
 */
var $jq = jQuery.noConflict();

function positionSidebar() {
	
	var subnavheight = $jq('.subnav').height();
	var sidebartop = parseInt($jq("#sidebar").css("top"));
	sidebartop -= subnavheight;
	var newtop = '' + sidebartop + "px";
	$jq('#sidebar').css({
		"top": newtop
	});
}

function makeSidebarInteractive() {
	
	$jq(".sidebaritem").each(function (i) {
		initOver(this.id + "_over");
		
		$jq(this).hover(
			
			function() {
				expandOver(this.id + "_over");
			},
			function() {
				contractOver(this.id + "_over");
			}
			
		)
	})	
}

function initOver(overid) {
	$jq('#' + overid).height( 49 );
	$jq('#' + overid).fadeTo(0, 0.7);
}

function expandOver(overid) {
	$jq('#' + overid).stop();
	$jq('#' + overid).animate({
		height: "75px"		
	}, 300)
}

function contractOver(overid) {
	$jq('#' + overid).stop();
	$jq('#' + overid).animate({
		height: "49px"
	}, 300)	
}