$(document).ready(function () { try { if ($.cookie('Jazeera-DefaultWeather') != null) { var cityid = getCookieString($.cookie("Jazeera-DefaultWeather"), "cid") var cityName = getCookieString($.cookie("Jazeera-DefaultWeather"), "cna") var CountryName = getCookieString($.cookie("Jazeera-DefaultWeather"), "cona") Getcityweatherbluestrip(cityid, cityName, CountryName); } else { Getcityweatherbluestrip("6639", "الدوحة", "قطر"); } } catch (e) { } }); // Get City Weather Blue Strip function Getcityweatherbluestrip(cityid, cityname, countryname) { if (cityid == "") return false; $.ajax({ url: "/Services/Getcitybluestripweather/" + cityid + "/" + encodeURI(cityname) + "/" +encodeURI( countryname) + "", type: 'GET', success: function (result) { if (result != '') { $("#bluestripweather").html(result); $("#bluestripweathermobile").html(result); $(".bluestripweather").show(); } }, error: function () { } }); } // Get Coockie Value function getCookieString(strcookie, strParam) { try { var Params var i i = 0 Params = unescape(strcookie).split("&") for (i = 0; i < Params.length; i++) { if (Params[i].indexOf(strParam) > -1) { var strendvalue = Params[i].substring(Params[i].indexOf("=") + 1, Params[i].length); // Params[i].split("=")[1] return strendvalue; } } } catch (e) { } }