﻿$(document).ready(function () {

    // Pulls in tweets
//    $(".twitter div").tweet({
//        username: "artisanschool",
//        count: 1,
//        template: "{text}{time}"
//    });

    $(function () {
        $(".twitter div").twitterCache({ debug_cache_status: false, username: "artisanschool" });
    });
    

    // jQuery UI tabs
    $("#tabs").tabs({ fx: [{ opacity: 'toggle', duration: 'fast' }, { opacity: 'toggle', duration: 'normal'}] });
    // Homepage slider
    $('#slider div ul').nivoSlider({
        effect: 'fade',
        slices: 1,
        animSpeed: 250,
        pauseTime: 5000,
        directionNavHide: false
    });
    if (($(window).width()) < 1040) {
        $('.nivo-directionNav').hide();
    }
    $(window).bind("resize", resizeWidth);
    function resizeWidth() {
        var browserWidth = $(window).width();
        //alert(browserWidth);
        if (browserWidth < 1040) {
            $('.nivo-directionNav').hide();
        } else {
            $('.nivo-directionNav').fadeIn(500);
        }
    }

});

