// ********************************************************************************************************
// CONF AJAX

$.ajaxSetup( {	cache : false});
var ajax_load = "<div class='ajax_load'><p>Chargement&hellip;<br /><img class='loading' src='img/site2/ajax_load.gif' alt='Chargement...' /></p></div>";




/*-------------------------------------------------------------------------------------------------------------------------------------------------
Masque UNE DIV CIBLE  
-------------------------------------------------------------------------------------------------------------------------------------------------*/
function ToggleDiv(CIBLE) {
	var CIBLE;
	$(CIBLE).hide();
	return false;
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------
TOGGLE UNE DIV CIBLE 
-------------------------------------------------------------------------------------------------------------------------------------------------*/
function TogDiv(CIBLE) {
    var CIBLE;
    $(CIBLE).toggle();
    return false;
}




/*-------------------------------------------------------------------------------------------------------------------------------------------------
FB SHARE POP
-------------------------------------------------------------------------------------------------------------------------------------------------*/
function fbs_click() {
	u = location.href;
	t = document.title;
	window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u)+ '&t=' + encodeURIComponent(t), 'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}



/*-------------------------------------------------------------------------------------------------------------------------------------------------
SELECT INPUT ON FOCUS
 -------------------------------------------------------------------------------------------------------------------------------------------------*/
$(document).ready(function() {
	// Add this behavior to all text fields
		$("input[type=text]").focus(function() {
			// Select field contents
				this.select();
			});
	});



/*-------------------------------------------------------------------------------------------------------------------------------------------------
T O O L B O X   ARTICLE TABS
 -------------------------------------------------------------------------------------------------------------------------------------------------*/
function AfficherTool(CIBLE, TRIGGER) {
	//
	var CIBLE;
	var TRIGGER;
	//
	$('.tool').hide();
	//
	$(CIBLE).show();
	//
	$('.TOOLS').find('.ACTIF').removeClass('ACTIF');
	$(TRIGGER).addClass('ACTIF');
}

function ResetTool() {
	//
	$('.tool').hide();
	//
	$('.TOOLS').find('.ACTIF').removeClass('ACTIF');
}




/*-------------------------------------------------------------------------------------------------------------------------------------------------
 R E C H E R C H E
 -------------------------------------------------------------------------------------------------------------------------------------------------*/
function Rechercher(TRIGGER, CIBLE) {
 	//
	var QUOI = $('#' + TRIGGER).val();
	var CIBLE; // div
	//
	var URL = 'inc/PAGES/recherche/resultats.php';
	//
	$('#' + CIBLE).show().html(ajax_load).load(URL, {
		QUOI : QUOI
	});

	return false;
}









//
//AFFICHER   TAG
//
function AfficherTag(ID){
	//
	var ID;
	var url 	= 'inc/PAGES/themes/lies.php';
	//
	$('#tags-lies')
	.show()
	.html(ajax_load)
	.load(
			url ,
			{
				ID : ID 
			}	
	);	
	
	return false;	
}




// JS pour fleurs_de_saisons.php


function FermerDiv(CIBLE){
    
    var CIBLE;
    
    $(CIBLE).fadeOut(500);
    
    return false;
};

function AfficherDiv(CIBLE , RESET){
    
    FermerDiv(RESET)
    
    var CIBLE;
    
    $(CIBLE).fadeToggle(500);
    
    return false;
};




