var $j = jQuery.noConflict();

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;
}

$j(document).ready(function(){
	if (hasBorderRadius()) {
	  $j(".PanelLinks li img, .products-grid .product-image img").load(function(){
		var img = $j(this);
		img.css({'display': 'block'});
		var imgSrc = img.attr('src');
		var imgHeight = img.height();
		var imgWidth = img.width();
		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();
	  });
	}
	
	$j('.ExtraInfo .page-title').click(function(){
		$j(this).next('.std').slideToggle();
	});
});
