/* 
	childWeb:	SIDNI - Sigurnost djece na internetu;
	parentWeb:	UID - Udruga Informaticara Djakovo;
	contact:	uidj@uidj.hr
*/

$(document).ready(function(){
	$("body").addClass("js-enabled");
	if ($("#home").length) {
		$("#home #items a").attr("tabindex","-1");
	}
	
	// Easy InOut from George McGinley's jQuery Easing v1.3
	$.easing.easeInOutExpo = function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	}
	
	// scrooling
	$("#home #items-wrapper").scrollable({
		size: 1,
		clickable: false,
		keyboard: 'static',
		easing: 'easeInOutExpo', 
		speed: 1200,
		loop: true
	}).navigator({
		navi: "#navigator"
	}).autoscroll({
		interval: 12000,
		autopause: true
	});
});
