$(document).ready(function() {


   $('#slides').slides({
      preload: true,
      preloadImage: 'assets/css/slides_images/loading.gif',
      play: 5000,
      pause: 2500,
      hoverPause: true,
      effect:'fade',
      crossfade:true,
      fadeSpeed:1500
   
   });
  
  
  

    $('a[rel*=lightbox]').slimbox({loop:true});



   // initialise the lavalamp nav
   $("#lamp").lavaLamp({
       fx: "easeInSine",
       speed: 600,
       click: function(event, menuItem) {
           return true;
       }
   });


   // accordian menu
   //Set default open/close settings
   $('.accordianContainer').hide(); //Hide/close all containers
   //$('.accordianTrigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
   
   //On Click
   $('.accordianTrigger').click(function(){
      if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
         $('.accordianTrigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
         $(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
      }
      return false; //Prevent the browser jump to the link anchor
   });

   $('.accordianTrigger.active').next().show(); //Add "active" state to clicked trigger and slide down the immediate next container
      




   // make left sidebar,right sidebars and bodyLeftContent full height
   var leftSidebarInner = $('#bodyLeftSidebarInner').height();
   var bodyRightSidebar = $('#bodyRightSidebar').height();
   var bodyLeftContent = $('#bodyLeftContent').height();
   tallest = leftSidebarInner;
   if(bodyRightSidebar > leftSidebarInner) { tallest = bodyRightSidebar; }
   if(bodyLeftContent > tallest) { tallest = bodyLeftContent; }
   tallest= tallest;
   jQuery('#bodyLeftSidebarInner').css({'min-height': tallest});
   jQuery('#bodyRightSidebar').css({'min-height': tallest});
   jQuery('#bodyLeftContent').css({'min-height': tallest});
   

      
      
   
});

