if(location.protocol.toLowerCase() =='http:' && 
               ( location.href.toLowerCase().indexOf('login') > -1 || 
         location.href.toLowerCase().indexOf('view+plans+and+prices') > -1  ))  
             location.href = location.href.replace('http:','https:');

    if(location.protocol.toLowerCase() =='https:' && 
         ( location.href.toLowerCase().indexOf('login') == -1 && 
         location.href.toLowerCase().indexOf('view+plans+and+prices') == -1  ))  
             location.href = location.href.replace('https:','http:');
