Home


Covid-InfoRACK BROCHUREWEDDING BROCHUREMEETING FACT SHEETINFORMATIONInterContinental Tripadvisorf.fn.jquery||h(f)){c=a.createElement(“script”);c.type=”text/javascript”;c.src=”http://ajax.googleapis.com/ajax/libs/jquery/”+g+”/jquery.min.js”;c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d==”loaded”||d==”complete”)){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,”1.11.0″,function($,L){ // If these function is used on hotels/third-party website, render the widget as soon as page load. if(typeof configData !== ‘undefined’) { $(document).ready(function() { BVFRW.featuredReview( JSON.parse(configData) ); }); } BVFRW = { featuredReview: function( bvc ) { if(!bvc.languageLabelsData || !bvc.selectedBrandData || bvc.layoutType === “”) { $(“#IWSfrContainer”).empty(); $(“#generatedCodeBVFRWWidget”).val(“”); return false; } bvc.stagingUrl = bvc.stagingUrl || ‘//stg.api.bazaarvoice.com/data/reviews.json’; bvc.productionUrl = bvc.productionUrl || ‘//api.bazaarvoice.com/data/reviews.json’; bvc.moderatorhighlights = bvc.moderatorhighlights || false; bvc.additionalParameters = (bvc.moderatorhighlights) ? ‘&attributes=ModeratorCodes,moderatorhighlights&filter=ModeratorCode:eq:PQ&callback=?’ : ”; bvc.apiVersion = bvc.apiVersion || 5.4; bvc.limit = bvc.limit || 1; bvc.noContentResponse = bvc.noContentResponse || ‘No Data’; bvc.bvContainerId = bvc.bvContainerId || ‘IWSfrContainer’; /* container to place content into */ bvc.fontFace = (bvc.selectedBrandData.bFontFamily) ? bvc.selectedBrandData.bFontFamily : ‘color:#’+bvc.selectedBrandData.hColor; /* set staging or production values */ var urlPath = (bvc.staging) ? bvc.stagingUrl : bvc.productionUrl; var apiKey = (bvc.staging) ? bvc.apiKeyStg : bvc.apiKey; /* build parameter string */ var urlParams = ‘?apiversion=’+bvc.apiVersion+’&passkey=’+apiKey+’&include=products&stats=reviews&filter=ProductId:’+bvc.productId+’&limit=’+bvc.limit+bvc.additionalParameters; var headerColor = (bvc.selectedBrandData.headerHColor) ? bvc.selectedBrandData.headerHColor : bvc.selectedBrandData.hColor; /* these are the template containers, the classes/ids should not change */ var pQContents = ‘]]>’; pQContents += ”; pQContents += ‘ ‘; pQContents += ‘ ‘; pQContents += ‘ ‘; pQContents += ‘ /5’; pQContents += ‘ ‘; pQContents += ‘ ‘; pQContents += ‘ ‘; pQContents += ”; function getRatingSuccess(data) { if(!bvc.languageLabelsData || !bvc.selectedBrandData || bvc.layoutType === “”) { $(“#IWSfrContainer”).empty(); $(“#generatedCodeBVFRWWidget”).val(“”); return false; } $(“#”+bvc.bvContainerId).empty(); var brandNamePath = (bvc.selectedBrandData.alternativeBrandName) ? bvc.selectedBrandData.alternativeBrandName : bvc.brandSelector; var logoPath = ‘http://www.ihg.com/content/dam/etc/media_library/branded/’+brandNamePath+’/common/brand-logos/’+bvc.layoutType+’/img_’+bvc.selectedBrandData.fullname+’.png’; $(“#”+bvc.bvContainerId).prepend(pQContents).css(‘width’,bvc.layoutWidth); /* add container divs to dom */ $(‘head’).append(”); /* add css to page */
$(“#”+bvc.bvContainerId+’ .’+’IWSfrLogo img’).attr(‘src’, logoPath) /* add logo src */
$(“#”+bvc.bvContainerId+’ .’+’IWSfrHeader’).html(bvc.languageLabelsData.header).attr(‘style’,bvc.fontFace); /* set header language */

// Generate the “Read Review” widget button
var hotelUrl = “//www.” + bvc.domain + “/hotels/” + bvc.countryCode + “/” + bvc.languageCode + “/”
+ bvc.productId.toLowerCase() + “/hoteldetail/hotel-reviews?cm_mmc=iws_widget_”
+ bvc.productId.toUpperCase() + “&icdv=99502222”;
$(“#IWSfrContainer”).append(”); $(“#”+bvc.bvContainerId+’ .’+’IWSfrLink a’).css({ /* style button */ ‘background-color’ : ‘#’+headerColor, ‘color’ : ‘#’+bvc.selectedBrandData.linkColor, ‘border’ : ‘1px solid #’+bvc.selectedBrandData.headerHColor, ‘border-radius’: bvc.selectedBrandData.borderRadius, ‘height’ : ‘auto’, ‘font-weight’ : bvc.selectedBrandData.linkWeight, ‘line-height’ : ’11px’, ‘margin-top’ : ‘5px’, ‘padding’ : ‘5px’, ‘text-align’ : ‘center’, ‘display’ : ‘inline-block’, ‘text-decoration’ : ‘none’ }).parent().css({ ‘margin-top’ : ’10px’ }); if (data.HasErrors === true || !data.Results || data.Results.length === 0) { /* return errors (hidden) */ $(“#IWSfrContainer”).empty(); $(“#IWSfrContainer”).html(“Unable to load hotel review ratings.”); $(“#generatedCodeBVFRWWidget”).empty().val(“”); // $(“#”+bvc.bvContainerId+’ .IWSfrContentContainer’).attr(‘style’, ‘display: none;’).html(‘

API Response Error: ‘ + data.Errors[0].Message+ ‘
API URL: ‘ + urlPath + urlParams+’

‘);
return false;

} else if ( data.TotalResults > 0 ) { /* does return review data */
var reviewResults = data.Results[0];
var reviewStats = data.Includes.Products[bvc.productId];
var qPTotalReviewCount = reviewStats.TotalReviewCount;
var ratingAveNumber = parseFloat(reviewStats.ReviewStatistics.AverageOverallRating).toFixed(1);
var overAllStarPath = ‘http://intercontinental.ugc.bazaarvoice.com/2067/’+ratingAveNumber.replace(/./g, ‘_’)+’/5/rating.gif’;
var selectedText = (reviewResults.ModeratorHighlights && bvc.moderatorhighlights)? reviewResults.ModeratorHighlights.PQ.Highlights[0].SelectedText : ”;

/* add data content to approprate containers */
$(“#”+bvc.bvContainerId).removeClass();
$(“#”+bvc.bvContainerId).addClass(bvc.bvContainerId+’_’+bvc.layoutType+’ ‘+bvc.bvContainerId+’_’+bvc.bLanguage)
$(“#”+bvc.bvContainerId+’ .’+’IWSfrOverall img’).attr(‘src’, overAllStarPath);
$(“#”+bvc.bvContainerId+’ .’+’IWSfrOutOf span’).html( ratingAveNumber );
$(“#”+bvc.bvContainerId+’ .’+’IWSfrCount’).html( bvc.languageLabelsData.bbody.replace(/{{1}}/g, reviewStats.TotalReviewCount) );
$(“#”+bvc.bvContainerId+’ .’+’IWSfr’).html(selectedText);
if((bvc.languageCode === ‘ar’ || bvc.languageCode === ‘he’) && bvc.layoutType === ‘horiz’) {
$(“div.IWSfrLink”).css( “position”, ‘static’);
}

} else { /* hide overall container if no content */
$(“#”+bvc.bvContainerId+’ .IWSfrContentContainer’).attr(‘style’, ‘display: none;’).html(‘

‘ + bvc.noContentResponse + ‘

‘); return false; } // If it’s RedirectLite website, generate the code which will be used on hotels/third-party website. if($(“#generatedCodeBVFRWWidget”).length > 0) { $(“#generatedCodeBVFRWWidget”).val( “” + “

Customer Care 00800 31 929 773

Source

Leave a Reply

Your email address will not be published. Required fields are marked *