//
// NEW LOCALE SLIDE DOWN
//

var r = $.cookie('r'); // recommended website
var w = $.cookie('w'); // saved website

function showLocQ() {

    var parameters = "{'countryCode':'" + escape(r) + "'}";

    $.ajax({
        type: "POST",
        url: 'http://staging.skins.net/Services/LocaleQuestion.asmx/GetLocaleContent',
        data: parameters,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
        $('.IPdetection').html(msg.d);
        $('.IPdetection').slideDown('slow');
            
        },
        error: function(e) {
            //alert('failed to load locale menu');
        }
    });
}

function closeLocQ(save)
{
    if (save == true)
    {
        $.cookie('w', 'global', { path: '/' });
    }
    $('.IPdetection').slideUp('slow');
}

$(document).ready(function() {
    if (r != null && w == null) {
        setTimeout('showLocQ()', 3000);
    }
});
   
