$(window).load(function(){

  $.urlParam = function(name){
  var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
  if (!results) { return 0; }
  return results[1] || 0;}


  $("a.close").click(function() {
  	
  	var tracking_source = $(this).parent("div").attr("id");
  	
  	
	  switch (tracking_source){
 	  case "fee_based_401k_overlay":
		ntptEventTag('ev=link&linkname=Video Commision to fee based practice');   
		break;
  	}

  });	




});


$(function() {


		var player_fee_based_401k = flowplayer("player_fee_based_401k", "media/flowplayer-3.2.4.swf",  {
			clip: {

				// these two configuration variables does the trick
				autoPlay: true,
				autoBuffering: true, // <- do not place a comma here
				onStart: function(clip, info) {
				 ntptEventTag('ev=link&linkname=Video Start: Webcast: Commision to fee-based practice');
				},
				onFinish: function(clip, info) {
				 ntptEventTag('ev=link&linkname=Video Finish: Webcast: Commision to fee-based practice');	
				},
				onSeek: function(clip, info) {
				 ntptEventTag('ev=link&linkname=Video Seek: Webcast: Commision to fee-based practice');				
				} // <- do not place a comma here
			}
		});

		$("a.overlay-image[rel]").overlay({
			mask: {color: '#000'}, 
			
			onClose: function() {
				player_fee_based_401k.pause();	
			}
			
			
		});		
		
						

});

