( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/..//tmpr/../tmpr/..//tmpr/../js/mWall22082019.js
$(document).ready(function() 
{
   
  
  function loadingIn()
  {
   $('.dialog-background').css('display','block')  ;

  }
  function loadingOut()
  {
   $('.dialog-background').css('display','none')  ;
  
  } 

	


/*
		   //autoload comments 
loadingIn();  
var ID = $('.total').attr("id");	
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var me =  myaccount;
$('#liveupdate').load(mimiServer+"service/social/loadSocial2.php?push="+ID+"&catalogid5="+catalogid5+"&me="+me+"").fadeIn("slow");
loadingOut();
//end autoload

	 

*/

	
	 
$(".startCampaign").click(function() {
	 
	 
 
	 
	var form = $("#startCampaign");  

var formData = form.serialize();


	
 
 if($.trim($("#title").val()).length==0)
{
	
$("#check").html("Please Enter Title for the Campaign");


	
return;
}
 if($.trim($("#hashtag").val()).length==0)
{
	
$("#check").html("Please Enter Hashtag for the Campaign");	
	
return;
} 
 

 
loading_show();	

	var titleX = $("#title", form).val();
	var hashtagX = $("#hashtag", form).val();
	 
	  
var titleX = titleX.replace("#", "");
var hashtagX = hashtagX.replace("#", "");
 

     var themeidX = $("#themeid", form).val();	
	 
  var mythemeX = $("#mytheme", form).val();
  var catalogidX = $("#catalogid", form).val();
  var typeX = $("#type", form).val();

	 
									$.ajax({
									type: "GET",
									url: Server+"v/uploadParameters.php?campaign=yes&titleX="+titleX+"&hashtagX="+hashtagX+"&typeX="+typeX+"&descriptionX="+hashtagX+"&themeidX="+themeidX+"&mythemeX="+mythemeX+"&catalogidX="+catalogidX+"",
									data: formData,
									cache: false,
									success: function(html)
									{
										
									 $("#check").html(html);
									  window.location = "?mode=conversation&campaign=campaigns";	
									   
									loading_hide();
									
									
									  }
									 });
				

		
	 
	 
	});
	



	$(".editCampaign").click(function() {
	 
	 
 
	 
	var form = $("#editCampaign");  

var formData = form.serialize();


	
 
 if($.trim($("#title").val()).length==0)
{
	
$("#check").html("Please Enter Title for the Campaign");


	
return;
}
 if($.trim($("#hashtagX").val()).length==0)
{
	
$("#check").html("Please Enter Hashtag for the Campaign");	
	
return;
} 
 

 
loading_show();	

	var titleX = $("#title", form).val();
	var hashtagX = $("#hashtagX", form).val(); 
		
     var themeidX = $("#themeid", form).val();	
  var mythemeX = $("#mytheme", form).val();
  var catalogidX = $("#meX", form).val();
    var viewX = $("#view", form).val();
  var typeX = $("#type", form).val();

				
									$.ajax({
									type: "GET",
									url: Server+'v/uploadParameters.php?editcampaign=yes&titleX='+titleX+'&viewX='+viewX+'&hash='+hashtagX+'&typeX='+typeX+'&themeidX='+themeidX+'',
									data: formData,
									cache: false,
									success: function(html)
									{
										
									 $("#check").html(html);
									  window.location = "?mode=conversation&campaign=campaigns";	
									   
									loading_hide();
									
									
									  }
									 });
				

		
	 
	 
	});
	
function scrollToAnchor(aid){
    var aTag = $("a[name='"+ aid +"']");
    $('html,body').animate({scrollTop: aTag.offset().top},'slow');
}

 // commentopen 
$('.searchopen').live("click",function() 
{
	
	
var ID = $(this).attr("id");
$("#searchbox"+ID).slideToggle('fast');
$("#searcharea"+ID).focus();

/*$('.header-contX3').css('display', 'block');
	$('.header-contX2').css('margin-top', '-100px');*/
/*	$('.header-contX').css('margin-top', '-100px');*/
$('#nav2').css('margin-bottom', '-45px');

$('#slide-menu').css('left', '-100px');

return false;
});	
           
 // commentopen 
$('.uploadit').live("click",function() 
{
	
	
var ID = $(this).attr("id");
$("#imageloadbutton").slideToggle('fast');
$("#update_button").slideToggle('fast'); 

return false;
});	
 	    
 // commentopen 
$('.postopen').live("click",function() 
{
	
$("#postme").slideToggle('fast');
$("#update").focus();



return false;
});	
           
  
	   
		   
var auto_refresh = setInterval(
function ()
{
var ID = $('.total').attr("id");	
 
/*var catalogid5 = $("#catalogid5").val();
 
var me = $("#me").val();*/

	  var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();

 
 
/*var catalogid5 = $("#catalogid5").val();
var me = $("#me").val();*/ 

var catalogid5 = myaccount;
var me =  myaccount;
var catalogid5 = myaccount;
var me =  myaccount;
 var form = $("#notiForm");  
 var noti = $("#noti", form).val();	
 
/*$('#liveupdate').load("service/social/loadSocial2.php?push="+ID+"&catalogid5="+catalogid5+"&me="+me+"").fadeIn("slow");*/
$('#check').load(mimiServer+"service/social/loadSocial2.php?AppNo="+AppNo+"&check="+ID+"&noti=2&catalogid5="+catalogid5+"&me="+me+"").fadeIn("slow");
}, 80000);



	
$('.reload').live("click",function() 
{
loading_show();
var ID = $(this).attr("id");
  
/* var catalogid5 = $("#catalogid5").val();
 
var me = $("#me").val();*/
	  var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();

 
 
/*var catalogid5 = $("#catalogid5").val();
var me = $("#me").val();*/ 

var catalogid5 = myaccount;
var me =  myaccount;
 var form = $("#notiForm");  
 var noti = $("#noti", form).val();	 

$('#liveupdate').load(mimiServer+"service/social/loadSocial2.php?AppNo="+AppNo+"&push="+ID+"&noti="+noti+"&catalogid5="+catalogid5+"&me="+me+"").fadeIn("slow");
 
loading_hide();
 $('#check').fadeOut("slow");
 
});




$("a.topLink").click(function() {
		$("html, body").animate({
			scrollTop: $($(this).attr("href")).offset().top + "px"
		}, {
			duration: 500,
			easing: "swing"
		});
		return false;
	});

 	
	


	

$("a.timeago").livequery(function () { $(this).timeago(); });
$("div.stcommenttime").livequery(function () { $(this).timeago(); });
$(".stdelete2").livequery(function () { $(this).tipsy({gravity: 's'}); });    
$(".stdelete").livequery(function () { $(this).tipsy({gravity: 's'}); });
$(".stcommentdelete").livequery(function () { $(this).tipsy({gravity: 's'}); });
 
$("#camera").livequery(function () { $(this).tipsy({gravity: 'n'}); });
$("#webcam_button").livequery(function () { $(this).tipsy({gravity: 'n'}); });

 
  
 
// Update Status
$(".update_button").click(function() 
{

var updateval = $("#update").val();

 
var updateval = updateval.replace("'", "`");
var updateval = updateval.replace('"', '`'); 

	
/*var updateval= encodeURI(updateval);
*/var uploadvalues=$("#uploadvalues").val();

 



  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var nani = $("#nani").val();
var newnani = $("#newnani").val();var newnaniCheck = $("#newnani").val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');
var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }  

if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,

cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
/*localStorage.setItem('updatevalEarlier', updatevalEarlier);*/

var mytheme = $("#mytheme", form2).val();
var newtheme = $("#newtheme", form2).val();
var fx = $("#fx", form2).val();
 
var themeid = $("#themeid").val();

/*alert(newtheme);return;*/
				if($.trim(newtheme).length==0)
				{
				var mytheme = "*"+mytheme;
				var updateval = mytheme+" "+updateval;
				
				if (localStorage["oldSelected"]) {
 var  oldSelected =localStorage.getItem("oldSelected");
 var picsVars = "&newCollage=1&pics="+oldSelected+"";
 
}
else
{
	 var picsVars = "";
}
			
				if($.trim(fx).length==0) {var fx = "";} else {var fx = "&fx="+fx+""; var effect="machine";   }  
				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  }  
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/
/*	 $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/	
				/*$("#testme").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani);return;*/
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/
										
									  if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php"; }	
									 $("#live").html(html);
										
									 

			/*$('#photo_preview2').show();
		 	$('#photo_preview2 .ptitle').html("ssssssssssssssss");*/
			/*							
				$('#photo_preview2 .pleft').html('<iframe style="border: 0px; " src="m/post" width="100%" height="100%"></iframe>');						
										
 						return;*/
										
										
										
									 window.location = "m/post"; /*window.location = "index.php?showPic=1";*/
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										window.localStorage.removeItem('oldSelected');
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
				
				
				}
				else
				{
				var realtheme = $("#realtheme").val();
				var newtheme = $("#newtheme").val();
				var mytheme = "*"+realtheme+" *"+newtheme;
				var updateval = mytheme+" "+updateval;	
				
				var fx = $("#fx").val();
				if($.trim(fx).length==0)
				{ 
				var fx = "";
				}
				else
				{
					var fx = "&fx="+fx+"";
				}

				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  } 
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"");return;		*/		
									
								
									 
									
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										window.location = "index.php";
									if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php?showPic=1"; }	
									 $("#live").html(html);
									   
										  
										  
										  
										
	    
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
					}








  
  /*   $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+ updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"");  
return;	 
*/
   

 
  
  
  }

}

