<xen:include template="page_container_js_head" />
<xen:if is="{$xenOptions.ns_ca_on}">
<script>
var nsCollapse = "nsCollapsed";
var nsCollapseEffect = {'up':{'speed':{$xenOptions.ns_ca_close_speed},'style':'{$xenOptions.ns_ca_close_effect}'},'down':{'speed':{$xenOptions.ns_ca_open_speed},'style':'{$xenOptions.ns_ca_open_effect}'}};
var nsCollapseState= {'open':'<i class="{$xenOptions.ns_ca_close}"></i>','close':'<i class="{$xenOptions.ns_ca_open}"></i>'};
var COOKIE_NAME = 'nessien';
var ckvalue = $.getCookie(COOKIE_NAME);
var ck = ckvalue ? ckvalue.split(",") : [];
function __onLoad() {
cknum = ck.length;
for (var a = 0; a < ck.length; a++) {
$("#" + ck[a]).toggleClass(nsCollapse).html(nsCollapseState.close).parent().parent().next().hide()
}
}
function __toggle(e, d) {
var b = $(e).attr("id");
switch (d) {
case "collapse":
var a = $(e).parent().parent().next();
var c = $(a).is(":visible");
$(e).html((c) ? nsCollapseState.close : nsCollapseState.open);
if (!c) {
$(e).toggleClass(nsCollapse);
$(a).slideDown(nsCollapseEffect.down.speed, nsCollapseEffect.down.style)
} else {
$(e).toggleClass(nsCollapse);
$(a).slideUp(nsCollapseEffect.up.speed, nsCollapseEffect.up.style)
}
$.setCookie(COOKIE_NAME, (function () {
switch (c) {
case true:
ck.push(b);
break;
case false:
ck = jQuery.grep(ck, function (f) {
return f != b
});
break
}
return ck.join(",")
})());
break
}
}
$(document).ready(function () {
__onLoad();
$("a.CAColor").click(function () {
__toggle(this, "collapse");
return false
})
});
</script>
</xen:if>