jQuery(function(){
var ParentId = 'ChirashiplusDiv';
var ThumbSize = jQuery('#'+ParentId).innerWidth() - 4;
var Flyers = [
{
id: 32371203,
code: 'f17d533e29f8c433641992890258db30',
expose: '',
title: 'サカゼンのお得なSALE!',
client: 'sakazen',
thumb_uri: '//cips.chirashiplus.tv/1653/32371203/0/framein-288-288.jpg',
cms: 'cms.mechao.tv',
storeid: 96797
}
];
function calcThumbParam( img, directive, areasize ) {
var matches = /\{thumb-(all|r|l)\}/.exec( directive );
var expose = 'all';
if ( matches ) {
expose = matches[1];
}
var clip = { w: (expose=='all' ? img.width : img.width/2), h: img.height };
var ratio = (Math.floor(clip.h / clip.w)==0 ? areasize / clip.w : areasize / clip.h);
img.width *= ratio;
img.height *= ratio;
var ret = {
imgWidth: img.width * (expose=='all' ? 1 : 0.5),
imgHeight: img.height,
marginLeft: (expose=='r' ? img.width*(-0.5) : 0)
};
return ret;
}
jQuery.each(Flyers,function(){
var flyer = this;
var thumb = jQuery('');
var divId = 'Flyer' + flyer.id;
jQuery('#'+ParentId).append( jQuery('