/**** Add application wide javascripts below this point  ******/
$(document).ready(function() {
  
  // Open new window for external links
  $('A[rel="external"]').click( function() {
    window.open( $(this).attr('href') );
    return false;
  });
  
  //Fix PNGs for IE6
  $(document).pngFix();
  
  //Sign up form text field value
  var default_text = 'Your Email Address';
	$('#newsletter_email_address').focus(function(){
		if($(this).val() == default_text) $(this).val('');
	});
	$('#newsletter_email_address').blur(function(){
		if($(this).val() == '' || $(this).val() == ' ') $(this).val(default_text);
	});
	
	//Casestudy intro rollovers
  $('.casestudy-intro').hover(
    function(){
      $(this).addClass('onhover');
    },
    function(){
      $(this).removeClass('onhover');
    }
  );
  
  $('a.modal-popup').smart_modal();
  
  // Twitter
  twttr.anywhere(function(twitter) {
		twitter.hovercards('#tweets');
		twitter('#follow-waa_agency').followButton("waa_agency");
	});
});