(function($){ 
$(document).ready(function() {
  var lightbox_options = {fitToScreen: true,
		fileLoadingImage : '/wp-content/themes/flint/images/lightbox/loading.gif',
		fileBottomNavCloseImage : '/wp-content/themes/flint/images/lightbox/closelabel.gif'};
	
	$(".ci-main-image a").lightbox(lightbox_options);
	$(".gallery a").lightbox(lightbox_options);
	$(".ci-thumb-image a").lightbox(lightbox_options);
  $(".wp-caption a[href$='.jpg']").lightbox(lightbox_options);
  
  $(".ci-thumb-image img").mouseover(function(){
    $(".ci-main-image img").attr("src", $(this).attr("src"));
    $(".ci-main-image a").attr("href", $(this).parent("a").attr("href"));
  });
  $(".featured-course p").cycle("fade");
  if ( $('*').is('#player') )
 	flowplayer("player", "/wp-content/themes/flint/swf/flowplayer-3.0.7.swf", {clip: {autoPlay:false,autoBuffering:true}}); 
});

window.onload = function(){
  var containers = $(".make-equal");
  containers.each(function(){
    var max_height = 0;
    $(".post", this).each(function(){
      if ($(this).height() > max_height) max_height = $(this).height();
    }).each(function(){
      $(this).height(max_height);
    });
  });
};
})(jQuery); 