document.getElementById("menu-toggle").addEventListener('click', first);
(function(window, document, undefined){
  window.onload = init;
  function init(){
    $('ul.nav li.dropdown').hover(function() {
      $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
    }, function() {
      $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
    });
    var url=window.location.href;

    url=url.replace(/^.*:\/\//i, '');
    try{document.getElementById(url.replace(/www./,'')).className = "active";}catch(e){}
    try{document.getElementById("bc_"+url.replace(/www./,'')).className = "active";}catch(e){}

  }

})(window, document, undefined);
var sizes =[
[],
["1 Bedroom","2 Bedroom","3 Bedroom +"],
["1 Bedroom","2 Bedroom","3 Bedroom +"],
["0-300 sqm","301-1000 sqm","1000 sqm +"]
];
var typess =[
[],
["Pre-Purchase Building Inspection","Pre-Auction Building Inspection","Pre-Sale Building Inspection","Pest & Termite Inspection","Asbestos Inspection","Building & Pest Inspection","Dilapidation Inspection","New Building Inspection - Completion Stage"],
["Pre-Purchase Building Inspection","Pre-Auction Building Inspection","Pre-Sale Building Inspection","Pest & Termite Inspection","Asbestos Inspection","Building & Pest Inspection","Dilapidation Inspection","Owner Buildin Inspection 137B","New Building Inspection - Slab Stage","New Building Inspection - Frame Stage","New Building Inspection - Lockup Stage","New Building Inspection - Completion Stage"],
["Pre-Purchase Building Inspection","Pre-Auction Building Inspection","Pre-Sale Building Inspection","Pest & Termite Inspection","Asbestos Inspection","Building & Pest Inspection","Dilapidation Inspection","New Building Inspection - Slab Stage","New Building Inspection - Frame Stage","New Building Inspection - Lockup Stage","New Building Inspection - Completion Stage"]
];
var idss =[
[],
["1","3","2","5","4","6","7","12"],
["1","3","2","5","4","6","7","8","9","10","11","12"],
["1","3","2","5","4","6","7","9","10","11","12"]
];
var csselects=[];
function setDropDown(e,array) {
  alert(e.value);
};			
$('#search-location').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-id').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location').classList.remove("search-input-indicator");
}
});
$('#search-location-00').autocomplete({
 serviceUrl: '/dresources/searchAddress?p=suburb',
 onSelect: function (suggestion) {
   location.href=suggestion.data;
 } 
});
$('#search-location-1').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-1').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-1').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-1').classList.remove("search-input-indicator");
}
});

$('#search-location-2').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-2').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-2').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-2').classList.remove("search-input-indicator");
}
});

$('#search-location-3').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-3').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-3').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-3').classList.remove("search-input-indicator");
}
});

$('#search-location-4').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-4').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-4').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-4').classList.remove("search-input-indicator");
}
});

$('#search-location-5').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-5').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-5').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-5').classList.remove("search-input-indicator");
}
});
$('#search-location-6').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-6').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-6').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-6').classList.remove("search-input-indicator");
}
});
$('#search-location-7').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-7').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-7').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-7').classList.remove("search-input-indicator");
}
});
$('#search-location-8').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-8').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-8').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-8').classList.remove("search-input-indicator");
}
});
$('#search-location-9').autocomplete({
 serviceUrl: '/dresources/searchAddress',
 onSelect: function (suggestion) {
   document.getElementById('address-9').value= suggestion.data;
 } ,
 onSearchStart: function( s) {
  document.getElementById('search-location-9').classList.add("search-input-indicator");
},
onSearchComplete: function (query, suggestions) {
  document.getElementById('search-location-9').classList.remove("search-input-indicator");
}
});
(function() {
  [].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach( function(el) {	
   csselects[el.id]=new SelectFx(el,{
    onChange: function() {
      var elid=el.id;
      if(elid==1){
       var nextElement=document.getElementById('2');
       nextElement.innerHTML="";
       var array=sizes[el.value];
       for (i = 1; i < array.length+1; i++) { 
        nextElement.innerHTML=nextElement.innerHTML+'<option value="'+i+'">'+array[i-1]+'</option>';
      }
      csselects[2]._ReinitEvents();

      var nextElement2=document.getElementById('3');
      nextElement2.innerHTML="";
      var array2= typess[el.value]; idss
      var array3= idss[el.value];
      for (i = 1; i < array2.length+1; i++) { 
       nextElement2.innerHTML=nextElement2.innerHTML+'<option value="'+array3[i-1]+'">'+array2[i-1]+'</option>';
     }
     csselects[3]._ReinitEvents();
     Link.getPrice(document.getElementById('ins_price'),1,1,1,'tariff');
   }
   else  if(elid==2){
    Link.getPrice(document.getElementById('ins_price'),document.getElementById('1').value,document.getElementById('2').value,document.getElementById('3').value,'tariff');
  } else  if(elid==3){
    Link.getPrice(document.getElementById('ins_price'),document.getElementById('1').value,document.getElementById('2').value,document.getElementById('3').value,'tariff');
  }
}
});
 } );
})();