/*var A=$.trim($("#updateval").val());
	var dataString = 'TwitterMessage='+ A ;
	$.ajax({
	type: "POST",
	url: "twitter/TwitterUpdate.php",
	data: dataString,
	cache: false,
	beforeSend: function()
	{
	$("#check").val("Posting to Twitter...");
	}, 
	success: function(data)
	{	
	$("#check").html('<a class="icon-twitter" > </a> Posted to Twitter');
	}
	});*/

	
	
return false;
	});
	
	 
	
	
 


  // Update Status
$(".download_button_hashbrand").click(function() 
{var updateval = $("#update").val();

 
var updateval = updateval.replace("'", "`");
var updateval = updateval.replace('"', '`'); 

	
/*var updateval= encodeURI(updateval);
*/var uploadvalues=$("#uploadvalues").val();

 



  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var nani = $("#nani").val();
var newnani = $("#newnani").val();var newnaniCheck = $("#newnani").val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');
var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }  

if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,

cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
/*localStorage.setItem('updatevalEarlier', updatevalEarlier);*/

var mytheme = $("#newthemeX", form2).val();
var newtheme = $("#newthemeX", form2).val();
var fx = $("#fx", form2).val();
var convoId = $("#convoIdX").val();  
var themeMe = $("#themeMe").val();
 
 
				if($.trim(newtheme).length==0)
				{
				var mytheme = "*machine";
				var updateval = mytheme+" "+updateval;
				
				if (localStorage["oldSelected"]) {
 var  oldSelected =localStorage.getItem("oldSelected");
 var picsVars = "&newCollage=1&pics="+oldSelected+"";
 
}
else
{
	 var picsVars = "";
}
			
				if($.trim(fx).length==0) {var fx = "";} else {var fx = "&fx="+fx+""; var effect="machine";   }  
				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  }  
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/
/*	 $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/	
			/*	$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&convoId="+ convoId+"&filter=mood&output=1&download=1"+newnani+"&nani="+ nani+"");return;*/
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeMe+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&convoId="+ convoId+"&filter=mood&output=1&download=1"+newnani+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1&download=1"+newnani+"&nani="+ nani+"");return;
							*/			
									 $("#live").html('<img src="taswira.php?width=600&quality=100&image=/v/uploads/raw/'+html+'" width="100%"  /> ');
				window.location = "download.php?output="+html;
									
									
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										window.localStorage.removeItem('oldSelected');
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
				
				
				}
				else
				{
				var realtheme = $("#realtheme").val();
				var newtheme = $("#newtheme").val();
				var mytheme = "*"+realtheme+" *"+newtheme;
				var updateval = mytheme+" "+updateval;	
				
				var fx = $("#fx").val();
				if($.trim(fx).length==0)
				{ 
				var fx = "";
				}
				else
				{
					var fx = "&fx="+fx+"";
				}

				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  } 
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"");return;		*/		
									
								
									 
									
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										window.location = "index.php";
									if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php?showPic=1"; }	
									 $("#live").html(html);
									   
										  
										  
										  
										
	    
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
					}






 
  
  
  }

}
	
	
return false;


 	});
 
