// Wrap code with module pattern. (function() { var global = this; // widget constructor function global.HFE_TravelFinds_450_150_1 = function(dealData) { var widget_style = '450_150_1'; var widget_id=Math.floor(Math.random()*10000); // Don't do style for Fodor's or for Tix4Tonight if (dealData.partner_id != "515" && dealData.partner_id != "518") { var styleHTML = ''; // Drop in the widget's id styleHTML = styleHTML.replace(/#hfe-widget/g,"#hfe-widget-"+widget_id); document.write(styleHTML); } document.write('
'); var widget = document.getElementById('hfe-widget-'+widget_id); // Create header widget DOM fragment var dealListHTML = '

'+dealData.title_1+'

'; dealListHTML +=''; dealListHTML += 'Find More Deals'; // Analytics call dealListHTML += ''; widget.innerHTML = dealListHTML; }; })(); var dealData = {"default_url" : "http://fodors-finds.hotels-for-everyone.com/landmark_pages/view_destination/Tokyo/35.675289/139.717285?pid=515&spec=0", "tagline_1" : "Fodor's Finds", "tagline_2" : "Fodor's Find", "title_1" : "Fodor's Finds Hotel Deals in Tokyo", "title_2" : "Tokyo landmarks", "title_3" : "Tokyo hotels", "title_4" : "in Tokyo", "title_5" : "in
Tokyo", "domain" : "fodors-finds.hotels-for-everyone.com", "widget_domain" : "fodors.hotels-for-everyone.com", "type" : "destination", "img_domain" : "img1.hotels-for-everyone.com", "phone" : "800-916-8592", "partner_id" : "515", "destination" : "tokyo", "name_slug" : "tokyo", "city_state_country" : "Tokyo, Japan", "min_date" : "02/08/2012", "max_date" : "01/03/2013", "click_tracking_code" : "onclick=\"linkCode(this,'event32');\" rel=\"nofollow\"", "category" : "", "hotel_id" : "", "hotel_name" : "", "deals" : [ {"promo_text" : "the b akasaka - Stay 4 Nts, Save 25%", "url" : "http://fodors-finds.hotels-for-everyone.com/booking/hotel_details?pid=515&hid=228058&checkIn=04/12/2012&checkOut=04/17/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "228058"}, {"promo_text" : "Hotel Monterey Akasaka - Stay 2 Nts, Save 40%", "url" : "http://fodors-finds.hotels-for-everyone.com/booking/hotel_details?pid=515&hid=251532&checkIn=02/17/2012&checkOut=02/22/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "251532"}, {"promo_text" : "the b ikebukuro - One Free Night Offer", "url" : "http://fodors-finds.hotels-for-everyone.com/booking/hotel_details?pid=515&hid=326988&checkIn=04/12/2012&checkOut=04/17/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "326988"}]}; HFE_TravelFinds_450_150_1(dealData);