

	$(document).ready( function()
	{
	
		/*
		
			ANCHORS
			
		*/
				
		/* Get rid of ugly dotted lines around links
		   Thanks to Boris Crismancich: http://www.crismancich.de/
		*/
		$("a").bind("focus",function(){if(this.blur)this.blur();}).css("outline", "none");
		
		// Open up external links in a new window
		$('a[rel=external]').attr('target', '_blank');



		/*
		
			CONTENT ROTATOR
			
		*/
				
		$('#hub-Rotator-Content').jshowoff({
			effect: 'none',
			speed: 6000,
			links: true,
			hoverPause: false
		});
		
		

		
		/*
		
			TABS
			
		*/
		
		$("#hub-News").tabs();

		
		
		
		
		/*
		
			GENERAL FORM EFFECTS
			
		*/
		
		// Highlight form inputs
		$(".general input:not([type=submit])").focus( function() {
			$(this).css("background-position", "0 -22px");
		}).blur( function() {
			$(this).css("background-position", "0 0");
		});
		
		// Highlight form textareas
		$(".general textarea").focus( function() {
			$(this).css("background-position", "0 -150px");
		}).blur( function() {
			$(this).css("background-position", "0 0");
		});
		

		/* reCAPTCHA theming */
		$("input.switch_type").click ( function() {
			if ($(this).hasClass("hear"))
			{
				$(this).removeClass("hear");
				$(this).addClass("see");
				Recaptcha.switch_type('audio');
			}
			else if ($(this).hasClass("see"))
			{
				$(this).removeClass("see");
				$(this).addClass("hear");
				Recaptcha.switch_type('image');
			}
		});
		
		// Rollover submit button images 
		$(".ks-submitButton").hover (
			function () {
				$(this).css("background-position", "0 -21px");
			},
			function () {
				$(this).css("background-position", "0 0");
		});



		
		/*
		
			EQUAL COLUMN STYLING
			arguments: first col, second col, first col modifier, second col modifier
			
		*/
		
		$equalHeightTwoCols = function ()
		{
			var firstColHeight = arguments[0].height();
			var secondColHeight = arguments[1].height();
			
			if (firstColHeight > secondColHeight)
				arguments[1].css("height", firstColHeight - arguments[3]);
			else
				arguments[0].css("height", secondColHeight - arguments[2]);
		};
		
		$equalHeightTwoCols($('.hub-Content-Box-Home'),$('#hub-News .ui-tabs-panel'),0,14);



	});