// Update Status
$(".download_button").click(function() 
{

var updateval = $("#update").val();

 
var updateval = updateval.replace("'", "`");
var updateval = updateval.replace('"', '`'); 

	
/*var updateval= encodeURI(updateval);
*/var uploadvalues=$("#uploadvalues").val();

 



  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var nani = $("#nani").val();
var newnani = $("#newnani").val();var newnaniCheck = $("#newnani").val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');
var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }  

if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,

cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
/*localStorage.setItem('updatevalEarlier', updatevalEarlier);*/

var mytheme = $("#mytheme", form2).val();
var newtheme = $("#newtheme", form2).val();
var fx = $("#fx", form2).val();
 
var themeid = $("#themeid").val();

/*alert(newtheme);return;*/
				if($.trim(newtheme).length==0)
				{
				var mytheme = "*"+mytheme;
				var updateval = mytheme+" "+updateval;
				
				if (localStorage["oldSelected"]) {
 var  oldSelected =localStorage.getItem("oldSelected");
 var picsVars = "&newCollage=1&pics="+oldSelected+"";
 
}
else
{
	 var picsVars = "";
}
			
				if($.trim(fx).length==0) {var fx = "";} else {var fx = "&fx="+fx+""; var effect="machine";   }  
				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  }  
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/
/*	 $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/	
				/*$("#testme").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani);return;*/
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1&download=1"+newnani+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{/*$("#testme").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;
					*/					
					 $("#live").html('<img src="taswira.php?width=600&quality=100&image=/v/uploads/raw/'+html+'" width="100%"  /> ');
				window.location = "download.php?output="+html;
									
									 /*window.location = "index.php?showPic=1";*/
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										window.localStorage.removeItem('oldSelected');
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
				
				
				}
				else
				{
				var realtheme = $("#realtheme").val();
				var newtheme = $("#newtheme").val();
				var mytheme = "*"+realtheme+" *"+newtheme;
				var updateval = mytheme+" "+updateval;	
				
				var fx = $("#fx").val();
				if($.trim(fx).length==0)
				{ 
				var fx = "";
				}
				else
				{
					var fx = "&fx="+fx+"";
				}

				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  } 
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"");return;		*/		
									
								
									 
									
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										window.location = "index.php";
									if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php?showPic=1"; }	
									 $("#live").html(html);
									   
										  
										  
										  
										
	    
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
					}








  
  /*   $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+ updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"");  
return;	 
*/
   

 
  
  
  }

}

