jq(document).ready( function() {
	/**** Temporary ********************************************************/
	if ( jq( 'a#forums' ).length ){
		jq( 'a#forums' ).text('Forum');
	}
	/**** Rounded images ********************************************************/	
	if ( jq( '.home-page img.wp-post-image' ).length ){
		var rounded = RoundedImages.createStyle({
			shadowOffset:0
		});

		var rounded = rounded.using({
			borderRadius:	'10 10 10 10'
		});

		RoundedImages.parse(jq('.home-page img.wp-post-image'), rounded);
	}
	//Tooltips
	jq("#featured-navigation li").hover(
		function () {
			jq('.meta', this).fadeIn(50);
		},
		function () {
			jq('.meta', this).fadeOut(50);
		}
	);
	// hide sticky topic admin link
	jq('.admin-links a:nth-child(2)').hide();
	
	/**** Local scroll ********************************************************/
	if ( jq( '#slider' ).length ){
		// Scroll initially if there's a hash (#something) in the url 
		jq.localScroll.hash({
			target: '#slider', //could be a selector or a jQuery object too.
			axis:'x',//the default is 'y'
			queue:true,
			duration:0
		});

		var jqlast = jq([]);//save the last link
		/**
		 * NOTE: I use jq.localScroll instead of jq('#navigation').localScroll() so I
		 * also affect the >> and << links. I want every link in the page to scroll.
		 */
		jq('#featured-navigation').localScroll({
			target: '#slider', //could be a selector or a jQuery object too.
			axis:'xy', //the default is 'y'
			queue:true,
			duration:2500,
			hash:false,
			onBefore:function( e, anchor, jqtarget ){//'this' is the clicked link
				jqlast.removeClass('scrolling');
				jqlast = jq(this).addClass('scrolling');
				if( this.blur )
					this.blur(); //remove the awful outline
			},
			onAfter:function( anchor ){
				//jqlast.removeClass('scrolling');
				return false;
			}
		});
	}
	
	
});
