function initFilterMenu() {
	$('#filterMenu ul').hide();
	$('#filterMenu li a').click(function(e) {
		e.preventDefault();  
        $(this).next().slideToggle('normal');
		return false
	});
  }
 
$(document).ready(function() {
	initFilterMenu();
	images = new Array(    
	"alpine","nordic","running","biking","ultimate"
	);// set up an array of the images

	rand = Math.floor(Math.random()*images.length); // chose a random number, between 0 and the length of the array -1
	currentImage = images[rand]; // set img to the random image's src
	
	$('.landingImage_' + currentImage + '').stop().fadeTo(0, 1.0).addClass("activeLandingImage");
});

$(function(){
	$(".viewArtwork").click(function(e){
		e.preventDefault();  
		var filter = $(this).attr('id'); 
		$("#artworkDisplay").attr('src', 'http://www.podiumwear.com/images/' + filter + '.jpg');
		return false;
	});		
	
	$(".click").click(function(e){
		e.preventDefault();  
		$("#slide").animate({marginLeft:'-260px'},'slow');
		$('#artworkList ul li').show();  
		return false;
	});	
	
	$(".clickBack").click(function(e){
		e.preventDefault();  
		$("#slide").animate({marginLeft:'0px'},'slow');
		return false;
	});	
	 
	$('.options li a').click(function(e){  
        e.preventDefault();  
        var filter = $(this).attr('id');  
        $('#artworkList ul li').show();  
        $('#artworkList ul li:not(.' + filter + ')').hide();  
		$('.alwaysDisplay').show(); 
  		return false;
    });  
	
	$('#sports_nav ul li a').hover(function(){ 
		var filter = $(this).attr('id'); 
		$('.activeLandingImage').stop().fadeTo("slow", 0).removeClass("activeLandingImage");
		$('.landingImage_' + filter + '').stop().fadeTo("slow", 1.0).addClass("activeLandingImage"); // This should set the opacity to 100% on hover
	},function(){
		// $('.activeLandingImage').stop().fadeTo("slow", 0).removeClass("activeLandingImage");
	});

});