//--------------------------------------------------------------------------------------------------------- Your Custom JS Functions Here -------
/* check domain if need to add www. */
/* if your domain is like www.inchol.com.cn, then should do it.
   user may link to inchol.com.cn, in this case, ajax loading area will not display.
   need to change location to www.inchol.com.cn
   change 'inchol.com.cn' to your domain, with out www*/
//function CheckWWWForDomain()
//{
//    var loc = window.location.href;
//    var param = /^inchol\.com\.cn/;
//    if(param.test(window.location.host))
//    {
//        window.location = loc.replace(window.location.host.toLowerCase(), 'www.' + window.location.host.toLowerCase());
//    }
//}
//CheckWWWForDomain();

/* inchol.com redirect to www.inchol.com */
function CheckHttpsDomain()
{
    var loc = window.location.href;
    if(window.location.href.toLowerCase().indexOf('check-out') >= 0)
        return;
    var param = /^https/gi;
    if(param.test(loc ))
    {
        window.location = loc.replace('https', 'http').replace(':3681', '');
    }
}
//CheckHttpsDomain();




function changeMenuStyle(id,type)
{
   if(type==0)
      $(id).addClass("current");
   else
      $(id).removeClass("current");

}


function changeMenuStyle2(id,type)
{
   if(type==0)
      $(id).addClass("scurrent");
   else
      $(id).removeClass("scurrent");

}

function changeMenuStyle3(id,type)
{
   if(type==0)
      $(id).addClass("Center_current");
   else
      $(id).removeClass("Center_current");
}

function changeMenuStyle4(id,type)
{
   if(type==0)
      $(id).addClass("SCenter_current");
   else
      $(id).removeClass("SCenter_current");
}

function changeMenuStyle5(id,type)
{
   if(type==0)
      $(id).addClass("SSCenter_current");
   else
      $(id).removeClass("SSCenter_current");
}







