1 if( !window['console'] ) console = { log : function(){} };
\r
8 bootTime : + new Date,
\r
10 getTime : Date.now ? new Function( 'return Date.now()' ) : new Function( 'return +new Date' ),
\r
12 emptyFunction : new Function,
\r
14 inHead : (function( s ){
\r
15 s = s[ s.length - 1 ];
\r
17 return ( s.parentElement || s.parentNode ).tagName.toLowerCase() === 'head';
\r
18 })( document.scripts || document.getElementsByTagName( 'script' ) || document.all.tags( 'script' ) ),
\r
20 parse : function( v ){
\r
22 if( Type.isString( v ) === true ){
\r
25 //case '{}' : return {};
\r
26 //case '[]' : return [];
\r
27 case 'NaN' : return NaN;
\r
28 case 'null' : return null;
\r
29 case 'true' : return true;
\r
30 case 'false' : return false;
\r
31 case 'Infinity' : return Number.POSITIVE_INFINITY;
\r
32 case '-Infinity' : return Number.NEGATIVE_INFINITY;
\r
33 case 'undefined' : return;
\r
35 _v = v.split( ' ' ).join( '' );
\r
37 if( '' + n === _v || '' + n === '0' + _v ) return n;
\r
42 skipCleanupTagNames : 'pre,textarea,code,kbd,samp,xmp,plaintext,listing'.split( ',' ),
\r
44 cleanupWhiteSpace : function( text ){
\r
45 var _ = ' ', __ = ' ';
\r
46 text.indexOf( '\r\n' ) !== -1 && ( text = text.split( '\r\n' ).join( _ ) );
\r
47 text.indexOf( '\n\r' ) !== -1 && ( text = text.split( '\n\r' ).join( _ ) );
\r
48 text.indexOf( '\t' ) !== -1 && ( text = text.split( '\t' ).join( _ ) );
\r
49 text.indexOf( '\r' ) !== -1 && ( text = text.split( '\r' ).join( _ ) );
\r
50 text.indexOf( '\n' ) !== -1 && ( text = text.split( '\n' ).join( _ ) );
\r
51 text.indexOf( '\f' ) !== -1 && ( text = text.split( '\f' ).join( _ ) );
\r
52 text.indexOf( '\b' ) !== -1 && ( text = text.split( '\b' ).join( _ ) );
\r
53 while( text.indexOf( __ ) !== -1 ){
\r
54 text = text.split( __ ).join( _ );
\r
59 isEmptyObject : function( v ){
\r
60 if( v.length !== 0 ) return false;
\r
62 if( v.hasOwnProperty( p ) ) return false;
\r
68 // bonus: hotfix for IE6 SP1 (bug KB823727)
\r
69 document.execCommand && document.execCommand( 'BackgroundImageCache', false, true );
\r