var $ = jQuery;
$(document).ready(function() {
     $('main').find("img").each(function(){ 

  if(typeof($(this).attr("data-lazy-src"))!=="undefined"){
      if(typeof($(this).attr("data-was-processed"))==="undefined" || $(this).attr("data-was-processed")!="true")
      {
          $(this).attr('src', $(this).attr('data-lazy-src'));
          $(this).attr("data-was-processed","true");
      }
  }
});
    $(".hover.fusion-content-box-hover").click(function(i) {
        var n = $(".hover.fusion-content-box-hover .box2 a");
        n.is(i.target) || 0 !== n.has(i.target).length || (i.preventDefault(), $(".hover.fusion-content-box-hover").not(this).removeClass("flip"), $(this).toggleClass("flip"))
    }), $(document).mouseup(function(i) {
        var n = $(".hover.fusion-content-box-hover");
        n.is(i.target) || 0 !== n.has(i.target).length || $(".hover.fusion-content-box-hover").removeClass("flip")
    }), 0 < $(".fusion-search-button.search-button").length && ($(".fusion-search-button.search-button").find("input").attr("title", "Search Button"), $(".fusion-search-button.search-button").find("input").val(""), $(".fusion-search-button.search-button").find("input").attr("aria-label", "Search Button")), 0 < $(".fusion-mobile-menu-icons").length && setTimeout(function() {
        $(".fusion-mobile-menu-icons").find(".mobile_toggle-bar").remove(), $(".fusion-mobile-menu-icons").find("a").append('<span class="mobile_toggle-bar" style="display:none;">Mobile Menu Toggle</span>')
    }, 3e3), 0 < $(".megamenuWrapper").length && $(".megamenuWrapper").find(".menuLst ul li").each(function() {
        var i = $(this).find("a").attr("href");
        $(this).find("a").removeClass("no-hand"), "javascript:void(0);" == i && $(this).find("a").addClass("no-hand")
    }), 0 < $("#zip").length && $("#zip").on("keypress keyup blur", function(i) {
        $(this).val($(this).val().replace(/[^\d].+/, "")), (i.which < 48 || 57 < i.which) && i.preventDefault()
    }), 0 < $("#phone").length && $("#phone").on("keypress keyup blur", function(i) {
        $(this).val($(this).val().replace(/[^\d].+/, "")), (i.which < 48 || 57 < i.which) && i.preventDefault()
    }), 0 < $("#extension").length && $("#extension").on("keypress keyup blur", function(i) {
        $(this).val($(this).val().replace(/[^\d].+/, "")), (i.which < 48 || 57 < i.which) && i.preventDefault()
    }), 0 < $("select[name='subject']").length && $("select[name='subject']").on("change", function() {
        var i = $(this).val();
        $("select[name='subjectemail'] option[value='" + i + "']").prop("selected", !0)
    }), $(".fusion-search-submit.searchsubmit").on("click", function() {
        $(this).closest("form").submit()
    }), 0 < $(".fusion-logo-link").length && $(".fusion-logo-link").find(".fusion-mobile-logo").attr("alt", "")
}), $(function() {
    var n = jQuery.fn.addClass;
    jQuery.fn.addClass = function() {
        var i = n.apply(this, arguments);
        return jQuery(this).trigger("cssClassChanged"), i
    }
}), $(function() {
    $(".wpcf7-form").bind("cssClassChanged", function() {
        if ($(this).hasClass("sent")) {
            $(this).hide();
            var i = $(this).find(".wpcf7-mail-sent-ok").text();
            $(".post-content").children().siblings().hide(), $(".brodcums").hide(), $(".entry-title").hide(), 0 < $(".post-content").find(".newsletterResponse").length && $(".post-content").find(".newsletterResponse").remove(), $(".post-content").prepend('<div class="fusion-text formResponse newsletterResponse">' + i + "</div>"), window.location.hash = "thank-you"
        }
    })
}), $(window).on("load resize", function(i) {
    var h = $(window).width();
    if (0 < $("section.academicsWrapper").length) {
        $("section.academicsWrapper").find(".academicGridBox .colBox .textBlock h4").css("height", ""), $("section.academicsWrapper").find(".academicGridBox .colBox .textBlock h4+p").css("height", ""), $("section.academicsWrapper").find(".academicGridBox .colBox .textBlock p.subtitle+p").css("height", ""), 767 < h && $("section.academicsWrapper").each(function() {
            var i = 3,
                o = 0,
                e = 0,
                t = 0,
                n = parseInt($(this).find(".colBox").length / i);
            if (767 < h && h <= 1023) i = 2;
            else i = 3;
            0 <= n && (n += 1);
            for (var s = 1, u = i, c = 1; c <= n; c++) $(this).find(".academicGridBox").each(function() {
                $(this).find(".colBox .textBlock h4").each(function(i, n) {
                    s <= (i += 1) && i <= u && (e = e > $(this).height() ? e : $(this).height())
                }), $(this).find(".colBox .textBlock h4").each(function(i, n) {
                    s <= (i += 1) && i <= u && $(this).css({
                        height: e
                    })
                }), $(this).find(".textBlock h4+p").each(function(i, n) {
                    s <= (i += 1) && i <= u && (o = o > $(this).height() ? o : $(this).height())
                }), $(this).find(".textBlock h4+p").each(function(i, n) {
                    s <= (i += 1) && i <= u && $(this).css({
                        height: o
                    })
                }), $(this).find(".textBlock p.subtitle").each(function(i, n) {
                    s <= (i += 1) && i <= u && (t = t > $(this).next("p").height() ? t : $(this).next("p").height())
                }), $(this).find(".textBlock p.subtitle").each(function(i, n) {
                    s <= (i += 1) && i <= u && $(this).next("p").css({
                        height: t
                    })
                }), o = t = e = "", s = u + 1, u += i
            })
        })
    }
}), $(window).on("load resize", function(i) {
    $(window).width();
    $(".mjorGridbox.programs-and-courses-major .fusion-content-boxes .fusion-column").css("padding-bottom", ""), $(".mjorGridbox.programs-and-courses-major").each(function() {
        $(this).find(".fusion-column").each(function(i, n) {
            if (0 < $(this).find(".box-bottom").length) {
                var o = $(this).find(".box-bottom").height();
                o += "px !important";
                var e = $(this).css("background-color");
                $(this).css("padding-bottom", o).css("cssText", "background-color:" + e + ";padding-bottom:" + o + ";")
            }
        })
    })
}), $(window).on("load resize", function(i) {
    var n = $(window).width();
    0 < $(".mjorGridbox-detail").length && ($(".mjorGridbox-detail .fusion-content-boxes .fusion-column").find(".col .heading h2").css("height", ""), $(".mjorGridbox-detail .fusion-content-boxes .fusion-column").find(".col .heading .image").css("height", ""), $(".mjorGridbox-detail .fusion-content-boxes .fusion-column").find(".col .content-container p").css("height", ""), $(".mjorGridbox-detail .fusion-content-boxes .fusion-column").find(".col .fusion-read-more").css("height", ""), $(".mjorGridbox-detail .fusion-content-boxes .fusion-column").css("height", ""), $(".mjorGridbox-detail .fusion-content-boxes .fusion-column").css("padding-bottom", ""), 801 < n && $(".mjorGridbox-detail").each(function() {
        var o = 1,
            e = 3,
            t = 0,
            s = 0,
            u = 0,
            c = 0,
            h = 0,
            i = parseInt($(this).find(".fusion-content-boxes .fusion-column").length / 3);
        0 < i && (i += 1), $(this).find(".col .heading h2").css("height", ""), $(this).find(".col .content-container p").css("height", ""), $(this).find(".col .fusion-read-more").css("height", ""), $(this).find(".col .heading .image").css("height", ""), $(this).css("height", "");
        for (var n = 1; n <= i; n++) $(this).find(".fusion-content-boxes").each(function() {
            $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && (s = s > $(this).height() ? s : $(this).height())
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && $(this).css({
                    height: s
                })
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && (h = h > $(this).find(".col .heading .image").height() ? h : $(this).find(".col .heading .image").height())
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && $(this).find(".col .heading .image").css({
                    height: h
                })
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && (t = t > $(this).find(".col .heading h2").height() ? t : $(this).find(".col .heading h2").height())
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && $(this).find(".col .heading h2").css({
                    height: t
                })
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && (c = c > $(this).find(".col .content-container p").height() ? c : $(this).find(".col .content-container p").height())
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && $(this).find(".col .content-container p").css({
                    height: c
                })
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && (u = u > $(this).find(".col .fusion-read-more").height() ? u : $(this).find(".col .fusion-read-more").height())
            }), $(this).find(".fusion-column").each(function(i, n) {
                o <= (i += 1) && i <= e && $(this).find(".col .fusion-read-more").css({
                    height: u
                })
            }), h = s = t = c = u = "", o = e + 1, e += 3
        })
    }))
}),/* $(window).on("load resize", function(i) {
    var r = $(window).width();
    0 < $(".viewGridbox").length && ($(".viewGridbox").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3").css("height", ""), $(".viewGridbox").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper").css("height", ""), $(".viewGridbox").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-text").css("height", ""), $(".viewGridbox").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title").css("height", ""), 767 < r && 0 < $(".viewGridbox").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title").length && $(".viewGridbox").each(function() {
        var i = 3,
            o = 0,
            e = 0,
            t = 0,
            n = parseInt($(".viewGridbox .fusion_builder_column.fusion_builder_column_1_3").length / i),
            s = $(".viewGridbox .fusion_builder_column.fusion_builder_column_1_3").length;
        if (console.log(s), 767 < r && r <= 1359) i = 2;
        else i = 3;
        0 <= n && (n += 1);
        for (var u = 1, c = i, h = 1; h <= n; h++) $(this).find(".fusion-builder-row.fusion-row").each(function() {
            $(this).find(".fusion_builder_column.fusion_builder_column_1_3").each(function(i, n) {
                u <= (i += 1) && i <= c && (o = o > $(this).height() ? o : $(this).height(), console.log("test", i, o))
            }), $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper").each(function(i, n) {
                u <= (i += 1) && i <= c && $(this).css({
                    height: o
                })
            }), $(this).find(".fusion-column-wrapper .fusion-text").each(function(i, n) {
                u <= (i += 1) && i <= c && (e = e > $(this).height() ? e : $(this).height())
            }), $(this).find(".fusion-column-wrapper .fusion-text").each(function(i, n) {
                u <= (i += 1) && i <= c && $(this).css({
                    height: e
                })
            }), $(this).find(".fusion-column-wrapper .fusion-title").each(function(i, n) {
                u <= (i += 1) && i <= c && (t = t > $(this).height() ? t : $(this).height())
            }), $(this).find(".fusion-column-wrapper .fusion-title").each(function(i, n) {
                u <= (i += 1) && i <= c && $(this).css({
                    height: t
                })
            }), e = o = "", t = 0, u = c + 1, c += i
        })
    }))
}),*/ $(window).on("load resize", function(i) {
    var u = $(window).width();
    if (0 < $(".viewGridbox2").length) {
        $(".viewGridbox2").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .contentWrapper h4").css("height", ""), 767 < u && $(".viewGridbox2").each(function() {
            var i = 3,
                o = 0,
                n = parseInt($(this).find(".fusion_builder_column.fusion_builder_column_1_3").length / i);
            if (767 < u && u <= 1023) i = 2;
            else i = 3;
            0 < n && (n += 1);
            for (var e = 1, t = i, s = 1; s <= n; s++) $(this).find(".fusion-builder-row.fusion-row").each(function() {
                $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .contentWrapper h4").each(function(i, n) {
                    e <= (i += 1) && i <= t && (o = o > $(this).height() ? o : $(this).height())
                }), $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .contentWrapper h4").each(function(i, n) {
                    e <= (i += 1) && i <= t && $(this).css({
                        height: o
                    })
                }), o = "", e = t + 1, t += i
            })
        })
    }
}), $(document).ready(function() {
    window.console || (console = {
        log: function() {}
    }), 0 < $(".single-page-nav").length && $(".single-page-nav").singlePageNav({
        offset: $(".single-page-nav").outerHeight(),
        filter: ":not(.external)",
        updateHash: !0,
        beforeStart: function() {},
        onComplete: function() {}
    })
}), $(function() {
    if (0 < $(".academicTab").length) {
        var i = $("#fixedTab").offset().top;
        $(window).scroll(function() {
            $(window).scrollTop() > i ? $("#fixedTab").addClass("stickyTab") : $("#fixedTab").removeClass("stickyTab")
        })
    }
}), $(".fusion-text").find("a").each(function() {
    var text=$(this).text();
    var i = new RegExp('/\[-a-zA-Z0-9@:%_\+.#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.#?&//=]*)?/gi');
    text.match(i) && $(this).addClass("breadWord")
}), $(window).on("load resize", function(i) {
    var c = $(window).width();
    0 < $(".program-courses-single .fusion-column-wrapper").length && ($(".program-courses-single .fusion-column-wrapper").find(".fusion-builder-row.fusion-builder-row-inner.fusion-row .fusion_builder_column.fusion_builder_column_1_3").css("height", ""), $(".program-courses-single .fusion-column-wrapper").find(".fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper").css("height", ""), $(".program-courses-single .fusion-column-wrapper").find(".fusion-builder-row.fusion-builder-row-inner.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title").css("height", ""), 767 < c && $(".program-courses-single .fusion-column-wrapper .fusion-builder-row.fusion-builder-row-inner.fusion-row").each(function() {
        var i = 3,
            o = 0,
            e = 0,
            n = parseInt($(".program-courses-single .fusion-column-wrapper .fusion-builder-row.fusion-builder-row-inner.fusion-row .fusion_builder_column.fusion_builder_column_1_3").length / i);
        if (767 < c && c <= 1023) i = 2;
        else i = 3;
        0 <= n && (n += 1);
        for (var t = 1, s = i, u = 1; u <= n; u++) $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper").each(function(i, n) {
            t <= (i += 1) && i <= s && (o = o > $(this).height() ? o : $(this).height())
        }), $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper").each(function(i, n) {
            t <= (i += 1) && i <= s && $(this).css({
                height: o
            })
        }), $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title").each(function(i, n) {
            t <= (i += 1) && i <= s && (e = e > $(this).height() ? e : $(this).height())
        }), $(this).find(".fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title").each(function(i, n) {
            t <= (i += 1) && i <= s && $(this).css({
                height: e
            })
        }), o = "", e = 0, t = s + 1, s += i
    }))
});




