// window.onload = function() { myShow = new Slideshow('background_slides', {hu: 'media/', images: ['72/background_1.jpg','82/background_2.jpg','87/background_3.jpg','92/background_4.jpg']}); }


function slideSwitch() {
    var $active = $('#background_slides IMG.active');

    if ( $active.length == 0 ) $active = $('#background_slides IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#background_slides IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
  setInterval( "slideSwitch()", 5000 );
});

var scroller  = null;
var scrollbar = null;
  
$(function() {
  if('#content_container'){
    scroller  = new jsScroller(document.getElementById("content_container"), 400, 370);
    scrollbar = new jsScrollbar (document.getElementById("Scrollbar-Container"), scroller, true, scrollbarEvent);
  }
});

function scrollbarEvent (o, type) {
  if (type == "mousedown") {
    if (o.className == "Scrollbar-Track") o.style.backgroundColor = "#e3e3e3";
    else o.style.backgroundColor = "#BBB";
  } else {
    if (o.className == "Scrollbar-Track") o.style.backgroundColor = "#e3e3e3";
    else o.style.backgroundColor = "#ee7f01";
  }
}

