// JAVASCRIPT FOR ROBERT WANGARD

 $(document).ready(function(){

// Slider Animations 

// $('#carousel').infiniteCarousel({ showControls: false, easeLeft: 'easeInOutExpo', easeRight:'easeOutQuart', thumbnailWidth : '30px', thumbnailHeight: '30px' });

// SETTING
if ( $('body#index').length) { $("ul#nav-bar li:eq(0)").find('a').addClass("current"); }
if ( $('body#bookshelf').length) { $("ul#nav-bar li:eq(1)").find('a:eq(0)').addClass("current"); }
if ( $('body#target').length) { $("ul#nav-bar li:eq(2)").find('a').addClass("current"); }
if ( $('body#about').length) { $("ul#nav-bar li:eq(8)").find('a').addClass("current"); }
if ( $('body#pete').length) { $("ul#nav-bar li:eq(9)").find('a:eq(0)').addClass("current"); }
if ( $('body#events').length) { $("ul#nav-bar li:eq(12)").find('a').addClass("current"); }
if ( $('body#mailing').length) { $("ul#nav-bar li:eq(13)").find('a').addClass("current"); }
if ( $('body#faq').length) { $("ul#nav-bar li:eq(14)").find('a').addClass("current"); }

// Cufon Replacing
// Cufon.replace('div#col-2 h1', { fontFamily: 'Adobe_Caslon_Pro_700' });
// Cufon.replace('p', { fontFamily: 'ACaslonPro-Regular' });

Cufon.replace('div#col-2 h1', { textTransform: 'uppercase' });
Cufon.replace('div#col-2 h2');
Cufon.replace('div#col-2 p');
Cufon.replace('div#col-2 p.home');
Cufon.replace('ul#nav-bar li a', { fontFamily: 'Grotesque MT Std', hover: true });

Cufon.replace('div#col-3a h1', { textTransform: 'uppercase' });
Cufon.replace('div#col-3a h2');
Cufon.replace('div#col-3a p');
Cufon.replace('div#col-3a p.home');
// Cufon.replace('div#col-1 ul li a', { fontFamily: 'UntitledTTF' });

//

// MAIN NAVIGATION

if ( $('body#bookshelf').length) {
	$('ul.bookshelf-nav').slideDown("slow");
}

if ( $('body#pete').length) {
	$('ul.pete-nav').slideDown("slow");
}


// Now Out Animation
if ( $('a.now_out').length) {
	$('a.now_out').hover(function () {
	    $('a.now_out').stop().animate({top: "370px"}, 400, 'easeInOutBack'); 
	  }, function () {
	   $(this).stop().animate({top: "390px"}, 800, 'easeOutBounce');
	});
}


// TABLE bold
if ( $('table#events-table').length) {
	$("table#events-table tr td:first-child").css("font-weight", "bold");
}



 });

