$(function() {

			// setup overlay actions to buttons
			$("button[rel]").overlay({

				// setup exposing (optional operation);
				onBeforeLoad: function() {
					this.expose();
				},

				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).unload();

					// cloase exposing
					$.unexpose();
				}
			});

			// install flowplayers
			$("a.player").flowplayer("http://www.evildancers.cz/lib/flowplayer/flowplayer-3.0.3.swf");
		});