/*var A=$.trim($("#updateval").val());
	var dataString = 'TwitterMessage='+ A ;
	$.ajax({
	type: "POST",
	url: "twitter/TwitterUpdate.php",
	data: dataString,
	cache: false,
	beforeSend: function()
	{
	$("#check").val("Posting to Twitter...");
	}, 
	success: function(data)
	{	
	$("#check").html('<a class="icon-twitter" > </a> Posted to Twitter');
	}
	});*/

	
	
return false;
	});
// Update Status
$(".update_button_hash").click(function() 
{

 
var updateval = $("#update").val();
var updateval = updateval.replace("'", "`");
var updateval = updateval.replace('"', '`'); 

	
/*var updateval= encodeURI(updateval);
*/
var uploadvalues=$("#uploadvalues").val();


  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');


if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,
cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
localStorage.setItem('updatevalEarlier', updatevalEarlier);
var convoId = $("#convoId").val();  
var mytheme = $("#mytheme", form2).val();
var newtheme = $("#newtheme", form2).val();
var fx = $("#fx", form2).val();
 
var themeid = $("#themeid").val();

/*alert(newtheme);return;*/
				if($.trim(newtheme).length==0)
				{
				var mytheme = "*"+mytheme;
				var updateval = mytheme+" "+updateval;
				
				if($.trim(fx).length==0) {var fx = "";} else {var fx = "&fx="+fx+""; var effect="machine";   } 
				
				var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }   

	/* $("#check").html(Server+"brandX.php?AppNo="+AppNo+""+postPicture+"&convoId="+ convoId+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+"&filter=mood&output=1&nani="+ myaccount+"");return;
		*/		
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+""+postPicture+"&convoId="+ convoId+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+"&filter=mood&output=1&nani="+ myaccount+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										
									 $("#live").html(html);
									   
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  window.location = "index.php";
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
				
				
				}
				else
				{
				var realtheme = $("#realtheme").val();
				var newtheme = $("#newtheme").val();
				var mytheme = "*"+realtheme+" *"+newtheme;
				var updateval = mytheme+" "+updateval;	
				
				var fx = $("#fx").val();
				if($.trim(fx).length==0)
				{ 
				var fx = "";
				}
				else
				{
					var fx = "&fx="+fx+"";
				}
var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }   


/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+""+postPicture+"&convoId="+ convoId+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"");return;				
*/									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+""+postPicture+"&convoId="+ convoId+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										
									 $("#live").html(html);
									   
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  window.location = "index.php";
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
					}








  
  /*   $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+ updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"");  
return;	 
*/
   

 
  
  
  }

}

/*var A=$.trim($("#updateval").val());
	var dataString = 'TwitterMessage='+ A ;
	$.ajax({
	type: "POST",
	url: "twitter/TwitterUpdate.php",
	data: dataString,
	cache: false,
	beforeSend: function()
	{
	$("#check").val("Posting to Twitter...");
	}, 
	success: function(data)
	{	
	$("#check").html('<a class="icon-twitter" > </a> Posted to Twitter');
	}
	});*/

	
	
return false;
	});
	
	
	// Update Status
