
// utility functions

// this function is called after a browser check that filters out IE6
function writeStuff() {
	var mainjs = "\r\r<script type=\"text/javascript\" src=\"js/sifr.js\"><\/script>";
	var configjs = "\r\r<script type=\"text/javascript\" src=\"js/sifr-config.js\"><\/script>";
	
	document.writeln(mainjs);
	document.writeln(configjs);
}
	
	
$("document").ready( function () {
	
	// input hints
	$('#searchField').hint();
	
	// carousel function call and options
	$("#indexSlideDisplay").jCarouselLite({
		btnNext: "#indexSlideControls #next",
		btnPrev: "#indexSlideControls #prev",
		btnGo: ["#indexSlideControls .0", "#indexSlideControls .1", "#indexSlideControls .2", "#indexSlideControls .3"],
		visible: 1
	});
	
	// toggles view and tab styles for event tab
	$("#eventLink").click( function () {
		$("#feedControl a").toggleClass("active");
		$(this).addClass("active");
		$("#new").fadeOut('fast',
			function () {
				$("#events").fadeIn('fast');
			} // close callback
		); // close fadeOut
		return false;
	}); // close event functions
	
	// toggles view and tab styles for news tab
	$("#newLink").click( function () {
		$("#feedControl a").toggleClass("active");
		$(this).addClass("active");
		$("#events").fadeOut('slow',
			function () {
				$("#new").fadeIn('slow');
			} // close callback
		); // close fadeOut
		return false;
	}); // close event functions
	
});

