// 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); var styleHTML = ''; // Drop in the widget's id styleHTML = styleHTML.replace(/#hfe-widget/g,"#hfe-widget-"+widget_id); document.write(styleHTML); document.write('
'); // Create header widget DOM fragment var header = document.createElement('div'); var dealList = document.createElement('div'); var widget = document.getElementById('hfe-widget-'+widget_id); header.className = "header"; header.innerHTML = ''+dealData.title_1+''; var dealListHTML = ''; // Analytics call dealListHTML += ''; dealList.innerHTML = dealListHTML; widget.appendChild(header); widget.appendChild(dealList); }; })(); var dealData = {"default_url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Rome/41.896016/12.477894?pid=515&spec=0", "title_1" : "Fodor's Finds Hotel Deals in Rome", "title_2" : "Rome landmarks", "title_3" : "Rome hotels", "title_4" : "in Rome", "title_5" : "in
Rome", "domain" : "fodors.hotels-for-everyone.com", "type" : "destination", "img_domain" : "img1.hotels-for-everyone.com", "phone" : "800-559-7314", "partner_id" : "515", "destination" : "rome", "name_slug" : "rome", "city_state_country" : "Rome, Italy", "min_date" : "03/22/2010", "max_date" : "02/14/2011", "click_tracking_code" : "onclick=\"linkCode(this,'event32');\" rel=\"nofollow\"", "category" : "specific-light-light", "deals" : [ {"promo_text" : "Grand Hotel Plaza - One Free Night Offer", "url" : "http://fodors.hotels-for-everyone.com/booking/hotel_details?pid=&hid=115730&checkIn=05/02/2010&checkOut=05/06/2010", "discovered" : "03/22/2010", "source" : "Promotion from 1"}, {"promo_text" : "5 Star Hotel - Stay 3 Nts, Save 45%", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Rome/41.896016/12.477894?pid=515&spec=0&hhid=206379&checkIn=05/13/2010&checkOut=05/17/2010", "discovered" : "03/22/2010", "source" : "Promotion from 1"}, {"promo_text" : "Hotel Columbus - Stay 4 Nts, Save 25%", "url" : "http://fodors.hotels-for-everyone.com/booking/hotel_details?pid=&hid=200729&checkIn=04/20/2010&checkOut=04/27/2010", "discovered" : "03/22/2010", "source" : "Promotion from 1"}]}; HFE_TravelFinds_450_150_1(dealData);