var jump=function(e)
{
    //prevent the "normal" behaviour which would be a "hard" jump
    e.preventDefault();
    //Get the target
    var target = $(this).attr("href");
    //perform animated scrolling
    $('html,body').animate({
        //get top-position of target-element and set it as scroll target
        scrollTop: $(target).offset().top
    //scrolldelay: 2 seconds
    },1000);
}
$(document).ready(function(){
    $('#style').sexyCombo({
        skin: 'custom'
    });
    $('a[href$=#form]').bind("click", jump);
    $("#submit").click(function(){
        $('form').validate({
            rules: {
                name: {
                    required: true,
                    minlength: 2
                },
                email: {
                    required: true,
                    email: true
                },
                phone: {
                    required: true,
                    minlength: 11
                }
            },
            messages: {
                name: "Please enter your name",
                email: "Please enter a valid email address",
                phone: "Please enter a valid phone number"
            }
        });
    });
});
