$(document).ready(function(){
                $(".changeStatus").click(function(){ 
                var id		=	$(this).attr("id");
                var status	=	$(this).attr("rel");
                $.ajax({
                        type: "GET",
                        url: GLOBAL_BASE_PATH+"/otpcountry/ajaxstatus/id/"+id+"/status/"+status+"",
                        success: function(msg){ 
                                location.reload();
                         }
                 });  			
        });


        $("#submitBulkStatus").click(function () {
                var ListAllCheckedCount = $(".ListAll:checked").size();
                var status = $('#select_status').val();
                if ($(".ListAll:checked").size() == 0) {
                        jAlert(msgSelectItem);
                        return false;
                } else if (status == "") {
                        jAlert(lblSelectAction);
                        return false;
                }
                if (status == 'D') {
                        jConfirm(msgDeleteItem, lblAlert, function (r) {
                                if (r == true) {
                                        $('#formList').submit();
                                }
                        });
                } else {
                        return true;
                }
                return false;
        });		
        $("#search").click(function () {
                if ($.trim($('#countryCodeID').val()) == "" && $.trim($('#countryCode').val()) == "" && $.trim($('#countryText').val()) == "" && $.trim($('#status').val()) == "") {
                        jAlert(msgSelectSearchCriteria);
                        return false;
                }
                return true;
        });


});

