var AllView; (function(o) { 'use strict'; if(typeof Object.create !== 'function'){ Object.create = function(o){ var F = function(){}; F.prototype = o; return new F(); }; }; var Menu = function() { function Menu(){ var self = this; self.Initialize(); }; Menu.prototype = Object.create(Object.prototype); Menu.prototype.constructor = Menu; Menu.prototype = { Initialize:function(){ var self = this; self.Setup(); }, Setup:function() { var self = this; self.Exec(); } }; Menu.prototype.Exec = function() { var self = this; $("#menu .open").on("click",function(){ $("#menu_box").css("display","block"); $("#menu .open").css("display","none"); $("#menu .close").css("display","block"); }); $("#menu .close").on("click",function(){ $("#menu_box").css("display","none"); $("#menu .open").css("display","block"); $("#menu .close").css("display","none"); }); }; return Menu; }(); o.Menu = Menu; var Scroll = function() { function Scroll(){ var self = this; self.Scrollialize(); }; Scroll.prototype = Object.create(Object.prototype); Scroll.prototype.constructor = Scroll; Scroll.prototype = { Scrollialize:function(){ var self = this; self.Setup(); }, Setup:function() { var self = this; self.Exec(); } }; Scroll.prototype.Exec = function() { var self = this; $("a[href^=#]").on("click", function() { $("#menu_box").css("display","none"); $("#menu .open").css("display","block"); $("#menu .close").css("display","none"); var href, isHtmlScroll, pos, speed, target; speed = 1; href = $(this).attr("href"); target = $((href === "#" || href === "" ? "html" : href)); pos = target.offset().top; isHtmlScroll = (function() { var el, html, rs, top; html = $("html"); top = html.scrollTop(); el = $("
").height(10000).prependTo("body"); html.scrollTop(10000); rs = !!html.scrollTop(); html.scrollTop(top); el.remove(); return rs; })(); TweenLite.to($((isHtmlScroll ? "html" : "body")), speed, { scrollTo:{ y:pos }, ease: Expo.easeInOut }); return false; }); }; return Scroll; }(); o.Scroll = Scroll; var Init = function() { function Init(){ var self = this; self.Initialize(); }; Init.prototype = Object.create(Object.prototype); Init.prototype.constructor = Init; Init.prototype = { Initialize:function(){ var self = this; self.Setup(); }, Setup:function() { var self = this; self.Exec(); } }; Init.prototype.Exec = function() { var self = this; }; return Init; }(); o.Init = Init; var Full = function() { function Full(){ var self = this; self.Initialize(); }; Full.prototype = Object.create(Object.prototype); Full.prototype.constructor = Full; Full.prototype = { Initialize:function(){ var self = this; self.Setup(); }, Setup:function() { var self = this; self.Exec(); } }; Full.prototype.Exec = function() { var self = this; self.Resize(); // window.addEventListener("resize", self.Resize.bind(this),false); $(window).on("resize", $.proxy(self.Resize,this)); TweenMax.to($(self.img),0.5,{ overwrite:"all", alpha:1, delay:1, onComplete:function(){ // new Preloader.Init; } }); }; Full.prototype.Resize = function() { var self = this; self.sw = $(window).width(); self.sh = self.sw / self.wh; self.maxW = $(window).width(); self.maxH = $(window).height(); $(".scene").css({height:self.maxH}); $("#menu_box").css({height:self.maxH}); }; return Full; }(); o.Full = Full; })(AllView || (AllView = {})); new AllView.Full; new AllView.Menu; new AllView.Scroll; (function(){ var lastTime = 0; var vendors = [ 'ms', 'moz', 'webkit', 'o' ]; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[ x ]+'RequestAnimationFrame']; window.cancelAnimationFrame = window[ vendors[ x ]+'CancelAnimationFrame'] || window[vendors[ x ]+'CancelRequestAnimationFrame' ]; } if ( !window.requestAnimationFrame ) { window.requestAnimationFrame = function( callback ) { var currTime = new Date().getTime(); var timeToCall = Math.max( 0, 16 - ( currTime - lastTime ) ); var id = window.setTimeout( function() { callback(currTime + timeToCall); }, timeToCall ); lastTime = currTime + timeToCall; return id; }; } if ( !window.cancelAnimationFrame ) { window.cancelAnimationFrame = function( id ) { clearTimeout( id ); }; } var requestAnimationFrame = window.requestAnimationFrame; var cancelAnimationFrame = window.cancelAnimationFrame; }());