Save checkbox status in one cookie
<p>I have this code:</p>

<pre><code>$("input.box[type=checkbox]").each(function() {
    var name = $(this).attr('name');
    if ($.cookie(name) &amp;&amp; $.cookie(name) == "true") {
        $(this).prop('checked', $.cookie(name));
    }
});

$("input.box[type=checkbox]").change(function() {
    var name = $(this).attr("name");
    $.cookie(name, $(this).prop('checked'), {
        path: '/',
        expires: 365
    });
});
</code></pre>

<p>and html:</p>

<pre><code>&lt;input type="checkbox" name="smth1" /&gt;something1&lt;br /&gt;
&lt;input type="checkbox" name="smth2" /&gt;something2&lt;br /&gt;
&lt;input type="checkbox" name="smth3" /&gt;something3&lt;br /&gt;
&lt;input type="checkbox" name="smth4" /&gt;something4&lt;br /&gt;

&lt;br /&gt;

&lt;input type="checkbox" name="anthr1" /&gt;anotherthing1&lt;br /&gt;
&lt;input type="checkbox" name="anthr2" /&gt;anotherthing2&lt;br /&gt;
&lt;input type="checkbox" name="anthr3" /&gt;anotherthing3&lt;br /&gt;
&lt;input type="checkbox" name="anthr4" /&gt;anotherthing4&lt;br /&gt;

&lt;br /&gt;

&lt;input type="checkbox" name="new1" /&gt;newthing1&lt;br /&gt;
&lt;input type="checkbox" name="new2" /&gt;newthing2&lt;br /&gt;
&lt;input type="checkbox" name="new3" /&gt;newthing3&lt;br /&gt;
&lt;input type="checkbox" name="new4" /&gt;newthing4&lt;br /&gt;

etc etc
</code></pre>

<p>This makes cookie for every checkbox. What I want to do is save checkboxes status  in only one cookie. I'd appreciate your help! Thanks!</p>