jQuery(function() {
  var flash = jQuery('#flash');
  if (flash) {
    flash.effect('highlight', {
      color: '#888833'
    }, 3000);
  }
});

jQuery(function() {
  var transparencyValue = jQuery('#transparencyValue');
  var heightValue = jQuery('#heightValue');
  var sValue = 30;
  
  jQuery('#transparencySlider').slider({
    startValue: sValue,
    slide: function(e, ui) {
      transparencyValue.val(ui.value);
    }
  });
  jQuery('#heightSlider').slider({
    startValue: sValue,
    slide: function(e, ui) {
      heightValue.val(ui.value);
    }
  });
  
  transparencyValue.val(sValue);
  heightValue.val(sValue);
  transparencyValue.attr("readOnly", true);
  heightValue.attr("readOnly", true);
});

jQuery(function() {
  var flipped = jQuery('#flipped');
  jQuery('#colorpicker').ColorPicker({
    flat: true,
    color: '#000000',
    onChange: function(hsb, hex, rgb) {
      flipped.css('background-color', '#' + hex);
    }
  });
});

function setupImageTransparencyIE6() {
  var flipped = jQuery('#flipped');
  if (flipped) {
    var columnWidth = jQuery('#footer').attr('offsetWidth');
    var width = (imageWidth > columnWidth-10) ? columnWidth : imgWidth;
    width -= 30;
    var height = width*(imgHeight/imgWidth);
    flipped.attr('src', 'images/blank.gif');
    flipped.css({
      'width': width + 'px',
      'height': height + 'px',
      'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + imgFile + "', sizingMethod='scale')"
    });
  }
}

