function initFeedBack(){ 
	oFbLink = $("a#feedback_button");
	sFbQuery = oFbLink.attr('href');
	oFbContainer = $("#fb_container");
	oFbLoader = $("#fb_loader");
	oFbData = $("#fb_data");
	oFbLink.toggle(
		  function () {
			show_fb_popup(oFbContainer,function(){
				// make AjaxReques
				oFbData.html('<img src="/f/1/global/i-wait.gif" alt="" vspace="33" class="i-loading"/>');
				$.ajaxSetup({
					url: sFbQuery,
					cache: false,
					type: "POST"
				});
				$.get(sFbQuery,{jsHttpRequest: "17"},
					function(data){
						oFbLoader.html(data);
						oFbData.animate({ "height" : ""+oFbLoader.height()+"px"	}, 1000, 'easeout');
						oFbLoader.html("");
						oFbData.html(data);
						$("#feedback_form").submit(submit_fb_form)
					}
				);
				//
			})

			return false;
		  },
		function () {
			close_fb_popup($(oFbContainer));
			return false;
		}
	);
}

function get_fb_form_markup(){}

function submit_fb_form(){
	$(this).ajaxSubmit({
		target: oFbLoader,
		beforeSubmit: function(){},
		success: function(data){
			oFbData.html('');
			oFbData.animate(
				{ 
					"height" : ""+oFbLoader.height()+"px"
				}, 
				1000,
				'easeout'
			);
			oFbData.html(oFbLoader.html());
			oFbLoader.html("");
			$("#feedback_form").submit(submit_fb_form);
		}
	});
	return false;
}

function show_fb_popup(jPopup,onfinished){
	isFbOpend = true;
	if (!jQuery.browser.msie) {
		jPopup.fadeIn("fast", onfinished);
	} else {
		jPopup.show();
		if(onfinished) onfinished();
	}
}

function close_fb_popup(jPopup,onfinished){
	function callback(){
		$(this).css("display","none");
		if(onfinished) onfinished();
		
		oFbData.html("");
		oFbData.css("height","auto");
	}
	
	isFbOpend = false;
	
	if (!jQuery.browser.msie) {
		jPopup.fadeOut("fast", onfinished);
	} else {
		jPopup.hide();
		callback();
	}
}
