if(typeof console==="undefined"){console={log:function(){}}}
if(TX_BL==null||undefined){var TX_BL={}}
$.featherlight.autoBind=!1;TX_BL.dtlang={"sEmptyTable":"Keine Daten in der Tabelle vorhanden","sInfo":"_START_ bis _END_ von _TOTAL_ Einträgen","sInfoEmpty":"0 bis 0 von 0 Einträgen","sInfoFiltered":"(gefiltert von _MAX_ Einträgen)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ Einträge anzeigen","sLoadingRecords":"Wird geladen...","sProcessing":"Bitte warten...","sSearch":"","sSearchPlaceholder":"Suchen","sZeroRecords":"Keine Einträge vorhanden.","oPaginate":{"sFirst":"Erste","sPrevious":"Zurück","sNext":"Nächste","sLast":"Letzte"},"oAria":{"sSortAscending":": aktivieren, um Spalte aufsteigend zu sortieren","sSortDescending":": aktivieren, um Spalte absteigend zu sortieren"},alphabetSearch:{alphabet:'AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZ',infoDisplay:'',infoAll:'Alle',},select:{rows:{_:'%d Zeilen ausgewählt',0:'Zum Auswählen auf eine Zeile klicken',1:'1 Zeile ausgewählt'}}};TX_BL.langEn={"sEmptyTable":"There is no data in the table","sInfo":"_START_ to _END_ of _TOTAL_ entries","sInfoEmpty":"0 to 0 of 0 entries","sInfoFiltered":"(filtered by _MAX_ entries)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"Show _MENU_ entries","sLoadingRecords":"Loading...","sProcessing":"Please wait...","sSearch":"","sSearchPlaceholder":"Search","sZeroRecords":"No entries available.","oPaginate":{"sFirst":"First","sPrevious":"Back","sNext":"Next","sLast":"Last"},"oAria":{"sSortAscending":": enable to sort column in ascending order","sSortDescending":": enable to sort column in descending order"},alphabetSearch:{alphabet:'ABCDEFGHIJKLMNOPQRSTUVWXYZ',infoDisplay:'',infoAll:'All',},select:{rows:{_:'%d Lines selected',0:'Click on a line to select',1:'1 line selected'}}};TX_BL.langFr={"sEmptyTable":"Il n'y a pas de données dans le tableau","sInfo":"_START_ à _END_ sur _TOTAL_ entrées","sInfoEmpty":"0 à 0 sur 0 entrées","sInfoFiltered":"(filtré par entrées _MAX_)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"Afficher les entrées _MENU_","sLoadingRecords":"Chargement...","sProcessing":"S'il vous plaît, attendez ...","sSearch":"","sSearchPlaceholder":"Rechercher","sZeroRecords":"Aucune entrée disponible.","oPaginate":{"sFirst":"Première","sPrevious":"Arrière","sNext":"Suivante","sLast":"Dernière"},"oAria":{"sSortAscending":": permet de trier la colonne par ordre croissant ","sSortDescending":": permet de trier la colonne par ordre décroissant "},alphabetSearch:{alphabet:'ABCDEFGHIJKLMNOPQRSTUVWXYZ',infoDisplay:'',infoAll:'Tous',},select:{rows:{_:'%d Lines selected',0:'Click on a line to select',1:'1 line selected'}}};if(TX_BL.dtLang==1){TX_BL.dtlang=TX_BL.langEn}
if(TX_BL.dtLang==2){TX_BL.dtlang=TX_BL.langFr}
$(document).ready(function(){if(typeof TX_BL.controller!=='undefined'&&TX_BL.controller=='Begriff'&&typeof TX_BL.action!=='undefined'&&TX_BL.action=='list'){var bsTable=$('#buergerservice').DataTable({ajax:TX_BL.bsAjaxJsonRequestUrl,deferRender:!0,paging:!1,ordering:!1,"createdRow":function(row,data,index){$('td',row).eq(0).addClass("bs-c1").attr('data-uid',row[3]);$('td',row).eq(1).addClass("bs-c2")},"columnDefs":[{"render":function(data,type,row){if(row[6]===!0){return'<a href="#" data-uid="'+row[3]+'">'+data.replace(/®/g,"<sup>®</sup>")+'</a>'}else{return'<span data-uid="'+row[3]+'">'+data.replace(/®/g,"<sup>®</sup>")+'</span>'}},"targets":0},{"visible":!1,"targets":[3,4]}],fnRowCallback:function(nRow,aData,iDisplayIndex,iDisplayIndexFull){$('td > a',nRow).on('click',function(e){e.preventDefault()})},"language":TX_BL.dtlang,dom:"A<'row'<'col-sm-12'f>>"+"<'row'<'col-sm-12'tr>>"+"<'row'<'col-sm-5'i><'col-sm-7'p>>",alphabetSearch:{column:0},drawCallback:function(){$('.alphabet ul').addClass('pagination pagination-sm');$('.alphabet .alphabet-info-display').addClass('form-control-static');$('.alphabet a.active').closest('li').addClass('active')}})}
$('#buergerservice tbody').on('click','tr td.bs-c1',function(){var data=bsTable.row($(this).parent()).data();if(data[6]===!0){$.featherlight($('.bs-desc'+parseInt(data[3])),{})}})});if(typeof console==="undefined"){console={log:function(){}}}
$(document).ready(function(){$('a.products-more').click(function(e){var target=this.hash;var idx=target.indexOf('#');target=target.substr(idx+2);var txt=$('#c'+target).html();var id=$(e.target).nextElementInDom('div.csc-default').attr('id');var $this=$(this);if(txt.length>0&&id.length>2){$(this).addClass('hidden');$('div#'+id+' p').append($(document.createElement('p')).attr({id:id+'-more'}).append(txt+'&nbsp;').append($(document.createElement('a')).attr({href:'#'+id+'-more',title:'weniger Text',}).append('&laquo;').click(function(event){event.preventDefault();var target=this.hash;var idx=target.indexOf('#');target=target.substr(idx+1);$('#'+target).fadeOut().remove();$($this).removeClass('hidden')}))).fadeIn('slow')}
e.preventDefault()});$('a.nomoretxt').click(function(e){var target=this.hash;var idx=target.indexOf('#');target=target.substr(idx+2);console.log(target);e.preventDefault()});$('.intern-more').click(function(e){var target=this.hash;$('.frame-custom-1').fadeOut('fast').promise().done(function(){$(target).fadeIn('slow')});e.preventDefault()})});(function($){$.fn.nextElementInDom=function(selector,options){var defaults={stopAt:'body'};options=$.extend(defaults,options);var parent=$(this).parent();var found=parent.find(selector);switch(!0){case(found.length>0):return found;case(parent.length===0||parent.is(options.stopAt)):return $([]);default:return parent.nextElementInDom(selector)}}})(jQuery);
/*! Hammer.JS - v1.0.5 - 2013-04-07
 * http://eightmedia.github.com/hammer.js
 *
 * Copyright (c) 2013 Jorik Tangelder <j.tangelder@gmail.com>;
 * Licensed under the MIT license */
(function(t,e){"use strict";function n(){if(!i.READY){i.event.determineEventTypes();for(var t in i.gestures)i.gestures.hasOwnProperty(t)&&i.detection.register(i.gestures[t]);i.event.onTouch(i.DOCUMENT,i.EVENT_MOVE,i.detection.detect),i.event.onTouch(i.DOCUMENT,i.EVENT_END,i.detection.detect),i.READY=!0}}var i=function(t,e){return new i.Instance(t,e||{})};i.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,i.HAS_TOUCHEVENTS="ontouchstart"in t,i.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android/i,i.NO_MOUSEEVENTS=i.HAS_TOUCHEVENTS&&navigator.userAgent.match(i.MOBILE_REGEX),i.EVENT_TYPES={},i.DIRECTION_DOWN="down",i.DIRECTION_LEFT="left",i.DIRECTION_UP="up",i.DIRECTION_RIGHT="right",i.POINTER_MOUSE="mouse",i.POINTER_TOUCH="touch",i.POINTER_PEN="pen",i.EVENT_START="start",i.EVENT_MOVE="move",i.EVENT_END="end",i.DOCUMENT=document,i.plugins={},i.READY=!1,i.Instance=function(t,e){var r=this;return n(),this.element=t,this.enabled=!0,this.options=i.utils.extend(i.utils.extend({},i.defaults),e||{}),this.options.stop_browser_behavior&&i.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),i.event.onTouch(t,i.EVENT_START,function(t){r.enabled&&i.detection.startDetect(r,t)}),this},i.Instance.prototype={on:function(t,e){for(var n=t.split(" "),i=0;n.length>i;i++)this.element.addEventListener(n[i],e,!1);return this},off:function(t,e){for(var n=t.split(" "),i=0;n.length>i;i++)this.element.removeEventListener(n[i],e,!1);return this},trigger:function(t,e){var n=i.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var r=this.element;return i.utils.hasParent(e.target,r)&&(r=e.target),r.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this}};var r=null,o=!1,s=!1;i.event={bindDom:function(t,e,n){for(var i=e.split(" "),r=0;i.length>r;r++)t.addEventListener(i[r],n,!1)},onTouch:function(t,e,n){var a=this;this.bindDom(t,i.EVENT_TYPES[e],function(c){var u=c.type.toLowerCase();if(!u.match(/mouse/)||!s){(u.match(/touch/)||u.match(/pointerdown/)||u.match(/mouse/)&&1===c.which)&&(o=!0),u.match(/touch|pointer/)&&(s=!0);var h=0;o&&(i.HAS_POINTEREVENTS&&e!=i.EVENT_END?h=i.PointerEvent.updatePointer(e,c):u.match(/touch/)?h=c.touches.length:s||(h=u.match(/up/)?0:1),h>0&&e==i.EVENT_END?e=i.EVENT_MOVE:h||(e=i.EVENT_END),h||null===r?r=c:c=r,n.call(i.detection,a.collectEventData(t,e,c)),i.HAS_POINTEREVENTS&&e==i.EVENT_END&&(h=i.PointerEvent.updatePointer(e,c))),h||(r=null,o=!1,s=!1,i.PointerEvent.reset())}})},determineEventTypes:function(){var t;t=i.HAS_POINTEREVENTS?i.PointerEvent.getEvents():i.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],i.EVENT_TYPES[i.EVENT_START]=t[0],i.EVENT_TYPES[i.EVENT_MOVE]=t[1],i.EVENT_TYPES[i.EVENT_END]=t[2]},getTouchList:function(t){return i.HAS_POINTEREVENTS?i.PointerEvent.getTouchList():t.touches?t.touches:[{identifier:1,pageX:t.pageX,pageY:t.pageY,target:t.target}]},collectEventData:function(t,e,n){var r=this.getTouchList(n,e),o=i.POINTER_TOUCH;return(n.type.match(/mouse/)||i.PointerEvent.matchType(i.POINTER_MOUSE,n))&&(o=i.POINTER_MOUSE),{center:i.utils.getCenter(r),timeStamp:(new Date).getTime(),target:n.target,touches:r,eventType:e,pointerType:o,srcEvent:n,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault&&this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return i.detection.stopDetect()}}}},i.PointerEvent={pointers:{},getTouchList:function(){var t=this,e=[];return Object.keys(t.pointers).sort().forEach(function(n){e.push(t.pointers[n])}),e},updatePointer:function(t,e){return t==i.EVENT_END?this.pointers={}:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e),Object.keys(this.pointers).length},matchType:function(t,e){if(!e.pointerType)return!1;var n={};return n[i.POINTER_MOUSE]=e.pointerType==e.MSPOINTER_TYPE_MOUSE||e.pointerType==i.POINTER_MOUSE,n[i.POINTER_TOUCH]=e.pointerType==e.MSPOINTER_TYPE_TOUCH||e.pointerType==i.POINTER_TOUCH,n[i.POINTER_PEN]=e.pointerType==e.MSPOINTER_TYPE_PEN||e.pointerType==i.POINTER_PEN,n[t]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},i.utils={extend:function(t,n,i){for(var r in n)t[r]!==e&&i||(t[r]=n[r]);return t},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){for(var e=[],n=[],i=0,r=t.length;r>i;i++)e.push(t[i].pageX),n.push(t[i].pageY);return{pageX:(Math.min.apply(Math,e)+Math.max.apply(Math,e))/2,pageY:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2}},getVelocity:function(t,e,n){return{x:Math.abs(e/t)||0,y:Math.abs(n/t)||0}},getAngle:function(t,e){var n=e.pageY-t.pageY,i=e.pageX-t.pageX;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,e){var n=Math.abs(t.pageX-e.pageX),r=Math.abs(t.pageY-e.pageY);return n>=r?t.pageX-e.pageX>0?i.DIRECTION_LEFT:i.DIRECTION_RIGHT:t.pageY-e.pageY>0?i.DIRECTION_UP:i.DIRECTION_DOWN},getDistance:function(t,e){var n=e.pageX-t.pageX,i=e.pageY-t.pageY;return Math.sqrt(n*n+i*i)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==i.DIRECTION_UP||t==i.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(t,e){var n,i=["webkit","khtml","moz","ms","o",""];if(e&&t.style){for(var r=0;i.length>r;r++)for(var o in e)e.hasOwnProperty(o)&&(n=o,i[r]&&(n=i[r]+n.substring(0,1).toUpperCase()+n.substring(1)),t.style[n]=e[o]);"none"==e.userSelect&&(t.onselectstart=function(){return!1})}}},i.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:i.utils.extend({},e),lastEvent:!1,name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);for(var e=this.current.inst.options,n=0,r=this.gestures.length;r>n;n++){var o=this.gestures[n];if(!this.stopped&&e[o.name]!==!1&&o.handler.call(o,t,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=t),t.eventType==i.EVENT_END&&!t.touches.length-1&&this.stopDetect(),t}},stopDetect:function(){this.previous=i.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(t){var e=this.current.startEvent;if(e&&(t.touches.length!=e.touches.length||t.touches===e.touches)){e.touches=[];for(var n=0,r=t.touches.length;r>n;n++)e.touches.push(i.utils.extend({},t.touches[n]))}var o=t.timeStamp-e.timeStamp,s=t.center.pageX-e.center.pageX,a=t.center.pageY-e.center.pageY,c=i.utils.getVelocity(o,s,a);return i.utils.extend(t,{deltaTime:o,deltaX:s,deltaY:a,velocityX:c.x,velocityY:c.y,distance:i.utils.getDistance(e.center,t.center),angle:i.utils.getAngle(e.center,t.center),direction:i.utils.getDirection(e.center,t.center),scale:i.utils.getScale(e.touches,t.touches),rotation:i.utils.getRotation(e.touches,t.touches),startEvent:e}),t},register:function(t){var n=t.defaults||{};return n[t.name]===e&&(n[t.name]=!0),i.utils.extend(i.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(t,e){return t.index<e.index?-1:t.index>e.index?1:0}),this.gestures}},i.gestures=i.gestures||{},i.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(t,e){switch(t.eventType){case i.EVENT_START:clearTimeout(this.timer),i.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==i.detection.current.name&&e.trigger("hold",t)},e.options.hold_timeout);break;case i.EVENT_MOVE:t.distance>e.options.hold_threshold&&clearTimeout(this.timer);break;case i.EVENT_END:clearTimeout(this.timer)}}},i.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(t,e){if(t.eventType==i.EVENT_END){var n=i.detection.previous,r=!1;if(t.deltaTime>e.options.tap_max_touchtime||t.distance>e.options.tap_max_distance)return;n&&"tap"==n.name&&t.timeStamp-n.lastEvent.timeStamp<e.options.doubletap_interval&&t.distance<e.options.doubletap_distance&&(e.trigger("doubletap",t),r=!0),(!r||e.options.tap_always)&&(i.detection.current.name="tap",e.trigger(i.detection.current.name,t))}}},i.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.7},handler:function(t,e){if(t.eventType==i.EVENT_END){if(e.options.swipe_max_touches>0&&t.touches.length>e.options.swipe_max_touches)return;(t.velocityX>e.options.swipe_velocity||t.velocityY>e.options.swipe_velocity)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},i.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(t,n){if(i.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),this.triggered=!1,e;if(!(n.options.drag_max_touches>0&&t.touches.length>n.options.drag_max_touches))switch(t.eventType){case i.EVENT_START:this.triggered=!1;break;case i.EVENT_MOVE:if(t.distance<n.options.drag_min_distance&&i.detection.current.name!=this.name)return;i.detection.current.name=this.name,(i.detection.current.lastEvent.drag_locked_to_axis||n.options.drag_lock_to_axis&&n.options.drag_lock_min_distance<=t.distance)&&(t.drag_locked_to_axis=!0);var r=i.detection.current.lastEvent.direction;t.drag_locked_to_axis&&r!==t.direction&&(t.direction=i.utils.isVertical(r)?0>t.deltaY?i.DIRECTION_UP:i.DIRECTION_DOWN:0>t.deltaX?i.DIRECTION_LEFT:i.DIRECTION_RIGHT),this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),n.trigger(this.name+t.direction,t),(n.options.drag_block_vertical&&i.utils.isVertical(t.direction)||n.options.drag_block_horizontal&&!i.utils.isVertical(t.direction))&&t.preventDefault();break;case i.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},i.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(t,n){if(i.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),this.triggered=!1,e;if(!(2>t.touches.length))switch(n.options.transform_always_block&&t.preventDefault(),t.eventType){case i.EVENT_START:this.triggered=!1;break;case i.EVENT_MOVE:var r=Math.abs(1-t.scale),o=Math.abs(t.rotation);if(n.options.transform_min_scale>r&&n.options.transform_min_rotation>o)return;i.detection.current.name=this.name,this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),o>n.options.transform_min_rotation&&n.trigger("rotate",t),r>n.options.transform_min_scale&&(n.trigger("pinch",t),n.trigger("pinch"+(1>t.scale?"in":"out"),t));break;case i.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},i.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(t,n){return n.options.prevent_mouseevents&&t.pointerType==i.POINTER_MOUSE?(t.stopDetect(),e):(n.options.prevent_default&&t.preventDefault(),t.eventType==i.EVENT_START&&n.trigger(this.name,t),e)}},i.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==i.EVENT_END&&e.trigger(this.name,t)}},"object"==typeof module&&"object"==typeof module.exports?module.exports=i:(t.Hammer=i,"function"==typeof t.define&&t.define.amd&&t.define("hammer",[],function(){return i}))})(this);
/*! Superslides - v0.6.2 - 2013-07-10
* https://github.com/nicinabox/superslides
* Copyright (c) 2013 Nic Aitch; Licensed MIT */
(function(window,$){var Superslides,plugin='superslides';Superslides=function(el,options){this.options=$.extend({play:!1,animation_speed:600,animation_easing:'swing',animation:'slide',inherit_width_from:window,inherit_height_from:window,pagination:!0,hashchange:!1,scrollable:!0,elements:{preserve:'.preserve',nav:'.slides-navigation',container:'.slides-container',pagination:'.slides-pagination'}},options);var that=this,$control=$('<div>',{"class":'slides-control'}),multiplier=1;this.$el=$(el);this.$container=this.$el.find(this.options.elements.container);var initialize=function(){multiplier=that._findMultiplier();that.$el.on('click',that.options.elements.nav+" a",function(e){e.preventDefault();that.stop();if($(this).hasClass('next')){that.animate('next',function(){that.start()})}else{that.animate('prev',function(){that.start()})}});$(document).on('keyup',function(e){if(e.keyCode===37){that.animate('prev')}
if(e.keyCode===39){that.animate('next')}});$(window).on('resize',function(){setTimeout(function(){var $children=that.$container.children();that.width=that._findWidth();that.height=that._findHeight();$children.css({width:that.width,left:that.width});that.css.containers();that.css.images()},10)});$(window).on('hashchange',function(){var hash=that._parseHash(),index;if(hash&&!isNaN(hash)){index=that._upcomingSlide(hash-1)}else{index=that._upcomingSlide(hash)}
if(index>=0&&index!==that.current){that.animate(index)}});that.pagination._events();that.start();return that};var css={containers:function(){if(that.init){that.$el.css({height:that.height});that.$control.css({width:that.width*multiplier,left:-that.width});that.$container.css({})}else{$('body').css({margin:0});that.$el.css({position:'relative',overflow:'hidden',width:'100%',height:that.height});that.$control.css({position:'relative',transform:'translate3d(0)',height:'100%',width:that.width*multiplier,left:-that.width});that.$container.css({display:'none',margin:'0',padding:'0',listStyle:'none',position:'relative',height:'100%'})}
if(that.size()===1){that.$el.find(that.options.elements.nav).hide()}},images:function(){var $images=that.$container.find('img').not(that.options.elements.preserve)
$images.removeAttr('width').removeAttr('height').css({"-webkit-backface-visibility":'hidden',"-ms-interpolation-mode":'bicubic',"position":'absolute',"left":'0',"top":'0',"z-index":'-1',"max-width":'none'});$images.each(function(){var image_aspect_ratio=that.image._aspectRatio(this),image=this;if(!$.data(this,'processed')){var img=new Image();img.onload=function(){that.image._scale(image,image_aspect_ratio);that.image._center(image,image_aspect_ratio);$.data(image,'processed',!0)};img.src=this.src}else{that.image._scale(image,image_aspect_ratio);that.image._center(image,image_aspect_ratio)}})},children:function(){var $children=that.$container.children();if($children.is('img')){$children.each(function(){if($(this).is('img')){$(this).wrap('<div>');var id=$(this).attr('id');$(this).removeAttr('id');$(this).parent().attr('id',id)}});$children=that.$container.children()}
if(!that.init){$children.css({display:'none',left:that.width*2})}
$children.css({position:'absolute',overflow:'hidden',height:'100%',width:that.width,top:0,zIndex:0})}}
var fx={slide:function(orientation,complete){var $children=that.$container.children(),$target=$children.eq(orientation.upcoming_slide);$target.css({left:orientation.upcoming_position,display:'block'});that.$control.animate({left:orientation.offset},that.options.animation_speed,that.options.animation_easing,function(){if(that.size()>1){that.$control.css({left:-that.width});$children.eq(orientation.upcoming_slide).css({left:that.width,zIndex:2});if(orientation.outgoing_slide>=0){$children.eq(orientation.outgoing_slide).css({left:that.width,display:'none',zIndex:0})}}
complete()})},fade:function(orientation,complete){var that=this,$children=that.$container.children(),$outgoing=$children.eq(orientation.outgoing_slide),$target=$children.eq(orientation.upcoming_slide);$target.css({left:this.width,opacity:1,display:'block'});if(orientation.outgoing_slide>=0){$outgoing.animate({opacity:0},that.options.animation_speed,that.options.animation_easing,function(){if(that.size()>1){$children.eq(orientation.upcoming_slide).css({zIndex:2});if(orientation.outgoing_slide>=0){$children.eq(orientation.outgoing_slide).css({opacity:1,display:'none',zIndex:0})}}
complete()})}else{$target.css({zIndex:2});complete()}}};fx=$.extend(fx,$.fn.superslides.fx);var image={_centerY:function(image){var $img=$(image);$img.css({top:(that.height-$img.height())/2})},_centerX:function(image){var $img=$(image);$img.css({left:(that.width-$img.width())/2})},_center:function(image){that.image._centerX(image);that.image._centerY(image)},_aspectRatio:function(image){if(!image.naturalHeight&&!image.naturalWidth){var img=new Image();img.src=image.src;image.naturalHeight=img.height;image.naturalWidth=img.width}
return image.naturalHeight/image.naturalWidth},_scale:function(image,image_aspect_ratio){image_aspect_ratio=image_aspect_ratio||that.image._aspectRatio(image);var container_aspect_ratio=that.height/that.width,$img=$(image);if(container_aspect_ratio>image_aspect_ratio){$img.css({height:that.height,width:that.height/image_aspect_ratio})}else{$img.css({height:that.width*image_aspect_ratio,width:that.width})}}};var pagination={_setCurrent:function(i){if(!that.$pagination){return}
var $pagination_children=that.$pagination.children();$pagination_children.removeClass('current');$pagination_children.eq(i).addClass('current')},_addItem:function(i){var slide_number=i+1,href=slide_number,$slide=that.$container.children().eq(i),slide_id=$slide.attr('id');if(slide_id){href=slide_id}
var $item=$("<a>",{'href':"#"+href,'text':href});$item.appendTo(that.$pagination)},_setup:function(){if(!that.options.pagination||that.size()===1){return}
var $pagination=$("<nav>",{'class':that.options.elements.pagination.replace(/^\./,'')});that.$pagination=$pagination.appendTo(that.$el);for(var i=0;i<that.size();i++){that.pagination._addItem(i)}},_events:function(){that.$el.on('click',that.options.elements.pagination+' a',function(e){e.preventDefault();var hash=that._parseHash(this.hash),index=that._upcomingSlide(hash-1);if(index!==that.current){that.animate(index,function(){that.start()})}})}};this.css=css;this.image=image;this.pagination=pagination;this.fx=fx;this.animation=this.fx[this.options.animation];this.$control=this.$container.wrap($control).parent('.slides-control');that._findPositions();that.width=that._findWidth();that.height=that._findHeight();this.css.children();this.css.containers();this.css.images();this.pagination._setup();return initialize()};Superslides.prototype={_findWidth:function(){return $(this.options.inherit_width_from).width()},_findHeight:function(){return $(this.options.inherit_height_from).height()},_findMultiplier:function(){return this.size()===1?1:3},_upcomingSlide:function(direction){if((/next/).test(direction)){return this._nextInDom()}else if((/prev/).test(direction)){return this._prevInDom()}else if((/\d/).test(direction)){return+direction}else if(direction&&(/\w/).test(direction)){var index=this._findSlideById(direction);if(index>=0){return index}else{return 0}}else{return 0}},_findSlideById:function(id){return this.$container.find('#'+id).index()},_findPositions:function(current,thisRef){thisRef=thisRef||this;if(current===undefined){current=-1}
thisRef.current=current;thisRef.next=thisRef._nextInDom();thisRef.prev=thisRef._prevInDom()},_nextInDom:function(){var index=this.current+1;if(index===this.size()){index=0}
return index},_prevInDom:function(){var index=this.current-1;if(index<0){index=this.size()-1}
return index},_parseHash:function(hash){hash=hash||window.location.hash;hash=hash.replace(/^#/,'');if(hash&&!isNaN(+hash)){hash=+hash}
return hash},size:function(){return this.$container.children().length},destroy:function(){return this.$el.removeData()},update:function(){this.css.children();this.css.containers();this.css.images();this.pagination._addItem(this.size())
this._findPositions(this.current);this.$el.trigger('updated.slides')},stop:function(){clearInterval(this.play_id);delete this.play_id;this.$el.trigger('stopped.slides')},start:function(){var that=this;if(that.options.hashchange){$(window).trigger('hashchange')}else{this.animate()}
if(this.options.play){if(this.play_id){this.stop()}
this.play_id=setInterval(function(){that.animate()},this.options.play)}
this.$el.trigger('started.slides')},animate:function(direction,userCallback){var that=this,orientation={};if(this.animating){return}
this.animating=!0;if(direction===undefined){direction='next'}
orientation.upcoming_slide=this._upcomingSlide(direction);if(orientation.upcoming_slide>=this.size()){return}
orientation.outgoing_slide=this.current;orientation.upcoming_position=this.width*2;orientation.offset=-orientation.upcoming_position;if(direction==='prev'||direction<orientation.outgoing_slide){orientation.upcoming_position=0;orientation.offset=0}
if(that.size()>1){that.pagination._setCurrent(orientation.upcoming_slide)}
if(that.options.hashchange){var hash=orientation.upcoming_slide+1,id=that.$container.children(':eq('+orientation.upcoming_slide+')').attr('id');if(id){window.location.hash=id}else{window.location.hash=hash}}
that.$el.trigger('animating.slides',[orientation]);that.animation(orientation,function(){that._findPositions(orientation.upcoming_slide,that);if(typeof userCallback==='function'){userCallback()}
that.animating=!1;that.$el.trigger('animated.slides');if(!that.init){that.$el.trigger('init.slides');that.init=!0;that.$container.fadeIn('fast')}})}};$.fn[plugin]=function(option,args){var result=[];this.each(function(){var $this,data,options;$this=$(this);data=$this.data(plugin);options=typeof option==='object'&&option;if(!data){result=$this.data(plugin,(data=new Superslides(this,options)))}
if(typeof option==="string"){result=data[option];if(typeof result==='function'){return result=result.call(data,args)}}});return result};$.fn[plugin].fx={}})(this,jQuery)