$('#search-location-00').autocomplete({
 serviceUrl: '/dresources/searchAddress?p=suburb',
 onSelect: function (suggestion) {
  window.location.href = suggestion.data;
}
});
$( "#start-date" ).datepicker({
  dateFormat: 'yy-mm-dd'
});
$( "#end-date" ).datepicker({
  dateFormat: 'yy/mm/dd'
});
$("#exdate").datepicker( {
  changeMonth: true,
  changeYear: true,
  showButtonPanel: true,
  dateFormat: 'MM yy',
  onClose: function(dateText, inst) { 
    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
    $(this).datepicker('setDate', new Date(year, month, 1));
  }
});

$(document).ready(function () {
    //Initialize tooltips
    $('.nav-tabs > li a[title]').tooltip();
    //Wizard
    $('a[data-toggle="tab"]').on('show.bs.tab', function (e) {

      var $target = $(e.target);
      
      if ($target.parent().hasClass('disabled')) {
        return false;
      }

    });

    $(".next-step").click(function (e) {
      var targetID=e.target.id;
      if(targetID=='step1'){
        try{
          var tt=parseInt(document.getElementById('tariff').value);
          if(tt<1){
            document.getElementById('errModalText').innerText='Please select your inspection details.';
            $('#errModal').modal('show');
            return;
          }
        }catch(e){
          document.getElementById('errModalText').innerText='Please select your inspection details.';
          $('#errModal').modal('show');
          return;
        }

        if(! (document.getElementById('address-1').value.indexOf("GA")>=0)){
          document.getElementById('errModalText').innerText='Sorry, we could not seem to find that address! Just check you input the right location and try again.';
          $('#errModal').modal('show');
          return;
        }
        document.getElementById('btype-lable-1').innerText=document.getElementById("1").options[document.getElementById("1").selectedIndex].text;
        document.getElementById('bsize-lable-1').innerText=document.getElementById("2").options[document.getElementById("2").selectedIndex].text;
        document.getElementById('itype-lable-1').innerText=document.getElementById("3").options[document.getElementById("3").selectedIndex].text;
        document.getElementById('address-lable-1').innerText=document.getElementById("search-location-1").value;
        document.getElementById('price-lable-1').innerText=document.getElementById("ins_price").value;
        document.getElementById('btype-lable-2').innerText=document.getElementById("1").options[document.getElementById("1").selectedIndex].text;
        document.getElementById('bsize-lable-2').innerText=document.getElementById("2").options[document.getElementById("2").selectedIndex].text;
        document.getElementById('itype-lable-2').innerText=document.getElementById("3").options[document.getElementById("3").selectedIndex].text;
        document.getElementById('address-lable-2').innerText=document.getElementById("search-location-1").value;
        document.getElementById('price-lable-2').innerText=document.getElementById("ins_price").value;
        document.getElementById('btype-lable-3').innerText=document.getElementById("1").options[document.getElementById("1").selectedIndex].text;
        document.getElementById('bsize-lable-3').innerText=document.getElementById("2").options[document.getElementById("2").selectedIndex].text;
        document.getElementById('itype-lable-3').innerText=document.getElementById("3").options[document.getElementById("3").selectedIndex].text;
        document.getElementById('address-lable-3').innerText=document.getElementById("search-location-1").value;
        document.getElementById('price-lable-3').innerText=document.getElementById("ins_price").value;
        document.getElementById('final-price').innerText='$'+parseInt((parseFloat(document.getElementById("ins_price").value.replace('$',''))*1.1))+'.00';
      }else if(targetID=='step2'){
        var regEx = /^\d{4}-\d{2}-\d{2}$/;
        if(document.getElementById('start-date').value.match(regEx)==null){
          document.getElementById('errModalText').innerText='Please select the date of your inspection';
          $('#errModal').modal('show');
          return ;
        }
        var regEx2 = "([01]?[0-9]|2[0-3]):[0-5][0-9]";
        var tim=document.getElementById('timee').value;
        if(tim.match(regEx2)==null){
          document.getElementById('errModalText').innerText='Please select the time of your inspection';
          $('#errModal').modal('show');
          return;
        }
        document.getElementById('time-lable-2').innerText=document.getElementById("timee").options[document.getElementById("timee").selectedIndex].text;
        document.getElementById('date-lable-2').innerText=document.getElementById("start-date").value;
        document.getElementById('time-lable-3').innerText=document.getElementById("timee").options[document.getElementById("timee").selectedIndex].text;
        document.getElementById('date-lable-3').innerText=document.getElementById("start-date").value;
      }else if(targetID=='step3'){
        var valid=true;
        var InnerMess="Double Check your following information<br><ul>";
        if(!(document.getElementById("online-booking").elements.namedItem('mobile').value.match("^04[0-9]{8}"))){
          valid=false;
          InnerMess+="<li>Mobile</li>";
        }if(!(document.getElementById("online-booking").elements.namedItem('email').value.match("(.+)@(.+){2,}\.(.+){2,}"))){
          valid=false;
          InnerMess+="<li>Email</li>";
        } if(document.getElementById("online-booking").elements.namedItem('paddress').value.match("^\s*$")){
          valid=false;
          InnerMess+="<li>Postal Address</li>";
        }if(document.getElementById("online-booking").elements.namedItem('name').value.match("^\s*$")){
          valid=false;
          InnerMess+="<li>Name</li>";
        }if(document.getElementById("online-booking").elements.namedItem('lname').value.match("^\s*$")){
          valid=false;
          InnerMess+="<li>Last Name</li>";
        }
        if(!valid){
          InnerMess+="</ul>";
          document.getElementById('errModalText').innerHTML=InnerMess;
          $('#errModal').modal('show');
          return;
        }
        document.getElementById("ins-name").innerText= document.getElementById("online-booking").elements.namedItem("name").value+"  "+document.getElementById("online-booking").elements.namedItem("lname").value;
        document.getElementById("ins-email").innerText= document.getElementById("online-booking").elements.namedItem("email").value;
        document.getElementById("ins-mobile").innerText= document.getElementById("online-booking").elements.namedItem("mobile").value;
        document.getElementById("ins-madrs").innerText= document.getElementById("online-booking").elements.namedItem("paddress").value;
        var lfckv = document.getElementById("attend").checked;
        if(lfckv){
          document.getElementById("ins-aname").innerText= document.getElementById("agname").value;
          document.getElementById("ins-ayname").innerText= document.getElementById("agncname").value;
          document.getElementById("ins-amobile").innerText= document.getElementById("agmobile").value;
          document.getElementById("ins-aemail").innerText= document.getElementById("agemail").value;
          document.getElementById('ag-info').style.display = 'block';
        }else{
          document.getElementById('ag-info').style.display = 'none';
        }
      }else if(targetID=='step4'){
//alert('step4 Validation');
}else if(targetID=='step5'){

}
var $active = $('.wizard .nav-tabs li.active');
$active.next().removeClass('disabled');
nextTab($active);

});
$(".prev-step").click(function (e) {

  var $active = $('.wizard .nav-tabs li.active');
  prevTab($active);

});
});
try{Link.getPrice(document.getElementById('ins_price'),document.getElementById('1').value,document.getElementById('2').value,document.getElementById('3').value,'tariff');
}catch(e){};
function nextTab(elem) {
  $(elem).next().find('a[data-toggle="tab"]').click();
}
function prevTab(elem) {
  $(elem).prev().find('a[data-toggle="tab"]').click();
}
function validate() {
  if(document.getElementById('visa').checked){
    var crd=document.getElementById('cnumber').value;
    var visaRegEx = /^(?:4[0-9]{12}(?:[0-9]{3})?)$/;
    if(crd.match(visaRegEx)==null){
      document.getElementById('errModalText').innerText='Please enter a valid VisaCard number.';
      $('#errModal').modal('show');
      return;
    }
  }else if(document.getElementById('mastercard').checked){
    var crd=document.getElementById('cnumber').value;
    var mastercardRegEx = /^(?:5[1-5][0-9]{14})$/;
    if(crd.match(mastercardRegEx)==null){
      document.getElementById('errModalText').innerText='Please enter a valid MasterCard number.';
      $('#errModal').modal('show');
      return false;
    }
  }
  if(document.getElementById('mastercard').checked || document.getElementById('visa').checked){
    var sec=document.getElementById('sec').value;
    var secRegEx = /^[0-9]{3,4}$/;
    if(sec.match(secRegEx)==null){
      document.getElementById('errModalText').innerText='Please enter a valid CVV security code.';
      $('#errModal').modal('show');
      return false;
    }
    var cname=document.getElementById('cname').value;
    var nameRegex=/^\s*$/;
    if(cname.match(nameRegex)==null){
      document.getElementById('errModalText').innerText='Please enter the name on the card.';
      $('#errModal').modal('show');
      return false;
    }
  }
  return true;
}

