$(document).ready(function(){ 
	//Sitespecific javascript here
	//Searchbox clear and fill
	function input_values()
	{	
		var inputBox = $('#newsletter input, #search input');
	
		
		inputBox.focus(function(){
			if ($(this).val() != "") {
				
				var theValue = $(this).val();
				$(this).attr('temp', theValue)
				$(this).val('');
			};
		
		});
		inputBox.blur(function(){
			if ($(this).val() == "") {
				var theValue = $(this).attr('temp');
				$(this).val(theValue);
			};
			
		});
	}
	input_values();
	
	//Even and odd rows in tables
	/* if Environment is NOT Editor */
		$("table tr").mouseover(function() {
			$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");
		});
		$("table tr:nth-child(even), table tr td:nth-child(even)").addClass("even");
		$("table tr:nth-child(odd), table tr td:nth-child(odd)").addClass("odd");
		$("table tr:first-child").removeClass('even').addClass("th");
		$('table tr td:first').addClass('first');
		$('table tr td:last').addClass('last');

	
	/*Accordion menu*/
	//Hide submenus
	$('#sub_nav li ul').hide();
	//If menu option is current, show sub menu
	if ($('#sub_nav li:first-child').hasClass('current'))
		{
			$('#sub_nav ul:first-child > li > ul').slideToggle('slow');
		};
	//When clicking the top level, show submenu, but not sub sub menus
	$('#sub_nav ul:first-child > li > a').click(function() {
		
			$(this).parent().toggleClass('current');
		
		$(this).next().slideToggle('slow');
		return false;
	});

        //$('#nav ul li a').prepend('&bull;');

        //Set height on subnav
        $col_l = $(".col_middle").height();
        $col_r = $(".col_right_middle").height();
        if($col_l > $col_r)
        {
            $(".col_right_middle").css({height:$col_l});
        }
        else
        {
            $(".col_middle").css({height:$col_r});
        }

/*
	//Lightbox effect to gallery links
	//More information about this plug in http://www.gmarwaha.com/jquery/jcarousellite/#doc
	$('#gallery ul a').lightBox(
		{
		imageLoading: '/System/Templates/Sites/206/images/lightbox-ico-loading.gif',
		imageBtnClose:'/System/Templates/Sites/206/images/lightbox-btn-close.gif',
		imageBtnPrev: '/System/Templates/Sites/206/images/lightbox-btn-prev.gif',
		imageBtnNext: '/System/Templates/Sites/206/images/lightbox-btn-next.gif'

	}
	);
	
	//Initialize Carousell
	function myGallery() {
    $("#gallery").jCarouselLite({
        btnNext: "#gallery .next", //name of next button
        btnPrev: "#gallery .prev", //name of previous button
        visible: 9.5, 		//How many thumbs to be shown
        circular: "true", 	//Setting this to false will turn off the eternal scroll feature
        scroll: 5			//how many thumbs to scroll by clicking the next and previous buttons
    });
	}
	myGallery();
*/


});
