// =======
// FUNKCJE
// =======





// --------------------------------------
// SPRAWDZANIE INFO DO PÓL W FORMULARZACH
// --------------------------------------

var check_form_info=function(input_id,sql_base)
{
	var record_id=$("#"+input_id).attr("value");
	var data_input="";

	$.ajax(
	{
		type:"POST",
		url:"include/ajax.actions.global.php?action=check_form_info&sql_base="+sql_base+"&record_id="+record_id,
		success:function(data)
		{
			if (data!="")
			{
				var data=data.replace("|","<br />");

				$("#info_"+input_id).css({"background-color":"#ffec83"}).animate({"background-color":"#e75400"},300,function()
				{
					$("#info_"+input_id).fadeIn(300).attr("title",data);
				});
			}
			else
			{
				$("#info_"+input_id).fadeOut(300).attr("title","");
			}
		}
	});	
}





// ------------------------------------------
// SPRAWDZANIE DODATKOWYCH PARAMETRÓW OKŁADKI
// ------------------------------------------

var checkCoverAddParameters=function(search_value,record_id)
{
	$.ajax(
	{
		type:"POST",
		url:"include/ajax.actions.global.php?action=check_cover_add_parameters&record_id="+record_id+"&search_value="+search_value,
		success:function(data)
		{
			if (data==1) $("#pl_kolor_slipu").slideDown(300); else $("#pl_kolor_slipu").slideUp(300);
		}
	});
}





// ---------------------------
// WYŚWIETLANIE NOWYCH ALERTÓW
// ---------------------------

var show_new_alert=function(alert_name,option,time_length,sub_message)
{
	var h2=$("#h2_"+alert_name).attr("value");
	var height=$("#alert_"+alert_name).css("height");

	$("#current_alert").attr("value",alert_name);

	if (sub_message!=0)
	{
		$("#alert_"+alert_name+" .sub_message").hide();
		$("#alert_"+alert_name+" .message_"+sub_message).show();
	}

	$("#alert_"+alert_name+" .loader").show();
	$("#alert_"+alert_name+" h2").html(h2);
	$("#alert_"+alert_name).css("bottom","-"+height).show().animate({"bottom":0},200);
	$("#alert_"+alert_name+" .top_white_shadow").fadeIn(150);

	if (option=="autohide")
	{
		var z=1;
		
		loop_autohide=setInterval(function()
		{
			if (z==10)
			{
				close_new_alert();

				clearInterval(loop_autohide);
			}
			
			if ($("#alert_"+alert_name).css("display")=="none")
			{
				clearInterval(loop_autohide);
			}

			z++;
		},time_length/10);
	}
}





// ------------------------
// ZAMYKANIE NOWYCH ALERTÓW
// ------------------------

var close_new_alert=function()
{
	var current_alert=$("#current_alert").attr("value");
	var height=$("#alert_"+current_alert).css("height");
	
	$("#alert_"+current_alert).animate({"bottom":"-"+height},400,function()
	{
		$("#alert_"+current_alert).hide();
	});
	
	$(".top_white_shadow").fadeOut(150);

	$(".loader").fadeOut(200);
}





// --------------
// PRZEKIEROWANIE
// --------------

var gotourl=function(link)
{
	window.location.href=link;
}





// ---------------------------------------------------------------------------------------------------
// SPRAWDZANIE CZY DANA WARTOŚĆ ZNAJDUJE SIĘ W BAZIE W REKORDZIE O KONKRETNYM ID W KONKRETNEJ KOLUMNIE
// ---------------------------------------------------------------------------------------------------

var checkRecordSQL=function(sql_base,search_value,search_in,record_id)
{
	$.ajax(
	{
		type:"POST",
		url:"include/ajax.actions.global.php?action=check_record_sql&sql_base="+sql_base+"&record_id="+record_id+"&search_value="+search_value+"&search_in="+search_in,
		success:function(data)
		{
			return data;
		}
	});
}










// =================
// OBIEKTY I ZMIENNE
// =================

