/**
 * Clears default form values when clicked.
*/
jQuery(document).ready(function() {
  jQuery.fn.cleardefault = function() {
  return this.focus(function() {
    if( this.value == this.defaultValue ) {
      this.value = "";
    }
  }).blur(function() {
    if( !this.value.length ) {
      this.value = this.defaultValue;
    }
  });
};
$(".clearit input, .clearit textarea, .clearit").cleardefault();

});


/**
 * Disables parent links in about page
*/
jQuery(document).ready(function() {
  $("#about-section-nav li:has(ul.children)").hover(function () {
    $(this).children("a").click(function () {
      return false;
    });
  });
});


/**
 * Slideshow method for the locations page
*/
jQuery(document).ready(function() {
  $(function() {
    $('.slideshow').before('<div id="slide-nav">')
    $('.slideshow').cycle({
      fx: 'fade',
      timeout:5000,
      pager: "#slide-nav"
    });
  });
});

/**
 * Client login modal
*/
jQuery(document).ready(function() {
  $('#clientLogin').hide();
});

/**
 * Video lightbox
*/
jQuery(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto();
});
jQuery(document).ready(function(){
 $("#project_list li").quickpaginate({ perpage: 25, showcounter: true, pager : $("#project_list_counter") });
});

