$(document).ready(function() {

/* global menu left column set using jquery.path plugin */
$('a:path').css({ color:'#C15A31'});


/* 
STATES NAVIGATION
hide all sub ul's - open initial section 
where is variable passed on each page 
*/ 
// gonna have to do a check here if you're on that page
if( $('div.statesNav').length >0) {
$('ul li ul').hide();
$('#' + state).show();


/* opening page doesn't set variable */
if ( state == '') {
} else {
$('a[@href^=#'+state+']').addClass('expand');

$('#' + city + ' a').addClass('on');
};
}

/* show nested ul you've clicked on */
$('ul.subnav li a[@href^=#]').click(function() {

/* hide all */
$('ul.subnav li ul').hide();

var thisTarget = $(this).attr('href');
$(thisTarget).show('slow');

/* set arrow down */
$('ul.subnav li a').removeClass('expand');
$(this).addClass('expand');

return false;
});



/* FAQ page */

if ($('div[@id^="faq"]').length >0) {
$('div[@id^="faq"]').hide();


$('a[@href^= "#faq"]').click(function() {
$(this).toggleClass('on');

var thisTargetFaq = $(this).attr('href');
$(thisTargetFaq).toggle('fast');

return false;
});
}


/* NEWS page */

if ($('div[@id^="news"]').length >0) {
$('div[@id^="news"]').hide();


$('a[@href^= "#news"]').click(function() {
$(this).toggleClass('on');

var thisTargetNews = $(this).attr('href');
$(thisTargetNews).toggle('fast');
});


/* from home page links */
var hash = window.location.hash;

if (hash.length > 0 ) {
$(hash).toggle('fast');
$('a[@href*='+hash+']').toggleClass('on');


} else {

$($('div.news').find('a:first').attr('href')).toggle('fast');
$('div.news').find('a:first').toggleClass('on');

//$('div.news').find('a:first').toggleClass('on');
//$('div.news').find('div:first').toggle('fast');
}


}
/* END news page */


/* info box hover */

$('a.learnMore').hover(function() {

$(this).parent().css({ backgroundColor:'#ccd5db'});
$(this).parent().children('h3').css({ color:'#000'});

},
function() {
$(this).parent().css({ backgroundColor:'#e9edef'});
$(this).parent().children('h3').css({ color:'#4b4b4b'});

});

/* END info box */



});
/* END doc ready */