$(".update_button_hashbrand").click(function() 
{

var updateval = $("#update").val();

 
var updateval = updateval.replace("'", "`");
var updateval = updateval.replace('"', '`'); 

	
/*var updateval= encodeURI(updateval);
*/var uploadvalues=$("#uploadvalues").val();

 



  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var nani = $("#nani").val();
var newnani = $("#newnani").val();var newnaniCheck = $("#newnani").val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');
var postPicture = $("#postPicture").val();
if($.trim(postPicture).length==0) {var postPicture = "";} else {var postPicture = "&newPic="+postPicture+"";  }  

if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,

cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
/*localStorage.setItem('updatevalEarlier', updatevalEarlier);*/

var mytheme = $("#newthemeX", form2).val();
var newtheme = $("#newthemeX", form2).val();
var fx = $("#fx", form2).val();
var convoId = $("#convoIdX").val();  
var themeid = $("#newthemeX").val();

/*alert(newtheme);return;*/
				if($.trim(newtheme).length==0)
				{
				var mytheme = "*machine";
				var updateval = mytheme+" "+updateval;
				
				if (localStorage["oldSelected"]) {
 var  oldSelected =localStorage.getItem("oldSelected");
 var picsVars = "&newCollage=1&pics="+oldSelected+"";
 
}
else
{
	 var picsVars = "";
}
			
				if($.trim(fx).length==0) {var fx = "";} else {var fx = "&fx="+fx+""; var effect="machine";   }  
				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  }  
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/
/*	 $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;*/	
		/*		$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&convoId="+ convoId+"&filter=mood&output=1"+newnani+"&nani="+ nani);return;*/
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&convoId="+ convoId+"&filter=mood&output=1"+newnani+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{/*$("#testme").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted"+fx+""+picsVars+""+postPicture+"&filter=mood&output=1"+newnani+"&nani="+ nani+"");return;
					*/					
									  if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php"; }	
									 $("#live").html(html);
									 window.location = "m/post"; /*window.location = "index.php?showPic=1";*/
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										window.localStorage.removeItem('oldSelected');
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
				
				
				}
				else
				{
				var realtheme = $("#realtheme").val();
				var newtheme = $("#newtheme").val();
				var mytheme = "*"+realtheme+" *"+newtheme;
				var updateval = mytheme+" "+updateval;	
				
				var fx = $("#fx").val();
				if($.trim(fx).length==0)
				{ 
				var fx = "";
				}
				else
				{
					var fx = "&fx="+fx+"";
				}

				if($.trim(newnani).length==0) {var newnani = "";} else {var newnani = "&newnani="+newnani+"";  } 
/*$("#check").html(Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"");return;		*/		
									
								
									 
									
									$.ajax({
									type: "POST",
									url: Server+"brandX.php?AppNo="+AppNo+"&theme_id="+themeid+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1"+newnani+""+postPicture+"&nani="+ nani+"",
									data: dataString,
									cache: false,
									success: function(html)
									{
										window.location = "index.php";
									if($.trim(newnaniCheck).length==0) {} else {window.location = "index.php?showPic=1"; }	
									 $("#live").html(html);
									   
										  
										  
										  
										
	    
										  $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
										  
										  
										  $('#done').css("display","none");	
									$('#view').css("display","block"); 
									  
									loading_hide();
									
									
									  }
									 });
				
					}






 
  
  
  }

}
	
	
return false;
	});
 
	
 $(".followme2").click(function() {
      
	  
	  var ID = $(this).attr("id");$("#fx").val(ID);
	
	    alert(ID);
	  

		
	});
	 
 
	 
// Update Status
$(".update_button2").click(function() 
{

 
var updateval = $("#update").val();

var uploadvalues=$("#uploadvalues").val();


  
var X=$('.preview').attr('id');
var Y=$('.webcam_preview').attr('id');
if(X)
var Z= X+','+uploadvalues;
else if(Y)
var Z= uploadvalues;
else
var Z=0;
var dataString = 'update='+ updateval+'&uploads='+Z;
if($.trim(updateval).length==0)
{
alert("Please Type Text");
}
else
{



loading_show();

 

 

var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
var catalogid5 = myaccount;
var picha=$('.theImage').attr('id');

if ( typeof picha !== 'undefined') {
	
 $("#preview").html();
$('#imageupload').slideUp('fast');	
	
	
	
	$.ajax({
type: "POST",
url: mimiServer+"service/social/message_ajax.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&picha="+picha+"&me="+myaccount+"",
data: dataString,
cache: false,
success: function(html)
{

$("#flash").fadeOut('slow');
$("#liveupdate").html(html);
$("#update").val('');	
$("#update").focus();
$('#preview').html('');
loading_hide();


  }
 });
	
	
	
	
	
	
	
	
loading_hide();	
}
else
{
	


$("#check").html("Posting, Please wait...");
var form2 = $("#postit"); 
var updatevalEarlier = updateval;
localStorage.setItem('updatevalEarlier', updatevalEarlier);
var mytheme = "*"+$("#mytheme", form2).val();
var convoId = $("#convoId", form2).val();

 var updateval = mytheme+" "+updateval;
  
/*  $("#check").html(Server+"brandX.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"&convoId="+ convoId+"");  
return;	
  
   


http://localhost/thebrand/brandX.php?mag=yes&theme_id=426&AppNo=254722407698&x=0&y=0&pic=00f6447b688bee6720e0585aae3f4a931boat.png&gratitude=posted&context=Santod%20*machine&filter=mood&overlay=0&nani=254722407698&execute=yes

*/ 

   
$.ajax({
type: "POST",
url: Server+"brandX.php?AppNo="+AppNo+"&catalogid5="+myaccount+"&me="+myaccount+"&context="+updateval+"&execute=yes&AppNo="+AppNo+"&mag=yes&gratitude=posted&filter=mood&output=1&nani="+ myaccount+"&convoId="+ convoId+"",
data: dataString,
cache: false,
success: function(html)
{
 	
 

   $("#live").html(html);

      $("#check").html('<a class="icon-ok" > </a> Published Successfully!');
	  window.location = "index.php";
	  $('#done').css("display","none");	
$('#view').css("display","block"); 
	  /*return;
	  window.location = "index.php";*/
  
/*$("#okay").html('<a class="icon-ok" > </a>');*/ 
 
/*$("#update").val('');	
$("#update").focus();*/
 
loading_hide();


  }
 });
 
  
  
  }

}

/*var A=$.trim($("#updateval").val());
	var dataString = 'TwitterMessage='+ A ;
	$.ajax({
	type: "POST",
	url: "twitter/TwitterUpdate.php",
	data: dataString,
	cache: false,
	beforeSend: function()
	{
	$("#check").val("Posting to Twitter...");
	}, 
	success: function(data)
	{	
	$("#check").html('<a class="icon-twitter" > </a> Posted to Twitter');
	}
	});*/

	
	
return false;
	});
	 	