// dropdown caret
$(function(){
  $('ul.navbar-nav li.dropdown > a').after("<span class='caret dropdown-toggle' data-toggle='dropdown' style='margin-right:13px;'></span>");
});

// change online book button in md size
$(function(){
  if(window.innerWidth>991 && window.innerWidth<1200){
    $('input.seo-btn').val('BOOKING');
  }
});


$(".hover").mouseleave(
  function() {
    $(this).removeClass("hover");
  }
);

(function($) {
    $(function() {
        var jcarousel = $('.jcarousel');

        jcarousel
            .on('jcarousel:reload jcarousel:create', function () {
                var carousel = $(this),
                    width = carousel.innerWidth();

                if (width >=1100) {
                    width = width / 4.3;
                } else if (width >= 768) {
                    width = width / 3.2;
                } else if (width >= 500) {
                    width = width / 2.1;
                }

                carousel.jcarousel('items').css('width', Math.ceil(width) + 'px');
            })
            .jcarousel({
                wrap: 'circular'
            });

        $('.jcarousel-control-prev')
            .jcarouselControl({
                target: '-=1'
            });

        $('.jcarousel-control-next')
            .jcarouselControl({
                target: '+=1'
            });

        $('.jcarousel-pagination')
            .on('jcarouselpagination:active', 'a', function() {
                $(this).addClass('active');
            })
            .on('jcarouselpagination:inactive', 'a', function() {
                $(this).removeClass('active');
            })
            .on('click', function(e) {
                e.preventDefault();
            })
            .jcarouselPagination({
                perPage: 1,
                item: function(page) {
                    return '<a href="#' + page + '">' + page + '</a>';
                }
            });
    });
})(jQuery);

    function first(e){		
	var tg=e.target.getAttribute('hasToggle');		

	if(tg=='bars'){		
	         $("#menu-cross").css("display", "block");
                  $("#menu-bars").css("display", "none");
                    $("#menu-toggle").attr('hasToggle','cross');	
	}else if(tg=='cross') {		
                $("#menu-cross").css("display", "none");
                $("#menu-bars").css("display", "block");
$("#menu-toggle").attr('hasToggle','bars');		
	}
};

