//Function for mainpage first(left) image popup
$(document).ready(function(){
	var oWidth = $('img.resize1').width();
	var oHeight = $('img.resize1').height();
	var apx = (oWidth / oHeight);
	var mpx = apx * 1.1;
	$('img.resize1')
		.hover(function(){
			$(this)
				.stop()
				.animate({
					width: (oWidth * mpx) +'px',
					height: (oHeight * mpx) +'px'
				},200);
				$("p.maintxt1").animate({fontSize:"20"});
				$("div#image2").fadeTo(300,0.4);
				$("div#image3").fadeTo(300,0.4);
		},
		function(){
			$(this)
				.stop()
				.animate({
					width: oWidth +'px',
					height: oHeight +'px'
				},200);
				$("p.maintxt1").animate({fontSize:"15"});
				$("div#image2").fadeTo(300,1);
				$("div#image3").fadeTo(300,1);

		});
});
//Function for mainpage second(middle) image popup
$(document).ready(function(){
	var oWidth = $('img.resize2').width();
	var oHeight = $('img.resize2').height();
	var apx = (oWidth / oHeight);
	var mpx = apx * 1.1;
	$('img.resize2')
		.hover(function(){
			$(this)
				.stop()
				.animate({
					width: (oWidth * mpx) +'px',
					height: (oHeight * mpx) +'px'
				},200);
				$("p.maintxt2").animate({fontSize:"20"});
				$("div#image1").fadeTo(300,0.4);
				$("div#image3").fadeTo(300,0.4);

		},
		function(){
			$(this)
				.stop()
				.animate({
					width: oWidth +'px',
					height: oHeight +'px'
				},200);
				$("p.maintxt2").animate({fontSize:"15"});
				$("div#image1").fadeTo(300,1);
				$("div#image3").fadeTo(300,1);

		});
});
//Function for mainpage third(right) image popup
$(document).ready(function(){
	var oWidth = $('img.resize3').width();
	var oHeight = $('img.resize3').height();
	var apx = (oWidth / oHeight);
	var mpx = apx * 1.1;
	$('img.resize3')
		.hover(function(){
			$(this)
				.stop()
				.animate({
					width: (oWidth * mpx) +'px',
					height: (oHeight * mpx) +'px'
				},200);
				$("p.maintxt3").animate({fontSize:"20"});
				$("div#image2").fadeTo(300,0.4);
				$("div#image1").fadeTo(300,0.4);

		},
		function(){
			$(this)
				.stop()
				.animate({
					width: oWidth +'px',
					height: oHeight +'px'
				},200);
				$("p.maintxt3").animate({fontSize:"15"});
				$("div#image2").fadeTo(300,1);
				$("div#image1").fadeTo(300,1);

		});
});

