$(document).ready(function(){

    // Drop the tab in when the page is loaded
    $('.sigin-box').stop().animate({top:'-150px'},{queue:true, duration:1000, easing: 'easeOutCubic'});
    
    //  Drop the box in when it's clicked
    $('.link-hvr').click(function () {
        if($('.student-papers-result-header').is(":visible") ){
            $('.sigin-box').stop().animate({top:'-150px'},{queue:true, duration:1000, easing: 'easeOutQuart'});
            $('.student-papers-result-header').hide();
        } else {
            $('.sigin-box').stop().animate({top:'0px'},{queue:true, duration:1000, easing: 'easeOutQuart'});
            $('.student-papers-result-header').show();
        }
    });
    
    // Raise the box when it's closed
    $('.close').live('click', function(){
        $('.sigin-box').stop().animate({top:'-150px'},{queue:true, duration:1000, easing: 'easeOutQuart'});
        $('.student-papers-result-header').hide();
    });

    // In case there's 4 rotator panes, increase the width of the control-buttons container
    setTimeout(function(){
        if( $('.dojoxRotatorController li').length  == 4){
            $("#slider .dojoxRotatorController").attr("style","width:69px;");
        }
    },2000);

});

