text: // Copyright (c) %%year%% by Code Computerlove (http://www.codecomputerlove.com)
  // Licensed under the MIT license
  // version: %%version%%
  
  (function(window, Util) {
  	
  	Util.Browser = {
  	
  		ua: null,
  		version: null,
  		safari: null,
  		webkit: null,
  		opera: null,
  		msie: null,
  		chrome: null,
  		mozilla: null,
  		
  		android: null,
  		blackberry: null,
  		iPad: null,
  		iPhone: null,
  		iPod: null,
  		iOS: null,
  		
  		is3dSupported: null,
  		isCSSTransformSupported: null,
  		isTouchSupported: null,
  		isGestureSupported: null,
  		
  		
  		_detect: function(){
  			
  			this.ua = window.navigator.userAgent;
  			this.version = (this.ua.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || []);
  			this.safari = (/Safari/gi).test(window.navigator.appVersion);
  			this.webkit = /webkit/i.test(this.ua);
  			this.opera = /opera/i.test(this.ua);
  			this.msie = /msie/i.test(this.ua) && !this.opera;
  			this.chrome = /Chrome/i.test(this.ua);
  			this.firefox = /Firefox/i.test(this.ua);
  			this.fennec = /Fennec/i.test(this.ua);
  			this.mozilla = /mozilla/i.test(this.ua) && !/(compatible|webkit)/.test(this.ua);
  			this.android = /android/i.test(this.ua);
  			this.blackberry = /blackberry/i.test(this.ua);
  			this.iOS = (/iphone|ipod|ipad/gi).test(window.navigator.platform);
  			this.iPad = (/ipad/gi).test(window.navigator.platform);
  			this.iPhone = (/iphone/gi).test(window.navigator.platform);
  			this.iPod = (/ipod/gi).test(window.navigator.platform);
  			
  			var testEl = document.createElement('div');
  			this.is3dSupported = !Util.isNothing(testEl.style.WebkitPerspective);	
  			this.isCSSTransformSupported = ( !Util.isNothing(testEl.style.WebkitTransform) || !Util.isNothing(testEl.style.MozTransform) || !Util.isNothing(testEl.style.OTransform) || !Util.isNothing(testEl.style.transformProperty) );
  			this.isTouchSupported = this.isEventSupported('touchstart');
  			this.isGestureSupported = this.isEventSupported('gesturestart');
  			
  		},
  		
  			
  		_eventTagNames: {
  			'select':'input',
  			'change':'input',
  			'submit':'form',
  			'reset':'form',
  			'error':'img',
  			'load':'img',
  			'abort':'img'
  		},
  				
  				
  		/*
  		 * Function: isEventSupported
  		 * http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
  		 */
  		isEventSupported: function(eventName) {
  			var 
  				el = document.createElement(this._eventTagNames[eventName] || 'div'),
  				isSupported;
  			eventName = 'on' + eventName;
  			isSupported = Util.objectHasProperty(el, eventName);
  			if (!isSupported) {
  				el.setAttribute(eventName, 'return;');
  				isSupported = typeof el[eventName] === 'function';
  			}
  			el = null;
  			return isSupported;
  		},
  		
  		
  		isLandscape: function(){
  			return (Util.DOM.windowWidth() > Util.DOM.windowHeight());
  		}
    };
  	
  	Util.Browser._detect();
  	
  }
  (
  	window,
  	window.Code.Util
  ))
  ;
  