/**** Add application wide javascripts below this point  ******/
$(document).ready(function(){

  // Clear prefilled input boxes on focus
  $('#search-field, #form_news_updates_email').focus(function() {
    $(this).attr('value', '');
  });
  
  // Open new window for external links
  $('A[rel="external"]').click( function() {
      window.open( $(this).attr('href') );
      return false;
    });
  
  $("a[href^='http:']:not([href*='" + window.location.host + "'])").click(function() {               
    window.open( $(this).attr('href') );
    return false;
  });
  
  // Show more contact details
  $(".contact-details").hide();
  $(".show-contact-details").show();
  
  $(".show-contact-details").click(function(){
    $(".show-contact-details").hide();
    $(".contact-details").show('slow');
  });
  
  $(".close").click(function(){
    $(".contact-details").hide('slow');
    $(".show-contact-details").show();
  });
  
  // Read more on News
  $(".hide").hide();
  $(".bordered-box .close").hide();
  $(".more").click(function(){
    var count = $(this).attr('rel');
    $(".show_"+count).toggle();
    $(".hide_"+count).toggle();
    $(".close_"+count).toggle();
    return false;
  });
  $(".close").click(function(){
    var count = $(this).attr('rel');
    $(".show_"+count).toggle();
    $(".hide_"+count).toggle();
    $(".close_"+count).toggle();
    return false;
  });

  // fix map image
  if($.browser.msie && ($.browser.version == "6.0")) {
    $("#member-locations-module img").attr("src","/images/module-member-map.gif");
  }

	//pngFix
  $(document).ready(function(){ 
  	$(document).pngFix(); 
  }); 

	


});

