$(function(){
			$("#page-wrap a.votee").click(function(){
				
				 
				$clicked = $(this);
				
					// each button div MUST have a "xx-button" and the target div must have an id "xx" 
					var idToLoad = $clicked.attr("id").split('-');
					// alert('thumb clicked'+idToLoad[0]);
					//we search trough the content for the visible div and we fade it out
					//$('#content').find("div:visible").fadeOut("fast", function(){

						$("#page-wrap div.button").fadeOut();

						$("#page-wrap div.result").fadeIn();
						
						//once the fade out is completed, we start to fade in the right div
						//$(this).parent().find("#"+idToLoad[0]).fadeIn();
					//})
			});
		});

function addVote(poll_num, plug_incldir, db_host, db_user, db_pass, db_name, wptable) {

	test=poll_num + 
	'&db_host=' + db_host + 
	'&db_user=' + db_user + 
	'&db_pass=' + db_pass + 
	'&db_name=' + db_name +
	'&wptable=' + wptable;
		
		//alert('You have chosen: '+plug_incldir+'poll_facebox/addVote.php?poll_num='+test);
		
$.facebox({ ajax: plug_incldir+'poll_facebox/addVote.php?poll_num=' + test});



}

function addVote2(poll_num, plug_incldir, db_host, db_user, db_pass, db_name, wptable) {
	riptapparel.style.display = 'none';
	
	test=poll_num + 
	'&db_host=' + db_host + 
	'&db_user=' + db_user + 
	'&db_pass=' + db_pass + 
	'&db_name=' + db_name +
	'&wptable=' + wptable;
		
	
		$("#page-wrap div.button").fadeOut();

$.facebox({ ajax: plug_incldir+'poll_facebox/addVote.php?poll_num=' + test});



}
	$(document).ready(function(){
	$(".boxcaption").fadeTo("fast", 0.5);
	$(".tombstone .boxcaption").hover(function(){
	$(this).fadeTo("fast", 0.9);
	},function(){
	$(this).fadeTo("fast", 0.0);
	});
	});			
