function getfotorama(fotorama){
winWidth = $(window).width();
options = {};
if(!fotorama){
console.log("no fotorama");
}
if(winWidth <= 379){
options = {
nav: false,
maxheight: '100%',
ratio: 4 / 3,
fit: 'cover',
arrows: 'always',
loop: 'true',
click: false,
};
$(".wrapper").append(caption_panel);
}
else{
options = {
width: '100%',
maxheight: '68%',
ratio: 4 / 3,
nav: 'thumbs',
fit: 'cover',
arrows: 'always',
thumbheight: 80,
thumbwidth:80,
thumbborderwidth: 0,
loop: 'true',
thumbmargin: 20,
click: false,
};
$(".fotorama__stage").append(caption_panel);
}
fotorama.setOptions(options);
}