jQuery.jQueryRandom = 0;
jQuery.extend(jQuery.expr[":"],
{
    random: function(a, i, m, r) {
        if (i == 0) {
            jQuery.jQueryRandom = Math.floor(Math.random() * r.length);
        };
        return i == jQuery.jQueryRandom;
    }
});

$(function(){
		   
	$("#featureContainer li").css("display", "block").css("opacity", 0).css("left", -200);
	
	$("a.unhide").click(function(){
		$(".hideMe").filter(this.hash).slideDown();
		return false;
								});

	$("#featureNav a").click(function(){
		
		if(!$(this).hasClass("selected")){
			$("#featureNav a.selected").removeClass("selected");
			$(this).addClass("selected");
			$("#featureContainer li.selected").animate({"left": "+=200px", "opacity": 0}, 400).animate({"left": "-200px"}, 0).removeClass("selected");
			$("#featureContainer li").filter(this.hash).animate({"left":"+=200px", "opacity": 1}, 400).addClass("selected");
		}
		
		return false;
	});
	
	$("#featureNav a").eq(Math.floor(Math.random()*4)).click();

});
