// JavaScript Document

  c = false;
  $(document).ready(function(){
							 
	$("#lbSearch").click(function() { // bind click event to link
		$("#lbSearch").addClass("hide");
		$("#q").focus();
	});
	$("#q").focus(function() { // bind click event to link
		$("#lbSearch").addClass("hide");
	});
	$("#q").blur(function() { // bind click event to link
		if(this.value == "") $("#lbSearch").removeClass("hide");
	});	
	$("#lingue").click(function() { // bind click event to link
		if(c)
			$("#lingue").removeClass("show");
		else
			$("#lingue").addClass("show");
		c=!c;
	});
	
	$(".int#slider").easySlider({
		auto: true,
		continuous: true 
	});
	$(".company#slider").easySlider({
		auto: true,
		continuous: true 
	});
	$(".home#slider").easySlider({
		auto: true,
		continuous: true,
		numeric: true
	});
	
	$("a[rel^='prettyPopin']").prettyPopin();
	$("a[rel^='prettyPhoto']").prettyPhoto({
		/* fast/slow/normal */
		animationSpeed: 'fast', 
		/* padding for each side of the picture */
		padding: 40, 
		/* Value betwee 0 and 1 */
		opacity: 0.45, 
		/* true/false */
		showTitle: true,
		/* true/false */
		allowresize: true,
		/* The separator for the gallery counter 1 "of" 2 */
		counter_separator_label: '/', 
		/* light_rounded / dark_rounded / light_square / dark_square */
		theme: 'light_rounded', 
		callback: function(){

		}
	});
	
	varq=$("#q").val();
	if(varq == "") $("#lbSearch").removeClass("hide");
	else $("#lbSearch").addClass("hide");
	
	
});
  
  function invia_form(nForm,aj)
  {
	if(aj==0)
		$("#"+nForm).submit();
  }
  
  
(function($){
	var initLayout = function() {
		$('#spaceG').spacegallery({loadingClass: 'loading'});
	};	
	EYE.register(initLayout, 'init');
})(jQuery)


