﻿/* Last published: 16 Jun 2011 17:13 */

$(document).ready(function(){
    defaultSetting();
        

     $('.form_console_item_type_1 li').css('cursor', 'pointer');
     $("input[type='reset']").click(function() {
        defaultSetting();
        return false;
    })              
        

    $('li :checkbox').click(function() {
         var checkbox = $(this);
         checkCheckbox(checkbox)
    });
    $('.form_console_item_type_1 li').click(function() { 
            var checkbox = $(this).children(':checkbox');
            checkCheckbox(checkbox)
    });
    function checkCheckbox(checkbox) {
        if ((checkbox).is(':checked')) {      
                $(checkbox).attr('checked', false);
                $(checkbox).parents('.form_console_item_type_1 li').removeClass("hilite"); 
            } else if ((checkbox).not(':checked')) {
                $(checkbox).attr('checked', true);
                $(checkbox).parents('.form_console_item_type_1 li').addClass("hilite");
            }
    }

      $('div.pg_search_console li').hover(function() {
        $(this).addClass('searchHover');
      }, function() {
        $(this).removeClass('searchHover');
      });
         
});
 
function defaultSetting(){
     $('li :checkbox').removeAttr('checked');
     $('li :checkbox').parents("li").removeClass("hilite");
    }
