jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		vertical: true,
		scroll: 1,
		visible: 1
    });
    //
    $("#main_content").mouseover(function() {
    	$(".jcarousel-next,.jcarousel-prev").show();
	});
    //
    $("#main_content").mouseout(function() {
    	$(".jcarousel-next,.jcarousel-prev").hide();
	});
	//
	hideLink("");	
	$(".page_link_click").click(function () { 
		//the id will always be the first class attribute of the clicker div
		var classes_str = $(this).attr('class').split(" ")[0];
		if (classes_str.indexOf("id_") != -1){
			hideLink(classes_str);
		}
	});
});
//
function hideLink(id_str){
	$('.page_link').each(function(index) {
		if ($(this).attr('id') != id_str){
	    	$(this).hide();
		}else{
			$(this).show();
		}
	});
}
//
Cufon.replace('.cufon', {hover: true});
