Guest User

Untitled

a guest
Mar 20th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.73 KB | None | 0 0
  1. function smoothScroll() {
  2. var a = $(window);
  3. a.on("mousewheel DOMMouseScroll", function(b) {
  4. b.preventDefault();
  5. b = b.originalEvent.wheelDelta / 120 || -b.originalEvent.detail / 3;
  6. b = a.scrollTop() - parseInt(280 * b);
  7. TweenMax.to(a, 1.1, {
  8. scrollTo: {
  9. y: b,
  10. autoKill: !0
  11. },
  12. ease: Power1.easeOut,
  13. overwrite: 5
  14. })
  15. })
  16. }
  17.  
  18. function setScrollIcon() {
  19. setTimeout(function() {
  20. $(".scrollDown").hasClass("on") ? $(".scrollDown").removeClass("on") : $(".scrollDown").addClass("on");
  21. setScrollIcon()
  22. }, 4E3)
  23. }
  24.  
  25. function setAnimLogo() {
  26. setTimeout(function() {
  27. $logo = $(".logo a img");
  28. $date = new Date;
  29. setTimeout(function() {
  30. $logo.attr("src", "./WD_IMAGES/GLOBAL/animation-logo-lempens-design.gif?" + $date.getTime() + "")
  31. }, 1E3);
  32. setAnimLogo()
  33. }, 3E4)
  34. }
  35.  
  36. function detectDevicesandScreens() {
  37. $ifLargeScreen = function() {
  38. return 1600 < $(window).width() ? !0 : !1
  39. }
  40. }
  41.  
  42. function adapt_mainPic_height() {
  43. var a = $(window).height();
  44. $(".mainPicture").height(a)
  45. }
  46.  
  47. function rotateH1() {
  48. $(".rotateH1").each(function(a) {
  49. $(this).prepend('<h1 class="rotateXh1"><span>' + $(this).text() + "</span></h1>")
  50. });
  51. (new ScrollScene({
  52. triggerElement: ".rotateH1FR",
  53. triggerHook: .85,
  54. duration: 500
  55. })).addTo($controller).setTween([TweenMax.fromTo($(".rotateH1FR"), 1, {
  56. rotationX: -110
  57. }, {
  58. rotationX: 0,
  59. ease: Linear.easeNone
  60. }), TweenMax.fromTo($(".rotateH1FR").children(".rotateXh1"), 1, {
  61. backgroundColor: "#dcdbdc"
  62. }, {
  63. backgroundColor: "#868586",
  64. ease: Linear.easeNone
  65. })]);
  66. (new ScrollScene({
  67. triggerElement: ".rotateH1LU",
  68. triggerHook: .85,
  69. duration: 500
  70. })).addTo($controller).setTween([TweenMax.fromTo(".rotateH1LU", 1, {
  71. rotationX: -110
  72. }, {
  73. rotationX: 0,
  74. ease: Linear.easeNone
  75. }), TweenMax.fromTo($(".rotateH1LU").children(".rotateXh1"), 1, {
  76. backgroundColor: "#E1DFDE"
  77. }, {
  78. backgroundColor: "#868586",
  79. ease: Linear.easeNone
  80. })]);
  81. (new ScrollScene({
  82. triggerElement: ".rotateH1BE",
  83. triggerHook: 1,
  84. duration: 500
  85. })).addTo($controller).setTween([TweenMax.fromTo(".rotateH1BE", 1, {
  86. rotationX: -110
  87. }, {
  88. rotationX: 0,
  89. ease: Linear.easeNone
  90. }), TweenMax.fromTo($(".rotateH1BE").children(".rotateXh1"),
  91. 1, {
  92. backgroundColor: "#DCDBDC"
  93. }, {
  94. backgroundColor: "#868586",
  95. ease: Linear.easeNone
  96. })])
  97. }
  98.  
  99. function subnav(a, b, c) {
  100. var d = a.find("li").length;
  101. $(".subnav");
  102. switch (b) {
  103. case "hover":
  104. a.find(".subnav").width(177).css({
  105. overflow: "visible"
  106. });
  107. TweenMax.to(a, .35, {
  108. backgroundColor: "#fff",
  109. ease: "Expo.easeOut"
  110. });
  111. TweenMax.to(a.children("a"), .35, {
  112. backgroundPosition: "center 0px",
  113. ease: "Expo.easeOut"
  114. });
  115. for ($i = 0; $i <= d; $i++) TweenMax.fromTo(a.find("li").eq($i), .35, {
  116. rotationX: 89,
  117. height: 0
  118. }, {
  119. delay: .15 * $i,
  120. rotationX: 0,
  121. height: c,
  122. ease: "Expo.easeOut"
  123. }), TweenMax.to(a.find("li").eq($i).children(".after"), .35, {
  124. delay: .15 * $i,
  125. opacity: 0
  126. });
  127. categorizr.isDesktop && (a.find("li").on($mouseEventHover, function() {
  128. subnavLi($(this), "hover")
  129. }), a.find("li").on($mouseEventOut, function() {
  130. subnavLi($(this), "out")
  131. }), a.find("li").on($mouseEventClick, function() {
  132. var a = $(this).attr("class"),
  133. b = 300;
  134. "france" == a && (b = 500);
  135. TweenMax.to($(window), 1.3, {
  136. scrollTo: {
  137. y: $("#" + a).position().top + b
  138. },
  139. ease: Expo.easeInOut
  140. })
  141. }));
  142. break;
  143. case "out":
  144. TweenMax.to(a, .35, {
  145. backgroundColor: "#ca0a60",
  146. ease: "Back.easeOut"
  147. }), TweenMax.to(a.children("a"), .35, {
  148. backgroundPosition: "center -22px",
  149. ease: "Back.easeOut"
  150. }), a.find(".subnav").width(0).css({
  151. overflow: "hidden"
  152. }), TweenMax.to(a.find("li"), 0, {
  153. height: 0,
  154. rotationX: 90
  155. }), TweenMax.to(a.find("li").children(".after"), 0, {
  156. opacity: 1
  157. })
  158. }
  159. }
  160.  
  161. function subnavLi(a, b) {
  162. switch (b) {
  163. case "hover":
  164. TweenMax.to(a, .3, {
  165. borderWidth: 2,
  166. x: 25,
  167. rotationY: 0,
  168. ease: "Back.easeInOut"
  169. });
  170. TweenMax.fromTo(a.find(".logorub"), .7, {
  171. rotationY: 0
  172. }, {
  173. rotationY: 360,
  174. ease: Back.easeOut
  175. });
  176. break;
  177. case "out":
  178. TweenMax.to(a, .3, {
  179. borderWidth: 0,
  180. x: 0,
  181. rotationY: 0,
  182. ease: "Back.easeInOut"
  183. })
  184. }
  185. }
  186.  
  187. function animate_illustration(a, b) {
  188. $("#" + a).find("div");
  189. TweenMax.killTweensOf($("#" + a));
  190. switch (b) {
  191. case "start":
  192. setTimeout(function() {
  193. $("#" + a).find('div:not(".cloud,.country_name")').each(function(a) {
  194. TweenMax.to($(this), .5, {
  195. delay: .15 * a,
  196. rotationX: 0,
  197. opacity: 1,
  198. ease: "Back.easeOut",
  199. startAt: {
  200. visibility: "visible"
  201. }
  202. })
  203. })
  204. }, 100);
  205. setTimeout(function() {
  206. $("#" + a).find("div.cloud").each(function(a) {
  207. TweenMax.fromTo($(this), .5, {
  208. scale: 3,
  209. opacity: 0,
  210. rotationX: 0,
  211. visibility: "visible"
  212. }, {
  213. delay: .15 * a,
  214. scale: 1,
  215. opacity: 1,
  216. ease: "Back.easeOut"
  217. })
  218. })
  219. },
  220. 400);
  221. setTimeout(function() {
  222. TweenMax.to($("#" + a).find("div.country_name"), .5, {
  223. opacity: 1,
  224. left: $("#" + a).find("div.country_name").data("posx") + "%",
  225. ease: "Back.easeOut"
  226. })
  227. }, 1E3);
  228. break;
  229. case "end":
  230. setTimeout(function() {
  231. $("#" + a).find('div:not(".cloud,.country_name")').each(function(a) {
  232. TweenMax.fromTo($(this), .5, {
  233. rotationX: 0,
  234. startAt: {
  235. visibility: "visible"
  236. }
  237. }, {
  238. delay: .15 * a,
  239. rotationX: -89,
  240. ease: "Back.easeIn",
  241. opacity: 0,
  242. onCompleteParams: [$(this)],
  243. onComplete: function(a) {
  244. a.css({
  245. visibility: "hidden",
  246. opacity: 1
  247. })
  248. }
  249. })
  250. })
  251. }, 400),
  252. $("#" + a).find("div.cloud").each(function(a) {
  253. TweenMax.fromTo($(this), .5, {
  254. scale: 1,
  255. opacity: 1,
  256. startAt: {
  257. visibility: "visible"
  258. }
  259. }, {
  260. delay: .15 * a,
  261. scale: 0,
  262. ease: "Back.easeIn",
  263. opacity: 0,
  264. onCompleteParams: [$(this)],
  265. onComplete: function(a) {
  266. $(this).css({
  267. visibility: "hidden",
  268. opacity: 1,
  269. scale: 3
  270. })
  271. }
  272. })
  273. }), setTimeout(function() {
  274. $("#" + a).find("div.country_name").each(function(a) {
  275. TweenMax.to($(this), .5, {
  276. delay: .15 * a,
  277. opacity: 0,
  278. left: "20%",
  279. ease: "Back.easeOut"
  280. })
  281. })
  282. }, 1E3)
  283. }
  284. }
  285.  
  286. function init_slides() {
  287. TweenMax.killTweensOf($(".skills_circles"), $(".skills_softwares"));
  288. $(".svgCircle").removeClass("animate");
  289. $(".activeThumb").css("opacity", 0);
  290. $(".skills_circles").find("h1").css("opacity", 0);
  291. $(".skills_softwares").children(".row").css({
  292. top: 0,
  293. opacity: 0
  294. });
  295. $(".skills_softwares").find(".col").children("div").css({
  296. height: 0
  297. });
  298. $(".skills_softwares").find(".col").children("h1").css({
  299. marginBottom: -10,
  300. opacity: 0
  301. });
  302. $(".skills_softwares").next("p").css({
  303. opacity: 0
  304. })
  305. }
  306.  
  307. function anim_slide_skills_circles() {
  308. $(".svgCircle").each(function(a) {
  309. $(this).delay(580 * a).fadeIn(0, function() {
  310. $(this).addClass("animate")
  311. })
  312. });
  313. $(".activeThumb").each(function(a) {
  314. $(this).delay(580 * a).fadeIn(0, function() {
  315. TweenMax.fromTo($(this), .3, {
  316. scale: .2,
  317. opacity: 0,
  318. y: -90
  319. }, {
  320. opacity: 1,
  321. scale: 1,
  322. y: 0,
  323. ease: Back.easeOut
  324. })
  325. })
  326. });
  327. $(".skills_circles").find("h1").each(function(a) {
  328. $(this).delay(680 * a).fadeIn(0, function() {
  329. TweenMax.fromTo($(this), .3, {
  330. opacity: 0,
  331. y: -35
  332. }, {
  333. opacity: 1,
  334. y: 0,
  335. ease: Back.easeOut
  336. })
  337. })
  338. })
  339. }
  340.  
  341. function anim_slide_skills_softwares() {
  342. 1 < $(".skills_softwares").length && $(".skills_softwares").eq(0).remove();
  343. $(".skills_softwares").children(".row").each(function(a) {
  344. $(this).delay(150 * a).fadeIn(0, function() {
  345. TweenMax.to($(this), .3, {
  346. top: 45 * a,
  347. opacity: 1,
  348. ease: Back.easeOut
  349. })
  350. })
  351. });
  352. setTimeout(function() {
  353. $(".skills_softwares").find(".col").children("div").each(function(a) {
  354. $(this).delay(150 * a).fadeIn(0, function() {
  355. TweenMax.to($(this), .3, {
  356. height: parseInt(1.8 * $(this).data("skills")),
  357. ease: Back.easeOut
  358. })
  359. })
  360. })
  361. }, 750);
  362. setTimeout(function() {
  363. TweenMax.to($(".skills_softwares").next("p"), 1.5, {
  364. opacity: 1,
  365. ease: Back.easeOut
  366. })
  367. }, 1500);
  368. setTimeout(function() {
  369. $(".skills_softwares").find(".col").children("h1").each(function(a) {
  370. $(this).delay(150 * a).fadeIn(0, function() {
  371. TweenMax.to($(this), .3, {
  372. marginBottom: 20,
  373. opacity: 1,
  374. ease: Back.easeOut
  375. })
  376. })
  377. })
  378. }, 750)
  379. }
  380.  
  381. function int_interests_icons() {
  382. TweenMax.fromTo($(".heart img"), .45, {
  383. scale: 1.4
  384. }, {
  385. repeatDelay: .5,
  386. scale: 1,
  387. repeat: -1,
  388. ease: Back.easeOut
  389. });
  390. $("#interests_about_me").find("span").each(function(a) {
  391. a *= 145;
  392. TweenMax.to($(this), 0, {
  393. startAt: {
  394. backgroundPosition: "-" + a + "px 0"
  395. }
  396. });
  397. $(this).on("mouseenter", function() {
  398. var a = $(this).css("backgroundPosition").split(" ")[0];
  399. $(this).parent().append('<div class="fillBg"></div>');
  400. TweenMax.to($(this), .6, {
  401. backgroundPosition: a + " -145px",
  402. ease: Back.easeOut
  403. });
  404. TweenMax.to($(this).parent().children(".fillBg"),
  405. .3, {
  406. height: 145,
  407. ease: Back.easeOut
  408. })
  409. });
  410. $(this).on("mouseleave", function() {
  411. var a = $(this).css("backgroundPosition").split(" ")[0];
  412. TweenMax.to($(this), .6, {
  413. backgroundPosition: a + " 0px",
  414. ease: Back.easeIn
  415. });
  416. TweenMax.to($(this).parent().children(".fillBg"), .3, {
  417. height: 0,
  418. ease: Back.easeIn,
  419. onCompleteParams: [$(this).parent().children(".fillBg")],
  420. onComplete: function(a) {
  421. a.remove()
  422. }
  423. })
  424. })
  425. })
  426. }
  427. $increment = 0;
  428.  
  429. function countAwards() {
  430. var a = $("#awards .counter"),
  431. b = $(".slideAwards .slick-slide:not(.slick-cloned) a:not(.not_awards)").length,
  432. c;
  433. c = setInterval(function() {
  434. $increment < b + 1 ? (a.html($increment), $increment++) : clearInterval(c)
  435. }, 120)
  436. };
Add Comment
Please, Sign In to add comment