Cufon.replace('#primary-menu li a', { fontFamily: 'nevis' });

jQuery(function() { 
	
	jQuery("#page-menu ul li:last, #popular_news ul li:last, #related_content ul li:last").addClass("last");
	
	jQuery("a.thickbox").fancybox({
		'titleShow'     : false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack'
	});
		
});
	
jQuery(window).load(function() {
	mCustomScrollbars();
});

function mCustomScrollbars(){
	/* 
	malihu custom scrollbar function parameters: 
	1) scroll type (values: "vertical" or "horizontal")
	2) scroll easing amount (0 for no easing) 
	3) scroll easing type 
	4) extra bottom scrolling space for vertical scroll type only (minimum value: 1)
	5) scrollbar height/width adjustment (values: "auto" or "fixed")
	6) mouse-wheel support (values: "yes" or "no")
	7) scrolling via buttons support (values: "yes" or "no")
	8) buttons scrolling speed (values: 1-20, 1 being the slowest)
	*/
	jQuery("#mcs4_container").mCustomScrollbar("vertical",200,"easeOutCirc",1.25,"fixed","yes","no",0); 
}

/* function to fix the -10000 pixel limit of jquery.animate */
jQuery.fx.prototype.cur = function(){
    if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
      return this.elem[ this.prop ];
    }
    var r = parseFloat( jQuery.css( this.elem, this.prop ) );
    return typeof r == 'undefined' ? 0 : r;
}

/*
jQuery(function() { 
	if (jQuery().equalHeights) {
		jQuery(".block_pair").each(function(i) {
		    if (i % 2) {
		        jQuery(this).prev().andSelf().equalHeights();
		    }
		});
	}
});
*/

// Equal Heights
jQuery(function() { 
	jQuery().equalHeights && jQuery(".block_pair li").equalHeights(); 
});
