/*************************************
* Include.js
* A Javascript file that contains functions specific to the NCEAS website
* This file will be included in every page on NCEAS
*  
* Author: Lauren Walker laurennwalker@gmail.com
* 2015  
*************************************/


// Check if a slider/slideshow is on this page and make sure it has started (i.e. all images are hidden).
jQuery(document).ready(function($) {

	(function startSlider(){
		$(window).load(function(){
			//Is there a slider on this page?
			var flexslider = $(".flexslider");
			if(!flexslider.length) return;
			
			var slides = $(flexslider).find("li");
			if(slides.length) $(slides[0]).addClass("flex-active-slide").css("opacity", 1);
		})
	}());

});
/*************************************
* Include.js
* A Javascript file that contains functions specific to the NCEAS website
* This file will be included in every page on NCEAS
*  
* Author: Lauren Walker laurennwalker@gmail.com
* 2015  
*************************************/

jQuery(window).load(function(){
	
	//Make sure the flexslider is loaded.... there is a bug in the Flexslider module
	var $ = jQuery;
	$(".flexslider").flexslider();
	
});
Use jQuery(window).load to avoid interference with other Drupal modules and libraries. Also use the flexslider API to start the Flexslider instead of manually starting it
Use jQuery(window).load to avoid interference with other Drupal modules
and libraries. Also use the flexslider API to start the Flexslider
instead of manually starting it