
var cook=0;

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
  {
  cook=1;//alert('Welcome again '+username+'!');
  }
else
  {
  username="beennhere" //prompt('Please enter your name:',"");
  if (username!=null && username!="")
    {
    setCookie('username',username);
    }
  }
}

checkCookie();

//*************************************************************************


var fla=0;

if(!FlashDetect.installed){
		fla=0;  
		 //alert("Flash is required to enjoy this site.");   
	}else{
		fla=1;      //alert("Flash is insalled on your Web browser."); 
	}


var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; //alert(is_chrome);
var is_safari = navigator.userAgent.toLowerCase().indexOf('safari') > -1; //alert(is_chrome);
var is_mac = navigator.appVersion.indexOf('Mac') > -1; //alert(is_mac);
var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; //alert(is_mac);

var IE = /*@cc_on!@*/false; //alert(IE);

$(document).ready(function(){


if(fla==0){
	$('#fla-men').hide();
	$('#menu-ul').css('z-index','99999');
	
	}

document.getElementById('entryB').style.top='11px';

/*
if(IE){ //height:868px; min-height:868px; max-height:868px;
	
	   document.getElementById('allcont').style.height='868px';
	document.getElementById('allcont').style.minHeight='868px';
	document.getElementById('allcont').style.maxHeight='868px';
	
	
	}
*/

//************************************************************


		document.body.style.height='100%';
		//$('#bod').css({height: '100%'});


//if($fla==1){
/*
var so = new SWFObject("Flash-menu.swf", "movie", "100%", "100%", "8", "#FFFFFF");
		so.addParam("quality", "high");
	    //so.addParam("scale", "noscale");
		so.addParam("menu", "false");
		so.addParam("wmode", "transparent");
		so.addVariable("p", getQueryParamValue("p"));
		so.write("menu");
*/
//$('#menu').show();
	if(cook==0){
		$('#top-ligne').fadeIn();
		$('#logo').fadeIn();
		$('#menu-ul').fadeIn();
		$(".foo").fadeIn();
		$('#newsplayer').fadeIn();
		//$('#pagcont').fadeIn();
	}
	else{
		$('#top-ligne').show();
		$('#logo').show();
		$('#menu-ul').show();
		$(".foo").show();
		$('#newsplayer').show();
		//$('#pagcont').show();
		}
/*}
else{
	if(cook==0){
		$('#top-ligne').fadeIn();
		$('#logo').fadeIn();
		$('#menu-ul').fadeIn();
		$(".foo").fadeIn();
		$('#newsplayer').fadeIn();
		//$('#pagcont').fadeIn();
	}
	else{
		$('#top-ligne').show();
		$('#logo').show();
		$('#menu-ul').show();
		$(".foo").show();
		$('#newsplayer').show();
		//$('#pagcont').show();
	}


}*/
//******************************************

  
  
 
 //$('#fbox').css({zIndex: 1000}); 


document.getElementById('cont11').style.display='none';
document.getElementById('cont11').style.visibility='visible';
$('#cont11').fadeIn();

showface();

shownews();  
/*
*/
/*
$("#testbut").click(function(){ hidenews();   }); 
$("#testbut2").click(function(){ shownews();   }); 
*/
///************************************************************
$("#ima1").click(function(){ window.open("faim-museau.php","_self"); }); 
$("#ima2").click(function(){ window.open("http://www.andreviger.qc.ca/","_blank"); }); 
$("#ima3").click(function(){ window.open("http://www.fabelta.com/","_blank"); }); 

$("#ima4").click(function(){ window.open("http://www.pamperyourpet.ca/","_blank"); }); 
/*$("#ima5").click(function(){ window.open("http://www.nortop.ca/","_blank"); }); 
$("#ima6").click(function(){ window.open("http://www.coffretsprestige.com/","_blank"); }); 
$("#ima7").click(function(){ window.open("http://www.louisevadnais.ca/","_blank"); }); 
$("#ima9").click(function(){ window.open("http://www.boutiquemijo.com/","_blank"); }); 
$("#ima11").click(function(){ window.open("http://www.recto.ca/","_blank"); }); 
*/

//**********************************************
/*
  $("#ipho").mouseenter(function(){ //alert("qui");
  	$(this).animate({bottom: '260px'}, 600); 
	//$(this).animate({left: "4"}, "fast");
   });
   
     $("#ipho").mouseleave(function(){
  	$(this).animate({bottom: '466px'}, 400);
	//$(this).animate({left: "0"}, "fast");
   });
*/
//*******************************************************  

$("#ipho").hover(function() {
	$(this).animate({bottom: '315px'}, 300); } 
	
	, function() {
	$(this).animate({bottom: '466px'}, 300); 
});

$("#ipho").click(function(){ window.open("services_mobile.php","_self"); });

//*********************************************************************************************



//alert($("#mid").height());

var h= $("#mid").height() + 53;//68;// - 163;//332; //312;
var hpx= h + 'px';

$("#seedling-p").css('height',hpx);

if(IE){
	h=h-3; hpx= h + 'px';
	$("#seedling-p").css( {left : '143px', bottom : '4px', height : hpx} );}

//alert($("#seedling-p").height());
//***********************************************************
if(is_chrome){
	h= h+5; hpx= h + 'px';
	$("#seedling-p").css('height',hpx);
	}

if(is_safari){
	h= h+2; hpx= h + 'px';
	$("#seedling-p").css('height',hpx);
	}


if(is_mac){ $(".boldBut").css( {fontWeight : '500', fontSize : '7px'} );//.css('font-weight','500'); 

			if(is_firefox){ 
				h= h-2; hpx= h + 'px';
				$("#seedling-p").css('height',hpx);
				$("#txt-slide2").css('bottom','25px');
			}
}

//$("#bot-foot").css('bottom','25px');

//*******************************************

var v=0;

$("#voir").click(function(){
  if(v==0){
	  h= h+ 380;  hpx= h + 'px';
	  $("#logos").animate({
		//marginBottom: "25px",
		height: "445px"
	  }, 1000 );
	  
	  $("#seedling-p").animate({
		//marginBottom: "25px",
		height: hpx
	  }, 1000 );
	  
	  $(this).children().eq(0).html('Voir moins');
	  v=1;
	  
		
  }
  else{
	   h= h- 380;  hpx= h + 'px';
	  $("#logos").animate({
		//marginBottom: "25px",
		height: "65px"
	  }, 1000 );
	  
	  $("#seedling-p").animate({
		//marginBottom: "25px",
		height: hpx
	  }, 1000 );
	  
	 $(this).children().eq(0).html('Voir plus');
	  v=0;
	  
		
  }
});



   
});
