$(document).ready(function(){


	if($.trim($("div.link-section").text()) == "") { ; $('div.link-section').remove();  }

	// keep sidebar and content area the same height
	var contentbodyh = $('div#content-body').outerHeight();
	var sidebarh = $('div#sidebar').outerHeight();
	if (contentbodyh > sidebarh) { $('div#sidebar').height($('div#content-body').height() + 20); }
	if (sidebarh > contentbodyh) { $('div#content-body').height($('div#sidebar').height() - 20); }
  



  
//	var cswrap = $('div.class-search-wrap').outerHeight();
//	var cwrap = $('div.calandar-wrap').outerHeight();
//	if (cswrap > cwrap) { $('div.calandar-wrap').height($('div.class-search-wrap').height() + 20); }
//	if (cwrap > cswrap) { $('div.class-search-wrap').height($('div.calandar-wrap').height() - 20); }
  
  
  
  
  
  
  
  
  
  
  
  
});

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow 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 );
});

