
    function formatText(index, panel) {
	  return index + "";
    }

    $(function () {
    
        $('#cases').anythingSlider({
            easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
            autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
            delay: 5000,                    // How long between slide transitions in AutoPlay mode
            startStopped: false,            // If autoPlay is on, this can force it to start stopped
            animationTime: 600,             // How long the slide transition takes
            hashTags: true,                 // Should links change the hashtag in the URL?
            buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
    		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
    		startText: "Go",             // Start text
	        stopText: "Stop",               // Stop text
	        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
        });
        
		var shortForms = new Array("#searchform");

		// When the document's loaded, initialize short forms
		$("document").ready(function() { handleShortFormEvent(shortForms);});

		// Handle initialization of all short forms 
		// @param array shortForms Array of short form IDs
		function handleShortFormEvent(shortForms) {
		  for (var i in shortForms) { shortFormInit(shortForms[i]); } }

		// Initialize a short form. Short forms may contain only one text input.
		// @param string formID The form's ID, including #
		
		function shortFormInit(formID) {
		  // Get the input ID and it's label text
		  var labelValue = $(formID + " input[type='text']:first").siblings("label").html();
		  var inputID = "#" + $(formID + " input[type='text']:first").attr("id");

		  // Set the input value equal to label text
		  $(inputID).val(labelValue);

		  // Attach event listeners to the input
		  $(inputID).bind("focus blur", function(e){
		    var eLabelVal = $(this).siblings("label").html();
		    var eInputVal = $(this).val();

		    // Empty input value if it equals it's label
		    if (eLabelVal == eInputVal) {
		        $(this).val("");
		    // Reset the input value if it's empty
		    } else if ($(this).val() == "") {
		      $(this).val(eLabelVal);
		    }
		  });
		}       
		$('#searchform label').hide();
		$("p.top a").click(function () { 
		    $('html, body').animate({scrollTop:0}, 200); 
			return false
	    });
		
    });
