var guidc10dd8fdc61747b8b705f77cfdde5df0={"LoadData":[{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/c0b72898-0191-4f6c-907f-ea1de8946f1b.gif","PromotionName":"150時間限定! ポイント最大44倍!お買い物マラソン","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/marathon/","PromotionTime":[{"StartTime":"2020/05/09 20:00:00 ","EndTime":" 2020/05/16 01:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"44","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/6f1a360f-ba33-411f-be45-a27a9272dcf8.gif","PromotionName":"毎月18日は楽天市場ご愛顧感謝デー ダイヤモンド会員様ポイント4倍・プラチナ会員様ポイント3倍・ゴールド会員様ポイント2倍","PromotionLink":"https://event.rakuten.co.jp/campaign/rank/point/","PromotionTime":[{"StartTime":"2020/05/18 00:00:00 ","EndTime":" 2020/05/18 23:59:00"}],"PromotionObject":"専用ページからエントリーされたダイヤモンド会員、プラチナ会員、ゴールド会員","PromotionPoints":"4","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/d9ff640d-fda7-4120-b514-5c26e919defb.gif","PromotionName":"お買い物マラソン 全ショップ対象買いまわりで最大10倍キャンペーン","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/marathon/","PromotionTime":[{"StartTime":"2020/04/23 20:00:00 ","EndTime":" 2020/04/28 01:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"44","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/c770e5a0-32b4-40ef-a6af-751b35375f8f.gif","PromotionName":"郵便局受取・はこぽす(ロッカー受取)のご利用でポイント プレゼントプログラム","PromotionLink":"https://event.rakuten.co.jp/guide/shipping/jp/point-pg/","PromotionTime":[{"StartTime":"常時開催","EndTime":""}],"PromotionObject":"全楽天会員","PromotionPoints":"0","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/e686d56b-028d-446b-b28b-7d607961e648.gif","PromotionName":"【2020年4月】楽天ウェブ検索利用でポイント2倍","PromotionLink":"https://toolbar.rakuten.co.jp/intro/everyday/members/campaign1/?scid=wi_grp_tenpomuke_2times","PromotionTime":[{"StartTime":"2020/04/01 00:00:00 ","EndTime":" 2020/04/30 23:59:00"}],"PromotionObject":"キャンペーン期間中に専用ページからエントリー+ログインし、ウェブ検索条件を達成してお買い物をされたお客様","PromotionPoints":"2","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/1b88babf-7f6d-441c-837b-78853d9e2232.gif","PromotionName":"ワンダフルデー!エントリーで全ショップ対象ポイント3倍","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/wonderfulday/","PromotionTime":[{"StartTime":"2020/05/01 00:00:00 ","EndTime":" 2020/05/01 23:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"3","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/580cbb1e-556f-4334-b8e9-9a2b6ee2de3d.gif","PromotionName":"ママ割メンバー限定!エントリーで全ショップ対象ポイント2倍","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/wonderfulday/mamawari/","PromotionTime":[{"StartTime":"2020/05/01 00:00:00 ","EndTime":" 2020/05/01 23:59:00"}],"PromotionObject":"専用ページからエントリーされたママ割メンバー","PromotionPoints":"2","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/fdcb9e03-bde0-4da2-80d9-28c3a4cd5439.jpg","PromotionName":"初めてお買い物の方限定!1,000円OFFクーポンプレゼント!","PromotionLink":"https://event.rakuten.co.jp/campaign/newpurchaser/","PromotionTime":[{"StartTime":"常時開催","EndTime":""}],"PromotionObject":"楽天市場でお買い物をされたことのない楽天会員","PromotionPoints":"0","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/025c8b0a-e528-47f1-a804-f5e6969d5063.gif","PromotionName":"【毎月開催】楽天市場をご利用で、街でのご利用分ポイントが2倍!","PromotionLink":"https://event.rakuten.co.jp/campaign/card/cityx2/","PromotionTime":[{"StartTime":"2020/04/01 00:00:00 ","EndTime":" 2020/04/30 23:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"2","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/1618fb27-7192-4f50-9ef1-917fbb2a6a22.gif","PromotionName":"102時間限定! ポイント最大44倍!お買い物マラソン","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/marathon/","PromotionTime":[{"StartTime":"2020/04/23 20:00:00 ","EndTime":" 2020/04/28 01:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"44","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/169cf9b9-7b8d-4813-accc-10d5b94e4c4f.gif","PromotionName":"2020年開催 「楽天イーグルス・ヴィッセル神戸・FCバルセロナが勝った翌日はエントリーで全ショップポイント2倍・ダブル勝利で3倍・トリプル勝利で4倍」","PromotionLink":"https://event.rakuten.co.jp/campaign/sports/","PromotionTime":[{"StartTime":"常時開催","EndTime":""}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"2","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/4ad10114-8801-4ddc-9891-a6d3e807eff0.jpg","PromotionName":"SPU(スーパーポイントアッププログラム)各種サービスご利用でポイント最大16倍","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/everyday/point/","PromotionTime":[{"StartTime":"常時開催","EndTime":""}],"PromotionObject":"全楽天会員","PromotionPoints":"16","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/6cce7e5b-c880-4bc0-922f-fbe8a4695747.jpg","PromotionName":"楽天市場アプリ 新規ダウンロードキャンペーン 1,000ポイントプレゼント","PromotionLink":"https://event.rakuten.co.jp/app/campaign/download/1000pt/?l-id=app_1000pt_shoptop","PromotionTime":[{"StartTime":"常時開催","EndTime":""}],"PromotionObject":"キャンペーン前に、「楽天市場アプリ」をダウンロードされたことのない楽天会員","PromotionPoints":"0","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/831b006a-c3d7-4153-80ea-0120c7c068ea.gif","PromotionName":"お買い物マラソン 全ショップ対象買いまわりで最大10倍キャンペーン","PromotionLink":"https://event.rakuten.co.jp/campaign/point-up/marathon/","PromotionTime":[{"StartTime":"2020/05/09 20:00:00 ","EndTime":" 2020/05/16 01:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"44","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/a9d5f9db-c746-4115-ad6a-417b5a46ed6e.gif","PromotionName":"毎月5と0の付く日は 楽天カードご利用でポイント5倍 楽天プレミアムカード・ゴールドカードご利用でポイント7倍","PromotionLink":"https://event.rakuten.co.jp/campaign/card/pointday/","PromotionTime":[{"StartTime":"2020/04/25 00:00:00 ","EndTime":" 2020/04/25 23:59:00"}],"PromotionObject":"専用ページからエントリーされた全楽天会員","PromotionPoints":"5","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true},{"KeyTime":"2020/04/24 10:31:32","ImgUrl":"/api/banner/20200424101815/203bc597-8ce8-4285-b14c-ba07efeb01f1.gif","PromotionName":"楽天ウェブ検索を初めてご利用の方対象!お買い物マラソン期間中に7,000円以上ご購入でもれなく700ポイント還元キャンペーン","PromotionLink":"https://toolbar.rakuten.co.jp/intro/marathon/700point/?scid=wi_grp_tenpomuke_700point","PromotionTime":[{"StartTime":"2020/04/21 10:00:00 ","EndTime":" 2020/04/28 01:59:00"}],"PromotionObject":"キャンペーン期間中に専用ページからエントリー+ログインし、ウェブ検索条件を達成してお買い物をされたお客様","PromotionPoints":"0","IsShow":true,"PromotionMaxPoints":"0","IsAutoCover":true}],"UploadDate": [{"LoadTime":"2020-04-24 10:31:33"}]}; function picObj(keyTime, imgUrl, promotionName, promotionLink, promotionStartTime, promotionEndTime, promotionObject, promotionPoints, isShow, promotionMaxPoints) { this.KeyTime = keyTime; this.ImgUrl = imgUrl; this.PromotionName = promotionName; this.PromotionLink = promotionLink; this.PromotionStartTime = promotionStartTime; this.PromotionEndTime = promotionEndTime; this.PromotionObject = promotionObject; this.PromotionPoints = promotionPoints; this.IsShow = isShow; this.PromotionMaxPoints = promotionMaxPoints; } var a = []; var o = guidc10dd8fdc61747b8b705f77cfdde5df0; o = o.LoadData; for (var i = 0; i < o.length; i++) { var timespans = JSON.parse(JSON.stringify(o[i].PromotionTime)); for (var j = 0; j < timespans.length; j++) { var case1 = new Date(timespans[j].StartTime) == 'Invalid Date'; var case2 = false; if (!case1) { case2 = new Date() > new Date(timespans[j].StartTime) && new Date() < new Date(timespans[j].EndTime); } if ((case1 || case2) && o[i].IsShow) { a.push(new picObj(o[i].KeyTime, o[i].ImgUrl, o[i].PromotionName, o[i].PromotionLink, timespans[j].StartTime, timespans[j].EndTime, o[i].PromotionObject, o[i].PromotionPoints, o[i].IsShow, o[i].PromotionMaxPoints)); break; } } } $("[data-id='c10dd8fd-c617-47b8-b705-f77cfdde5df0'][isbind!=1]").each(function () { var oldTitle = $(this).find('.carousel-indicators li'); if (oldTitle.length > 0) { //bootstrap carousel var _title = oldTitle.clone().removeClass('active'); var oldTemplate = $(this).find('.carousel-inner .item'); var _template = oldTemplate.clone().removeClass('active'); var count = -1; if ($(this).attr('data-count') != undefined) { try { count = parseInt($(this).attr('data-count')); } catch (e) { } } for (var i = 0; i < a.length; i++) { if (!isNaN(count) && count != -1 && i > count - 1) { return; } if (i > 0) { var title = _title.clone(); $(this).find('.carousel-indicators').append(title.attr('data-slide-to', i)); } if (i == 0) { oldTemplate.find('img').attr('src', a[i].ImgUrl); oldTemplate.find('a').attr('href', a[i].PromotionLink).text(a[i].PromotionName); } else { var template = _template.clone(); template.find('img').attr('src', a[i].ImgUrl); template.find('a').attr('href', a[i].PromotionLink).text(a[i].PromotionName); $(this).find('.carousel-inner').append(template); } } $(this).carousel(); } else { //global var cTag = $(this); var ct = cTag.html(); cTag.empty(); var result = ''; var temStr = ''; var key; var count = -1; if ($(this).attr('data-count') != undefined) { try { count = parseInt($(this).attr('data-count')); } catch (e) { } } $.each(a, function (idx, item) { if (!isNaN(count) && count != -1 && idx > count - 1) { return; } temStr = ct; for (key in item) { temStr = temStr.replace(new RegExp('[$]' + key.toString() + '[$]', 'gi'), item[key]); } temStr = temStr.replace(new RegExp('[$]Index[$]', 'gi'), idx + 1); cTag.append(temStr); }); } //over $(this).attr('isbind', 1); })