;///sites/zp/js/vehicle.js var puff_allow={};$(function(){$('.vehicle').each(function(){$(this).hide();var h=$(this).height();var w=$(this).width();h=Math.floor(h*0.5);w=Math.floor(w*0.5);$(this).height(h);$(this).width(w)});delay(function(){animate_vehicle('lr')},3000);delay(function(){animate_vehicle('rl')},7000)});function animate_vehicle(mode){var num=getRandomInt(1,10);speed=3;if(num==1||num==3||num==4)speed=10;if(num==2||num==7)speed=5;if(num==10)speed=3;var obj='#vehicle'+mode+num;var objname='vehicle'+mode+num;var veh_w=$(obj).width();if(mode=='lr'){$(obj).css('left','-'+veh_w+'px')}else{$(obj).css('left','auto').css('right','-'+veh_w+'px')} $(obj).show();var all_w=$(document).width();var tm=all_w*speed;var sdvig=all_w+veh_w;sdvig='+='+sdvig;if(mode=='lr'){var anim={left:sdvig};puff_allow.lr=objname;left_puff=0;if(num==4)left_puff=110;if(num==7)left_puff=150}else{var anim={right:sdvig};puff_allow.rl=objname;left_puff=veh_w;if(num==4)left_puff=veh_w-110;if(num==7)left_puff=veh_w-150} top_puff=40;if(num==2||num==8||num==6||num==9)top_puff=20;if(num==4||num==7)top_puff=120;if(num==5)top_puff=50;animate_puff(objname,top_puff,left_puff,all_w,veh_w,mode);$(obj).animate(anim,tm,'linear',function(){$(obj).hide();if(mode=='lr'){$(obj).css('left','-'+veh_w+'px');puff_allow.lr=''}else{$(obj).css('right','-'+veh_w+'px');puff_allow.rl=''} tm=getRandomInt(7,25)*1000;delay(function(){animate_vehicle(mode)},tm)})} function animate_puff(objname,top,left,all_w,veh_w,mode){var obj='#'+objname;var css=$(obj).css('display');var show_puff=!0;if(css=='none')show_puff=!1;var objPos=$(obj).offset();if(!objPos.left)objPos.left=0;if(objPos.left){var curleft=objPos.left;var max=all_w-veh_w-10;if(curleft<10||curleft>max)show_puff=!1;if(mode=='lr'&&puff_allow.lr=='')show_puff=!1;if(mode=='rl'&&puff_allow.rl=='')show_puff=!1;if(show_puff==!0)SmokeEffect(objname,left,top,curleft);var tm=getRandomInt(500,1500);delay(function(){animate_puff(objname,top,left,all_w,veh_w,mode)},tm)}} function SmokeEffect(objname,left,top,curleft){var puff=document.createElement("IMG");var tempId="puff"+Math.floor(Math.random()*1001);$('.vehicles').append($(puff));left=curleft+left;$(puff).attr("src",'/zp/images/smoke.png').attr("alt","puff").attr("class","puff").attr("id",tempId).css({bottom:top+"px",left:left+"px",zIndex:1020,opacity:0.4});$(puff).animate({width:54+"px",height:28+"px",marginLeft:"-"+(54/2)+"px",bottom:"+=20",opacity:0.9},{duration:1000}).animate({opacity:0,width:27+"px",height:14+"px",bottom:"+=20",left:"+=14"},2000,function(){$('#'+tempId).remove()})} ;///sites/zp/js/buttons.js?c=/sites/zp/js/vehicle.js $(function(){$('#iview').iView({fx:'random',easing:'easeOutQuad',strips:20,blockCols:10,blockRows:5,captionSpeed:500,captionEasing:'easeInOutSine',captionOpacity:0.9,animationSpeed:500,pauseTime:5000,startSlide:0,directionNav:!0,directionNavHoverOpacity:0.8,controlNav:!1,controlNavNextPrev:!0,controlNavHoverOpacity:0.8,controlNavThumbs:!1,controlNavTooltip:!1,autoAdvance:!0,keyboardNav:!0,touchNav:!0,pauseOnHover:!0,randomStart:!1,timer:'Pie',timerBg:'#000',});$('li.level0').each(function(index){var cl='btn_'+index;$(this).prop('id',cl)});$('li.level0').hover(function(){$('#iview').trigger('iView:pause');$('.iview-controlNav').css('z-index',10);$('.iview-directionNav').css('z-index',10);$('#iview-timer').css('z-index',10);var num=$(this).prop('id');anim_box(num)},function(){$('div.images-inner > div.images-inner-item > img').stop().css({opacity:0,left:0});$('div.images-inner > div.images-inner-item > .boxes').stop().css({opacity:0,right:'auto',left:50});$('.iview-controlNav').css('z-index',200);$('.iview-directionNav').css('z-index',200);$('#iview-timer').css('z-index',200);$('#iview').trigger('iView:play')})})