$(document).ready(function() {
    
   $('ul input, ul textarea').focus(function() {
       $(this).siblings('label').fadeOut(200);
   });
   $('ul input, ul textarea').blur(function() {
       if(/^\s*$/.test($(this).attr('value'))) {
           $(this).siblings('label').fadeIn(300);
       }
   });
   $('ul label').click(function() {
       $(this).fadeOut(200);
       $(this).siblings('input, textarea').focus();
   });
   // check inputs on page load for default content
   $('ul input, ul textarea').each(function() {
       if($(this).attr('value') != '') {
           $(this).siblings('label').hide();
       }
   });
   
   
   // auto append file extensions as a class on links
   // Track Downloads
   $('a[href]').each(function() {
       if((C = $(this).attr('href').match(/[.](docx|ppt|doc|xls|pdf|rtf|txt)$/))) { 
           $(this).addClass('file').addClass(C[1]); 
           $(this).bind('click', function(event) {
               // Track as category: 'Downloads', label: link of file, optional_label: text of link
               pageTracker._trackEvent('Downloads', $(this).attr('href'), $(this).text());
           });
       }
   });
     
});