$(document).ready(function()
{
	// ===================================================
	// RZECZY NA CAŁEJ STRONIE NIE ZWIĄZANE Z FORMULARZAMI
	// ===================================================

	// ------------------------------------------------------------
	// ODCZYTYWANIE ZMIENNYCH ZAPISANYCH W POLACH INPUT TYPU HIDDEN
	// ------------------------------------------------------------

	var web_colors=$("#web_colors").attr("value");
	web_colors=web_colors.split(",");





	// -----------------------
	// ROZWIJANIE MENU GÓRNEGO
	// -----------------------

	$('ul.menu li.link').hover(function()
	{
		$(this).css("background-color","#"+web_colors[2]).children('ul').stop(true,true).fadeIn(100);
	},function()
	{
		$(this).css("background","transparent").children('ul').stop(true,true).fadeOut(100);
	});



	
	
	// -----------------------------------------
	// PRZEWIJANIE AKTUALNOŚCI, BANERÓW I OPINII
	// -----------------------------------------

	$("#news_slide").cycle({fx:"scrollLeft",speed:300,timeout:7000,cleartype:1,pager:"#news_nav",pause:1});
	$("#baner_slide").cycle({fx:"fade",speed:1000,timeout:5000,cleartype:1,pager:"#baner_nav",pause:1});
	$("#opinions_slide").cycle({fx:"fade",speed:500,timeout:10000,cleartype:1,pause:1});





	// -------------
	// GALERIE ZDJĘĆ
	// -------------

	$('.gallery a').lightBox({txtImage:"&nbsp;",txtOf:"/"});

	$('.gallery div.inside').hover(function()
	{
		$(this).stop(true,true).animate({width:"145px",height:"145px"},100);
	},function()
	{
		$(this).stop(true,true).animate({width:"135px",height:"135px"},100);
	});

	



	// --------------------------------------------------
	// MINIATURY KOLORÓW, WZORÓW OKŁADEK, ETUI I ETUI DVD
	// --------------------------------------------------

	$('#sub_left_thin .thumb').hover(function()
	{
		$(this).stop(true,false).animate({"background-color":"#fff","color":"#333"},200);
	},function()
	{
		$(this).stop(true,false).animate({"background-color":"#333","color":"#fff"},200);
	});	





	// ---------------------------
	// WYSUWANIE POLA DO LOGOWANIA
	// ---------------------------

	$("#show_logform").click(function()
	{		
		$("#header").animate({opacity:0},300,function()
		{
			$("#top_login").animate({top:0},300);
		});		
	});





	// --------------------------
	// CHOWANIE POLA DO LOGOWANIA
	// --------------------------

	$(".hide_logform").click(function()
	{		
		$("#header").css("opacity",0);
		$("#top_login").animate({top:-55},300,function()
		{
			$("#header").animate({opacity:1},300);
		});		
	});





	// --------------------------------------------------------
	// POKAZYWANIE I CHOWANIE KOMUNIKATU BŁĘDNY LOGIN LUB HASŁO
	// --------------------------------------------------------
	
	$(".alert").fadeIn(200).delay(2000).fadeOut(200);



	
	
	// -------------------------------------------------------------------------
	// CZYSZCZENIE PÓL INPUT (LOGIN, HASŁO I SZUKAJ) PO KLIKNIĘCIU NA NIE MYSZKĄ
	// -------------------------------------------------------------------------

	$(".clear_click").click(function(){$(this).attr("value","");}).focus(function(){$(this).attr("value","");});
	


	
	// ------------------------------------------------------------------
	// KOREKTA STYLI CSS NIEKTÓRYCH ELEMENTÓW NA STARCIE STRONY/PODSTRONY
	// ------------------------------------------------------------------
	
	$(".random_txt").css("z-index",100);
	$(".random_photo").css("z-index",0);
	$(".selected_thumb").css({"opacity":0.2});
	$(".no_visible").animate({"opacity":0.1},500);
	$(".opacity_p").css("opacity",0.7);




	
	// ---------------------
	// PODPOWIEDZI - TOOLTIP
	// ---------------------

	$(".tooltip,.tooltip2").style_my_tooltips(
	{
		tip_follows_cursor:"on",
		tip_delay_time:200
	});





	// ---------------------------------------------------
	// POKAZYWANIE NA STARCIE KOMUNIKATU O AKTYWACJI KONTA
	// ---------------------------------------------------

	if ($("#alert_confirm_user").length)
	{
		show_new_alert("confirm_user","autohide",5000,0);
	}





	// --------------------------------------------
	// POWIĘKSZANIE I ZMNIEJSZANIE WZORNIKA KOLORÓW
	// --------------------------------------------

	$("#sampler_zoom").click(function()
	{
		var is_zoom=$("#inp_zoom").attr("value");
		
		if (is_zoom==0)
		{
			$("#inp_zoom").attr("value",1);
			$(this).animate({"width":"6000px","height":"auto"},500);
		}
		else
		{
			$("#inp_zoom").attr("value",0);
			$(this).animate({"width":"100%"},500);
		}
	});





	// --------------------------------------
	// WYŚWIETLENIE KOMUNIKATU NA CAŁĄ STRONĘ
	// --------------------------------------
	
	if ($("#sitemap_message").length)
	{
		$("#new_mask").fadeIn(300,function()
		{
			$("#sitemap_message").fadeIn(300);
		});
	}





	// -----------------------------------
	// ZAMYKANIE NOWEJ MASKI NA CAŁY EKRAN
	// -----------------------------------

	$("#new_mask .close_mask").click(function()
	{
		$("#new_mask").fadeOut(200);
		$("#new_mask div").fadeOut(200);
	});





	// ------------------------
	// ZAMYKANIE NOWYCH ALERTÓW
	// ------------------------

	$(".close_new_alert").live("click",function()
	{
		close_new_alert();
	});





	// --------------------------------------------------------------------------
	// PRZEŁĄCZANIE PÓL Z DOSTĘPNYMI FORMATAMI FOTOALBUMÓW I ALBUMÓW TRADYCYJNYCH 
	// POD MINIATURĄ WZORU NA PODSTRONACH: WZORY_OKLADEK i WZORY_ETUI
	// --------------------------------------------------------------------------

	$(".covers_nav").live("click",function()
	{
		var c_id=this.id;

		$(".covers_nav_selected").removeClass("covers_nav_selected").addClass("covers_nav");
		$(this).removeClass("covers_nav").addClass("covers_nav_selected");

		if (c_id=="fotoalbumy")
		{
			$("#div_fotoalbumy").show();
			$("#div_tradycyjne").hide();
			$(".no_visible").animate({"opacity":0.1},500);
		}
		else
		{
			$("#div_fotoalbumy").hide();
			$("#div_tradycyjne").show();
			$(".no_visible").animate({"opacity":0.1},500);
		}
	});

	



	// ----------------------------------------
	// PANEL TECHNICZNY DO LICZNIKA ZAPYTAŃ SQL
	// ----------------------------------------
	
	$("#close_technical").click(function()
	{
		$("#technical_data").fadeOut(400);
	});

	$("#show_all").click(function()
	{
		$("#technical_data").animate({"width":"1000px"},400);
		$("#mask_right").fadeOut(300);
		$(this).fadeOut(300,function()
		{
			$("#compres").fadeIn(300);
		});
	});

	$("#compres").click(function()
	{
		$("#technical_data").animate({"width":"380px"},400);
		$("#mask_right").fadeIn(300);
		$(this).fadeOut(300,function()
		{
			$("#show_all").fadeIn(300);
		});
	});

	$("#show_sql").click(function()
	{
		$("#loader_show_sql").fadeIn(300);

		$.ajax(
		{
			url:"include/ajax.actions.global.php?action=show_sql",
			success:function(data)
			{
				$("#sql_queries").html(data);
				$("#loader_show_sql").fadeOut(300);
			}
		});
	});





	// ---------------------
	// PANEL ADMINISTRACYJNY
	// ---------------------

	$("#icon_admin").click(function()
	{
		var field_height=$("#field_height").attr("value");
		
		if ($("#admin_panel").css("width")=="50px")
		{
			$("#admin_panel").animate({"width":"250px","height":field_height,"background-color":"#2c4e75"},100,function()
			{
				$("#panel_field").fadeIn(200);
			});
		}
		else
		{
			$("#panel_field").hide();

			$("#admin_panel").animate({"width":"50px","height":"50px","background-color":"#2869b1"},100,function(){});
		}
	});

	$('#icon_admin').hover(function(){$(this).css("opacity",0.8);},function(){$(this).css("opacity",1);});















	// ======
	// KOSZYK
	// ======

	// -----------------------------
	// DODAWANIE PRODUKTU DO KOSZYKA
	// -----------------------------

	$("#add_to_cart").click(function()
	{
		var validate=1;

		if ($("#grawer_laserowy").attr("checked") && $("#tekst_graweru").attr("value")=="") { validate=0; $("#tekst_graweru").addClass("validate_inputs"); }
		//if ($("#dostarczenie_plikow").attr("value")==2 && $("#katalog_ftp").attr("value")=="") { validate=0; $("#katalog_ftp").addClass("validate_inputs"); }
		if ($("#inna_wysylka").attr("checked"))
		{
			if ($("#nazwa").attr("value")=="") { validate=0; $("#nazwa").addClass("validate_inputs"); }
			if ($("#miasto").attr("value")=="") { validate=0; $("#miasto").addClass("validate_inputs"); }
			if ($("#kod").attr("value")=="") { validate=0; $("#kod").addClass("validate_inputs"); }
			if ($("#ulica").attr("value")=="") { validate=0; $("#ulica").addClass("validate_inputs"); }
		}
		if ($("#grubosc_etui").attr("value")=="" && $("#parent").attr("value")==0) { validate=0; $("#grubosc_etui").addClass("validate_inputs"); }
		if ($("#grubosc_grzbietu").attr("value")=="") { validate=0; $("#grubosc_grzbietu").addClass("validate_inputs"); }
		if ($("#color_no_available").attr("value")=="1") { validate=0; $("#kolor,#kolor_etui,#kolor_etui_dvd").addClass("validate_inputs"); }

		if (validate==1)
		{
			show_new_alert("add_to_cart","",0,0);

			$.ajax(
			{
				type:"POST",
				url:"include/ajax.actions.global.php?action=add_to_cart",
				data:$("#ajax_form").serialize(),
				success:function(data)
				{
					var data=data.split("|");

					// ---------------------
					// ZMIANA STATUSU ALERTU
					// ---------------------

					$("#alert_add_to_cart .loader").fadeOut(300);
					$("#alert_add_to_cart h2").animate({opacity:0},300,function()
					{
						$("#alert_add_to_cart h2").css("color","#fff").html(data[1]).animate({opacity:1},300);
					});

					// ------------------------------------------------------------------------------
					// WYJĄTEK DLA ETUI NA ALBUMY, ODCZYT ID DODANEGO PRODUKTU I WPISANIE GO DO LINKU
					// ZAMAWIANIA ETUI, ŻEBY PRODUKT AUTOMATYCZNIE USTAWIŁ SIĘ JAKO RODZIC
					// ------------------------------------------------------------------------------

					$("#link_order_cases").attr("href","?id=order_cases&parent="+data[2]);

					// -------------------------------------------------------------
					// ILOŚĆ PRODUKTÓW W KOSZYKU - W MENU OPCJE UŻYTKOWNIKA PO LEWEJ
					// -------------------------------------------------------------

					$("#cart_amount").fadeOut(300,function()
					{
						$("#cart_amount").html("[ "+data[0]+" ]").fadeIn(300);
					});

					var inp_cart_price=$("#inp_cart_price").attr("value");
					var currency=$("#currency").attr("value");

					$("#cart_price").fadeOut(300,function()
					{
						$("#cart_price").html((eval(data[3])+eval(inp_cart_price))+" "+currency).fadeIn(300);
					});
				}
			});
		}
		else
		{
			show_new_alert("form_validation","autohide",5000,1);
		}
	});





	// ----------------------------
	// EDYCJA PARAMETRÓW FORMULARZA
	// ----------------------------

	$("#save_changeg_form").click(function()
	{
		var validate=1;

		if ($("#grawer_laserowy").attr("checked") && $("#tekst_graweru").attr("value")=="") { validate=0; $("#tekst_graweru").addClass("validate_inputs"); }
		//if ($("#dostarczenie_plikow").attr("value")==2 && $("#katalog_ftp").attr("value")=="") { validate=0; $("#katalog_ftp").addClass("validate_inputs"); }
		if ($("#inna_wysylka").attr("checked"))
		{
			if ($("#nazwa").attr("value")=="") { validate=0; $("#nazwa").addClass("validate_inputs"); }
			if ($("#miasto").attr("value")=="") { validate=0; $("#miasto").addClass("validate_inputs"); }
			if ($("#kod").attr("value")=="") { validate=0; $("#kod").addClass("validate_inputs"); }
			if ($("#ulica").attr("value")=="") { validate=0; $("#ulica").addClass("validate_inputs"); }
		}
		if ($("#grubosc_etui").attr("value")=="" && $("#parent").attr("value")==0) { validate=0; $("#grubosc_etui").addClass("validate_inputs"); }
		if ($("#grubosc_grzbietu").attr("value")=="") { validate=0; $("#grubosc_grzbietu").addClass("validate_inputs"); }
		if ($("#color_no_available").attr("value")=="1") { validate=0; $("#kolor,#kolor_etui,#kolor_etui_dvd").addClass("validate_inputs"); }


		//if ($("#grawer_laserowy").attr("checked") && $("#tekst_graweru").attr("value")=="") { validate=0; $("#tekst_graweru").addClass("validate_inputs"); }
		//if ($("#dostarczenie_plikow").attr("value")==2 && $("#katalog_ftp").attr("value")=="") { validate=0; $("#katalog_ftp").addClass("validate_inputs"); }

		if (validate==1)
		{
			show_new_alert("edit_cart","",0,0);

			$.ajax(
			{
				type:"POST",
				url:"include/ajax.actions.global.php?action=save_changed_form",
				data:$("#ajax_form").serialize(),
				success:function(data)
				{
					var data=data.split("|");

					// ---------------------
					// ZMIANA STATUSU ALERTU
					// ---------------------

					$("#alert_edit_cart .loader").fadeOut(300);
					$("#alert_edit_cart h2").animate({opacity:0},300,function()
					{
						$("#alert_edit_cart h2").css("color","#fff").html(data[0]).animate({opacity:1},300);
					});

					// ------------------------------------------------------------------------------
					// WYJĄTEK DLA ETUI NA ALBUMY, ODCZYT ID DODANEGO PRODUKTU I WPISANIE GO DO LINKU
					// ZAMAWIANIA ETUI, ŻEBY PRODUKT AUTOMATYCZNIE USTAWIŁ SIĘ JAKO RODZIC
					// ------------------------------------------------------------------------------

					$("#link_order_cases").attr("href","?id=order_cases&parent="+data[1]);
				}
			});
		}
		else
		{
			show_new_alert("form_validation","autohide",5000,1);
		}
	});





	$("#add").click(function()
	{
		//show_new_alert("add_to_cart","",0,0);
	});








	// ==========
	// KALKULATOR
	// ==========

	// ---------------------------------
	// DODAWANIE PRODUKTU DO KALKULATORA
	// ---------------------------------

	$("#add_to_calc").click(function()
	{
		show_new_alert("add_to_calc","",0,0);

		$.ajax(
		{
			type:"POST",
			url:"include/ajax.actions.global.php?action=add_to_calc",
			data:$("#ajax_form").serialize(),
			success:function(data)
			{
				var data=data.split("|");
				var c_exc=$("#existing_calc").html();

				// ---------------------
				// ZMIANA STATUSU ALERTU
				// ---------------------

				$("#alert_add_to_calc .loader").fadeOut(300);
				$("#alert_add_to_calc h2").animate({opacity:0},300,function()
				{
					$("#alert_add_to_calc h2").css("color","#fff").html(data[0]).animate({opacity:1},300);
				});

				$("#existing_calc").html(c_exc+"<div class='calc_bta' id='calc_"+exp[2]+"'>"+exp[1]+"</div>");
			}
		});
	});





	// ------------------------------
	// EDYCJA PRODUKTU W KALKULATORZE
	// ------------------------------

	$("#save_calc").click(function()
	{
		var c_id=$("#calc_id").attr("value");

		show_new_alert("edit_calc","",0,0);

		$.ajax(
		{
			type:"POST",
			url:"include/ajax.actions.global.php?action=save_calc&record_id="+c_id,
			data:$("#ajax_form").serialize(),
			success:function(data)
			{
				$("#alert_edit_calc .loader").fadeOut(300);
				$("#alert_edit_calc h2").animate({opacity:0},300,function()
				{
					$("#alert_edit_calc h2").css("color","#fff").html(data).animate({opacity:1},300);
				});
			}
		});
	});















	// ==========================================
	// RÓŻNE RZECZY DLA FORMULARZY ZAMÓWIENIOWYCH
	// ==========================================

	// --------------------------------------------
	// ZAPISYWANIE DOMYŚLNYCH PARAMETRÓW FORMULARZA
	// --------------------------------------------

	$(".bt_save").click(function()
	{
		var get_id=$("#get_id").attr("value");

		show_new_alert("save_defaults","",0,0);

		$.ajax(
		{
			type:"POST",
			url:"include/ajax.actions.global.php?action="+this.id+"&get_id="+get_id,
			data:$("#ajax_form").serialize(),
			success:function(data)
			{
				$("#alert_save_defaults .loader").fadeOut(300);
				$("#alert_save_defaults h2").animate({opacity:0},300,function()
				{
					$("#alert_save_defaults h2").css("color","#fff").html(data).animate({opacity:1},300);
				});
			}
		});
	});





	// -------------------------------------------------
	// DIVY POJAWIAJĄCE SIĘ W FORMULARZACH PO NACIŚNIĘTU
	// CHECKBOXA LUB WYBRANIU OPCJI W SELECT
	// -------------------------------------------------

	$("select").live("change",function()
	{
		var id=$(this).attr("id");
		var value=$(this).attr("value");

		$("."+id+"_hide").slideUp();
		$("."+id+"_"+value).slideDown();
		
		$("."+id+"_fade").fadeOut(300);
		$(".fade_"+id+"_"+value).fadeIn(300);
	});

	$("input[type=checkbox]").live("click",function()
	{
		$(".field_"+this.id).slideToggle(300);
	});





	// -------------------------------------------------------------------------
	// PRZESUWANIE (WRAZ Z SUWAKIEM PRZEGLĄDARKI) POLA Z CENĄ I PODGLĄDEM KOLORU
	// -------------------------------------------------------------------------

	if ($("#price_container_floating").length) { var price_position=$("#price_container_floating").offset().top; }
	if ($("#ajax_color_thumb").length) { var thumb_position=$("#ajax_color_thumb").offset().top; }

	$(window).scroll(function()
	{
		$("#temp").attr("value",$(window).scrollTop());
		$("#window_scroll").attr("value",$(window).scrollTop());

		if ($("#price_container_floating").length)
		{
			if ($(window).scrollTop()>(price_position-10))
			{
				$("#bg_floating").stop(true,false).animate({"top":$(window).scrollTop()-price_position-35},300);
				$("#price_mask").stop(true,false).animate({"height":$(window).scrollTop()-price_position+40},300);
			}
			else
			{
				$("#bg_floating").stop(true,false).animate({"top":"-41px"},300);
				$("#price_mask").stop(true,false).animate({"height":"10px"},300);
			}
		}

		if ($("#ajax_color_thumb").length)
		{
			if ($(window).scrollTop()>(thumb_position-30))
			{
				$("#ajax_color_thumb").stop(true,false).animate({"margin-top":$(window).scrollTop()-thumb_position+30},300);
			}
			else
			{
				$("#ajax_color_thumb").stop(true,false).animate({"margin-top":0},300);
			}
		}
	});










	// -----------------------------
	// ODZYSKIWANIE HASŁA LUB LOGINU
	// -----------------------------

	$("#send_password").click(function()
	{
		var recover=$("#recover").attr("value");
		var email=$("#email").attr("value");

		if (email!="")
		{		
			$("#recover_loader").fadeIn(200);

			if (recover=="login")
			{
				$.ajax(
				{
					type:"POST",
					url:"include/sitemap/forgot_password/ajax.actions.php?action=send_recover_login",
					data:$("#ajax_form").serialize(),
					success:function(data)
					{
						$("#recover_loader").fadeOut(200);
						show_new_alert("recover_message","",0,1);
					}
				});
			}

			if (recover=="password")
			{
				$.ajax(
				{
					type:"POST",
					url:"include/sitemap/forgot_password/ajax.actions.php?action=send_recover_password",
					data:$("#ajax_form").serialize(),
					success:function(data)
					{
						$("#recover_loader").fadeOut(200);
						show_new_alert("recover_message","",0,2);
					}
				});
			}
		}
	});	





	// -----------------
	// RESETOWANIE HASŁA
	// -----------------

	if ($("#alert_send_new_password").length)
	{
		show_new_alert("send_new_password","",0,3);

		var sid=$("#sid").attr("value");

		if (sid!="")
		{		
			$.ajax(
			{
				type:"POST",
				url:"include/sitemap/forgot_password/ajax.actions.php?action=send_new_password",
				data:"sid="+sid,
				success:function(data)
				{

				}
			});
		}
	}
});
				
