//<![CDATA[
$(document).ready(function () {
	
	var HOST_DOMAIN = "http://www.bttradespace.com/";
	
	//first time... hide all panel except the first
	$(".content").hide();
	$("#tab-1").addClass("selected");
	$("#tab-1-content").show();
	
	$(".tab").hover(
		function () {
			$(this).addClass("hovered").css("cursor","pointer");
		}, 
		function () {
			$(this).removeClass("hovered").css("cursor","");
		}
	);
	$(".tab").bind("click", function () {
		$(".tab").removeClass("selected");
		$(".content").hide();
		$(this).addClass("selected");
		$("#"+ $(this).attr("id") + "-content").show();
	});
	
	//form submit code
	$("#btn-Search").bind("click", function () {
		
		var url;
		if( $("#businesstype").val() == "" )
			url = HOST_DOMAIN + "NoSearchResult.aspx?EmptySearch=1";
		else
			url = HOST_DOMAIN + "Search.aspx?Ntt=" + $("#businesstype").val() + "&IsFirst=1&Location=" + $("#location").val() + "&Nty=1&N=" + $("#categories").val();
			
		$("#frm-Search").attr({ action: "" + url });
		$("#frm-Search").submit();
	});
	
	//$('img[@src$=.png],.pngfix').pngfix();
});	
//]]>