//Commment Submit


$('.comment_button').live("click",function() 
{

var ID = $(this).attr("id");
 
var comment= $("#ctextarea"+ID).val();
var yanani= $("#yanani").val();
 var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
var dataString = 'comment='+ comment + '&yanani='+ yanani + '&msg_id=' + ID;

if($.trim(comment).length==0)
{
alert("Please Type Text");
}
else
{

$.ajax({
type: "POST",
url: mimiServer+"service/social/comment_ajax.php?AppNo="+AppNo+"&myaccount="+myaccount+"",
data: dataString,
cache: false,
success: function(html){

$("#commentExecute"+ID).append(html);
 scrollToAnchor("comments");

$("#ctextarea"+ID).val('');
$("#ctextarea"+ID).focus();

 scrollToAnchor("comments");

/*
	$('.header-contX3').css('display', 'block');
	$('.header-contX2').css('margin-top', '-100px');
	$('.header-contX').css('margin-top', '-100px');*/
$('#nav2').css('margin-bottom', '-45px');




 }
 });
}
return false;
});
// commentopen 
$('.commentopen').live("click",function() 
{
	
var ID = $(this).attr("id");
$("#commentbox"+ID).slideToggle('fast');
$("#ctextarea"+ID).focus();

     
return false;
});	




// tools
$('.tools').live("click",function() 
{
var ID = $(this).attr("id");
$("#interact"+ID).slideToggle('fast');
$("#personal"+ID).slideToggle('fast');


return false;
});	


// Add button
$('.albumaddbutton').live('click',function() 
{
 var themeid = $(this).attr("rel");
 
 var vid = $(this).attr("id");
var sid=vid.split("albumadd"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
 
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
 
$.ajax({
type: "POST",
url: mimiServer+"service/social/albumadd_ajax.php?myaccount="+myaccount+"&themeid="+themeid+"",
data: dataString,
cache: false,
beforeSend: function(){/*$("#friendstatus").html('<img src="service/social/icons/ajaxloader.gif"  />');*/ },
success: function(html)
{	
if(html)
{
	$("#check").html(html);

$("#friendstatus").html('');
$("#albumadd"+ID).hide();
$("#albumremove"+ID).show();
}
}
});
return false;
});



// Remove Friend
$('.albumremovebutton').live('click',function() 
{

var vid = $(this).attr("id");
var sid=vid.split("albumremove"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",
url: mimiServer+"service/social/albumremove_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){$("#friendstatus").html('<img src="icons/ajaxloader.gif"  />'); },
success: function(html)
{	
if(html)
{
$("#friendstatus").html('');
$("#albumremove"+ID).hide();
$("#albumadd"+ID).show();
}
}
});
return false;
});

// tools
$('.share').live("click",function() 
{
var ID = $(this).attr("id");
$("#share"+ID).slideToggle('fast');

return false;
});	

// Remove Friend
$('.shareremovebutton').live('click',function() 
{

var vid = $(this).attr("id");
var sid=vid.split("remove"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",
url: mimiServer+"service/social/shareremove_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){$("#friendstatus").html('<img src="icons/ajaxloader.gif"  />'); },
success: function(html)
{	
if(html)
{
$("#friendstatus").html('');
$("#remove"+ID).hide();
$("#add"+ID).show();
}
}
});
return false;
});



// Add button
$('.shareaddbutton').live('click',function() 
{
 var themeid = $(this).attr("rel");
 
 var vid = $(this).attr("id");
var sid=vid.split("add"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
 
$.ajax({
type: "POST",
url: mimiServer+"service/social/shareadd_ajax.php?myaccount="+myaccount+"&themeid="+themeid+"",
data: dataString,
cache: false,
beforeSend: function(){/*$("#friendstatus").html('<img src="service/social/icons/ajaxloader.gif"  />');*/ },
success: function(html)
{	
if(html)
{
	$("#check").html(html);

$("#friendstatus").html('');
$("#add"+ID).hide();
$("#remove"+ID).show();
}
}
});
return false;
});

// Add button
$('.sharePublic').live('click',function() 
{
 var themeid = $(this).attr("rel"); 
 var method = $(this).attr("title");

 //$("#doLogin",form).attr("disabled","disabled"); 
var form = $("#engineX");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();

var dataString = 'catalogid='+ myaccount ;
 

 
$.ajax({
type: "POST",
url: mimiServer+"service/social/public_ajax.php?myaccount="+myaccount+"&themeid="+themeid+"&method="+method+"",
data: dataString,
cache: false,
beforeSend: function(){ },
success: function(html)
{	
if(html)
{
	$("#check").html(html);


$("#addPublic"+myaccount).hide();
$("#removePublic"+myaccount).show();
}
}
});
return false;
});

// Add button
$('.addbutton').live('click',function() 
{
var vid = $(this).attr("id");
var sid=vid.split("add"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
 
$.ajax({
type: "POST",
url: mimiServer+"service/social/friendadd_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){/*$("#friendstatus").html('<img src="service/social/icons/ajaxloader.gif"  />');*/ },
success: function(html)
{	
if(html)
{
$("#friendstatus").html('');
$("#add"+ID).hide();
$("#remove"+ID).show();
}
}
});
return false;
});

// Remove Friend
$('.removebutton').live('click',function() 
{

var vid = $(this).attr("id");
var sid=vid.split("remove"); 
var ID=sid[1];
var dataString = 'fid='+ ID ;
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#meX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",
url: mimiServer+"service/social/friendremove_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){$("#friendstatus").html('<img src="icons/ajaxloader.gif"  />'); },
success: function(html)
{	
if(html)
{
$("#friendstatus").html('');
$("#remove"+ID).hide();
$("#add"+ID).show();
}
}
});
return false;
});


