jQuery(document).ready(function() {
	


		 
	if( jQuery("#goodies_description").size() > 0 ) {
		
		jQuery("#submenu li").each( function() {
			jQuery(this).unbind('click');
		});
			
		jQuery("#everything").bind("click", function() {
			jQuery(".icons, .wallpapers").show(800, function() {
				jQuery(this).find("p, h2, .download_buttons").not(".weirdWPfix").fadeIn(500);
			});
			jQuery(".clicked").removeClass("clicked");
			setClicked(jQuery("#everything"));						
			return false;
		});
		
		jQuery("#icons").bind("click", function() {
			// hide the wallpaper divs
			jQuery(".wallpapers").each( function() {
				jQuery(this).find("p, h2, .download_buttons").not(".weirdWPfix").fadeOut(500, function() {
					jQuery(this).parent().hide(500);
				});
			});
			
			window.setTimeout(function() {
				// show the icon divs.
				jQuery(".icons").show(800, function() {
					jQuery(this).find("p, h2, .download_buttons").not(".weirdWPfix").fadeIn(500);
				});
			}, 1100);
						
			jQuery(".clicked").removeClass("clicked");
			setClicked(jQuery("#icons"));
			return false;
		});
		
		jQuery("#wallpapers").bind("click", function() {
			// hide the icons divs
			jQuery(".icons").each( function() {
				jQuery(this).find("p, h2, .download_buttons").not(".weirdWPfix").fadeOut(500, function() {
					jQuery(this).parent().hide(500);
				});
			});
			
			// show the wallpapers divs.

			window.setTimeout(function() {
				// show the icon divs.
				jQuery(".wallpapers").show(800, function() {
					jQuery(this).find("p, h2, .download_buttons").not(".weirdWPfix").fadeIn(500); 
				});
			}, 1100);
			
			
			jQuery(".clicked").removeClass("clicked");			
			setClicked(jQuery("#wallpapers"));
			return false;
		});
	
	
		
	jQuery(".download_buttons a").hover(
	function() {
	    var text = jQuery(this).find("img").attr("alt");
	    var parent = jQuery(this).parent().parent();
/*	    parent.find("div").css({"width":"120px"});*/
	    parent.find("span").text(text);
	},
	function() {
		var text = "Download";
		var parent = jQuery(this).parent().parent();
/*	    parent.find("div").css({"width":"79px"});*/
	    parent.find("span").text(text);
	}
	);
	
	}

});