var _gaq=_gaq||[];function CarSelectorUpdate(aUrl,aUpdLevel,aId,aSuffix){var url_extra='';if(aUpdLevel=='selector_brands'){var do_v='get_tunning_type_brands';var id_name='ttid';document.getElementById('selector_models'+aSuffix).value=0;document.getElementById('selector_series'+aSuffix).value=0;document.getElementById('selector_years'+aSuffix).value=0;document.getElementById('selector_models'+aSuffix).disabled=!0;document.getElementById('selector_years'+aSuffix).disabled=!0;if(tt_years[aId]=='no') document.getElementById('selector_years'+aSuffix).style.display="none";else{document.getElementById('selector_years'+aSuffix).style.display="inline"}} if(aUpdLevel=='selector_series'){var do_v='get_brand_series';var id_name='bid';document.getElementById('selector_models'+aSuffix).value=0;document.getElementById('selector_years'+aSuffix).value=0;document.getElementById('selector_models'+aSuffix).disabled=!0;document.getElementById('selector_years'+aSuffix).disabled=!0}else{if(aUpdLevel=='selector_years'){if(tt_years[document.getElementById('selector_cartypes'+aSuffix).value]=='yes'){var do_v='get_serie_years';var id_name='sid';document.getElementById('selector_models'+aSuffix).value=0;document.getElementById('selector_models'+aSuffix).disabled=!0}else{var do_v='get_serie_models';var id_name='sid';var url_extra='&ttid='+document.getElementById('selector_cartypes'+aSuffix).value;aUpdLevel='selector_models'}}else{if(aUpdLevel=='selector_models'){var do_v='get_year_models';var id_name='yid';var url_extra='&ttid='+document.getElementById('selector_cartypes'+aSuffix).value}}} $.ajax({url:aUrl+"?mod=car&do="+do_v+"&"+id_name+"="+aId+url_extra,success:function(data){$("#"+aUpdLevel+aSuffix).html(""+data+"");document.getElementById(aUpdLevel+aSuffix).disabled=!1}})} function CarSelectorCheck(aUrl){if(document.getElementById('selector_cartypes')){var tt_id=document.getElementById('selector_cartypes').value;var brand_id=document.getElementById('selector_brands').value;var serie_id=document.getElementById('selector_series').value;var year_id=document.getElementById('selector_years').value;var model_id=document.getElementById('selector_models').value;if(tt_id>0&&brand_id==0&&serie_id==0&&year_id==0) CarSelectorUpdate(aUrl,'selector_brands',tt_id,'');if(brand_id>0&&serie_id==0&&document.getElementById("selector_series").length==1) CarSelectorUpdate(aUrl,'selector_series',brand_id,'');if(serie_id>0&&year_id==0&&document.getElementById("selector_years").length==1&&tt_years[tt_id]=='yes') CarSelectorUpdate(aUrl,'selector_years',serie_id,'');if(year_id>0&&model_id==0&&document.getElementById("selector_models").length==1) CarSelectorUpdate(aUrl,'selector_models',year_id,'');if(tt_years[tt_id]=='no') document.getElementById('selector_years').style.display='none'}} function CarSelectorSetDefaultProduct(aUrl,aProduct,aId){console.log('aero');if(aProduct=='apt'||aProduct=='APtuning'){$.ajax({url:aUrl+"?mod=car&do=model_default_product_set&mid="+aId,success:function(jsonData){var jsonobj=JSON.parse(jsonData);for(var key in jsonobj){document.getElementById(key).value=jsonobj[key]}}})}} function ModelTuningStageBoxConfirm(aStage,aStageType){var f_confirm="model_stage_confirm_"+aStage+"_"+aStageType;$(f_confirm).style.display="block";setTimeout(function(){$(f_confirm).style.display="none"},5000)} function CarSelectRedirect(aUrl,aDomainId,aLangId,aPageType){var tt_id=document.getElementById('selector_cartypes').value;var brand_id=document.getElementById('selector_brands').value;var serie_id=document.getElementById('selector_series').value;var year_id=document.getElementById('selector_years').value;var model_id=document.getElementById('selector_models').value;var ajax_url=aUrl+"?mod=car&do=car_selector_redirect&ttid="+tt_id+"&bid="+brand_id+"&sid="+serie_id+"&yid="+year_id+"&mid="+model_id+"&domain_id="+aDomainId+"&lang_id="+aLangId;$.ajax({url:ajax_url,success:function(data){if(data!='noredirect'){if(aPageType=='') aPageType='StaticPage';ga('send','event','button','car selector','home');document.location.href=data+"#header"}else alert('Choose model first or at least brand!')}});return!1} function CarSelectRedirectAdwords(aAlert){var brand_id=document.getElementById('selector_brands').value;var serie_id=document.getElementById('selector_series').value;var year_id=document.getElementById('selector_years').value;var model_id=document.getElementById('selector_models').value;if(model_id==0) alert(aAlert)} function FaqShowAnswer(aId){var answer_div='faq_answer_'+aId;if(document.getElementById(answer_div)){if(document.getElementById(answer_div).style.display=='block') document.getElementById(answer_div).style.display='none';else document.getElementById(answer_div).style.display='block'}} function IsValidEmail(aEmail){var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;return reg.test(aEmail)} function IsValidPhone(aPhone){if(aPhone!=""){var goodChars="+ -1234567890()";var digitChars="1234567890";var digitCount=0;for(i=0;i=0)digitCount++}if(digitCount<9)return!1;return!0}else{return!1}} function SitemapToogle(aObj){if(document.getElementById(aObj)){if(document.getElementById(aObj).style.display=='block') document.getElementById(aObj).style.display='none';else document.getElementById(aObj).style.display='block'}} function FormEnableSubmit(aBtnId,aValue){document.getElementById(aBtnId).disabled=!1;document.getElementById(aBtnId).value=aValue} function FormEnableButton(aBtnId,aValue){document.getElementById(aBtnId).disabled=!1;document.getElementById(aBtnId).innerHTML=aValue} function geolocate(timezone,cityPrecision,objectVar){var api=(cityPrecision)?"ip-city":"ip-country";var domain='api.ipinfodb.com';var url="http://"+domain+"/v3/"+api+"/?key=7944df73c35d1f83b04c5c48ba81fc41dd88a83560169cb4fcee13dc6423c45d&format=json"+"&callback="+objectVar+".setGeoCookie";var geodata;var callbackFunc;var JSON=JSON||{};JSON.stringify=JSON.stringify||function(obj){var t=typeof(obj);if(t!="object"||obj===null){if(t=="string")obj='"'+obj+'"';return String(obj)}else{var n,v,json=[],arr=(obj&&obj.constructor==Array);for(n in obj){v=obj[n];t=typeof(v);if(t=="string")v='"'+v+'"';else if(t=="object"&&v!==null)v=JSON.stringify(v);json.push((arr?"":'"'+n+'":')+String(v))} return(arr?"[":"{")+String(json)+(arr?"]":"}")}};JSON.parse=JSON.parse||function(str){if(str==="")str='""';eval("var p="+str+";");return p};this.checkcookie=function(callback){geolocationCookie=getCookie('geolocation');callbackFunc=callback;if(!geolocationCookie){getGeolocation()}else{geodata=JSON.parse(geolocationCookie);callbackFunc()}} this.setGeoCookie=function(answer){if(answer.statusCode=='OK'){JSONString=JSON.stringify(answer);setCookie('geolocation',JSONString,365);geodata=answer;callbackFunc()}} this.getField=function(field){try{return geodata[field]}catch(err){}} function getGeolocation(){try{script=document.createElement('script');script.src=url;document.body.appendChild(script)}catch(err){}} function setCookie(c_name,value,expire){var exdate=new Date();exdate.setDate(exdate.getDate()+expire);document.cookie=c_name+"="+escape(value)+((expire==null)?"":";expires="+exdate.toGMTString())} function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length} return unescape(document.cookie.substring(c_start,c_end))}} return''}} function geolocation_store(aUrl){$.ajax({url:aUrl+"?mod=cms&do=geo_store",success:function(data){}})} function StageLevelUpdate(aStageLevel){console.log('stage level before change '+$('stage_level').value);$('stage_level').value=aStageLevel;console.log('stage level after change '+$('stage_level').value)};(function($,undefined){"use strict";var ver='2.9999.5';var finito=0;if($.support===undefined){$.support={opacity:!($.browser.msie)}} function debug(s){if($.fn.cycle.debug) log(s)} function log(){if(window.console&&console.log) console.log('[cycle] '+Array.prototype.join.call(arguments,' '))} $.expr[':'].paused=function(el){return el.cyclePause};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!='stop'){if(!$.isReady&&o.s){log('DOM not ready, queuing slideshow');$(function(){$(o.s,o.c).cycle(options,arg2)});return this} log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this} return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===!1) return;opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout) clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;this.cycleStop=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return} var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===!1) return;var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10) startTime=10;debug('first timeout: '+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards)},startTime)}})};function triggerPause(cont,byHover,onPager){var opts=$(cont).data('cycle.opts');var paused=!!cont.cyclePause;if(paused&&opts.paused) opts.paused(cont,opts,byHover,onPager);else if(!paused&&opts.resumed) opts.resumed(cont,opts,byHover,onPager)} function handleArguments(cont,options,arg2){if(cont.cycleStop===undefined) cont.cycleStop=0;if(options===undefined||options===null) options={};if(options.constructor==String){switch(options){case 'destroy':case 'stop':var opts=$(cont).data('cycle.opts');if(!opts) return!1;cont.cycleStop++;if(cont.cycleTimeout) clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;if(opts.elements) $(opts.elements).stop();$(cont).removeData('cycle.opts');if(options=='destroy') destroy(cont,opts);return!1;case 'toggle':cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);triggerPause(cont);return!1;case 'pause':cont.cyclePause=1;triggerPause(cont);return!1;case 'resume':cont.cyclePause=0;checkInstantResume(!1,arg2,cont);triggerPause(cont);return!1;case 'prev':case 'next':opts=$(cont).data('cycle.opts');if(!opts){log('options not found, "prev/next" ignored');return!1} $.fn.cycle[options](opts);return!1;default:options={fx:options}} return options}else if(options.constructor==Number){var num=options;options=$(cont).data('cycle.opts');if(!options){log('options not found, can not advance slide');return!1} if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return!1} options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0} if(typeof arg2=='string') options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return!1} return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===!0){var options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return!1} if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0} go(options.elements,options,1,!options.backwards)}}} function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter')}catch(smother){}}} function destroy(cont,opts){if(opts.next) $(opts.next).unbind(opts.prevNextEvent);if(opts.prev) $(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder) $.each(opts.pagerAnchors||[],function(){this.unbind().remove()});opts.pagerAnchors=null;$(cont).unbind('mouseenter.cycle mouseleave.cycle');if(opts.destroy) opts.destroy(opts)} function buildOptions($cont,$slides,els,options,o){var startingSlideSpecified;var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});var meta=$.isFunction($cont.data)?$cont.data(opts.metaAttr):null;if(meta) opts=$.extend(opts,meta);if(opts.autostop) opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype) opts.after.push(function(){removeFilter(this,opts)});if(opts.continuous) opts.after.push(function(){go(els,opts,0,!opts.backwards)});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($slides);if($cont.css('position')=='static') $cont.css('position','relative');if(opts.width) $cont.width(opts.width);if(opts.height&&opts.height!='auto') $cont.height(opts.height);if(opts.startingSlide!==undefined){opts.startingSlide=parseInt(opts.startingSlide,10);if(opts.startingSlide>=els.length||opts.startSlide<0) opts.startingSlide=0;else startingSlideSpecified=!0}else if(opts.backwards) opts.startingSlide=els.length-1;else opts.startingSlide=0;if(opts.random){opts.randomMap=[];for(var i=0;i=els.length) opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z;if(opts.backwards) z=first?i<=first?els.length+(i-first):first-i:els.length-i;else z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit){if(!opts.aspect){if(opts.width) $slides.width(opts.width);if(opts.height&&opts.height!='auto') $slides.height(opts.height)}else{$slides.each(function(){var $slide=$(this);var ratio=(opts.aspect===!0)?$slide.width()/$slide.height():opts.aspect;if(opts.width&&$slide.width()!=opts.width){$slide.width(opts.width);$slide.height(opts.width/ratio)} if(opts.height&&$slide.height()maxw?w:maxw;maxh=h>maxh?h:maxh} if(maxw>0&&maxh>0) $cont.css({width:maxw+'px',height:maxh+'px'})} var pauseFlag=!1;if(opts.pause) $cont.bind('mouseenter.cycle',function(){pauseFlag=!0;this.cyclePause++;triggerPause(cont,!0)}).bind('mouseleave.cycle',function(){if(pauseFlag) this.cyclePause--;triggerPause(cont,!0)});if(supportMultiTransitions(opts)===!1) return!1;var requeue=!1;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH===0&&this.cycleW===0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=!0;return!1}else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH)}}} return!0});if(requeue) return!1;opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout,10);if(opts.speed.constructor==String) opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10);if(!opts.sync) opts.speed=opts.speed/2;var buffer=opts.fx=='none'?0:opts.fx=='shuffle'?500:250;while((opts.timeout-opts.speed)=(els.length-1)?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)) init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return!1}} var e0=$slides[first];if(!opts.skipInitializationCallbacks){if(opts.before.length) opts.before[0].apply(e0,[e0,e0,opts,!0]);if(opts.after.length) opts.after[0].apply(e0,[e0,e0,opts,!0])} if(opts.next) $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});if(opts.prev) $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});if(opts.pager||opts.pagerAnchorBuilder) buildPager(els,opts);exposeAddSlide(opts,els);return opts} function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this)});$.each(opts.after,function(){opts.original.after.push(this)})} function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=!0;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(i=0;i=opts.fxs.length)) opts.lastFx=0;else if(!fwd&&(opts.lastFx===undefined||--opts.lastFx<0)) opts.lastFx=opts.fxs.length-1;fx=opts.fxs[opts.lastFx]} if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null} $.fn.cycle.resetState(opts,fx);if(opts.before.length) $.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])});var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])});if(!p.cycleStop){queueNext()}};debug('tx firing('+fx+'); currSlide: '+opts.currSlide+'; nextSlide: '+opts.nextSlide);opts.busy=1;if(opts.fxFn) opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx])) $.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else $.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent)}else{queueNext()} if(changed||opts.nextSlide==opts.currSlide){var roll;opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;opts.randomMap.sort(function(a,b){return Math.random()-0.5})} opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide) opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1}else if(opts.backwards){roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1}}else{roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1}}} if(changed&&opts.pager) opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);function queueNext(){var ms=0,timeout=opts.timeout;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);if(opts.fx=='shuffle') ms-=opts.speedOut}else if(opts.continuous&&p.cyclePause) ms=10;if(ms>0) p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards)},ms)}} $.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName)})};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!='none'&&(t-opts.speed)<250) t+=opts.speed;debug('calculated timeout: '+t+'; speed: '+opts.speed);if(t!==!1) return t} return opts.timeout} $.fn.cycle.next=function(opts){advance(opts,1)};$.fn.cycle.prev=function(opts){advance(opts,0)};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0} if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2) opts.randomIndex=els.length-2;else if(opts.randomIndex==-1) opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex]}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return!1;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return!1;opts.nextSlide=0}} var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)) cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,moveForward);return!1} function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);finito=1} $.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug('pagerAnchorBuilder('+i+', el) returned: '+a)}else if(finito!=1) a=''+(i+1)+'';if(!a) return;var $a=$(a);if($a.parents('body').length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(!0);$(this).append($clone);arr.push($clone[0])});$a=$(arr)}else{$a.appendTo($p)}} opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);var pagerFn=function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0} var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)) cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlidel?c-l:opts.slideCount-l;else hops=c=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])} if(v&&v!='transparent') return v} return'#ffffff'} $slides.each(function(){$(this).css('background-color',getBg(this))})} $.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=='undefined') opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(opts.slideResize&&w!==!1&&next.cycleW>0) opts.cssBefore.width=next.cycleW;if(opts.slideResize&&h!==!1&&next.cycleH>0) opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===!0?1:0));$(next).css('zIndex',opts.slideCount+(rev===!0?0:1))};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number') speedIn=speedOut=speedOverride;else speedIn=speedOut=1;easeIn=easeOut=null} var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb()})};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync) fn()});if(opts.sync)fn()};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={activePagerClass:'activeSlide',after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!$.support.opacity,cleartypeNoBg:!1,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:'fade',fxFn:null,height:'auto',manualTrump:!0,metaAttr:'cycle',next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:'click.cycle',pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:'click.cycle',random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:undefined,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);(function($){"use strict";$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after()}};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css({display:'block','opacity':1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css('zIndex',opts.slideCount+(rev!==!0?1:0));$(next).css('zIndex',opts.slideCount+(rev!==!0?0:1))});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display='block';opts.cssAfter.zIndex=0};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev) fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){if(opts.rev) fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,!1,!0);opts.animIn.width=next.cycleW});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width='show';opts.animOut.width=0};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,!0,!1);opts.animIn.height=next.cycleH});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height='show';opts.animOut.height=0};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,!0,!0,!0)});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=!0} opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++) opts.els.push($slides[i]);for(i=0;i1){var args=arguments;return this.each(function(){$.fn.rating.apply($(this),args)})};$.fn.rating[arguments[0]].apply(this,$.makeArray(arguments).slice(1)||[]);return this};var options=$.extend({},$.fn.rating.options,options||{});$.fn.rating.calls++;this.not('.star-rating-applied').addClass('star-rating-applied').each(function(){var control,input=$(this);var eid=(this.name||'unnamed-rating').replace(/\[|\]/g,'_').replace(/^\_+|\_+$/g,'');var context=$(this.form||document.body);var raters=context.data('rating');if(!raters||raters.call!=$.fn.rating.calls)raters={count:0,call:$.fn.rating.calls};var rater=raters[eid];if(rater)control=rater.data('rating');if(rater&&control) control.count++;else{control=$.extend({},options||{},($.metadata?input.metadata():($.meta?input.data():null))||{},{count:0,stars:[],inputs:[]});control.serial=raters.count++;rater=$('');input.before(rater);rater.addClass('rating-to-be-drawn');if(input.attr('disabled')||input.hasClass('disabled'))control.readOnly=!0;if(input.hasClass('required'))control.required=!0;rater.append(control.cancel=$('').mouseover(function(){$(this).rating('drain');$(this).addClass('star-rating-hover')}).mouseout(function(){$(this).rating('draw');$(this).removeClass('star-rating-hover')}).click(function(){$(this).rating('select')}).data('rating',control))};var star=$('');rater.append(star);if(this.id)star.attr('id',this.id);if(this.className)star.addClass(this.className);if(control.half)control.split=2;if(typeof control.split=='number'&&control.split>0){var stw=($.fn.width?star.width():0)||control.starWidth;var spi=(control.count%control.split),spw=Math.floor(stw/control.split);star.width(spw).find('a').css({'margin-left':'-'+(spi*spw)+'px'})};if(control.readOnly) star.addClass('star-rating-readonly');else star.addClass('star-rating-live').mouseover(function(){$(this).rating('fill');$(this).rating('focus')}).mouseout(function(){$(this).rating('draw');$(this).rating('blur')}).click(function(){$(this).rating('select')});if(this.checked)control.current=star;if(this.nodeName=="A"){if($(this).hasClass('selected')) control.current=star};input.hide();input.change(function(){$(this).rating('select')});star.data('rating.input',input.data('rating.star',star));control.stars[control.stars.length]=star[0];control.inputs[control.inputs.length]=input[0];control.rater=raters[eid]=rater;control.context=context;input.data('rating',control);rater.data('rating',control);star.data('rating',control);context.data('rating',raters)});$('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');return this};$.extend($.fn.rating,{calls:0,focus:function(){var control=this.data('rating');if(!control)return this;if(!control.focus)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.focus)control.focus.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]])},blur:function(){var control=this.data('rating');if(!control)return this;if(!control.blur)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.blur)control.blur.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]])},fill:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;this.rating('drain');this.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-hover')},drain:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.rater.children().filter('.rater-'+control.serial).removeClass('star-rating-on').removeClass('star-rating-hover')},draw:function(){var control=this.data('rating');if(!control)return this;this.rating('drain');if(control.current){control.current.data('rating.input').attr('checked','checked');control.current.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-on')}else $(control.inputs).removeAttr('checked');control.cancel[control.readOnly||control.required?'hide':'show']();this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly')},select:function(value,wantCallBack){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.current=null;if(typeof value!='undefined'){if(typeof value=='number') return $(control.stars[value]).rating('select',undefined,wantCallBack);if(typeof value=='string') $.each(control.stars,function(){if($(this).data('rating.input').val()==value)$(this).rating('select',undefined,wantCallBack)})}else control.current=this[0].tagName=='INPUT'?this.data('rating.star'):(this.is('.rater-'+control.serial)?this:null);this.data('rating',control);this.rating('draw');var input=$(control.current?control.current.data('rating.input'):null);if((wantCallBack||wantCallBack==undefined)&&control.callback)control.callback.apply(input[0],[input.val(),$('a',control.current)[0]])},readOnly:function(toggle,disable){var control=this.data('rating');if(!control)return this;control.readOnly=toggle||toggle==undefined?!0:!1;if(disable)$(control.inputs).attr("disabled","disabled");else $(control.inputs).removeAttr("disabled");this.data('rating',control);this.rating('draw')},disable:function(){this.rating('readOnly',!0,!0)},enable:function(){this.rating('readOnly',!1,!1)}});$.fn.rating.options={cancel:'Cancel Rating',cancelValue:'',split:0,starWidth:16};$(function(){$('input[type=radio].star').rating()})})(jQuery);$(document).ready(function(){$(window).scroll(function(){if($(this).scrollTop()>50){$('#back-to-top').fadeIn()}else{$('#back-to-top').fadeOut()}});$('#back-to-top').click(function(){$('#back-to-top').tooltip('hide');$('body,html').animate({scrollTop:0},800);return!1});$('#back-to-top').tooltip('show');if(!window.navigator){console.log("No window navigator");return} if(!navigator.serviceWorker){console.log("No navigator.serviceWorker");return} if(!window.caches){console.log("No window caches");return} var iOS=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if(iOS){console.log("iOS system detected: "+navigator.platform)}else{console.log("Non iOS system detected:"+navigator.platform)}});var tt_years=new Array();tt_years['1']='yes';tt_years['12']='no';tt_years['13']='no';tt_years['14']='yes';tt_years['15']='yes';tt_years['16']='yes';$(function(){$("img").unveil()});(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery)