var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-19529233-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);
	})();

		$(document).ready(function() {
			$('body').append($('<div id="glossaire" class="infoGlossair png" style="position: absolute; display: none"><div class="infoGlossaire-top"></div><div class="infoGlossaire-body"><div class="infoGlossaire-title"></div><div class="infoGlossaire-desc"></div></div><div class="infoGlossaire-bottom"></div></div>'));

			Cufon.replace('.cufon', { fontFamily: 'Drescher Grotesk BT SemiBold' });
			Cufon.replace('h2.cufon.light', { fontFamily: 'Drescher Grotesk BT Light' });
			Cufon.replace('h1.cufon.light', { fontFamily: 'Drescher Grotesk BT Light' });
			Cufon.replace('h2.article', { fontFamily: 'Drescher Grotesk BT SemiBold', fontSize: '28px', textTransform: 'uppercase' });
			Cufon.replace('.cufon.semibold', { fontFamily: 'Drescher Grotesk BT SemiBold' });
			Cufon.replace('.colbox h2', { fontFamily: 'Drescher Grotesk BT SemiBold', fontSize: '22px' });


			$('.puced').wrap('<div />');

			$('<img src="/styles/images/list.png" alt="" class="puce" />').insertBefore('h2.puced');

			$('form.step input.submit').wrap('<span class="button" />');
			$('<span class="left" />').insertBefore('.step input.submit');
			$('<span class="right" />').insertAfter('.step input.submit');


			$('.rollContent').hide();
			$('.rollBlock h2').click(function () {

				if ( this.state ) {

					this.state = false;
					$(this.parentNode).children('div.rollContent').hide('slide');

				} else {

					this.state = true;
					$(this.parentNode).children('div.rollContent').show('slide');

				}

			});

			/*
			$('#promo.container').css({
				/backgroundImage : 'url("/styles/images/radius.png")',
				backgroundRepeat : 'no-repeat'
			})
			*/

			for ( var i = 1; i < 6; i++ ) {

				$('h' + i + ' a.glossary').each(function () {
					$('<span>' + $(this).text() + '</span>').insertAfter(this);
					$(this).remove();
				});

			}



			$('a.glossary').hover(function (e) {

				var off = $(this).offset();

				$('#glossaire').css({
					top: ( parseInt(off.top) + parseInt($(this).height()) ) + 'px',
					left: ( parseInt(off.left) + parseInt($(this).width()) ) + 'px'
				});

				var a = $(this).attr('href').match(/[0-9]*$/);

				$.get('/?page=ajax&art=' + a, function (e) {

					var a = eval('(' + e + ')');
					$('#glossaire .infoGlossaire-title').html(a.title);
					$('#glossaire .infoGlossaire-desc').html(a.text);
					$('#glossaire').show('slideUp');

				});

			}, function () {

				$('#glossaire').hide('slideDown');

			});

			/*, function (e) {



			});

			/* hover ie6 */
			$('ul.menu > li').hover(function () {

				$(this).addClass('hover');

			}, function () {

				$(this).removeClass('hover');

			});

			$('ul.menu > li > span').append('<em class="left"></em><em class="right"></em>');
			$('ul.menu > li > a').append('<em class="left"></em><em class="right"></em>');
			/*
			$('#promo').css({
				background: 'url("/styles/images/radius.png") no-repeat center -1px'
			});
			*/
		});

