/* Author:

*/

$('ul#nav li a').mouseenter(function(){
	$('.bg',this).fadeIn(250);
	$('.txt',this).css('color','#F0F2EA');
	Cufon.replace('ul#nav a div.txt', { fontFamily: 'Verlag Bold' });
});

$('ul#nav li a').mouseleave(function(){
	if($(this).parent().hasClass('active')){
		//do nothing
	}else{
		$('.bg',this).fadeOut(250);
		$('.txt',this).css('color','#788E1E');
		Cufon.replace('ul#nav a div.txt', { fontFamily: 'Verlag Bold' });
	}
});

	var slideshow = function () {
		this.proc = function(type) {
			if (this.fonID == undefined) {
				this.fonID = -1;
			}
			var liN = $('div.ss img').length-1;
			if (type == 'next'){
				fID = (this.fonID == liN) ? 0 : this.fonID+1;
			}else{
				fID = (this.fonID == 0) ? liN : this.fonID-1;
			}
			//alert("current ID: " + this.fonID + "  next ID: " + fID + " length: " + liN)
			if(this.fonID !=-1){$('div.ss img:eq('+ this.fonID +')').hide();}
			this.fonID = fID ;
			var txt = $('div.ss img:eq(' + this.fonID + ')').attr('alt');
			$('div.ss img:eq(' + this.fonID + ')').fadeIn();
			$('.ss-toolbar span').html("<span style='color:#788E1E;display:inline'>" + (this.fonID+1) + "/" + (liN+1) + "</span>&nbsp;&nbsp;&nbsp;" + txt);
		}
	} ;
	var procSlideshow ;


Cufon.replace('ul#nav a div.txt, h1,ul#subnav li a,h2,.callout,ul#feature-nav li a', { fontFamily: 'Verlag Bold' });
Cufon.replace('#tagline,.left-col', { fontFamily: 'MrsEaves' });
Cufon.now();




