var swf = new Object();
swf.load = function(opts) {
    var so = new SWFObject(
            opts.swf, 
            opts.div, 
            opts.width,
            opts.height, 
            "8"
    );
    if(opts.params) {
      for(key in opts.params) {
        so.addParam(key, opts.params[key]);
      }
    }
    if(!opts.params || !opts.params.wmode) {
      so.addParam('wmode','transparent');
    }
    if(opts.vars) {
      for(key in opts.vars) {
        so.addVariable(key, escape(opts.vars[key]));
      }
    }
    so.write(opts.div);
}

// FAQ
jQuery(function($) {
  $('dl.qaSlider dt').click(function() {
    $(this).next().toggleClass('opened');
  });
});

// Fields which clear when you click them
jQuery(function($) {
  $('input.focus-clear').each(function() {
    var original_text = 
      $(this).click(function() {
        if (this.value == original_text) this.value = "";
      }).
      val();
  });
});

// console.log stub for missing Firebug or IE
if (typeof(console) == "undefined") { var console = { log: function() { } } };
