/**
 * @author Vlad Yakovlev (red.scorpix@gmail.com)
 * @copyright Art.Lebedev Studio (http://www.artlebedev.ru)
 * @link www.scorpix.ru
 * @requires jQuery
 * @requires swfobject
 */
function panorama(rootEl, swfPath, width, height) {
	rootEl = $(rootEl);
	createFlash();
	rootEl.click(createFlash);

	function createFlash() {
		setTimeout(function() {
			var id = 'flash' + Math.random();
			$('#popup .flash').attr('id', id);
			swfobject.embedSWF(swfPath, id, width, height, '9.0.0');
		}, 500);
	}
}