/*
 * jQuery Init
 *
 * Copyright (c) 2008 Kévin Levain
 * Dual licensed under GPL license.
 *
 * $Date: 2008-05-10 19:35:00 (Wed, 06 Feb 2008) $
 */
	
//gestion des typos :
Cufon.replace('#content h1');
Cufon.replace('#content h2');
Cufon.replace('#nav1');
Cufon.replace('#nav2');
Cufon.replace('#nav3');

$(document).ready(function(){
	//onSynchronousWindowChange();
	//gestion liens externes
	$('a.lien_ext').click(function(){
		this.target = "_blank";
	});
	
	//gestion de la hauteur de #wrapper
	/*function onSynchronousWindowChange() {
		//alert("I'm done resizing for the moment");
		var wH = $(window).height()-175;
		var dH = $('#wrapper').height();
		var wrapperHeight = dH;
		if(dH<wH){
			var wrapperHeight = wH;
		}
		$('#wrapper').height(wrapperHeight);
	};

	var resizeTimer = null;
	$(window).bind('resize', function() {
		if (resizeTimer) clearTimeout(resizeTimer);
		resizeTimer = setTimeout(onSynchronousWindowChange, 100);
	});*/
	
	
	//gestion appel vidéo home page
	$('#wrapper.home #video').flash(
		'http://www.salomonendurance.com/2010/swf/videoFlash.swf', {
		version: '10.0.0',
		params: {
			allowfullscreen: true,
			wmode: 'window',
			scale: 'exactfit',
			flashvars: 'playList=http://www.salomonendurance.com/2010/xml/embed.xml'
		},
		attr: {width: 640, height:  360}
	});
	$('#wrapper #article #video.small').flash(
		'http://www.salomonendurance.com/2010/swf/videoFlash.swf', {
		version: '10.0.0',
		params: {
			allowfullscreen: true,
			wmode: 'window',
			scale: 'exactfit',
			flashvars: 'playList=http://www.salomonendurance.com/2010/xml/embed.xml'
		},
		attr: {width: 468, height:  262}
	});

	//gestion des effect sur les boutons principaux
	/*$("#nav1 a").hover(function(){
		$(this).animate({
			paddingTop:'10px',
			height:'20px'
		}, 150);			
	},function(){
		//rollOut
		$(this).animate({
			paddingTop:'14px',
			height:'16px'
		}, 150);
	});*/
	
	/*$("a#blog").hover(function(){
		$(this).animate({
			top:'84px'
		}, 150);			
	},function(){
		//rollOut
		$(this).animate({
			top:'74px'
		}, 150);
	});*/
	
	/*$("#nav3 a").hover(function(){
		$(this).animate({
			color:'#FFF'
		}, 150);			
	},function(){
		//rollOut
		$(this).animate({
			color:'#F00'
		}, 150);
	});*/
	
	/*$("#map a").hover(function(){
		$(this).animate({
			color:'#F00'
		}, 150);			
	},function(){
		//rollOut
		$(this).animate({
			color:'#000'
		}, 150);
	});*/

});