$(document).ready(function () {	

		var overButton;
		var activeFilterButton;
		$(".button").bind("mouseover",function() {
				if ($(this).hasClass('button')){
					overButton = $(this).attr("src").split(".");
					overButton = overButton[0]+ "_on." +overButton[1];
					$(this).attr("src",overButton);
					$(this).css({"cursor":"pointer"});
				}
				else {
					$(this).css({"cursor":"default"});
				}
		})
		$(".button").bind("mouseout",function() {
				if ($(this).hasClass('button')){
					overButton = $(this).attr("src").split("_on.");
					overButton = overButton[0]+ "." +overButton[1];
					$(this).attr("src",overButton);
				}
		});

		// ######### PROJECT Page (overview):
		$("div#demo div.wrap div").hover(function() {
				$(this).css({"cursor":"pointer",
				"background-color":"#999",
				"color":"#FFF"});
				
			}, function (){
				$(this).css({"background-color":"#FFF",
				"color":"#666"});
			}
		)
		$("div#demo div.wrap div").click(function() {
				var selectedThumb = $(this).find("img").attr("src").split("images/projects/")[1].split("_thumb.jpg");
				selectedThumb = "project_"+selectedThumb[0]+".html"				
				/*
				$(this).animate({
					width: '139px', 
					height: '100px',
					padding: '0px',
				}, 10);
				$(this).parent().css({'z-index' : '0','border': 0}); 
				*/
				window.location=selectedThumb;
		});		
		
		
		
});