//WebCam 6 clicks
$(".camclick").live("click",function() 
{
var X=$("#webcam_count").val();
if(X)
var i=X;
else
var i=1;
var j=parseInt(i)+1; 
$("#webcam_count").val(j);

if(j>webcamtotal)
{
$(this).hide();
$("#webcam_count").val(1);
}

});

// delete comment
$('.stcommentdelete').live("click",function() 
{
var ID = $(this).attr("id");
var dataString = 'com_id='+ ID;
 var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();


$.ajax({
type: "POST",
url: mimiServer+"service/social/delete_comment_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){$("#stcommentbody"+ID).animate({'backgroundColor':'#fb6c6c'},300);},
success: function(html){
 $("#stcommentbody"+ID).slideUp('slow');

	/*$('.header-contX3').css('display', 'block');
	$('.header-contX2').css('margin-top', '-100px');
	$('.header-contX').css('margin-top', '-100px');*/
$('#nav2').css('margin-bottom', '-45px');



$("#stcommentbody"+ID).fadeOut(300,function(){$("#stcommentbody"+ID).remove();});
 }
 });

 
return false;
});




// Camera image
$('#camera').live("click",function() 
{
$('#webcam_container').slideUp('fast');
$('#imageupload').slideToggle('fast');
return false;
});

//Web Camera image
$('#webcam_button').live("click",function() 
{
$(".camclick").show();
$('#imageupload').slideUp('fast');
$('#webcam_container').slideToggle('fast');
return false;
});


$('#photoimg').live('change', function()			
{ 
 
 
$("#imageform").ajaxForm({target: '#preview'  }).submit();
$("#imageloadbutton").slideToggle('fast');
$("#update_button").slideToggle('fast'); 
 
});


// delete update
$('.stdelete').live("click",function() 
{
var ID = $(this).attr("id");
var dataString = 'msg_id='+ ID;

if(confirm("Do you want to Delete?"))
{
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",
url: mimiServer+"service/social/delete_message_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){ $("#stbody"+ID).animate({'backgroundColor':'#fc63c8'},300);},
success: function(html){
 $("#stbody"+ID).slideUp();
 $("#stbody"+ID).fadeOut(300,function(){$("#stbody"+ID).remove();});
 }
 });
}
return false;
});


// delete update
$('.stdelete2').live("click",function() 
{
var ID = $(this).attr("id");
var dataString = 'msg_id='+ ID;

if(confirm("Do you want to Delete?"))
{
var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",
url: mimiServer+"service/social/delete_repost_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
beforeSend: function(){ $("#stbody"+ID).animate({'backgroundColor':'#fc63c8'},300);},
success: function(html){
 $("#stbody"+ID).slideUp();
 $("#stbody"+ID).fadeOut(300,function(){$("#stbody"+ID).remove();});
 }
 });
}
return false;
});



// View all comments
$(".view_comments").live("click",function()  
{
var ID = $(this).attr("id");
 
 var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
$.ajax({
type: "POST",

url: mimiServer+"service/social/view_ajax.php?myaccount="+myaccount+"",
 
data: "msg_id="+ ID, 
cache: false,
success: function(html){
$("#commentload"+ID).html(html);

	/*$('.header-contX3').css('display', 'block');
	$('.header-contX2').css('margin-top', '-100px');
	$('.header-contX').css('margin-top', '-100px');*/
$('#nav2').css('margin-bottom', '-45px');



}
});
return false;
});




// Load More

