function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
	var ua = navigator.userAgent;
	var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	if (re.exec(ua) != null)
	  rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

$j(document).ready(function(){
	$j('.rounded-5, .gray-box-5').corner('5px keep');
	$j('.rounded-5-left').corner('5px left');
	$j('.rounded-5-right').corner('5px right');
	$j('.rounded-5-top').corner('5px top');
	$j('.rounded-5-bottom').corner('5px bottom');
	$j('.rounded-5-tl').corner('5px tl');
	$j('.rounded-5-tr').corner('5px tr');
	$j('.rounded-5-bl').corner('5px bl');
	$j('.rounded-5-br').corner('5px br');

	$j('.rounded-10, .gray-box-10').corner('10px keep');
	$j('.rounded-10-left').corner('10px left');
	$j('.rounded-10-right').corner('10px right');
	$j('.rounded-10-top').corner('10px top');
	$j('.rounded-10-bottom').corner('10px bottom');
	$j('.rounded-10-tl').corner('10px tl');
	$j('.rounded-10-tr').corner('10px tr');
	$j('.rounded-10-bl').corner('10px bl');
	$j('.rounded-10-br').corner('10px br');
	
	$j('.block').corner('10px keep');
	$j('.block-content').corner('10px bottom');

	$j('.button span').corner('5px keep');
	
	$j('.fieldset').corner('10px keep');
	
	$j('.error-msg, .success-msg, .note-msg, .notice-msg').corner('10px keep');
	
	$j('.box-account').corner('10px keep');
	
	$j('.block .actions').corner('10px bottom');
	
	$j('.cart-table').corner('10px keep');
	
	$j('.products-list .product-shop button.btn-cart span, .product-view .price_and_buy button.button span, .checkout-cart-index .checkout-types button.btn-proceed-checkout span, .block-progress, .block-progress .block-content, .no-rounded span').uncorner();
	
	brser = getInternetExplorerVersion();
	if(brser >= 9 || brser == -1){
   		$j('input.input-text, select, textarea').corner('5px keep'); // IE ima problem sa ovom linijom!
	}else if(brser < 9 && brser != -1){
		$j('.block-subscribe, .block-subscribe .block-content, .block-subscribe .button span, .top-seacrh-container .form-search .button span').uncorner();
	}
});
