// Delete received poke
jQuery(document).ready(function($) {

$(".delbutton").click(function(){
var element = $(this);
var del_id = element.attr("id");
var action="remove";
var info = 'pockid=' + del_id +'&action='+ action;
if(confirm("Sure you want to delete it? There is NO undo!"))
{
$.ajax({
type: "POST",
url: "index.php?option=com_community&view=profile",
data: info,
success: function(){
}
});
$(this).parents(".record")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});




// Multiple poke form
jQuery(document).ready(function($) {
$(".sendback_pokes").click(function(){


var element = $(this);
var Id = element.attr("id");

var replayid = $("#replayid"+Id).val();
var receiver = $("#receiver"+Id).val();
var isreplay = $("#isreplay"+Id).val();
var action = $("#action"+Id).val();
var dataString = 'replayid='+ replayid +'&receiver='+ receiver +'&isreplay='+ isreplay +'&action='+ action;


$("#loading"+Id).show();



$.ajax({
type: "POST",
data: dataString,
cache: false,
success: function(html){
$("#loadplace"+Id).append(html);
$("#loading"+Id).hide();
$("#greeting"+Id).hide();
$("#success"+Id).show();
}

});

return false;});});

// Single poke form below Avatar

jQuery(document).ready(function($) {
	$("#showpokes").css({"display" : "block"});	
	
// toggles the slickbox on clicking the noted link  
  $('a#slick-toggle').click(function() {
    $('div.slickbox').slideToggle("fast");
    return false;
  });

			
    $('form.submitForm').ajaxForm({
	target: '#poke_form_response',
    iframe: true,
    beforeSubmit: function() {
        $("#loading").show();
    },
    
    complete: function() {
		
		$("form.submitForm").slideUp("normal");
        $("#loading").hide();
	}
	});
}); 


// Linkselect plugin 
jQuery(document).ready(function($){$("select.linkselect").linkselect(); });
