google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.2");

google.setOnLoadCallback(function() {

	
	$("#showMore").click(function(){
		
		var temp = $(this);
		temp.text("loading...");
		
		$.get("./ajax.php?archive="+lastDate, function(data){
			$(data).fadeIn().appendTo($(".posts"));
			temp.text("Show more");
		});
		return false;
	});
	
	var t = $("#dia").dialog({
			autoOpen: false,
			bgiframe: true,
			height: 140,
			modal: true,
			draggable: false,
			resizable: false,
			closeOnEscape: true
		});
	
	$(".icons").click(function(t){
		t.open();
	});
	
	$(".mainArchives").height(400).css({overflow:'hidden'});
	
	$(".mainArchives").mouseover(function(t){
	   $(".mainArchives").height('100%'); 
	   $(".moreArchives").hide();
	});
	
	$(".mainArchives").mouseout(function(t){
	   $(".mainArchives").height(400).css({overflow:'hidden'});
	   $(".moreArchives").show();
	});
	
	$(".searchForm").click(function(t){
	    $(this).val('');
	    $(this).css({color:'#333'});
	});

});