var _ua = (function(u){ return { Tablet:(u.indexOf("windows") != -1 && u.indexOf("touch") != -1) || u.indexOf("ipad") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") == -1) || (u.indexOf("firefox") != -1 && u.indexOf("tablet") != -1) || u.indexOf("kindle") != -1 || u.indexOf("silk") != -1 || u.indexOf("playbook") != -1, Mobile:(u.indexOf("windows") != -1 && u.indexOf("phone") != -1) || u.indexOf("iphone") != -1 || u.indexOf("ipod") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") != -1) || (u.indexOf("firefox") != -1 && u.indexOf("mobile") != -1) || u.indexOf("blackberry") != -1 } })(window.navigator.userAgent.toLowerCase()); $(function() { var maincont = $("#mapmain") var tab = $(".tabin"); var nav = $("#nav a"); var homeH = $('#global01').height(); tab.hide(); //$("#mapmain").css({height: homeH}); $("#global01").addClass("active").show(); //maincont.find(".tabin.active").show(); $("#nav a,.point a").click(function(e){ e.preventDefault(); var t = $(this).attr("href"); var tgtH = $(t).height(); tab.removeClass("active").stop(true,false).fadeOut('fast').promise().done(function() { $(t).addClass("active").fadeIn('fast'); }); $(".navlist").removeClass("active"); $('#nav a[href="'+t+'"]').parent(".navlist").addClass("active"); var HashOffset = $('#nav').offset().top - $('header').height(); $('html, body').stop().animate({ scrollTop: HashOffset }, 500); }) TweenMax.to($(".box"),1, { opacity: 1, delay:0.5, ease: Power4.easeOut }); TweenMax.fromTo($(".map"),1, { opacity: 0, scale:1.2 },{ opacity:1, scale:1, delay:0.3, ease: Power4.easeOut }); TweenMax.staggerFromTo($(".pointer"), 0.3, { opacity:0, top:-5, },{ opacity:1, top:0, delay:0.4, },0.5); TweenMax.staggerFromTo($("span.ort"), 0.3, { opacity:0, },{ opacity:1, delay:0.8, },0.5); $(".point").hover(function(){ $(this).toggleClass("active"); $(this).find(".box").toggleClass("active"); }); if (_ua.Mobile){ $(".item span").matchHeight(); $(".item").matchHeight(); }else{ $(".item").matchHeight(); } });