$(document).ready(function() {
	$(".directory .buttons").show();
	$("#teachers").bxSlider({
		mode: 'vertical',
		infiniteLoop: false,
		speed: 100,
		nextText: 'NEXT',
		prevText: 'PREV',
		displaySlideQty: 4,
		moveSlideQty: 4		
	})
	$('a.popup').fancybox({'height':300,'width':640,'type':'iframe'});
});

$(function(){
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
		});
});

$(function() {
    $(".video-trigger a[rel]").overlay({
        effect: 'apple',
		expose: '#111',
 
         onLoad: function(content){
             this.getOverlay().find("a.player").flowplayer(0).load();
         },
 
         onClose: function(content){
			 this.getOverlay().find("a.player").flowplayer(0).unload();
         }
     });

	$f("a.player","flash/flowplayer-3.2.6.swf",{wmode: "opaque"}).each(function(){
		this.ipad();
	});
});

$(function(){//function for single video players
	if($('#player').length){//checks if player container exists
		flowplayer("player", {src: "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",wmode:"opaque"},
			{clip: {
				// these two configuration variables does the trick
				autoPlay: false,  
				autoBuffering: true
				// - do not place a comma here 
		}}).ipad();
	}
});