//MAIN HERO SLIDER
	(function( $ ) {

    //Function to animate slider captions 
    function doAnimations( elems ) {
        //Cache the animationend event in a variable
        var animEndEv = 'webkitAnimationEnd animationend';
        
        elems.each(function () {
            var $this = $(this),
                $animationType = $this.data('animation');
            $this.addClass($animationType).one(animEndEv, function () {
                $this.removeClass($animationType);
            });
        });
    }
    
    //Variables on page load 
    var $myCarousel = $('#carouselIndicators'),
        $firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']");
        
    //Initialize carousel 
    $myCarousel.carousel();
    
    //Animate captions in first slide on page load 
    doAnimations($firstAnimatingElems);
    
    //Pause carousel  
    $myCarousel.carousel('pause');
    
    //Other slides to be animated on carousel slide event 
    $myCarousel.on('slide.bs.carousel', function (e) {
        var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']");
        doAnimations($animatingElems);
    });  
    
})(jQuery);


//TEST SURURB LIST
$(function() {
    var _alphabets = $('.alphabet > a');
    var _contentRows = $('#countries-table tbody tr');
    _alphabets.click(function() {
        var _letter = $(this),
            _text = $(this).text(),
            _count = 0;
        _alphabets.removeClass("active");
        _letter.addClass("active");
        _contentRows.hide();
        _contentRows.each(function(i) {
            var _cellText = $(this).children('td').eq(0).text();
            if (RegExp('^' + _text).test(_cellText)) {
                _count += 1;
                $(this).fadeIn(400)
            }
        })
    })
});

