function home_resize()
{
	// get img width 
	var oWidth = $('img.home_thumb').width();
	// get img height 
	var oHeight = $('img.home_thumb').height();	
	//You could always multiply the multiplier if you want to make the image adjust to a larger size.  Keep in mind though it will get more blurry
	var mpx = 1.25;
	$('img.home_thumb').hover(function()
	{
		$(this)            
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//custom animation effect to change the width and height of the img
		.animate({
			//take the original width/height X multipler and tag on the 'px'
			width: (oWidth * mpx) +'px',
			height: (oHeight * mpx) +'px'
			//space the animation out over 1 sec (deals in milliseconds)
			},0);
		$('#'+$(this).attr('id')).css('left', ((oWidth - (oWidth * mpx)) / 2)+'px');
		$('#'+$(this).attr('id')).css('top', ((oHeight - (oHeight * mpx)) / 2)+'px');
	},
	//this is just like a mouseOut effect to take the img back to the original size
	function(){
		$(this)
		
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//this animation shrinks the image back to original size
		.animate({
		width: oWidth +'px',
		height: oHeight +'px'
		},0);
		$('img.home_thumb').css('left', '0px');
		$('img.home_thumb').css('top', '0px');
	});
}
function thumb_resize()
{
	// get img width 
	var oWidth = $('img.thumb').width();
	// get img height 
	var oHeight = $('img.thumb').height();	
	//You could always multiply the multiplier if you want to make the image adjust to a larger size.  Keep in mind though it will get more blurry
	var mpx = 1.25;
	$('img.thumb').hover(function()
	{
		$(this)            
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//custom animation effect to change the width and height of the img
		.animate({
			//take the original width/height X multipler and tag on the 'px'
			width: (oWidth * mpx) +'px',
			height: (oHeight * mpx) +'px'
			//space the animation out over 1 sec (deals in milliseconds)
			},0);
		$('#'+$(this).attr('id')).css('left', ((oWidth - (oWidth * mpx)) / 2)+'px');
		$('#'+$(this).attr('id')).css('top', ((oHeight - (oHeight * mpx)) / 2)+'px');
	},
	//this is just like a mouseOut effect to take the img back to the original size
	function(){
		$(this)
		
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//this animation shrinks the image back to original size
		.animate({
		width: oWidth +'px',
		height: oHeight +'px'
		},0);
		$('img.thumb').css('left', '0px');
		$('img.thumb').css('top', '0px');
	});
}
function current_resize()
{
	// get img width 
	var oWidth = $('img.thumb_current').width();
	// get img height 
	var oHeight = $('img.thumb_current').height();	
	//You could always multiply the multiplier if you want to make the image adjust to a larger size.  Keep in mind though it will get more blurry
	var mpx = 1.25;
	$('img.thumb_current').hover(function()
	{
		$(this)            
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//custom animation effect to change the width and height of the img
		.animate({
			//take the original width/height X multipler and tag on the 'px'
			width: (oWidth * mpx) +'px',
			height: (oHeight * mpx) +'px'
			//space the animation out over 1 sec (deals in milliseconds)
			},0);
		$('#'+$(this).attr('id')).css('left', ((oWidth - (oWidth * mpx)) / 2)+'px');
		$('#'+$(this).attr('id')).css('top', ((oHeight - (oHeight * mpx)) / 2)+'px');
	},
	//this is just like a mouseOut effect to take the img back to the original size
	function(){
		$(this)
		
		//stops the event from happening in case of an abrupt mouseOut
		.stop()
	
		//this animation shrinks the image back to original size
		.animate({
		width: oWidth +'px',
		height: oHeight +'px'
		},0);
		$('img.thumb_current').css('left', '0px');
		$('img.thumb_current').css('top', '0px');
	});
}
function thumb_sm_resize()
{
	// get img width 
	var oWidth = $('img.thumb_sm').width();
	// get img height 
	var oHeight = $('img.thumb_sm').height();	
	//You could always multiply the multiplier if you want to make the image adjust to a larger size.  Keep in mind though it will get more blurry
	var mpx = 1.25;
	var onHover = true;
	$('img.thumb_sm').click(function()
	{
		onHover = false;
		$('img.thumb_sm').css('left', '0px');
		$('img.thumb_sm').css('top', '0px');
		$('img.thumb_sm').css('width', oWidth+'px');
		$('img.thumb_sm').css('height', oHeight+'px');
		$(this)        
			//stops the event from happening in case of an abrupt mouseOut
			
			.stop()
		
			//custom animation effect to change the width and height of the img
			.animate({
				//take the original width/height X multipler and tag on the 'px'
				width: (oWidth * mpx) +'px',
				height: (oHeight * mpx) +'px'
				//space the animation out over 1 sec (deals in milliseconds)
				},0);
			var art_id  = $(this).attr('id').replace('artwork_', '');
			
			$('#'+$(this).attr('id')).css('left', ((oWidth - (oWidth * mpx)) / 2)+'px');		
			$('#'+$(this).attr('id')).css('top', ((oHeight - (oHeight * mpx)) / 2)+'px');
			$src = '/canvas/?path=/admin/painting/&art='+art_id+'&w=450'; 
			
			$('#canvas').attr('src', $src);
			$.getJSON('/canvas/info.php?art='+art_id, function(data) {
							$('.canvas_large').attr('id', 'canvas_large_'+data.artist_painting_Id);
							$('.full_screen').attr('id', 'full_screen_'+data.artist_painting_Id);	
							$('#canvas_large').attr('href', '/artwork/'+data.artist_painting_Id+'/'+data.artist_painting_display+'/?url='+$('#url').attr('value'));	
							$('#full_screen').attr('href', '/artwork/'+data.artist_painting_Id+'/'+data.artist_painting_display+'/?url='+$('#url').attr('value'));								
							$('#canvas').attr('alt', data.artist_painting_name);
							$('#canvas').attr('title', data.artist_painting_name);
							$("#artist_painting_name").html(data.artist_painting_name);
							$("#artist_painting_medium").html(data.artist_painting_medium);
							$("#artist_painting_size").html(data.artist_painting_size);
							$("#artist_name").html(data.artist_name);
							$("#artist_painting_available").html(data.artist_painting_available);
						});
	}
	);
	
	$('img.thumb_sm').hover(function()
	{
		if (onHover == true)
		{
			$(this)        
			//stops the event from happening in case of an abrupt mouseOut
			.stop()
		
			//custom animation effect to change the width and height of the img
			.animate({
				//take the original width/height X multipler and tag on the 'px'
				width: (oWidth * mpx) +'px',
				height: (oHeight * mpx) +'px'
				//space the animation out over 1 sec (deals in milliseconds)
				},0);
			var art_id  = $(this).attr('id').replace('artwork_', '');
			$('#'+$(this).attr('id')).css('left', ((oWidth - (oWidth * mpx)) / 2)+'px');		
			$('#'+$(this).attr('id')).css('top', ((oHeight - (oHeight * mpx)) / 2)+'px');
			$src = '/canvas/?path=/admin/painting/&art='+art_id+'&w=450'; 
			
			$('#canvas').attr('src', $src);
			$.getJSON('/canvas/info.php?art='+art_id, function(data) {
							$('.canvas_large').attr('id', 'canvas_large_'+data.artist_painting_Id);
							$('.full_screen').attr('id', 'full_screen_'+data.artist_painting_Id);							
							$('#canvas_large').attr('href', '/artwork/'+data.artist_painting_Id+'/'+data.artist_painting_display+'/?url='+$('#url').attr('value'));	
							$('#full_screen').attr('href', '/artwork/'+data.artist_painting_Id+'/'+data.artist_painting_display+'/?url='+$('#url').attr('value'));								
							$('#canvas').attr('alt', data.artist_painting_name);
							$('#canvas').attr('title', data.artist_painting_name);
							$("#artist_painting_name").html(data.artist_painting_name);
							$("#artist_painting_medium").html(data.artist_painting_medium);
							$("#artist_painting_size").html(data.artist_painting_size);
							$("#artist_name").html(data.artist_name);
							$("#artist_painting_available").html(data.artist_painting_available);
						});
			$('#canvas_large').attr('href', '/'+art_id);			
		}
	},
	//this is just like a mouseOut effect to take the img back to the original size
	function(){
		if (onHover == true)
		{
			$(this)
			
			//stops the event from happening in case of an abrupt mouseOut
			.stop()
		
			//this animation shrinks the image back to original size
			.animate({
			width: oWidth +'px',
			height: oHeight +'px'
			},0);
			$('img.thumb_sm').css('left', '0px');
			$('img.thumb_sm').css('top', '0px');
		}		
	});
}
