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:5000},
			panelbehavior: {speed:1500, wraparound:false, persist:false},
			defaultbuttons: {enable: true, moveby: 1, leftnav: ['/media/blank.gif', -34, 80], rightnav: ['/media/blank.gif', 0, 80]},
			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');
		});
	}
}

function setUpIOSDropmenu() {
	// Suckerfish menu preparation for IE, found on htmldog.com - modified to use jQuery
	$('ul.menu li.item').hover(function() {
		$('ul.menu + li.item').removeClass('sfhover'); 
		$(this).addClass('sfhover');
	}, function() {
		$(this).removeClass('sfhover');
	});
}

function init() {
	$('#searchform-query').click(function() {
		this.select();
	});
	$('#email_form-address').click(function() {
		this.select();
	});
	
	setUpCarousel();
	setUpIOSDropmenu();
}

$(document).ready(init);

