/* JS by John Smith at fusion-room.com  2010 */
$(function () {
    // Hides images that don't have images...
    var x = $("img[src$='noimage.jpg']");
    x.hide();
});

$(function() {
/* Auto-activates the current nav link based on the pathname */
var path = location.pathname.split("/")[1];
//alert(path);
	if (path) {
		$('#nav li a[href$="' + path + '"]').attr('class', 'active');
	}
});

/* Image Scroller */
$(function() {
	if ($('.slideshow').length > 0) {
		$('.slideshow').cycle({
		fx:      'scrollHorz', 
		easing:  'expoinout', 
		speed:   750,
		timeout: 6000,
		delay:   1000, 
		next:    '#next', 
		prev:    '#prev' 
		});
	}
	/* Prints the agenda */
	$('#print').click(function() {
		window.print();
		return false;
	});

	/* PNG fix for IE6 */
	$('#mainContainer, #curvedLines, #headerTop, #footer, span#prevBtn, span#prevBtn, span#prevBtn:hover, span#nextBtn, span#nextBtn:hover, .hr').supersleight();
	
	/* Colors odd rows in the track orange */
	$('.track li:nth-child(odd)').css({'background' : 'url(images/orangeGrad.jpg) repeat-x scroll left bottom transparent'});	
	
	/* Zebra for profiles */
	$('.full.profile:nth-child(even)').css({'background' : '#fff'});
	$('.full.profile:nth-child(odd)').css({'background'  : '#f2f1eb'});
	
	/* Animation for tabs */
	$('#tabs').tabs({ fx: { opacity: 'toggle' } });
	
	/* Adds .hr div after a profile paragraph */
	$('.full.profile p').after('<div class=\"hr\"></div>');

});


