/* www /_static/scripts/selection.js */
var _selection={url:{dot:"/_front/_ajax/account/selection/",toggle:"/_front/_ajax/account/selection/toggle/",remove:"/_front/_ajax/account/selection/remove/"},init:function(){if(_index.checkConnected())
{$.getJSON(_selection.url.dot,function(i_arr){for(var n_rnk in i_arr)
{$(".toggle_selection[value='"+i_arr[n_rnk]+"']").each(function(){this.checked=true;});}});}
$(".toggle_selection").bind('click',function(){if(_index.checkConnected())
{_selection.last_toggled=this;$.post(_selection.url.toggle,{_code:this.value},function(i_strFeedBack){switch(i_strFeedBack)
{case'added':$(_selection.last_toggled).parent().parent().parent().parent().effect('transfer',{to:'#link_account_selection',className:'ui-effects-transfer'},500);break;case'removed':break;}});return true;}
else
{return false;}});},remove:function(i_strCode){$.post(_selection.url.remove,"_code="+i_strCode,function(){window.location.reload();});}};_selection.init();
