text: try{var currUrl="";currUrl=$('.curPageUrlForSurvey').val();}catch(e){}
  $(document).ready(function(){var res=tmoCaller.callAsync({url:"/apps/mpcs/servlet/survey",data:{action:'getChildNodes',url:currUrl,damPath:'/content/metro/en/desktop/metro/surveymonkey',resourceResolver:'resourceResolver'},tmoOptions:{componentEl:"#surveymonkey"}},setSurveyPageSuccess,setSurveyPageError);});function setSurveyPageSuccess(result){try{if(result!==''&&result!==null&&result!==undefined){respObj=$.parseJSON(result);surveyUrl=respObj.surveyUrl;var surveyType=respObj.surveyType;if(surveyType==='B'||surveyType==='P'){setPopupTexts(respObj);}
  else if(surveyType==='R'){setRibbonTexts(respObj);}}}catch(e){}}
  function setSurveyPageError(){}
  function setRibbonTexts(respObj){$("section.gbl_main-content:first").append('<div style="display: block;" class="survey-ribbon" id="floatDiv"><div class="row">'+'<div class="col-xs-2"><img src="" id="rbnImage"></div><div class="col-xs-10 gbl_text-white text-block">'+'<h3 class="m0" id="rbnHeadText"></h3><div class="quick-survey-text" id="rbnBodyText"></div>'+'<a href="javascript:void(0)" class="gbl_hover-no-underline gbl_bold mt5 ml10 mr20 pull-right btn-no-thanks" id="rbnLinkText"></a>'+'<a href="javascript:void(0)" class="btn gbl_small-button-purple pull-right" id="rbnBtnText"></a></div></div></div>');$("#rbnImage").attr('src',respObj.rbnImage);$("#rbnHeadText").text(respObj.rbnHeadText);$("#rbnBodyText").text(respObj.rbnBodyText);$("#rbnLinkText").text(respObj.rbnLinkText);$("#rbnBtnText").text(respObj.rbnBtnText);$(window).scroll(function(){if($(window).scrollTop()+$(window).height()>$(document).height()-($(".co_footer").height()+50)){if($('#surveyLink').length||$('#floatDiv').hasClass('taken')){$('#floatDiv').fadeOut();}else{$('#floatDiv').fadeIn();}}else{$('#floatDiv').fadeOut();}});if($('#floatDiv').length){$('.btn-no-thanks').click(function(){$('#floatDiv').addClass('hide');});}
  $('#rbnBtnText').click(function(){window.open(surveyUrl,'Survey','status=1,toolbar=1,scrollbars=1');$('#floatDiv').addClass('hide');});}
  function setPopupTexts(respObj){$("section.gbl_main-content:first").append('<div style="display: block;" class="modal fade in" id="survey-modal" data-backdrop="static" tabindex="-1" role="dialog" aria-hidden="true">'+'<div class="modal-dialog ml5-xs pl5-xs pl15"><div class="modal-content"><div class="modal-body pb0 pt0"><div class="row text-right pb10">'+'<button class="gbl_btn-close" data-dismiss="modal" aria-hidden="true" id="popCloseText"></button></div>'+'<div class="row pl20"><div class="col-xs-6"><h1 class="pt30" id="popHeadText"></h1>'+'<h3 class="gbl_gray2 survey-info" id="popBodyText"></h3><div class="row pt30"><div class="col-xs-10">'+'<button class="gbl_big-button-orange gbl_full-width" id="popBtnText"></button><div class="pt10 mb40 text-center">'+'<a href="javascript:void(0)" class="gbl_bold gbl_hover-no-underline" data-dismiss="modal" id="popLinkText"></a>'+'<a href="javascript:void(0)" class="gbl_bold gbl_hover-no-underline ml30 hide" data-dismiss="modal" id="popMaybeText"></a>'+'</div></div></div></div><div class="col-xs-6"><img src="" alt="" class="img-responsive survey-idol" id="popImage"></div>'+'</div></div></div></div></div>');$("#popImage").attr('src',respObj.popImage);$("#popCloseText").text(respObj.popCloseText);$("#popHeadText").text(respObj.popHeadText);$("#popBodyText").text(respObj.popBodyText);$("#popBtnText").text(respObj.popBtnText);$("#popLinkText").text(respObj.popLinkText);if(respObj.surveyType==='B'){$("#popMaybeText").text(respObj.popMaybeText);$("#popMaybeText").removeClass("hide");}
  $('#survey-modal').removeClass("hide");$('#popBtnText').click(function(){window.open(surveyUrl,'Survey','status=1,toolbar=1,scrollbars=1');$('#survey-modal').addClass('hide');});$("#popMaybeText").click(function(){$('#survey-modal').addClass('hide');setRibbonTexts(respObj);});$('#popCloseText, #popLinkText').click(function(){$('#survey-modal').addClass('hide');});}