// JavaScript Document


// resize listener
function resizeListener() {
$(document).ready(function() {
	$('#flash_content').flashResize({
  		minWidth: 1024,
  		minHeight: 768
	});
});
}

resizeListener();




// Resize function
function adjustBrowser() {
(function($){
	$.fn.flashResize = function(options) {
		var defaults = {
   			minWidth: "99.5%",
   			minHeight: "99.5%"
  		};
  
  		var options = $.extend(defaults, options);
  		
		return this.each(function() {
   			var obj = $(this);
   			var	theWindow = $(window)
   
   			if(theWindow.width() < options.minWidth && options.minWidth !="99.5%") {
	   	 		obj.width(options.minWidth);  
			}
			
			if(theWindow.height() < options.minHeight && options.minHeight != "99.5%") {
				obj.height(options.minHeight);	
			}
   
   			theWindow.resize(function(){
				if(options.minWidth != "99.5%") {
					if($(this).width() < options.minWidth) {
						obj.width(options.minWidth);	
					}
					else if(obj.width() != "99.5%") {
						obj.width("99.5%");
					}
				}
				if(options.minHeight != "99.5%") {
					if($(this).height() < options.minHeight) {
						obj.height(options.minHeight);	
					}
					else if(obj.height() != "99.5%") {
						obj.height("99.5%");
					}
				}
			});
  		});
 	};
})(jQuery);

}


adjustBrowser();
