$(document).ready(function() {

	//$('.fadebike').fadeIn(1500);
	 $(".fadebike").show( "explode", {pieces: 20 }, 1000 );
	
	$("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
	$("#topnav li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
		$(this).find("span").show().html(linkText); //Add the text in the span tag
	}); 

	//$(".gsc-search-button").attr('value','');

	$(".gsc-search-button").removeAttr("value")

	if($(".gsc-search-button").val()=="Search") {
				$(".gsc-search-button").attr("value","");
			}
	
	$("#topnav li").hover(function() {	//On hover...
		$(this).find('div').fadeIn('slow');
		$(this).find("span").stop().animate({ 
			marginTop: "-40" //Find the span tag and move it up 40 pixels
		}, 250);
	} , function() { //On hover out...
		$(this).find('div').fadeOut('slow');
		$(this).find("span").stop().animate({
			marginTop: "0" //Move the span back to its original state (0px)
		}, 250);
	});

	$('.wid130 a').click(function() {
		$('.wid130 a').removeClass("active");
		$(this).addClass("active");
	});

	$('#history .hisbtmlnk .hisbtmlnksub a').click(function() {
		$('#history .hisbtmlnk .hisbtmlnksub a').removeClass("active");
		$(this).addClass("active");
	});

	$('.hissublnk a').click(function() {
		$('.hissublnk a').removeClass("active");
		$(this).addClass("active");
	});

	$('.wid130 .scrolltext a').click(function () {
		$("#stuntguide").empty().html('<div style="text-align:center;padding-top:130px;"><img src="images/loader.gif" class="vertmid" /></div>');
	});

	$('.hissublnk a').click(function () {
		$("#hisfirsty").empty().html('<div style="text-align:center;padding-top:100px;"><img src="images/loader.gif" class="vertmid" /></div>');
	});	

	$(".trigger").click(function(){
		$(".slidepanel").toggle("fast");
		$(this).toggleClass("active");
		return false;
	});
	
});


function loadContent(id) {$("#stuntguide").load(id);}
function loadContent1(id) {$("#hisfirsty").load(id);}
