$(document).ready(function(){
	$(".delete").click(function(){
		if(confirm("Are you sure you want to remove it?")) return true;
		else return false;
	});

	$("a.thumbnail").click(function(){
		$("#big_img").attr("src", "photos/" + $(this).attr("rel"));
		$("#photo_descr").html($(this).children("img").attr("alt"));
		$(this).children("img").addClass("current");
		$(this).siblings("a").children("img").removeClass("current");
		return false;
	});

	function loadNews(){
      	var searchControl1 = new GSearchControl();
		var options = new GsearcherOptions();
		options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
      	searchControl1.addSearcher(new GnewsSearch(), options);
      	searchControl1.draw(document.getElementById("searchcontrol"));
    	searchControl1.execute("UK Property News");

    	/*var searchControl2 = new GSearchControl();
      	searchControl2.addSearcher(new GnewsSearch());
      	searchControl2.draw(document.getElementById("searchcontrol_home"));
    	searchControl2.execute("UK Property News")*/;
	}
	GSearch.setOnLoadCallback(loadNews);
});