/*
On red�finit certaines fonctions du moteur jquery pour pouvoir les utiliser n'importe quand dans notre code
Appel de ces fonctions : 
$.get_host()
$.get_surface_ecran()
*/
$(document).ready(function() {
	jQuery.extend({
		get_host: function() { 
			var sHostToReturn = "http://";
	  		var sHost = window.location.host;
	  		
	  		if(sHost == "127.0.0.1") { sHostToReturn =  sHostToReturn + sHost + "/www.groupemonceaufleurs.com/"; }
	  		else { sHostToReturn =  sHostToReturn + sHost + "/"; }
	  		
	  		return sHostToReturn; 
		},
		get_surface_ecran: function() {
			var oDivFooter = $('#footer'); //Mise en variable de l'�l�ment footer
			var iHeightDivFooter = oDivFooter.height(); //r�cup�ration de la hauteur de l'�l�ment
			var aOffsetDivFooter = oDivFooter.offset(); //R�cup�ration du top et du left
			var iTopDivFooter = aOffsetDivFooter.top; //R�cup�ration du top
			var iScreenWidth = screen.width; //Longueur de l'�cran
			
			var iWidthLoading = iScreenWidth;
			var iHeightLoading = iTopDivFooter + iHeightDivFooter;
			
			return  {width: iScreenWidth + "px", height: iHeightLoading + "px"};
		},
		init_anim_flash: function() {			
			var so = new SWFObject("files/ANIMATION/smart-banner.swf", "myMovie", "940", "180", "8", "#FFFFFF");  <!-- If you change the canvas size of your flash piece in the FLA file you'll need to change the dimension of the flash piece here too -->
			so.addVariable("XMLpath", "files/ANIMATION/smart-banner.xml"); 
			so.write("smart-banner");				
		}
	});
});
