$(function() { 
	// Category
	$('#comment_form').hide();
	$("#add_comment").click(function(){
		$("#add_comment").hide();	
		$('#comment_form').fadeIn('slow');			
		return false;
	});	

	$('#proList').click(function(){
		var categorySearch = $('[name=category_id]').val();
	   	window.location = "http://www.sailangle.com/index/ask-a-pro-list-search/category/"+categorySearch;
		return false;
	
	});

	$('#apSearchBtn').click(function(){
		var searchType		= $('[name=type]').val();
	   	var searchWords		= $('[name=search]').val();
	   	var urlSearchWords	= searchWords.replace(" ", "-");
	   	window.location = "http://www.sailangle.com/index/ask-a-pro-search2/type/"+searchType+"/search/"+urlSearchWords;
		return false;
	});
	
	$('.delete').click(function(){
  		var answer = confirm('Not so fast... buddy. Are you sure you want to DELETE this?');
  		return answer // answer is a boolean
	}); 
});
