2015-10-15 03:41:36 +02:00
|
|
|
$(document).ready(function(){slider();socialAsSvg();featuredFAQ();headerNavigation();function slider(){$(".case-study:gt(0)").addClass("hidden");$(".slider-action").click(function(){var direction=$(this).attr("id");if(direction==="back"){$(".case-study").addClass("hidden");$(".case-study").last().prependTo(".slide-container").removeClass("hidden")}else{displayed=$(".case-study").first();displayed.addClass("hidden");$(".case-study").eq(1).removeClass("hidden");displayed.appendTo(".slide-container")}})}function socialAsSvg(){jQuery("img.social-icon").each(function(){var $img=jQuery(this);var imgID=$img.attr("id");var imgClass=$img.attr("class");var imgURL=$img.attr("src");jQuery.get(imgURL,function(data){var $svg=jQuery(data).find("svg");if(typeof imgID!=="undefined"){$svg=$svg.attr("id",imgID)}if(typeof imgClass!=="undefined"){$svg=$svg.attr("class",imgClass+" replaced-svg")}$svg=$svg.removeAttr("xmlns:a");$img.replaceWith($svg)},"xml")})}function featuredFAQ(){$(".featured-faqs dt").click(function(){$(this).next("dd").toggleClass("open")})}function headerNavigation(){$(".current-menu-item").on("click",function(e){e.preventDefault()});$(".tour-switcher ul").on("click",function(e){if(false===$(this).hasClass("active")){e.preventDefault()}$(this).toggleClass("active")})}});
|