Changing $.cookie to localStorge