
$(document).ready(function(){updatenav();var havebrochures=$('#brochurecarouselcontent ul li');if(havebrochures.length>0){$("#brochurecarouselcontent").jCarouselLite({btnNext:"#brochurecarousel .next",btnPrev:"#brochurecarousel .prev",visible:1,speed:2000,easing:'easeInOutQuint'});}
$(".zoom").fancybox({'speedIn':600,'speedOut':200,'overlayShow':false,'padding':10,'autoScale':true,'autoDimensions':true,'titlePosition':'outside','titleShow':false});var havepressimages=$('#presscarousel img');if(havepressimages.length>0){var instanceOne=new ImageFlow();instanceOne.init({ImageFlowID:'presscarousel',reflections:false,imageFocusM:1.0,opacity:false,slider:false,startID:5,captions:false,xStep:100,circular:true,imageCursor:'pointer',preloadImages:true,onClick:function(){$.fancybox({'speedIn':600,'speedOut':200,'overlayShow':true,'padding':10,'autoScale':true,'autoDimensions':true,'titlePosition':'outside','titleShow':false,'href':this.src});}});}
$('#storeinvia').click(function(){var dove=$('#dove').val();var storermail=$('#mailrequest').val();var storeconfirm=$('#mailconfirm').val();var testo=$('#testo').val();var ischecked=$('#privacy').attr('checked');while(testo.indexOf("\n")!=-1){testo=testo.replace("\n","<br/>");}
if(dove.length<1){alert('Inserisci una regione italiana o stato estero');}else if(!storermail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)){alert('Indirizzo e-mail assente o non valido');}else if(storeconfirm!=storermail){alert('Indirizzo e-mail non corrispondente');}else if(!ischecked){alert('Accettare i termini sulla privacy');}else{var datastr='dove='+dove+'&storemail='+storermail+'&storeconfirm='+storeconfirm+'&testo='+testo;$("#store-risposta").html('invio in corso...');setTimeout("send('"+datastr+"')",2000);}});$('#cinvia').click(function(){var nome=$('#cnome').val();var cmail=$('#cmail').val();var cconfirm=$('#cconfirm').val();var cmessaggio=$('#cmessaggio').val();var ispchecked=$('#cprivacy').attr('checked');while(cmessaggio.indexOf("\n")!=-1){cmessaggio=cmessaggio.replace("\n","<br/>");}
if(nome.length<1||cmessaggio.length<1){alert('Mancano dati necessari al corretto invio del modulo');}else if(!cmail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)){alert('Indirizzo e-mail assente o non valido');}else if(cconfirm!=cmail){alert('Indirizzo e-mail non corrispondente');}else if(!ispchecked){alert('Accettare i termini sulla privacy');}else{var datastr='nome='+nome+'&cmail='+cmail+'&cconfirm='+cconfirm+'&cmessaggio='+cmessaggio;$("#contatti-risposta").html('invio in corso...');setTimeout("sendcontact('"+datastr+"')",2000);}});});var documentHeight=0;var topPadding=40;$(function(){updatenav();var h=location.hash;if(h){selecteditem(h);}else{selecteditem('#homepage');}
var offset=$("#navigation").offset();documentHeight=$('#container').height();$(window).scroll(function(){updatenav();var sideBarHeight=$("#navigation").height();if($(window).scrollTop()>offset.top){var newPosition=($(window).scrollTop()-offset.top)+topPadding;var maxPosition=documentHeight-(sideBarHeight+100);if(newPosition>maxPosition){newPosition=maxPosition;}
$("#navigation").stop().animate({marginTop:newPosition+'px'},{duration:2000,easing:'easeInOutQuint'});}else{$("#navigation").stop().animate({marginTop:0+'px'},{duration:2000,easing:'easeInOutQuint'});};});if(screen.width<=480||(screen.width>480&&screen.width<=1023)){$('#navigation li a,#live a,.navigation_head,#topcontacts').not('#live .bollasocial a').not('#navigation #menueboutique a').click(function(e){e.preventDefault();$('.sub',$(this).not('.navigation_head').parent()).slideToggle('slow');document.location=e.target.href;});}else{$('#navigation li a,#live a,.navigation_head,#topcontacts').not('#live .bollasocial a').not('#navigation #menueboutique a').click(function(e){e.preventDefault();$('.sub',$(this).not('.navigation_head').parent()).slideToggle('slow');var thehash=this.hash;$(window).scrollTo(this.hash,4000,{onAfter:function(thehash){location.hash=thehash;selecteditem(thehash);},easing:'easeInOutQuint'});});$('#homepage').parallax({"coeff":-0.3,"left":'50%'});$('.scarpa_home_1').parallax({"coeff":-0.8,"left":'50%',"start":600});$('#collectionswoman').parallax({"coeff":-0.3,"left":'50%','start':0});$('#collectionswoman #ombrascarpa,').parallax({"coeff":-0.8,"left":'50%','start':0});$('#collectionswoman #scarpa1_bg').parallax({"coeff":-0.3,"left":'50%','start':0});$('#celebrities .celeb_womanball').parallax({"coeff":-0.5,"left":'50%','start':0});$('#collectionsman').parallax({"coeff":-0.3,"left":'50%','start':0});$('#celebrities').parallax({"coeff":-0.3,"left":'50%'});$('#celebrities .celeb_scarpa2').parallax({"coeff":-0.9,"left":'50%','start':900});$('.bubble_celeb_1').parallax({"coeff":-0.8,"left":'50%'});$('#live').parallax({"coeff":-0.3,"left":'50%','start':0});$('#live .bollanews').parallax({"coeff":-0.4,"left":'50%','start':100});$('#live .bollafiere').parallax({"coeff":-0.6,"left":'50%','start':100});$('#news').parallax({"coeff":-0.3,"left":'50%','start':0});$('#newscarousel').parallax({"coeff":-0.6,"left":'50%','start':0});$('#news .newscarpa').parallax({"coeff":-0.9,"left":'50%','start':200});$('#brochure').parallax({"coeff":-0.3,"left":'50%','start':0});$('.broch_scarpa1').parallax({"coeff":-0.5,"left":'50%','start':330});$('.broch_scarpa2').parallax({"coeff":-0.9,"left":'50%','start':300});$('#backstage').parallax({"coeff":-0.3,"left":'50%','start':0});$('#backstage .donna_backstage').parallax({"coeff":-0.6,"left":'50%','start':200});$('#company').parallax({"coeff":-0.3,"left":'50%','start':0});$('#eventi').parallax({"coeff":-0.3,"left":'50%','start':0});$('#donna_eventi').parallax({"coeff":-0.7,"left":'50%','start':100});}
$("#mancarouselcontent li a").click(function(e){e.preventDefault();});var obj=$("#carouselcontent li a,#carouselcontent li a");var startlink=$(obj[0]).attr('rel');var startart=$(obj[0]).attr('title');$('#buybutton').attr('href',startlink);$('#buybutton em').html(startart);$("#carouselcontent").jCarouselLite({btnNext:"#boxcarousel .next",btnPrev:"#boxcarousel .prev",visible:3,speed:600,easing:'easeOutCubic',afterEnd:function(e){var link=$('a',e).attr('rel');var art=$('a',e).attr('title');$('#buybutton').attr('href',link);$('#buybutton em').html(art);}});$("#mancarouselcontent").jCarouselLite({btnNext:"#manboxcarousel .next",btnPrev:"#manboxcarousel .prev",visible:3,speed:600,easing:'easeOutCubic',afterEnd:function(e){var link=$('a',e).attr('rel');var art=$('a',e).attr('title');$('#buybutton').attr('href',link);$('#buybutton em').html(art);}});$("#sposacarouselcontent").jCarouselLite({btnNext:"#sposaboxcarousel .next",btnPrev:"#sposaboxcarousel .prev",visible:3,speed:600,easing:'easeOutCubic',afterEnd:function(e){var link=$('a',e).attr('rel');var art=$('a',e).attr('title');$('#buybutton').attr('href',link);$('#buybutton em').html(art);}});$("#gallerycontents").jCarouselLite({btnNext:"#gallery .next",btnPrev:"#gallery .prev",visible:1,speed:2000,easing:'easeInOutQuint'});$("#newscontent").jCarouselLite({btnNext:"#news .next",btnPrev:"#news .prev",visible:1,speed:2000,easing:'easeInOutQuint'});});function selecteditem(h){if(h){$('#navigation li a').removeClass('current-page');$('#navigation li a[href="'+h+'"]').attr('class','current-page');}else{$('#navigation li a').removeClass('current-page');$('#navigation li a[href="#homepage"]').attr('class','current-page');}}
function updatenav(){$('#navigation a').removeClass('current-page');var dst=$(window).scrollTop();var sectiontop1=$('#collectionswoman').offset().top;var sectiontop2=$('#collectionsman').offset().top;var sectiontop3=$('#collectionssposa').offset().top;var sectiontop4=$('#brochure').offset().top;var sectiontop5=$('#backstage').offset().top;var sectiontop6=$('#press').offset().top;var sectiontop7=$('#celebrities').offset().top;var sectiontop8=$('#live').offset().top;var sectiontop8bis=$('#live').offset().top;var sectiontop9=$('#boutique').offset().top;var sectiontop10=$('#company').offset().top;var sectiontop13=$('#contacts').offset().top;if(dst>=sectiontop1&&dst<sectiontop2||dst>=sectiontop2&&dst<sectiontop3||dst>=sectiontop3&&dst<sectiontop4){$('#menucollections a').addClass('current-page');}else if(dst>=sectiontop4&&dst<sectiontop5||dst>=sectiontop5&&dst<sectiontop6||dst>=sectiontop6&&dst<sectiontop7){$('#menuadvertising a').addClass('current-page');}}
function send(datastr){$.ajax({type:"POST",url:"sendmail.php",data:datastr,cache:false,success:function(html){$("#store-risposta").html(html);setTimeout('$("#store-risposta").html("");',2000);}});}
function sendcontact(datastr){$.ajax({type:"POST",url:"sendcontactmail.php",data:datastr,cache:false,success:function(html){$("#contatti-risposta").html(html);setTimeout('$("#contatti-risposta").html("");',2000);document.contactform.reset();}});}
