
(function($){
		  
		$.fn.resize_handler = function()
		{						
			/*var windowWidth = 0;
			var windowHeight = 0;
			
			if($.browser.msie)
			{
				windowWidth = $('html').width();
  				windowHeight = $('html').height();
			}
			else
			{
				windowWidth = window.innerWidth;
  				windowHeight = window.innerHeight;
			}
			
			resizeDefaultBackground();*/
			
			$(window).bind('resize', function() 
			{								
				$('object').attr("width",window.innerWidth);
				$('object').attr("height",window.innerHeight);
				
				$('embed').attr("width",window.innerWidth);
				$('embed').attr("height",window.innerHeight);							
			});
			
			/*function resizeDefaultBackground()
			{								
				proportionallyByMinBounds(windowWidth, windowHeight);								
				
				pictWidth = $('img#default_background').width();
				pictHeight = $('img#default_background').height();

				var xPosition = (windowWidth - pictWidth) / 2;
				var yPosition = (windowHeight - pictHeight) / 2;
				
				$('img#default_background').css({ position: "absolute", top:yPosition, left:xPosition});
				
				//alert(windowWidth + '/' + windowHeight + '   ' + pictWidth + '/' + pictHeight + '   ' + $('img#default_background').offset().left + '/' + $('img#default_background').offset().top);
			}
			
			
			function proportionallyByMinBounds(minWidth, minHeight) 
			{
				var ratio = $('img#default_background').height() / $('img#default_background').width();
				proportionallyByMaxBounds(minWidth, minHeight);
				
				if (minHeight > $('img#default_background').height()) {
					$('img#default_background').height(minHeight);
					$('img#default_background').width(Math.round($('img#default_background').height() / ratio));
				}
				
				if (minWidth > $('img#default_background').width()) {
					$('img#default_background').width(minWidth);
					$('img#default_background').height(Math.round($('img#default_background').width() * ratio));
				}	
			}
		
			function proportionallyByMaxBounds(maxWidth, maxHeight)
			{
				var ratio = $('img#default_background').height() / $('img#default_background').width();
				
				if ($('img#default_background').height() > maxHeight) {
					$('img#default_background').height(maxHeight);
					$('img#default_background').width(Math.round($('img#default_background').height() / ratio));
				}
				
				if ($('img#default_background').width() > maxWidth) {
					$('img#default_background').width(maxWidth);
					$('img#default_background').height(Math.round($('img#default_background').width() * ratio));
				}
			}*/
			
		};	// end plugin resize_handler	
		
})(jQuery)	//end jQuery function
