// 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/Cincinnati/39.146912/-84.480995?pid=515&spec=0", "title_1" : "Fodor's Finds Hotel Deals in Cincinnati", "title_2" : "Cincinnati landmarks", "title_3" : "Cincinnati hotels", "title_4" : "in Cincinnati", "title_5" : "in
Cincinnati", "domain" : "fodors.hotels-for-everyone.com", "type" : "destination", "img_domain" : "img1.hotels-for-everyone.com", "phone" : "800-559-7314", "partner_id" : "515", "destination" : "cincinnati", "name_slug" : "cincinnati", "city_state_country" : "Cincinnati, Ohio, USA", "min_date" : "03/09/2010", "max_date" : "02/02/2011", "click_tracking_code" : "onclick=\"linkCode(this,'event32');\" rel=\"nofollow\"", "category" : "", "deals" : [ {"promo_text" : "3.5 Star Hotel - Stay 2 Nts, Save 20%", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Cincinnati/39.146912/-84.480995?pid=515&spec=0&hhid=153085&checkIn=03/19/2010&checkOut=03/21/2010", "discovered" : "03/09/2010", "source" : "Promotion from 10"}, {"promo_text" : "4 Star Hotel from $59", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Cincinnati/39.146912/-84.480995?pid=515&spec=0&hhid=120211", "discovered" : "03/09/2010", "source" : "Inventory from 10"}, {"promo_text" : "2.5 Star Hotel from $64", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Cincinnati/39.146912/-84.480995?pid=515&spec=0&hhid=152252", "discovered" : "03/09/2010", "source" : "Inventory from 10"}]}; HFE_TravelFinds_450_150_1(dealData);