/*
// CODICE JAVASCRIPT PER AD-WEBSIDE
// FRANCESCO CRINO' SVILUPPATORE NEOLABS.it
// www.neolabs.it
// info@neolabs.it
*/

/*$.validator.setDefaults({
	submitHandler: function() { 
	var f = document.commentForm;
	f.submit();
	}
});*/

/*function scrollWin(anc){
	target = $(anc);
	$('html, body').animate({
		scrollTop: target.offset().top
	}, 1000);
} 


 

$(document).ready(function() {
 
 $("#1bt").click(function() { scrollWin("#box_1"); });
 $("#2bt").click(function() { scrollWin("#box_2"); });
 $("#3bt").click(function() { scrollWin("#box_3"); });
 $(".top_bt").click(function() { scrollWin("#header"); });
 
/* $("#commentForm").validate();
  
});*/


$(document).ready(function() {
	 
	
	$("a#example1").fancybox();
	
	$(".fancy").fancybox();
	
	/*$.easing.elasout = function(x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	};
	
	$speedfactor = 10;

	$.easing.exponential = function (x, t, b, c, d, s) {
		t /= d/2;
		if (t < 1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b;
		t--;
		return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b;
	};

	$.easing.quadratic = function (x, t, b, c, d, s) {
		t /= d/2;
		if (t < 1) return c/2*t*t*t*t + b;
		t -= 2;
		return -c/2 * (t*t*t*t - 2) + b;
	};

	$.easing.sin = function (x, t, b, c, d, s) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	};
	
	$.scrollTo( 0 );
	
	$('#menu a').click(function(){
		$.scrollTo( this.hash, 1500, { easing:'quadratic' });
		return false;
	});*/
	
	 $("#clienti").click(function() { $.scrollTo( '#clienti', 1500, { easing:'quadratic' }) });
	
	$.fn.supersized.options = {  
				startwidth: 800,  
				startheight: 533,
				vertical_center: 1,
				slideshow: 1,
				navigation: 0,
				thumbnail_navigation: 0,
				transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
				pause_hover: 0,
				slide_counter: 1,
				slide_captions: 1,
				slide_interval: 6000,
				slides : [
					{image : 'slides/1.jpg', title : 'City Clock Tower'},
					{image : 'slides/2.jpg', title : 'Canal Park Fence'},  
					{image : 'slides/3.jpg', title : 'Old Train Tracks'},  
					{image : 'slides/4.jpg', title : 'Old Train Tracks'},
					{image : 'slides/5.jpg', title : 'Canal Park Fence'},  
					{image : 'slides/7.jpg', title : 'Old Train Tracks'},
					{image : 'slides/9.jpg', title : 'Old Train Tracks'},  
					{image : 'slides/11.jpg', title : 'Old Train Tracks'}
				]
	};
	
	$('#supersized').supersized();
	
});
