PageSourceSearch

https://www.prostoy.ru/theme/js/templates/template.js

js prostoy.ru collected 2026-09-26 06:56:16 UTC 260,611 bytes, 612 lines download raw bytes

1(function(){var _find,_user_agent;window.device={};_user_agent=window.navigator.userAgent.toLowerCase();device.ios=function(){return device.iphone()||device.ipod()||device.ipad();};device.iphone=function(){return _find('iphone');};device.ipod=function(){return _find('ipod');};device.ipad=function(){return _find('ipad');};device.android=function(){return _find('android');};device.androidPhone=function(){return device.android()&&_find('mobile');};device.androidTablet=function(){return device.android()&&!_find('mobile');};device.blackberry=function(){return _find('blackberry')||_find('bb10')||_find('rim');};device.blackberryPhone=function(){return device.blackberry()&&!_find('tablet');};device.blackberryTablet=function(){return device.blackberry()&&_find('tablet');};device.windows=function(){return _find('windows');};device.windowsPhone=function(){return device.windows()&&_find('phone');};device.windowsTablet=function(){return device.windows()&&_find('touch');};device.fxos=function(){return _find('(mobile; rv:')||_find('(tablet; rv:');};device.fxosPhone=function(){return device.fxos()&&_find('mobile');};device.fxosTablet=function(){return device.fxos()&&_find('tablet');};device.mobile=function(){return device.androidPhone()||device.iphone()||device.ipod()||device.windowsPhone()||device.blackberryPhone()||device.fxosPhone();};device.tablet=function(){return device.ipad()||device.androidTablet()||device.blackberryTablet()||device.windowsTablet()||device.fxosTablet();};device.portrait=function(){return Math.abs(window.orientation)!==90;};device.landscape=function(){return Math.abs(window.orientation)===90;};device.app=function(ios,android){if(ios!==false&&device.ios()){$('.smartbanner .smartbanner__button').attr('href',ios);$('.smartbanner .smartbanner__android_text').remove();$('.smartbanner').show();$('.navbar-fixed-top').attr('style','top: 64px;');$('body').attr('style','padding-top: 64px;');$('header nav').addClass('nav_top');}
2if(android!==false&&device.android()){$('.smartbanner .smartbanner__button').attr('href',android);$('.smartbanner .smartbanner__ios_text').remove();$('.smartbanner').show();$('.navbar-fixed-top').attr('style','top: 64px;');$('body').attr('style','padding-top: 64px;');$('header nav').addClass('nav_top');}};$('.smartbanner__exit').click(function(){$('.navbar-fixed-top, body').removeAttr('style');$('.smartbanner').hide();$('header nav').removeClass('nav_top');});_find=function(needle){return _user_agent.indexOf(needle)!==-1;};}).call(this);;var Loader=new function(){var instance;var _private={};_private.js={};_private.css={};_private.php={};_private.isResourceLoaded=function(link,type){if(_private[type][link])
3return true;else
4return false;}
5_private.appendScript=function(link){try{document.write("<scr"+"ipt type='text/javascript' src='"+link+"'></scr"+"ipt>");}
6catch(e){}}
7_private.appendLink=function(link){try{document.write("<li"+"nk type='text/css' rel='stylesheet' media='screen' href='"+link+"'></li"+"nk>");}
8catch(e){}}
9function Loader(){if(!instance)
10instance=this;else return instance;}
11Loader.prototype.add=function(link){var type=link.split(".");type=type[type.length-1];if(!_private.isResourceLoaded(link,type)){_private[type][link]=true;switch(type){case"css":_private.appendLink(link);break;case"js":_private.appendScript(link);break;case"php":_private.appendScript(link);break;}}}
12return Loader;};var loader=function(link){var ld=new Loader();ld.add(link);};loader("/svn_libraries/tipsy/jquery.tipsy.js");loader("/svn_libraries/tipsy/tipsy.css");loader("/svn_scripts/users/Authorization.class.php");loader("/svn_css/users.css");$(document).ready(function(){var auth=new Authorization();auth.init();});;
13/*!
14* FitVids 1.1
15*
16* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
17* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
18* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
19*
20*/
21;(function($){'use strict';$.fn.fitVids=function(options){var settings={customSelector:null,ignore:null};if(!document.getElementById('fit-vids-style')){var head=document.head||document.getElementsByTagName('head')[0];var css='.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';var div=document.createElement("div");div.innerHTML='<p>x</p><style id="fit-vids-style">'+css+'</style>';head.appendChild(div.childNodes[1]);}
22if(options){$.extend(settings,options);}
23return this.each(function(){var selectors=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]','object','embed'];if(settings.customSelector){selectors.push(settings.customSelector);}
24var ignoreList='.fitvidsignore';if(settings.ignore){ignoreList=ignoreList+', '+settings.ignore;}
25var $allVideos=$(this).find(selectors.join(','));$allVideos=$allVideos.not('object object');$altemplate.jslVideos=$allVideos.not(ignoreList);$allVideos.each(function(count){var $this=$(this);if($this.parents(ignoreList).length>0){return;}
26if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){return;}
27if((!$this.css('height')&&!$this.css('width'))&&(isNaN($this.attr('height'))||isNaN($this.attr('width'))))
28{$this.attr('height',9);$this.attr('width',16);}
29var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'),10))))?parseInt($this.attr('height'),10):$this.height(),width=!isNaN(parseInt($this.attr('width'),10))?parseInt($this.attr('width'),10):$this.width(),aspectRatio=height/width;if(!$this.attr('id')){var videoID='fitvid'+count;$this.attr('id',videoID);}
30$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top',(aspectRatio*100)+'%');$this.removeAttr('height').removeAttr('width');});});};})(window.jQuery||window.Zepto);;
31/*!
32 * Bootstrap v3.3.2 (http://getbootstrap.com)
33 * Copyright 2011-2015 Twitter, Inc.
34 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
35 */
36if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.2",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;
vendor: 4,123 bytes, line 36
36e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.2",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});
vendor: 5,084 bytes, line 36
36if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.2",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","fal
36se"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.2",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("key
36down.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.2",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=
vendor: 9,756 bytes, line 36
36parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=this.tip(),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.2",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.2",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.2",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
36e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.2",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);;(function($){"use strict";var methods={init:function(options){var form=this;if(!form.data('jqv')||form.data('jqv')==null){options=methods._saveOptions(form,options);$(document).on("click",".formError",function(){$(this).fadeOut(150,function(){$(this).closest('.formError').remove();});});}
37return this;},attach:function(userOptions){var form=this;var options;if(userOptions)
38options=methods._saveOptions(form,userOptions);else
39options=form.data('jqv');options.validateAttribute=(form.find("[data-validation-engine*=validate]").length)?"data-validation-engine":"class";if(options.binded){form.on(options.validationEventTrigger,"["+options.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",methods._onFieldEvent);form.on("click","["+options.validateAttribute+"*=validate][type=checkbox],["+options.validateAttribute+"*=validate][type=radio]",methods._onFieldEvent);form.on(options.validationEventTrigger,"["+options.validateAttribute+"*=validate][class*=datepicker]",{"delay":300},methods._onFieldEvent);}
40if(options.autoPositionUpdate){$(window).bind("resize",{"noAnimation":true,"formElem":form},methods.updatePromptsPosition);}
41form.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",methods._submitButtonClick);form.removeData('jqv_submitButton');form.on("submit",methods._onSubmitEvent);return this;},detach:function(){var form=this;var options=form.data('jqv');form.off(options.validationEventTrigger,"["+options.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",methods._onFieldEvent);form.off("click","["+options.validateAttribute+"*=validate][type=checkbox],["+options.validateAttribute+"*=validate][type=radio]",methods._onFieldEvent);form.off(options.validationEventTrigger,"["+options.validateAttribute+"*=validate][class*=datepicker]",methods._onFieldEvent);form.off("submit",methods._onSubmitEvent);form.removeData('jqv');form.off("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",methods._submitButtonClick);form.removeData('jqv_submitButton');if(options.autoPositionUpdate)
42$(window).off("resize",methods.updatePromptsPosition);return this;},validate:function(userOptions){var element=$(this);var valid=null;var options;
42if(element.is("form")||element.hasClass("validationEngineContainer")){if(element.hasClass('validating')){return false;}else{element.addClass('validating');if(userOptions)
43options=methods._saveOptions(element,userOptions);else
44options=element.data('jqv');var valid=methods._validateFields(this);setTimeout(function(){element.removeClass('validating');},100);if(valid&&options.onSuccess){options.onSuccess();}else if(!valid&&options.onFailure){options.onFailure();}}}else if(element.is('form')||element.hasClass('validationEngineContainer')){element.removeClass('validating');}else{var form=element.closest('form, .validationEngineContainer');options=(form.data('jqv'))?form.data('jqv'):$.validationEngine.defaults;valid=methods._validateField(element,options);if(valid&&options.onFieldSuccess)
45options.onFieldSuccess();else if(options.onFieldFailure&&options.InvalidFields.length>0){options.onFieldFailure();}
46return!valid;}
47if(options.onValidationComplete){return!!options.onValidationComplete(form,valid);}
48return valid;},updatePromptsPosition:function(event){if(event&&this==window){var form=event.data.formElem;var noAnimation=event.data.noAnimation;}
49else
50var form=$(this.closest('form, .validationEngineContainer'));var options=form.data('jqv');if(!options)
51options=methods._saveOptions(form,options);form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each(function(){var field=$(this);if(options.prettySelect&&field.is(":hidden"))
52field=form.find("#"+options.usePrefix+field.attr('id')+options.useSuffix);var prompt=methods._getPrompt(field);var promptText=$(prompt).find(".formErrorContent").html();if(prompt)
53methods._updatePrompt(field,$(prompt),promptText,undefined,false,options,noAnimation);});return this;},showPrompt:function(promptText,type,promptPosition,showArrow){var form=this.closest('form, .validationEngineContainer');var options=form.data('jqv');if(!options)
54options=methods._saveOptions(this,options);if(promptPosition)
55options.promptPosition=promptPosition;options.showArrow=showArrow==true;methods._showPrompt(this,promptText,type,false,options);return this;},hide:function(){var form=$(this).closest('form, .validationEngineContainer');var options=form.data('jqv');if(!options)
56options=methods._saveOptions(form,options);var fadeDuration=(options&&options.fadeDuration)?options.fadeDuration:0.3;var closingtag;
56if(form.is("form")||form.hasClass("validationEngineContainer")){closingtag="parentForm"+methods._getClassName($(form).attr("id"));}else{closingtag=methods._getClassName($(form).attr("id"))+"formError";}
57$('.'+closingtag).fadeTo(fadeDuration,0,function(){$(this).closest('.formError').remove();});return this;},hideAll:function(){var form=this;var options=form.data('jqv');var duration=options?options.fadeDuration:300;$('.formError').fadeTo(duration,0,function(){$(this).closest('.formError').remove();});return this;},_onFieldEvent:function(event){var field=$(this);var form=field.closest('form, .validationEngineContainer');var options=form.data('jqv');if(!options)
58options=methods._saveOptions(form,options);options.eventTrigger="field";if(options.notEmpty==true){if(field.val().length>0){window.setTimeout(function(){methods._validateField(field,options);},(event.data)?event.data.delay:0);}}else{window.setTimeout(function(){methods._validateField(field,options);},(event.data)?event.data.delay:0);}},_onSubmitEvent:function(){var form=$(this);var options=form.data('jqv');if(form.data("jqv_submitButton")){var submitButton=$("#"+form.data("jqv_submitButton"));if(submitButton){if(submitButton.length>
580){if(submitButton.hasClass("validate-skip")||submitButton.attr("data-validation-engine-skip")=="true")
59return true;}}}
60options.eventTrigger="submit";var r=methods._validateFields(form);if(r&&options.ajaxFormValidation){methods._validateFormWithAjax(form,options);return false;}
61if(options.onValidationComplete){return!!options.onValidationComplete(form,r);}
62return r;},_checkAjaxStatus:function(options){var status=true;$.each(options.ajaxValidCache,function(key,value){if(!value){status=false;return false;}});return status;},_checkAjaxFieldStatus:function(fieldid,options){return options.ajaxValidCache[fieldid]==true;},_validateFields:function(form){var options=form.data('jqv');var errorFound=false;form.trigger("jqv.form.validating");var first_err=null;form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each(function(){var field=$(this);var names=[];if($.inArray(field.attr('name'),names)<0){errorFound|=methods._validateField(field,options);if(errorFound&&first_err==null)
63if(field.is(":hidden")&&options.prettySelect)
64first_err=field=form.find("#"+options.usePrefix+methods._jqSelector(field.attr('id'))+options.useSuffix);else{if(field.data('jqv-prompt-at')instanceof jQuery){field=field.data('jqv-prompt-at');}else if(field.data('jqv-prompt-at')){field=$(field.data('jqv-prompt-at'));}
65first_err=field;}
66if(options.doNotShowAllErrosOnSubmit)
67return false;names.push(field.attr('name'));if(options.showOneMessage==true&&errorFound){return false;}}});form.trigger("jqv.form.result",[errorFound]);if(errorFound){if(options.scroll){var destination=first_err.offset().top;var fixleft=first_err.offset().left;var positionType=options.promptPosition;if(typeof(positionType)=='string'&&positionType.indexOf(":")!=-1)
68positionType=positionType.substring(0,positionType.indexOf(":"));if(positionType!="bottomRight"&&positionType!="bottomLeft"){var prompt_err=methods._getPrompt(first_err);if(prompt_err){destination=prompt_err.offset().top;}}
69if(options.scrollOffset){destination-=options.scrollOffset;}
70if(options.isOverflown){var overflowDIV=$(options.overflownDIV);if(!overflowDIV.length)return false;var scrollContainerScroll=overflowDIV.scrollTop();var scrollContainerPos=-parseInt(overflowDIV.offset().top);destination+=scrollContainerScroll+scrollContainerPos-5;var scrollContainer=$(options.overflownDIV).filter(":not(:animated)");scrollContainer.animate({scrollTop:destination},1100,function(){if(options.focusFirstField)first_err.focus();});}else{$("html, body").animate({scrollTop:destination},1100,function(){if(options.focusFirstField)first_err.focus();});$("html, body").animate({scrollLeft:fixleft},1100)}}else if(options.focusFirstField)
71first_err.focus();return false;}
72return true;},_validateFormWithAjax:function(form,options){var data=form.serialize();var type=(options.ajaxFormValidationMethod)?options.ajaxFormValidationMethod:"GET";var url=(options.ajaxFormValidationURL)?options.ajaxFormValidationURL:form.attr("action");var dataType=(options.dataType)?options.dataType:"json";$.ajax({type:type,url:url,cache:false,dataType:dataType,data:data,form:form,methods:methods,options:options,beforeSend:function(){return options.onBeforeAjaxFormValidation(form,options);},error:function(data,transport){if(options.onFailure){options.onFailure(data,transport);}else{methods._ajaxError(data,transport);}},success:function(json){if((dataType=="json")&&(json!==true)){var errorInForm=false;for(var i=0;i<json.length;i++){var value=json[i];var errorFieldId=value[0];var errorField=$($("#"+errorFieldId)[0]);if(errorField.length==1){var msg=value[2];if(value[1]==true){if(msg==""||!msg){methods._closePrompt(errorField);}else{if(options.allrules[msg]){var txt=options.allrules[msg].alertTextOk;if(txt)
73msg=txt;}
74if(options.showPrompts)methods._showPrompt(errorField,msg,"pass",false,options,true);}}else{errorInForm|=true;if(options.allrules[msg]){var txt=options.allrules[msg].alertText;if(txt)
75msg=txt;}
76if(options.showPrompts)methods._showPrompt(errorField,msg,"",false,options,true);}}}
77options.onAjaxFormComplete(!errorInForm,form,json,options);}else
78options.onAjaxFormComplete(true,form,json,options);}});}
78,_validateField:function(field,options,skipAjaxValidation){if(!field.attr("id")){field.attr("id","form-validation-field-"+$.validationEngine.fieldIdCounter);++$.validationEngine.fieldIdCounter;}
79if(field.hasClass(options.ignoreFieldsWithClass))
80return false;if(!options.validateNonVisibleFields&&(field.is(":hidden")&&!options.prettySelect||field.parent().is(":hidden")))
81return false;var rulesParsing=field.attr(options.validateAttribute);var getRules=/validate\[(.*)\]/.exec(rulesParsing);if(!getRules)
82return false;var str=getRules[1];var rules=str.split(/\[|,|\]/);var isAjaxValidator=false;var fieldName=field.attr("name");var promptText="";var promptType="";var required=false;var limitErrors=false;options.isError=false;options.showArrow=true;if(options.maxErrorsPerField>0){limitErrors=true;}
83var form=$(field.closest("form, .validationEngineContainer"));for(var i=0;i<rules.length;i++){rules[i]=rules[i].replace(" ","");if(rules[i]===''){delete rules[i];}}
84for(var i=0,field_errors=0;i<rules.length;i++){if(limitErrors&&field_errors>=options.maxErrorsPerField){if(!required){var have_required=$.inArray('required',rules);required=(have_required!=-1&&have_required>=i);}
85break;}
86var errorMsg=undefined;switch(rules[i]){case"required":required=true;errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._required);break;case"custom":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._custom);break;case"groupRequired":var classGroup="["+options.validateAttribute+"*="+rules[i+1]+"]";var firstOfGroup=form.find(classGroup).eq(0);if(firstOfGroup[0]!=field[0]){methods._validateField(firstOfGroup,options,skipAjaxValidation);options.showArrow=true;}
87errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._groupRequired);if(errorMsg)required=true;options.showArrow=false;break;case"ajax":errorMsg=methods._ajax(field,rules,i,options);if(errorMsg){promptType="load";}
88break;case"minSize":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._minSize);break;case"maxSize":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._maxSize);break;case"min":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._min);break;case"max":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._max);break;case"past":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._past);break;case"future":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._future);break;case"dateRange":var classGroup="["+options.validateAttribute+"*="+rules[i+1]+"]";options.firstOfGroup=form.find(classGroup).eq(0);options.secondOfGroup=form.find(classGroup).eq(1);if(options.firstOfGroup[0].value||options.secondOfGroup[0].value){errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._dateRange);}
89if(errorMsg)required=true;options.showArrow=false;break;case"dateTimeRange":var classGroup="["+options.validateAttribute+"*="+rules[i+1]+"]";options.firstOfGroup=form.find(classGroup).eq(0);options.secondOfGroup=form.find(classGroup).eq(1);if(options.firstOfGroup[0].value||options.secondOfGroup[0].value){errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._dateTimeRange);}
90if(errorMsg)required=true;options.showArrow=false;break;case"maxCheckbox":field=$(form.find("input[name='"+fieldName+"']"));errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._maxCheckbox);break;case"minCheckbox":field=$(form.find("input[name='"+fieldName+"']"));errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._minCheckbox);break;case"equals":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._equals);break;case"funcCall":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._funcCall);break;case"creditCard":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._creditCard);break;case"condRequired":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._c
90ondRequired);if(errorMsg!==undefined){required=true;}
91break;case"funcCallRequired":errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._funcCallRequired);if(errorMsg!==undefined){required=true;}
92break;default:}
93var end_validation=false;if(typeof errorMsg=="object"){switch(errorMsg.status){case"_break":end_validation=true;break;case"_error":errorMsg=errorMsg.message;break;case"_error_no_prompt":return true;break;default:break;}}
94if(i==0&&str.indexOf('funcCallRequired')==0&&errorMsg!==undefined){promptText+=errorMsg+"<br/>";options.isError=true;field_errors++;end_validation=true;}
95if(end_validation){break;}
96if(typeof errorMsg=='string'){promptText+=errorMsg+"<br/>";options.isError=true;field_errors++;}}
97if(!required&&!(field.val())&&field.val().length<1&&$.inArray('equals',rules)<0)options.isError=false;var fieldType=field.prop("type");var positionType=field.data("promptPosition")||options.promptPosition;if((fieldType=="radio"||fieldType=="checkbox")&&form.find("input[name='"+fieldName+"']").size()>1){if(positionType==='inline'){field=$(form.find("input[name='"+fieldName+"'][type!=hidden]:last"));}else{field=$(form.find("input[name='"+fieldName+"'][type!=hidden]:first"));}
98options.showArrow=options.showArrowOnRadioAndCheckbox;}
99if(field.is(":hidden")&&options.prettySelect){field=form.find("#"+options.usePrefix+methods._jqSelector(field.attr('id'))+options.useSuffix);}
100if(options.isError&&options.showPrompts){methods._showPrompt(field,promptText,promptType,false,options);}else{if(!isAjaxValidator)methods._closePrompt(field);}
101if(!isAjaxValidator){field.trigger("jqv.field.result",[field,options.isError,promptText]);}
102var errindex=$.inArray(field[0],options.InvalidFields);if(errindex==-1){if(options.isError)
103options.InvalidFields.push(field[0]);}else if(!options.isError){options.InvalidFields.splice(errindex,1);}
104methods._handleStatusCssClasses(field,options);if(options.isError&&options.onFieldFailure)
105options.onFieldFailure(field);if(!options.isError&&options.onFieldSuccess)
106options.onFieldSuccess(field);return options.isError;},_handleStatusCssClasses:function(field,options){if(options.addSuccessCssClassToField)
107field.removeClass(options.addSuccessCssClassToField);if(options.addFailureCssClassToField)
108field.removeClass(options.addFailureCssClassToField);if(options.addSuccessCssClassToField&&!options.isError)
109field.addClass(options.addSuccessCssClassToField);if(options.addFailureCssClassToField&&options.isError)
110field.addClass(options.addFailureCssClassToField);},_getErrorMessage:function(form,field,rule,rules,i,options,originalValidationMethod){var rule_index=jQuery.inArray(rule,rules);if(rule==="custom"||rule==="funcCall"||rule==="funcCallRequired"){var custom_validation_type=rules[rule_index+1];rule=rule+"["+custom_validation_type+"]";delete(rules[rule_index]);}
111var alteredRule=rule;var element_classes=(field.attr("data-validation-engine"))?field.attr("data-validation-engine"):field.attr("class");var element_classes_array=element_classes.split(" ");var errorMsg;if(rule=="future"||rule=="past"||rule=="maxCheckbox"||rule=="minCheckbox"){errorMsg=originalValidationMethod(form,field,rules,i,options);}else{errorMsg=originalValidationMethod(field,rules,i,options);}
112if(errorMsg!=undefined){var custom_message=methods._getCustomErrorMessage($(field),element_classes_array,alteredRule,options);if(custom_message)errorMsg=custom_message;}
113return errorMsg;},_getCustomErrorMessage:function(field,classes,rule,options){var custom_message=false;var validityProp=/^custom\[.*\]$/.test(rule)?methods._validityProp["custom"]:methods._validityProp[rule];if(validityProp!=undefined){custom_message=field.attr("data-errormessage-"+validityProp);if(custom_message!=undefined)
114return custom_message;}
115custom_message=field.attr("data-errormessage");if(custom_message!=undefined)
116return custom_message;var id='#'+field.attr("id");if(typeof options.custom_error_messages[id]!="undefined"&&typeof options.custom_error_messages[id][rule]!="undefined"){custom_message=options.custom_error_messages[id][rule]['message'];}else if(classes.length>0){for(var i=0;i<classes.length&&classes.length>0;i++){var element_class="."+classes[i];if(typeof options.custom_error_messages[element_class]!="undefined"&&typeof options.custom_error_messages[element_class][rule]!="undefined"){custom_message=options.custom_error_messages[element_class][rule]['message'];break;}}}
117if(!custom_message&&typeof options.custom_error_messages[rule]!="undefined"&&typeof options.custom_error_messages[rule]['message']!="undefined"){custom_message=options.custom_error_messages[rule]['message'];}
118return custom_message;}
118,_validityProp:{"required":"value-missing","custom":"custom-error","groupRequired":"value-missing","ajax":"custom-error","minSize":"range-underflow","maxSize":"range-overflow","min":"range-underflow","max":"range-overflow","past":"type-mismatch","future":"type-mismatch","dateRange":"type-mismatch","dateTimeRange":"type-mismatch","maxCheckbox":"range-overflow","minCheckbox":"range-underflow","equals":"pattern-mismatch","funcCall":"custom-error","funcCallRequired":"custom-error","creditCard":"pattern-mismatch","condRequired":"value-missing"},_required:function(field,rules,i,options,condRequired){switch(field.prop("type")){case"radio":case"checkbox":if(condRequired){if(!field.prop('checked')){return options.allrules[rules[i]].alertTextCheckboxMultiple;}
119break;}
120var form=field.closest("form, .validationEngineContainer");var name=field.attr("name");if(form.find("input[name='"+name+"']:checked").size()==0){if(form.find("input[name='"+name+"']:visible").size()==1)
121return options.allrules[rules[i]].alertTextCheckboxe;else
122return options.allrules[rules[i]].alertTextCheckboxMultiple;}
123break;case"text":case"password":case"textarea":case"file":case"select-one":case"select-multiple":default:var field_val=$.trim(field.val());var dv_placeholder=$.trim(field.attr("data-validation-placeholder"));var placeholder=$.trim(field.attr("placeholder"));if((!field_val)||(dv_placeholder&&field_val==dv_placeholder)||(placeholder&&field_val==placeholder)){return options.allrules[rules[i]].alertText;}
124break;}},_groupRequired:function(field,rules,i,options){var classGroup="["+options.validateAttribute+"*="+rules[i+1]+"]";var isValid=false;field.closest("form, .validationEngineContainer").find(classGroup).each(function(){if(!methods._required($(this),rules,i,options)){isValid=true;return false;}});if(!isValid){return options.allrules[rules[i]].alertText;}},_custom:function(field,rules,i,options){var customRule=rules[i+1];var rule=options.allrules[customRule];var fn;if(!rule){alert("jqv:custom rule not found - "+customRule);return;}
125if(rule["regex"]){var ex=rule.regex;if(!ex){alert("jqv:custom regex not found - "+customRule);return;}
126var pattern=new RegExp(ex);if(!pattern.test(field.val()))return options.allrules[customRule].alertText;}else if(rule["func"]){fn=rule["func"];if(typeof(fn)!=="function"){alert("jqv:custom parameter 'function' is no function - "+customRule);return;}
127if(!fn(field,rules,i,options))
128return options.allrules[customRule].alertText;}else{alert("jqv:custom type not allowed "+customRule);return;}},_funcCall:function(field,rules,i,options){var functionName=rules[i+1];var fn;if(functionName.indexOf('.')>-1)
129{var namespaces=functionName.split('.');var scope=window;while(namespaces.length)
130{scope=scope[namespaces.shift()];}
131fn=scope;}
132else
133fn=window[functionName]||options.customFunctions[functionName];if(typeof(fn)=='function')
134return fn(field,rules,i,options);},_funcCallRequired:function(field,rules,i,options){return methods._funcCall(field,rules,i,options);},_equals:function(field,rules,i,options){var equalsField=rules[i+1];if(field.val()!=$("#"+equalsField).val())
135return options.allrules.equals.alertText;},_maxSize:function(field,rules,i,options){var max=rules[i+1];var len=field.val().length;if(len>max){var rule=options.allrules.maxSize;return rule.alertText+max+rule.alertText2;}},_minSize:function(field,rules,i,options){var min=rules[i+1];var len=field.val().length;if(len<min){var rule=options.allrules.minSize;return rule.alertText+min+rule.alertText2;}},_min:function(field,rules,i,options){var min=parseFloat(rules[i+1]);var len=parseFloat(field.val());if(len<min){var rule=options.allrules.min;if(rule.alertText2)return rule.alertText+min+rule.alertText2;return rule.alertText+min;}},_max:function(field,rules,i,options){var max=parseFloat(rules[i+1]);var len=parseFloat(field.val());if(len>max){var rule=options.allrules.max;if(rule.alertText2)return rule.alertText+max+rule.alertText2;return rule.alertText+max;}},_past:function(form,field,rules,i,options){var p=rules[i+1];var fieldAlt=$(form.find("*[name='"+p.replace(/^#+/,'')+"']"));var pdate;if(p.toLowerCase()=="now"){pdate=new Date();}else if(undefined!=fieldAlt.val()){if(fieldAlt.is(":disabled"))
136return;pdate=methods._parseDate(fieldAlt.val());}else{pdate=methods._parseDate(p);}
137var vdate=methods._parseDate(field.val());if(vdate>pdate){var rule=options.allrules.past;if(rule.alertText2)return rule.alertText+methods._dateToString(pdate)+rule.alertText2;return rule.alertText+methods._dateToString(pdate);}},_future:function(form,field,rules,i,options){var p=rules[i+1];var fieldAlt=$(form.find("*[name='"+p.replace(/^#+/,'')+"']"));var pdate;if(p.toLowerCase()=="now"){pdate=new Date();}else if(undefined!=fieldAlt.val()){if(fieldAlt.is(":disabled"))
138return;pdate=methods._parseDate(fieldAlt.val());}else{pdate=methods._parseDate(p);}
139var vdate=methods._parseDate(field.val());if(vdate<pdate){var rule=options.allrules.future;if(rule.alertText2)
140return rule.alertText+methods._dateToString(pdate)+rule.alertText2;return rule.alertText+methods._dateToString(pdate);}},_isDate:function(value){var dateRegEx=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
140:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);return dateRegEx.test(value);},_isDateTime:function(value){var dateTimeRegEx=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/);return dateTimeRegEx.test(value);},_dateCompare:function(start,end){return(new Date(start.toString())<new Date(end.toString()));},_dateRange:function(field,rules,i,options){if((!options.firstOfGroup[0].value&&options.secondOfGroup[0].value)||(options.firstOfGroup[0].value&&!options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}
141if(!methods._isDate(options.firstOfGroup[0].value)||!methods._isDate(options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}
142if(!methods._dateCompare(options.firstOfGroup[0].value,options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}},_dateTimeRange:function(field,rules,i,options){if((!options.firstOfGroup[0].value&&options.secondOfGroup[0].value)||(options.firstOfGroup[0].value&&!options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}
143if(!methods._isDateTime(options.firstOfGroup[0].value)||!methods._isDateTime(options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}
144if(!methods._dateCompare(options.firstOfGroup[0].value,options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}},_maxCheckbox:function(form,field,rules,i,options){var nbCheck=rules[i+1];var groupname=field.attr("name");var groupSize=form.find("input[name='"+groupname+"']:checked").size();if(groupSize>nbCheck){options.showArrow=false;if(options.allrules.maxCheckbox.alertText2)
145return options.allrules.maxCheckbox.alertText+" "+nbCheck+" "+options.allrules.maxCheckbox.alertText2;return options.allrules.maxCheckbox.alertText;}},_minCheckbox:function(form,field,rules,i,options){var nbCheck=rules[i+1];var groupname=field.attr("name");var groupSize=form.find("input[name='"+groupname+"']:checked").size();if(groupSize<nbCheck){options.showArrow=false;return options.allrules.minCheckbox.alertText+" "+nbCheck+" "+options.allrules.minCheckbox.alertText2;}},_creditCard:function(field,rules,i,options){var valid=false,cardNumber=field.val().replace(/ +/g,'').replace(/-+/g,'');var numDigits=cardNumber.length;if(numDigits>=14&&numDigits<=16&&parseInt(cardNumber)>0){var sum=0,i=numDigits-1,pos=1,digit,luhn=new String();do{digit=parseInt(cardNumber.charAt(i));luhn+=(pos++%2==0)?digit*2:digit;}while(--i>=0)
146for(i=0;i<luhn.length;i++){sum+=parseInt(luhn.charAt(i));}
147valid=sum%10==0;}
148if(!valid)return options.allrules.creditCard.alertText;},_ajax:function(field,rules,i,options){var errorSelector=rules[i+1];var rule=options.allrules[errorSelector];var extraData=rule.extraData;var extraDataDynamic=rule.extraDataDynamic;var data={"fieldId":field.attr("id"),"fieldValue":field.val()};if(typeof extraData==="object"){$.extend(data,extraData);}else if(typeof extraData==="string"){var tempData=extraData.split("&");for(var i=0;i<tempData.length;i++){var values=tempData[i].split("=");if(values[0]&&values[0]){data[values[0]]=values[1];}}}
149if(extraDataDynamic){var tmpData=[];var domIds=String(extraDataDynamic).split(",");for(var i=0;i<domIds.length;i++){var id=domIds[i];if($(id).length){var inputValue=field.closest("form, .validationEngineContainer").find(id).val();var keyValue=id.replace('#','')+'='+escape(inputValue);data[id.replace('#','')]=inputValue;}}}
150if(options.eventTrigger=="field"){delete(options.ajaxValidCache[field.attr("id")]);}
151if(!options.isError&&!methods._checkAjaxFieldStatus(field.attr("id"),options)){$.ajax({type:options.ajaxFormValidationMethod,url:rule.url,cache:false,dataType:"json",data:data,field:field,rule:rule,methods:methods,options:options,beforeSend:function(){},error:function(data,transport){if(options.onFailure){options.onFailure(data,transport);}else{methods._ajaxError(data,transport);}},success:function(json){var errorFieldId=json[0];var errorField=$("#"+errorFieldId).eq(0);if(errorField.length==1){var status=json[1];var msg=json[2];if(!status){options.ajaxValidCache[errorFieldId]=false;options.isError=true;if(msg){if(options.allrules[msg]){var txt=options.allrules[msg].alertText;if(txt){msg=txt;}}}
152else
153msg=rule.alertText;if(options.showPrompts)methods._showPrompt(errorField,msg,"",true,options);}else{options.ajaxValidCache[errorFieldId]=true;if(msg){if(options.allrules[msg]){var txt=options.allrules[msg].alertTextOk;if(txt){msg=txt;}}}
154else
155msg=rule.alertTextOk;if(options.showPrompts){if(msg)
156methods._showPrompt(errorField,msg,"pass",true,options);else
157methods._closePrompt(errorField);}
158if(options.eventTrigger=="submit")
159field.closest("form").submit();}}
160errorField.trigger("jqv.field.result",[errorField,options.isError,msg]);}});return rule.alertTextLoad;}},_ajaxError:function(data,transport){if(data.status==0&&transport==null)
161alert("The page is not served from a server! ajax call failed");else if(typeof console!="undefined")
162console.log("Ajax error: "+data.status+" "+transport);},_dateToString:function(date){return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();},_parseDate:function(d){var dateParts=d.split("-");if(dateParts==d)
163dateParts=d.split("/");if(dateParts==d){dateParts=d.split(".");return new Date(dateParts[2],(dateParts[1]-1),dateParts[0]);}
164return new Date(dateParts[0],(dateParts[1]-1),dateParts[2]);},_showPrompt:function(field,promptText,type,ajaxed,options,ajaxform){if(field.data('jqv-prompt-at')instanceof jQuery){field=field.data('jqv-prompt-at');}else if(field.data('jqv-prompt-at')){field=$(field.data('jqv-prompt-at'));}
165var prompt=methods._getPrompt(field);if(ajaxform)prompt=false;if($.trim(promptText)){if(prompt)
166methods._updatePrompt(field,prompt,promptText,type,ajaxed,options);else
167methods._buildPrompt(field,promptText,type,ajaxed,options);}},_buildPrompt:function(field,promptText,type,ajaxed,options){var prompt=$('<div>');prompt.addClass(methods._getClassName(field.attr("id"))+"formError");prompt.addClass("parentForm"+methods._getClassName(field.closest('form, .validationEngineContainer').attr("id")));prompt.addClass("formError");switch(type){case"pass":prompt.addClass("greenPopup");break;case"load":prompt.addClass("blackPopup");break;default:}
168if(ajaxed)
169prompt.addClass("ajaxed");var promptContent=$('<div>').addClass("formErrorContent").html(promptText).appendTo(prompt);var positionType=field.data("promptPosition")||options.promptPosition;if(options.showArrow){var arrow=$('<div>').addClass("formErrorArrow");if(typeof(positionType)=='string')
170{var pos=positionType.indexOf(":");if(pos!=-1)
171positionType=positionType.substring(0,pos);}
172switch(positionType){case"bottomLeft":case"bottomRight":prompt.find(".formErrorContent").before(arrow);arrow.addClass("formErrorArrowBottom").html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');break;case"topLeft":case"topRight":arrow.html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');prompt.append(arrow);break;}}
173if(options.addPromptClass)
174prompt.addClass(options.addPromptClass);var requiredOverride=field.attr('data-required-class');if(requiredOverride!==undefined){prompt.addClass(requiredOverride);}else{if(options.prettySelect){if($('#'+field.attr('id')).next().is('select')){var prettyOverrideClass=$('#'+field.attr('id').substr(options.usePrefix.length).substring(options.useSuffix.length)).attr('data-required-class');if(prettyOverrideClass!==undefined){prompt.addClass(prettyOverrideClass);}}}}
175prompt.css({"opacity":0});if(positionType==='inline'){prompt.addClass("inline");if(typeof field.attr('data-prompt-target')!=='undefined'&&$('#'+field.attr('data-prompt-target')).length>0){prompt.appendTo($('#'+field.attr('data-prompt-target')));}else{field.after(prompt);}}else{field.before(prompt);}
176var pos=methods._calculatePosition(field,prompt,options);prompt.css({'position':positionType==='inline'?'relative':'absolute',"top":pos.callerTopPosition,"left"
176:pos.callerleftPosition,"marginTop":pos.marginTopSize,"opacity":0}).data("callerField",field);if(options.autoHidePrompt){setTimeout(function(){prompt.animate({"opacity":0},function(){prompt.closest('.formError').remove();});},options.autoHideDelay);}
177return prompt.animate({"opacity":0.87});},_updatePrompt:function(field,prompt,promptText,type,ajaxed,options,noAnimation){if(prompt){if(typeof type!=="undefined"){if(type=="pass")
178prompt.addClass("greenPopup");else
179prompt.removeClass("greenPopup");if(type=="load")
180prompt.addClass("blackPopup");else
181prompt.removeClass("blackPopup");}
182if(ajaxed)
183prompt.addClass("ajaxed");else
184prompt.removeClass("ajaxed");prompt.find(".formErrorContent").html(promptText);var pos=methods._calculatePosition(field,prompt,options);var css={"top":pos.callerTopPosition,"left":pos.callerleftPosition,"marginTop":pos.marginTopSize,"opacity":0.87};prompt.css({"opacity":0,"display":"block"});if(noAnimation)
185prompt.css(css);else
186prompt.animate(css);}},_closePrompt:function(field){var prompt=methods._getPrompt(field);if(prompt)
187prompt.fadeTo("fast",0,function(){prompt.closest('.formError').remove();});},closePrompt:function(field){return methods._closePrompt(field);},_getPrompt:function(field){var formId=$(field).closest('form, .validationEngineContainer').attr('id');var className=methods._getClassName(field.attr("id"))+"formError";var match=$("."+methods._escapeExpression(className)+'.parentForm'+methods._getClassName(formId))[0];if(match)
188return $(match);},_escapeExpression:function(selector){return selector.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1");},isRTL:function(field)
189{var $document=$(document);var $body=$('body');var rtl=(field&&field.hasClass('rtl'))||(field&&(field.attr('dir')||'').toLowerCase()==='rtl')||$document.hasClass('rtl')||($document.attr('dir')||'').toLowerCase()==='rtl'||$body.hasClass('rtl')||($body.attr('dir')||'').toLowerCase()==='rtl';return Boolean(rtl);},_calculatePosition:function(field,promptElmt,options){var promptTopPosition,promptleftPosition,marginTopSize;var fieldWidth=field.width();var fieldLeft=field.position().left;var fieldTop=field.position().top;var fieldHeight=field.height();var promptHeight=promptElmt.height();promptTopPosition=promptleftPosition=0;marginTopSize=-promptHeight;var positionType=field.data("promptPosition")||options.promptPosition;var shift1="";var shift2="";var shiftX=0;var shiftY=0;if(typeof(positionType)=='string'){if(positionType.indexOf(":")!=-1){shift1=positionType.substring(positionType.indexOf(":")+1);positionType=positionType.substring(0,positionType.indexOf(":"));if(shift1.indexOf(",")!=-1){shift2=shift1.substring(shift1.indexOf(",")+1);shift1=shift1.substring(0,shift1.indexOf(","));shiftY=parseInt(shift2);if(isNaN(shiftY))shiftY=0;};shiftX=parseInt(shift1);if(isNaN(shift1))shift1=0;};};switch(positionType){default:case"topRight":promptleftPosition+=fieldLeft+fieldWidth-27;promptTopPosition+=fieldTop;break;case"topLeft":promptTopPosition+=fieldTop;promptleftPosition+=fieldLeft;break;case"centerRight":promptTopPosition=fieldTop+4;marginTopSize=0;promptleftPosition=fieldLeft+field.outerWidth(true)+5;break;case"centerLeft":promptleftPosition=fieldLeft-(promptElmt.width()+2);promptTopPosition=fieldTop+4;marginTopSize=0;break;case"bottomLeft":promptTopPosition=fieldTop+field.height()+5;marginTopSize=0;promptleftPosition=fieldLeft;break;case"bottomRight":promptleftPosition=fieldLeft+fieldWidth-27;promptTopPosition=fieldTop+field.height()+5;marginTopSize=0;break;case"inline":promptleftPosition=0;promptTopPosition=0;marginTopSize=0;};promptleftPosition+=shiftX;promptTopPosition+=shiftY;return{"callerTopPosition":promptTopPosition+"px","callerleftPosition":promptleftPosition+"px","marginTopSize":marginTopSize+"px"};},_saveOptions:function(form,options){if($.validationEngineLanguage)
190var allRules=$.validationEngineLanguage.allRules;else
191$.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");$.validationEngine.defaults.allrules=allRules;var userOptions=$.extend(true,{},$.validationEngine.defaults,options);form.data('jqv',userOptions);return userOptions;},_getClassName:function(className){if(className)
192return className.replace(/:/g,"_").replace(/\./g,"_");},_jqSelector:function(str){return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,'\\$1');},_condRequired:function(field,rules,i,options){var idx,dependingField;for(idx=(i+1);idx<rules.length;idx++){dependingField=jQuery("#"+rules[idx]).first();if(dependingField.length&&methods._required(dependingField,["required"],0,options,true)==undefined){return methods._required(field,["required"],0,options);}}},_submitButtonClick:function(event){var button=$(this);var form=button.closest('form, .validationEngineContainer');form.data("jqv_submitButton",button.attr("id"));}};$.fn.validationEngine=function(method){var form=$(this);if(!form[0])return form;if(typeof(method)=='string'&&method.charAt(0)!='_'&&methods[method]){if(method!="showPrompt"&&method!="hide"&&method!="hideAll")
193methods.init.apply(form);return methods[method].apply(form,Array.prototype.slice.call(arguments,1
193));}else if(typeof method=='object'||!method){methods.init.apply(form,arguments);return methods.attach.apply(form);}else{$.error('Method '+method+' does not exist in jQuery.validationEngine');}};$.validationEngine={fieldIdCounter:0,defaults:{validationEventTrigger:"blur",scroll:true,focusFirstField:true,showPrompts:true,validateNonVisibleFields:false,ignoreFieldsWithClass:'ignoreMe',promptPosition:"topRight",bindMethod:"bind",inlineAjax:false,ajaxFormValidation:false,ajaxFormValidationURL:false,ajaxFormValidationMethod:'get',onAjaxFormComplete:$.noop,onBeforeAjaxFormValidation:$.noop,onValidationComplete:false,doNotShowAllErrosOnSubmit:false,custom_error_messages:{},binded:true,notEmpty:false,showArrow:true,showArrowOnRadioAndCheckbox:false,isError:false,maxErrorsPerField:false,ajaxValidCache:{},autoPositionUpdate:false,InvalidFields:[],onFieldSuccess:false,onFieldFailure:false,onSuccess:false,onFailure:false,validateAttribute:"class",addSuccessCssClassToField:"",addFailureCssClassToField:"",autoHidePrompt:false,autoHideDelay:10000,fadeDuration:300,prettySelect:false,addPromptClass:"",usePrefix:"",useSuffix:"",showOneMessage:false}};$(function(){$.validationEngine.defaults.scroll=false,$.validationEngine.defaults.promptPosition='bottomLeft',$.validationEngine.defaults.maxErrorsPerField=1,$.validationEngine.defaults.autoPositionUpdate=true,$.validationEngine.defaults.autoHidePrompt=true,$.validationEngine.defaults.autoHideDelay=5000;});})(jQuery);;(function($){$.fn.validationEngineLanguage=function(){};$.validationEngineLanguage={newLang:function(){$.validationEngineLanguage.allRules={"required":{"regex":"none","alertText":"* Необходимо заполнить","alertTextCheckboxMultiple":"* Вы должны выбрать вариант","alertTextCheckboxe":"* Необходимо отметить"},"requiredInFunction":{"func":function(field,rules,i,options){return(field.val()=="test")?true:false;},"alertText":"* Значением поля должно быть test"},"minSize":{"regex":"none","alertText":"* Минимум ","alertText2":" символа(ов)"},"maxSize":{"regex":"none","alertText":"* Максимум ","alertText2":" символа(ов)"},"groupRequired":{"regex":"none","alertText":"* Вы должны заполнить одно из следующих полей"},"min":{"regex":"none","alertText":"* Минимальное значение "},"max":{"regex":"none","alertText":"* Максимальное значение "},"past":{"regex":"none","alertText":"* Дата до "},"future":{"regex":"none","alertText":"* Дата от "},"maxCheckbox":{"regex":"none","alertText":"* Нельзя выбрать столько вариантов"},"minCheckbox":{"regex":"none","alertText":"* Пожалуйста, выберите ","alertText2":" опцию(ии)"},"equals":{"regex":"none","alertText":"* Поля не совпадают"},"creditCard":{"regex":"none","alertText":"* Неверный номер кредитной карты"},"phone":{"regex":/^\+[0-9]{10,15}$/,"alertText":"Пожалуйста, введите номер телефона<br />в международном формате: +7ХХХХХХХХХХ"},"phoneMask":{"regex":/^[^_]+$/,"alertText":"Пожалуйста, введите номер телефона<br />в международном формате"},"email":{"regex":/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,"alertText":"Пожалуйста, введите корректный e-mail."},"integer":{"regex":/^[\-\+]?\d+$/,"alertText":"* Не целое число"},"number":{"regex":/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,"alertText":"* Неправильное число с плавающей точкой"},"date":{"regex":/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,"alertText":"* Неправильная дата (должно быть в ДД.MM.ГГГГ формате)"},"ipv4":{"regex":/^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,"alertText":"* Неправильный IP-адрес"},"url":{"regex":/^(https?:\/\/)?([\da-zа-я\.-]+)\.([а-яa-z\.]{2,6})([\/\wа-яА-Я \.-]*)*\/?$/i,"alertText":"* Неправильный URL"},"onlyNumberSp":{"regex":/^[0-9\ ]+$/,"alertText":"* Только числа"},"onlyLetterSp":{"regex":/^[a-zA-Z\u0400-\u04FF\'][a-zA-Z\u0400-\u04FF\ \'\-]+$/,"alertText":"* Только буквы"},"onlyLetter":{"regex":/^[a-zA-Z\u0400-\u04FF\'][a-zA-Z\u0400-\u04FF\'\-]+$/,"alertText":"* Только буквы"},"onlyLetterRu":{"regex":/^[а-яА-Я\ ]+$/,"alertText":"* Только буквы"},"onlyLetterNumber":{"regex":/^[0-9a-zA-Z\u0400-\u04FF]+$/,"alertText":"* Запрещены специальные символы"},"onlyLetterNumberSp":{"regex":/^[a-zA-Z\u0400-\u04FF\'][0-9a-zA-Z\u0400-\u04FF\ \']+$/,"alertText":"Пожалуйста, заполните поле корректно. Допустимы либо буквы, либо буквы и цифры."},"newPassword":{"regex":/^(?=[#\-$\/\:?{~!^_\[\]a-zA-Z]*([0-9#\-$\/\:?{~!\^_\[\]]))(?=[#\-$\/\:?{~!\^_\[\]a-zA-Z0-9]*[a-zA-Z])[#\-$\/\:?{~!\^_\[\]a-zA-Z0-9]{6,25}$/,"alertText":"Пожалуйста, заполните поле корректно.<br />Требования к паролю:<br /><ul><li>только латинские символы, без кириллицы</li><li>допускаются цифры</li><li>спец символы - тире, нижнее подчеркивание, открытая и закрытая круглая скобка, открытая и закрытая квадратная скобка</li><li>минимальная длина пароля 6 символов</li><li>максимальная длина пароля 25 символов</li></ul>"},"ajaxUserCall":{"url":"ajaxValidateFieldUser","extraData":"name=eric","alertText":"* Этот пользователь уже занят","alertTextLoad":"* Проверка, подождите..."},"ajaxNameCall":{"url":"ajaxValidateFieldName","alertText":"* Это имя уже занято","alertTextOk":"* Это имя доступно","alertTextLoad":"* Проверка, подождите..."},"validate2fields":{"alertText":"* Пожалуйста, введите HELLO"}};}};$.validationEngineLanguage.newLang();})(jQuery);;;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}
194else if(typeof exports==='object'){module.exports=factory(require('jquery'));}
195else{factory(jQuery);}}
196(function($){var pluginName="tinycarousel",defaults={start:0,axis:"x",buttons:true,bullets:false,interval:false,intervalTime:3000,animation:true,animationTime:1000,infinite:true};function Plugin($container,options){this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;var self=this,$viewport=$container.find(".viewport:first"),$overview=$container.find(".overview:first"),$slides=null,$next=$container.find(".next:first"),$prev=$container.find(".prev:first"),$bullets=$container.find(".bullet"),viewportSize=0,contentStyle={},slidesVisible=0,slideSize=0,slideIndex=0,isHorizontal=this.options.axis==='x',sizeLabel=isHorizontal?"Width":"Height",posiLabel=isHorizontal?"left"
196:"top",intervalTimer=null;this.slideCurrent=0;this.slidesTotal=0;this.intervalActive=false;function _initialize(){self.update();self.move(self.slideCurrent);_setEvents();return self;}
197this.update=function(){$overview.find(".mirrored").remove();$slides=$overview.children();viewportSize=$viewport[0]["offset"+sizeLabel];slideSize=$slides.first()["outer"+sizeLabel](true);self.slidesTotal=$slides.length;self.slideCurrent=self.options.start||0;slidesVisible=Math.ceil(viewportSize/slideSize);$overview.append($slides.slice(0,slidesVisible).clone().addClass("mirrored"));$overview.css(sizeLabel.toLowerCase(),slideSize*(self.slidesTotal+slidesVisible));_setButtons();return self;};function _setEvents(){if(self.options.buttons){$prev.click(function(){self.move(--slideIndex);return false;});$next.click(function(){self.move(++slideIndex);return false;});}
198$(window).resize(self.update);if(self.options.bullets){$container.on("click",".bullet",function(){self.move(slideIndex=+$(this).attr("data-slide"));return false;});}}
199this.start=function(){if(self.options.interval){clearTimeout(intervalTimer);self.intervalActive=true;intervalTimer=setTimeout(function(){self.move(++slideIndex);},self.options.intervalTime);}
200return self;};this.stop=function(){clearTimeout(intervalTimer);self.intervalActive=false;return self;};this.move=function(index){slideIndex=isNaN(index)?self.slideCurrent:index;self.slideCurrent=slideIndex%self.slidesTotal;if(slideIndex<0){self.slideCurrent=slideIndex=self.slidesTotal-1;$overview.css(posiLabel,-(self.slidesTotal)*slideSize);}
201if(slideIndex>self.slidesTotal){self.slideCurrent=slideIndex=1;$overview.css(posiLabel,0);}
202contentStyle[posiLabel]=-slideIndex*slideSize;$overview.animate(contentStyle,{queue:false,duration:self.options.animation?self.options.animationTime:0,always:function(){$container.trigger("move",[$slides[self.slideCurrent],self.slideCurrent]);}});_setButtons();self.start();return self;};function _setButtons(){if(self.options.buttons&&!self.options.infinite){$prev.toggleClass("disable",self.slideCurrent<=0);$next.toggleClass("disable",self.slideCurrent>=self.slidesTotal-slidesVisible);}
203if(self.options.bullets){$bullets.removeClass("active");$($bullets[self.slideCurrent]).addClass("active");}}
204return _initialize();}
205$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin($(this),options));}});};}));;(function(c){c.fn.styler=function(x){var e=c.extend({wrapper:"form",idSuffix:"-styler",filePlaceholder:"\u0424\u0430\u0439\u043b \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",fileBrowse:"\u041e\u0431\u0437\u043e\u0440...",selectPlaceholder:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435...",selectSearch:!1,selectSearchLimit:10,selectSearchNotFound:"\u0421\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e",selectSearchPlaceholder:"\u041f\u043e\u0438\u0441\u043a...",selectVisibleOptions:0,singleSelectzIndex:"100",selectSmartPositioning:!0,onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}},x);return this.each(function(){function A(){var c="",p="",b="",n="";void 0!==a.attr("id")&&""!==a.attr("id")&&(c=' id="'+a.attr("id")+e.idSuffix+'"');void 0!==a.attr("title")&&""!==a.attr("title")&&(p=' title="'+a.attr("title")+'"');void 0!==a.attr("class")&&""!==a.attr("class")&&(b=" "+a.attr("class"));var d=a.data(),g;for(g in d)""!==d[g]&&(n+=" data-"+g+'="'+d[g]+'"');this.id=c+n;this.title=p;this.classes=b}var a=c(this);if(a.is(":checkbox"))a.each(function(){if(1>a.parent("div.jq-checkbox").length){var e=function(){var e=new A,b=c("<div"+e.id+' class="jq-checkbox'+e.classes+'"'+e.title+'><div class="jq-checkbox__div"></div></div>');a.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(b).prependTo(b);b.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative",overflow:"hidden"});a.is(":checked")&&b.addClass("checked");a.is(":disabled")&&b.addClass("disabled");b.on("click.styler",function(){b.is(".disabled")||(a.is(":checked")?(a.prop("checked",!1),b.removeClass("checked")):(a.prop("checked",!0),b.addClass("checked")),a.change());return!1});a.closest("label").add('label[for="'+a.attr("id")+'"]').click(function(a){b.click();a.preventDefault()});a.on("change.styler",function(){a.is(":checked")?b.addClass("checked"):b.removeClass("checked")}).on("keydown.styler",function(a){32==a.which&&b.click()}).on("focus.styler",function(){b.is(".disabled")||b.addClass("focused")}).on("blur.styler",function(){b.removeClass("focused")})};e();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();e()})}});else if(a.is(":radio"))a.each(function(){if(1>a.parent("div.jq-radio").length){var s=function(){var p=new A,b=c("<div"+p.id+' class="jq-radio'+p.classes+'"'+p.title+'><div class="jq-radio__div"></div></div>');a.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(b).prependTo(b);b.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative"});a.is(":checked")&&b.addClass("checked");a.is(":disabled")&&b.addClass("disabled");b.on("click.styler",function(){b.is(".disabled")||(b.closest(e.wrapper).find('input[name="'+a.attr("name")+'"]').prop("checked",!1).parent().removeClass("checked"),a.prop("checked",!0).parent().addClass("checked"),a.change());return!1});a.closest("label").add('label[for="'+a.attr("id")+'"]').click(function(a){b.click();a.preventDefault()});a.on("change.styler",function(){a.parent().addClass("checked")}).on("focus.styler",function(){b.is(".disabled")||b.addClass("focused")}).on("blur.styler",function(){b.removeClass("focused")})};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is(":file"))a.css({position:"absolute",top:0,right:0,width:"100%",height:"100%",opacity:0,margin:0,padding:0}).each(function(){if(1>a.parent("div.jq-file").length){var s=function(){var p=new A,b=a.data("placeholder");void 0===b&&(b=e.filePlaceholder);var n=a.data("browse");if(void 0===n||""===n)n=e.fileBrowse;var d=c("<div"+p.id+' class="jq-file'+p.classes+'"'+p.title+' style="display: inline-block; position: relative; overflow: hidden"></div>'),g=c('<div class="jq-file__name">'+b+"</div>").appendTo(d);c('<div class="jq-file__browse">'+
206n+"</div>").appendTo(d);a.after(d);d.append(a);a.is(":disabled")&&d.addClass("disabled");a.on("change.styler",function(){var c=a.val();if(a.is("[multiple]"))for(var c="",e=a[0].files,p=0;p<e.length;p++)c+=(0<p?", ":"")+e[p].name;g.text(c.replace(/.+[\\\/]/,""));""===c?(g.text(b),d.removeClass("changed")):d.addClass("changed")}).on("focus.styler",function(){d.addClass("focused")}).on("blur.styler",function(){d.removeClass("focused")}).on("click.styler",function(){d.removeClass("focused")})};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is("select"))a.each(function(){if(1>a.parent("div.jqselect").length){var s=function(){function p(a){a.off("mousewheel DOMMouseScroll").on("mousewheel DOMMouseScroll",function(a){var b=null;"mousewheel"==a.type?b=-1*a.originalEvent.wheelDelta:"DOMMouseScroll"==a.type&&(b=40*a.originalEvent.detail);b&&(a.stopPropagation(),a.preventDefault(),c(this).scrollTop(b+c(this).scrollTop()))})}function b(){for(var a=0,c=g.length;a<c;a++){var b="",e="",p=b="",d="",q="";g.eq(a).prop("selected")&&(e="selected sel");g.eq(a).is(":disabled")&&(e="disabled");g.eq(a).is(":selected:disabled")&&(e="selected sel disabled");void 0!==g.eq(a).attr("class")&&(p=" "+g.eq(a).attr("class"),q=' data-jqfs-class="'+g.eq
206(a).attr("class")+'"');var u=g.eq(a).data(),t;for(t in u)""!==u[t]&&(b+=" data-"+t+'="'+u[t]+'"');b="<li"+q+b+' class="'+e+p+'">'+g.eq(a).html()+"</li>";g.eq(a).parent().is("optgroup")&&(void 0!==g.eq(a).parent().attr("class")&&(d=" "+g.eq(a).parent().attr("class")),b="<li"+q+' class="'+e+p+" option"+d+'">'+g.eq(a).html()+"</li>",g.eq(a).is(":first-child")&&(b='<li class="optgroup'+d+'">'+g.eq(a).parent().attr("label")+"</li>"+b));s+=b}}function n(){var d=new A,v="",k=a.data("placeholder"),h=a.data("search"),n=a.data("search-limit"),w=a.data("search-not-found"),q=a.data("search-placeholder"),u=a.data("z-index"),t=a.data("smart-positioning");void 0===k&&(k=e.selectPlaceholder);if(void 0===h||""===h)h=e.selectSearch;if(void 0===n||""===n)n=e.selectSearchLimit;if(void 0===w||""===w)w=e.selectSearchNotFound;void 0===q&&(q=e.selectSearchPlaceholder);if(void 0===u||""===u)u=e.singleSelectzIndex;if(void 0===t||""===t)t=e.selectSmartPositioning;var f=c("<div"+d.id+' class="jq-selectbox jqselect'+d.classes+'" style="display: inline-block; position: relative; z-index:'+u+'"><div class="jq-selectbox__select"'+d.title+' style="position: relative"><div class="jq-selectbox__select-text"></div><div class="jq-selectbox__trigger"><div class="jq-selectbox__trigger-arrow"></div></div></div></div>');a.css({margin:0,padding:0}).after(f).prependTo(f);var E=c("div.jq-selectbox__select",f),z=c("div.jq-selectbox__select-text",f),d=g.filter(":selected");b();h&&(v='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+q+'"></div><div class="jq-selectbox__not-found">'+w+"</div>");var l=c('<div class="jq-selectbox__dropdown" style="position: absolute">'+v+'<ul style="position: relative; list-style: none; overflow: auto; overflow-x: hidden">'+s+"</ul></div>");f.append(l);var r=c("ul",l),m=c("li",l),y=c("input",l),x=c("div.jq-selectbox__not-found",l).hide();m.length<n&&y.parent().hide();var B=0,F=0;m.each(function(){var a=c(this);a.css({display:"inline-block","white-space":"nowrap"});a.innerWidth()>B&&(B=a.innerWidth(),F=a.width());a.css({display:"block"})});v=f.clone().appendTo("body").width("auto");h=v.width();v.remove();h==f.width()&&z.width(F);B>f.width()&&l.width(B);""===a.val()?z.text(k).addClass("placeholder"):z.text(d.text());""===g.first().text()&&""!==a.data("placeholder")&&m.first().hide();a.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
206);var G=f.outerHeight(),C=y.outerHeight(),D=r.css("max-height"),k=m.filter(".selected");1>k.length&&m.first().addClass("selected sel");void 0===m.data("li-height")&&m.data("li-height",m.outerHeight());var H=l.css("top");"auto"==l.css("left")&&l.css({left:0});"auto"==l.css("top")&&l.css({top:G});l.hide();k.length&&(g.first().text()!=d.text()&&f.addClass("changed"),f.data("jqfs-class",k.data("jqfs-class")),f.addClass(k.data("jqfs-class")));if(a.is(":disabled"))return f.addClass("disabled"),!1;E.click(function(){c("div.jq-selectbox").filter(".opened").length&&e.onSelectClosed.call(c("div.jq-selectbox").filter(".opened"));a.focus();if(!navigator.userAgent.match(/(iPad|iPhone|iPod)/i)){var b=c(window),q=m.data("li-height"),d=f.offset().top,k=b.height()-G-(d-b.scrollTop()),h=a.data("visible-options");if(void 0===h||""===h)h=e.selectVisibleOptions;var v=5*q,n=q*h;0<h&&6>h&&(v=n);0===h&&(n="auto");var h=function(){l.height("auto").css({bottom:"auto",top:H});var a=function(){r.css("max-height",Math.floor((k-20-C)/q)*q)};a();r.css("max-height",n);"none"!=D&&r.css("max-height",D);k<l.outerHeight()+20&&a()},s=function(){l.height("auto").css({top:"auto",bottom:H});var a=function(){r.css("max-height",Math.floor((d-b.scrollTop()-20-C)/q)*q)};a();r.css("max-height",n);"none"!=D&&r.css("max-height",D);d-b.scrollTop()-20<l.outerHeight()+20&&a()};!0===t||1===t?k>v+C+20?(h(),f.removeClass("dropup").addClass("dropdown")):(s(),f.removeClass("dropdown").addClass("dropup")):(!1===t||0===t)&&k>v+C+20&&(h(),f.removeClass("dropup").addClass("dropdown"));c("div.jqselect").css({zIndex:u-1}).removeClass("opened");f.css({zIndex:u});l.is(":hidden")?(c("div.jq-selectbox__dropdown:visible").hide(),l.show(),f.addClass("opened focused"),e.onSelectOpened.call(f)):(l.hide(),f.removeClass("opened dropup dropdown"),c("div.jq-selectbox").filter(".opened").length&&e.onSelectClosed.call(f));y.length&&(y.val("").keyup(),x.hide(),y.keyup(function(){var b=c(this).val();m.each(function(){c(this).html().match(RegExp(".*?"+b+".*?","i"))?c(this).show():c(this).hide()});""===g.first().text()&&""!==a.data("placeholder")&&m.first().hide();1>m.filter(":visible").length?x.show():x.hide()}));m.filter(".selected").length&&(0!==r.innerHeight()/q%2&&(q/=2),r.scrollTop(r.scrollTop()+m.filter(".selected").position().top-r.innerHeight()/2+q));p(r);return!1}});m.hover(function(){c(this).siblings().removeClass("selected")});m.filter(".selected").text();m.filter(".selected").text();m.filter(":not(.disabled):not(.optgroup)").click(function(){a.focus();var b=c(this),q=b.text();if(!b.is(".selected")){var d=b.index(),d=d-b.prevAll(".optgroup").length;b.addClass("selected sel").siblings().removeClass("selected sel");g.prop("selected",!1).eq(d).prop("selected",!0);z.text(q);f.data("jqfs-class")&&f.removeClass(f.data("jqfs-class"));f.data("jqfs-class",b.data("jqfs-class"));f.addClass(b.data("jqfs-class"));a.change()}l.hide();f.removeClass("opened dropup dropdown");e.onSelectClosed.call(f)});l.mouseout(function(){c("li.sel",l).addClass("selected")});a.on("change.styler",function(){z.text(g.filter(":selected").text()).removeClass("placeholder");m.removeClass("selected sel").not(".optgroup").eq(a[0].selectedIndex).addClass("selected sel");g.first().text()!=m.filter(".selected").text()?f.addClass("changed"):f.removeClass("changed")}).on("focus.styler",function(){f.addClass("focused");c("div.jqselect").not(".focused").removeClass("opened dropup dropdown").find("div.jq-selectbox__dropdown").hide()}).on("blur.styler",function(){f.removeClass("focused")}).on("keydown.styler keyup.styler",function(b){var c=m.data("li-height");z.text(g.filter(":selected").text());m.removeClass("selected sel").not(".optgroup").eq(a[0].selectedIndex).addClass("selected sel");38!=b.which&&37!=b.which&&33!=b.which&&36!=b.which||r.scrollTop(r.scrollTop()+m.filter(".selected").position().top);40!=b.which&&39!=b.which&&34!=b.which&&35!=b.which||r.scrollTop(r.scrollTop()+m.filter(".selected").position().top-r.innerHeight()+c);13==b.which&&(b.preventDefault(),l.hide(),f.removeClass("opened dropup dropdown"),e.onSelectClosed.call(f))}).on("keydown.styler",function(a){32==a.which&&(a.preventDefault(),E.click())});c(document).on("click",function(a){c(a.target).parents().hasClass("jq-selectbox")||"OPTION"==a.target.nodeName||(c("div.jq-selectbox").filter(".opened").length&&e.onSelectClosed.call(c("div.jq-selectbox").filter(".opened")),y.length&&y.val("").keyup(),l.hide().find("li.sel").addClass("selected"),f.removeClass("focused opened dropup dropdown"))})}
207function d(){var e=new A,d=c("<div"+e.id+' class="jq-select-multiple jqselect'+e.classes+'"'+e.title+' style="display: inline-block; position: relative"></div>');a.css({margin:0,padding:0}).after(d);b();d.append("<ul>"+s+"</ul>");var k=c("ul",d).css({position:"relative","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}),h=c("li",d).attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none","white-space":"nowrap"}),e=a.attr("size"),n=k.outerHeight(),w=h.outerHeight();void 0!==e&&0<e?k.css({height:w*e}):k.css({height:4*w});n>d.height()&&(k.css("overflowY","scroll"),p(k),h.filter(".selected").length&&k.scrollTop(k.scrollTop()+h.filter(".selected").position().top));a.prependTo(d).css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
207);if(a.is(":disabled"))d.addClass("disabled"),g.each(function(){c(this).is(":selected")&&h.eq(c(this).index()).addClass("selected")});else if(h.filter(":not(.disabled):not(.optgroup)").click(function(b){a.focus();var d=c(this);b.ctrlKey||b.metaKey||d.addClass("selected");b.shiftKey||d.addClass("first");b.ctrlKey||(b.metaKey||b.shiftKey)||d.siblings().removeClass("selected first");if(b.ctrlKey||b.metaKey)d.is(".selected")?d.removeClass("selected first"):d.addClass("selected first"),d.siblings().removeClass("first");if(b.shiftKey){var e=!1,f=!1;d.siblings().removeClass("selected").siblings(".first").addClass("selected");d.prevAll().each(function(){c(this).is(".first")&&(e=!0)});d.nextAll().each(function(){c(this).is(".first")&&(f=!0)});e&&d.prevAll().each(function(){if(c(this).is(".selected"))return!1;c(this).not(".disabled, .optgroup").addClass("selected")});f&&d.nextAll().each(function(){if(c(this).is(".selected"))return!1;c(this).not(".disabled, .optgroup").addClass("selected")});1==h.filter(".selected").length&&d.addClass("first")}g.prop("selected",!1);h.filter(".selected").each(function(){var a=c(this),b=a.index();a.is(".option")&&(b-=a.prevAll(".optgroup").length);g.eq(b).prop("selected",!0)});a.change()}),g.each(function(a){c(this).data("optionIndex",a)}),a.on("change.styler",function(){h.removeClass("selected");var a=[];g.filter(":selected").each(function(){a.push(c(this).data("optionIndex"))});h.not(".optgroup").filter(function(b){return-1<c.inArray(b,a)}).addClass("selected")}).on("focus.styler",function(){d.addClass("focused")}).on("blur.styler",function(){d.removeClass("focused")}),n>d.height())a.on("keydown.styler",function(a){38!=a.which&&37!=a.which&&33!=a.which||k.scrollTop(k.scrollTop()+h.filter(".selected").position().top-w);40!=a.which&&39!=a.which&&34!=a.which||k.scrollTop(k.scrollTop()+h.filter(".selected:last").position().top-k.innerHeight()+2*w)})}var g=c("option",a),s="";if(a.is("[multiple]")){var x=navigator.userAgent.match(/Android/i)?!0:!1,I=navigator.userAgent.match(/(iPad|iPhone|iPod)/i)?!0:!1;x||I||d()}else n()};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is(":reset"))a.on("click",function(){setTimeout(function(){a.closest(e.wrapper).find("input, select").trigger("refresh")},1)})}).promise().done(function(){e.onFormStyled.call()})}})(jQuery);;function countUp(target,startVal,endVal,decimals,duration,options){this.options=options||{useEasing:true,useGrouping:true,separator:',',decimal:'.'}
208var lastTime=0;var vendors=['webkit','moz','ms'];for(var x=0;x<vendors.length&&!window.requestAnimationFrame;++x){window.requestAnimationFrame=window[vendors[x]+'RequestAnimationFrame'];window.cancelAnimationFrame=window[vendors[x]+'CancelAnimationFrame']||window[vendors[x]+'CancelRequestAnimationFrame'];}
209if(!window.requestAnimationFrame){window.requestAnimationFrame=function(callback,element){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;}}
210if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(id){clearTimeout(id);}}
211var self=this;this.d=(typeof target==='string')?document.getElementById(target):target;this.startVal=Number(startVal);this.endVal=Number(endVal);this.countDown=(this.startVal>this.endVal)?true:false;this.startTime=null;this.timestamp=null;this.remaining=null;this.frameVal=this.startVal;this.rAF=null;this.decimals=Math.max(0,decimals||0);this.dec=Math.pow(10,this.decimals);this.duration=duration*1000||2000;this.easeOutExpo=function(t,b,c,d){return c*(-Math.pow(2,-10*t/d)+1)*1024/1023+b;}
212this.count=function(timestamp){if(self.startTime===null)self.startTime=timestamp;self.timestamp=timestamp;var progress=timestamp-self.startTime;self.remaining=self.duration-progress;if(self.options.useEasing){if(self.countDown){var i=self.easeOutExpo(progress,0,self.startVal-self.endVal,self.duration);self.frameVal=self.startVal-i;}else{self.frameVal=self.easeOutExpo(progress,self.startVal,self.endVal-self.startVal,self.duration);}}else{if(self.countDown){var i=(self.startVal-self.endVal)*(progress/self.duration);self.frameVal=self.startVal-i;}else{self.frameVal=self.startVal+(self.endVal-self.startVal)*(progress/self.duration);}}
213self.frameVal=Math.round(self.frameVal*self.dec)/self.dec;if(self.countDown){self.frameVal=(self.frameVal<self.endVal)?self.endVal:self.frameVal;}else{self.frameVal=(self.frameVal>self.endVal)?self.endVal:self.frameVal;}
214self.d.innerHTML=self.formatNumber(self.frameVal.toFixed(self.decimals));if(progress<self.duration){self.rAF=requestAnimationFrame(self.count);}else{if(self.callback!=null)self.callback();}}
215this.start=function(callback){self.callback=callback;if(!isNaN(self.endVal)&&!isNaN(self.startVal)){self.rAF=requestAnimationFrame(self.count);}else{console.log('countUp error: startVal or endVal is not a number');self.d.innerHTML='--';}
216return false;}
217this.stop=function(){cancelAnimationFrame(self.rAF);}
218this.reset=function(){self.startTime=null;cancelAnimationFrame(self.rAF);self.d.innerHTML=self.formatNumber(self.startVal.toFixed(self.decimals));}
219this.resume=function(){self.startTime=null;self.duration=self.remaining;self.startVal=self.frameVal;requestAnimationFrame(self.count);}
220this.formatNumber=function(nStr){nStr+='';var x,x1,x2,rgx;x=nStr.split('.');x1=x[0];x2=x.length>1?self.options.decimal+x[1]:'';rgx=/(\d+)(\d{3})/;if(self.options.useGrouping){while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+self.options.separator+'$2');}}
221return x1+x2;}
222self.d.innerHTML=self.formatNumber(self.startVal.toFixed(self.decimals));};;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;
vendor: 8,361 bytes, lines 222-223
222var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:t(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c};for(var B in n)v(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};;;(function($,window,document,undefined){var OnePageNav=function(elem,options){this.elem=elem;this.$elem=$(elem);this.options=options;this.metadata=this.$elem.data('plugin-options');this.$nav=this.$elem.find('a');this.$win=$(window);this.sections={};this.didScroll=false;this.$doc=$(document);this.docHeight=this.$doc.height();};OnePageNav.prototype={defaults:{currentClass:'active',changeHash:false,easing:'swing',filter:'',scrollSpeed:750,scrollOffset:62,scrollThreshold:0.5,begin:false,end:false,scrollChange:false},init:function(){var self=this;self.config=$.extend({},self.defaults,self.options,self.metadata);if(self.config.filter!==''){self.$nav=self.$nav.filter(self.config.filter);}
223self.$nav.on('click.onePageNav',$.proxy(self.handleClick,self));self.getPositions();self.bindInterval();self.$win.on('resize.onePageNav',$.proxy(self.getPositions,self));return this;},adjustNav:function(self,$parent){self.$elem.find('.'+self.config.currentClass).removeClass(self.config.currentClass);$parent.addClass(self.config.currentClass);},bindInterval:function(){var self=this;var docHeight;self.$win.on('scroll.onePageNav',function(){self.didScroll=true;});self.t=setInterval(function(){docHeight=self.$doc.height();if(self.didScroll){self.didScroll=false;self.scrollChange();}
224if(docHeight!==self.docHeight){self.docHeight=docHeight;self.getPositions();}},250);},getHash:function($link){return $link.attr('href').split('#')[1];},getPositions:function(){var self=this;var linkHref;var topPos;var $target;self.$nav.each(function(){linkHref=self.getHash($(this));$target=$('#'+linkHref);if($target.length){topPos=$target.offset().top;self.sections[linkHref]=Math.round(topPos)-self.config.scrollOffset;}});},getSection:function(windowPos){var returnValue=null;var windowHeight=Math.round(this.$win.height()*this.config.scrollThreshold);for(var section in this.sections){if((this.sections[section]-windowHeight)<windowPos){returnValue=section;}}
225return returnValue;},handleClick:function(e){var self=this;var $link=$(e.currentTarget);var $parent=$link.parent();var newLoc='#'+self.getHash($link);if(!$parent.hasClass(self.config.currentClass)){if(self.config.begin){self.config.begin();}
226self.adjustNav(self,$parent);self.unbindInterval();$.scrollTo(newLoc,self.config.scrollSpeed,{axis:'y',easing:self.config.easing,offset:{top:-self.config.scrollOffset},onAfter:function(){if(self.config.changeHash){window.location.hash=newLoc;}
227self.bindInterval();if(self.config.end){self.config.end();}}});}
228e.preventDefault();},scrollChange:function(){var windowTop=this.$win.scrollTop();var position=this.getSection(windowTop);var $parent;if(position!==null){$parent=this.$elem.find('a[href$="#'+position+'"]').parent();if(!$parent.hasClass(this.config.currentClass)){this.adjustNav(this,$parent);if(this.config.scrollChange){this.config.scrollChange($parent);}}}},unbindInterval:function(){clearInterval(this.t);this.$win.unbind('scroll.onePageNav');}};OnePageNav.defaults=OnePageNav.prototype.defaults;$.fn.onePageNav=function(options){return this.each(function(){new OnePageNav(this,options).init();});};})(jQuery,window,document);;
229/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
230(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
231(H?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,
231skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.he
vendor: 7,331 bytes, line 231
231ight());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==r)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case"inline":case"ajax":case"html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case"image":e=a.tpl.image.replace("{href}",g);break;case"swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x","hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;
231h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c<m&&(c=m,j=l(c/E)),j<u&&(j=u,c=l(j*E))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,v)));if(h.fitToView)if(g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height(),h.aspectRatio)for(;(a>A||p>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(v,j-10)),c=l(j*E),c<m&&(c=m,j=l(c/E)),c>n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&j<B&&c+y+
232q<A)&&(c+=q);g.width(c).height(j);e.width(c+y);a=e.width();p=e.height();e=(a>A||p>r)&&c>m&&j>u;c=h.aspectRatio?c<G&&j<C&&c<D&&j<B:(c<G||j<C)&&(c<D||j<B);f.extend(h,{dim:{width:x(a),height:x(p)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:z,wrapSpace:p-k.outerHeight(!0),skinSpace:k.height()-j});!w&&(h.autoHeight&&j>u&&j<v&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-j*a.leftRatio),width:x(f+j),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(l(e[g])-200),c[g]="+=200px"):(e[g]=x(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case"inside":c=b.skin;break;case"outside":c=b.wrap;break;case"over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),H&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}
232d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);;$(document).ready(function(){$('.nav').onePageNav({filter:':not(.external)',scrollThreshold:0.25,scrollOffset:60,});$(window).scroll(function(){if($(this).scrollTop()>100){$('.scrollup').fadeIn();}else{$('.scrollup').fadeOut();}});$('.scrollup').click(function(){$("html, body").animate({scrollTop:0},600);return false;});$("a.lightbox_image").fancybox({'transitionIn':'elastic','transitionOut':'elastic','speedIn':600,'speedOut':200,'overlayShow':false});if($.fn.tooltip()){$('[class="tooltip_hover"]').tooltip();}
233$("#openmap").fancybox({'width':'65%','height':'65%','autoScale':false,'transitionIn':'none','transitionOut':'none','type':'iframe'});$("#video").fitVids();$('header .buttons a, .information a.btn, .newsletter .btn[type="submit"]').hover(function(){$(this).toggleClass('animated bounce');});$('.pricing-table').hover(function(){$(this).toggleClass('animated pulse');});$('.logos a img, .features .item').hover(function(){$(this).toggleClass('animated flip');});});;$(document).ready(function(){if(checkFlash()){$('.mangotele_btn').css("cursor","pointer").click(function(){window.open('http://excitel.ru/call/widget/cb215e4673018202f4a75179ac606c71','Звонок с сайта Простой.Ру','width=450,height=420,resizable=no,toolbar=no,menubar=no,location=no,status=no');return false;});}
234$('.mangotele_bt2n').css("cursor","pointer").click(function(){window.open('http://issa.mangotele.com/widget/MTA0MDk2','mangotele_widget','width=238,height=215,resizable=no,toolbar=no,menubar=no,location=no,status=no');return false;});});function checkFlash(){var flashInstalled=false;if(typeof(navigator.plugins)!="undefined"&&typeof(navigator.plugins["Shockwave Flash"])=="object"){flashInstalled=true;}else if(typeof window.ActiveXObject!="undefined"){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){flashInstalled=true;}}catch(e){};};return flashInstalled;}
235$(document).ready(function(){$('.opp1 span').hover(function(){$('.opp1 span').toggleClass('animated rotateOut');});$('.opp2 span').hover(function(){$('.opp2 span').toggleClass('animated rotateOut');});$('.opp3 span').hover(function(){$('.opp3 span').toggleClass('animated rotateOut');});$('.opp4 span').hover(function(){$('.opp4 span').toggleClass('animated rotateOut');});$('.opp5 span').hover(function(){$('.opp5 span').toggleClass('animated rotateOut');});$('.opp6 span').hover(function(){$('.opp6 span').toggleClass('animated rotateOut');});});;
236/*! WOW - v1.0.2 - 2014-10-28
237* Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */
238(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}
vendor: 4,475 bytes, line 238
238,a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}
vendor: 4,199 bytes, line 238
238,e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);;if(!hs){var hs={lang:{cssDirection:"ltr",loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:.75,allowMultipleInstances:!0,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:!1,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:!0,creditsHref:"http://highslide.com/",creditsTarget:"_self",enableKeyListener:!0,openerTagNames:["a","area"],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,allowWidthReduction:!1,allowHeightReduction:!0,preserveContent:!0,objectLoadTime:"before",cacheAjax:!0,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:!0,minWidth:200,minHeight:200,allowSizeReduction:!0,outlineType:"drop-shadow",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}"><span>{hs.lang.previousText}</span></a></li><li class="highslide-play"><a href="#" title="{hs.lang.playTitle}"><span>{hs.lang.playText}</span></a></li><li class="highslide-pause"><a href="#" title="{hs.lang.pauseTitle}"><span>{hs.lang.pauseText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}"><span>{hs.lang.moveText}</span></a></li><li class="highslide-full-expand"><a href="#" title="{hs.lang.fullExpandTitle}"><span>{hs.lang.fullExpandText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>
238',contentWrapper:'<div class="highslide-header"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)"><span>{hs.lang.previousText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}" onclick="return false"><span>{hs.lang.moveText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)"><span>{hs.lang.closeText}</span></a></li></ul></div><div class="highslide-body"></div><div class="highslide-footer"><div><span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span></div></div>'},preloadTheseImages:[],continuePreloading:!0,expanders:[],overrides:["allowSizeReduction","useBox","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","width","height","contentId","allowWidthReduction","allowHeightReduction","preserveContent","maincontentId","maincontentText","maincontentEval","objectType","cacheAjax","objectWidth","objectHeight","objectLoadTime","swfOptions","wrapperClassName","minWidth","minHeight","maxWidth","maxHeight","pageOrigin","slideshowGroup","easing","easingClose","fadeInOut","src"],overlays:[],idCounter:0,oPos:{x:["leftpanel","left","center","right","rightpanel"],y:["above","top","middle","bottom","below"]},mouse:{},headingOverlay:{},captionOverlay:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]),ie:document.all&&!window.opera,safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(e){return e?document.getElementById(e):void 0},push:function(e,t){e[e.length]=t},createElement:function(e,t,s,i,h){var n=document.createElement(e);return t&&hs.extend(n,t),h&&hs.setStyles(n,{padding:0,border:"none",margin:0}),s&&hs.setStyles(n,s),i&&i.appendChild(n),n},extend:function(e,t){for(var s in t)e[s]=t[s];return e},setStyles:function(e,t){for(var s in t)hs.ieLt9&&"opacity"==s?t[s]>.99?e.style.removeAttribute("filter"):e.style.filter="alpha(opacity="+100*t[s]+")":e.style[s]=t[s]},animate:function(e,t,s){var i,h,n;if("object"!=typeof s||null===s){var o=arguments;s={duration:o[2],easing:o[3],complete:o[4]}}"number"!=typeof s.duration&&(s.duration=250),s.easing=Math[s.easing]||Math.easeInQuad,s.curAnim=hs.extend({},t);for(var a in t){var r=new hs.fx(e,s,a);i=parseFloat(hs.css(e,a))||0,h=parseFloat(t[a]),n="opacity"!=a?"px":"",r.custom(i,h,n)}},css:function(e,t){if(e.style[t])return e.style[t];if(document.defaultView)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t);"opacity"==t&&(t="filter");var s=e.currentStyle[t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})];return"filter"==t&&(s=s.replace(/alpha\(opacity=([0-9]+)\)/,function(e,t){return t/100})),""===s?1:s},getPageSize:function(){var e=document,t=e.compatMode&&"BackCompat"!=e.compatMode?e.documentElement:e.body,s=hs.ie&&(hs.uaVersion<9||"undefined"==typeof pageXOffset),i=s?t.clientWidth:e.documentElement.clientWidth||self.innerWidth,h=s?t.clientHeight:self.innerHeight;return hs.page={width:i,height:h,scrollLeft:s?t.scrollLeft:pageXOffset,scrollTop:s?t.scrollTop:pageYOffset},hs.page},getPosition:function(e){if(/area/i.test(e.tagName))for(var t=document.getElementsByTagName("img"),s=0;s<t.length;s++){var i=t[s].useMap;if(i&&i.replace(/^.*?#/,"")==e.parentNode.name){e=t[s];break}}for(var h={x:e.offsetLeft,y:e.offsetTop};e.offsetParent;)e=e.offsetParent,h.x+=e.offsetLeft,h.y+=e.offsetTop,e!=document.body&&e!=document.documentElement&&(h.x-=e.scrollLeft,h.y-=e.scrollTop);return h},expand:function(e,t,s,i){if(e||(e=hs.createElement("a",null,{display:"none"},hs.container)),"function"==typeof e.getParams)return t;if("html"==i){for(var h=0;h<hs.sleeping.length;h++)if(hs.sleeping[h]&&hs.sleeping[h].a==e)return hs.sleeping[h].awake(),hs.sleeping[h]=null,!1;hs.hasHtmlExpanders=!0}try{return new hs.Expander(e,t,s,i),!1}catch(n){return!0}},htmlExpand:function(e,t,s){return hs.expand(e,t,s,"html")},getSelfRendered:function(){return hs.createElement("div",{className:"highsli
238de-html-content",innerHTML:hs.replaceLang(hs.skin.contentWrapper)})},getElementByClass:function(e,t,s){for(var i=e.getElementsByTagName(t),h=0;h<i.length;h++)if(RegExp(s).test(i[h].className))return i[h];return null},replaceLang:function(e){e=e.replace(/\s/g," ");var t,s=/{hs\.lang\.([^}]+)\}/g,i=e.match(s);if(i)for(var h=0;h<i.length;h++)t=i[h].replace(s,"$1"),void 0!==hs.lang[t]&&(e=e.replace(i[h],hs.lang[t]));return e},setClickEvents:function(){for(var e=document.getElementsByTagName("a"),t=0;t<e.length;t++){var s=hs.isUnobtrusiveAnchor(e[t]);s&&!e[t].hsHasSetClick&&(!function(){var i=s;hs.fireEvent(hs,"onSetClickEvent",{element:e[t],type:i})&&(e[t].onclick="image"==s?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:i})})}(),e[t].hsHasSetClick=!0)}hs.getAnchors()},isUnobtrusiveAnchor:function(e){return"highslide"==e.rel?"image":"highslide-ajax"==e.rel?"ajax":"highslide-iframe"==e.rel?"iframe":"highslide-swf"==e.rel?"swf":void 0},getCacheBinding:function(e){for(var t=0;t<hs.cacheBindings.length;t++)if(hs.cacheBindings[t][0]==e){var s=hs.cacheBindings[t][1];return hs.cacheBindings[t][1]=s.cloneNode(1),s}return null},preloadAjax:function(){for(var e=hs.getAnchors(),t=0;t<e.htmls.length;t++){var s=e.htmls[t];"ajax"==hs.getParam(s,"objectType")&&hs.getParam(s,"cacheAjax")&&hs.push(hs.preloadTheseAjax,s)}hs.preloadAjaxElement(0)},preloadAjaxElement:function(e){if(hs.preloadTheseAjax[e]){var t=hs.preloadTheseAjax[e],s=hs.getNode(hs.getParam(t,"contentId"));s||(s=hs.getSelfRendered());var i=new hs.Ajax(t,s,1);i.onError=function(){},i.onLoad=function(){hs.push(hs.cacheBindings,[t,s]),hs.preloadAjaxElement(e+1)},i.run()}},focusTopmost:function(){for(var e,t,s=0,i=-1,h=hs.expanders,n=0;n<h.length;n++)e=h[n],e&&(t=e.wrapper.style.zIndex,t&&t>s&&(s=t,i=n));-1==i?hs.focusKey=-1:h[i].focus()},getParam:function(e,t){e.getParams=e.onclick;var s=e.getParams?e.getParams():null;return e.getParams=null,s&&void 0!==s[t]?s[t]:void 0!==hs[t]?hs[t]:null},getSrc:function(e){var t=hs.getParam(e,"src");return t?t:e.href},getNode:function(e){var t=hs.$(e),s=hs.clones[e];return t||s?s?s.cloneNode(!0):(s=t.cloneNode(!0),s.id="",hs.clones[e]=s,t):null},discardElement:function(e){e&&hs.garbageBin.appendChild(e),hs.garbageBin.innerHTML=""},dim:function(e){function t(){hs.setStyles(hs.dimmer,{width:s.scrollWidth+"px",height:s.scrollHeight+"px"})}if(!hs.dimmer&&(i=!0,hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){hs.fireEvent(hs,"onDimmerClick")&&hs.close()}},{visibility:"visible",opacity:0},hs.container,!0),/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent))){var s=document.body;t(),hs.addEventListener(window,"resize",t)}hs.dimmer.style.display="";var i=""==hs.dimmer.owner;hs.dimmer.owner+="|"+e.key,i&&(hs.geckoMac&&hs.dimmingGeckoFix?hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1}):hs.animate(hs.dimmer,{opacity:e.dimmingOpacity},hs.dimmingDuration))},undim:function(e){hs.dimmer&&(void 0!==e&&(hs.dimmer.owner=hs.dimmer.owner.replace("|"+e,"")),void 0!==e&&""!=hs.dimmer.owner||hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity")||(hs.geckoMac&&hs.dimmingGeckoFix?hs.dimmer.style.display="none":hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})))},transit:function(e,t){var s=t||hs.getExpander();if(t=s,hs.upcoming)return!1;hs.last=s,hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{hs.upcoming=e,e.onclick()}catch(i){hs.last=hs.upcoming=null}try{e&&"crossfade"==t.transitions[1]||t.close()}catch(i){}return!1},previousOrNext:function(e,t){var s=hs.getExpander(e);return s?hs.transit(s.getAdjacentAnchor(t),s):!1},previous:function(e){return hs.previousOrNext(e,-1)},next:function(e){return hs.previousOrNext(e,1)},keyHandler:function(e){if(e||(e=window.event),e.target||(e.target=e.srcElement),void 0!==e.target.form)return!0;if(!hs.fireEvent(hs,"onKeyDown",e))return!0;var t=hs.getExpander(),s=null;switch(e.keyCode){case 70:return t&&t.doFullExpand(),!0;case 32:s=2;break;case 34:case 39:case 40:s=1;break;case 8:case 33:case 37:case 38:s=-1;break;case 27:case 13:s=0}if(null!==s){if(2!=s&&hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler),!hs.enableKeyListener)return!0;
238if(e.preventDefault?e.preventDefault():e.returnValue=!1,t)return 0==s?t.close():2==s?t.slideshow&&t.slideshow.hitSpace():(t.slideshow&&t.slideshow.pause(),hs.previousOrNext(t.key,s)),!1}return!0},registerOverlay:function(e){hs.push(hs.overlays,hs.extend(e,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(e){var t=e.slideshowGroup;if("object"==typeof t)for(var s=0;s<t.length;s++){var i={};for(var h in e)i[h]=e[h];i.slideshowGroup=t[s],hs.push(hs.slideshows,i)}else hs.push(hs.slideshows,e)},getWrapperKey:function(e,t){var s,i=/^highslide-wrapper-([0-9]+)$/;for(s=e;s.parentNode;){if(void 0!==s.hsKey)return s.hsKey;if(s.id&&i.test(s.id))return s.id.replace(i,"$1");s=s.parentNode}if(!t)for(s=e;s.parentNode;){if(s.tagName&&hs.isHsAnchor(s))for(var h=0;h<hs.expanders.length;h++){var n=hs.expanders[h];if(n&&n.a==s)return h}s=s.parentNode}return null},getExpander:function(e,t){return void 0===e?hs.expanders[hs.focusKey]||null:"number"==typeof e?hs.expanders[e]||null:("string"==typeof e&&(e=hs.$(e)),hs.expanders[hs.getWrapperKey(e,t)]||null)},isHsAnchor:function(e){return e.onclick&&(""+e.onclick).replace(/\s/g," ").match(/hs.(htmlE|e)xpand/)},reOrder:function(){for(var e=0;e<hs.expanders.length;e++)hs.expanders[e]&&hs.expanders[e].isExpanded&&hs.focusTopmost()},fireEvent:function(e,t,s){return e&&e[t]?e[t](e,s)!==!1:!0},mouseClickHandler:function(e){if(e||(e=window.event),e.button>1)return!0;e.target||(e.target=e.srcElement);for(var t=e.target;t.parentNode&&!/highslide-(image|move|html|resize)/.test(t.className);)t=t.parentNode;var s=hs.getExpander(t);if(s&&(s.isClosing||!s.isExpanded))return!0;if(s&&"mousedown"==e.type){if(e.target.form)return!0;var i=t.className.match(/highslide-(image|move|resize)/);if(i)return hs.dragArgs={exp:s,type:i[1],left:s.x.pos,width:s.x.size,top:s.y.pos,height:s.y.size,clickX:e.clientX,clickY:e.clientY},hs.addEventListener(document,"mousemove",hs.dragHandler),e.preventDefault&&e.preventDefault(),/highslide-(image|html)-blur/.test(s.content.className)&&(s.focus(),hs.hasFocused=!0),!1;/highslide-html/.test(t.className)&&hs.focusKey!=s.key&&(s.focus(),s.doShowHide("hidden"))}else if("mouseup"==e.type)if(hs.removeEventListener(document,"mousemove",hs.dragHandler),hs.dragArgs){hs.styleRestoreCursor&&"image"==hs.dragArgs.type&&(hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor);var h=hs.dragArgs.hasDragged;h||hs.hasFocused||/(move|resize)/.test(hs.dragArgs.type)?(h||!h&&hs.hasHtmlExpanders)&&hs.dragArgs.exp.doShowHide("hidden"):hs.fireEvent(s,"onImageClick")&&s.close(),hs.dragArgs.exp.releaseMask&&(hs.dragArgs.exp.releaseMask.style.display="none"),h&&hs.fireEvent(hs.dragArgs.exp,"onDrop",hs.dragArgs),hs.hasFocused=!1,hs.dragArgs=null}else/highslide-image-blur/.test(t.className)&&(t.style.cursor=hs.styleRestoreCursor);return!1},dragHandler:function(e){if(!hs.dragArgs)return!0;e||(e=window.event);var t=hs.dragArgs,s=t.exp;s.iframe&&(s.releaseMask||(s.releaseMask=hs.createElement("div",null,{position:"absolute",width:s.x.size+"px",height:s.y.size+"px",left:s.x.cb+"px",top:s.y.cb+"px",zIndex:4,background:hs.ieLt9?"white":"none",opacity:.01},s.wrapper,!0)),"none"==s.releaseMask.style.display&&(s.releaseMask.style.display="")),t.dX=e.clientX-t.clickX,t.dY=e.clientY-t.clickY;var i=Math.sqrt(Math.pow(t.dX,2)+Math.pow(t.dY,2));if(t.hasDragged||(t.hasDragged="image"!=t.type&&i>0||i>(hs.dragSensitivity||5)),t.hasDragged&&e.clientX>5&&e.clientY>5){if(!hs.fireEvent(s,"onDrag",t))return!1;"resize"==t.type?s.resize(t):(s.moveTo(t.left+t.dX,t.top+t.dY),"image"==t.type&&(s.content.style.cursor="move"))}return!1},wrapperMouseHandler:function(e){try{e||(e=window.event);var t=/mouseover/i.test(e.type);e.target||(e.target=e.srcElement),e.relatedTarget||(e.relatedTarget=t?e.fromElement:e.toElement);var s=hs.getExpander(e.target);if(!s.isExpanded)return;if(!s||!e.relatedTarget||hs.getExpander(e.relatedTarget,!0)==s||hs.dragArgs)return;hs.fireEvent(s,t?"onMouseOver":"onMouseOut",e);for(var i=0;i<s.overlays.length;i++)(function(){var e=hs.$("hsId"+s.overlays[i]);e&&e.hideOnMouseOut&&(t&&hs.setStyles(e,{visibility:"visible",display:""}
238),hs.animate(e,{opacity:t?e.opacity:0},e.dur))})()}catch(e){}},addEventListener:function(e,t,s){e==document&&"ready"==t&&hs.push(hs.onReady,s);try{e.addEventListener(t,s,!1)}catch(i){try{e.detachEvent("on"+t,s),e.attachEvent("on"+t,s)}catch(i){e["on"+t]=s}}},removeEventListener:function(e,t,s){try{e.removeEventListener(t,s,!1)}catch(i){try{e.detachEvent("on"+t,s)}catch(i){e["on"+t]=null}}},preloadFullImage:function(e){if(hs.continuePreloading&&hs.preloadTheseImages[e]&&"undefined"!=hs.preloadTheseImages[e]){var t=document.createElement("img");t.onload=function(){t=null,hs.preloadFullImage(e+1)},t.src=hs.preloadTheseImages[e]}},preloadImages:function(e){e&&"object"!=typeof e&&(hs.numberOfImagesToPreload=e);for(var t=hs.getAnchors(),s=0;s<t.images.length&&s<hs.numberOfImagesToPreload;s++)hs.push(hs.preloadTheseImages,hs.getSrc(t.images[s]));hs.outlineType?new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)}):hs.preloadFullImage(0),hs.restoreCursor&&hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.ieLt7=hs.ie&&hs.uaVersion<7,hs.ieLt9=hs.ie&&hs.uaVersion<9,hs.getPageSize(),hs.ie6SSL=hs.ieLt7&&"https:"==location.protocol;for(var e in hs.langDefaults)void 0!==hs[e]?hs.lang[e]=hs[e]:void 0===hs.lang[e]&&void 0!==hs.langDefaults[e]&&(hs.lang[e]=hs.langDefaults[e]);hs.container=hs.createElement("div",{className:"highslide-container"},{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter,direction:"ltr"},document.body,!0),hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",top:"-9999px",opacity:hs.loadingOpacity,zIndex:1},hs.container),hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container),hs.viewport=hs.createElement("div",{className:"highslide-viewport highslide-viewport-size"},{visibility:hs.safari&&hs.uaVersion<525?"visible":"hidden"},hs.container,1),hs.clearing=hs.createElement("div",null,{clear:"both",paddingTop:"1px"},null,!0),Math.linearTween=function(e,t,s,i){return s*e/i+t},Math.easeInQuad=function(e,t,s,i){return s*(e/=i)*e+t},Math.easeOutQuad=function(e,t,s,i){return-s*(e/=i)*(e-2)+t},hs.hideSelects=hs.ieLt7,hs.hideIframes=window.opera&&hs.uaVersion<9||"KDE"==navigator.vendor||hs.ieLt7&&hs.uaVersion<5.5,hs.fireEvent(this,"onActivate")}},ready:function(){if(!hs.isReady){hs.isReady=!0;for(var e=0;e<hs.onReady.length;e++)hs.onReady[e]()}},updateAnchors:function(){for(var e,t,s,i=[],h=[],n=[],o={},a=0;a<hs.openerTagNames.length;a++){t=document.getElementsByTagName(hs.openerTagNames[a]);for(var r=0;r<t.length;r++)if(e=t[r],s=hs.isHsAnchor(e)){hs.push(i,e),"hs.expand"==s[0]?hs.push(h,e):"hs.htmlExpand"==s[0]&&hs.push(n,e);var l=hs.getParam(e,"slideshowGroup")||"none";o[l]||(o[l]=[]),hs.push(o[l],e)}}return hs.anchors={all:i,groups:o,images:h,htmls:n},hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(e){var t=hs.getExpander(e);return t&&t.close(),!1}};hs.fx=function(e,t,s){this.options=t,this.elem=e,this.prop=s,t.orig||(t.orig={})},hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this),this.options.step&&this.options.step.call(this.elem,this.now,this)},custom:function(e,t,s){function i(e){return h.step(e)}this.startTime=(new Date).getTime(),this.start=e,this.end=t,this.unit=s,this.now=this.start,this.pos=this.state=0;var h=this;i.elem=this.elem,i()&&1==hs.timers.push(i)&&(hs.timerId=setInterval(function(){for(var e=hs.timers,t=0;t<e.length;t++)e[t]()||e.splice(t--,1);e.length||clearInterval(hs.timerId)},13))},step:function(e){var t=(new Date).getTime();if(e||t>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;var s=!0;for(var i in this.options.curAnim)this.options.curAnim[i]!==!0&&(s=!1);return s&&this.options.complete&&this.options.complete.call(this.elem),!1}var h=t-this.startTime;return this.state=h/this.options.duration,this.pos=this.options.easing(h,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),!0}},hs.extend(hs.fx,{step:{opacity:function(e){hs.setStyles(e.elem,{opacity:e.now})},_default:function(e){try{e.elem.style&&null!=e.elem.style[e.prop]?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}catch(t){}}}}),hs.Outline=function(e,t){this.onLoad=t,this.outlineType=e;var s;if(hs.uaVersion,this.hasAlphaImageLoader=hs.ie&&hs.uaVersion<7,!e)return void(t&&t());hs.init(),this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,!0);var i=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var h=0;8>=h;h++){h%3==0&&(s=hs.createElement("tr",null,{height:"auto"},i,!0)),this.td[h]=hs.createElement("td",null,null,s,!0);var n=4!=h?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[h],n)}
238this.td[4].className=e+" highslide-outline",this.preloadGraphic()},hs.Outline.prototype={preloadGraphic:function(){var e=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png",t=hs.safari&&hs.uaVersion<525?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},t,!0);var s=this;this.graphic.onload=function(){s.onGraphicLoad()},this.graphic.src=e},onGraphicLoad:function(){for(var e=this.offset=this.graphic.width/4,t=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],s={height:2*e+"px",width:2*e+"px"},i=0;8>=i;i++)if(t[i]){if(this.hasAlphaImageLoader){var h=1==i||7==i?"100%":this.graphic.width+"px",n=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[i],!0);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:h,height:this.graphic.height+"px",left:t[i][0]*e+"px",top:t[i][1]*e+"px"},n,!0)}else hs.setStyles(this.td[i],{background:"url("+this.graphic.src+") "+t[i][0]*e+"px "+t[i][1]*e+"px"});!window.opera||3!=i&&5!=i||hs.createElement("div",null,s,this.td[i],!0),hs.setStyles(this.td[i],s)}this.graphic=null,hs.pendingOutlines[this.outlineType]&&hs.pendingOutlines[this.outlineType].destroy(),hs.pendingOutlines[this.outlineType]=this,this.onLoad&&this.onLoad()},setPosition:function(e,t,s){var i=this.exp,t=(i.wrapper.style,t||0),e=e||{x:i.x.pos+t,y:i.y.pos+t,w:i.x.get("wsize")-2*t,h:i.y.get("wsize")-2*t};s&&(this.table.style.visibility=e.h<4*this.offset?"hidden":"visible"),hs.setStyles(this.table,{left:e.x-this.offset+"px",top:e.y-this.offset+"px",width:e.w+2*this.offset+"px"}),e.w-=2*this.offset,e.h-=2*this.offset,hs.setStyles(this.td[4],{width:e.w<0?0:e.w+"px",height:e.h<0?0:e.h+"px"}),this.hasAlphaImageLoader&&(this.td[3].style.height=this.td[5].style.height=this.td[4].style.height)},destroy:function(e){e?this.table.style.visibility="hidden":hs.discardElement(this.table)}},hs.Dimension=function(e,t){this.exp=e,this.dim=t,this.ucwh="x"==t?"Width":"Height",this.wh=this.ucwh.toLowerCase(),this.uclt="x"==t?"Left":"Top",this.lt=this.uclt.toLowerCase(),this.ucrb="x"==t?"Right":"Bottom",this.rb=this.ucrb.toLowerCase(),this.p1=this.p2=0},hs.Dimension.prototype={get:function(e){switch(e){case"loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case"loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case"wsize":return this.size+2*this.cb+this.p1+this.p2;case"fitsize":return this.clientSize-this.marginMin-this.marginMax;case"maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case"opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0);case"osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case"imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2,this.marginMax=hs["margin"+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el["offset"+this.ucwh],this.tpos=this.exp.tpos[this.dim],this.tb=(this.exp.el["offset"+this.ucwh]-this.t)/2,(0==this.tpos||-1==this.tpos)&&(this.tpos=hs.page[this.wh]/2+hs.page["scroll"+this.uclt])},calcExpanded:function(){var e=this.exp;this.justify="auto","center"==e.align?this.justify="center":RegExp(this.lt).test(e.anchor)?this.justify=null:RegExp(this.rb).test(e.anchor)&&(this.justify="max"),this.pos=this.tpos-this.cb+this.tb,this.maxHeight&&"x"==this.dim&&(e.maxWidth=Math.min(e.maxWidth||this.full,e.maxHeight*this.full/e.y.full)),this.size=Math.min(this.full,e["max"+this.ucwh]||this.full),this.minSize=e.allowSizeReduction?Math.min(e["min"+this.ucwh],this.full):this.full,e.isImage&&e.useBox&&(this.size=e[this.wh],this.imgSize=this.full),"x"==this.dim&&hs.padToMinWidth&&(this.minSize=e.minWidth),this.target=e["target"+this.dim.toUpperCase()],this.marginMin=hs["margin"+this.uclt],this.scroll=hs.page["scroll"+this.uclt],this.clientSize=hs.page[this.wh]},setSize:function(e){var t=this.exp;if(t.isImage&&(t.useBox||hs.padToMinWidth)?(this.imgSize=e,this.size=Math.max(this.size,this.imgSize),t.content.style[this.lt]=this.get("imgPad")+"px"):this.size=e,t.content.style[this.wh]=e+"px",t.wrapper.style[this.wh]=this.get("wsize")+"px",t.outline&&t.outline.setPosition(),t.releaseMask&&(t.releaseMask.style[this.wh]=e+"px"),"y"==this.dim&&t.iDoc&&"auto"!=t.body.style.height)try{t.iDoc.body.style.overflow="auto"}catch(s){}if(t.isHtml){var i=t.scrollerDiv;void 0===this.sizeDiff&&(this.sizeDiff=t.innerContent["offset"+this.ucwh]-i["offset"+this.ucwh]),i.style[this.wh]=this.size-this.sizeDiff+"px","x"==this.dim&&(t.mediumContent.style.width="auto"),t.body&&(t.body.style[this.wh]="auto")}"x"==this.dim&&t.overlayBox&&t.sizeOverlayBox(!0),"x"==this.dim&&t.slideshow&&t.isImage&&(e==this.full?t.slideshow.disable("full-expand"):t.slideshow.enable("full-expand"))},setPos:function(e){this.pos=e,this.exp.wrapper.style[this.lt]=e+"px",this.exp.outline&&this.exp.outline.setPosition()}},hs.Expander=function(e,t,s,i){if(document.readyState&&hs.ie&&!hs.isReady)return void hs.addEventListener(document,"ready",function(){new hs.Expander(e,t,s,i)});this.a=e,this.custom=s,this.contentType=i||"image",this.isHtml="html"==i,this.isImage=!this.isHtml,hs.continuePreloading=!1,this.overlays=[],this.last=hs.last,hs.last=null,hs.init();for(var h=this.key=hs.expanders.length,n=0;n<hs.overrides.length;n++){var o=hs.overrides[n];this[o]=t&&void 0!==t[o]?t[o]:hs[o]}this.src||(this.src=e.href);var a=t&&t.thumbnailId?hs.$(t.thumbnailId):e;if(a=this.thumb=a.getElementsByTagName("img")[0]||a,this.thumbsUserSetId=a.id||e.id,!hs.fireEvent(this,"onInit"))return!0;for(var n=0;n<hs.expanders.length;
238n++)if(hs.expanders[n]&&hs.expanders[n].a==e&&(!this.last||"crossfade"!=this.transitions[1]))return hs.expanders[n].focus(),!1;if(!hs.allowSimultaneousLoading)for(var n=0;n<hs.expanders.length;n++)hs.expanders[n]&&hs.expanders[n].thumb!=a&&!hs.expanders[n].onLoadStarted&&hs.expanders[n].cancelLoading();hs.expanders[h]=this,hs.allowMultipleInstances||hs.upcoming||(hs.expanders[h-1]&&hs.expanders[h-1].close(),void 0!==hs.focusKey&&hs.expanders[hs.focusKey]&&hs.expanders[hs.focusKey].close()),this.el=a,this.tpos=this.pageOrigin||hs.getPosition(a),hs.getPageSize();var r=this.x=new hs.Dimension(this,"x");r.calcThumb();var l=this.y=new hs.Dimension(this,"y");if(l.calcThumb(),/area/i.test(a.tagName)&&this.getImageMapAreaCorrection(a),this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:"highslide-wrapper "+this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter+=2},null,!0),this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler,"image"==this.contentType&&2==this.outlineWhileAnimating&&(this.outlineWhileAnimating=0),!this.outlineType||this.last&&this.isImage&&"crossfade"==this.transitions[1])this[this.contentType+"Create"]();else if(hs.pendingOutlines[this.outlineType])this.connectOutline(),this[this.contentType+"Create"]();else{this.showLoading();var d=this;new hs.Outline(this.outlineType,function(){d.connectOutline(),d[d.contentType+"Create"]()})}return!0},hs.Expander.prototype={error:function(e){hs.debug?alert("Line "+e.lineNumber+": "+e.message):window.location.href=this.src},connectOutline:function(){var e=this.outline=hs.pendingOutlines[this.outlineType];e.exp=this,e.table.style.zIndex=this.wrapper.style.zIndex-1,hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(!this.onLoadStarted&&!this.loading){this.loading=hs.loading;var e=this;if(this.loading.onclick=function(){e.cancelLoading()},hs.fireEvent(this,"onShowLoading")){var e=this,t=this.x.get("loadingPos")+"px",s=this.y.get("loadingPos")+"px";if(!i&&this.last&&"crossfade"==this.transitions[1])var i=this.last;i&&(t=i.x.get("loadingPosXfade")+"px",s=i.y.get("loadingPosXfade")+"px",this.loading.style.zIndex=hs.zIndexCounter++),setTimeout(function(){e.loading&&hs.setStyles(e.loading,{left:t,top:s,zIndex:hs.zIndexCounter++})},100)}}},imageCreate:function(){var e=this,t=document.createElement("img");this.content=t,t.onload=function(){hs.expanders[e.key]&&e.contentLoaded()},hs.blockRightClick&&(t.oncontextmenu=function(){return!1}),t.className="highslide-image",hs.setStyles(t,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3}),t.title=hs.lang.restoreTitle,hs.safari&&hs.uaVersion<525&&hs.container.appendChild(t),hs.ie&&hs.flushImgSize&&(t.src=null),t.src=this.src,this.showLoading()},htmlCreate:function(){if(hs.fireEvent(this,"onBeforeGetContent")){if(this.content=hs.getCacheBinding(this.a),this.content||(this.content=hs.getNode(this.contentId)),this.content||(this.content=hs.getSelfRendered()),this.getInline(["maincontent"]),this.maincontent){var e=hs.getElementByClass(this.content,"div","highslide-body");e&&e.appendChild(this.maincontent),this.maincontent.style.display="block"}hs.fireEvent(this,"onAfterGetContent");var t=this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType)&&this.setObjContainerSize(t),hs.container.appendChild(this.wrapper),hs.setStyles(this.wrapper,{position:"static",padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px"}),this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,height:0,overflow:"hidden"},this.wrapper),this.mediumContent=hs.createElement("div",null,null,this.content,1),this.mediumContent.appendChild(t),hs.setStyles(t,{position:"relative",display:"block",direction:hs.lang.cssDirection||""}),this.width&&(t.style.width=this.width+"px"),this.height&&hs.setStyles(t,{height:this.height+"px",overflow:"hidden"}),t.offsetWidth<this.minWidth&&(t.style.width=this.minWidth+"px"),"ajax"!=this.objectType||hs.getCacheBinding(this.a))"iframe"==this.objectType&&"before"==this.objectLoadTime?this.writeE
238xtendedContent():this.contentLoaded();else{this.showLoading();var s=this,i=new hs.Ajax(this.a,t);i.src=this.src,i.onLoad=function(){hs.expanders[s.key]&&s.contentLoaded()},i.onError=function(){location.href=s.src},i.run()}}},contentLoaded:function(){try{if(!this.content)return;if(this.content.onload=null,this.onLoadStarted)return;this.onLoadStarted=!0;var e=this.x,t=this.y;this.loading&&(hs.setStyles(this.loading,{top:"-9999px"}),this.loading=null,hs.fireEvent(this,"onHideLoading")),this.isImage?(e.full=this.content.width,t.full=this.content.height,hs.setStyles(this.content,{width:e.t+"px",height:t.t+"px"}),this.wrapper.appendChild(this.content),hs.container.appendChild(this.wrapper)):this.htmlGetSize&&this.htmlGetSize(),e.calcBorders(),t.calcBorders(),hs.setStyles(this.wrapper,{left:e.tpos+e.tb-e.cb+"px",top:t.tpos+e.tb-t.cb+"px"}),this.initSlideshow(),this.getOverlays();var s=e.full/t.full;if(e.calcExpanded(),this.justify(e),t.calcExpanded(),this.justify(t),this.isHtml&&this.htmlSizeOperations(),this.overlayBox&&this.sizeOverlayBox(0,1),this.allowSizeReduction){this.isImage?this.correctRatio(s):this.fitOverlayBox();var i=this.slideshow;if(i&&this.last&&i.controls&&i.fixedControls){var h,n=i.overlayOptions.position||"";for(var o in hs.oPos)for(var a=0;5>a;a++)h=this[o],n.match(hs.oPos[o][a])&&(h.pos=this.last[o].pos+(this.last[o].p1-h.p1)+(this.last[o].size-h.size)*[0,0,.5,1,1][a],"fit"==i.fixedControls&&(h.pos+h.size+h.p1+h.p2>h.scroll+h.clientSize-h.marginMax&&(h.pos=h.scroll+h.clientSize-h.size-h.marginMin-h.marginMax-h.p1-h.p2),h.pos<h.scroll+h.marginMin&&(h.pos=h.scroll+h.marginMin)))}this.isImage&&this.x.full>(this.x.imgSize||this.x.size)&&(this.createFullExpand(),1==this.overlays.length&&this.sizeOverlayBox())}this.show()}catch(r){this.error(r)}},setObjContainerSize:function(e){var t=hs.getElementByClass(e,"DIV","highslide-body");/(iframe|swf)/.test(this.objectType)&&(this.objectWidth&&(t.style.width=this.objectWidth+"px"),this.objectHeight&&(t.style.height=this.objectHeight+"px"))},writeExtendedContent:function(){if(!this.hasExtendedContent){if(this.body=hs.getElementByClass(this.innerContent,"DIV","highslide-body"),"iframe"==this.objectType){this.showLoading();var e=hs.clearing.cloneNode(1);this.body.appendChild(e),this.newWidth=this.innerContent.offsetWidth,this.objectWidth||(this.objectWidth=e.offsetWidth);var t=this.innerContent.offsetHeight-this.body.offsetHeight,s=this.objectHeight||hs.page.height-t-hs.marginTop-hs.marginBottom,i="before"==this.objectLoadTime?' onload="if (hs.expanders['+this.key+"]) hs.expanders["+this.key+'].contentLoaded()" ':"";this.body.innerHTML+='<iframe name="hs'+(new Date).getTime()+'" frameborder="0" key="'+this.key+'"  style="width:'+this.objectWidth+"px; height:"+s+'px" '+i+' src="'+this.src+'" ></iframe>',this.ruler=this.body.getElementsByTagName("div")[0],this.iframe=this.body.getElementsByTagName("iframe")[0],"after"==this.objectLoadTime&&this.correctIframeSize()}if("swf"==this.objectType){this.body.id=this.body.id||"hs-flash-id-"+this.key;var h=this.swfOptions;h.params||(h.params={}),void 0===h.params.wmode&&(h.params.wmode="transparent"),swfobject&&swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,h.version||"7",h.expressInstallSwfurl,h.flashvars,h.params,h.attributes)}this.hasExtendedContent=!0}},htmlGetSize:function(){this.iframe&&!this.objectHeight&&(this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+"px"),this.innerContent.appendChild(hs.clearing),this.x.full||(this.x.full=this.innerContent.offsetWidth),this.y.full=this.innerContent.offsetHeight,this.innerContent.removeChild(hs.clearing),hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)&&(this.newHeight=parseInt(this.innerContent.currentStyle.height)),hs.setStyles(this.wrapper,{position:"absolute",padding:"0"}),hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"})},getIframePageHeight:function(){var e;try{var t=this.iDoc=this.iframe.contentDocument||this.iframe.contentWindow.document,s=t.createElement("div");s.style.clear="both",t.body.appendChild(s),e=s.offsetTop,hs.ie&&(e+=parseInt(t.body.currentStyle.marginTop)+parseInt(t.body.currentStyle.marginBottom)-1)}catch(i){e=300}return e},correctIframeSize:function(){var e=this.innerContent.offsetWidth-this.ruler.offsetWidth;hs.discardElement(this.ruler),0>e&&(e=0);var t=this.innerContent.offsetHeight-this.iframe.offsetHeight;if(this.iDoc&&!this.objectHeight&&!this.height&&this.y.size==this.y.full)try{this.iDoc.body.style.overflow="hidden"}catch(s){}hs.setStyles(this.iframe,{width:Math.abs(this.x.size-e)+"px",height:Math.abs(this.y.size-t)+"px"}),hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height}),this.scrollingContent=this.iframe,this.scrollerDiv=this.scrollingContent},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent),"swf"==this.objectType&&"before"==this.objectLoadTime&&this.writeE
238xtendedContent(),this.x.size<this.x.full&&!this.allowWidthReduction&&(this.x.size=this.x.full),this.y.size<this.y.full&&!this.allowHeightReduction&&(this.y.size=this.y.full),this.scrollerDiv=this.innerContent,hs.setStyles(this.mediumContent,{position:"relative",width:this.x.size+"px"}),hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var e=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(e&&!/(iframe|swf)/.test(this.objectType)){var t=e;e=hs.createElement(t.nodeName,null,{overflow:"hidden"},null,!0),t.parentNode.insertBefore(e,t),e.appendChild(hs.clearing),e.appendChild(t);var s=this.innerContent.offsetWidth-e.offsetWidth,i=this.innerContent.offsetHeight-e.offsetHeight;e.removeChild(hs.clearing);var h=hs.safari||"KDE"==navigator.vendor?1:0;hs.setStyles(e,{width:this.x.size-s-h+"px",height:this.y.size-i+"px",overflow:"auto",position:"relative"}),h&&t.offsetHeight>e.offsetHeight&&(e.style.width=parseInt(e.style.width)+h+"px"),this.scrollingContent=e,this.scrollerDiv=this.scrollingContent}this.iframe&&"before"==this.objectLoadTime&&this.correctIframeSize(),!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight&&(this.scrollerDiv=this.content),this.scrollerDiv!=this.content||this.allowWidthReduction||/(iframe|swf)/.test(this.objectType)||(this.x.size+=17),this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight&&setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)},getImageMapAreaCorrection:function(e){for(var t=e.coords.split(","),s=0;s<t.length;s++)t[s]=parseInt(t[s]);if("circle"==e.shape.toLowerCase())this.x.tpos+=t[0]-t[2],this.y.tpos+=t[1]-t[2],this.x.t=this.y.t=2*t[2];else{for(var i,h,n=i=t[0],o=h=t[1],s=0;s<t.length;s++)s%2==0?(n=Math.min(n,t[s]),i=Math.max(i,t[s])):(o=Math.min(o,t[s]),h=Math.max(h,t[s]));this.x.tpos+=n,this.x.t=i-n,this.y.tpos+=o,this.y.t=h-o}},justify:function(e,t){var s,i=e.target,h=e==this.x?"x":"y";if(i&&i.match(/ /)&&(s=i.split(" "),i=s[0]),i&&hs.$(i))e.pos=hs.getPosition(hs.$(i))[h],s&&s[1]&&s[1].match(/^[-]?[0-9]+px$/)&&(e.pos+=parseInt(s[1])),e.size<e.minSize&&(e.size=e.minSize);else if("auto"==e.justify||"center"==e.justify){var n=!1,o=e.exp.allowSizeReduction;e.pos=Math.round("center"==e.justify?e.scroll+(e.clientSize+e.marginMin-e.marginMax-e.get("wsize"))/2:e.pos-(e.get("wsize")-e.t)/2),e.pos<e.scroll+e.marginMin&&(e.pos=e.scroll+e.marginMin,n=!0),!t&&e.size<e.minSize&&(e.size=e.minSize,o=!1),e.pos+e.get("wsize")>e.scroll+e.clientSize-e.marginMax&&(!t&&n&&o?e.size=Math.min(e.size,e.get("y"==h?"fitsize":"maxsize")):e.get("wsize")<e.get("fitsize")?e.pos=e.scroll+e.clientSize-e.marginMax-e.get("wsize"):(e.pos=e.scroll+e.marginMin,!t&&o&&(e.size=e.get("y"==h?"fitsize":"maxsize")))),!t&&e.size<e.minSize&&(e.size=e.minSize,o=!1)}else"max"==e.justify&&(e.pos=Math.floor(e.pos-e.size+e.t));if(e.pos<e.marginMin){var a=e.pos;e.pos=e.marginMin,o&&!t&&(e.size=e.size-(e.pos-a))}},correctRatio:function(e){var t=this.x,s=this.y,i=!1,h=Math.min(t.full,t.size),n=Math.min(s.full,s.size),o=this.useBox||hs.padToMinWidth;h/n>e?(h=n*e,h<t.minSize&&(h=t.minSize,n=h/e),i=!0):e>h/n&&(n=h/e,i=!0),hs.padToMinWidth&&t.full<t.minSize?(t.imgSize=t.full,s.size=s.imgSize=s.full):this.useBox?(t.imgSize=h,s.imgSize=n):(t.size=h,s.size=n),i=this.fitOverlayBox(this.useBox?null:e,i),o&&s.size<s.imgSize&&(s.imgSize=s.size,t.imgSize=s.size*e),(i||o)&&(t.pos=t.tpos-t.cb+t.tb,t.minSize=t.size,this.justify(t,!0),s.pos=s.tpos-s.cb+s.tb,s.minSize=s.size,this.justify(s,!0),this.overlayBox&&this.sizeOverlayBox())},fitOverlayBox:function(e,t){var s=this.x,i=this.y;if(this.overlayBox&&(this.isImage||this.allowHeightReduction))for(;i.size>this.minHeight&&s.size>this.minWidth&&i.get("wsize")>i.get("fitsize");)i.size-=10,e&&(s.size=i.size*e),this.sizeOverlayBox(0,1),t=!0;return t},reflow:function(){if(this.scrollerDiv){var e=/iframe/i.test(this.scrollerDiv.tagName)?this.getIframePageHeight()+1+"px":"auto";this.body&&(this.body.style.height=e),this.scrollerDiv.style.height=e,this.y.setSize(this.innerContent.offsetHeight)}},show:function(){var e=this.x,t=this.y;this.doShowHide("hidden"),hs.fireEvent(this,"onBeforeExpand"),this.slideshow&&this.slideshow.thumbstrip&&this.slideshow.thumbstrip.selectThumb(),this.changeSize(1,{wrapper:{width:e.get("wsize"),height:t.get("wsize"),left:e.pos,top:t.pos},content:{left:e.p1+e.get("imgPad"),top:t.p1+t.get("imgPad"),width:e.imgSize||e.size,height:t.imgSize||t.size}},hs.expandDuration)},changeSize:function(e,t,s){var i=this.transitions,h=e?this.last?this.last.a:null:hs.upcoming,n=i[1]&&h&&hs.getParam(h,"transitions")[1]==i[1]?i[1]:i[0];if(this[n]&&"expand"!=n)return void this[n](e,t);this.outline&&!this.outlineWhileAnimating&&(e?this.outline.setPosition():this.outline.destroy(this.isHtml&&this.preserveContent)),e||this.destroyOverlays();var o=this,a=o.x,r=o.y,l=this.easing;e||(l=this.easingClose||l);
238var d=e?function(){o.outline&&(o.outline.table.style.visibility="visible"),setTimeout(function(){o.afterExpand()},50)}:function(){o.afterClose()};e&&hs.setStyles(this.wrapper,{width:a.t+"px",height:r.t+"px"}),e&&this.isHtml&&hs.setStyles(this.wrapper,{left:a.tpos-a.cb+a.tb+"px",top:r.tpos-r.cb+r.tb+"px"}),this.fadeInOut&&(hs.setStyles(this.wrapper,{opacity:e?0:1}),hs.extend(t.wrapper,{opacity:e})),hs.animate(this.wrapper,t.wrapper,{duration:s,easing:l,step:function(t,s){if(o.outline&&o.outlineWhileAnimating&&"top"==s.prop){var i=e?s.pos:1-s.pos,h={w:a.t+(a.get("wsize")-a.t)*i,h:r.t+(r.get("wsize")-r.t)*i,x:a.tpos+(a.pos-a.tpos)*i,y:r.tpos+(r.pos-r.tpos)*i};o.outline.setPosition(h,0,1)}o.isHtml&&("left"==s.prop&&(o.mediumContent.style.left=a.pos-t+"px"),"top"==s.prop&&(o.mediumContent.style.top=r.pos-t+"px"))}}),hs.animate(this.content,t.content,s,l,d),e&&(this.wrapper.style.visibility="visible",this.content.style.visibility="visible",this.isHtml&&(this.innerContent.style.visibility="visible"),this.a.className+=" highslide-active-anchor")},fade:function(e,t){this.outlineWhileAnimating=!1;var s=this,i=e?hs.expandDuration:0;if(e&&(hs.animate(this.wrapper,t.wrapper,0),hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"}),hs.animate(this.content,t.content,0),this.content.style.visibility="visible",hs.animate(this.wrapper,{opacity:1},i,null,function(){s.afterExpand()})),this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;for(var h=e||-1,n=this.outline.offset,o=e?3:n,a=e?n:3,r=o;h*a>=h*r;r+=h,i+=25)!function(){var t=e?a-r:o-r;setTimeout(function(){s.outline.setPosition(0,t,1)},i)}()}e||setTimeout(function(){s.outline&&s.outline.destroy(s.preserveContent),s.destroyOverlays(),hs.animate(s.wrapper,{opacity:0},hs.restoreDuration,null,function(){s.afterClose()})},i)},crossfade:function(e){if(e){var t=this,s=this.last,i=this.x,h=this.y,n=s.x,o=s.y,a=this.wrapper,r=this.content,l=this.overlayBox;hs.removeEventListener(document,"mousemove",hs.dragHandler),hs.setStyles(r,{width:(i.imgSize||i.size)+"px",height:(h.imgSize||h.size)+"px"}),l&&(l.style.overflow="visible"),this.outline=s.outline,this.outline&&(this.outline.exp=t),s.outline=null;var d=hs.createElement("div",{className:"highslide-"+this.contentType},{position:"absolute",zIndex:4,overflow:"hidden",display:"none"}),p={oldImg:s,newImg:this};for(var c in p)this[c]=p[c].content.cloneNode(1),hs.setStyles(this[c],{position:"absolute",border:0,visibility:"visible"}),d.appendChild(this[c]);a.appendChild(d),this.isHtml&&hs.setStyles(this.mediumContent,{left:0,top:0}),l&&(l.className="",a.appendChild(l)),d.style.display="",s.content.style.display="none",hs.safari&&hs.uaVersion<525&&(this.wrapper.style.visibility="visible"),hs.animate(a,{width:i.size},{duration:hs.transitionDuration,step:function(e,p){var c,u=p.pos,g=1-u,f={},m=["pos","size","p1","p2"];for(var y in m)c=m[y],f["x"+c]=Math.round(g*n[c]+u*i[c]),f["y"+c]=Math.round(g*o[c]+u*h[c]),f.ximgSize=Math.round(g*(n.imgSize||n.size)+u*(i.imgSize||i.size)),f.ximgPad=Math.round(g*n.get("imgPad")+u*i.get("imgPad")),f.yimgSize=Math.round(g*(o.imgSize||o.size)+u*(h.imgSize||h.size)),f.yimgPad=Math.round(g*o.get("imgPad")+u*h.get("imgPad"));t.outline&&t.outline.setPosition({x:f.xpos,y:f.ypos,w:f.xsize+f.xp1+f.xp2+2*i.cb,h:f.ysize+f.yp1+f.yp2+2*h.cb}),s.wrapper.style.clip="rect("+(f.ypos-o.pos)+"px, "+(f.xsize+f.xp1+f.xp2+f.xpos+2*n.cb-n.pos)+"px, "+(f.ysize+f.yp1+f.yp2+f.ypos+2*o.cb-o.pos)+"px, "+(f.xpos-n.pos)+"px)",hs.setStyles(r,{top:f.yp1+h.get("imgPad")+"px",left:f.xp1+i.get("imgPad")+"px",marginTop:h.pos-f.ypos+"px",marginLeft:i.pos-f.xpos+"px"}),hs.setStyles(a,{top:f.ypos+"px",left:f.xpos+"px",width:f.xp1+f.xp2+f.xsize+2*i.cb+"px",height:f.yp1+f.yp2+f.ysize+2*h.cb+"px"}),hs.setStyles(d,{width:(f.ximgSize||f.xsize)+"px",height:(f.yimgSize||f.ysize)+"px",left:f.xp1+f.ximgPad+"px",top:f.yp1+f.yimgPad+"px",visibility:"visible"}),hs.setStyles(t.oldImg,{top:o.pos-f.ypos+o.p1-f.yp1+o.get("imgPad")-f.yimgPad+"px",left:n.pos-f.xpos+n.p1-f.xp1+n.get("imgPad")-f.ximgPad+"px"}),hs.setStyles(t.newImg,{opacity:u,top:h.pos-f.ypos+h.p1-f.yp1+h.get("imgPad")-f.yimgPad+"px",left:i.pos-f.xpos+i.p1-f.xp1+i.get("imgPad")-f.ximgPad+"px"}),l&&hs.setStyles(l,{width:f.xsize+"px",height:f.ysize+"px",left:f.xp1+i.cb+"px",to
238p:f.yp1+h.cb+"px"})},complete:function(){a.style.visibility=r.style.visibility="visible",r.style.display="block",hs.discardElement(d),t.afterExpand(),s.afterClose(),t.last=null}})}},reuseOverlay:function(e){if(!this.last)return!1;for(var t=0;t<this.last.overlays.length;t++){var s=hs.$("hsId"+this.last.overlays[t]);if(s&&s.hsId==e.hsId)return this.genOverlayBox(),s.reuse=this.key,hs.push(this.overlays,this.last.overlays[t]),!0}return!1},afterExpand:function(){if(this.isExpanded=!0,this.focus(),this.isHtml&&"after"==this.objectLoadTime&&this.writeExtendedContent(),this.iframe){try{var e=this,t=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(t,"mousedown",function(){hs.focusKey!=e.key&&e.focus()})}catch(s){}hs.ie&&"boolean"!=typeof this.isClosing&&(this.iframe.style.width=this.objectWidth-1+"px")}this.dimmingOpacity&&hs.dim(this),hs.upcoming&&hs.upcoming==this.a&&(hs.upcoming=null),this.prepareNextOutline();var i=hs.page,h=hs.mouse.x+i.scrollLeft,n=hs.mouse.y+i.scrollTop;this.mouseIsOver=this.x.pos<h&&h<this.x.pos+this.x.get("wsize")&&this.y.pos<n&&n<this.y.pos+this.y.get("wsize"),this.overlayBox&&this.showOverlays(),hs.fireEvent(this,"onAfterExpand")},prepareNextOutline:function(){var e=this.key,t=this.outlineType;new hs.Outline(t,function(){try{hs.expanders[e].preloadNext()}catch(t){}})},preloadNext:function(){var e=this.getAdjacentAnchor(1);e&&(""+e.onclick).match(/hs\.expand/)&&hs.createElement("img",{src:hs.getSrc(e)})},getAdjacentAnchor:function(e){var t=this.getAnchorIndex(),s=hs.anchors.groups[this.slideshowGroup||"none"];if(s&&!s[t+e]&&this.slideshow&&this.slideshow.repeat){if(1==e)return s[0];if(-1==e)return s[s.length-1]}return s&&s[t+e]||null},getAnchorIndex:function(){var e=hs.getAnchors().groups[this.slideshowGroup||"none"];if(e)for(var t=0;t<e.length;t++)if(e[t]==this.a)return t;return null},getNumber:function(){if(this[this.numberPosition]){var e=hs.anchors.groups[this.slideshowGroup||"none"];if(e){var t=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",e.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+t+"</div>"+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(this.last)this.slideshow=this.last.slideshow;else for(var e=0;e<hs.slideshows.length;e++){var t=hs.slideshows[e],s=t.slideshowGroup;(void 0===s||null===s||s===this.slideshowGroup)&&(this.slideshow=new hs.Slideshow(this.key,t))}var t=this.slideshow;if(t){var i=t.expKey=this.key;t.checkFirstAndLast(),t.disable("full-expand"),t.controls&&this.createOverlay(hs.extend(t.overlayOptions||{},{overlayId:t.controls,hsId:"controls",zIndex:5})),t.thumbstrip&&t.thumbstrip.add(this),!this.last&&this.autoplay&&t.play(!0),t.autoplay&&(t.autoplay=setTimeout(function(){hs.next(i)},t.interval||500))}},cancelLoading:function(){hs.discardElement(this.wrapper),hs.expanders[this.key]=null,hs.upcoming==this.a&&(hs.upcoming=null),hs.undim(this.key),this.loading&&(hs.loading.style.left="-9999px"),hs.fireEvent(this,"onHideLoading")},writeCredits:function(){this.credits||(this.credits=hs.createElement("a",{href:hs.creditsHref,target:hs.creditsTarget,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle}),this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left",hsId:"credits"}))},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if("caption"==type&&!hs.fireEvent(this,"onBeforeGetCaption"))return;if("heading"==type&&!hs.fireEvent(this,"onBeforeGetHeading"))return;if(!this[type+"Id"]&&this.thumbsUserSetId&&(this[type+"Id"]=type+"-for-"+this.thumbsUserSetId),this[type+"Id"]&&(this[type]=hs.getNode(this[type+"Id"])),!this[type]&&!this[type+"Text"]&&this[type+"Eval"])try{s=eval(this[type+"Eval"])}catch(e){}if(!this[type]&&this[type+"Text"]&&(s=this[type+"Text"]),!this[type]&&!s&&(this[type]=hs.getNode(this.a["_"+type+"Id"]),!this[type]))for(var next=this.a.nextSibling;next&&!hs.isHsAnchor(next);){if(RegExp("highslide-"+type).test(next.className||null)){next.id||(this.a["_"+type+"Id"]=next.id="hsId"+hs.idCounter++),this[type]=hs.getNode(next.id);break}next=next.nextSibling}if(this[type]||s||this.numberPosition!=type||(s="\n"),!this[type]&&s&&(this[type]=hs.createElement("div",{className:"highsli
238de-"+type,innerHTML:s})),addOverlay&&this[type]){var o={position:"heading"==type?"above":"below"};for(var x in this[type+"Overlay"])o[x]=this[type+"Overlay"][x];o.overlayId=this[type],this.createOverlay(o)}}},doShowHide:function(e){hs.hideSelects&&this.showHideElements("SELECT",e),hs.hideIframes&&this.showHideElements("IFRAME",e),hs.geckoMac&&this.showHideElements("*",e)},showHideElements:function(e,t){for(var s=document.getElementsByTagName(e),i="*"==e?"overflow":"visibility",h=0;h<s.length;h++)if("visibility"==i||"auto"==document.defaultView.getComputedStyle(s[h],"").getPropertyValue("overflow")||null!=s[h].getAttribute("hidden-by")){var n=s[h].getAttribute("hidden-by");if("visible"==t&&n)n=n.replace("["+this.key+"]",""),s[h].setAttribute("hidden-by",n),n||(s[h].style[i]=s[h].origProp);else if("hidden"==t){var o=hs.getPosition(s[h]);if(o.w=s[h].offsetWidth,o.h=s[h].offsetHeight,!this.dimmingOpacity)var a=o.x+o.w<this.x.get("opos")||o.x>this.x.get("opos")+this.x.get("osize"),r=o.y+o.h<this.y.get("opos")||o.y>this.y.get("opos")+this.y.get("osize");var l=hs.getWrapperKey(s[h]);a||r||l==this.key?n!="["+this.key+"]"&&hs.focusKey!=l||l==this.key?n&&n.indexOf("["+this.key+"]")>-1&&s[h].setAttribute("hidden-by",n.replace("["+this.key+"]","")):(s[h].setAttribute("hidden-by",""),s[h].style[i]=s[h].origProp||""):n?-1==n.indexOf("["+this.key+"]")&&s[h].setAttribute("hidden-by",n+"["+this.key+"]"):(s[h].setAttribute("hidden-by","["+this.key+"]"),s[h].origProp=s[h].style[i],s[h].style[i]="hidden")}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var e=0;e<hs.expanders.length;e++)if(hs.expanders[e]&&e==hs.focusKey){var t=hs.expanders[e];t.content.className+=" highslide-"+t.contentType+"-blur",t.isImage&&(t.content.style.cursor=hs.ieLt7?"hand":"pointer",t.content.title=hs.lang.focusTitle),hs.fireEvent(t,"onBlur")}this.outline&&(this.outline.table.style.zIndex=this.wrapper.style.zIndex-1),this.content.className="highslide-"+this.contentType,this.isImage&&(this.content.title=hs.lang.restoreTitle,hs.restoreCursor&&(hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer",hs.ieLt7&&hs.uaVersion<6&&(hs.styleRestoreCursor="hand"),this.content.style.cursor=hs.styleRestoreCursor)),hs.focusKey=this.key,hs.addEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler),hs.fireEvent(this,"onFocus")},moveTo:function(e,t){this.x.setPos(e),this.y.setPos(t)},resize:function(e){var t,s,i=e.width/e.height;t=Math.max(e.width+e.dX,Math.min(this.minWidth,this.x.full)),this.isImage&&Math.abs(t-this.x.full)<12&&(t=this.x.full),s=this.isHtml?e.height+e.dY:t/i,s<Math.min(this.minHeight,this.y.full)&&(s=Math.min(this.minHeight,this.y.full),this.isImage&&(t=s*i)),this.resizeTo(t,s)},resizeTo:function(e,t){this.y.setSize(t),this.x.setSize(e),this.wrapper.style.height=this.y.get("wsize")+"px"},close:function(){if(!this.isClosing&&this.isExpanded&&("crossfade"==this.transitions[1]&&hs.upcoming&&(hs.getExpander(hs.upcoming).cancelLoading(),hs.upcoming=null),hs.fireEvent(this,"onBeforeClose"))){this.isClosing=!0,this.slideshow&&!hs.upcoming&&this.slideshow.pause(),hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{this.isHtml&&this.htmlPrepareClose(),this.content.style.cursor="default",this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(e){this.afterClose()}}},htmlPrepareClose:function(){if(hs.geckoMac&&(hs.mask||(hs.mask=hs.createElement("div",null,{position:"absolute"},hs.container)),hs.setStyles(hs.mask,{width:this.x.size+"px",height:this.y.size+"px",left:this.x.pos+"px",top:this.y.pos+"px",display:"block"})),"swf"==this.objectType)try{hs.$(this.body.id).StopPlay()}catch(e){}"after"!=this.objectLoadTime||this.preserveContent||this.destroyObject(),this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent&&(this.scrollerDiv.style.overflow="hidden")},destroyObject:function(){if(hs.ie&&this.iframe)try{this.iframe.contentWindow.document.body.innerHTML=""}catch(e){}"swf"==this.objectType&&swfobject.removeSWF(this.body.id),this.body.innerHTML=""},sleep:function(){this.outline&&(this.outline.table.style.display="none"),this.releaseMask=null,this.wrapper.style.display="none",this.isExpanded=!1,hs.push(hs.sleeping,this)}
238,awake:function(){try{if(hs.expanders[this.key]=this,!hs.allowMultipleInstances&&hs.focusKey!=this.key)try{hs.expanders[hs.focusKey].close()}catch(e){}var t=hs.zIndexCounter++,s={display:"",zIndex:t};hs.setStyles(this.wrapper,s),this.isClosing=!1;var i=this.outline||0;i&&(this.outlineWhileAnimating||(s.visibility="hidden"),hs.setStyles(i.table,s)),this.slideshow&&this.initSlideshow(),this.show()}catch(e){}},createOverlay:function(e){var t=e.overlayId,s="viewport"==e.relativeTo&&!/panel$/.test(e.position);if("string"==typeof t&&(t=hs.getNode(t)),e.html&&(t=hs.createElement("div",{innerHTML:e.html})),t&&"string"!=typeof t&&hs.fireEvent(this,"onCreateOverlay",{overlay:t})&&(t.style.display="block",e.hsId=e.hsId||e.overlayId,"crossfade"!=this.transitions[1]||!this.reuseOverlay(e,t))){this.genOverlayBox();var i=e.width&&/^[0-9]+(px|%)$/.test(e.width)?e.width:"auto";/^(left|right)panel$/.test(e.position)&&!/^[0-9]+px$/.test(e.width)&&(i="200px");var h=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:e.hsId},{position:"absolute",visibility:"hidden",width:i,direction:hs.lang.cssDirection||"",opacity:0},s?hs.viewport:this.overlayBox,!0);s&&(h.hsKey=this.key),h.appendChild(t),hs.extend(h,{opacity:1,offsetX:0,offsetY:0,dur:0===e.fade||e.fade===!1||2==e.fade&&hs.ie?0:250}),hs.extend(h,e),this.gotOverlays&&(this.positionOverlay(h),(!h.hideOnMouseOut||this.mouseIsOver)&&hs.animate(h,{opacity:h.opacity},h.dur)),hs.push(this.overlays,hs.idCounter-1)}},positionOverlay:function(e){var t=e.position||"middle center",s="viewport"==e.relativeTo,i=e.offsetX,h=e.offsetY;s?(hs.viewport.style.display="block",e.hsKey=this.key,e.offsetWidth>e.parentNode.offsetWidth&&(e.style.width="100%")):e.parentNode!=this.overlayBox&&this.overlayBox.appendChild(e),/left$/.test(t)&&(e.style.left=i+"px"),/center$/.test(t)&&hs.setStyles(e,{left:"50%",marginLeft:i-Math.round(e.offsetWidth/2)+"px"}),/right$/.test(t)&&(e.style.right=-i+"px"),/^leftpanel$/.test(t)?(hs.setStyles(e,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"}),this.x.p1=e.offsetWidth):/^rightpanel$/.test(t)&&(hs.setStyles(e,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"}),this.x.p2=e.offsetWidth);var n=e.parentNode.offsetHeight;e.style.height="auto",s&&e.offsetHeight>n&&(e.style.height=hs.ieLt7?n+"px":"100%"),/^top/.test(t)&&(e.style.top=h+"px"),/^middle/.test(t)&&hs.setStyles(e,{top:"50%",marginTop:h-Math.round(e.offsetHeight/2)+"px"}),/^bottom/.test(t)&&(e.style.bottom=-h+"px"),/^above$/.test(t)?(hs.setStyles(e,{left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"}),this.y.p1=e.offsetHeight):/^below$/.test(t)&&(hs.setStyles(e,{position:"relative",left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"}),this.y.p2=e.offsetHeight,e.style.position="absolute")},getOverlays:function(){this.getInline(["heading","caption"],!0),this.getNumber(),this.caption&&hs.fireEvent(this,"onAfterGetCaption"),this.heading&&hs.fireEvent(this,"onAfterGetHeading"),this.heading&&this.dragByHeading&&(this.heading.className+=" highslide-move"),hs.showCredits&&this.writeCredits();for(var e=0;e<hs.overlays.length;e++){var t=hs.overlays[e],s=t.thumbnailId,i=t.slideshowGroup;(!s&&!i||s&&s==this.thumbsUserSetId||i&&i===this.slideshowGroup)&&(this.isImage||this.isHtml&&t.useOnHtml)&&this.createOverlay(t)}for(var h=[],e=0;e<this.overlays.length;e++){var t=hs.$("hsId"+this.overlays[e]);/panel$/.test(t.position)?this.positionOverlay(t):hs.push(h,t)}for(var e=0;e<h.length;e++)this.positionOverlay(h[e]);this.gotOverlays=!0},genOverlayBox:function(){this.overlayBox||(this.overlayBox=hs.createElement("div",{className:this.wrapperClassName},{position:"absolute",width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+"px",height:(this.y.size||this.y.full)+"px",visibility:"hidden",overflow:"hidden",zIndex:hs.ie?4:"auto"},hs.container,!0))},sizeOverlayBox:function(e,t){var s=this.overlayBox,i=this.x,h=this.y;if(hs.setStyles(s,{width:i.size+"px",height:h.size+"px"}),e||t)for(var n=0;n<this.overlays.length;n++){var o=hs.$("hsId"+this.overlays[n]),a=hs.ieLt7||"BackCompat"==document.compatMode;o&&/^(above|below)$/.test(o.position)&&(a&&(o.style.width=s.offsetWidth+2*i.cb+i.p1+i.p2+"px"),h["above"==o.position?"p1":"p2"]=o.offsetHeight),o&&a&&/^(left|right)panel$/.test(o.position)&&(o.style.height=s.offsetHeight+2*h.cb+"px")}e&&(hs.setStyles(this.content,{top:h.p1+"px"}),hs.setStyles(s,{top:h.p1+h.cb+"px"}))},showOverlays:function(){var e=this.overlayBox;e.className="",hs.setStyles(e,{top:this.y.p1+this.y.cb+"px",left:this.x.p1+this.x.cb+"px",overflow:"visible"}),hs.safari&&(e.style.visibility="visible"),this.wrapper.appendChild(e);for(var t=0;t<this.overlays.length;t++){var s=hs.$("hsId"+this.overlays[t]);s.style.zIndex=s.zIndex||4,(!s.hideOnMouseOut||this.mouseIsOver)&&(s.style.visibility="visible",hs.setStyles(s,{visibility:"visible",display:""}),hs.animate(s,{opacity:s.opacity},s.dur))}},destroyOverlays:function(){if(this.overlays.length){if(this.slideshow){var e=this.slideshow.controls;e&&hs.getExpander(e)==this&&e.parentNode.removeChild(e)}for(var t=0;t<this.overlays.length;t++){var s=hs.$("hsId"+this.overlays[t]);s&&s.parentNode==hs.viewport&&hs.getExpander(s)==this&&hs.discardElement(s)}this.isHtml&&this.preserveContent?(this.overlayBox.style.top="-9999px",hs.container.appendChild(this.overlayBox)):hs.discardElement(this.overlayBox)}},createFullExpand:function(){return this.slideshow&&this.slideshow.controls?void this.slideshow.enable("full-expand"):(this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();
238",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"}),void(hs.fireEvent(this,"onCreateFullExpand")&&this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:!0,opacity:hs.fullExpandOpacity})))},doFullExpand:function(){try{if(!hs.fireEvent(this,"onDoFullExpand"))return;this.fullExpandLabel&&hs.discardElement(this.fullExpandLabel),this.focus();var e=this.x.size,t=this.y.size;this.resizeTo(this.x.full,this.y.full);var s=this.x.pos-(this.x.size-e)/2;s<hs.marginLeft&&(s=hs.marginLeft);var i=this.y.pos-(this.y.size-t)/2;i<hs.marginTop&&(i=hs.marginTop),this.moveTo(s,i),this.doShowHide("hidden")}catch(h){this.error(h)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor",""),this.doShowHide("visible"),this.isHtml&&this.preserveContent&&"crossfade"!=this.transitions[1]?this.sleep():(this.outline&&this.outlineWhileAnimating&&this.outline.destroy(),hs.discardElement(this.wrapper)),hs.mask&&(hs.mask.style.display="none"),this.destroyOverlays(),hs.viewport.childNodes.length||(hs.viewport.style.display="none"),this.dimmingOpacity&&hs.undim(this.key),hs.fireEvent(this,"onAfterClose"),hs.expanders[this.key]=null,hs.reOrder()}},hs.Ajax=function(e,t,s){this.a=e,this.content=t,this.pre=s},hs.Ajax.prototype={run:function(){var e;if(this.src||(this.src=hs.getSrc(this.a)),this.src.match("#")){var t=this.src.split("#");this.src=t[0],this.id=t[1]}if(hs.cachedGets[this.src])return this.cachedGet=hs.cachedGets[this.src],void(this.id?this.getElementContent():this.loadHTML());try{e=new XMLHttpRequest}catch(s){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(s){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(s){this.onError()}}}var i=this;e.onreadystatechange=function(){4==i.xhr.readyState&&(i.id?i.getElementContent():i.loadHTML())};var h=this.src;this.xhr=e,hs.forceAjaxReload&&(h=h.replace(/$/,(/\?/.test(h)?"&":"?")+"dummy="+(new Date).getTime())),e.open("GET",h,!0),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send(null)},getElementContent:function(){hs.init();var e=window.opera||hs.ie6SSL?{src:"about:blank"}:null;this.iframe=hs.createElement("iframe",e,{position:"absolute",top:"-9999px"},hs.container),this.loadHTML()},loadHTML:function(){var e,t=this.cachedGet||this.xhr.responseText;if(this.pre&&(hs.cachedGets[this.src]=t),!hs.ie||hs.uaVersion>=5.5)if(t=t.replace(RegExp("<link[^>]*>","gi"),"").replace(RegExp("<script[^>]*>.*?<\/script>","gi"),""),this.iframe){var s=this.iframe.contentDocument;if(!s&&this.iframe.contentWindow&&(s=this.iframe.contentWindow.document),!s){var i=this;return void setTimeout(function(){i.loadHTML()},25)}s.open(),s.write(t),s.close();try{t=s.getElementById(this.id).innerHTML}catch(h){try{t=this.iframe.document.getElementById(this.id).innerHTML}catch(h){}}hs.discardElement(this.iframe)}else e=/(<body[^>]*>|<\/body>)/gi,e.test(t)&&(t=t.split(e)[hs.ieLt9?1:2]);hs.getElementByClass(this.content,"DIV","highslide-body").innerHTML=t,this.onLoad();for(var n in this)this[n]=null}},hs.Slideshow=function(e,t){hs.dynamicallyUpdateAnchors!==!1&&hs.updateAnchors(),this.expKey=e;for(var s in t)this[s]=t[s];this.useControls&&this.getControls(),this.thumbstrip&&(this.thumbstrip=hs.Thumbstrip(this))},hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var e=["play","pause","previous","next","move","full-expand","close"];this.btn={};for(var t=0;t<e.length;t++)this.btn[e[t]]=hs.getElementByClass(this.controls,"li","highslide-"+e[t]),this.enable(e[t]);this.btn.pause.style.display="none"},checkFirstAndLast:function(){if(!this.repeat&&this.controls){var e=hs.expanders[this.expKey],t=e.getAnchorIndex(),s=/disabled$/;0==t?this.disable("previous"):s.test(this.btn.previous.getElementsByTagName("a")[0].className)&&this.enable("previous"),t+1==hs.anchors.groups[e.slideshowGroup||"none"].length?(this.disable("next"),this.disable("play")):s.test(this.btn.next.getElementsByTagName("a")[0].className)&&(this.enable("next"),this.enable("play"))}},enable:function(e){if(this.btn){var t=this,s=this.btn[e].getElementsByTagName("a")[0],i=/disabled$/;s.onclick=function(){return t[e](),!1},i.test(s.className)&&(s.className=s.className.replace(i,""))}},disable:function(e){if(this.btn){var t=this.btn[e].getElementsByTagName("a")[0];t.onclick=function(){return!1},/disabled$/.test(t.className)||(t.className+=" disabled")}},hitSpace:function(){this.autoplay?this.pause():this.play()},play:function(e){this.btn&&(this.btn.play.style.display="none",this.btn.pause.style.display=""),this.autoplay=!0,e||hs.next(this.expKey)},pause:function(){this.btn&&(this.btn.pause.style.display="none",this.btn.play.style.display=""),clearTimeout(this.autoplay),this.autoplay=null},previous:function(){this.pause(),hs.previous(this.btn.previous)},next:function(){this.pause(),hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}},hs.Thumbstrip=function(e){function t(e){hs.extend(o||{}
238,{overlayId:p,hsId:"thumbstrip",className:"highslide-thumbstrip-"+a+"-overlay "+(o.className||"")}),hs.ieLt7&&(o.fade=0),e.createOverlay(o),hs.setStyles(p.parentNode,{overflow:"hidden"})}function s(e){i(void 0,Math.round(e*p[d?"offsetWidth":"offsetHeight"]*.7))}function i(t,s){if(void 0===t)for(var i=0;i<n.length;i++)if(n[i]==hs.expanders[e.expKey].a){t=i;break}if(void 0!==t){var h=p.getElementsByTagName("a"),o=h[t],a=o.parentNode,r=d?"Left":"Top",l=d?"Width":"Height",c="offset"+r,v="offset"+l,x=u.parentNode.parentNode[v],w=x-y[v],b=parseInt(y.style[d?"left":"top"])||0,z=b;if(void 0!==s)z=b-s,w>0&&(w=0),z>0&&(z=0),w>z&&(z=w);else{for(var i=0;i<h.length;i++)h[i].className="";o.className="highslide-active-anchor";var E=t>0?h[t-1].parentNode[c]:a[c],T=a[c]+a[v]+(h[t+1]?h[t+1].parentNode[v]:0);T>x-b?z=x-T:-b>E&&(z=-E)}var S=a[c]+(a[v]-m[v])/2+z;hs.animate(y,d?{left:z}:{top:z},null,"easeOutQuad"),hs.animate(m,d?{left:S}:{top:S},null,"easeOutQuad"),g.style.display=0>z?"block":"none",f.style.display=z>w?"block":"none"}}for(var h,n=hs.anchors.groups[hs.expanders[e.expKey].slideshowGroup||"none"],o=e.thumbstrip,a=o.mode||"horizontal",r="float"==a,l=r?["div","ul","li","span"]:["table","tbody","tr","td"],d="horizontal"==a,p=hs.createElement("div",{className:"highslide-thumbstrip highslide-thumbstrip-"+a,innerHTML:'<div class="highslide-thumbstrip-inner"><'+l[0]+"><"+l[1]+"></"+l[1]+"></"+l[0]+'></div><div class="highslide-scroll-up"><div></div></div><div class="highslide-scroll-down"><div></div></div><div class="highslide-marker"><div></div></div>'},{display:"none"},hs.container),c=p.childNodes,u=c[0],g=c[1],f=c[2],m=c[3],y=u.firstChild,v=p.getElementsByTagName(l[1])[0],x=0;x<n.length;x++)0!=x&&d||(h=hs.createElement(l[2],null,null,v)),function(){var e=n[x],t=hs.createElement(l[3],null,null,h);hs.createElement("a",{href:e.href,title:e.title,onclick:function(){return/highslide-active-anchor/.test(this.className)?!1:(hs.getExpander(this).focus(),hs.transit(e))},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(e):e.innerHTML},null,t)}();return r||(g.onclick=function(){s(-1)},f.onclick=function(){s(1)},hs.addEventListener(v,void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",function(e){var t=0;e=e||window.event,e.wheelDelta?(t=e.wheelDelta/120,hs.opera&&(t=-t)):e.detail&&(t=-e.detail/3),t&&s(.2*-t),e.preventDefault&&e.preventDefault(),e.returnValue=!1})),{add:t,selectThumb:i}},hs.langDefaults=hs.lang;var HsExpander=hs.Expander;hs.ie&&window==window.top&&!function(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,50)}hs.ready()}(),hs.addEventListener(document,"DOMContentLoaded",hs.ready),hs.addEventListener(window,"load",hs.ready),hs.addEventListener(document,"ready",function(){function e(e,t){if(hs.ie&&(hs.uaVersion<9||i)){var h=document.styleSheets[document.styleSheets.length-1];"object"==typeof h.addRule&&h.addRule(e,t)}else s.appendChild(document.createTextNode(e+" {"+t+"}"))}function t(e){return"expression( ( ( ignoreMe = document.documentElement."+e+" ? document.documentElement."+e+" : document.body."+e+" ) ) + 'px' );"}if(hs.expandCursor||hs.dimmingOpacity){var s=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]),i="BackCompat"==document.compatMode;hs.expandCursor&&e(".highslide img","cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;"),e(".highslide-viewport-size",hs.ie&&(hs.uaVersion<7||i)?"position: absolute; left:"+t("scrollLeft")+"top:"+t("scrollTop")+"width:"+t("clientWidth")+"height:"+t("clientHeight"):"position: fixed; width: 100%; height: 100%; left: 0; top: 0")}}),hs.addEventListener(window,"resize",function(){if(hs.getPageSize(),hs.viewport)for(var e=0;e<hs.viewport.childNodes.length;e++){var t=hs.viewport.childNodes[e],s=hs.getExpander(t);s.positionOverlay(t),"thumbstrip"==t.hsId&&s.slideshow.thumbstrip.selectThumb()}}),hs.addEventListener(document,"mousemove",function(e){hs.mouse={x:e.clientX,y:e.clientY}}),hs.addEventListener(document,"mousedown",hs.mouseClickHandler),hs.addEventListener(document,"mouseup",hs.mouseClickHandler),hs.addEventListener(document,"ready",hs.setClickEvents),hs.addEventListener(window,"load",hs.preloadImages),hs.addEventListener(window,"load",hs.preloadAjax)};;
238var isAuthClick=false;var isFormSendToClick=false;var isLikeClick=false;function show(par){if(par=="auth_form"&&isAuthClick)return;if(par=="form_sendto"&&isFormSendToClick)return;if(par=="like"&&isLikeClick)return;var el=$('#'+par).eq(0);$(el).unbind('mouseout').bind('mouseout',function(e){$(this).hide();}).unbind('mouseover').bind('mouseover',function(e){$(this).show();}).click(function(e){e.stopPropagation();});if($(el).css('display')=='none'||$(el).css('display')=='')$(el).show();else $(el).hide();if(par=="auth_form"){$("#login").focus();}}
239function checkFlash(){var flashInstalled=false;if(typeof(navigator.plugins)!="undefined"&&typeof(navigator.plugins["Shockwave Flash"])=="object"){flashInstalled=true;}else if(typeof window.ActiveXObject!="undefined"){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){flashInstalled=true;}}catch(e){};};return flashInstalled;}
240$(document).ready(function(){$(".paginator").click(function(e){if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();});$(".des1").hover(function(){show('des1');},function(){show('des1');});$(".linkreg").hover(function(){show('reg_form');},function(){show('reg_form');});$(".des2").hover(function(){show('des2');},function(){show('des2');});$(".des3").hover(function(){show('des3');},function(){show('des3');});$(".des4").hover(function(){show('des4');},function(){show('des4');});$(".des5").hover(function(){show('des5');},function(){show('des5');});$(".des6").hover(function(){show('des6');},function(){show('des6');});$(".des7").hover(function(){show('des7');},function(){show('des7');});$(".des8").hover(function(){show('des8');},function(){show('des8');});$(".des9").hover(function(){show('des9');},function(){show('des9');});$(".ic2").hover(function(){$(".ic2").click();},function(){if(isLikeClick===false)hide('like');});$(".ic2").click(function(e){if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();var $likeBlock=$("#like");if($likeBlock.is(':empty')){$.get('/active/like_block.php',function(response){$likeBlock.html(response).unbind('mouseout').unbind("mouseover").show();isLikeClick=true;});}else{$likeBlock.unbind('mouseout').unbind("mouseover").show();}
241$likeBlock.click(function(e){e.stopPropagation();});$("body").click(function(){if($likeBlock.is(':empty')===false){isLikeClick=false;$likeBlock.hide();}});});$(".ic4").hover(function(){show('form_sendto');},function(){if(isFormSendToClick===false)hide('form_sendto');});$(".ic4").click(function(e){isFormSendToClick=true;var self=$("#form_sendto");self.show().unbind('mouseout').unbind("mouseover");$("body").click(function(){isFormSendToClick=false;self.hide();});if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();show_onclick('form_sendto');$(".img_sendto",self).click(function(e){e.preventDefault();$(self).hide();isFormSendToClick=false;});});$(".ic5").hover(function(){show('searchform');},function(){hide('searchform');});$(".ic5").click(function(){show_onclick('searchform');});$(".ic10").hover(function(e){var $block=$("#our_successes");var left_margin=parseFloat($(e.target).parents("a").position().left)-($block.width()/2)+($(e.target).parents("a").outerWidth()/2);$block.css('left',left_margin+'px');show('our_successes');},function(){hide('our_successes');});$('.btEnter').click(function(){enterForm();return false;})
242$('.remind_pass').click(function(){location.href='/restore_password/?email='+document.getElementById('login').value;return false;})
243$('.img_sendto').click(function(){show('form_sendto');});});hs.debug=false;hs.graphicsDir='/template/css/graphics/';hs.transitions=['expand','crossfade'];hs.fadeInOut=true;hs.outlineType='rounded-white';hs.numberOfImagesToPreload=0;hs.showCredits=false;hs.align='center';
243hs.isHsAnchor=function(e){return $(e).hasClass("highslide");};hs.next=function(e){return hs.previousOrNext(e,1);};hs.transit=function(e,t){var s=t||hs.getExpander();if(t=s,hs.upcoming)return!1;hs.last=s,hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{hs.upcoming=e,$(e).click()}catch(i){hs.last=hs.upcoming=null}
244try{e&&"crossfade"==t.transitions[1]||t.close()}catch(i){}
245return!1};$.extend(hs.lang,{loadingText:'Загрузка...',moveTitle:'Переместить',closeTitle:'Закрыть (Esc)',fullExpandTitle:'Развернуть до полного размера',restoreTitle:'Кликните для закрытия картинки, нажмите и удерживайте для перемещения',focusTitle:'Сфокусировать',loadingTitle:'Нажмите для отмены'});hs.addSlideshow({interval:5000,repeat:false,useControls:true,fixedControls:true,overlayOptions:{opacity:.6,position:'bottom center',hideOnMouseOut:true}});$(document).ready(function(){if(typeof(rep)!=='undefined'){$('img',$('body')).each(function(i,img){if(typeof(rep[$(img).attr('src')])!=='undefined'){if($(img).parent("a").length>0){var $a=$(img).parent("a");}else{var $a=$('<a>').attr('href',rep[$(img).attr('src')]);$(img).clone().appendTo($a);$(img).replaceWith($a);}
246$a.addClass("highslide").bind('click',function(e){e.preventDefault();return hs.expand(this);});}});hs.updateAnchors();}
247var h1_title=$("h1",".content").eq(0).html();h1_title=$.trim(h1_title);if(h1_title!=""){$("h1",".content").eq(0).remove();$(".main_title").html(h1_title)}
248location_data=$("table.location").find('td:first').html();if(location_data==""){$('table.location').hide();$('.about').css("margin-top","10px")}
249$('img.videocenter').click(function(){playerStart();})});function hide(par){var el=$('#'+par).eq(0);if($(el).css('display')=='block'||$(el).css('display')=='')$(el).hide();}
250function enterForm(){if($('#login').val()==='Логин'&&$('#pass').val()==='Password'){alert("Введите логин и пароль");}}
251function show_onclick(par){var el=$('#'+par).eq(0);$(el).toggleClass('showBlock');if($(el).hasClass('showBlock'))show(par);}
252function prosto_link(){$('li.stt').each(function(i,li){var link_a=$(li).children().eq(0);var link_span=$(li).children().eq(1);if($(link_a).is('a')==false||$(link_span).is('span')==false){}else{$(link_span).attr('id','s'+i).html('<span class="blockbordredt">'+$(link_span).html()+'</span>');$(link_a).unbind('mouseover').bind('mouseover',function(e){$(this).next().show();}).unbind('mouseout').bind('mouseout',function(e){$(this).next().hide();});};});}
253$(function(){var w=getClientWidth();var height_window=getClientHeight();if(620>height_window){var coefficient=1;}else{console.log(height_window/620);var coefficient=height_window/620;console.log(coefficient);}});function getCookie(key){var allcookies=document.cookie;var index=allcookies.indexOf(key+"=");if(index!=-1){var start=index+key.length+1;var end=allcookies.indexOf(";",start);if(end==-1)end=allcookies.length;return decodeURIComponent(allcookies.substring(start,end));}
254return"";}
255function getClientWidth(){var window_width=document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;var ua=navigator.userAgent.toLowerCase();var isOpera=ua.indexOf("opera")>-1;if(isOpera){window_width=window.innerWidth;}
256return window_width;}
257function getClientHeight(){var height_width=document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;var ua=navigator.userAgent.toLowerCase();var isOpera=ua.indexOf("opera")>-1;if(isOpera){height_width=window.innerHeight;}
258return height_width;}
259function setCookie(key,value,expires){var cookieString=key+"="+encodeURIComponent(value)+"; ";if(!expires){expires=new Date();expires.setFullYear(expires.getFullYear()+1);expires.toGMTString()}
260cookieString+="expires="+expires+"; ";cookieString+="path=/;";document.cookie=cookieString;}
261function get_cookie(key){return getCookie(key);}
262function set_cookie(key,value,expires){return setCookie(key,value,expires);}
263if(getCookie('http_referer_safe')==""){var expires=new Date();expires=new Date(expires.getTime()+(60*60*1000));setCookie('http_referer_safe',getCookie('http_referer'),expires);}else{$(document).ready(function(){$('#http_referer').val(getCookie('http_referer_safe'));});}
264function goVideo(id){$('.video_block').togglePopup();$('.video_youtube').html('<iframe id="ytplayer" type="text/html" width="640" height="360" src="//www.youtube.com/embed/'+id+'?autoplay=1" frameborder="0" allowfullscreen>');$('.video_youtube','.hidden').empty();}
265function goVideoHelp(id){$('.video_block').togglePopup();var width_y=getClientWidth();var height_y=getClientHeight();if(width_y>640){width_y=640}
266if(height_y>360){height_y=360}
267$('.video_youtube').html('<div id="ytplayer"></div>');$('.video_youtube','.hidden').empty();var player;player=new YT.Player('ytplayer',{height:height_y,width:width_y-40,videoId:id,events:{'onReady':onPlayerReady}});}
268function onPlayerReady(event){event.target.playVideo();}
269function loadVideo(id_video,id_el){$(id_el).html('<iframe id="ytplayer" type="text/html" width="640" height="360" src="//www.youtube.com/embed/'+id_video+'?autoplay=1&origin='+location.protocol+'//'+location.host+'" frameborder="0" allowfullscreen>');};var max_monthly_count=24;var order_url=null;function checkDataRobokassa(form){if(($('#summ',form).val()==='')||(($('#IncCurrLabel',form).val()===''))){alert('���� "�����" ��� "������ ������" �� ���������');return false;}
270if(($('#owner_id',form).val()==='-1')){alert('���� "�����������" �� ����� ���� ������');return false;}
271if((parseFloat($('#summ',form).val())<1)||!($('#summ',form).val().search(/^-?\d+[\.]?\d*$/)>=0)){alert('���� "�����" ��������� �� ��������. �������� ������ ���� ������ (������� ����� ".") � ������ �������.');return false;}
272if($('#organ_name',form).length){if(!validateorganName(form))
273return false;}
274return true;}
275function checkDataJuridical(){if(!((($('#jsumm').val()!=='')||($('#organ_id').val()!==''))&&$('#organ_name').val()!=='')){alert('���� "�����", "�����������", "����������� ����������" �� ����� ���� ������!');return false;}
276if(($('#jsumm').val()<1)||!($('#jsumm').val().search(/^-?\d+[\.]?\d*$/)>=0)){alert('���� "�����" ��������� �� ��������. �������� ������ ���� ������ (������� ����� ".") � ������ �������.');return false;}
277return true;}
278function checkDataCashflow(form){if(!((($('#direction',form).val()!=='')||($('#destination',form).val()!==''))&&$('#sum',form).val()!=='')){alert('���� "�����������", "��������", "�����" �� ����� ���� ������!');return false;}
279if(($('#sum',form).val()<1)||!($('#sum',form).val().search(/^-?\d+[\.]?\d*$/)>=0)){alert('���� "�����" ��������� �� ��������. �������� ������ ���� ������ (������� ����� ".") � ������ �������.');return false;}
280return true;}
281function checkDataTransfer(form){if(($('#sum',form).val()==='')||($('#sum',form).val()==='����� ��������')){alert('���� "����� ��������" �� ����� ���� ������!');return false;}
282if(($('#sum',form).val()<1)||!($('#sum',form).val().search(/^-?\d+[\.]?\d*$/)>=0)){alert('���� "����� ��������" ��������� �� ��������. �������� ������ ���� ������ (������� ����� ".") � ������ �������.');return false;}
283if($('#source_balance',form).val()===$('#dest_balance',form).val()){alert('������� ����������. �������� ��������� �����.');return false;}
284return true;}
285function getResponceText(text){a='<div class="a_link" > '+'<p>'+text+'</p> '+'</div>';return a;}
286function robokassa(form){var target_id='tabs_add_balance';if($('#dialog').dialog('isOpen')===true){target_id='dialog';}
287if(checkDataRobokassa(form)){startSpin(target_id);var form_data=$(form).serialize();var paymentsystem=$('#IncCurrLabel :selected',form).attr('paymentsystem');if(paymentsystem!==undefined){form_data+="&paymentsystem="+paymentsystem;}
288$.ajax({url:'/billing/topup_manager.php?topup=true',data:form_data,type:"post",dataType:"json",success:function(data){if(data.status==='OK'){var a=getResponceText('��� ����������� ���� �'+data.id+' �� ����� '+number_format(data.sum,0,'.',' ')+' �. ��� ������ ������� "�����" <a href="'+data.link+'" target="_blank" id="a_plink">�����</a>');var tabs_user_add_balance=$(form).parent();if(tabs_user_add_balance.hasClass('ui-tabs-panel'))
289tabs_user_add_balance=tabs_user_add_balance.parent().parent();tabs_user_add_balance.empty().append(a);$('#a_rblink').live('click',function(e){updateCashflow(data.id);});resizeDialog('window_content');}else{alert(data.message);}
290stopSpin(target_id);}});}}
291function order(form){var form_data=arguments[1];var validateData=(form_data===undefined)?checkDataOrder(form):true;if(validateData){startSpin('dialog');if(form_data===undefined){form_data=$(form).serialize();}
292$.ajax({url:'/billing/price.php?usedservice=true',data:form_data,type:"post",dataType:"json",success:function(data){if(data.status==='OK'){a=getResponceText(data.message);var tabs_user_add_balance=$(form).parent();tabs_user_add_balance.empty();tabs_user_add_balance.append(a);$('#dialog').dialog('option','title','�����������');resizeDialog('window_content');$('.ui-icon-closethick').unbind('click');$('.ui-icon-closethick').bind('click',function(){window.location.href='/billing/price.php';});}else{alert(data.message);}
293stopSpin('dialog');}});}}
294function trialOrder(form_data){openDialog('/billing/cashflow_manager.php?action=view&view_name=trial.order&'+form_data,'���������');}
295function createCasfflow(paymentsystem,data){var url="/billing/topup_manager.php?topup=true&paymentsystem="+paymentsystem+"&trial_order=true&redirect=true";if(data!=='')url+='&'+data;return url;}
296function juridical_invoice(form){if(checkDataJuridical()){var target_id='dialog';startSpin(target_id);formdata=$(form).serialize();$.ajax({url:'/billing/cashflow_manager.php?action=add&juridical_invoice=true',data:formdata,type:"post",dataType:"json",success:function(data){if(data.status==='OK'){a=getResponceText(data.message);$('.window_content').empty().append(a);}else{alert(data.message);}
297stopSpin(target_id);}});}}
298function loadViewObject(type,id){var target_id='wrapper';startSpin(target_id);$.ajax({url:'/billing/cashflow_manager.php?action=load&load_billing_object=true',data:'object_type='+type+'&object_id='+id,type:"post",dataType:"json",success:function(data){if(data.status==='OK'){$('#accounts tbody th, #accounts tbody td').removeClass('tdred');var tr_obj_id='#object_'+type+'_'+id;$(tr_obj_id+' th, '+tr_obj_id+' td').addClass('tdred');$('#billing_object').empty().append(data.html);}else{alert(data.message);}
299stopSpin(target_id);setSizes();}});}
300$(function(){$('#amount_transfer').submit(function(e){e.preventDefault();transferCashflow(this);});$('#order_form').submit(function(e){e.preventDefault();order(this);});$('#filter_operation').submit(function(e){e.preventDefault();form=$(this).serialize();loadPage('tab_operation','/billing/cashflow_list.php?'+form);});$('#btViewStats').click(function(e){var code=document.getElementById('iframeViewStats');var owner=$('#owner').val().split('_');code.src='/man/'+owner[0]+'/'+owner[0]+'_stats.php?id='+owner[1]+'&'+$('#keystring').val();});$("#dialog").dialog({title:"dialog",autoOpen:false,resizable:false,modal:true,width:640,close:function(event,ui){$('.ui-dialog-content').attr('style','height: auto');stopSpin('dialog');}});$('#accounts tbody tr').click(function(e){var obj=$(this).attr('id').split('_');loadViewObject(obj[1],obj[2]);return false;});$('#accounts tbody tr a').click(function(e){var obj=$(this).parent('td').parent('tr').attr('id').split('_');loadViewObject(obj[1],obj[2]);e.cancelBubble=true;e.stopPropagation();});$('.billing_click').click(function(e){billingClick(this);});});function billingClick(a){var s_id=$(a).attr('s_id');
300if(s_id===undefined)s_id='';var trial_order=($(a).attr('trial_order'))?'&trial_order=true':'';openDialog(order_url+s_id+trial_order);}
301function transferCashflow(form){if(checkDataTransfer(form)){var target_id=$(form).attr('target_id');startSpin(target_id);$.ajax({url:$(form).attr('url'),data:$(form).serialize(),type:"post",dataType:"json",success:function(data){stopSpin(target_id);if(data.status==='OK'){$("#dialog").dialog('close');window.location.reload();}}});}}
302function setOnclickSendForm(link,form_name){if(link!=='none'){$('#tabs_add_balance a').removeClass('current');$(link).addClass('current');}else{$('#tabs_add_balance a').unbind();$('#tabs_add_balance a').removeAttr('onclick');$('#tabs_add_balance a').attr('href','javascript:void(0)');}
303if(form_name==='none'){$('#submit_add_balance').attr("style","display:none;");}else{$('#submit_add_balance').attr("style","display:block;");$('#submit_add_balance').unbind('click');$('#submit_add_balance').bind('click',function(e){sendForm(form_name);});}}
304function sendForm(id){if($("#"+id).length){$('#'+id).submit();}}
305function updateCashflow(cf_id){$.post("/billing/cashflow_manager.php",{'id':cf_id,'action':'update','update_cashflow':'true'});a=getResponceText('������� F5 ��� ��������� �� ������ "<a id="a_rblink" href="javascript:void(0)" onclick="javascript:window.location.reload(true);" >�������� ��������</a>"')
306$('#tabs_user_add_balance div').hide();$('#tabs_user_add_balance').append(a);}
307function redirect(url){if(isssetParentFrame()){window.parent.window.location.href=url;}else{window.location.href=url;}}
308function resizeDialog(){var obj_class=arguments[0];if((obj_class!==undefined)&&($('.'+obj_class).height()!==0)){$('.ui-dialog-content').attr('style','height: '+($('.'+obj_class).height()+5)+'px !important');}}
309function resizeDialogBySelect(){if($('.lacking','.service_form').length){var delta=27;var height=$('#dialog').height();if(!$('.lacking','.service_form').hasClass('disp_none')){if($('.ui-dialog-content').attr('resize')===undefined){$('.ui-dialog-content').attr('style','height: '+(height+delta)+'px !important');$('.ui-dialog-content').attr('resize','true');}}else if($('.ui-dialog-content').attr('resize')==='true'){$('.ui-dialog-content').attr('style','height: '+(height-delta)+'px !important');$('.ui-dialog-content').removeAttr('resize');}}}
310
311function setPositionDialog() {
312    if ($('#price_iframe', parent.document).length) {
313        //parent.scrollToTop(); // убрали скрол стилизированный
314        var dialogHeight = $("#dialog").dialog("option", "height");
315        dialogHeight = dialogHeight === 'auto' ? 100 : dialogHeight;
316        var y = Math.ceil(getInnerHeight() / 2) - Math.ceil(dialogHeight / 2) - 5;
317        console.log('$("#dialog").dialog("option", "height")', $("#dialog").dialog("option", "height"))
318        console.log('getInnerHeight()', getInnerHeight())
319        console.log(y)
320        y = Math.ceil(getInnerHeight() / 6) - Math.ceil(dialogHeight / 2) - 5;
321        var x = Math.ceil(getInnerWidth() / 2) - Math.ceil($("#dialog").dialog("option", "width") / 2);
322        console.log([x, y])
323        $("#dialog").dialog('option', 'position', [x, y]);
324    } else {
325        $('#dialog').dialog("option", "position", ['middle', 100]);
326    }
327}
328function getScrollY(){scrollY=0;if(typeof parent.window.pageYOffset==="number"){scrollY=parent.window.pageYOffset;}else if(parent.document.documentElement&&parent.document.documentElement.scrollTop){scrollY=parent.document.documentElement.scrollTop;}else if(parent.document.body&&parent.document.body.scrollTop){scrollY=parent.document.body.scrollTop;}else if(parent.window.scrollY){scrollY=parent.window.scrollY;}
329return scrollY;}
330function getInnerHeight(){height=0;if(parent.window.innerHeight){height=parent.window.innerHeight-18;}else if(parent.document.documentElement&&parent.document.documentElement.clientHeight){height=parent.document.documentElement.clientHeight;}else if(parent.document.body&&parent.document.body.clientHeight){height=parent.document.body.clientHeight;}
331return height;}
332function getInnerWidth(){width=0;if(window.innerWidth){width=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){
332width=document.documentElement.clientWidth;}else if(document.body&&document.body.clientWidth){width=document.body.clientWidth;}
333return width;}
334function startSpin(id,color){var opts={lines:12,length:12,width:3,radius:6,speed:1,trail:100,shadow:true};color='black';$("#"+id).spin(opts,color);}
335function stopSpin(id){$("#"+id).spin(false);}
336function changeRenewalUsedservice(id,renewal){var action;if(renewal==='auto')
337action='��������';else if(renewal==='manual')
338action='���������';if(window.confirm('������������� '+action+' �������������� ��������� ������?')){$.ajax({url:'/billing/cashflow_manager.php?action=update&update_usedservice=true',data:'id='+id+'&renewal='+renewal,type:"post",dataType:"json",success:function(data){if(data.status==='OK'){$('td#renewal_'+id).html(data.html);}else{alert(data.message);}}});}}
339function openDialog(url,title){if(title===undefined)title='';$('#dialog').dialog("option","title",title);var date=new Date();$.get(url+'&time='+date.getTime(),function(data){$('#popupShow').html(data);$('.ui-dialog-content').removeAttr('resize');setPositionDialog();$("#dialog").dialog("open");resizeDialog();});}
340function openDialogHTML(html,title){$('#dialog').dialog('option','title',title);$('#popupShow').html(html);setPositionDialog();$("#dialog").dialog('open');resizeDialog();setStyleTable();}
341function closeDialog(){$("#dialog").dialog('close');}
342function loadPage(tag_id,url){var date=new Date();var target_id='wrapper';startSpin(target_id);$.get(url+'&time='+date.getTime(),function(data){$('#'+tag_id).html(data);stopSpin(target_id);});}
343function changeParentFrameHeight(iframe,div){if($('#'+iframe,parent.document).length){$('body').css('overflow-y','hidden');var height=$(div).height()+20;parent.changeFrameHeight(height,iframe);}}
344function changeFrameHeight(height,iframe){$('#'+iframe).height(height);}
345function number_format(number,decimals,dec_point,thousands_sep){number=(number+'').replace(/[^0-9+\-Ee.]/g,'');var n=!isFinite(+number)?0:+number,prec=!isFinite(+decimals)?0:Math.abs(decimals),sep=(typeof thousands_sep==='undefined')?',':thousands_sep,dec=(typeof dec_point==='undefined')?'.':dec_point,s='',toFixedFix=function(n,prec){var k=Math.pow(10,prec);return''+Math.round(n*k)/k;};s=(prec?toFixedFix(n,prec):''+Math.round(n)).split('.');if(s[0].length>3){s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,sep);}
346if((s[1]||'').length<prec){s[1]=s[1]||'';s[1]+=new Array(prec-s[1].length+1).join('0');}
347return s.join(dec);}
348function calcTotalCost_old(monthly,month_delta,price,count,form){var total=0;if(monthly){var date=(usedservice_end_date!==undefined)?(new Date(usedservice_end_date)>new Date())?new Date(usedservice_end_date):new Date():new Date();var day_count=new Date(date.getYear(),date.getMonth()+1,0).getDate();var cur_day=date.getDate();var end_date=new Date(date.getFullYear(),(date.getMonth()+(count*month_delta)),1);$('#date_end',form).html($.format.date(end_date.getTime(),'dd.MM.yyyy'));var cost_current_month=Math.round(price/day_count*(day_count-cur_day+1));if(count>1){var cost_next_months=price*(count-1);total+=cost_next_months;}
349total+=cost_current_month;}else
350total=price*count;return total;}
351function calcTotalCost(monthly,month_delta,price,count,form){if(monthly){var date=(usedservice_end_date!==undefined)?(new Date(usedservice_end_date)>new Date())?new Date(usedservice_end_date):new Date():new Date();var end_date=addMonth(date,count*month_delta);var func=($('#date_end',form).attr('tag')==='b')?'html':'val';var str="$('#date_end', form)."+func+"($.format.date(end_date.getTime(), 'dd.MM.yyyy'))";eval(str);}
352var total=price*count;var connection_price=$('#connection_price',form).val();if(connection_price!==undefined&&$('#us_id',form).val()==='')
353total+=parseInt(connection_price);return total;}
354function addMonth(date,nmonths){var cur_day=date.getDate();var end_day=new Date(date.getFullYear(),(date.getMonth()+nmonths),cur_day);if(cur_day!==end_day.getDate())
355end_day.setDate(0);return new Date(date.getFullYear(),(date.getMonth()+nmonths),end_day.getDate());}
356function addZero(i){return(i<10)?"0"+i:i;}
357function changeOrgan(){$('#organ_name').val($('#organ_id-styler .jq-selectbox__select-text').html());}
358function changeInvoice(){var form=$('#robokassa_form');var invoice=$('#invoice',form).val();var obj=invoice.split('_');$('#owner_type',form).val(obj[0]);$('#owner_id',form).val(obj[1]);}
359function initCuselSelect(){$('.window_content select').styler();}
360function setStyleTable(){$('.table tr:odd').addClass('odd');$('.table tr:even').addClass('even');}
361function isssetParentFrame(){return $('#price_iframe',parent.document).length;}
362function validateorganName(form){if($('#organ_name',form).attr('disabled')===undefined){var target_id='dialog';startSpin(target_id);var form_data='organ_name='+$('#organ_name',form).val();var result=false;$.ajax({url:'/billing/price.php?validate_org_name=true',data:form_data,type:"post",async:false,dataType:"json",success:function(data){if(data.status==='OK'){result=true;}else{alert(data.message);}
363stopSpin(target_id);}});return result;}
364return true;}
365function setSizes(){$(".mycustomscroll").height($(window).height()-115);$(".resources").height($(window).height()-95);$(".operations").height($(window).height()-95);$("#section").height($(window).height()-95);$("body").height($(window).height());};function getGeo(){var ret;$.ajax({async:false,url:"/svn_scripts/masks/geo.php",global:false,type:"POST",dataType:"json",success:function(data){if(data.status==="success"){ret=data.isoCode;}else{ret=false;}}}).responseText;return ret;}
366function initInputMasks(jq){call_iso_code=getGeo();var maskOpts={phonecode:{preferCo:call_iso_code},inputmask:{definitions:{'_':{validator:"[0-9]",cardinality:1}},clearIncomplete:false,showMaskOnHover:true,autoUnmask:false},match:/[0-9]/,replace:'_',list:kdnm_phone_code,listKey:"mask"};jq(".call_phone").inputmasks(maskOpts,true);}
367jQuery(function(){jQuery.loadScript=function(a,b){return jQuery.ajax({dataType:"script",cache:true,url:a,success:b})};jQuery.loadScript("/svn_scripts/masks/masks_libs.min.js",function(){initInputMasks(jQuery);});});;
368
369// $(document).ready(function()
370// {youTuber();});function youTuber()
371// {$("head").append($("<link>").attr({type:'text/css',rel:'stylesheet',href:'youtuber/youtuber.css'}));$("body").append($("<div>").attr({class:'youTuberBack'}));$(".youTuberBack").height($(document).height());var i,id,shortLink,bg=$(".youTuberBack"),wh,ww,video,fw,fh,qw,qh,href;qw=[3840,2560,1920,1280,854,640,426];qh=[2160,1440,1080,720,480,360,240];function sizeVideo()
372// {ww=$(window).width();for(i=0;i<qw.length;i++)
373// {if(ww>qw[i])
374// {$("#youTuber").attr({"width":qw[i],"height":qh[i]});$(video).css({"width":qw[i],"height":qh[i]});break;}}}
375// function sizeContainer()
376// {if($(video).is(":visible"))
377// {wh=$(window).height();ww=$(window).width();fw=$(video).width();fh=$(video).height();$(video).css("left",(ww-fw)/2);$(video).css("top",(wh-fh)/2);$(bg).css("height",$(document).height());}}
378// function closeContainer()
379// {$(bg).html("");$(bg).fadeOut("fast");}
380// $(".youTuber").bind('click.youTuber',function()
381// {href=$(this).attr("href");i=href.search(/\/youtu.be/i);if(i>0)
382// {id=href.match(/(\.be\/)([^&]+)/);id=id[2];}
383// else
384// {id=href.match(/(\?|&)v=([^&]+)/);id=id[2];}
385// if(id.length==0)return false;$(bg).fadeIn("fast");$(bg).append($("<div />").attr({id:'youTuberLoading'}).text("Загрузка"));$(bg).append($("<div />").attr({id:'youTuberClose'}).html("&#215;"));$(bg).append($("<div />").attr({id:'youTuberContainer'}));$("#youTuberContainer").append($("<iframe />").attr({src:'https://youtube.com/embed/'+id+'?autoplay=1',frameborder:0,id:'youTuber',"allowfullscreen":""}));video=$("#youTuberContainer");sizeVideo();$(video).fadeIn("fast");sizeContainer();return false;});$(window).resize(function()
386// {sizeContainer();sizeVideo();});$(bg).bind('click.youTuberClose',function()
387// {closeContainer();});$(document).keyup(function(a)
388// {if((a.keyCode==27)&&($(bg).is(":visible"))){$(bg).click();}});}
389// ;
390
391let loaded = false;
392let sessid = '';
393let cities = [
394    {"name": "8 800 Россия", "value": "223145"}, {
395    "name": "Москва",
396    "value": "380"
397}, {"name": "Санкт-Петербург", "value": "382"}, {"name": "Архангельск", "value": "2286775"}, {
398    "name": "Астрахань",
399    "value": "2286778"
400}, {"name": "Барнаул", "value": "337485"}, {"name": "Белгород", "value": "1992601"}, {
401    "name": "Благовещенск",
402    "value": "2286781"
403}, {"name": "Братск", "value": "142"}, {"name": "Брянск", "value": "1823515"}, {
404    "name": "Великий Новгород",
405    "value": "989"
406}, {"name": "Владивосток", "value": "160759"}, {"name": "Владикавказ", "value": "2286784"}, {
407    "name": "Владимир",
408    "value": "1743214"
409}, {"name": "Волгоград", "value": "98981"}, {"name": "Волгодонск", "value": "2037019"}, {
410    "name": "Волжский",
411    "value": "430915"
412}, {"name": "Вологда", "value": "2286787"}
412, {"name": "Воронеж", "value": "12290"}, {
413    "name": "Грозный",
414    "value": "2286790"
415}, {"name": "Дзержинск", "value": "1918501"}, {"name": "Екатеринбург", "value": "384"}, {
416    "name": "Иваново",
417    "value": "2286793"
418}, {"name": "Ижевск", "value": "1760278"}, {"name": "Иркутск", "value": "1845889"}, {
419    "name": "Йошкар-Ола",
420    "value": "1929304"
421}, {"name": "Казань", "value": "1078"}, {"name": "Калининград", "value": "389605"}, {
422    "name": "Калуга",
423    "value": "1497538"
424}, {"name": "Кемерово", "value": "2286796"}, {"name": "Киров", "value": "1790947"}, {
425    "name": "Комсомольск-на-Амуре",
426    "value": "2286799"
427}, {"name": "Кострома", "value": "2286802"}, {"name": "Краснодар", "value": "10578"}, {
428    "name": "Красноярск",
429    "value": "15146"
430}, {"name": "Курган", "value": "1813789"}, {"name": "Курск", "value": "1823566"}, {
431    "name": "Липецк",
432    "value": "1770928"
433}, {"name": "Магнитогорск", "value": "1775797"}, {"name": "Махачкала", "value": "2286805"}, {
434    "name": "Мурманск",
435    "value": "1992589"
436}, {"name": "Набережные челны", "value": "1789183"}, {
437    "name": "Нефтеюганск",
438    "value": "2243569"
439}, {"name": "Нижневартовск", "value": "2037013"}, {
440    "name": "Нижнекамск",
441    "value": "1918525"
442}, {"name": "Нижний Новгород", "value": "523"}, {"name": "Нижний Тагил", "value": "2286808"}, {
443    "name": "Новокузнецк",
444    "value": "2286811"
445}, {"name": "Новороссийск", "value": "2286814"}, {"name": "Новосибирск", "value": "2558"}, {
446    "name": "Новый Уренгой",
447    "value": "2243563"
448}, {"name": "Нягань", "value": "2037907"}, {"name": "Омск", "value": "353093"}, {
449    "name": "Оренбург",
450    "value": "1763068"
451}, {"name": "Орёл", "value": "2037007"}, {"name": "Пенза", "value": "1788199"}, {
452    "name": "Пермь",
453    "value": "14341"
454}, {"name": "Петрозаводск", "value": "2286817"}, {"name": "Псков", "value": "2286820"}, {
455    "name": "Ростов-на-Дону",
456    "value": "520"
457}, {"name": "Рязань", "value": "1515433"}, {"name": "Самара", "value": "1787"}, {
458    "name": "Саранск",
459    "value": "2286823"
460}, {"name": "Саратов", "value": "1288201"}, {"name": "Севастополь", "value": "430913"}, {
461    "name": "Симферополь",
462    "value": "430911"
463}, {"name": "Смоленск", "value": "2286826"}, {"name": "Сочи", "value": "1894294"}, {
464    "name": "Ставрополь",
465    "value": "1992577"
466}, {"name": "Стерлитамак", "value": "2286829"}, {"name": "Сургут", "value": "1992571"}, {
467    "name": "Сыктывкар",
468    "value": "2286832"
469}, {"name": "Таганрог", "value": "2286835"}, {"name": "Тамбов", "value": "2286838"}, {
470    "name": "Тверь",
471    "value": "1823557"
472}, {"name": "Тольятти", "value": "75823"}, {"name": "Томск", "value": "1790938"}, {
473    "name": "Тула",
474    "value": "1843732"
475}, {"name": "Тюмень", "value": "127591"}, {"name": "Улан-Удэ", "value": "2286841"}, {
476    "name": "Ульяновск",
477    "value": "157511"
478}, {"name": "Уфа", "value": "69769"}, {"name": "Хабаровск", "value": "177425"}, {
479    "name": "Ханты-Мансийск",
480    "value": "1992607"
481}, {"name": "Чебоксары", "value": "1789195"}, {"name": "Челябинск", "value": "1520"}, {
482    "name": "Череповец",
483    "value": "2286844"
484}, {"name": "Чита", "value": "2286847"}, {"name": "Якутск", "value": "2286850"}, {
485    "name": "Ярославль",
486    "value": "1189882"
487}
488];
489$(document).ready(function () {
490    $.post("/active/ajax_phone.php", {city: 1}, function (data) {
491        sessid = data.sessid
492        if (data.status === 'success') {
493            cities = data.city;
494        }
495        loadNumbers();
496    }, "json").fail(function () {
497        loadNumbers();
498    });
499
500    function loadNumbers() {
501        $.each(cities, function (i, city) {
502            $('#city_phone').append($('<option>', {value: city.value, text: city.name}));
503        });
504        $.post("/active/ajax_phone.php", {
505            'CITY_ID'   : cities[0]["value"],
506            'sessid'    : sessid
507        }, function (data) {
508            $('#phone_loading').hide();
509            if (data === 'no_available') {
510                $('#no_available').show();
511                $('#container_phone').html('');
512            } else {
513                $('#container_phone').html(data);
514                $('#no_available').hide();
515            }
516            $('#phone_loaded').show();
517            loaded = true;
518        });
519    }
520
521    $('#city_phone').change(function () {
522        $.post("/active/ajax_phone.php", {
523            'CITY_ID'   : $('#city_phone').val(),
524            'sessid'    : sessid
525        }, function (data) {
526            if (data === 'no_available') {
527                $('#no_available').show();
528                $('#container_phone').html('');
529            } else {
530                $('#container_phone').html(data);
531                $('#no_available').hide();
532            }
533            if (!loaded) {
534                $('#phone_loading').hide();
535                $('#phone_loaded').show();
536                loaded = true;
537            }
538        });
539    });
540});
541;$(document).ready(function () {
542    $('<div>').attr('id', 'opaco').addClass('hidden').appendTo('body');
543    $('<div>').attr('id', 'popup').addClass('hidden').appendTo('body');
544})
545$.fn.alignCenter = function () {
546    var marginLeft = Math.max(40, parseInt($(window).width() / 2 - $(this).width() / 2)) + 'px';
547    var marginTop = Math.max(40, parseInt($(window).height() / 2 - $(this).height() / 2)) + 'px';
548    return $(this).css({'margin-left': marginLeft, 'margin-top': marginTop});
549};
550$.fn.togglePopup = function () {
551    if ($('#popup').hasClass('hidden')) {
552        $('#opaco').height($(document).height()).toggleClass('hidden').unbind('click').bind('click', function () {
553            $(this).togglePopup();
554        });
555        $('#popup').html($(this).html()).alignCenter().toggleClass('hidden');
556    } else {
557        closePopup();
558    }
559};
560
561function closePopup() {
562    $('#opaco').toggleClass('hidden').removeAttr('style');
563    $('#popup').toggleClass('hidden');
564    return false;
565};(function spellcheck() {
566    function gs() {
567        var t = "";
568        if (window.getSelection) {
569            t = window.getSelection().toString();
570        } else if (document.selection && document.selection.type != "Control") {
571            t = document.selection.createRange().text;
572        }
573        return t;
574    }
575
576    function se(t) {
577        if (t.length < 3) {
578            alert("Вы не выбрали текст");
579        } else if (t.length > 350) {
580            alert("Слишком много текста, выберите меньше");
581        } else {
582            var message = prompt("Пожалуйста, укажите в чем ошибка");
583            if (message !== null) {
584                if (message.length === 0) {
585                    alert("Пожалуйста, введите сообщение");
586                    se(gs());
587                } else {
588                    $.ajax({
589                        url: "/spellcheck/spellcheck.php",
590                        type: "POST",
591                        data: {url: location.href, error: t, message: message},
592                        dataType: "json"
593                    }).done(function (data) {
594                        if (data.result === "ok") {
595                            alert(data.message);
596                        } else {
597                            alert(data.error);
598                        }
599                    }).fail(function () {
600                        alert("Произошла ошибка");
601                    });
602                }
603            }
604        }
605    }
606
607    jQuery(document).keydown(function (e) {
608        if (e.keyCode == 13 && e.ctrlKey) {
609            se(gs());
610        }
611    });
612})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.