$(document).ready(function(){
	$(".post ul li b").append($("<span class='arrow'>"));
	$(".post ul li strong").append($("<span class='arrow'>"));	
	$(".post h2").prepend($("<span>"));	
	
	$(".plain li").css({
	"list-style-image" : "none",
	"margin" : "0px 0px",
	"padding" : "5px 2px",
	"border" : "1px solid #fff"
	});
	
	$("#nav li ul").css({
	"opacity" : "0",
	"background-color" : "#26466d"
	});

 
	$("#nav li").hover(function() {
		$(this).find("ul:first").stop().animate({
			opacity : '1'
		 
		}, 600);

	}, function() {
		
		$(this).find("ul:first").stop().animate({
			opacity: '0',
		}, 300);
	});
 

	$("#pagenav").hover(
		function() {
			$("#smooth_sldr").stop().fadeTo("slow", 0);
		},
		function() {
			$("#smooth_sldr").stop().fadeTo("fast", 1);
		});
			
	function writeCookie() {
	 var today = new Date();
	 var the_date = new Date("December 31, 2023");
	 var the_cookie_date = the_date.toGMTString();
	 var the_cookie = "users_resolution="+ $(window).width()+"x"+ $(window).height();
	 var the_cookie = the_cookie + ";expires=" + the_cookie_date;
	 document.cookie=the_cookie; 
	//location = 'get_resolution.php';
	}
	writeCookie();
});
	
function search() {
	$(document).ready( function() {
		var name = $("#name")[0].value;
 		$.ajax({
			type: "GET",
			url: "http://www.caclawyers.com/search.php",
			data: "name="+name,
			success: function(result){
				if (result) {
					$("#message").html("<p>" + result + "</p>");
				} else {
					$("#message").html("<p>Sorry, there are no records for attorney "+name+"</p>");
				}
			}
		});
	});
}



