$(function(){
	var nav_selector = $('#header div#topmenu div#navigation ul.navigation_niv_1 li').not(':first').find('a:eq(0)');
    Cufon.replace(nav_selector);
    Cufon.replace('.header_block p.right, .header_block p.left, .haut_article, h2.entries-heading, h2.carousel-heading, .entries .entry h3, h3.note-ateliers, .bloc_article h1, .bloc_article h3, .bloc_free_content h2, .bloc_free_content h3, .bloc_free_content h1, .block-freeContent h2, .block-freeContent h3, .block-freeContent h1, .article_list h1, .attribute-header h1, .block-partnerFolder h2');
   
   	$('.item.type_communique-de-presse, .item').live('click', function() {
		var href = $(this).find('a').attr('href');
		location.href= href;
		self.focus();
	});
	
		
	$('.entries .entry').hover(function(){
		$(this).addClass('entry-hover');
	},function(){
		$(this).removeClass('entry-hover');
	});
	
	$('.entries .entry').click(function(){
		var href = $(this).find('a.more').attr('href');
		window.location = href;
	});
	
	$('.block-quicklinks ul li').hover(function(){
		$(this).addClass('hovered');
	},function(){
		$(this).removeClass('hovered');
	});
	
	
	$('#boutique').boutique({
		container_width: 640,
		front_img_width: 220,
		front_img_height: 220,
		starter: 1,
		speed: 900,
		hoverspeed: 200,
		hovergrowth: 0.04,
		behind_opac: 0.5,
		back_opac: 0.2,
		behind_size: 0.8,
		back_size: 0.5,
		autoplay: true,
		autointerval: 3000,
		freescroll: false
	});
	
	$('.entries .entry').hover(function() {
		$('.entries .entry').not($(this)).addClass('entry-nothover');
	}, function() {
		$('.entries .entry').not($(this)).removeClass('entry-nothover');
	});
	
	
	$('#header div#topmenu div#navigation li').hover(function(){
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');
	});
	
	if($.browser.msie && $.browser.version==6)
	{
		DD_belatedPNG.fix('.#header div#topmenu, #header div#topmenu div#navigation li.first a, .header_block p span, .entries a.more, .block-quicklinks ul li, .block-quicklinks ul li a, .carousel, #footer, #footer img, span.footer-plus');
	}
	
})

jQuery(document).ready(function($) {
	
	$('#header .search_field').attr('title','Rechercher...').attr('value','Rechercher...');
	$('.blink, .search_field').live('focus', function () {
		if ($(this).val() == $(this).attr('title')) {
			$(this).val('');
		}
	}).live('blur', function () {
		if ($(this).val() == '') {
			$(this).val($(this).attr('title'));
		}
	});
	
});


var _marinClientId = "1535cxp11180";
var _marinProto = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + _marinProto + "tracker.marinsm.com/tracker/" +
_marinClientId + ".js' type='text/javascript'%3E%3C/script%3E"));

try {
_marinTrack.trackPage();
} catch(err) {}


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-3239722-17']);
  _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);
  })();
