$(document).ready(function(){      
    try{
      $("#slider").easySlider();
    }
    catch(err){
    }

    try{
      if ($('#admin-menu').height()>0){
        $('#login_links').css('margin-left','400px');
      }
    }
    catch(err){

    }


    try{
      $('#gallery a').lightBox();
    }
    catch(err){
    }

    try{
      if ($('#gallery li').size() < 2){
        $('#nextBtn').css('display','none');
      }
    }
    catch(err){

    }
    try{
      if ($('#social_links').height()){
        $('#header').css('margin-top','-18px');
        $('#footer').css('margin-top','-21px');
      }
    }
    catch(err){

    }
  //$("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 1, mouseDownSpeedBooster: 1, autoScroll: "onstart", autoScrollDirection: "endlessloop", autoScrollSpeed: 1, visibleHotSpots: "", hotSpotsVisibleTime: 9, startAtElementId: "startAtMe"});

  try{
    $("#scroller").scrollable({circular: true}).autoscroll({ autoplay: true });
  }
  catch(err){
  }
//$("#scroller").scrollable().autoscroll(2000);

   var node_content_height = ($('.node .content').height());   
   if (node_content_height > 260){
     $('.node .content').css('overflow-y','scroll');
     $('.node .content').css('float','left');
     $('.node .content').height('260px');
   }

   var latest_news_height = ($('#latest_news').height());
   if (latest_news_height > 292){
     $('#latest_news').css('overflow-y','scroll');
     $('#latest_news').css('float','left');
     $('#latest_news').height('292px');
   }

   var latest_event_height = ($('#latest_event').height());
   if (latest_event_height > 292){
     $('#latest_event').css('overflow-y','scroll');
     $('#latest_event').css('float','left');
     $('#latest_event').height('292px');
   }
   
   var detail_news_height = ($('#detail_news_page').height());   
   if (detail_news_height > 320){
     $('#detail_news_page').css('overflow-y','scroll');
     $('#detail_news_page').css('float','left');
     $('#detail_news_page').height('320px');
   }

   

   var detail_event_page_height = ($('#detail_event_page').height());
   if (detail_event_page_height >= 320){
     $('#detail_event_page').css('overflow-y','scroll');
     $('#detail_event_page').css('float','left');
     $('#detail_event_page').height('320px');
   }






   try{
     var left_sidebar= document.getElementById("sidebar-left").offsetHeight;
   }
   catch(err){
   }
   try{
     var right_sidebar= document.getElementById("left_sidebar_separator").offsetHeight;
   }
   catch(err){
   }
   if (left_sidebar < right_sidebar){
    try{
      document.getElementById("sidebar-left").style.height =   (right_sidebar)  +  "px";
    }
    catch(err){
    }
   }
   else{
     //document.getElementById("sidebar-left").style.height =   850 + "px";
   }     
	
  

});




