// JavaScript google analytic
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22929321-1']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();



//Mon site Explorer 8 Change de navigateur ça urge
var navBoboch = window.navigator.appName;
var verBoboch = window.navigator.appVersion;
var navRegExp8 = new RegExp("msie [0-8]", "gi");
var affiNavReg8 = verBoboch.match(navRegExp8);


//Début du script onLoad
$(document).ready (function(){
	/*if (affiNavReg8){
		$('#realBody').prepend('<div id="ChangeNav"><img src="images/MainPic/warning-icon.png"/>La version '+navBoboch+' 8 ou antérieur ne vous permet pas de profiter au maximum des nouveautés du web utilisées sur ce site. Je vous suggère d\'utiliser <strong><a href="http://www.apple.com/fr/safari/" target="_blank">Safari</a>, <a href="http://www.mozilla.com/fr/firefox/" target="_blank">Firefox</a>, <a href="http://www.google.com/chrome/?hl=fr" target="_blank">Google Chrome</a>, <a href="http://www.opera.com/" target="_blank">Opera</a> ou <a href="http://windows.microsoft.com/en-us/internet-explorer/products/ie/home" target="_blank">'+navBoboch+' 9</a></strong>.</div>')
		$('#ChangeNav').click(function(){$('#ChangeNav').fadeOut('slow')});
		};*/

//Image BLOCKER + R-CLick
$(document)[0].oncontextmenu = function() { return false;}
	$('img').mousedown(function(e){
		  if( e.button == 2 ) {
			  alert('Ces images sont la propriété privée de Bernard Brault.\nphotobro@videotron.ca');
			  return false;
		  } else {
			  return true;
		  }
});

//Récuperation URL thumbnail dans le XML  
$('#screener').hide()
var MaPage = $("#content-scroll").attr('title');			
var MaSection = $("#content-scroll").attr('name');			//Récuperation URL image dans le XML      
var My1stWidth
$('#content-holder').load(MaPage);
$("#content-holder").ajaxComplete(function(load){				//chargement XML terminé    
	$(MaSection).each(function(i){
		$(this).wrapAll("<div  class=\"content-item\"></div>").delay(500);
		My1stWidth =$(this).width()+20;
		var MyWidth = ((($(this)[0].width+GalLoad())*i)+My1stWidth);
		$("#content-holder").css("width", MyWidth);
		});
	});

ScreenOut();
SeeThumb();
MaSouris();

$("#Logo").click(function(){
	if ($("#FirstMenu").css('bottom') == "0px"){
			$('#FirstMenu').animate({"bottom": "-280px"}, "slow");
			$('#TitreSection').fadeOut("slow");
			$('h3').fadeOut("slow");
			$('#ContactMoi').fadeOut("slow");
		}else{
			$('#FirstMenu').animate({"bottom": "0px"}, "slow");
			$('#TitreSection').fadeIn("slow");
			$('h3').fadeIn("slow");
			$('#ContactMoi').fadeIn("slow");
		};
	});
	
});
