window.addEvent('domready', function() {

  /* external links */
  var objs = $$('a');
  objs.each(function(obj, i) {
    if (obj.get('href') && (obj.get('rel') == 'external')){
      obj.set('target', '_blank');
    }
  });

  /* IE hovers */
  if (Browser.Engine.trident){
    var objs = $$('button');
    objs.each(function(obj, i) {
      obj.addEvent("mouseover", function(event) {
        this.addClass('hover');
      });
    	obj.addEvent("mouseout", function(event) {
        this.removeClass('hover');
      });
    });
    var objs = $$('input').extend($$('textarea'));
    objs.each(function(obj, i) {
      obj.addEvent("focus", function(event) {
        this.addClass('focus');
    	});
    	obj.addEvent("blur", function(event) {
        this.removeClass('focus');
    	});
    });
  }

  /* FLASH */
  var obj = new Swiff('_swf/showcase_180608.swf', {
    id: 'fObject',
    width: 490,
    height: 390,
    version: 8,
    container: 'flash',
    params: {
    	wmode: 'transparent',
    	bgcolor: '#ffffff'
    },
    vars: {
    	img: '_swf/imports/1.jpg, _swf/imports/2.jpg, _swf/imports/3.jpg, _swf/imports/4.jpg, _swf/imports/5.jpg, _swf/imports/6.jpg, _swf/imports/7.jpg',
    	txt: 'Waterproofing Melbourne, part of the Australian team at the <br>Chelsea 2008 Flower show - London;'+
    	     'Preparing the water feature for spraying ensuring the $200k <br>sandstone wall is well protected;'+
    	     'We also waterproof bathroom floors, walls and bath surrounds;'+
    	     'Here\'s Ron applying primer to the pond in Chelsea - Gee <br>he\'s good looking;'+
    	     'We also waterproof decks/balconies and planter boxes as shown <br>in this Toorak Penthouse;'+
    	     'Here is the finished pond at Chelsea constructed of steel, concrete and granite with a pit, sump and balance tank. The result was a gold medal.;'+
           'Waterproofing Melbourne, proud to be a part of a $4m rebuild of Paddle Steamer \'Hero\' with a 135 year history on the Murray River.;'
    }
  });
});