/*********************************************************************************************************************************/
/* DOCUMENT READY CALLS **********************************************************************************************************/
/*********************************************************************************************************************************/

$(document).ready(function(){
	
	/* EXTERNAL LINKS start ***********************************************************/
	$('a[rel="external"]').click(function(){
		this.target = "_blank";
	});
	/* EXTERNAL LINKS end *************************************************************/
	
	$('html').addClass('js');
	
	$('#nav > ul > li:not(.active)').mouseenter(
		function(){
			$('#nav > ul > li.active').addClass('temp');
		}).mouseleave(
		function(){
			$('#nav > ul > li.active').removeClass('temp');
		});
	
	/*news ticker*/
	$('#newsticker .display').marquee('pointer').mouseover(function () {
		$(this).trigger('stop');
	}).mouseout(function () {
		$(this).trigger('start');
	}).mousemove(function (event) {
		if ($(this).data('drag') == true) {
			this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
		}
	}).mousedown(function (event) { 
		$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
	}).mouseup(function  () {
		$(this).data('drag', false);
	});
	/*news ticker*/
	
}); //close document.ready
//Cufon.replace('#nav > ul > li > a,#nav > ul > li a,#content-main > h1');
//Cufon.replace('#nav > ul > li > a,#content-main > h1', { fontFamily: 'garamond',hover:true });
//Cufon.replace('#nav > ul > li > ul a', { fontFamily: 'news-gothic',hover:true });

/*********************************************************************************************************************************/
/* DOCUMENT READY FUNCTIONS ******************************************************************************************************/
/*********************************************************************************************************************************/
