/**
 *
 */

var sparql;
var findTriple;

//var popupMenu;

var history;

$(window).load(function() {
	
	$('#popup').hide();
	$('#popup_2').hide();

	
	sparql = new Sparql();
	$('#find_exec').click(function(event){
		find();
	});

	$('#view_cond').click(function(event){
		view_condition();
	});

	$('#view_query').click(function(event){
		view_query();
	});

	$('#subject_div').hide();
	$('#result_div').hide();

	$('#add_condition').click(function(event){
		sparql.addCondition();
	});

	$('#prev_btn').click(function(event){
		find_offset('prev');
	});

	$('#next_btn').click(function(event){
		find_offset('next');
	});

	$('#prev_offset').hide();
	$('#next_offset').hide();

	
	init();

});

function find(){
	sparql.find();
}

function view_condition(){
	sparql.viewCondition();
}

function view_query(){
	sparql.getViewQuery();
}

function find_offset(value){
	sparql.find_offset(value);
}

