

(function() {
    
    $.fn.inquiry = function() {
        
        var _self = $(this);
        var regexp = new RegExp('\\?(.*)$');

        $('a',_self).click(function(){
            
            $.ajax({
                type: 'GET',
                url: '/ajax/anketa/hlas/',
                dataType: 'html',
                data: $(this)[0].href.match(regexp)[1]+'&view=XSLT',

                success: function(val) {
                    var obj = $(val);
                    
                    _self.empty();
                    _self.append(obj);
                    _self.inquiry();
                }
            });
            
            return false;
            
        });
    }
    
}) (jQuery);


