/**

   Stewdio Underscore
   © 2009 Stewdio
   All Rights Reserved

   Underscore is an ECMAScript namespace
  "reserved" by Stewdio for designers in 2008.
   Your JavaScript framework core will use 
   the $ namespace like jQuery, etc. but keep
   your homebrew functions tidy within _.

*/




function Stewdio() {};
(function()
{
	window._ = {


		boot: function()
		{	

			//  If this is NOT Internet Explorer
			//  Or it is, but it's higher than version 6
			//  Replace our GIFs with PNGs

			if( !jQuery.browser.msie || ( jQuery.browser.msie && parseInt( jQuery.browser.version) > 6 ))
			{
				var images = $( "img" );
				for( var i = 0; i < images.length; i ++ )
				{
					var source = $( images[i] ).attr( "src" );
					var parts  = source.split( "." );
					var type   = parts.pop();
					if( type  == "gif" )
					{
						var png = parts.join( "" ) + ".png";
						$( images[i] ).attr( "src", png );
					};
				};
			};
			
			
			

			/*
			$.ifixpng( '/img/Pixel.gif' );

			//  Global fix does not appear to work
			//  But also, more specific targets = faster load in IE
			//$( 'img[@src$=.png], #panel' ).ifixpng();


			//  Header Bits

			$( '#logo img' ).ifixpng();


			//  Home Bits

			$( '#petco img' ).ifixpng();
			$( '#leftSlab img' ).ifixpng();
			$( '#rightSlab img' ).ifixpng();
			$( '#player1 img' ).ifixpng();
			$( '#jumbotron' ).ifixpng();
			$( '#player2 img' ).ifixpng();


			//  More General

			$( '#yellowcard' ).ifixpng();
			$( '#yellowcard img' ).ifixpng();

			*/
		}


	};
})();
$( window ).bind( "load", function()
{
	_.boot();
});