$(document).ready(function () {
    $('div').filter(function () {
        return this.id.match(/anim/);
    }).slideUp(0);
    $('div').filter(function () {
        return this.id.match(/promo+_top/);
    }).fadeTo(0, 0.8);
    $('div').filter(function () {
        return this.id.match(/promo+_bottom/);
    }).fadeTo(0, 0.8);
    $('div').filter(function () {
        return this.id.match(/pane/);
    }).hover(function () {
        $(this).fadeTo("fast", 1.0);
        $("#" + $(this).attr("id") + " div:first").slideDown("fast");
    }, function () {
        $('div').filter(function () {
            return this.id.match(/promo+_top/);
        }).fadeTo(0, 0.8);
        $('div').filter(function () {
            return this.id.match(/promo+_bottom/);
        }).fadeTo(0, 0.8);
        $('div').filter(function () {
            return this.id.match(/anim/);
        }).slideUp("fast");
    });
    var $search = $('#s');	//Cache the element for faster DOM searching since we are using it more than once
	original_val = $search.val(); 	//Get the original value to test against. We use .val() to grab value="Search"
	$search.focus(function(){ 	//When the user tabs/clicks the search box.
		if($(this).val()===original_val){ 	//If the value is still the default
			$(this).val('');//If it is, set it to blank
		}
	})
	.blur(function(){//When the user tabs/clicks out of the input
		if($(this).val()===''){//If the value is blank (such as the user clicking in it and clicking out)...
			$(this).val(original_val); //... set back to the original value
		}
	});
	
	var $search2 = $('#n');	//Cache the element for faster DOM searching since we are using it more than once
	original_val2 = $search2.val(); 	//Get the original value to test against. We use .val() to grab value="Search"
	$search2.focus(function(){ 	//When the user tabs/clicks the search box.
		if($(this).val()===original_val2){ 	//If the value is still the default
			$(this).val('');//If it is, set it to blank
		}
	})
	.blur(function(){//When the user tabs/clicks out of the input
		if($(this).val()===''){//If the value is blank (such as the user clicking in it and clicking out)...
			$(this).val(original_val2); //... set back to the original value
		}
	});
	
   
    $('#nextBtn a').click(function (e) {
        e.preventDefault();
    });
});
