$(document).ready(function(){
  $('#register_now a').click(function() { registerfoot('register/registration.html'); return false; });
  $('.csrf').click(function() { registerfootowner('residences/customerequestform.html'); return false; });

  // main navigation hover animation
  $("a.animation:not(.active)").hover(
  	function () {
  	  if ($(this).is('.over')) { return; }
  	  $(this)
  	    .addClass('over')
  	    .animate({marginTop: 0, borderBottomWidth: 14}, 350);
  	},
  	function () {
      var self = $(this);
      self.animate({marginTop: 11, borderBottomWidth: 3}, 300, function() { self.removeClass('over'); });
  	}
  );

  $.each({ dirn: 'north', dire: 'east', dirw: 'west', dirs: 'south' }, function(k, v) {
    $('#'+k).click(function() {
      $('#ajaxdir').load('gallery/views/'+v+'.html');
		$("#directions > li > a").removeClass('dir_active');
		$(this).addClass('dir_active');
      return false;
    });
  });

  $('#views').scroller({area: 210, velocity: 0.085});
});
