From a70ab6564bb469af0a64d43bb0b5c20bc27d83fb Mon Sep 17 00:00:00 2001
From: John Resig <jeresig@gmail.com>
Date: Fri, 16 Jun 2006 00:05:56 +0000
Subject: [PATCH] Added checks for the box model.

---
 jquery/jquery.js |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/jquery/jquery.js b/jquery/jquery.js
index 6a79833..b7a2799 100644
--- a/jquery/jquery.js
+++ b/jquery/jquery.js
@@ -320,12 +320,18 @@ function $(a,c) {
 
 (function(){
 	var b = navigator.userAgent.toLowerCase();
+
+	// Figure out what browser is being used
 	$.browser =
-		( /safari/.test(b) && "safari" ) ||
+		( /webkit/.test(b) && "safari" ) ||
 		( /opera/.test(b) && "opera" ) ||
 		( /msie/.test(b) && "msie" ) ||
 		( !/compatible/.test(b) && "mozilla" ) ||
 		"other";
+
+	// Check to see if the W3C box model is being used
+	$.boxModel = ( $.browser != "msie" || 
+		document.compatMode == "CSS1Compat" );
 })();
 
 $.apply = function(o,f,a) {
-- 
1.7.10.4