//form validation
$(document).ready(function(){   jQuery.validator.addMethod("phoneUS", 
    function(phone_number, element) {
        phone_number = phone_number.replace(/\s+/g, "");
        return this.optional(element) || phone_number.length > 9 && phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
    }, "Please specify a valid phone number");
  
    $("#cForm").validate({
      rules: {
        phone: {
          required: true,
          phoneUS: true
        }
      }
  });
});

$(document).ready(function() {         
  
 //TWITTER
  $("#twitter").getTwitter({               
    userName: "astonishTester",               
    numTweets: 1,               
    loaderText: "Loading tweets...",               
    slideIn: true,               
    showHeading: false,               
    headingText: "Follow Us On Twitter",               
    showProfileLink: false         
  });
  
//SLIDE-DOWN-PANEL
  $("#open").click(function(){
    $("div#panel").slideDown("slow");
  });  
  $("#close").click(function(){
    $("div#panel").slideUp("slow");  
  });    
  $("#toggle a").click(function () {
    $("#toggle a").toggle();
  });
  
$('.imgContainer').cycle({ fx: 'fade', timeout: '10000' });

   
});