
jQuery.fn.Shake = function(){ 
    this.each(function(init){ 
         var jqNode = $(this); 
         jqNode.css({position: 'relative'}); 
         for (var x = 1; x <= 3; x++){ 
             if ($.browser.msie) {
              jqNode.animate({ left: 5 },2) 
              .animate({ left: -5 },2) 
              .animate({ left: 5 },2)
              .animate({ left: -5 },2)
              .animate({ left: 5 },2) 
              .animate({ left: -5 },2)
              .animate({ left: 0 },2) 
              .animate({ left: -5 },2) 
              .animate({ left: 5 },2)
              .animate({ left: -5 },2)
              .animate({ left: 5 },2) 
              .animate({ left: -5 },2)
              .animate({ left: 0 },2)  ; 
             }else{
        	 jqNode.animate({ left: 5 },2) 
                 .animate({ left: -5 },2) 
                 .animate({ left: 5 },2)
                 .animate({ left: -5 },2)
                 .animate({ left: 5 },2) 
                 .animate({ left: -5 },2)
                 .animate({ left: 0 },2) 
                 .animate({ left: -5 },2) 
                 .animate({ left: 5 },2)
                 .animate({ left: 0 },2);
             }
              
         } 
    }); 
return this; 
}

function setFakeTurnStatus(area,text){
    $('#'+area).html(text).fadeIn(1000);
}

function keyifliUserControl(Area,Process){
    switch (Process) {
        case "Ofline":
    		var message = $("#OflineMessageText").val();
    		var process = $("#OflineProcess").val();
    		var userId = $("#OnlineUser").val();
    		break;
    	
        case "Online":
		var message = $("#onlineMessageText").val();
    		var process = $("#OnlineProcess").val();
    		var userId = $("#OnlineUser").val();
            break;
        	
        default:
    		break;
        }
    xajax_Keyifli_UserProcess_Save(userId,process,message);
    
}

function Message_Response_Status(Text) {
    
    $('#responseStatus').html(Text).fadeIn(5500, function() {
	$('#responseStatus').fadeOut(5500, function() {
	    $('#responseStatus').html('');
	    $('#responseStatus').fadeIn();

	});
    })
    
}


function getLocationIP(Area){
    var text = $("#"+Area+" option:selected").text()
    var start = text.indexOf("-") + 1;
    var End =   text.indexOf("-",(start + 1));
    var IP = text.substr(start,End - start);
    IP = IP.replace(' ','');
    xajax_Keyifli_getLocationIP(IP);
}

var keyifli = true;