<!-- $Id: head_javascript.tt2 12720 2016-03-04 14:28:21Z lumineau $ -->
[%#
## DEVELOPMENT WARNING
## Don't add javascript to this file, except if you need to initialize
## variables using TT2 parsing.
## Use the src/etc/script/js/sympa.js file instead to write your scripts.
#%]
<script>
<!--
// this script only contains variable initializations.

// Miscellaneous vars
var path_cgi = '[% path_cgi %]/';
var lang = '[% lang %]';
//-->
</script>

<script>
<!--
// A few configuration settings
var CROSSHAIRS_LOCATION = '[% icons_url %]/crosshairs.png';
var HUE_SLIDER_LOCATION = '[% icons_url %]/h.png';
var HUE_SLIDER_ARROWS_LOCATION = '[% icons_url %]/position.png';
var SAT_VAL_SQUARE_LOCATION = '[% icons_url %]/sv.png';

// Variables used by the calendar js.
var pDefaut = { 
	"mois" : "[%|loc%]January:February:March:April:May:June:July:August:September:October:November:December[%END%]".split(":"),
	"jour" : "[%|loc%]Sun:Mon:Tue:Wed:Thu:Fri:Sat[%END%]".split(":"),
	"jLib" : "[%|loc%]Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday[%END%]".split(":"),
	"titre" : "[%|loc%]Calendar[%END%]",
	"aujourdhui" : "[%|loc%]today[%END%]",
	"debutSemaine" : 0,                      /*debut de la semaine 0=lun,1=mar,...*/
	"jPause" : {6:true,0:true},              /*jour de pause de la semaine (samedi & dimanche)*/
	"jFeriee": {"1-1":"Jour de l'an","1-5":"Fête du travail","8-5":"Armistice 39-45","14-7":"Fête nationale","15-8":"Ascension","1-11":"Armistice 14-18","11-11":"Toussaint","25-12":"Noël"} ,
	"moisMoins" : "<", "moisPlus" : ">",     /*navigation par mois*/ 
	"anneeMoins" : "<<", "anneePlus" : ">>", /*navigation par annee*/
	"format" : "%j-%m-%a",                   /*format de sortie : %j = jour, %m = mois, %a =année*/ 
	"date" : null, "ddeb" : "", "dfin" : "",
	"dateMin" : null, "dateMax" : null
}


var param_ddeb = {"dfin" : "date_fin", "titre" : "[%|loc%]Start date[%END%]" };
var param_dfin = {"ddeb" : "date_deb", "titre" : "[%|loc%]End date[%END%]"  };

var tempo = new Array(); /*gestion de la fermeture des calendriers quand on perd le focus*/
var nomove={"TR":0,"CENTER":0,"B":0,"P":0,"U":0,"I":0,"DIV":0,"A":0,"FONT":0,"LI":0,"PRE":0,"SPAN":0,"SUB":0,"SUP":0,"FORM":0};
//var nomove={"TD":0,"TABLE":0};

//-->
</script>

<!-- Now retrieving the javascript files -->

<script src="[% static_content_url %]/external/jquery.js"></script>

<script src="[% static_content_url %]/external/jquery-ui.js"></script>

<script src="[% static_content_url %]/external/jquery.jqplot.min.js"></script>
<script src="[% static_content_url %]/external/jqplot.categoryAxisRenderer.min.js"></script>
<script src="[% static_content_url %]/external/jqplot.barRenderer.min.js"></script>
<script src="[% static_content_url %]/external/jqplot.canvasAxisTickRenderer.min.js"></script>
<script src="[% static_content_url %]/external/jqplot.canvasTextRenderer.min.js"></script>

<script src="[% static_content_url %]/js/sympa.js"></script>

<!-- Foundation and other ui adaptation -->
<!--[if lt IE 9]>
<script type="text/javascript" src="[% static_content_url %]/external/html5shiv/html5shiv.js"></script>
<![endif]-->
<script type="text/javascript" src="[% static_content_url %]/external/respondjs/respond.min.js"></script>
<script src="[% static_content_url %]/external/foundation/js/vendor/modernizr.js"></script>
<script src="[% static_content_url %]/external/foundation/js/vendor/fastclick.js"></script>
<script src="[% static_content_url %]/external/foundation/js/vendor/placeholder.js"></script>
<!--<script src="[% static_content_url %]/external/foundation/js/vendor/jquery.js"></script>-->
<script src="[% static_content_url %]/external/foundation/js/foundation/foundation.js"></script>
<script src="[% static_content_url %]/external/foundation/js/foundation/foundation.topbar.js"></script>
<script src="[% static_content_url %]/external/foundation/js/foundation/foundation.reveal.js"></script>
<script src="[% static_content_url %]/external/foundation/js/foundation/foundation.tooltip.js"></script>
<script src="[% static_content_url %]/external/foundation/js/foundation/foundation.accordion.js"></script>
<script src="[% static_content_url %]/external/foundation/js/foundation/responsive-tables.js"></script>
<script>
$(
function () {
// Loading foundation
$(document).foundation({
    topbar: {
        back_text: '<i class="fa fa-undo"></i> [%|loc%]Back[%END%]'
    }
});

    /*Top Button*/ 
    $(document).on( 'scroll', function(){

            if ($(window).scrollTop() > 100) {
                    $('.scroll-top-wrapper').addClass('show');
            } else {
                    $('.scroll-top-wrapper').removeClass('show');
        }
    });

    $('.scroll-top-wrapper').on('click', scrollToTop);

    /* Correction of disapeared top-bar-dropdown menu on input lost focus */
    $('#login-dropdown').removeClass('not-click').on('mouseover', function () {
        $(this).addClass('hover');
    }).on('mouseout', function (e) {
        if (e.relatedTarget && !$('#login-dropdown').has(e.relatedTarget).length) {
            if($(e.target).is(':input'))
                $(e.target).blur();
            
            $(this).removeClass('hover');
        }
    });

    });


function scrollToTop() {
	verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0;
	element = $('body');
	offset = element.offset();
	offsetTop = offset.top;
	$('html, body').animate({scrollTop: offsetTop}, 500, 'linear');
}
</script>


[% IF use_html_editor -%]
<script src="[% html_editor_url %]"></script>
<script>
<!--
[% html_editor_init %];
//-->
</script>
[% END -%]
<!-- end head_javascript.tt2 -->
