$(window).load(function() {

    $('#slider').nivoSlider({
        effect: 'random',       // Specify sets like: 'fold,fade,sliceDown'
        slices: 15,             // For slice animations
        boxCols: 8,             // For box animations
        boxRows: 4,             // For box animations
        animSpeed: 1000,         // Slide transition speed
        pauseTime: 5000,        // How long each slide will show
        startSlide: 0,          // Set starting Slide (0 index)
        directionNav: true,     // Next & Prev navigation
        directionNavHide: true, // Only show on hover
        controlNav: true,       // 1,2,3... navigation
        keyboardNav: true,      // Use left & right arrows
        pauseOnHover: true      // Stop animation while hovering
    });

    $('#myTable').tablesorter( {sortList: [[3,0]]} );

    $('#fotorama').fotorama({
        width: 700,
        height: 500,
        thumbSize: 64,
        backgroundColor: '#fff',
        arrowsColor: 'yellow'
    });

    $('#fotorama2').fotorama({
        width: 700,
        height: 500,
        thumbSize: 64,
        backgroundColor: '#fff',
        arrowsColor: 'yellow'
    });

    $('input[type="text"],textarea').focus(function() { $(this).addClass("highlight"); });
    $('input[type="text"],textarea').blur(function() { $(this).removeClass("highlight"); });

    $('.feedback form').validate({

        rules: {
            text: { required: true, minlength: 5 },
            name: { required: true, minlength: 3 },
            lalala: { email: true }
            },

        errorPlacement: function(error, element) {
            },

        success: function(label) {
                label.removeClass('error');
                label.parent().removeClass('error');
                }
        });

});
