$(document).ready(function(){
		$('#nav_main li').hover(
			function() {  
			    $('div', this).addClass("active"); 
    },
			function() { 
			    $('div', this).removeClass("active"); 
    });     

    // Email spam protection
    $('.emailCover').remove();
    $('.emailAt').replaceWith('@');
    
    // Date picker
    $('span.jQuerySelectDate').datePicker({createButton:false, verticalOffset:-40, horizontalOffset:20, startDate:'01/01/1996'})
      .bind('click', function() {
          $(this).dpDisplay();
          this.blur();
          return false;
        }
    )
      .bind('dateSelected', function(e, selectedDate, $td) {
          $(this).siblings('input.day').val(selectedDate.getDate());
          $(this).siblings('input.month').val(selectedDate.getMonth() + 1);
          $(this).siblings('input.year').val(selectedDate.getFullYear());
          return false;
          //alert(selectedDate);
        }
    );
    
    $('input.datebox').bind('click', function() {
      $(this).focus();
      $(this).siblings('span.jQuerySelectDate').dpDisplay();
    });

	});