(function(){
    var isTouch = false //var to indicate current input type (is touch versus no touch) 
    var isTouchTimer 
    var curRootClass = '' //var indicating current document root class ("can-touch" or "")
     
    function addtouchclass(e){
        clearTimeout(isTouchTimer)
        isTouch = true
        if (curRootClass != 'can-touch'){ //add "can-touch' class if it's not already present
            curRootClass = 'can-touch'
            document.documentElement.classList.add(curRootClass)
        }
        isTouchTimer = setTimeout(function(){isTouch = false}, 500) //maintain "istouch" state for 500ms so removetouchclass doesn't get fired immediately following a touch event
    }
     
    function removetouchclass(e){
        if (!isTouch && curRootClass == 'can-touch'){ //remove 'can-touch' class if not triggered by a touch event and class is present
            isTouch = false
            curRootClass = ''
            document.documentElement.classList.remove('can-touch')
        }
    }
     
    document.addEventListener('touchstart', addtouchclass, false) //this event only gets called when input type is touch
    document.addEventListener('mouseover', removetouchclass, false) //this event gets called when input type is everything from touch to mouse/ trackpad
})();

//ANIMATION ON SCROLL
! function(a) {
    function t() {
        d = !1;
        for (var t = 0; t < i.length; t++) {
            var n = a(i[t]).filter(function() {
                return a(this).is(":appeared")
            });
            if (n.trigger("appear", [n]), e) {
                var r = e.not(n);
                r.trigger("disappear", [r])
            }
            e = n
        }
    }
    var e, i = [],
        n = !1,
        d = !1,
        r = {
            interval: 250,
            force_process: !1
        },
        o = a(window);
    a.expr[":"].appeared = function(t) {
        var e = a(t);
        if (!e.is(":visible")) return !1;
        var i = o.scrollLeft(),
            n = o.scrollTop(),
            d = e.offset(),
            r = d.left,
            s = d.top;
        return s + e.height() >= n && s - (e.data("appear-top-offset") || 0) <= n + o.height() && r + e.width() >= i && r - (e.data("appear-left-offset") || 0) <= i + o.width() ? !0 : !1
    }, a.fn.extend({
        appear: function(e) {
            var o = a.extend({}, r, e || {}),
                s = this.selector || this;
            if (!n) {
                var f = function() {
                    d || (d = !0, setTimeout(t, o.interval))
                };
                a(window).scroll(f).resize(f), n = !0
            }
            return o.force_process && setTimeout(t, o.interval), i.push(s), a(s)
        }
    }), a.extend({
        force_appear: function() {
            return n ? (t(), !0) : !1
        }
    })
}(jQuery),
function(a) {
    "$:nomunge";

    function t(t) {
        function i() {
            t ? r.removeData(t) : c && delete e[c]
        }

        function d() {
            s.id = setTimeout(function() {
                s.fn()
            }, p)
        }
        var r, o = this,
            s = {},
            f = t ? a.fn : a,
            l = arguments,
            u = 4,
            c = l[1],
            p = l[2],
            $ = l[3];
        if ("string" != typeof c && (u--, c = t = 0, p = l[1], $ = l[2]), t ? (r = o.eq(0), r.data(t, s = r.data(t) || {})) : c && (s = e[c] || (e[c] = {})), s.id && clearTimeout(s.id), delete s.id, $) s.fn = function(a) {
            "string" == typeof $ && ($ = f[$]), $.apply(o, n.call(l, u)) !== !0 || a ? i() : d()
        }, d();
        else {
            if (s.fn) return void 0 === p ? i() : s.fn(p === !1), !0;
            i()
        }
    }
    var e = {},
        i = "doTimeout",
        n = Array.prototype.slice;
    a[i] = function() {
        return t.apply(window, [0].concat(n.call(arguments)))
    }, a.fn[i] = function() {
        var a = n.call(arguments),
            e = t.apply(this, [i + a[0]].concat(a));
        return "number" == typeof a[0] || "number" == typeof a[1] ? this : e
    }
}(jQuery), $(".animatedParent").appear(), $(".animatedClick").click(function() {
    var a = $(this).attr("data-target");
    if (void 0 != $(this).attr("data-sequence")) {
        var t = $("." + a + ":first").attr("data-id"),
            e = $("." + a + ":last").attr("data-id"),
            i = t;
        $("." + a + "[data-id=" + i + "]").hasClass("go") ? ($("." + a + "[data-id=" + i + "]").addClass("goAway"), $("." + a + "[data-id=" + i + "]").removeClass("go")) : ($("." + a + "[data-id=" + i + "]").addClass("go"), $("." + a + "[data-id=" + i + "]").removeClass("goAway")), i++, delay = Number($(this).attr("data-sequence")), $.doTimeout(delay, function() {
            return console.log(e), $("." + a + "[data-id=" + i + "]").hasClass("go") ? ($("." + a + "[data-id=" + i + "]").addClass("goAway"), $("." + a + "[data-id=" + i + "]").removeClass("go")) : ($("." + a + "[data-id=" + i + "]").addClass("go"), $("." + a + "[data-id=" + i + "]").removeClass("goAway")), ++i, e >= i ? !0 : void 0
        })
    } else $("." + a).hasClass("go") ? ($("." + a).addClass("goAway"), $("." + a).removeClass("go")) : ($("." + a).addClass("go"), $("." + a).removeClass("goAway"))
}), $(document.body).on("appear", ".animatedParent", function(a, t) {
    var e = $(this).find(".animated"),
        i = $(this);
    if (void 0 != i.attr("data-sequence")) {
        var n = $(this).find(".animated:first").attr("data-id"),
            d = n,
            r = $(this).find(".animated:last").attr("data-id");
        $(i).find(".animated[data-id=" + d + "]").addClass("go"), d++, delay = Number(i.attr("data-sequence")), $.doTimeout(delay, function() {
            return $(i).find(".animated[data-id=" + d + "]").addClass("go"), ++d, r >= d ? !0 : void 0
        })
    } else e.addClass("go")
}), $(document.body).on("disappear", ".animatedParent", function(a, t) {
    $(this).hasClass("animateOnce") || $(this).find(".animated").removeClass("go")
}), $(window).on("load", function() {
    $.force_appear()
});