
function list_countries(id) {		
			$.post('http://localhost/ci_temp/photos/show_popup/' + id, 
				function(html){	
				 $('#popup').empty();
				  $('#popup').append(html);
				  $('#popup').show('slow');				  
				});	 
		return false;
	}

function open_popup(id) {		
	$.post('http://localhost/ci_temp/home/show_popup/' + id, 
		function(html){	
		 $('#popup').empty();
		  $('#popup').append(html);
		  $('#popup').show('slow');				  
		});	 
return false;
}



$(document).ready(function () {
	$('#myform').submit(function(eve){
	eve.preventDefault();
	
	var firstN = $('#first_name').val();
	var lastN = $('#last_name').val();
	
	$.post('/thebikers/jquery/processform/', {
		first_name: firstN, last_name: lastN},
		function(html){
			if(parseFloat(html)){
			  $('#myform').after('Thank you for submitting the form');
			  $('#myform').hide('slow');
			}else{
			  $('#errors').html(html).show('slow');
			}
		});
	
	});
	
	
	
	
	$('#task').live('click', function (eve) {
		eve.preventDefault();		
		$.get('/thebikers/jquery/task', function(html){
			
			if(parseFloat(html)){
				$('#task').after('Task Complete!');
				$('#task').text('succes').hide();
			}else{
				$('#task').text('fail, try again');
			}
			
		});
		
		
	});
	
	
	$('#image2').live('click', function (eve) {	
		 eve.preventDefault();		
		 //currentTargetvalue
				 
		$.get('/thebikers/jquery/show_popup', function(html){			
			$('#popup').show('slow');
			$('#popup').after(html);				
		});
		
		
	});
	
	$('#close').live('click', function (eve) {
		eve.preventDefault();
		
		$('#popup').hide('slow');
		
		
	});
	
});
