// 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/Mt.+Rushmore+and+the+Black+Hills/44.365444/-103.72139?pid=515&spec=0", "title_1" : "Fodor's Finds Hotel Deals in Mt. Rushmore and the Black Hills", "title_2" : "Mt. Rushmore and the Black Hills landmarks", "title_3" : "Mt. Rushmore and the Black Hills hotels", "title_4" : "in Mt. Rushmore and the Black Hills", "title_5" : "in
Mt. Rushmore and the Black Hills", "domain" : "fodors.hotels-for-everyone.com", "type" : "destination", "img_domain" : "img1.hotels-for-everyone.com", "phone" : "800-559-7314", "partner_id" : "515", "destination" : "deadwood", "name_slug" : "mt--rushmore-and-the-black-hills", "city_state_country" : "Deadwood, South Dakota, USA", "min_date" : "03/15/2010", "max_date" : "02/08/2011", "click_tracking_code" : "onclick=\"linkCode(this,'event32');\" rel=\"nofollow\"", "category" : "", "deals" : [ {"promo_text" : "3 Star Hotel from $44", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Mt.+Rushmore+and+the+Black+Hills/44.365444/-103.72139?pid=515&spec=0&hhid=203094", "discovered" : "03/15/2010", "source" : "Inventory from 10"}, {"promo_text" : "2 Star Hotel from $46", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Mt.+Rushmore+and+the+Black+Hills/44.365444/-103.72139?pid=515&spec=0&hhid=147863", "discovered" : "03/15/2010", "source" : "Inventory from 10"}, {"promo_text" : "Great hotel from $41", "url" : "http://fodors.hotels-for-everyone.com/landmark_pages/view_destination/Mt.+Rushmore+and+the+Black+Hills/44.365444/-103.72139?pid=515&spec=0&hhid=177410", "discovered" : "03/15/2010", "source" : "Inventory from 10"}]}; HFE_TravelFinds_450_150_1(dealData);