/* <![CDATA[ */  
// slideshow on homepage

	jQuery('#slides').cycle({
		fx:    'fade', 
		speed:  900,
		timeout: 6000, 
		pager: '#slidernav'
 	});

// preload featured images



(function(jQuery) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  jQuery.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)

var images = []; jQuery('.sliderimg').each(function(){ images.push(jQuery(this).html()); }); jQuery.preLoadImages(images); 
var images = []; jQuery('.featured-thumbnail').each(function(){ images.push(jQuery(this).html()); }); jQuery.preLoadImages(images); 


function showVidCatListItems(){
		
}


jQuery(document).ready(function() {
	jQuery('.fade-in, .fade-in h3').animate({
		opacity: 1,
		}, 4000, function() {
		// Animation complete.
	});
	jQuery('.video-sidebar ul h3').append(
		' <a href="#" class="toggleVidCatListItems">+</a>'								 
	);
	
	 // Find list items representing folders and
    // style them accordingly.  Also, turn them
    // into links that can expand/collapse the
    // tree leaf.
	
    jQuery('.video-sidebar ul').each(function(i) {
		jQuery(this).find('li').css('display','none');
    	jQuery(this).find('.toggleVidCatListItems').toggle(
			function() {
				jQuery(this).html('-');
				jQuery(this).parent().parent().children('li').css('display','block');
				return false;
			}, 
			function() {
				jQuery(this).html('+');
				jQuery(this).parent().parent().children('li').css('display','none');
				return false;
			}
		);
			
    });
	
  
        

    
});


   



/* ]]> */

