$(document).ready(function(){

//DROPDOWN MENU INIT
ddsmoothmenu.init({
mainmenuid: "mainMenu", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

// PRETTY PHOTO INIT
$("a[rel^='prettyPhoto']").prettyPhoto();

// SHOW/HIDE FOOTER ACTIONS
$('#showHide').click(function(){	
	if ($("#footerActions").is(":hidden")) {
		$(this).css('background-position','0 0');
		$("#footerActions").slideDown("slow");
		
		} else {
		$(this).css('background-position','0 -16px') 
		$("#footerActions").hide();
		$("#footerActions").slideUp("slow");
		}
	return false;			   
});		

// TOP SEARCH 
$('#s').focus(function() {
		$(this).animate({width: "215"}, 300 );	
		$(this).val('')
});

$('#s').blur(function() {
		$(this).animate({width: "100"}, 300 );
		$(this).val('Recherche');
});

// QUICK CONTACT
var _labelName = 'votre nom';
var _labelEmail = 'votre courriel';
var _labelComment = 'votre message';

$('#quickName').val(_labelName);
$('#quickEmail').val('votre courriel');
$('#quickComment').val('votre message');

$('#quickName').focus(function() {
	if ($(this).val() == _labelName) {						   
		$(this).val('');
	}
});
$("#quickName").focusout(function() {
	if ($(this).val() == "") {
		$(this).val(_labelName);	
	}						  
});
$('#quickEmail').focus(function() {
	if ($(this).val() == _labelEmail) {	
		$(this).val('');
	}	
});
$("#quickEmail").focusout(function() {
	if ($(this).val() == "") {
		$(this).val(_labelEmail);	
	}						  
});
$('#quickComment').focus(function() {
	if ($(this).val() == _labelComment) {	
		$(this).val('');	
	}	
});
$("#quickComment").focusout(function() {
	if ($(this).val() == "") {
		$(this).val(_labelComment);	
	}						  
});




//SHARE LINKS
$('#shareLinks a.share').click(function() {
		if ($("#shareLinks #icons").is(":hidden")) {
		$('#shareLinks').animate({width: "625"}, 500 );
		$('#shareLinks #icons').fadeIn();
		$(this).text('[-] Partager & Marquer');
		return false;
		}else {
		$('#shareLinks').animate({width: "130"}, 500 );
		$('#shareLinks #icons').fadeOut();
		$(this).text('[+] Partager & Marquer');
		return false;	
		}
});




	  $('#quickContactForm').ajaxForm(function(data) {
		 if (data==1){
			 $('#success').fadeIn("slow");
			 $('#bademail').fadeOut("slow");
			 $('#badserver').fadeOut("slow");
			 $('#contact').resetForm();
			 }
		 else if (data==2){
				 $('#badserver').fadeIn("slow");
			  }
		 else if (data==3)
			{
			 $('#bademail').fadeIn("slow");
			}
		});
	  
	/* Tooltips */
	$(".infobulle").tooltip({ 
		opacity: 0.8, 
		effect: "fade",
		relative: true
	});
	
	/* OddEven */
	$(".tableautarif tr:odd, .tableaustandard tr:odd").addClass("odd");

	/* Toggle */
	$(".toggleIco").click( function() { 
		_h2 = $(this).parent('h2');
		_toggleIco = $(this);
		_toggleContent = _h2.next('.toggleContent');		
		if (_toggleContent.hasClass("ouvert")){
			_toggleContent.slideUp("slow");
			_toggleContent.addClass("ferme").removeClass("ouvert");
			_toggleIco.attr("src", "/wp-content/themes/boldywp/images/but_actions_afficher.png");
			_toggleIco.attr("alt", "Masquer");
			_toggleIco.attr("title", "Masquer");
		} else {
			_toggleContent.slideDown("slow");
			_toggleContent.addClass("ouvert").removeClass("ferme");
			_toggleIco.attr("src", "/wp-content/themes/boldywp/images/but_actions_masquer.png");
			_toggleIco.attr("alt", "Afficher");
			_toggleIco.attr("title", "Afficher");
		}
	});
	/*$(".toggleIco").each( function() { 
		_h2 = $(this).parent('h2');
		_toggleContent = _h2.next('.toggleContent');	
		if ($(this).hasClass("ouvert")){
		} else{
			_toggleContent.hide();
		} 
	
	});*/
	
	
	/* Fancy box */
	$(".tooltipTrigger, #inlinetest").fancybox({
		'hideOnContentClick': true,
		'type': 'inline',
		'autoDimensions': true,
		'hideOnContentClick':false,
		//'transitionIn'	:	'elastic',
		//'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'width'			: 	500,
		//'height'		:	'auto',
		'overlayColor'	: 	'#000',
		'padding'		:	20
		//'overlayShow'	:	false
	});




});
<!-- end document ready -->

<!-- PrettyPhoto init -->


