$(document).ready(function() {
    /* 
    * attach a function to open all links with a class of "external" in a new window 
    * this avoids the use of target="_blank" and allows us to validate as XHTML strict
    */
    $("a[rel^='external']").click( function() {
        window.open(this.href);
        return false;
    });
    
    $('#slideshow').cycle({ 
        speed:  3500,
        timeout:  1000
    });
    
    /*
    $("a[rel^='prettyPhoto']").prettyPhoto();
    
    $('#slideshow').cycle({ 
        speed:  5000,
        timeout:  3000
    });
    
    $("#form").validate({
        invalidHandler: function(e, validator) {
            var errors = validator.numberOfInvalids();
            if (errors) {
                $("#errorMessage span").html('The highlighted fields are required.');
                $("#errorMessage").show();
            } else {
                $("#errorMessage").hide();
            }
        },
        rules: {
            name: "required",
            email: {
                required: true,
                email: true
            },
            profileDetails: "required"
        },
        messages: {
            email: {
                email: "name@domain.com"
            }
        }
    });

    */
       
});