function setUpCarousel()
{
	if ($('#virtual_gallery').get(0)) {
		stepcarousel.setup({
			galleryid: 'virtual_gallery', //id of carousel DIV
			beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
			panelclass: 'panel', //class of panel DIVs each holding content
			autostep: {enable:true, moveby:1, pause:6500},
			panelbehavior: {speed:1500, wraparound:false, persist:false},
			defaultbuttons: {enable: true, moveby: 1, leftnav: ['/media/blank.gif', -15, 104], rightnav: ['/media/blank.gif', 15, 104]},
			statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
			contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
		});
	}
	
	if ($.browser.msie && $.browser.version < '7.0') {
		$('img.left-nav-button').hover(	function() {
				$(this).addClass('left-nav-button-hover');
			},	function() {
				$(this).removeClass('left-nav-button-hover');
			});
		$('img.right-nav-button').hover(	function() {
				$(this).addClass('right-nav-button-hover');
			},	function() {
				$(this).removeClass('right-nav-button-hover');
			});
	}
}

/*
 * For the Our Team page (#514)
 */
function setUpTeam()
{
	//This next line isn't necessary since we've created some CSS rules
	//$('.bios').not('#intro').hide();	//For development
	
	//Strategy
	$('.jharris').click(function() {
		$('.bios').not('#jharris').hide();
		$('#jharris').fadeIn(800);
		return false;
	});
	$('.jfranz').click(function() {
		$('.bios').not('#jfranz').hide();
		$('#jfranz').fadeIn(800);
		return false;
	});
	$('.kharris').click(function() {
		$('.bios').not('#kharris').hide();
		$('#kharris').fadeIn(800);
		return false;
	});
	
	//Design
	$('.awinn').click(function() {
		$('.bios').not('#awinn').hide();
		$('#awinn').fadeIn(800);
		return false;
	});
	$('.dbrown').click(function() {
		$('.bios').not('#dbrown').hide();
		$('#dbrown').fadeIn(800);
		return false;
	});
	$('.bgottsabend').click(function() {
		$('.bios').not('#bgottsabend').hide();
		$('#bgottsabend').fadeIn(800);
		return false;
	});
	
	//Development
	$('.jsmith').click(function() {
		$('.bios').not('#jsmith').hide();
		$('#jsmith').fadeIn(800);
		return false;
	});
	$('.swesonga').click(function() {
		$('.bios').not('#swesonga').hide();
		$('#swesonga').fadeIn(800);
		return false;
	});
	
	//Systems
	$('.jwinn').click(function() {
		$('.bios').not('#jwinn').hide();
		$('#jwinn').fadeIn(800);
		return false;
	});
	$('.sjames').click(function() {
		$('.bios').not('#sjames').hide();
		$('#sjames').fadeIn(800);
		return false;
	});
	$('.boverton').click(function() {
		$('.bios').not('#boverton').hide();
		$('#boverton').fadeIn(800);
		return false;
	});
}

function setUpFisheye()
{
	$('#fisheye').Fisheye({
		maxWidth: 16,
		items: 'a',
		itemsText: 'span',
		container: '.fisheyeContainter',
		itemWidth: 84,
		proximity: 90,
		halign : 'center'
	
		});
}

function init()
{
	$('#searchform-query').click(function() {
		this.select();
	});
	$('#email_form-address').click(function() {
		this.select();
	});
	
	setUpCarousel();
	setUpTeam();
	setUpFisheye();
}

$(document).ready(init);
