$('.inner-page-main-content a[data-sharer]').attr('data-url', window.location.href);
if ($('#test-swipe-event').length || $('.test-swipe-event').length) {
var hammertime = new Hammer(document.getElementById('test-swipe-event'));
hammertime.on('swipeleft swiperight', function(ev) {
if (ev.type === 'swipeleft') {
if ($('.team-section-item.team-section-item__is-active').next().length) {
$('.team-section-item.team-section-item__is-active').next().click();
} else {
$('.team-section-item').first().click();
}
} else if (ev.type === 'swiperight') {
if ($('.team-section-item.team-section-item__is-active').prev().length) {
$('.team-section-item.team-section-item__is-active').prev().click();
} else {
$('.team-section-item').last().click();
}
}
});
};
if ($('.team-section-item').length) {
$('.team-section-item').on('click', function (e) {
e.preventDefault();
if ($(this).hasClass('team-section-item__is-active')) {
return false;
};
$('.team-pagination__dot').removeClass('team-pagination__dot--active');
$('.team-pagination__dot').eq($(this).index()).addClass('team-pagination__dot--active');
const shortText = $('.js-user-short-text', this).text();
const name = $('.team-section-item__name', this).text();
const photo = $('.team-section-item__photo img', this).attr('src');
const link = $('a', this).attr('href');
$('.team-section-item').removeClass('team-section-item__is-active');
$(this).addClass('team-section-item__is-active');
$('.team-section-active-item__short-text').text(shortText);
$('.team-section-active-item__name').text(name);
$('.team-section-active-item__name').parent().attr('href', link);
$('.team-section-item__read-more').attr('href', link);
$('#team-section-btn').attr('href', `/about-us#${link.split('/')[2]}`);
$('.the-team-section .animate-text-container').removeClass('inUp');
$('.team-section-active-item__photo img').css('opacity', 0);
setTimeout(() => {
$('.team-section-active-item__photo img').attr('src', photo);
}, 230);
setTimeout(() => {
$('.team-section-active-item__photo img').css('opacity', 1);
}, 400);
setTimeout(() => {
$('.the-team-section .animate-text-container').addClass('inUp');
}, 100);
});
$('.team-section-item').first().click();
};
$(window).on('load', function () {
setTimeout(() => {
let offset = 90;
if (window.innerWidth < 768) {
offset = 60;
};
$('.team-section-item a').each(function () {
if ($(this).attr('href').indexOf(window.location.href.split('#')[1]) !== -1) {
$(this).parent().click();
scrollTo('.the-team-section-copy', offset);
}
});
}, 300);
});
$(document).on('scroll', function () {
let pos = window.pageYOffset;
let calc = 1.2 - (pos / 2000);
let car = 10 + (window.pageYOffset / 100);
if (calc < 1) {
calc = 1
};
$('.zoom-out-on-scroll-image').css({
'transform': `scale(${calc})`
});
let foo1Down = 1 * (window.pageYOffset / 50) - 100;
let foo1Up = 1 * (window.pageYOffset / 50) + 100;
$('.scroll-down-img').css({
'transform': `translateY(${foo1Down}px)`,
'transition': 'all 3s'
});
$('.scroll-up-img').css({
'transform': `translateY(-${foo1Up}px)`,
'transition': 'all 3s'
});
if (document.querySelector('.tabs-section img')) {
let foo = percentageSeen(document.querySelector('.tabs-section img'));
$('.tabs-section img').css({
'transform': `translate3d(0px, ${foo}px, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg)`
});
}
});
let scaleAmount = 0.070;
function scrollZoom() {
const images = document.querySelectorAll(".zoom-on-scroll-image");
let scrollPosY = 0;
scaleAmount = scaleAmount / 100;
const observerConfig = {
rootMargin: "0% 0% 0% 0%",
threshold: 0
};
images.forEach(image => {
let isVisible = false;
const observer = new IntersectionObserver((elements, self) => {
elements.forEach(element => {
isVisible = element.isIntersecting;
});
}, observerConfig);
observer.observe(image);
image.style.transform = `scale(${1 + scaleAmount * percentageSeen(image)})`;
window.addEventListener("scroll", () => {
if (isVisible) {
scrollPosY = window.pageYOffset;
image.style.transform = `scale(${1 +
scaleAmount * percentageSeen(image)})`;
}
});
});
};
let foo = {};
$(window).on('scroll', function () {
let headerHeight = $('.top-navigation.hero-section--sticky').outerHeight();
$('[slg-nav-color="white"]').each(function (index) {
let elPos = $(this).offset().top;
foo['item-' + index] = ($(document).scrollTop() >= elPos) && ($(document).scrollTop() < (elPos + $(this).outerHeight()));
});
let check = false;
$.each(foo, function(index, value) {
if (value) {
check = true;
}
});
if (check) {
$('.top-navigation.hero-section--sticky').addClass('top-navigation--white');
if (window.innerWidth >= 768) {
$('.top-navigation.hero-section--sticky a.link-block svg').css({
'fill': '#000'
});
}
} else {
$('.top-navigation.hero-section--sticky').removeClass('top-navigation--white');
$('.top-navigation.hero-section--sticky a.link-block svg').css({
'fill': ''
});
}
});
function percentageSeen(element) {
const parent = element.parentNode;
const viewportHeight = window.innerHeight;
const scrollY = window.scrollY;
const elPosY = parent.getBoundingClientRect().top + scrollY;
const borderHeight = parseFloat(getComputedStyle(parent).getPropertyValue('border-bottom-width')) + parseFloat(getComputedStyle(element).getPropertyValue('border-top-width'));
const elHeight = parent.offsetHeight + borderHeight;
if (elPosY > scrollY + viewportHeight) {
return 0;
} else if (elPosY + elHeight < scrollY) {
return 100;
} else {
const distance = scrollY + viewportHeight - elPosY;
let percentage = distance / ((viewportHeight + elHeight) / 100);
percentage = Math.round(percentage);
return percentage;
}
};
scrollZoom();
fixProductCardsHeight();
function fixProductCardsHeight() {
$('.products .w-dyn-list').each(function () {
$(".card", $(this)).css('height', '');
let max = Math.max.apply(Math, $(".card", $(this)).map(function() { return $(this).height(); }));
$(".card", $(this)).css('height', max + 'px');
});
};
function fix_fullsizeHeroContent() {
if (window.innerWidth < 991) {
$('.fullsize-hero-content').css({
'bottom': '-' + window.innerHeight + 'px',
'transform': 'translateY(-100%)'
});
} else {
$('.fullsize-hero-content').css({
'bottom': '0',
'transform': 'none'
});
}
};
/*fix_fullsizeHeroContent();*/
$(window).on('resize', function () {
fixProductCardsHeight();
});
let tabsWidthSum = 0;
let tabsWidthSum3 = 0;
let tabsWidthSum4 = 0;
/*$('.tabs-section__nav').css('width', '1000px');*/
if (window.innerWidth < 540) {
fixBlogFilterButtons();
};
$(window).on('resize', function () {
fixBlogFilterButtons();
});
function fixBlogFilterButtons() {
let tabsWidthSum2 = 0;
if (window.innerWidth < 540) {
$('.blog-posts-filters').css('width', '1000px');
$(".blog-posts-filters a").map(function () {
tabsWidthSum2 += $(this).outerWidth() + 40;
});
$('.blog-posts-filters').css('width', tabsWidthSum2 + 45 + 'px');
} else {
$('.blog-posts-filters').css('width', '');
}
};
if ($(window).width() < 768) {
/*$('.practice-info-tabs__nav').css('width', '1000px');*/
$('.testimonials-nav').css('width', '1000px');
$(".testimonials-nav a").map(function () {
tabsWidthSum4 += $(this).outerWidth() + 40;
});
$('.testimonials-nav').css('width', tabsWidthSum4 + 45 + 'px');
};
$(".tabs-section__nav a").map(function () {
tabsWidthSum += $(this).outerWidth();
});
$(".practice-info-tabs__nav a").map(function () {
tabsWidthSum3 += $(this).outerWidth() + 40;
});
if ($(window).width() < 768) {
/*$('.practice-info-tabs__nav').css('width', tabsWidthSum3 + 30 + 'px');*/
};
setTimeout(() => {
/*$('.tabs-section__nav').css('width', tabsWidthSum + 45 + 'px');*/
}, 300);
$('.tabs-section__nav .tabs-section__nav-item').first().addClass('tabs-section-nav-item__is-active');
$('.tabs-section__nav .tabs-section__nav-item').on('click', function () {
$('.tabs-section__nav .tabs-section__nav-item').removeClass('tabs-section-nav-item__is-active');
$(this).addClass('tabs-section-nav-item__is-active');
if ($(window).width() < 768) {
/*$('.tabs-section__nav_container')[0].scroll($('.tabs-section-nav-item__is-active').offset().left - 15, 0);*/
}
$('.tabs-section__wf-tabs a').eq($(this).index()).click();
$('.tabs-section .animate-text-container').addClass('inUp');
$('.tabs-section .tab-content-link-item').addClass('inUp');
});
$('.practice-info-tabs__nav .practice-info-tabs__nav-item').on('click', function () {
$('.practice-info-tabs__nav .practice-info-tabs__nav-item').removeClass('practice-info-tabs__nav-item--active');
$(this).addClass('practice-info-tabs__nav-item--active');
if ($(window).width() < 768) {
/*$('.practice-info-tabs__nav-container')[0].scroll($('.practice-info-tabs__nav-item--active').offset().left - 15, 0);*/
}
$('.practice-info-tabs__wf-tabs a').eq($(this).index()).click();
setTimeout(() => {
$('.practice-info-tabs-b2 .w--tab-active .tab-content-link-item').addClass('inUp');
}, 300);
});
$('.menu-big-sub-link-item[href="/about-us#team"]').on('click', function () {
scrollTo('.the-team-section-copy');
$('.big-menu--sticky-active').removeClass('big-menu--sticky-active');
$('.hamburger.is-active').removeClass('is-active');
$('.menu-items-list').show();
enableBodyScroll(document.querySelector('body'));
});
$('.menu-big-link-item a[href="/about-us#team"]').on('click', function (ev) {
ev.preventDefault();
if ($(window).width() >= 768) {
window.location.href = '/about-us#team';
}
});
if (true) {
$('a[href="/criminal-defense#owi-dui"].menu-big-sub-sub-link-item').on('click', function () {
scrollTo('.practice-info-tabs-b2');
$('.practice-info-tabs__nav a').removeClass('practice-info-tabs__nav-item--active');
$('.practice-info-tabs__nav a[href="#owi-dui"]').addClass('practice-info-tabs__nav-item--active');
$('.big-menu--sticky-active').removeClass('big-menu--sticky-active');
$('.hamburger.is-active').removeClass('is-active');
enableBodyScroll(document.querySelector('body'));
});
$('a[href="/criminal-defense#federal-offenses"].menu-big-sub-sub-link-item').on('click', function () {
scrollTo('.practice-info-tabs-b2');
$('.practice-info-tabs__nav a').removeClass('practice-info-tabs__nav-item--active');
$('.practice-info-tabs__nav a[href="#federal-offenses"]').addClass('practice-info-tabs__nav-item--active');
$('.big-menu--sticky-active').removeClass('big-menu--sticky-active');
$('.hamburger.is-active').removeClass('is-active');
enableBodyScroll(document.querySelector('body'));
});
$('a[href="/criminal-defense#state-offenses"].menu-big-sub-sub-link-item').on('click', function () {
scrollTo('.practice-info-tabs-b2');
$('.practice-info-tabs__nav a').removeClass('practice-info-tabs__nav-item--active');
$('.practice-info-tabs__nav a[href="#state-offenses"]').addClass('practice-info-tabs__nav-item--active');
$('.big-menu--sticky-active').removeClass('big-menu--sticky-active');
$('.hamburger.is-active').removeClass('is-active');
enableBodyScroll(document.querySelector('body'));
});
};
$(window).on('load', function () {
if (window.location.hash === '#federal-offenses') {
$('.practice-info-tabs__wf-tabs a').eq(1).click();
$('.practice-info-tabs__nav a[href="#federal-offenses"]').click();
scrollTo('.practice-info-tabs-b2');
} else if (window.location.hash === '#state-offenses') {
$('.practice-info-tabs__wf-tabs a').eq(2).click();
$('.practice-info-tabs__nav a[href="#state-offenses"]').click();
scrollTo('.practice-info-tabs-b2');
} else if (window.location.hash === '#owi-dui') {
$('.practice-info-tabs__wf-tabs a').eq(0).click();
$('.practice-info-tabs__nav a[href="#owi-dui"]').click();
scrollTo('.practice-info-tabs-b2');
} else if (window.location.hash === '#team') {
scrollTo('.the-team-section-copy');
} else {
$('.practice-info-tabs__nav-item').first().addClass('practice-info-tabs__nav-item--active');
}
});
function scrollTo(el, val) {
let offset = val || 0;
setTimeout(function () {
$("body, html").animate({
scrollTop: $(el).offset().top - offset
}, 0);
}, 200);
}
function addScript(src, cb) {
var s = document.createElement('script');
s.setAttribute('src', src);
s.async = true;
if (cb) {
s.onload = cb;
}
document.body.appendChild(s);
}
if (document.getElementById('gmap')) {
var mapInit = false;
$(document).on('scroll load', function() {
if (mapInit === false) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $('#gmap').offset().top - 1300;
var elemBottom = elemTop + $('#gmap').height();
if ((elemBottom <= docViewBottom) || (elemTop <= docViewTop)) {
mapInit = true;
addScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyCzCWYlahudB_lm_IuT2QmIIMG64z1EBZc&callback=initMap&libraries=places&v=weekly');
}
}
});
};
window.initMap = initMap;
function initMap() {
var lattitude = 41.4019742;
var longitude = -87.3363199;
var zoom = 15;
var markerLocation = { lat: lattitude, lng: longitude };
var mapLocation = { lat: lattitude, lng: longitude };
var infowindow = new google.maps.InfoWindow();
var map = new google.maps.Map(document.getElementById('gmap'), {
zoom: zoom,
center: markerLocation,
disableDefaultUI: true,
styles: [
{
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"featureType": "administrative.land_parcel",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#bdbdbd"
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "poi.park",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#dadada"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#c9c9c9"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
}
]
});
var request = {
query: "11890 Broadway, Crown Point, IN 46307, USA",
fields: ["name", "geometry"]
};
var service = new google.maps.places.PlacesService(map);
service.findPlaceFromQuery(request, function(results, status) {
if (status === google.maps.places.PlacesServiceStatus.OK) {
for (var i = 0; i < results.length; i++) {
createMarker(results[i]);
}
if (window.innerWidth < 992) {
map.setCenter(results[0].geometry.location);
}
}
});
function createMarker(place) {
var marker = new google.maps.Marker({
map: map,
position: place.geometry.location,
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAyCAYAAAA5kQlZAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPJSURBVHgBvZgxUxNBFMffu70waEDTOIPijMcnED+BoUMbsbMTWoGBfALCJ4gIjKWhswMbZ6yMnR3xE5DCiDMUHkOiSO5ufS/JIZC73b1Lwq9I7th3xz+7+/77dhESUMrlcmK0NScEPJaA0xLAQYAct9G1S9c1uqoGAF98368Ufp7WTN+NJkGbE2N5FLBGl3lIhCy3fH/dRJBSSGli1LFtu4QS5qAv9IJihXAvgIDdsOv7R9ZkYBWWD0/2olpF1B+372dXAPE9iRiFgYE5RHjxdCxz/LHR+trTGiVCSnwNQ8QCOf+q3tyBOCE8JzLCPoBrAEE+Wqw3q3AuLhRBqZkR4jNcE5Tuu/w/w3s7vBi56a2QNzhgTiUA+YG+3e59zgJ8BsYpjo5901ulp4vtO/5IMiQSYc/zvEJcKrZTXogiAr40eJ3batpTBdd120MjhMgbPMQi1pe/N56r/IDbluvNeY4FPbl2r0B3jtDHmu6JrogiGMKxJmIs7PQcGg2LlLWlH80pSMHW5BgnQF4VMxp4jmVnMtOgQUqrACkx6ZXflpixwJc6IW6cLZtAQ1SB/5kVCU3saTI56YCaKvRPTdVIIm5boEPCMfSJDOQ3XYxeyABACx/oYizKH/X4IT6EvlEPfwB4bNHiU1O+gl6yfSerzaw42B7YzlUxGMiaJRG1k1GOwAqkhBZSvVkKrLbXGjKdX6CpxMgPZrqpaExpMjudAdxXBnXNsj1ZaUneAQ0o5btONxuKYMempV4biFDhL6t7Y2BY6HC98mYyO6+L3Lw7PmcLe183NxguqjsSupisCRfgWmRHnEF18ahTZb2lHmgJMZesJpHlpXpz4ZKQbRpPqRvPAdPyvamwpDg3NK4faUJuwLUhyxfrmkvO6tl2ETQL1KAI50akkELNdaUcfq9waXC1yutZa7wRm/c0w+sV8g2vYffsm3p2ep/c09PZW5m/VCPMwhAIEAqrRyf6nV4IpTNnUOo1JhJFyRlbBtA4pi4P4wgUZaPyWCKhyemoLNUbM3GNysLIcG9iBJnXgqpdKYRXW6pHtAuinsvmlVgI4/l+EfpM56vmlUoI/5J+TC7KvFIJYVKbHJuX55VNQoVJUFqTa5vX4Z+KSazR8WbI1r3sAZX1jlFwwv1yon2NtHDBNDZImPqJeoQxNDmleUWReKdnYnI68xqIEDY5VBbbevMaiBDmjM7QICadTcxrYELiTI72RxtpeiO1EKbH5Ni8fC/1ibWRoUXBJvdkfOQGzZc83ycxrygSp+9FSg6dVp+12nuhtId9If8A73qjENFCHqEAAAAASUVORK5CYII='
});
google.maps.event.addListener(marker, "click", function() {
window.open('https://g.page/StracciLawGroup?share', '_blank');
});
}
};
let resizeTimer;
let checkResize = true;
$('.tf-rating-items').slick({
infinite: true,
slidesToShow: 5,
slidesToScroll: 1,
autoplaySpeed: 5000,
autoplay: true,
nextArrow: '.tf-rating-items__next-btn-2',
prevArrow: '.tf-rating-items__prev-btn-2',
responsive: [
{
breakpoint: 1090,
settings: {
slidesToShow: 4,
slidesToScroll: 1
}
},
{
breakpoint: 890,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 768,
settings: {
infinite: true,
dots: true,
appendDots: '.tf-rating-section__dots-container',
slidesToShow: 3,
slidesToScroll: 1,
centerMode: true,
variableWidth: true
}
},
{
breakpoint: 570,
settings: {
infinite: true,
dots: true,
appendDots: '.tf-rating-section__dots-container',
slidesToShow: 1,
slidesToScroll: 1,
centerMode: true,
variableWidth: true
}
}
]
}).on('afterChange', function(event, slick, currentSlide, nextSlide){
$(".tf-rating-item").removeClass('tf-rating-item--animate');
$(".tf-rating-item.slick-active").addClass('tf-rating-item--animate');
});
$('.testimonias-slider-items').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
autoplaySpeed: 10000,
autoplay: true,
adaptiveHeight: true,
nextArrow: '.testimonias-slider__next-btn',
prevArrow: '.testimonias-slider__prev-btn'
});
$('.slider3-list-items').on('init', function(event, slick, currentSlide, nextSlide) {
let maxHeight = Math.max.apply(null, $(".slider3-item__heading").map(function () {
return $(this).outerHeight();
}).get());
});
$('.slider3-list-items').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
autoplaySpeed: 5000,
autoplay: true,
adaptiveHeight: true,
nextArrow: '.slider3__next-btn',
prevArrow: '.slider3__prev-btn',
responsive: [
{
breakpoint: 991,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
$('.our-team-slider__items').slick({
infinite: false,
slidesToShow: 2,
slidesToScroll: 1,
nextArrow: '.slider-blogs__next-btn',
prevArrow: '.slider-blogs__prev-btn',
responsive: [
{
breakpoint: 768,
settings: {
dots: true,
appendDots: '.tf-rating-section__dots-container',
}
},
{
breakpoint: 560,
settings: {
dots: true,
appendDots: '.tf-rating-section__dots-container',
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
$('.slider-blogs__items').slick({
infinite: false,
slidesToShow: 2,
slidesToScroll: 1,
nextArrow: '.slider-blogs__next-btn',
prevArrow: '.slider-blogs__prev-btn',
responsive: [
{
breakpoint: 480,
settings: {
variableWidth: true,
slidesToShow: 1,
slidesToScroll: 1
}
}
]
}).on('afterChange', function(event, slick, currentSlide, nextSlide){
$(".slider-blogs__item").removeClass('slider-blogs__items--animate');
$(".slider-blogs__item.slick-active").addClass('slider-blogs__items--animate');
}).on('breakpoint', function(event, slick, breakpoint) {
if (breakpoint === 480) {
$('.slider-blogs__items .slick-slide').last().css({
width: 'calc(100vw - 10px)'
});
} else if (breakpoint === null) {
$('.slider-blogs__items .slick-slide').last().css({
width: ''
});
}
});
$('.slider-blogs__item-short-text').each(function () {
if ($(this).text().length) {
let heading = $(this).parents('.slider-blogs__item').find('.slider-blogs__item-heading');
heading.css({
'position': 'relative',
'top': 0,
'left': 0,
'color': '#000',
'margin-top': '24px',
'margin-bottom': '22px'
});
$(this).parents('.slider-blogs__item').find('.slider-blogs__item-image-container').css({
'height': '260px'
});
$(this).parents('.slider-blogs__item').find('.slider-blogs__item-short-text').prepend(heading);
}
});
$(window).on('load', function () {
if ($(window).width() <= 480) {
$('.slider-blogs__items .slick-slide').last().css({
width: 'calc(100vw - 10px)'
});
}
});
whyOurSectionFix();
function whyOurSectionFix() {
$('.grid-ite').css({
'min-height': ''
});
if (window.innerWidth < 768) {
/*
$('.why-grid-item').hide();
$('.why-grid-item').first().show();
$('.why-pagination__dot').first().addClass('why-pagination__dot--active');
*/
} else {
$('.why-grid-item').show();
var maxHeight = Math.max.apply(null, $(".grid-ite").map(function () {
return $(this).height();
}).get());
$('.grid-ite').css({
'min-height': maxHeight + 'px'
});
}
};
$(window).on('resize load', function () {
if (window.innerHeight < 840 && window.innerWidth >= 768) {
if (window.innerHeight < 760) {
$('.menu-big-link-item').css({
'font-size': '35px',
'line-height': '36px'
});
} else {
$('.menu-big-link-item').css({
'font-size': '38px',
'line-height': '48px'
});
}
} else {
$('.menu-big-link-item').css({
'font-size': '',
'line-height': ''
});
};
whyOurSectionFix();
});
/*
if ($('.why-section-swipe-area').length || $('#why-section-swipe-area').length) {
var hammertime2 = new Hammer(document.getElementById('why-section-swipe-area'));
hammertime2.on('swipeleft swiperight', function(ev) {
let item = $('.why-grid-item:visible');
$('#why-section-swipe-area .animate-text-container').addClass('inUp');
if (ev.type === 'swipeleft') {
if (item.next().length) {
item.next().show();
item.hide();
} else {
$('.why-grid-item').first().show();
item.hide();
}
} else if (ev.type === 'swiperight') {
if (item.prev().length) {
item.prev().show();
item.hide();
} else {
$('.why-grid-item').last().show();
item.hide();
}
}
$('.why-pagination__dot').removeClass('why-pagination__dot--active');
$('.why-pagination__dot')
.eq($('.why-grid-item:visible').index())
.addClass('why-pagination__dot--active');
});
};
*/
$('a[href="#contact"]').on('click', function (ev) {
ev.preventDefault();
$('.popup-contact-form').toggleClass('popup-contact-form--active');
});
$('.popup-contact-form__close').on('click', function () {
$('.popup-contact-form').removeClass('popup-contact-form--active');
});
$('.popup-contact-form form .custom-button-type-4').on('click', function () {
if ($('.popup-contact-form--active').length) {
$('.popup-contact-form--active form .submit-button[type="submit"]').click();
}
});
$('.contact-form-b form .custom-button-type-5').on('click', function () {
$('.contact-form-b form .submit-button[type="submit"]').click();
});
$('.contact-us-p-form-b form .custom-button-type-4').on('click', function () {
$('.contact-us-p-form-b form .submit-button[type="submit"]').click();
});
$('#hero-down-button').on('click', function () {
$("body, html").animate({
scrollTop: $('.full-height-hero').height()
}, 800);
});
(function () {
const isNumericInput = (event) => {
const key = event.keyCode;
return ((key >= 48 && key <= 57) ||
(key >= 96 && key <= 105)
);
};
const isModifierKey = (event) => {
const key = event.keyCode;
return (event.shiftKey === true || key === 35 || key === 36) ||
(key === 8 || key === 9 || key === 13 || key === 46) ||
(key > 36 && key < 41) ||
(
(event.ctrlKey === true || event.metaKey === true) &&
(key === 65 || key === 67 || key === 86 || key === 88 || key === 90)
)
};
const enforceFormat = (event) => {
if(!isNumericInput(event) && !isModifierKey(event)){
event.preventDefault();
}
};
const formatToPhone = (event) => {
if(isModifierKey(event)) {return;}
const target = event.target;
const input = target.value.replace(/\D/g,'').substring(0,10);
const zip = input.substring(0,3);
const middle = input.substring(3,6);
const last = input.substring(6,10);
if(input.length > 6){target.value = `(${zip}) ${middle} - ${last}`;}
else if(input.length > 3){target.value = `(${zip}) ${middle}`;}
else if(input.length > 0){target.value = `(${zip}`;}
};
$("input[type='tel']").on('keydown', enforceFormat);
$("input[type='tel']").on('keyup', formatToPhone);
}());
(function () {
let target = document.querySelector('.contact-form-b .success-message');
if (!target) {
return false;
}
const config = {
attributes: true,
childList: false,
subtree: false
};
const callback = function(mutationsList, observer) {
if (target.style.display === 'block' && window.innerWidth <= 768) {
$("body, html").animate({
scrollTop: $(document.querySelector('.contact-form-b')).offset().top
}, 300);
observer.disconnect();
}
};
const observer = new MutationObserver(callback);
observer.observe(target, config);
}());
$('.tab-content').each(function() {
$('.w-dyn-items', this).append($('.tab-content-link-item__view-all', this));
});
(function () {
let target = document.querySelector('.contact-us-p-form-b .success-message');
if (!target) {
return false;
}
const config = {
attributes: true,
childList: false,
subtree: false
};
const callback = function(mutationsList, observer) {
if (target.style.display === 'block' && window.innerWidth <= 768) {
$("body, html").animate({
scrollTop: $(document.querySelector('.contact-us-p-form-b .success-message')).offset().top - 130
}, 300);
observer.disconnect();
}
};
const observer = new MutationObserver(callback);
observer.observe(target, config);
}());
$('a[target="_blank"]').attr('rel', 'nofollow noreferrer noindex');
.menu-container {
will-change: transform;
transition: all 0.7s cubic-bezier(0.65, 0.05, 0.36, 1);
width: 100%;
z-index: 1;
transform: translateX(calc(-100% + 47px));
}
.menu-container .menu-button {
transition-delay: 0.3s;
position: relative;
}
.menu-container [menu-item-bg]:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(112.91deg, #000 3.48%, rgba(196, 196, 196, 0) 90.04%);
z-index: -1;
}
.menu-container .big-menu-image {
transform: translateX(-47px);
transition: transform 0.6s;
will-change: transform;
}
.menu-container.is-open {
background-color: #5e5e5e;
transform: translateX(0px);
}
.menu-container.is-open .big-menu-image {
transform: translateX(0);
}
.menu-container.is-open .menu-button {
background-color: #737373;
}
[menu-item-bg] {
transform: scale(1.2);
transition: transform 0.2s;
animation-duration: 1s;
animation-fill-mode: forwards;
}
[menu-item-bg].show-menu-bg {
transform: scale(0);
animation-name: menuBg;
}
@keyframes menuBg {
from {
opacity: 0;
transform: scale(1.2);
}
to {
opacity: 1;
transform: scale(1);
}
}
.team-section-item:hover .team-section-item__photo img {
filter: grayscale(0.5);
}
.team-section-item .team-section-item__photo {
position: relative;
}
.team-section-item .team-section-item__photo:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 0;
height: 2px;
transition: width 0.4s;
z-index: 1;
margin: 0 auto;
}
.team-section-item .team-section-item__photo img {
filter: grayscale(0);
transition: all 0.8s;
}
.team-section-item.team-section-item__is-active {
position: relative;
}
.team-section-item.team-section-item__is-active .team-section-item__photo:before {
width: 100%;
background-color: #941b0c;
}
.team-section-item.team-section-item__is-active .team-section-item__photo img {
filter: grayscale(1);
}
.link-img-grad, .slider-blogs__item-image-container {
position: relative;
}
.link-img-grad:before, .slider-blogs__item-image-container:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 13.59%, rgba(196, 196, 196, 0) 30%);
z-index: 1;
}
.full-height-hero:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(179deg, rgba(0, 0, 0, 0.4) 13.59%, rgba(196, 196, 196, 0) 77.01%);
z-index: 1;
}
.full-height-hero:after {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 13.59%, rgba(196, 196, 196, 0) 30%);
z-index: 1;
}
.hero-section:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(106.65deg, #000 13.59%, rgba(196, 196, 196, 0) 77.01%);
}
.hero-section:after {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(360deg, #000 -5.22%, rgba(0, 0, 0, 0) 55.22%);
z-index: 1;
}
@media (max-width: 430px) {
.practice-info-tabs__nav-container {
overflow: scroll;
}
}
.tabs-section__nav_container, .tabs-section__nav_container-2, .testimonials-nav-container, .practice-info-tabs__nav-container {
-ms-overflow-style: none;
scrollbar-width: none;
}
.tabs-section__nav_container::-webkit-scrollbar, .tabs-section__nav_container-2::-webkit-scrollbar, .testimonials-nav-container::-webkit-scrollbar, .practice-info-tabs__nav-container::-webkit-scrollbar {
display: none;
}
.testimonials-nav__link-item {
position: relative;
}
.testimonials-nav__link-item:before {
content: '';
position: absolute;
bottom: -5px;
left: 0;
right: 0;
width: 0;
background-color: #941b0c;
transition: all 0.4s;
height: 2px;
margin: 0 auto;
}
.testimonials-nav__link-item--active {
color: #000;
}
.testimonials-nav__link-item--active:before {
width: 100%;
}
.practice-info-tabs__nav a {
position: relative;
}
.practice-info-tabs__nav a:before {
content: '';
transition: all 0.4s;
width: 0;
}
.practice-info-tabs__nav-item--active a:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
margin: 0 auto;
height: 2px;
background-color: #941b0c;
}
.tabs-section__nav > a {
position: relative;
color: #a5a5a5;
transition: color 0.2s;
}
.tabs-section__nav > a:before {
content: '';
transition: all 0.4s;
width: 0;
}
.tabs-section__nav > a:hover {
color: #fff;
}
.tabs-section-nav-item__is-active {
color: #fff;
position: relative;
}
.tabs-section-nav-item__is-active:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
margin: 0 auto;
height: 2px;
background-color: #941b0c;
}
.team-pagination__dot.team-pagination__dot--active:before, .why-pagination__dot.team-pagination__dot--active:before, .team-pagination__dot.why-pagination__dot--active:before, .why-pagination__dot.why-pagination__dot--active:before {
content: '';
position: absolute;
border: 1px solid #941b0c;
width: 20px;
height: 20px;
border-radius: 50%;
}
.tf-rating-items .slick-list {
margin: 0 -30px;
}
@media (min-width: 1280px) {
.tf-rating-items .slick-list {
margin: 0 -30px;
}
}
.slick-slide {
outline: none;
}
.tf-rating-section__dots-container .slick-dots {
position: relative;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
}
.tf-rating-section__dots-container .slick-dots li {
display: flex;
align-items: center;
justify-content: center;
margin: 0 3px;
}
.tf-rating-section__dots-container .slick-dots li.slick-active button:after {
content: '';
position: absolute;
border: 1px solid #941b0c;
width: 20px;
height: 20px;
border-radius: 50%;
box-sizing: border-box;
}
.tf-rating-section__dots-container .slick-dots button {
position: relative;
display: flex;
width: 5px;
height: 5px;
padding: 0;
margin: 0;
margin-right: 10px;
margin-left: 10px;
padding-right: 0;
padding-bottom: 0;
justify-content: center;
align-items: center;
flex: 0 0 auto;
border-radius: 50%;
background-color: #696666;
box-sizing: border-box;
}
.tf-rating-section__dots-container .slick-dots button:before {
display: none;
}
.slider3-list-items .slick-slide {
margin: 0 35px;
}
.slider3-list-items .slick-list {
margin: 0 -35px;
}
.slick-arrow[aria-disabled="true"] {
opacity: 0.4;
cursor: not-allowed;
}
.slick-arrow[aria-disabled="true"]:hover svg {
fill: #000;
}
.popup-contact-form--active {
z-index: 300;
display: block;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
@media (max-width: 350px) {
.footer-copy-text {
font-size: 11px;
}
}
@media (max-width: 350px) {
a[class*='custom-button-type'] {
padding: 20px 24px;
}
a[class*='custom-button-type'] .custom-button-text {
font-size: 12px;
}
}
.slg-rich-text .img-animate-container {
display: flex;
}
.slg-rich-text .animate-text-container {
margin-bottom: 30px;
}
.slg-rich-text .animate-text-container p {
margin-bottom: 0;
}
.slg-rich-text blockquote {
margin: 30px 0;
}
.slg-rich-text figure {
margin: 50px 0;
}
.slg-rich-text figure div {
width: 100%;
}
.slg-rich-text ul {
list-style: none;
margin: 30px 0;
}
.slg-rich-text ul li {
position: relative;
}
.slg-rich-text ul li:before {
content: '';
background-image: url("data:image/svg+xml,%3Csvg width='12' height='15' viewBox='0 0 12 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.6111 7.02425L1.45675 0.183799C1.12353 -0.0612664 0.583126 -0.0612664 0.249911 0.183799C-0.0833037 0.428846 -0.0833037 0.826462 0.249911 1.07153L9.79203 7.50001L0.250756 13.9285C-0.0824585 14.1735 -0.0824585 14.5712 0.250756 14.8162C0.583971 15.0612 1.12438 15.0612 1.45756 14.8162L11.612 7.97575C11.7896 7.84511 11.8657 7.67192 11.8539 7.50063C11.8649 7.32871 11.7888 7.15554 11.6111 7.02425Z' fill='%23941B0C'/%3E%3C/svg%3E%0A");
position: absolute;
width: 12px;
height: 15px;
left: -40px;
right: 0;
top: 8px;
background-position: center;
background-repeat: no-repeat;
}
.slg-rich-text ol[role="list"] {
list-style: none;
padding-left: 0;
}
.slg-rich-text ol[role="list"] li {
position: relative;
display: flex;
align-items: center;
padding-left: 40px;
}
.slg-rich-text ol[role="list"] li:before {
display: inline-block;
position: absolute;
left: 0;
top: 0;
color: #941b0c;
font-weight: normal;
}
.slg-rich-text ol[role="list"] li:nth-child(1):before {
content: '1.';
}
.slg-rich-text ol[role="list"] li:nth-child(2):before {
content: '2.';
}
.slg-rich-text ol[role="list"] li:nth-child(3):before {
content: '3.';
}
.slg-rich-text ol[role="list"] li:nth-child(4):before {
content: '4.';
}
.slg-rich-text ol[role="list"] li:nth-child(5):before {
content: '5.';
}
.slg-rich-text ol[role="list"] li:nth-child(6):before {
content: '6.';
}
.slg-rich-text ol[role="list"] li:nth-child(7):before {
content: '7.';
}
.slg-rich-text ol[role="list"] li:nth-child(8):before {
content: '8.';
}
.slg-rich-text ol[role="list"] li:nth-child(9):before {
content: '9.';
}
.slg-rich-text ol[role="list"] li:nth-child(10):before {
content: '10.';
}
.slg-rich-text ol[role="list"] li:nth-child(11):before {
content: '11.';
}
.slg-rich-text ol[role="list"] li:nth-child(12):before {
content: '12.';
}
.slg-rich-text ol[role="list"] li:nth-child(13):before {
content: '13.';
}
.slg-rich-text ol[role="list"] li:nth-child(14):before {
content: '14.';
}
.slg-rich-text ol[role="list"] li:nth-child(15):before {
content: '15.';
}
textarea {
resize: none;
}
.contact-form-b textarea:focus, .contact-form-b input:focus, .contact-form-b input[type]:focus, .contact-form-b .uneditable-input:focus {
border-color: #941b0c !important;
box-shadow: 0 1px 1px rgba(148, 27, 12, 0.6) inset, 0 0 8px rgba(148, 27, 12, 0.6);
outline: 0 none;
}
.popup-contact-form textarea:focus, .popup-contact-form input:focus, .popup-contact-form input[type]:focus, .popup-contact-form .uneditable-input:focus {
border-color: #000 !important;
outline: 0 none;
}
.blog-posts-filter__item--active {
font-style: italic;
}
.inner-page-hero__overlay:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 1;
background-image: linear-gradient(306deg, rgba(0, 0, 0, 0.7), rgba(196, 196, 196, 0) 60%);
opacity: 1;
}
.blog-not-found-message {
height: 150px;
font-family: Playfair Display;
font-style: normal;
font-weight: normal;
font-size: 18px;
line-height: 24px;
letter-spacing: 0.045em;
text-transform: capitalize;
}
.text-gradient-404 .grad-404-text-1, .text-gradient-404 .grad-404-text-2 {
background: -webkit-linear-gradient(#eee, #7d7d7d);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.blog-posts-filters a:last-child {
margin-right: 0;
}
.testimoinals-collection-item__text {
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
cursor: pointer;
}
.testimoinals-collection-item__text.testimoinals-collection-item__text--active {
display: flex;
}
input, textarea {
border-radius: 0;
-webkit-appearance: none;
}
@media (max-width: 500px) {
input, textarea {
font-size: 16px !important;
}
}