/*********************************************************************************************************************************/
/* DOCUMENT READY CALLS **********************************************************************************************************/
/*********************************************************************************************************************************/

$(document).ready(function(){
	
	/* EXTERNAL LINKS start ***********************************************************/
	$('a[rel="external"]').click(function(){
		this.target = "_blank";
	});
	/* EXTERNAL LINKS end *************************************************************/
	
	$('html').addClass('.js');

	/*SEARCH start ********************************************************************/
	$('#search input.text').focus(function(){ if(this.value=='Search') { $(this).val('');} });
	$('#search input.text').blur(function(){ if(this.value =='') { $(this).val('Search');} });
	/*SEARCH end **********************************************************************/
	
	/* NAVIGATION start ***************************************************************/
	//hover show next level
	$('#nav ul > li').hover(function() { $('ul:first', this).show(); $('a:first',this).addClass('hover'); },function() {$('ul:first', this).hide(); $('a:first',this).removeClass('hover'); });
	/* NAVIGATION end ****************************************************************/
	
	if($('#home').length>0){
		$('#what-is .c').jScrollPane({showArrows:true,scrollbarWidth : 16});
	}
	
	//REMOVE BLANK LI's
	$('#details .col-right li').each(function(){if($(this).html() == ''){$(this).remove();}	});
	//REMOVE BLANK LI's
	if($('#ssbc-events').length >0){
		$('#ssbc-events .cms').jScrollPane({showArrows:true,scrollbarWidth:14 });
	}
}); //close document.ready

/*********************************************************************************************************************************/
/* DOCUMENT READY FUNCTIONS ******************************************************************************************************/
/*********************************************************************************************************************************/
