var $j = jQuery.noConflict();

var Site = function(){};

/*Site.initMenu = function () {
	
	var statement;
	
	$j('#selection').hover(function() {
		statement = $j('#selection').attr("class");
		$j('#sub_selection').show();
	}, function(){
		$j('#sub_selection').hide();
	})
	
	$j('#sub_selection').hover(function() {
		if(statement != "tab_selected") {
			$j('#selection').addClass("tab_selected");
		}
		$j(this).show();
	}, function(){
		if(statement != "tab_selected") {
			$j('#selection').removeClass()	
		}
		$j(this).hide();
	})
	
	$j('#about').hover(function() {
		statement = $j('#about').attr("class");
		$j('#sub_about').show();
	}, function(){
		$j('#sub_about').hide();
	})
	
	$j('#sub_about').hover(function() {
		if(statement != "tab_selected") {
			$j('#about').addClass("tab_selected");
		}
		$j(this).show();
	}, function(){
		if(statement != "tab_selected") {
			$j('#about').removeClass()	
		}
		$j(this).hide();
	})
}*/

Site.validQuickPoll = function () {
	if ($j("input:radio[@name='poll'][@checked]").length) {
		$j.post('validQuickPoll.php', {
			response : $j("input:radio[@name='poll'][@checked]").val()
		}, function(data){
			Site.hideQuickPoll();
		});
	}
	else {
		alert('Please select an option.');
	}
}

Site.hideQuickPoll = function () {
	$j('#button_poll_vote').hide();
	$j('#quick_poll').html('<div style="padding: 20px 0 20px 0;text-align:center;"><strong>Thank you for your vote!</strong></div>');
}

$j(document).ready(function(){
	Site.initMenu();
	if((typeof soMapHome != 'undefined') && soMapHome){
		soMapHome.write("carte");
	}
})



// SIFR
if (typeof sIFR == "function") {
sIFR.replaceElement(named({
					sSelector:"h2.title", 
					sFlashSrc:"images/fonts/avenir-45.swf", 
					sColor: "#3e3d40",
					sWmode: "transparent"
				}));
}
