@mixin img-opacity($trans) {
          filter : alpha(opacity=($trans * 100));
      -ms-filter : "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})";
    -moz-opacity : $trans;
  -khtml-opacity : $trans;
         opacity : $trans;
}

img {
  @include img-opacity(.5);
}