/*!
 * Newsletter trees checker With jQuery JavaScript Library v1.4.3
 *
 * Copyright 2010, FT Sun s.r.o.
 * http://www.ftsun.cz/
 *
 * Autor: Václav Fiala [cheezell@gmail.com]
 *
 * Date: 27-10-10 12:46
 */

// folder
function makeCheckedValuesFolder(obj) {
  var newValue = $(obj).attr("checked");
  $(obj).parent().next().next().find("input[type=checkbox]").attr("checked", newValue);
}

function makeCheckedValuesParam(obj) {
  var newValue = $(obj).attr("checked");
}

function makeCheckedValuesSpecialParam(obj) {
  var newValue = $(obj).attr("checked");
  c = $(obj).parent().attr("class")
  if(c.indexOf("paramPar0") != "-1") { // first special
    if(c.indexOf("js_new") != "-1") { // novinky
      $(obj).parent().parent().find(".js_new input[type=checkbox]").attr("checked", newValue);
    }
    if(c.indexOf("js_poz") != "-1") { // pozvánky
      $(obj).parent().parent().find(".js_poz input[type=checkbox]").attr("checked", newValue);
    }
    if(c.indexOf("js_mag") != "-1") { // internetový časopis
      $(obj).parent().parent().find(".js_mag input[type=checkbox]").attr("checked", newValue);
    }
    if(c.indexOf("js_vse") != "-1") { // vse
      $(obj).parent().parent().find("input[type=checkbox]").attr("checked", newValue);
    }
  }
  else { // other special
    if(c.indexOf("js_vse") != "-1") { // vse
      $(obj).parent().parent().find("input[type=checkbox]").attr("checked", newValue);
    }
  }
}
