$(document).ready(function()
{
	$(".defaultText").focus(function(srcc)
	{
		if ($(this).val() == $(this)[0].title)
			{
			$(this).removeClass("defaultTextActive");
			$(this).val("");
		}
	});

	$(".defaultText").blur(function()
	{
		if ($(this).val() == "")
			{
			$(this).addClass("defaultTextActive");
			$(this).val($(this)[0].title);
		}
	});


	$("#search_box").autocomplete({
		source: "?c=search&m=ajaxSearch",
		minLength: 3,
		delay: 0
	});


	$(".defaultText").blur();

	//var myBorder = RUZEE.ShadedBorder.create({ corner:8, shadow:16 });
	//myBorder.render('my-border');

	//search bar
	$(".categories").click(function(){

		//if($('#field').val() == 'Search by title, keywords, ISBN or UPC') {
		//	$("#incompleteSearchDialog").dialog({ modal: true,
		//		buttons: { "Ok": function() { $(this).dialog("close"); } } });
		//	return false;
		//}
		$("#searchform").attr('action', $("#searchform").attr('action') + '/' + $(this).attr("id"));
		$("#searchform").submit();
	});




});

//refresh page
function refreshPage() {
	window.location.reload(true);
	//window.location = "http://yardale.com";
}
