/* Easy Slider 1.5 - cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.13.14=5(k){2 l={m:\'15\',O:\'16\',r:\'17\',P:\'18\',Q:n,R:\'\',S:\'\',G:n,o:\'19\',T:\'1a\',U:8,u:\'1b\',V:\'1c\',W:8,H:8,I:1d,J:8,K:1e,v:8};2 k=$.1f(l,k);X.1g(5(){2 f=$(X);2 s=$("4#9 4",f).1h;2 w=$("4#9 4",f).L();2 h=$("4#9 4",f).Y();f.L(w);f.Y(h);f.M("1i","1j");2 g=s-1;2 t=0;$("4#9",f).M(\'L\',s*w);3(!k.H)$("4#9 4",f).M(\'1k\',\'1l\');3(k.Q){2 i=k.R;3(k.U)i+=\'<7 z="\'+k.o+\'"><a A=\\"B:C(0);\\">\'+k.T+\'</a></7>\';i+=\' <7 z="\'+k.m+\'"><a A=\\"B:C(0);\\">\'+k.O+\'</a></7>\';i+=\' <7 z="\'+k.r+\'"><a A=\\"B:C(0);\\">\'+k.P+\'</a></7>\';3(k.W)i+=\' <7 z="\'+k.u+\'"><a A=\\"B:C(0);\\">\'+k.V+\'</a></7>\';i+=k.S;$(f).1m(i)};$("a","#"+k.r).D(5(){6("x",n)});$("a","#"+k.m).D(5(){6("Z",n)});$("a","#"+k.o).D(5(){6("10",n)});$("a","#"+k.u).D(5(){6("11",n)});5 6(a,b){2 c=t;1n(a){E"x":t=(c>=g)?(k.v?0:g):t+1;y;E"Z":t=(t<=0)?(k.v?g:0):t-1;y;E"10":t=0;y;E"11":t=g;y;1o:y};2 d=1p.1q(c-t);2 e=d*k.I;3(!k.H){p=(t*w*-1);$("4#9",f).6({1r:p},e)}N{p=(t*h*-1);$("4#9",f).6({1s:p},e)};3(!k.v&&k.G){3(t==g){$("a","#"+k.r).q();$("a","#"+k.u).q()}N{$("a","#"+k.r).F();$("a","#"+k.u).F()};3(t==0){$("a","#"+k.m).q();$("a","#"+k.o).q()}N{$("a","#"+k.m).F();$("a","#"+k.o).F()}};3(b)1t(j);3(k.J&&a=="x"&&!b){;j=12(5(){6("x",8)},d*k.I+k.K)}};2 j;3(k.J){;j=12(5(){6("x",8)},k.K)};3(!k.v&&k.G){$("a","#"+k.m).q();$("a","#"+k.o).q()}})}})(1u);',62,93,'||var|if|div|function|animate|span|false|slide|||||||||||||prevId|true|firstId||hide|nextId|||lastId|continuous||next|break|id|href|javascript|void|click|case|show|controlsFade|vertical|speed|auto|pause|width|css|else|prevText|nextText|controlsShow|controlsBefore|controlsAfter|firstText|firstShow|lastText|lastShow|this|height|prev|first|last|setTimeout|fn|easySlider|prevBtn|Previous|nextBtn|Next|firstBtn|First|lastBtn|Last|800|2000|extend|each|length|overflow|hidden|float|left|after|switch|default|Math|abs|marginLeft|marginTop|clearTimeout|jQuery'.split('|'),0,{}))

/* Shadowbox 3.0b - shadowbox-js.com */
Shadowbox.init({
	language:   "it",
	players:    ["img","html","iframe"] // flv,html,iframe,img,qt,swf,wmp
});

$(function(){
	
	/* Easy Slider
	-------------------------------------------------------------- */
	$("#catalog").easySlider({
		controlsBefore:	'<div id="slideBtn">',
		controlsAfter:	'</div>',
		prevId:			'slidePrevBtn',
		nextId:			'slideNextBtn'
	});
	$("#images").easySlider({
		auto:			true,
		continuous: 	true,
		controlsShow:	false
	});
	
	/* Altezza automatica #Page
	-------------------------------------------------------------- */
	$("#page, .darkPage").css("height",$(window).height()-160);
	$(window).resize(function(){
		$("#page, .darkPage").css("height",$(window).height()-160)
	});

	/* Setta personalizzazione pagina
	-------------------------------------------------------------- */
	var w = $(window).width();
	if (w < 1100){$("body").attr("id","tpl1024")};

	/* Contact Form
	-------------------------------------------------------------- */
	$("input:not([type=submit]), textarea, select", $("#formContact")).focus(function() {
		$(this).parent().parent().addClass("fieldFocus");
	}).blur(function(){
		$(this).parent().parent().removeClass("fieldFocus");
	});

	/* Shadowbox
	-------------------------------------------------------------- */
	Shadowbox.setup(".gallery a", { /* Catalogo Prodotti */
		title:		"",
		width:		560,
		height:		450,
		player:		'iframe'
    });
	Shadowbox.setup("#subscribe, #editprofile", { /* Catalogo Login */
		title:		"",
		width:		530,
		height:		410,
		player:		'iframe'
    });
	Shadowbox.setup("a.news", { /* News */
		title:		"",
		width:		400,
		height:		500
    });

});