$(window).on("load resize", function(e) {

    // var windowSize = $(window).width();
    var windowSize = window.innerWidth;


    if ($('.viewGridbox').length > 0) {
        // console.log("windowSize", windowSize);

        $('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3').css('height', '');
        $('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper').css('height', '');
        $('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-text').css('height', '');
        $('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title').css('height', '');

        //console.log($('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title').length);
        if (windowSize > 767) {

            if ($('.viewGridbox').find('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title').length > 0) {
                $('.viewGridbox').each(function() {

                    var row = 3;
                    var maxHeight = 0;
                    var maxHeightwraper = 0;
                    var maxHeighttext = 0;
                    var maxHeighttitle = 0;
                    // var findTitle = [];
                    if (windowSize >= 1360) {
                        var row = 3;
                    } else {
                        var row = 2;
                    }
                    if (max >= 0) {
                        max = max + 1;
                    }
                    var max = parseInt($('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3').length / row);
                    var totalCount = $('.fusion-builder-row.fusion-row .fusion_builder_column.fusion_builder_column_1_3').length;
                    // console.log("max", max);
                    // console.log("totalCount", totalCount);
                    var start = 1;
                    var end = row;
                    for (var i = 1; i <= max; i++) {
                        $(this).find('.fusion-builder-row.fusion-row').each(function() {
                           // console.log("fusion-builder-row.fusion-row");
                           // $(this).find('fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper').each(function(index, element) {
                           //          index = index + 1;
                           //          if (index >= start && index <= end) {
                           //              maxHeightwraper = maxHeightwraper > $(this).height() ? maxHeightwraper : $(this).height();
                           //          }
                           //         // console.log("maxHeightwraper", maxHeightwraper, " ", index);
                           //      });
                           //  // if (totalCount == findTitle.length) {
                           //      $(this).find('fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper').each(function(index, element) {
                           //          index = index + 1;
                           //          if (index >= start && index <= end) {
                           //              $(this).css({
                           //                  'height': maxHeightwraper
                           //              });
                           //          }
                           //      });
                                $(this).find('.fusion-column-wrapper .fusion-text').each(function(index, element) {

                                    index = index + 1;

                                    if (index >= start && index <= end) {
                                        maxHeighttext = maxHeighttext > $(this).height() ? maxHeighttext : $(this).height();
                                    }
                                   // console.log("maxHeighttext", maxHeighttext, " ", index);
                                });


                                $(this).find('.fusion-column-wrapper .fusion-text').each(function(index, element) {
                                    index = index + 1;
                                    if (index >= start && index <= end) {
                                        $(this).css({
                                            'height': maxHeighttext
                                        });
                                    }
                                });
                                $(this).find('.fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title').each(function(index, element) {
                                    index = index + 1;
                                    if (index >= start && index <= end) {
                                        maxHeighttitle = maxHeighttitle > $(this).height() ? maxHeighttitle : $(this).height();
                                        // findTitle.push($(this).height());
                                    }
                                // console.log("maxHeighttitle", maxHeighttitle, " ", index);
                                });

                                $(this).find('.fusion_builder_column.fusion_builder_column_1_3 .fusion-column-wrapper .fusion-title').each(function(index, element) {

                                    index = index + 1;
                                    if (index >= start && index <= end) {
                                        $(this).css({
                                            'height': maxHeighttitle
                                        });
                                    }
                                });

                            // }
                            maxHeightwraper = "";
                            maxHeight = "";
                            maxHeighttext = "";
                            maxHeighttitle = 0;
                            start = end + 1;
                            end = end + row;
                        });



                    }

                });
            }
        }

    }

}); 