/*Browser Detector*/
	var mybrowser =  navigator.userAgent;					//figure what browse it is using 
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
}

/*	if(mybrowser.indexOf('Safari') != -1 ) {					//go to the big string, and search for string Safari (if it doesnt find it = -1) so this conditional is checking that Safari is your browser
		document.write('<link href="mainstyle.css" rel="stylesheet" type="text/css" />');
	}else if(mybrowser.indexOf('Firefox') != -1 ) {
		document.write('<link href="mainstyle.css" rel="stylesheet" type="text/css" />');
	}else if (mybrowser.indexOf('MSIE') != -1 ) {
		document.write('<link href="iestyle.css" rel="stylesheet" type="text/css" />');
	}else if (mybrowser.indexOf('Opera') != -1 ) {
		document.write('<link href="operastyle.css" rel="stylesheet" type="text/css" />');
	}
*/

function getcss(cssfile){
	loadcss = document.createElement('link');
	loadcss.setAttribute("rel", "stylesheet");
	loadcss.setAttribute("type", "text/css");
	loadcss.setAttribute("href", cssfile);
	document.getElementsByTagName("head")[0].appendChild(loadcss);
}

function cssSize(){

if(screen.width <= '800') {
	window.scrollTo(900,600);
	if (ieversion == 6) {
		getcss('css/1024x768.css');		
		getcss('css/ie6_s.css');
	}else {
		getcss('css/1024x768.css');		
	}		

}else if(screen.width > '800' && screen.width < '1280') {
	window.scrollTo(900,600);
	if (ieversion == 6) {
		getcss('css/1024x768.css');		
		getcss('css/ie6_s.css');
	}else {
		getcss('css/1024x768.css');		
	}		

$(document).ready(function() {
    $('#image-bckg img').each(function() {
        var maxWidth = 2700; // Max width for the image
        var maxHeight = 1620;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

    $('#cause #content h1 img').each(function() {
        var maxWidth = 130; // Max width for the image
        var maxHeight = 27;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

    $('#cause-frame img').each(function() {
        var maxWidth = 600; // Max width for the image
        var maxHeight = 544;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#cause-help img').each(function() {
        var maxWidth = 313; // Max width for the image
        var maxHeight = 362;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
    });

	$('#gotoCause img').each(function() {
        var maxWidth = 224; // Max width for the image
        var maxHeight = 123;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	
		$('#gotoHoney img').each(function() {
        var maxWidth = 119; // Max width for the image
        var maxHeight = 71;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gotoGallery img').each(function() {
        var maxWidth = 128; // Max width for the image
        var maxHeight = 112;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gotoSelected img').each(function() {
        var maxWidth = 139; // Max width for the image
        var maxHeight = 106;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gotoResearch img').each(function() {
        var maxWidth = 100; // Max width for the image
        var maxHeight = 87;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gotoFundraising img').each(function() {
        var maxWidth = 147; // Max width for the image
        var maxHeight = 79;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

	$('#gotoSponsors img').each(function() {
        var maxWidth = 137; // Max width for the image
        var maxHeight = 107;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }
    });
	$('#gotoTshirt img').each(function() {
        var maxWidth = 133; // Max width for the image
        var maxHeight = 83;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#home-Menu img').each(function() {
        var maxWidth = 102; // Max width for the image
        var maxHeight = 190;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });



    $('#honey-design #content h1 img').each(function() {
        var maxWidth = 182; // Max width for the image
        var maxHeight = 46;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

	$('#hon-frame img').each(function() {
        var maxWidth = 423; // Max width for the image
        var maxHeight = 630;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#hon-littlebee img').each(function() {
        var maxWidth = 56; // Max width for the image
        var maxHeight = 54;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#hon-believe img').each(function() {
        var maxWidth = 250; // Max width for the image
        var maxHeight = 122;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#hon-logo img').each(function() {
        var maxWidth = 130; // Max width for the image
        var maxHeight = 68;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#tap-cbrf h1 img').each(function() {
        var maxWidth = 163; // Max width for the image
        var maxHeight = 46;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#fund-Left img').each(function() {
        var maxWidth = 534; // Max width for the image
        var maxHeight = 504;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

	$('#fund-border img').each(function() {
        var maxWidth = 516; // Max width for the image
        var maxHeight = 468;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#fund-flower img').each(function() {
        var maxWidth = 343; // Max width for the image
        var maxHeight = 364;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-border img').each(function() {
        var maxWidth = 756; // Max width for the image
        var maxHeight = 655;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-flower img').each(function() {
        var maxWidth = 324; // Max width for the image
        var maxHeight = 340;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-fruit img').each(function() {
        var maxWidth = 132; // Max width for the image
        var maxHeight = 161;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-butterfly img').each(function() {
        var maxWidth = 94; // Max width for the image
        var maxHeight = 95;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-flying img').each(function() {
        var maxWidth = 452; // Max width for the image
        var maxHeight = 137;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

	$('#event h1 img').each(function() {
        var maxWidth = 207; // Max width for the image
        var maxHeight = 39;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#pict_gallery ul li img').each(function() {
        var maxWidth = 50; // Max width for the image
        var maxHeight = 50;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#gall-flying img').each(function() {
        var maxWidth = 452; // Max width for the image
        var maxHeight = 137;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#sel-hive img').each(function() {
        var maxWidth = 150; // Max width for the image
        var maxHeight = 108;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#sel-flower img').each(function() {
        var maxWidth = 328; // Max width for the image
        var maxHeight = 411;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#sel-bee img').each(function() {
        var maxWidth = 253; // Max width for the image
        var maxHeight = 208;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#winners h1 img').each(function() {
        var maxWidth = 183; // Max width for the image
        var maxHeight = 36;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

	$('#win_gallery ul li img').each(function() {
        var maxWidth = 50; // Max width for the image
        var maxHeight = 50;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#sponsor-frame img').each(function() {
        var maxWidth = 680; // Max width for the image
        var maxHeight = 350;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#content-sponsors h1 img').each(function() {
        var maxWidth = 141; // Max width for the image
        var maxHeight = 45;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#research-fr img').each(function() {
        var maxWidth = 653; // Max width for the image
        var maxHeight = 454;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#research #content h1 img').each(function() {
        var maxWidth = 300; // Max width for the image
        var maxHeight = 39;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#research-info img').each(function() {
        var maxWidth = 153; // Max width for the image
        var maxHeight = 154;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#research-bee img').each(function() {
        var maxWidth = 326; // Max width for the image
        var maxHeight = 224;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#research-fruit img').each(function() {
        var maxWidth = 135; // Max width for the image
        var maxHeight = 119;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#shirt-flow img').each(function() {
        var maxWidth = 194; // Max width for the image
        var maxHeight = 211;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#t-shirt #content h1 img').each(function() {
        var maxWidth = 114; // Max width for the image
        var maxHeight = 30;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#bee-picture .img_size').each(function() {
        var maxWidth = 111; // Max width for the image
        var maxHeight = 163;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#bee-picture .shirt-pos').each(function() {
        var maxWidth = 137; // Max width for the image
        var maxHeight = 245;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#e-shirt h2 img').each(function() {
        var maxWidth = 190; // Max width for the image
        var maxHeight = 20;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#homeBee img').each(function() {
        var maxWidth = 380; // Max width for the image
        var maxHeight = 242;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#home-flowery img').each(function() {
        var maxWidth = 290; // Max width for the image
        var maxHeight = 261;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });
	$('#home-flow2 img').each(function() {
        var maxWidth = 318; // Max width for the image
        var maxHeight = 349;    // Max height for the image
        var ratio = 0;  // Used for aspect ratio
        var width = $(this).width();    // Current image width
        var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   // get ratio for scaling image
            $(this).css("width", maxWidth); // Set new width
            $(this).css("height", height * ratio);  // Scale height based on ratio
            height = height * ratio;    // Reset height to match scaled image
            width = width * ratio;    // Reset width to match scaled image
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; // get ratio for scaling image
            $(this).css("height", maxHeight);   // Set new height
            $(this).css("width", width * ratio);    // Scale width based on ratio
            width = width * ratio;    // Reset width to match scaled image
        }

    });

});
}else if(screen.width > '1024' && screen.width < '1300') {
	window.scrollTo(1200,820);
	if (ieversion == 6) {
		getcss('css/1024x1280.css');
		getcss('css/ie6_m.css');			
	}else if (ieversion >= 7) {
		getcss('css/1024x1280.css');			
	}else {
		getcss('css/1024x1280.css');			
	}		
$(document).ready(function() {
    $('#image-bckg img').each(function() {
        var maxWidth = 3600; 
        var maxHeight = 2160; 
        var ratio = 0; 
        var width = $(this).width();  
        var height = $(this).height();
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);
            height = height * ratio; 
            width = width * ratio; 
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);   
            width = width * ratio; 
        }

    });

    $('#cause-frame img').each(function() {
        var maxWidth = 643; 
        var maxHeight = 583;  
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#cause-help img').each(function() {
        var maxWidth = 417; 
        var maxHeight = 482; 
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;    
        }
    });

	$('#gotoCause img').each(function() {
        var maxWidth = 298;
        var maxHeight = 164;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;   
        }

    });
	
		$('#gotoHoney img').each(function() {
        var maxWidth = 159;
        var maxHeight = 94;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth);
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#gotoGallery img').each(function() {
        var maxWidth = 171; 
        var maxHeight = 150;  
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);
            height = height * ratio; 
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio); 
            width = width * ratio; 
        }

    });
	$('#gotoSelected img').each(function() {
        var maxWidth = 186; 
        var maxHeight = 142; 
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;  
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio); 
            width = width * ratio;    
        }

    });
	$('#gotoResearch img').each(function() {
        var maxWidth = 134; 
        var maxHeight = 116;   
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height;
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#gotoFundraising img').each(function() {
        var maxWidth = 196; 
        var maxHeight = 106;    
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio); 
            width = width * ratio;    
        }

    });

	$('#gotoSponsors img').each(function() {
        var maxWidth = 183; 
        var maxHeight = 143; 
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;  
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }
    });
	$('#gotoTshirt img').each(function() {
        var maxWidth = 178; 
        var maxHeight = 111;  
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#home-Menu img').each(function() {
        var maxWidth = 116; 
        var maxHeight = 216; 
        var ratio = 0; 
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });

	$('#hon-frame img').each(function() {
        var maxWidth = 483; 
        var maxHeight = 720;
        var ratio = 0; 
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#hon-littlebee img').each(function() {
        var maxWidth = 75; 
        var maxHeight = 72;
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio; 
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#hon-believe img').each(function() {
        var maxWidth = 406; 
        var maxHeight = 198;  
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#hon-logo img').each(function() {
        var maxWidth = 174; 
        var maxHeight = 91;  
        var ratio = 0; 
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#tap-cbrf h1 img').each(function() {
        var maxWidth = 200; 
        var maxHeight = 56;   
        var ratio = 0;  
        var width = $(this).width();  
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height;
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;   
        }

    });
	$('#fund-Left img').each(function() {
        var maxWidth = 855; 
        var maxHeight = 807; 
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth);
            $(this).css("height", height * ratio); 
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height;
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });

	$('#fund-border img').each(function() {
        var maxWidth = 635; 
        var maxHeight = 576; 
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });
	$('#fund-flower img').each(function() {
        var maxWidth = 458; 
        var maxHeight = 486;   
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#gall-border img').each(function() {
        var maxWidth = 962; 
        var maxHeight = 833;  
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#gall-flower img').each(function() {
        var maxWidth = 389; 
        var maxHeight = 408;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#gall-fruit img').each(function() {
        var maxWidth = 176; 
        var maxHeight = 214; 
        var ratio = 0;  
        var width = $(this).width();  
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;  
            width = width * ratio;  
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#gall-butterfly img').each(function() {
        var maxWidth = 125; 
        var maxHeight = 126;   
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;  
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height;
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio); 
            width = width * ratio;   
        }

    });
	$('#gall-flying img').each(function() {
        var maxWidth = 723; 
        var maxHeight = 218; 
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });

	$('#event h1 img').each(function() {
        var maxWidth = 276;
        var maxHeight = 52;    
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);  
            width = width * ratio;  
        }

    });
	$('#pict_gallery ul li img').each(function() {
        var maxWidth = 60;
        var maxHeight = 60;  
        var ratio = 0;  
        var width = $(this).width(); 
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth);
            $(this).css("height", height * ratio); 
            height = height * ratio;  
            width = width * ratio;  
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });
	$('#sel-hive img').each(function() {
        var maxWidth = 200;
        var maxHeight = 144;
        var ratio = 0;  
        var width = $(this).width();  
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth);
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;  
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#sel-flower img').each(function() {
        var maxWidth = 525; 
        var maxHeight = 657;   
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;   
        }

    });
	$('#sel-bee img').each(function() {
        var maxWidth = 450; 
        var maxHeight = 369;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#winners h1 img').each(function() {
        var maxWidth = 244; 
        var maxHeight = 48;   
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });

	$('#win_gallery ul li img').each(function() {
        var maxWidth = 60; 
        var maxHeight = 60;   
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#sponsor-frame img').each(function() {
        var maxWidth = 680; 
        var maxHeight = 350;  
        var ratio = 0;  
        var width = $(this).width();  
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });
	$('#content-sponsors h1 img').each(function() {
        var maxWidth = 188; 
        var maxHeight = 60;    
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height;
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#research-fr img').each(function() {
        var maxWidth = 803; 
        var maxHeight = 558;   
        var ratio = 0;
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });
	$('#research-info img').each(function() {
        var maxWidth = 204; 
        var maxHeight = 206;    
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;  
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#research-bee img').each(function() {
        var maxWidth = 435;
        var maxHeight = 298;    
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#research-fruit img').each(function() {
        var maxWidth = 180;
        var maxHeight = 158;  
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight); 
            $(this).css("width", width * ratio);  
            width = width * ratio;    
        }

    });
	$('#shirt-flow img').each(function() {
        var maxWidth = 258; 
        var maxHeight = 281;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#bee-picture .img_size').each(function() {
        var maxWidth = 148; 
        var maxHeight = 217;    
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#bee-picture .shirt-pos').each(function() {
        var maxWidth = 189; 
        var maxHeight = 337;    
        var ratio = 0;  
        var width = $(this).width();   
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio); 
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);  
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#e-shirt h2 img').each(function() {
        var maxWidth = 217; 
        var maxHeight = 23;   
        var ratio = 0;  
        var width = $(this).width();  
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;  
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;   
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;   
        }

    });
	$('#homeBee img').each(function() {
        var maxWidth = 507; 
        var maxHeight = 323; 
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);   
            width = width * ratio;    
        }

    });
	$('#home-flowery img').each(function() {
        var maxWidth = 386; 
        var maxHeight = 348;    
        var ratio = 0;  
        var width = $(this).width();    
        var height = $(this).height(); 
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;    
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });
	$('#home-flow2 img').each(function() {
        var maxWidth = 424; 
        var maxHeight = 466;  
        var ratio = 0; 
        var width = $(this).width();    
        var height = $(this).height();  
 
        // Check if the current width is larger than the max
        if(width > maxWidth){
            ratio = maxWidth / width;   
            $(this).css("width", maxWidth); 
            $(this).css("height", height * ratio);  
            height = height * ratio;   
            width = width * ratio;    
        }
		        // Check if current height is larger than max
        if(height > maxHeight){
            ratio = maxHeight / height; 
            $(this).css("height", maxHeight);   
            $(this).css("width", width * ratio);    
            width = width * ratio;    
        }

    });

});
}else{
	window.scrollTo(1500,1020);
	if (ieversion == 6) {
		getcss('css/1280x1024.css');			
		getcss('css/ie6.css');
	}else if (ieversion >= 7) {
		getcss('css/1280x1024.css');			
	}else {
		getcss('css/1280x1024.css');			
	}		

}

}


$(document).ready(function(){
$("#menu li a div img").hover(function() {
  this.src = this.src.replace("_off","_on");
 },
 function() {
  this.src = this.src.replace("_on","_off");
 });

$("#sponsor-frame a img").hover(function() {
  this.src = this.src.replace("_on","_off");
 },
 function() {
  this.src = this.src.replace("_off","_on");
 });

$("#research-fruit a img").hover(function() {
  this.src = this.src.replace("_on","_off");
 },
 function() {
  this.src = this.src.replace("_off","_on");
 });

$("#gall-fruit a img").hover(function() {
  this.src = this.src.replace("_on","_off");
 },
 function() {
  this.src = this.src.replace("_off","_on");
 });

$("#cause-frame a img").hover(function() {
  this.src = this.src.replace("_on","_off");
 },
 function() {
  this.src = this.src.replace("_off","_on");
 });

$(function() {
	$('#pict_gallery a').lightBox();
});
$(function() {
	$('#win_gallery a').lightBox();
})
$(function() {
	$('#bee-picture a').lightBox();
})
});
