jQuery.noConflict(); jQuery(document).ready(function () { if(window.location.href.indexOf('sim-only.jsf') != -1){ //jQuery(".recontract-button").hide(); //jQuery('div.action-items:nth-child(2) > span:nth-child(3)').hide(); } /*IE 9 fix for login with long names*/ var ies = window.document.getElementsByTagName('link'); jQuery(ies).each(function() { var iesrc = jQuery(this).attr('href'); // this is your href for the link tag in the loop if( iesrc.indexOf("ie9.css") != -1 || iesrc.indexOf("ie8.css") != -1 || iesrc.indexOf("ie7.css") != -1){ if (jQuery('#header-loginform .other-links').text().indexOf("Hello") != -1){ jQuery('#toolbar').css('padding-right','150px'); } } }); /* online benefits */ jQuery('#online-benefits-alt').hide(); function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; } function getCookie(c_name) { var c_value = document.cookie; var c_start = c_value.indexOf(" " + c_name + "="); if (c_start == -1) { c_start = c_value.indexOf(c_name + "="); } if (c_start == -1) { c_value = null; } else { c_start = c_value.indexOf("=", c_start) + 1; var c_end = c_value.indexOf(";", c_start); if (c_end == -1) { c_end = c_value.length; } c_value = unescape(c_value.substring(c_start,c_end)); } return c_value; } var obn = getCookie("online-benefits-new"); var oba = getCookie("online-benefits-alt"); if(obn=="hide"){ jQuery('#online-benefits-new').hide(); jQuery('#online-benefits-alt').show(); } if(oba=="hide"){ jQuery('#online-benefits-alt').hide(); jQuery('#online-benefits-new').show(); } jQuery('#online-benefits-new').click(function(e) { if(!jQuery(this).is(':hidden')){ jQuery('#online-benefits-alt').show(); setCookie("online-benefits-new","hide",1); setCookie("online-benefits-alt","show",1); jQuery(this).hide(); } }); jQuery('#online-benefits-alt').click(function(e) { if(!jQuery(this).is(':hidden')){ jQuery('#online-benefits-new').show(); setCookie("online-benefits-alt","hide",1); setCookie("online-benefits-new","show",1); jQuery(this).hide(); } }); /* online benefits */ /* custom link to generic shopper group*/ /**/ /*global leaderboard*/ if (jQuery('#header-loginform .other-links').text().indexOf("Hello") != -1) { jQuery('#toolbar').css('marginLeft','100px'); //jQuery('#global-leaderboard').append(""); } /*jQuery('#global-leaderboard').append("");*/ /*global leaderboard*/ /*UA*/ jQuery('a').bind('click', function (e) { var gaArr = new Array(); if(jQuery(this).attr('onclick') != null || jQuery(this).attr('onclick') != undefined){ var obj = jQuery(this).attr('onclick'); if(obj.indexOf('trackEvent') != -1) { var arr = obj.split(','); if(arr.length==4){ gaArr['category'] = cleanVal(arr[1]); gaArr['action'] = cleanVal(arr[2]); gaArr['opt_label'] = cleanVal(arr[3]); } ga('send','event', gaArr['category'], gaArr['action'], gaArr['opt_label']); } } function cleanVal(args){ _clean = args.match(/'(.*?)'/); return _clean[1]; } }); /*UA*/ /*roadshow jQuery('li.right_nav:nth-child(1) > ul:nth-child(2) > div:nth-child(2) > li:nth-child(1) > a:nth-child(1)').text('PC Show 2014'); jQuery('li.right_nav:nth-child(1) > ul:nth-child(2) > div:nth-child(2) > li:nth-child(1) > a:nth-child(1)').attr('href', 'https://www.singtelshop.com/pcshow2014'); jQuery('li.right_nav:nth-child(1) > ul:nth-child(2) > div:nth-child(2) > li:nth-child(2) > a:nth-child(1)').attr('href', 'https://www.singtelshop.com/pcshow2014?page=mobile'); if (window.location.href.indexOf('promotions.jsf') != -1) { window.location = "https://www.singtelshop.com/pcshow2014"; } /* old jQuery('ul.sub li a:eq(0)').text('ITSHOW2014'); jQuery('ul.sub li a:eq(0)').attr('href', 'https://www.singtelshop.com/itshow2014'); jQuery('ul.sub li a:eq(1)').attr('href', 'https://www.singtelshop.com/itshow2014?page=mobile'); if (window.location.href.indexOf('promotions.jsf') != -1) { window.location = "https://www.singtelshop.com/itshow2014"; } */ /*roadshow*/ //remove bill rebate 20140212 jQuery('div.g-tab-content:nth-child(2) > div:nth-child(3) > div:nth-child(4) > p:nth-child(2)').text('Call 1688 and speak to our Customer Service Officers from 8am to 10pm, Everyday.'); //jQuery(".submenu ul li:eq(4)").remove(); if(window.location.href.indexOf('billrebate') != -1){ window.location.href = "https://www.singtelshop.com/mobile"; } //remove bill rebate /*logo*/ //jQuery('#logo').html(''); //jQuery('.submenu').css('margin-top','-30px'); if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) { jQuery('.submenu').attr('style', 'margin-top: -7px !important'); } /*logo*/ /*delivery*/ if(window.location.href.indexOf('delivery.jsf') != -1){ jQuery('.warning').text('Payment will be processed using a NETS terminal provided by SingPost upon delivery and may have a later delivery date compared to other payment methods.'); //added 20140328 jQuery('div.content-footer:nth-child(3) > div:nth-child(2) > div:nth-child(2)').html('The delivery service is available from Monday to Friday
(excluding weekday public holidays) and within Singapore only.
Kindly note that once selected, delivery date and time selected cannot be changed

Frequently Asked Questions:


What happens if I missed the delivery?
What happens if I can\'t receive the delivery personally?'); jQuery('.inner > p:nth-child(3)').text('If you fail to receive the second delivery, you will have to pay SjQuery15.00 (inclusive of GST) for the third delivery. SingPost will collect this amount at the point of delivery.'); } /* delivery*/ if (window.location.href.indexOf('recon-info.jsf') != -1) { jQuery("
> Start shopping now if you are eligible to re-contract
").insertAfter('.reconTopBox'); } if (window.location.href.indexOf('select-accessories.jsf') != -1) { jQuery('#appleCarePlusNoteLine').html("Based on Apple's new terms and conditions, you will need to purchase AppleCare+ and iPhone together to be eligible. You will be automatically registered in the plan with this purchase of AppleCare+ and will not receive any AppleCare+ materials upon delivery.

"); } if(window.location.href.indexOf('order-summary.jsf') != -1){ if (jQuery('.sub-title-red').text().indexOf('SIM Only') == -1) { jQuery('div').each(function(){ if (jQuery(this).attr('id') && jQuery(this).attr('id').indexOf('form:tradein-voucher-panel') != -1) { jQuery(this).append('
Please speak to our Online Chat Agents from 9am to 11pm daily if you would like to use your existing SingTel voucher.
Only the following vouchers issued by SingTel are accepted:
- Premium 1500
- Premium
- iThree Plus
'); } }); } } jQuery('.best-deals-items-container-link').each(function(){ if(jQuery(this).text() =='Online Only Exclusive'){ jQuery(this).text('Online Only Offers'); } }); jQuery('.sub .box_center li a').each(function(){ if(jQuery(this).text().indexOf('Prepaid') != -1){ jQuery(this).html('Prepaid Top-up (New)'); } }); /*temp*/ if(window.location.href.indexOf('promotions.jsf') != -1){ jQuery('a').each(function(index, element) { if(jQuery(this).attr('href')!= null){ if(jQuery(this).attr('href').indexOf('srs-btv5') != -1){ jQuery(this).attr('href','http://www.sony.com.sg/product/srs-btv5'); } if(jQuery(this).attr('href').indexOf('srs-bts50') != -1){ jQuery(this).attr('href','http://www.sony.com.sg/product/srs-bts50'); } if(jQuery(this).attr('href').indexOf('srs-btx300') != -1){ jQuery(this).attr('href','http://www.sony.com.sg/product/srs-btx300'); } if(jQuery(this).attr('href').indexOf('vote') != -1){ jQuery(this).attr('href','https://www.singtelshop.com/moment'); } } }); } /*temp*/ jQuery("a").each(function(){ if(jQuery(this).attr('href') =="phones.jsf?deals=thirtydollaroff"){ jQuery(this).attr('href','phones.jsf?deals=9to9'); } }); jQuery('.shop-by-brands-container-item a').each(function(){ if(jQuery(this).attr('href') =="phones.jsf?brandId=247"){ jQuery(this).attr('href','phones.jsf?brandId=147'); } }); /*##################################################################################################### 20131121 - items necessary for new theme. 1. var stsgid - string variable for shopper groupd ID. 2. #global-leaderboard - div element for generic placeholders. */ jQuery("#submenuIphone").click(function (){ eshopGA.trackHeaderEvent('Navigation', 'iPhones'); }); /*add iphone to submenu*/ /*sub menu*/ jQuery('.submenu ul li a').each(function() { var page = window.location.href.substr(window.location.href.lastIndexOf("/") + 1); if(jQuery(this).attr("href") && page == jQuery(this).attr("href")){ jQuery(this).addClass('active'); jQuery(this).removeAttr('href'); } }); /*sub menu*/ /*#######################################################################################################*/ /*if(window.location.href.indexOf('iphones.jsf') != -1){ jQuery('.promo-details-popup p').each(function(){ jQuery(this).append('*While Stocks Last'); /*logo*/ /* if(window.location.href.indexOf('thank-you.jsf') == -1 && window.location.href.indexOf('customer-info.jsf') == -1 && window.location.href.indexOf('sponsor-info.jsf') == -1 && window.location.href.indexOf('delivery.jsf') == -1 && window.location.href.indexOf('payment.jsf') == -1){ jQuery('#app-menu').append(""); } */ if(window.location.href.indexOf('thank-you.jsf') != -1){ jQuery('.banner a').each(function() { if (jQuery(this).attr("href") && jQuery(this).attr("href").indexOf("http://www.appzone.singtel.com") != -1) { jQuery(this).hide(); } }); } /*shopper group j tnc*/ if(jQuery('#body-sub-title').text().indexOf('Congratulations! You have won FREE 2 months mobile subscription and jQuery30 OFF all 4G handsets') != -1){ jQuery('
Click here for a full list of Terms and Conditions for this promotion
').insertAfter('#bannerImage'); } /* shopper group j tnc*/ jQuery('#logo a').attr("target", "_parent"); /*added by chris 22 Jan 2013*/ /*marketing tags*/ jQuery(".spec-item-value").each(function () { if(jQuery(this).text() == 'Windows Phone 8'){ var google_conversion_id = 1014980459; var google_conversion_label = "PxLDCNXyygQQ67794wM"; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; jQuery("#app-body-content").append(''); } }); if(window.location.href.indexOf('thank-you.jsf') !=-1){ var google_conversion_id = 1014980459; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "VSv5CM3zygQQ67794wM"; var google_conversion_value = 0; jQuery("#app-body-content").append(' '); var ebRand = Math.random()+''; ebRand = ebRand * 1000000; jQuery('body').append("