
/* SCROLL */
$(document).ready(function(){
$('#pane1').jScrollPane();
$('#pane5').jScrollPane();
$('#pane3').jScrollPane();
});
/*
$(document).ready(function() {
$("ul#topnav #selezionato").show();
$("ul#topnav li").hover(function() {
$("ul#topnav li.sele").css({ 'background-image' : "url('APPLICAZIONI/BANCADICASCINA/stili/bancadicascina/immagini/g.gif')"});
$(this).css({ 'background-image' : 'url(APPLICAZIONI/BANCADICASCINA/stili/bancadicascina/immagini/g.gif)'}); //Hover over event on list item
//Add background color + image on hovered list item
$(this).find("span").show(); //Show the subnav
},function() { //on hover out...
$("ul#topnav li").css({ 'background-image' : "url('APPLICAZIONI/BANCADICASCINA/stili/bancadicascina/immagini/v.gif')"});
$("ul#topnav li.azzurro").css({ 'background-image' : "url('APPLICAZIONI/BANCADICASCINA/stili/bancadicascina/immagini/a.gif')"});
$("ul#topnav li.sele").css({ 'background-image' : "url('APPLICAZIONI/BANCADICASCINA/stili/bancadicascina/immagini/g.gif')"});
$(this).find("span").hide();
$("#selezionato").show();//Hide the subnav
});
});
*/
$(document).ready(function() {
$("#selezionato").show();
$("ul#topnav li").hover(function() {
$("#selezionato").hide();
$("ul#topnav li.sele").css({ 'background' : "#BEC1C0"});
$(this).css({ 'background' : "#BEC1C0"}); //Hover over event on list item
//Add background color + image on hovered list item
$(this).find("span").show(); //Show the subnav
},function() { //on hover out...
$("ul#topnav li").css({ 'background' : "#008C46"});
$("ul#topnav li.azzurro").css({ 'background' : "#324789"});
$("ul#topnav li.sele").css({ 'background' : "#BEC1C0"});
$(this).find("span").hide();
$("#selezionato").show();//Hide the subnav
});
});

$(document).ready(function(){		
$(".cover").stop().animate({top:'170px'},{queue:false,duration:160});
$(".coverm").stop().animate({top:'110px'},{queue:false,duration:160});
$(".coverbig").stop().animate({top:'290px'},{queue:false,duration:160});
				$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				});
				$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
				});
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
				});
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'190px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
				$('.boxgrid.captionfull').hover(function(){
					$(".coverm", this).stop().animate({top:'110px'},{queue:false,duration:160});
				}, function() {
					$(".coverm", this).stop().animate({top:'110px'},{queue:false,duration:160});
				});
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'110px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'170px'},{queue:false,duration:160});
				});
						$('.bigboxgrid.caption').hover(function(){
					$(".coverbig", this).stop().animate({top:'240px'},{queue:false,duration:160});
				}, function() {
					$(".coverbig", this).stop().animate({top:'290px'},{queue:false,duration:160});
				});


$('.slide_1').cycle({ 
cleartype:  1 ,
timeout:  3000,
speed: 1200
});
$('.pesci').cycle({ 
cleartype:  1 ,
timeout:  3000,
speed: 1200
});
$('.slide_gite').cycle({ 
cleartype:  1 ,
timeout:  4000,
speed: 1700
});
$('.slide_news').cycle({ 
cleartype:  1 ,
timeout:  4000,
speed: 1700
});
$('#slide_home').cycle({ 
cleartype:  1 ,
timeout:  11000,
speed: 1200
});


});



function apriGite(){
window.open('APPLICAZIONI/BANCADICASCINA/file/flash/calendario.html', 'gite','width=420, height=630');
}

function apriStatuto(){
window.open('APPLICAZIONI/BANCADICASCINA/file/flash/Statuto2011.html', 'Statuto 2011','width=1250, height=930');
}
function apriVideo(){
if(screen)
{
var L=screen.width/2-360;
var T=screen.height/2-320;
}
window.open('APPLICAZIONI/BANCADICASCINA/file/flash/video.html', 'gite','width=380, height=310 ,left='+L+',top='+T+'');
}

function apriPDF(file){
window.open(file, 'pdf','');
}

function apriJPG(file, w, h)
{
var dimensioni="'scroll=no, width="+w+",height="+h+"'";
var testo="<html><title>bancadicascina</title><body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"#FFF\"><div align=\"center\"><img src=\""+file+"\" border=\"0\"></div></body></html>";
var ident_finestra = window.open('', '', dimensioni);
ident_finestra.document.open();
ident_finestra.document.write(testo);
ident_finestra.document.close();
}


