
/************************************************************************
 * BEGIN jQuery PNG fix
 */

var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
var blank = new Image();
blank.src = 'images/_global/clear.gif';

function runPNGfix() {

	
	
	if ( badBrowser ) {
		
		// get all pngs on page
		
		$('img[src$=.png]').each(function() {
			
			if (!this.complete) {
			
				this.onload = function() { fixPng(this) };
			
			} else {
				
				fixPng(this);
			}
			
		});
		
		
		/*try {
            
            var oDivNodes = document.getElementsByTagName('div');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
            
                var oNode = oDivNodes.item(iIndex);
                
                if ( oNode.currentStyle && oNode.currentStyle.backgroundImage && ( oNode.currentStyle.backgroundImage.indexOf( 'url(' ) != -1 ) && ( oNode.currentStyle.backgroundImage.indexOf( '.png")' ) != -1 ) )
                {
                    fixupIEPNGBG(oNode);
                }
                
            }
        }
        
        catch (e) { }*/
	}
	
	
 
  
};

function fixPng( png ) {

	var src = png.src;
	if ( !png.style.width ) { 
  
    	png.style.width = $(png).width(); 
	}
	
	if ( !png.style.height ) { 
		
		png.style.height = $(png).height(); 
	}

	png.onload = function() { };
	png.src = blank.src;
	png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";

}

 
 
function resizeHandler(){
	
	
	var newY = parseFloat( $("#container").css( 'height' ) ) + 290; 
	
	
	$("#background").css( { 'height': newY } ); 
   	$("#corner").css( { 'top': newY - parseFloat( $("#corner").css( 'height' ) ) } ); 
 
}


$(document).ready(function() {


    runPNGfix();
    resizeHandler();
    $(window).resize( resizeHandler );
  
	$( "body" ).find( ".btn" ).each(function(i) {
	    
    
     $(this).mouseover(function() {
     	
     	var src = this.src;
     	this.src = src.replace( '_off', '_on' );
     	
     });
     
     
     $(this).mouseout(function() {
     	
     	var src = this.src;
     	this.src = src.replace( '_on', '_off' );
     	
     });
     
     
   
     
   });
   


});

