$(document).ready(function() { //The clean way. var build_link = function(rel,href, bodystr,divstr) { return ' '+bodystr+'  '+divstr; } var str = ""; var bodystr = ""; var divstr = ""; var orderStatus = " ";//need empty space for minicart link. orderStatus+='Mon panier: '; bodystr+='???home.header.mycart???'; bodystr+=orderStatus; bodystr+="0 articles -"; bodystr+='0,00 €'; bodystr+=''; str += build_link('http://www1.lexmark.com/FR/fr/common/include/minicart.jsp?allproducts=null','http://www1.lexmark.com/FR/fr/cart/cart.jsp',bodystr,divstr); if(str == 'null' || str == ''){ $('#cart-ul').hide(); } else { $('#cart-ul').html(str); } var build_link2 = function(href, str2) { return '
  • '+str2+'
  • '; } var build_oth = function(msg) { return '
  • '+msg+'
  • '; } var str2 = ""; str2 += build_link2("http://www1.lexmark.com/FR/fr/login/ssolandingpage.jsp","Se connecter"); str2 += build_link2("http://www1.lexmark.com/FR/fr/account/accountsummary.jsp","Mon compte"); str2 += build_link2("http://www1.lexmark.com/FR/fr/search/trackorder.jsp","Etat des commandes"); str2 += build_link2("http://www1.lexmark.com/fr_FR/orders/order-help.shtml","Aide sur vos commandes"); if(str2 == 'null' || str2 == ''){ $('#header-ul').hide(); } else { $('#header-ul').html(str2); } var count = 0; var build_link3 = function(href,localeValue,str3,selectedLocale) { if (count == 0){ if(localeValue == selectedLocale){ return ''+str3+''; }else{ return ' '+str3+' '; } }else{ if(localeValue == selectedLocale){ return '| '+str3+''; }else{ return ' | '+str3+' '; } } } var str3 = ""; var str5 = ""; str5+='
    '; str5+=''; str5+=''; str5+=''; str5+='
    '; if(str3 == 'null' || str3 == ''){ $('#country-language').hide(); } else { $('#country-language').html(str3); } var str4 = ""; if(str4 == 'null' || str4 == ''){ $('#pencil').hide(); } else { $('#pencil-unit').html(str4); } if(str5 == 'null' || str5 == ''){ $('#logout-form').hide(); } else { $('#logout-form').html(str5); } },1);