// si-contact-form doens't use sql, so jsonp it will be 
jQuery(function(){
	jQuery('.post-footer a[href="http://www.lwvwv.org/contact"]').click(
		function(e) {
			e.preventDefault();
			var name = jQuery(this).text();
			jQuery(this).html('<img src="/images/ajax-loader.gif" />');
			author_contact(name);
		}

	);

});


function author_contact(author) {
        jQuery.ajax({
                        async: false,
                        dataType: "jsonp",
                        url: "http://www.lwvwv.org:8081/jaxer-service/lwvwv-user?search_type=" + author + "&jsoncallback=?",
                        error: function (XMLHttpRequest, textStatus, errorThrown) {

                        },
                        success: function(cvalue) {
                                        window.open("http://www.lwvwv.org/contact?si_contact_CID=" + cvalue.value,"_parent"); 
                                        },
                        jsonp: "jsoncallback",
                        cache: false
        });

}