$('.more').live("click",function() 
{

$("#thee").addClass("animated bounce");



var ID = $(this).attr("id");
if(ID)
{
	
 var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
 var meX = $("#meX", form).val();		
var youX = $("#youX", form).val(); 
 
var catalogid5 = myaccount;
var me =  myaccount;
var meX =  meX;
var youX =  youX;
 var form = $("#notiForm");  
 var noti = $("#noti", form).val();	
	 var searchme = $("#searchme", form).val();
	/*$("#check").html(mimiServer+"service/social/loadSocial2.php?AppNo="+AppNo+"&meX="+meX+"&youX="+youX+"&noti="+noti+"&searchme="+searchme+"&catalogid5="+catalogid5+"&me="+me+"&lastid="+ ID+""); */
$.ajax({
type: "POST",
url: mimiServer+"service/social/loadSocial2.php?AppNo="+AppNo+"&meX="+meX+"&youX="+youX+"&noti="+noti+"&searchme="+searchme+"&catalogid5="+catalogid5+"&me="+me+"",
data: "&lastid="+ ID, 
cache: true,
beforeSend: function(){
	$('.more').css('background-color', '#008cc0');
$("#navX").html('');
	loading_show();
	
	
},
success: function(html){

	
$("div#liveupdate").append(html);


 
	/*$('.header-contX3').css('display', 'block');
	$('.header-contX2').css('margin-top', '-100px');
	$('.header-contX').css('margin-top', '-100px');*/
$('#nav2').css('margin-bottom', '-45px');



$("#more"+ID).remove(); 
loading_hide();	
}
});

}
else
{
$("#more").html('The End');// no results
}


return false;
});



$("#searcharea1").keyup(function() 
{
	 
$("#trending").html('');
$("#homebar").html('');
$("#updatepanel").html(''); 
var searchbox = $(this).val();
var dataString = 'searchword='+ searchbox;
  var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();
var AppNo = $("#AppNoX", form).val();
  
  
  
if(searchbox.length>2)
{
loadingIn();

$.ajax({
type: "POST",
url: mimiServer+"service/social/search_ajax.php?myaccount="+myaccount+"",
data: dataString,
cache: false,
success: function(html)
{
$("#usersearch").html(html).show();
loadingOut();
}
});
}return false; 
});

$("#searchme").mouseup(function() 
{
return false
});

       $('#searchX').keyup(function(e) {
 
var searchbox = $(this).val();  
var dataString = 'searchword='+ searchbox;
  var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();

var AppNo = $("#AppNoX", form).val();  
  
  var themeidX = $("#themeidX").val();
if(searchbox.length>0)
{
loadingIn();

$.ajax({
type: "POST",
url: mimiServer+"service/social/addfriend_ajax.php?myaccount="+myaccount+"&themeidX="+themeidX+"",
data: dataString,
cache: false,
success: function(html)
{
$("#result").html(html).show();
loadingOut();
}
});
}return false; 
                     
                 });
 
        $('#searchC').keyup(function(e) {
 
var searchbox = $(this).val();  
var dataString = 'searchword='+ searchbox;
  var form = $("#engineX");  
//$("#doLogin",form).attr("disabled","disabled");
var myaccount = $("#myaccountX", form).val();

var AppNo = $("#AppNoX", form).val();  
  
  var themeidX = $("#themeidX").val();
if(searchbox.length>0)
{
loadingIn();

$.ajax({
type: "POST",
url: mimiServer+"service/social/sharealbum_ajax.php?myaccount="+myaccount+"&themeidX="+themeidX+"",
data: dataString,
cache: false,
success: function(html)
{
$("#result").html(html).show();
loadingOut();
}
});
}return false; 
                     
                 });                

$("#pwd").keyup(function() 
{
var form = $("#loginForm");  

var formData = form.serialize();
  var user_name = localStorage.getItem('user_name');
	
     var pwd = $("#pwd", form).val();	
 var doLogin = $("#doLogin", form).val();
var dataString = 'searchword='+ user_name;  
  
if(pwd.length ==4)
{
 	
loadingIn();
$.ajax({
type: "GET",
url: mimiServer+'service/account/account.php?AppNo='+AppNo+'&doLogin='+doLogin+'&user_name='+user_name+'&pwd='+pwd+'',
data: dataString,
cache: false,
success: function(data)
{
var returnValue = data;
	
if(5 == returnValue){

// $("#doLogin").removeAttr("disabled");
$('#msg2').html("<span style='color:#FC0'>Oops! Sign in failed.</span> Check your phone and code combination. ");	
loading_hide();
return;

//navigator.notification.alert("Your login failed Check your email and pwd combination", function() {});


}
if(7 == returnValue){
var user_name = localStorage.getItem('user_name');	
$.get(mimiServer+'service/account/account.php?getaccount='+user_name+'', formData, function(datax) {
var returnValuex = datax;

localStorage.setItem('myaccount', returnValuex);
localStorage.setItem('user_name', user_name);
window.location = "index.html";
loading_hide();
 
 }, 'html');	
	
	

 

} 

 else {
	
 
				 
localStorage.setItem('myaccount', returnValue);
localStorage.setItem('user_name', user_name);
localStorage.setItem('pwd', pwd);
window.location = "profile3.html";

loading_hide();
	 
 
}//end else 	
	
	
	 
loadingOut();
}
});
}return false; 
});



/*$(document).mouseup(function()
{
$('#searchme').hide();
$('#searcharea1').val("");
});*/

  /**
Taking snap
**/
 
 
 });