$(document).ready(function(){
	// pin the sidebar to the viewport
	// this will mimic position:fixed to be compatible with IE6
	var name = "#sidebar";
	var menuYloc = null;
	if ($(window).scrollTop() > 0) {
		var offset = menuYloc+$(document).scrollTop()+"px";
		$(name).animate({top:offset},{duration:250,queue:false});
	}
	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
	$(window).scroll(function () { 
		var offset = menuYloc+$(document).scrollTop()+"px";
		$(name).animate({top:offset},{duration:250,queue:false});
	});
	
	// info and comment boxes
	$('a.info').cluetip({
    titleAttribute: 'title_text',
		width: 330,
		topOffset: 15,
		leftOffset: 8,
		cluetipClass: 'rounded', 
		dropShadow: false, 
		closePosition: 'title', 
		arrows: true,
		cursor: 'pointer',
		sticky: true,
		activation: 'click',
		ajaxCache: false
	});

	$('a.comments').cluetip({
		width: 330,
		topOffset: 15,
		leftOffset: 8,
		cluetipClass: 'rounded', 
		dropShadow: false, 
		closePosition: 'title', 
		arrows: true,
		cursor: 'pointer',
		sticky: true,
		activation: 'click',
		ajaxCache: false
	});
});
