

<!--
/**
 * @author tomasztu
 */
(function(){
 
 jQuery.fn.flash = function(options){
  var opts = jQuery.extend({}, $.fn.flash.defaults, options);
  
  return this.each(function(){
   
   el = $(this);
   
   parseSettings(el,opts);
   getCoreAttributes(el);
   
         if(swfobject.hasFlashPlayerVersion(opts.flashVersion)) {
    swfobject.embedSWF(core.src, core.id, core.width, core.height, opts.flashVersion, '', data.vars, data.params, data.attrs);
   } else {
    el
     .after(opts.noFlashHtml).next().height(el.height()).width(el.width())
     .end()
    .remove();
   }
  });
 }
 
 /* default settings */
 jQuery.fn.flash.defaults = {
  flashVersion : '9.0.124',
  flashVarsParamsAttrSrc : 'rel',
  noFlashHtml : '<div class="no-flash"><a href="http://get.adobe.com/flashplayer/"><img src="http://wwwimages.adobe.com/www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="" title="pobierz najnowszą wersję Adobe Flash"></a></div>'
 }
 
 var opts;
 var settings;
 var core = {};
 var data = { vars : { },
     params : { },
      attrs : { }
      }
  
 function parseSettings(el,opts){
  data = jQuery.extend({}, data, eval(el.attr(opts.flashVarsParamsAttrSrc)));
 }
 
 function getCoreAttributes(el){
  core.src = data.attrs.src || el.attr('href');
  core.id = data.attrs.id || el.attr('id');
  core.height = data.attrs.height || el.height();
  core.width = data.attrs.width || el.width();
 }
 
})(jQuery);
//-->
