//var intervalID = 0;

////rotate background images
//var banners = new Array(4);
//banners[0] = "home_banner1s.jpg";
//banners[1] = "home_banner2s.jpg";
//banners[2] = "home_banner3s.jpg";
//banners[3] = "home_banner4s.jpg";

$(document).ready(function() {

    //var myTimer = {};
    
    //loop();
    
//    myTimer = $.timer(2000, function() {
//    }); //hides the panel and content from the user

//    var imgHeight = $(document).height();
//    var imgHeight1 = 0;
//    if ($('#imgMenu').length > 0) {
//        imgHeight1 = $('#imgMenu').attr('height');
//    }

//    var imgHeight2 = $('#left').attr('offsetHeight');
//    var imgHeight3 = $('#panel').attr('offsetHeight');
//    if (imgHeight1 < imgHeight2)
//        imgHeight = imgHeight2;
//    else
//        imgHeight = imgHeight1;

//    if (imgHeight < imgHeight3)
//        imgHeight = imgHeight3;
        
    $('#tab').toggle(      
    function() { //when the #tab is next cliked
    $('#panel').animate({ width: "300px", opacity: 0.90 }, 500,
        function() {//sliding the #panel to 250px
            $('#tab').css("background-image", "url(assets/images/minus.png)");
            $('.content').fadeIn(100); //slides the content into view.
        });
    },
   function() { //adding a toggle function to the #tab
    $('#panel').animate({ width: "0", opacity: 0.1 }, 500,
        function() { //fade out the content
            $('#tab').css("background-image", "url(assets/images/plus.png)");
            $('.content').fadeOut(100); //slide the #panel back to a width of 0
       });
   });
});

//function loop() {
//    setTimeout(function() {

//    $("body").css("background", "#715734 url('assets/images/" + banners[intervalID] + "') 200px 0px");

//        intervalID++;
//        if (intervalID == 4) { intervalID = 0; }

//        loop();

//    }, 4000);
//}
