 $(document).ready(function() {	
  
  $('.amazon, .facebook, .twitter, .flickr, .wikipedia').animate({ opacity: 0.5 }, 0);
  
  $('.amazon, .facebook, .twitter, .flickr, .wikipedia').each(function() {
      $(this).hover(function() {
      $(this).stop().animate({ opacity: 1.0 }, 150);
      },
      function() {
        $(this).stop().animate({ opacity: 0.5 }, 150);
        return false;
      });
  });

  $('#contentWrapper>div').hide();
  
 
  $('#menuleft .slide, #menuright ul a, #footer a').each(function(){
    var $this = $(this);
    var target = $this.attr('href').split('#').slice(1);
    var duration = 250;
    $this.click(function(){
      $('#contentWrapper>div#'+ target +'').animate({
        width:'toggle',
        opacity: 0.8
      }, duration);
      setTimeout(function(){
        $('#contentWrapper>div:not(#'+ target +')').hide();  
      }, duration);
      return false;
    });
    $('#contentWrapper>div#'+ target +' .close').click(function(){
      $(this).parent().animate({
        width:'toggle'
      }, duration);
      return false;
    });  
  });
  
  $('a[rel*=external]').click(function(){
  window.open(this.href);
  return false;
  });

});

