function hasBorderRadius() {
  var d = document.createElement("div").style;
  if (typeof d.borderRadius !== "undefined") return true;
  if (typeof d.WebkitBorderRadius !== "undefined") return true;
  if (typeof d.MozBorderRadius !== "undefined") return true;
  return false;
}
	
$(document).ready(function(){
	
	$('.SalesPanel').cycle({ 
	    fx:    'fade', 
	    speed:  4000,
		pause: true,
		slideExpr: '.SlideContent'
	 });
	 
	if (hasBorderRadius()) {
	  $('.SlideContent img').each(function(){
		var img = $(this);
		var imgSrc = img.attr('src');
		var imgHeight = img.height();
		var imgWidth = img.width();
		var imgClass = img.attr('class');
		img.after('<div class="RoundedImage"></div>');
		img.next('.RoundedImage')
		   .css('background-image', 'url("' + imgSrc + '")')
		   .css('background-repeat','no-repeat')
		   .css('width', imgWidth + 'px')
		   .css('height', imgHeight + 'px');
		img.remove();
	  });
	}
	
});
