$(document).ready(function() {
   
   $("div#recent_work div.screenshots_and_descriptions:even").addClass("append-1");
    $("div#recent_work div.screenshots_and_descriptions:odd").addClass("last");
   
   $("div#list div.screenshots_and_descriptions:odd").addClass("last addhr");
   $("div#list div.screenshots_and_descriptions:last").removeClass("addhr"); 
   
   $("div#list div.addhr").after("<hr />");
   
    //$("div.flickr_badge_image a img").addClass("img_opacify");
   
//portfolio rollovers
   
   $("div.opacify div.img_opacify").fadeTo(1, 0.8);
  
  $("div.opacify").hover(
    function () {
      $(this).children("div.img_opacify").fadeTo("fast", 1);
    },
    function () {
      $(this).children("div.img_opacify").fadeTo("normal", 0.3);
    }
  );
   $("div.opacify").click(
    function () {
      $(this).children("div.img_opacify").fadeTo("fast", 1);
    },
    function () {
      $(this).children("div.img_opacify").fadeTo("normal", 0.5);
    }
  );
//footer 
 $("div#footer").fadeTo(1, 0.4);
 
 $("div#footer").hover( 
 	function (){ 
      $(this).fadeTo("fast", 1);
   },
    
    function () {
      $(this).fadeTo("normal", 0.5);
    });

//---------Portfolio Filtering

$('ul#filter a').click(function() {
		$('ul#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filterVal == 'work') {
			$('div#list div.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			$('div#list div.screenshots_and_descriptions').each(function() {
				if(!$(this).hasClass(filterVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
	});

//--- Twitter Chat show/hide

	$("div.tweet").hide();

	$("img#tweetbird").click(function() {
		$("div.tweet").show('slow');
		
	
	});
		$("div.tweet").click(function() {
		$(this).hide('fast');
	
	});
	
//-- contact submit button

$("input#send_button").hover(function() {
	$("input#send_button").css({'background-position' : '0 32'}) },
	
	function() { $("input#send_button").css({'background-position' : '0 0' })}


);

});



