// 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 = '';
dealListHTML +='';
for (var i = 0; i < dealData.deals.length; i++) {
var deal = dealData.deals[i];
dealListHTML += '- '+deal.promo_text+'
';
}
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/Sutherland/-34.038328/151.049889?pid=515&spec=0", "tagline_1" : "Fodor's Finds", "tagline_2" : "Fodor's Find", "title_1" : "Fodor's Finds Hotel Deals in Sutherland", "title_2" : "Sutherland landmarks", "title_3" : "Sutherland hotels", "title_4" : "in Sutherland", "title_5" : "in
Sutherland", "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" : "sutherland", "name_slug" : "sutherland", "city_state_country" : "Sutherland, New South Wales, Australia", "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" : "BLUE Sydney - A Taj Hotel - Stay 3 Nts, Save 15%", "url" : "http://fodors-finds.hotels-for-everyone.com/booking/hotel_details?pid=515&hid=173172&checkIn=11/09/2012&checkOut=11/16/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "173172"}, {"promo_text" : "Travelodge Bankstown - Stay 2 Nts, Save 15%", "url" : "http://fodors-finds.hotels-for-everyone.com/booking/hotel_details?pid=515&hid=177670&checkIn=02/15/2012&checkOut=02/17/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "177670"}, {"promo_text" : "4 Star Hotel - Stay 1 Nts, Save 25%", "url" : "http://fodors-finds.hotels-for-everyone.com/landmark_pages/view_destination/Sutherland/-34.038328/151.049889?pid=515&spec=0&hhid=187150&checkIn=09/24/2012&checkOut=09/25/2012", "discovered" : "02/07/2012", "source" : "Deal from 000", "hotel_id" : "187150"}]};
HFE_TravelFinds_450_150_1(dealData);