/*aspect ratio*/
function aspect_ratio(image, size){
if(size == 'small'){var get_width = 160; var get_height = 140;}
else if(size == 'big'){var get_width = 140; var get_height = 170;}
else{return false;}
var aspect_ratio_w = image.offsetWidth/image.offsetHeight;
var aspect_ratio_h = image.offsetHeight/image.offsetWidth;
if(image.height > get_height){
image.height = get_height;
image.width = get_height/aspect_ratio_h;}
else{null;}
if(image.width > get_width){
image.width = get_width;
image.height = get_width/aspect_ratio_w;}
else{null;}}

