﻿ $(document).ready(function() {
      

      // setup overlay actions to buttons
      $("a.videoSpot").overlay({

	    //setup exposing (optional operation);
				onBeforeLoad: function() {
					this.expose();
          //add close on exspose layer fixes ie
          $('div#blanket').click(function(){$('div.close').click()});

				},	

      onLoad: function(content) {
      // find the player contained inside this overlay and load it
      $("a.player", content).flowplayer(0).load();
      },

      onClose: function(content) {
       $("a.player", content).flowplayer(0).stop();
       $("a.player", content).flowplayer(0).unload();
 

      // cloase exposing
      $.unexpose();

      }
      });
      
     

      // install flowplayers
      $("a.player").flowplayer("/Components/Video/flowplayer-3.0.2.swf");
      });
      
      
      