PageRenderTime 72ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 1ms

/js/link.net.js

https://github.com/oligarch777/mobilesoft
JavaScript | 4278 lines | 3900 code | 237 blank | 141 comment | 986 complexity | 23a6e85e0261ac07b25ac9024fd6813a MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. /**
  2. * VERSION: 1.0
  3. * DATE: 2012-09-20
  4. *
  5. * @author: mediacreed, mediacreed.com
  6. **/
  7. /* start GENERAL CUSTOMIZATION PROPERTIES */
  8. var templateBaseURL = "http://localhost/YTS/mobilesoft/mobilesoft/";/*"http://themes.mediacreed.com/html/synergy/"*/
  9. var themeColor = "#008dd3";
  10. var menuActive = true;
  11. var menuHoverActive = true; /* it will change to false if menuActive == true. If 'menuActive'
  12. is false and this true than on hover it will show the menu */
  13. var menuTextOutColor = "#777777";
  14. var customPageStart = true;
  15. var customPageStartURL = "#portfolio.html";
  16. var customPageStartSide = "none";
  17. var customPageStartType = "full_width_gallery";
  18. var phpUrlPath = "php/contact_mobilesoft.php";
  19. var contactFormDemo = false; /* SET IT TO FALSE FOR CONTACT FORM TO WORK */
  20. /* end GENERAL CUSTOMIZATION PROPERTIES */
  21. /* start ready function */
  22. $(document).ready(function(){
  23. readyAndLoad++;
  24. $(window).error(function(msg, url, line){
  25. console.log("error: ", msg, " url: ", url, " line: ", line );
  26. });
  27. if( readyAndLoad == 2 ){ checkIfTouchDevice(); }
  28. });
  29. /* end ready function */
  30. /* start load function */
  31. $(window).load(function(){
  32. readyAndLoad++;
  33. if(templateBaseURL == "http://www.your_domain.com/" || templateBaseURL == "null"){
  34. $("body").empty().css("visibility", "visible").append("<br/><span>Please check the documentation on page 4 on how to change the 'templateBaseURL' path!!!</span>");
  35. return;
  36. }
  37. if( readyAndLoad == 2 ){
  38. checkIfTouchDevice();
  39. }
  40. });
  41. /* end load function */
  42. /* start GENERAL JS PROPERTIES */
  43. var readyAndLoad = 0;
  44. var firstRun = true;
  45. var isOverMenu = false;
  46. var templateMenuW = 0;
  47. var videojsHolder = "";
  48. /* end GENERAL JS PROPERTIES */
  49. /*================= GENERAL TXT NAMES ==========================*/
  50. var t_scrBarV1 = "#module-scrollbar-holder";
  51. var t_scrBarV2 = "#module-scrollbar-holder_v2";
  52. var txt_modCont = "#module-container #module-container-holder";
  53. var touchDevice = 0;
  54. function checkIfTouchDevice(){
  55. touchDevice = !!("ontouchstart" in window) ? 1 : 0;
  56. prepareTemplate();
  57. }
  58. //remove the template loader
  59. function removeTemplateLoader(){
  60. $(".main-template-loader").remove();
  61. var browserVersion = $.browser.version + "";
  62. var documentMode = document.documentMode;
  63. var indexOfChar = browserVersion.indexOf(".");
  64. browserVersion = browserVersion.substring(0, indexOfChar);
  65. if ($.browser.msie && (browserVersion < 8 || ( browserVersion >= 8 && documentMode < 8))){
  66. $("body").empty().css("visibility", "visible");
  67. $("body").append("Your browser is too old for this website. Please upgrade your browser version or experience this website in: Firefox, Chrome, Opera or Safari")
  68. return;
  69. }
  70. if ( ($.browser.msie && ( browserVersion.substr(0,1) > 8 && documentMode > 8 )) || !$.browser.msie ){
  71. if( $("#menu-container").hasClass("shadow-side-all") == false )
  72. $("#menu-container").addClass("shadow-side-all");
  73. }
  74. /*FIRST RUN CONFIGURATION*/
  75. prepareTemplate();
  76. }
  77. /*prepare the settings for the template*/
  78. var templateFirstRun = true;
  79. var templateFirstRunDone = false;
  80. function prepareTemplate(){
  81. if( templateFirstRun == true ){
  82. $("#template-logo").click(function(event){
  83. event.preventDefault();
  84. if( $(this).attr("data-href") != undefined && $(this).attr("data-href") != ""){
  85. window.location.hash = $(this).attr("data-href");
  86. }
  87. else{
  88. window.location.href = templateBaseURL;
  89. }
  90. });
  91. storeMenuArr();
  92. menuListeners();
  93. checkWhatToLoad();
  94. templateFirstRun = false;
  95. }
  96. else{ settingsForScreens(); }
  97. }
  98. /* check what page to load - only on the first run */
  99. function checkWhatToLoad(){
  100. var hrefPath = "";
  101. var url = "";
  102. currModuleType = $("#template-menu").attr("data-current-module-type");
  103. sideType = $("#template-menu").attr("data-side");
  104. url = $("#template-menu").attr("data-href").replace('#','');
  105. prevURL = "#" + url;
  106. if( templateFirstRun == true ){
  107. var checkURL = document.URL;
  108. checkURL = checkURL.replace(templateBaseURL, "");
  109. var hashURL = "";
  110. if(checkURL.indexOf("#") == -1 && checkURL != ""){
  111. if( checkURL == "index.html" || checkURL == "index.htm" ){
  112. checkURL = "";
  113. if( checkURL == "" && customPageStart == true ){
  114. checkURL = customPageStartURL;
  115. checkURL = checkURL.replace(templateBaseURL, "");
  116. }
  117. checkURL = checkURL.replace("#", "");
  118. checkURL = checkURL.substring( checkURL.lastIndexOf("/") + 1);
  119. hashURL = updateMenu(checkURL, prevURL, false, true);
  120. window.location.hash = hashURL;
  121. }
  122. else{
  123. window.location.href = templateBaseURL + checkURL;
  124. }
  125. }
  126. else{
  127. if( checkURL == "" && customPageStart == true ){
  128. checkURL = customPageStartURL;
  129. checkURL = checkURL.replace(templateBaseURL, "");
  130. url = customPageStartURL.replace("#", "");
  131. }else{
  132. checkURL = checkURL.replace("#", "");
  133. checkURL = checkURL.substring( checkURL.lastIndexOf("/") + 1);
  134. checkURL = (checkURL != "" && checkURL != "#") ? checkURL : url;
  135. url = checkURL;
  136. if( checkURL.indexOf("index.html") != -1 || checkURL.indexOf("index.htm") != -1){
  137. checkURL = checkURL.substring( checkURL.lastIndexOf("#") + 1);
  138. }
  139. }
  140. checkURL = checkURL.replace("#", "");
  141. checkURL = checkURL.substring( checkURL.lastIndexOf("/") + 1);
  142. hashURL = updateMenu(checkURL, prevURL, false, true);
  143. window.location.hash = hashURL;
  144. }
  145. }
  146. hrefPath = oldMenuData[3];
  147. hrefPath = (hrefPath == undefined) ? "" : hrefPath;
  148. setMobileMenuOption(oldMenuData[2]);
  149. $("#module-container").empty();
  150. $("#module-container").load( hrefPath + url + ' #module-container > *', firstRunLoaded );
  151. }
  152. /* select the current mobile option */
  153. function setMobileMenuOption( option ){
  154. var i =0;
  155. option = option.replace("#", "");
  156. $("#template-smpartphone-menu select").find("option").each(function(){
  157. var optVal = $(this).attr("value").replace("#", "");
  158. if( optVal == option ) {
  159. $(this).attr("selected","selected");
  160. }
  161. i++;
  162. });
  163. }
  164. /* on template hash change */
  165. function onTemplateHashChange( event, runLoad ){
  166. var url = window.location.hash + "",
  167. oldMenuID = menuOptionID,
  168. oldSubID = submenuOptionID,
  169. disabMenu = true,
  170. tempMenuData = menuData;
  171. url = url.replace("#", "");
  172. url = url.substring( url.lastIndexOf("/") + 1);
  173. updateMenu( url, prevURL, undefined, true);
  174. oldMenuData = tempMenuData;
  175. if( oldMenuID != menuOptionID ){
  176. disabMenu = undefined;
  177. }
  178. menuOptionOut(oldMenuID, oldSubID, disabMenu);
  179. menuData = ( menuOptionsArr[ menuOptionID ][ 1 ] != "null" ) ? menuOptionsArr[ menuOptionID ][ 1 ]: menuOptionsArr[ menuOptionID ][ 6 ][ submenuOptionID ][ 1 ] ;
  180. setMobileMenuOption(menuData[2]);
  181. touchContainer();
  182. urlChanged();
  183. }
  184. /* update menu */
  185. function updateMenu( currentURL, prevURL, sameURLParent, animate ){
  186. currentURL = currentURL.replace("#", "");
  187. prevURL = prevURL.replace("#", "");
  188. var returnURL = "",
  189. i = 0,
  190. j = 0,
  191. tempMenuID = 0,
  192. tempSubmID = 0,
  193. idx = menuOptionsArr.length;
  194. while(idx--){
  195. if( menuOptionsArr[ idx ][ 1 ] != "null" ){
  196. if(currentURL == menuOptionsArr[ idx ][ 1 ][ 2 ]){
  197. returnURL = "#" + menuOptionsArr[ idx ][ 1 ][ 2 ];
  198. setMenuData(menuOptionsArr[ idx ][ 1 ]);
  199. menuOptionID = idx;
  200. submenuOptionID = -1;
  201. if( animate == true ){
  202. menuOptionIn(menuOptionID, submenuOptionID);
  203. }
  204. idx = 0;
  205. }
  206. }
  207. else{
  208. var subMenu = menuOptionsArr[ idx ][ 6 ];
  209. var subLength = subMenu.length;
  210. while( subLength-- ){
  211. if( currentURL == subMenu[ subLength ][ 1 ][ 2 ]){
  212. returnURL = subMenu[ subLength ][ 0 ];
  213. setMenuData(subMenu[ subLength ][ 1 ]);
  214. menuOptionID = idx;
  215. submenuOptionID = subLength;
  216. if( animate == true ){
  217. menuOptionIn(menuOptionID, submenuOptionID);
  218. }
  219. idx = 0;
  220. }
  221. }
  222. }
  223. }
  224. return returnURL;
  225. }
  226. /* on first run loaded html page */
  227. function firstRunLoaded(response, status, xhr){
  228. $(window).bind('hashchange', onTemplateHashChange);
  229. switch ( status ){
  230. case "error":console.log( "Error loading the INDEX page: " + response );
  231. break;
  232. case "success": TweenMax.to($(".main-template-loader"), .3, { css:{opacity: "0"}, ease:Sine.easeOut, onComplete: removeTemplateLoader });
  233. break;
  234. }
  235. }
  236. /* menu width */
  237. function getMenuWidth(){
  238. return $("#menu-container").width();
  239. }
  240. /* menu height */
  241. function getMenuHeight(){
  242. return $("#menu-container").height();
  243. }
  244. /* settings for screen resolutions */
  245. function settingsForScreens(){
  246. $("body").css("visibility", "visible" );
  247. var menuWidth = parseInt( $("#menu-container .menu-content-holder").css("width"), 10 );
  248. var menuHider = parseInt( $("#menu-container #menu-hider").width(), 10 );
  249. var menuHiderIcon = parseInt( $("#menu-container #menu-hider #menu-hider-icon").width(), 10 );
  250. var menuHeight = parseInt( $("#menu-container").css("height"), 10 );
  251. var menuHiderH = parseInt( $("#menu-container #menu-hider").height(), 10 );
  252. var menuHiderIconH = parseInt( $("#menu-container #menu-hider #menu-hider-icon").height(), 10 );
  253. templateMenuW = menuWidth + menuHider;
  254. $("#menu-hider-icon").click(menuHideClick);
  255. $("#module-container").css( "width", ($(window).width() - templateMenuW) + "px" );
  256. if( $(window).width() > 767){
  257. $("#menu-container").css('left', -(menuWidth + menuHider + menuHiderIcon) + 'px');
  258. $("#menu-container").css( 'visibility', 'visible' );
  259. $("#menu-hider").css( 'display', 'inline' );
  260. $("#menu-hider").css( 'visibility', 'visible' );
  261. /*start-up animation*/
  262. $("#module-container").css( "opacity", 1 );
  263. $("#module-container").css( "left", menuWidth + menuHider + "px" );
  264. $("footer").css( 'display', 'inline' );
  265. TweenMax.to( $("#menu-container"), .4, { css:{left: "0px"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });
  266. /*end start-up animation*/
  267. }
  268. if( $(window).width() <= 767 ){
  269. templateMenuW = 0;
  270. var containerH = $(window).height() - (menuHeight + menuHiderH);
  271. $("#menu-container").css("left", "0px");
  272. $("#menu-container").css("top", -(menuHeight + menuHiderH + menuHiderIconH) + "px");
  273. $("#menu-container").css( "visibility", "visible" );
  274. $("#menu-hider").css( "display", "inline" );
  275. $("#menu-hider").css( "visibility", "visible" );
  276. /*start-up animation*/
  277. $("#module-container").css( "opacity", "1" );
  278. $("#module-container").css( "left", "0px" );
  279. $("#module-container").css( "top", (menuHeight + menuHiderH) + "px" );
  280. $("#module-container").css( "height", containerH );
  281. TweenMax.to( $("#menu-container"), .4, { css:{top: "0px"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });
  282. /*end start-up animation*/
  283. }
  284. $("#template-smpartphone-menu select").change(
  285. function(){
  286. if( $(this).val() != "#"){
  287. var hashURL = updateMenu( $(this).val(), prevURL, undefined, false);
  288. window.location.hash = hashURL;
  289. }
  290. });
  291. /*
  292. if( touchDevice == 1){
  293. $("#theme-panel").css("display", "none");
  294. $("#console-log").css("display", "inline");
  295. $("#console-log").css("left", "300px");
  296. $("#console-log").css("top", "10px")
  297. }*/
  298. }
  299. var delayInterval = "";
  300. function endStartupAnimation(){
  301. templateFirstRunDone = true;
  302. delayInterval = setInterval(function()
  303. {
  304. showModule();
  305. clearInterval( delayInterval );
  306. }, 200);
  307. }
  308. /*end module start*/
  309. function endModuleStart(){
  310. }
  311. /*menu hide click*/
  312. function menuHideClick(){
  313. var winW = $(window).width(),
  314. winH = $(window).height();
  315. if( menuActive == true ){
  316. menuActive = false;
  317. alwaysUpdate();
  318. if( winW >= 768 ){
  319. var menuHider = ($("#menu-hider").length > 0 ) ? parseInt($("#menu-hider").width(), 10) : 0,
  320. menuWidth = parseInt( $("#menu-container").css("width"), 10 ) - menuHider,
  321. menuVal = 0;
  322. TweenMax.to( $("#template-wrapper"), .4, { css:{left: -(menuWidth ) + "px"}, ease:Sine.easeInOut });
  323. TweenMax.to( $("#menu-container"), .4, { css:{left: menuVal + "px"}, ease:Sine.easeInOut, onComplete:function()
  324. {if(touchDevice == 0)activateHoverMenu();}
  325. });
  326. }
  327. else{
  328. var menuHiderH = parseInt( $("#menu-container #menu-hider").height(), 10 ),
  329. menuHeight = parseInt( $("#menu-container").css("height"), 10 ) - menuHiderH,
  330. menuVal = 0;
  331. TweenMax.to( $("#template-wrapper"), .4, { css:{top: -(menuHeight ) + "px"}, ease:Sine.easeInOut });
  332. TweenMax.to( $("#menu-container"), .4, { css:{top: menuVal + "px"}, ease:Sine.easeInOut, onComplete:function()
  333. {if(touchDevice == 0)activateHoverMenu();}
  334. });
  335. }
  336. }
  337. else{
  338. if(touchDevice == 0)disableHoverMenu();
  339. menuActive = true;
  340. isOverMenu = false;
  341. alwaysUpdate();
  342. TweenMax.to( $("#template-wrapper"), .4, { css:{left: "0px", top: "0px"}, ease:Sine.easeInOut });
  343. TweenMax.to( $("#menu-container"), .4, { css:{left: "0px"}, top: "0px", ease:Sine.easeInOut });
  344. }
  345. }
  346. /* activate hover menu */
  347. function activateHoverMenu(){
  348. $("#menu-container").bind( "mouseenter", overMenu );
  349. $("#menu-hider-icon").bind( "mouseenter", menuHiderOver );
  350. $("#menu-hider-icon").bind( "mouseleave", menuHiderOver );
  351. $("#menu-container").bind( "mouseleave", outMenu );
  352. }
  353. /* menu hider over */
  354. function menuHiderOver(event){
  355. event.stopPropagation();
  356. }
  357. /* disable hover menu */
  358. function disableHoverMenu(){
  359. $("#menu-container").unbind( "mouseenter", overMenu );
  360. $("#menu-hider-icon").unbind( "mouseenter", menuHiderOver );
  361. $("#menu-hider-icon").unbind( "mouseleave", menuHiderOver );
  362. $("#menu-container").unbind( "mouseleave", outMenu );
  363. }
  364. /* over menu */
  365. function overMenu(){
  366. if( menuActive == true) return;
  367. isOverMenu = true;
  368. TweenMax.to( $("#template-wrapper"), .4, { css:{left: "0px", top:"0px"}, ease:Sine.easeInOut });
  369. TweenMax.to( $("#menu-container"), .4, { css:{left: "0px", top:"0px"}, ease:Sine.easeInOut });
  370. alwaysUpdate();
  371. }
  372. /* out menu */
  373. function outMenu(){
  374. if( menuActive == true) return;
  375. isOverMenu = false;
  376. var winW = $(window).width(),
  377. winH = $(window).height();
  378. if(winW >= 768){
  379. var menuWidth = parseInt( $("#menu-container").css("width"), 10 ) - parseInt($("#menu-hider").width(), 10),
  380. menuVal = 0;
  381. TweenMax.to( $("#template-wrapper"), .4, { css:{left: -(menuWidth ) + "px", top:"0px"}, ease:Sine.easeInOut });
  382. TweenMax.to( $("#menu-container"), .4, { css:{left: menuVal + "px", top:"0px"}, ease:Sine.easeInOut });
  383. }else{
  384. var menuHiderH = parseInt( $("#menu-container #menu-hider").height(), 10 ),
  385. menuHeight = parseInt( $("#menu-container").css("height"), 10 ) - menuHiderH,
  386. menuVal = 0;
  387. TweenMax.to( $("#template-wrapper"), .4, { css:{top: -(menuHeight ) + "px", left: "0px"}, ease:Sine.easeInOut });
  388. TweenMax.to( $("#menu-container"), .4, { css:{top: menuVal + "px", left: "0px"}, ease:Sine.easeInOut, onComplete:function()
  389. {if(touchDevice == 0)activateHoverMenu();}
  390. });
  391. }
  392. alwaysUpdate()
  393. }
  394. /* always update */
  395. function alwaysUpdate(){
  396. if( currentSlide != null )resizeImage(currentSlide, true);/* ONLY IF SLIDESHOW ACTIVE */
  397. if( $showModuleBackground != null )resizeImage( $showModuleBackground, true );/*BACKGROUND CHECK*/
  398. var winW = $(window).width();
  399. var winH = $(window).height();
  400. var newModContW = winW - get_OffsetWidth();
  401. var newModContH = winH;
  402. var cModuleType = $("#template-menu").attr("data-current-module-type")
  403. if( winW < 768 ){
  404. var menuHiderH = parseInt( $("#menu-container #menu-hider").height(), 10 ),
  405. menuHeight = winH - menuHiderH;
  406. newModContH = menuHeight;
  407. }
  408. TweenMax.to( $("#module-container"), .4, { css:{width: newModContW + "px", height: newModContH + "px"}, ease:Sine.easeInOut });
  409. if( $("#module-container-old") != null && $("#module-container-old").length > 0 ){
  410. if($("#module-container-old #module-background-holder").length > 0){resizeImage($("#module-container-old #module-background-holder"), true);}
  411. if($("#module-container-old #slide-current").length > 0){resizeImage($("#module-container-old #slide-current"), true);}
  412. }
  413. var thumbsHolder = $('#slideshow-thumbs');
  414. if( thumbsHolder.length > 0){
  415. var val = (newModContW - thumbsHolder.width() )* .5;
  416. TweenMax.to( thumbsHolder, .4, {css:{marginLeft: val}, easing:Sine.easeOut});
  417. }
  418. var slideHolder = $("#slideshow .slideshow-slide", $("#module-container"));
  419. if( slideHolder.length > 0 ){
  420. $("#slideshow-captions", slideHolder ).each(function(){
  421. $(this ).css("top", (newModContH * 0.3) + "px");
  422. TweenMax.to( $(this ), .4, { css:{width: (newModContW * 0.5) + "px"}, ease:Sine.easeInOut });
  423. });
  424. }
  425. var moduleContainerHolder = $(txt_modCont);
  426. var modulePosition = moduleContainerHolder.attr("data-id");
  427. if( modulePosition == "module-position-bc" || modulePosition == "module-position-cc" ){
  428. if( moduleContainerHolder.length > 0 ){
  429. var value = Math.round(( newModContW - $(":first", moduleContainerHolder).width() ) * 0.5 );
  430. TweenMax.to( moduleContainerHolder, .4, {css:{left: value}, easing:Sine.easeOut});
  431. }
  432. }
  433. var fullWidGalModule = $("#module-full-width-gallery");
  434. if( fullWidGalModule.length > 0 ){
  435. if( initialThumbW <= 0)
  436. return;
  437. moduleUpdate_full_width_gallery();
  438. }
  439. var contactModule = $("#module-contact #module-contact-holder");
  440. if( contactModule.length > 0 ){
  441. moduleUpdate_contact();
  442. TweenMax.to( contactModule, .4, {css:{left: (newModContW - contactModule.width())*.5}, easing:Sine.easeOut});
  443. }
  444. var fullWidModule = $("#module-full-width");
  445. if( fullWidModule.length > 0 ){
  446. moduleUpdate_full_width( true );
  447. }
  448. var fullscreenVideo = $("#module-fullscreen-video");
  449. if( fullscreenVideo.length > 0 ){
  450. moduleUpdate_fullscreen_video( true )
  451. }
  452. if( cModuleType == "text_page"){
  453. moduleUpdate_text_page();
  454. }
  455. }
  456. /*----------------- start showTemplate --------------------*/
  457. var $showModuleBackground = null;
  458. var $showModuleBackgroundSolid = null;
  459. var showDone = false;
  460. function showModule(){
  461. if( templateFirstRunDone == false ){return;}
  462. if( moduleList != null ){
  463. moduleList.destroy();
  464. moduleList = null;
  465. }
  466. if( $("#template-menu").attr("data-current-module-type") == "slideshow" ){
  467. if(firstMediaLoaded == false ){return;}
  468. firstMediaLoaded = false;
  469. TweenMax.to( $("#loading-animation"), .3, { css:{right:"-104px"}, delay: .3, ease:Circ.easeOut });
  470. if( isOtherURL == true ){urlChanged();}
  471. else{
  472. loadedContent = true;
  473. moduleSlideshow();
  474. }
  475. }
  476. else{
  477. $showModuleBackground = $("#module-container #module-background-holder #module-background");
  478. $showModuleBackgroundSolid = $("#module-container #module-background-holder div");
  479. showDone = true;
  480. if( $showModuleBackground != null && $showModuleBackground.length > 0 ){
  481. if( backLoaded == true){
  482. showDone = true;
  483. animateModuleBackground();
  484. }
  485. }
  486. else if( $showModuleBackgroundSolid != null && $showModuleBackgroundSolid.length > 0 ){
  487. backLoaded = true;
  488. if( backLoaded == true){
  489. showDone = true;
  490. $showModuleBackground = null;
  491. $showModuleBackgroundSolid.css('display', 'inline').css("opacity", "0").css("visibility", "visible");
  492. TweenMax.to( $showModuleBackgroundSolid, .4, { css:{opacity:"1"}, delay: .4, ease:Sine.easeOut, onComplete:
  493. function(){
  494. if( isOtherURL == true ){urlChanged();}
  495. else{startModule();}
  496. }
  497. });
  498. TweenMax.to( $("#loading-animation"), .3, { css:{right:"-104px"}, ease:Circ.easeOut });
  499. }
  500. }
  501. else{
  502. $showModuleBackground = null;
  503. backLoaded = false;
  504. if( isOtherURL == true ){urlChanged();}
  505. else{TweenMax.to( $("#loading-animation"), .3, { css:{right:"-104px"}, delay: .3, ease:Circ.easeOut, onComplete: startModule });}
  506. }
  507. }
  508. }
  509. var backLoaded = false;
  510. /* animate module background */
  511. function animateModuleBackground(){
  512. backLoaded = true;
  513. if( showDone == true ){
  514. showDone = false;
  515. backLoaded = false;
  516. TweenMax.to( $("#loading-animation"), .3, { css:{right:"-104px"}, delay: .3, ease:Circ.easeOut, onComplete:
  517. function(){
  518. if( isOtherURL == true ){urlChanged();}
  519. else{hideAnimationCompleted();}
  520. }
  521. });
  522. }
  523. }
  524. /* hide animation completed */
  525. function hideAnimationCompleted(){
  526. $showModuleBackground = $("#module-container #module-background");
  527. if( $showModuleBackground.length > 0 ){
  528. resizeImage( $showModuleBackground );
  529. $showModuleBackground.css('display', 'inline').css("opacity", "0").css("visibility", "visible").css("left", (- 60) + "px");
  530. TweenMax.to( $showModuleBackground, .6, { css:{opacity:"1", left: "0px" }, ease:Circ.easeOut, onComplete:
  531. function(){
  532. if( isOtherURL == true ){urlChanged();}
  533. else{startModule();}
  534. }
  535. });
  536. }
  537. }
  538. var endModuleFunction = null;
  539. var endPreviousModule = false;
  540. var previousModuleType = "";
  541. /* start module */
  542. function startModule(){
  543. loadedContent = true;
  544. var moduleType = $("#template-menu").attr("data-current-module-type");
  545. if( menuData[2] != oldMenuData[2] && menuData[2] != undefined ){
  546. clearCustomInterval( showModuleInterval );
  547. urlChanged();
  548. return;
  549. }
  550. previousModuleType = moduleType;
  551. endShowPage();
  552. templateCollectGarbage();
  553. switch( moduleType ){
  554. case "slideshow": moduleSlideshow();
  555. break;
  556. case "home2": moduleHome2();
  557. break;
  558. case "home3": moduleHome3();
  559. break;
  560. case "banner": moduleBanner();
  561. break;
  562. case "text_page": moduleTextPage();
  563. break;
  564. case "news": moduleNews();
  565. break;
  566. case "contact": moduleContact();
  567. break;
  568. case "showreel": moduleShowreel();
  569. break;
  570. case "gallery": moduleGallery();
  571. break;
  572. case "full_width": moduleFullWidth();
  573. break;
  574. case "full_width_gallery": moduleFullWidthGallery();
  575. break;
  576. case "page_columns": modulePageColumns();
  577. break;
  578. case "fullscreen_video": moduleFullscreenVideo();
  579. break;
  580. case "pricing_tables": modulePricingTables();
  581. break;
  582. }
  583. }
  584. /* end show page */
  585. function endShowPage(){
  586. if( firstRun == true ){
  587. firstRun = false;
  588. /*endModuleStart();*/
  589. }
  590. if( $("#module-container-old").length > 0 ){
  591. $("body").find("#module-container-old").each( function(){ $(this).empty().remove(); });
  592. }
  593. }
  594. /*----------------- end showTemplate ----------------------*/
  595. /*----------------- start Modules Methods -----------------*/
  596. /*================= SLIDESHOW =============================*/
  597. var slideshowLimit = 0;
  598. var slideshowCurrID = 0;
  599. var slideshowPrevID = 0;
  600. var oldSlide = '';
  601. var slidesArray = new Array();
  602. var thumbsList = null;
  603. var currentSlide = null;
  604. var slideshowAutoPlay = false;
  605. var timerSec = 5;
  606. var timerSlideshow = null;
  607. var firstMediaLoaded = false;
  608. function moduleSlideshow(){
  609. slideshowCurrID = 0;
  610. slideshowPrevID = 0;
  611. currentSlide = $("#slide-current");
  612. currentSlide.attr("style", "display:list-item; visibility: visible; left:" + (-60) + "px;");
  613. resizeImage( currentSlide );
  614. currentSlide.css( "opacity", "0");
  615. storeAllSlides();
  616. $("#module-container").css( 'visibility', 'visible' );
  617. TweenMax.to( currentSlide, .6, { css:{opacity:"1", left: "0px" }, ease:Circ.easeOut, onComplete: slideshowShowThumbs });
  618. }
  619. function onFirstMediaLoaded() {
  620. firstMediaLoaded = true;
  621. showModule();
  622. $("#slide-current").attr("onload", "");
  623. }
  624. function storeAllSlides(){
  625. var i = 0;
  626. $("#slideshow").children().each(function() {
  627. slidesArray[ i ] = new Array();
  628. if( i != 0){
  629. var imgSrc = $('#slide-src', this);
  630. var imgTag = '<img src="'+ imgSrc.attr("data-src") + '" alt="" />';
  631. imgSrc.after(imgTag).remove();
  632. }
  633. slidesArray[ i ][ 0 ] = $('img', this);
  634. var captions = new Array();
  635. var captionsW = new Array();
  636. var j = 0;
  637. $('#slideshow-captions', this ).css("top", ($(window).height() * 0.3) + "px");
  638. $('#slideshow-captions', this ).css("left", ($("#module-container").width() * 0.5) + "px");
  639. $('#slideshow-captions', this ).children().each(function(){
  640. captions[ j ] = $(this);
  641. captionsW[ j ] = $(this).width();
  642. j++;
  643. });
  644. slidesArray[ i ][ 1 ] = captions;
  645. slidesArray[ i ][ 2 ] = captionsW;
  646. i++;
  647. });
  648. slideshowLimit = i++;
  649. if( slidesArray[ 0 ][ 1 ].length != 0 )captionAvailable = true;
  650. currentThumb = $('#slideshow-thumbs-container .slideshow-thumb-holder').slice( 0, 1);
  651. if( currentThumb.hasClass( 'thumb-selected' ) == false ){
  652. $(currentThumb).addClass( 'thumb-selected' );
  653. $("#thumb-image-hover", currentThumb).removeClass().attr("style", "left: 0px; top: 0px;");
  654. $("img", $(currentThumb)).attr("style", "border-color:" + themeColor + ";");
  655. }
  656. }
  657. function startTimer(){
  658. if( timerSlideshow == null ){
  659. timerSlideshow = $.timer(checkSlideshowTimer);
  660. timerSlideshow.set({ time : timerSec * 1000, autostart : false });
  661. }
  662. }
  663. function checkSlideshowTimer(){
  664. timerSlideshow.stop();
  665. if( slideshowCurrID < slideshowLimit-1 ){
  666. slideshowPrevID = slideshowCurrID;
  667. slideshowCurrID++;
  668. }
  669. else{
  670. slideshowPrevID = slideshowCurrID;
  671. slideshowCurrID = 0;
  672. }
  673. var spanEmpty = document.getElementById("slideshow-thumbs-counter").getElementsByTagName("span");
  674. $(spanEmpty).empty().append( (slideshowCurrID+1) + '/' + total);
  675. stopOrHidePrevCaptions();
  676. }
  677. function stopSlideshowTimer(){ timerSlideshow.stop(); }
  678. function deleteSlideshowTimer(){
  679. if( timerSlideshow != null ){
  680. timerSlideshow.stop();
  681. timerSlideshow = null;
  682. }
  683. }
  684. /* END SHOW PAGE WHEN SLIDESHOW MODULE IS NEXT */
  685. function slideshowShowThumbs(){
  686. endShowPage();
  687. if( thumbsList != null ){
  688. thumbsList.destroy();
  689. thumbsList = null;
  690. }
  691. if(touchDevice == 0){
  692. thumbsList = $("#slideshow-thumbs-content").McCustomList({ scrollDirection: "horizontal", scrollType: "linear" });
  693. thumbsList.setupList({
  694. scrollContainer: $('#slideshow-thumbs-container'),
  695. mouseWheelSupport: "yes",
  696. buttonsSupport: "no",
  697. draggerContainer: null,
  698. draggerScroll: null,
  699. totalMinusSize: 0,
  700. scrollSpeed: 112,
  701. offsetSize: -4, /* this is the margin right of the thumbs. On the last thumbs we have this margin */
  702. horizFixHolder: $('.horizontal-fix-slideshow-thumbs')
  703. });
  704. $("#slideshow-thumbs-container").find(".slideshow-thumb-holder").hover(
  705. function(event) {
  706. if( $(this).hasClass( 'thumb-selected' ) == false )
  707. {
  708. customHoverAnimation( "over", event, $(this), $("#thumb-image-hover", this) );
  709. TweenMax.to( $("img", this), .6, { css:{borderColor: themeColor}, ease:Circ.easeOut });
  710. }
  711. },
  712. function(event) {
  713. var color = '#ffffff';
  714. if( $(this).hasClass( 'thumb-selected' ) == false )
  715. {
  716. customHoverAnimation( "out", event, $(this), $("#thumb-image-hover", this) );
  717. TweenMax.to( $("img", this), .6, { css:{borderColor: color}, ease:Circ.easeOut });
  718. }
  719. }
  720. );
  721. var instanceArr = $(".slideshow-thumbs-arrow-backward .slideshow-thumbs-arrow-backg");
  722. var initOpacity = instanceArr.css("opacity");
  723. var initBackColor = rgb2hex( instanceArr.css("background-color") );
  724. var bothArrows = $(".slideshow-thumbs-arrow-backward, .slideshow-thumbs-arrow-forward");
  725. var thumbArrBack = $("#slideshow-thumbs-holder .slideshow-thumbs-arrow-backward");
  726. var thumbArrForw = $("#slideshow-thumbs-holder .slideshow-thumbs-arrow-forward");
  727. bothArrows.unbind('mouseenter mouseleave');
  728. bothArrows.hover(
  729. function() {
  730. TweenMax.to( $(".slideshow-thumbs-arrow-backg", this), 0.3, {css:{opacity: "1", backgroundColor: themeColor }, easing:Sine.easeOut });
  731. },
  732. function() {
  733. TweenMax.to( $(".slideshow-thumbs-arrow-backg", this), 0.3, {css:{opacity: initOpacity, backgroundColor: initBackColor}, easing:Sine.easeOut });
  734. }
  735. );
  736. thumbArrBack.unbind("click");thumbArrForw.unbind("click");
  737. thumbArrForw.click(function() {
  738. if( thumbsList != null )thumbsList.listAutoScroll(-1);
  739. });
  740. thumbArrBack.click(function(){
  741. if( thumbsList != null )thumbsList.listAutoScroll(1);
  742. });
  743. }
  744. else{
  745. if( touchDevice == 1 ){
  746. var thumbArrBack = $("#slideshow-thumbs-holder .slideshow-thumbs-arrow-backward");
  747. var thumbArrForw = $("#slideshow-thumbs-holder .slideshow-thumbs-arrow-forward");
  748. thumbArrBack.css("display", "none");
  749. thumbArrForw.css("display", "none");
  750. }
  751. }
  752. var total = slidesArray.length;
  753. var spanEmpty = document.getElementById("slideshow-thumbs-counter").getElementsByTagName("span");
  754. $(spanEmpty).empty().append( (slideshowCurrID+1) + '/' + total);
  755. /*'[id^="matchItem_"]' "#slideshow-thumb-holder" //'div[id^="matchItem_"]'*/
  756. var slideshowThumbsCont = $("#slideshow-thumbs-container .slideshow-thumb-holder");
  757. slideshowThumbsCont.click(function() {
  758. var index = slideshowThumbsCont.index( this );
  759. if( slideshowCurrID == index ) return;
  760. slideshowPrevID = slideshowCurrID;
  761. slideshowCurrID = index;
  762. if(timerSlideshow != null )timerSlideshow.stop();
  763. $(spanEmpty).empty().append( (index+1) + '/' + total);
  764. changeThumbsSelection( this );
  765. stopOrHidePrevCaptions();
  766. });
  767. var thumbsHolder = $('#slideshow-thumbs');
  768. var val = -Math.abs(thumbsHolder.width() - get_OffsetWidth()) / 2;
  769. thumbsHolder.attr("style", "margin-left:" + val + "px; bottom: -84px; visibility: visible;");
  770. if(touchDevice == 1){
  771. $('.horizontal-fix-slideshow-thumbs').css( "width", 999999 );
  772. $('#slideshow-thumbs-container').css("width", $('#slideshow-thumbs-container').width() );
  773. $('.horizontal-fix-slideshow-thumbs').css("width", '');
  774. $("#slideshow-thumbs-content").css("overflow", "auto");
  775. $("#slideshow-thumbs-content").css("-webkit-overflow-scrolling", "touch");
  776. }
  777. startTimer();
  778. initialThumbContW = $("#slideshow-thumbs-content").width();
  779. moduleUpdate_slideshow();
  780. TweenMax.to( thumbsHolder, .6, { css:{bottom:"4px"}, delay:0.6, ease:Circ.easeOut, onComplete: checkCaption });
  781. }
  782. var initialThumbContW = 0;
  783. function changeThumbsSelection( cThumb ) {
  784. oldThumb = $('#slideshow-thumbs-container .thumb-selected');
  785. var color = "#ffffff";
  786. if( oldThumb.length > 0 ){
  787. oldThumb.removeClass('thumb-selected');
  788. TweenMax.to( $("#thumb-image-hover", oldThumb), .3, { css:{ left:"-100%", top: "0%"}, ease:Sine.easeInOut});
  789. TweenMax.to( $('img', oldThumb), .6, { css:{borderColor: color}, ease:Circ.easeOut });
  790. }
  791. currentThumb = $(cThumb);
  792. if( currentThumb.hasClass( 'thumb-selected' ) == false ){
  793. currentThumb.addClass('thumb-selected');
  794. TweenMax.to( $("#thumb-image-hover", currentThumb), .3, { css:{ left:"0", top: "0%"}, ease:Sine.easeInOut });
  795. TweenMax.to( $('img', currentThumb), .6, { css:{borderColor: themeColor}, ease:Circ.easeOut });
  796. }
  797. }
  798. function changeSlideshowSlides( prevSlideID, currSlideID ){
  799. if( slidesArray[ prevSlideID ][ 0 ].attr('id') == 'slide-current' ){
  800. slidesArray[ prevSlideID ][ 0 ].removeAttr("id");
  801. oldSlide = slidesArray[ prevSlideID ][ 0 ];
  802. oldSlide.css("style", "z-index: 1;");
  803. }
  804. slidesArray[ currSlideID ][ 0 ].attr( "id", "slide-current" );
  805. currentSlide = slidesArray[ currSlideID ][ 0 ];
  806. if(currentSlide.css("style") != undefined)currentSlide.removeAttr('style');
  807. currentSlide.attr("style", "z-index: 2; display:list-item; left: 0px; visibility: visible;");
  808. resizeImage( currentSlide );
  809. currentSlide.css("opacity", "0");
  810. TweenMax.to( currentSlide, .6, { css:{opacity:"1" }, ease:Sine.easeOut, onComplete: completeSlideTransition });
  811. }
  812. function completeSlideTransition(){
  813. var i = 0;
  814. var total = slidesArray.length;
  815. for( i = 0; i < total; i++ ){
  816. if( i != slideshowPrevID && i != slideshowCurrID )slidesArray[ i ][ 0 ].attr("style", "display:none; opacity: 0; visibility: hidden;");
  817. }
  818. if( oldSlide != '' )oldSlide.attr("style", "display:none; opacity: 0; visibility: hidden;");
  819. checkCaption();
  820. }
  821. var showingInProgress = 0;
  822. function checkCaption(){
  823. if( showingInProgress == 1)return;
  824. if( slideshowAutoPlay == true && timerSlideshow != null ){
  825. /*checkSlideshowTimer();*/
  826. timerSlideshow.play(true);
  827. }
  828. if( slidesArray[ slideshowCurrID ][ 1 ].length != 0 ){
  829. showingInProgress = 1;
  830. var i = 0;
  831. var total = slidesArray[ slideshowCurrID ][ 1 ].length;
  832. var windowH = $(window).height();
  833. var windowW = $(window).width();
  834. for( i = 0; i < total; i++ ){
  835. var obj = slidesArray[ slideshowCurrID ][ 1 ][ i ];
  836. obj.css( 'width', '' );
  837. var width = slidesArray[ slideshowCurrID ][ 2 ][ i ] + 10;
  838. var topY = i * 45;
  839. var val = (i == total - 1) ? windowW * .5 : -(width + windowW * .5);
  840. var styleValue = "top:" + topY + "px; left:" + val + "px; display:inline-block; opacity:1;";
  841. obj.attr("style", styleValue);
  842. if( i == total - 1 ){ TweenMax.to( obj, 5, { css:{left: -(width + windowW * .5) +'px'}, ease:SlowMo.ease.config(0.7, 0.96), onComplete:resetShowing }); }
  843. else{ TweenMax.to( obj, 5, { css:{left: windowW * .5 +'px'}, ease:SlowMo.ease.config(0.7, 0.96) }); }
  844. }
  845. }
  846. }
  847. function resetShowing(){
  848. showingInProgress = 0;
  849. if( slidesArray[ slideshowCurrID ][ 1 ].length != 0 ){
  850. var i = 0;
  851. var total = slidesArray[ slideshowCurrID ][ 1 ].length;
  852. for( i = 0; i < total; i++ ){
  853. slidesArray[ slideshowCurrID ][ 1 ][ i ].css("opacity", "0");
  854. }
  855. }
  856. }
  857. function stopOrHidePrevCaptions()
  858. {
  859. var slideHolder = $("#slideshow .slideshow-slide");
  860. if( slideHolder.length > 0 ){
  861. $("#slideshow-captions", slideHolder ).each(function(){
  862. $(this ).css("top", ($(window).height() * 0.3) + "px");
  863. $(this ).css("left", ($("#module-container").width() * 0.5) + "px");
  864. });
  865. }
  866. if( slidesArray[ slideshowPrevID ][ 1 ].length != 0 ){
  867. showingInProgress = 0;
  868. var i = 0;
  869. var total = slidesArray[ slideshowPrevID ][ 2 ].length;
  870. var windowH = $(window).height();
  871. var windowW = $(window).width();
  872. for( i = 0; i < total; i++ ){
  873. var width = slidesArray[ slideshowPrevID ][ 2 ][ i ];
  874. var topY = windowH * .3 + i * 45;
  875. var obj = slidesArray[ slideshowPrevID ][ 1 ][ i ];
  876. if( i == total - 1 ){ TweenMax.to( obj, .2, { css:{left: -(width + windowW * .5) +'px', opacity:"0"}, ease:Sine.easeOut, onComplete: runOtherSlide }); }
  877. else{ TweenMax.to( obj, .2, { css:{left: windowW * .5 +'px', opacity:"0"}, ease:Sine.easeOut }); }
  878. }
  879. }
  880. else{ changeSlideshowSlides( slideshowPrevID, slideshowCurrID); }
  881. }
  882. function runOtherSlide(){ changeSlideshowSlides( slideshowPrevID, slideshowCurrID); }
  883. /*================= HOME 2 ================================*/
  884. var stdCurrIndex = 0;
  885. var stdPrevIndex = 0;
  886. function moduleHome2(){
  887. var textPageInstanceHolder = $( txt_modCont);
  888. var textPageInstance = $( "#module-home-layout2", textPageInstanceHolder);
  889. if( textPageInstance.length <= 0 )return;
  890. moduleUpdate_home2();
  891. var val = parseInt( textPageInstanceHolder.css("left"), 10);
  892. textPageInstanceHolder.attr("style", "left: 100%; visibility: visible;");
  893. TweenMax.to( textPageInstanceHolder, .6, { css:{ left: val }, ease:Circ.easeOut });
  894. var slidesBannArray = [];
  895. var stdBannCont = $("#standard-banner-controls");
  896. var controlPin = $("#control-pin", stdBannCont);
  897. var controlPinArr = [];
  898. var i = 0;
  899. stdBannCont.css("margin-left", -(stdBannCont.width()*.5) );
  900. $("#standard-banner").find("a").each(
  901. function(){
  902. var dataSrc = $("#dataSrc", this);
  903. if(dataSrc. length > 0 ){
  904. var imgTag = '<img src="' + dataSrc.attr("data-src") +'" />';
  905. dataSrc.after( imgTag ).remove();
  906. }
  907. slidesBannArray[ i ] = $(this)
  908. i++;
  909. }
  910. );
  911. i = 0;
  912. stdBannCont.find("#control-pin").each(
  913. function(){
  914. controlPinArr[ i ] = $(this)
  915. i++;
  916. }
  917. );
  918. controlPin.hover(
  919. function(){
  920. if( $(this).hasClass("selected") == false )
  921. TweenMax.to( $(".control-pin-hover", this), .3, {css:{opacity:"1"}, easing:Sine.easeOut});
  922. },
  923. function(){
  924. if( $(this).hasClass("selected") == false )
  925. TweenMax.to( $(".control-pin-hover", this), .3, {css:{opacity:"0"}, easing:Sine.easeOut});
  926. }
  927. );
  928. controlPin.click(function() {
  929. stdPrevIndex = stdCurrIndex;
  930. stdCurrIndex = $(controlPin).index(this);
  931. if( stdCurrIndex == stdPrevIndex )return;
  932. controlPinArr[ stdPrevIndex ].removeClass("selected");
  933. controlPinArr[ stdCurrIndex ].addClass("selected");
  934. TweenMax.to( $(".control-pin-hover", controlPinArr[ stdPrevIndex ]), .3, {css:{opacity:"0"}, easing:Sine.easeOut});
  935. TweenMax.to( $(".control-pin-hover", controlPinArr[ stdCurrIndex ]), .3, {css:{opacity:"1"}, easing:Sine.easeOut});
  936. changeHome2Slides();
  937. });
  938. function changeHome2Slides(){
  939. slidesBannArray[ stdCurrIndex ].attr("class", "selected opacity_0");
  940. TweenMax.to( slidesBannArray[ stdPrevIndex ], .6, {css:{opacity:"0"}, easing:Sine.easeOut, onComplete:
  941. function(){ hideOtherBannerSlides();}
  942. });
  943. TweenMax.to( slidesBannArray[ stdCurrIndex ], .6, {css:{opacity:"1"}, easing:Sine.easeOut});
  944. }
  945. function hideOtherBannerSlides(){
  946. var i = 0;
  947. var t = slidesBannArray.length;
  948. for( i = 0; i < t; i++ ){
  949. if( i != stdCurrIndex )slidesBannArray[ i ].attr("class", "");
  950. }
  951. }
  952. var clients = $(".home-layout-clients a");
  953. if( clients.length > 0 ){
  954. clients.hover(
  955. function(){
  956. TweenMax.to( $(".client-over", this), .6, { css:{opacity: "1"}, easing:Sine.easeOut});
  957. },
  958. function(){
  959. TweenMax.to( $(".client-over", this), .6, { css:{opacity: "0"}, easing:Sine.easeOut});
  960. }
  961. );
  962. }
  963. var contentLi = $(".home-layout2-content ul li");
  964. var baseColor = rgb2hex( $(".layout2-description p", contentLi).css("color") );
  965. if(touchDevice == 0)if(contentLi.length > 0){
  966. contentLi.hover(
  967. function(){
  968. TweenMax.to( $(".layout2-description p", this), .6, { css:{color: themeColor}, easing:Sine.easeOut});
  969. TweenMax.to( $("div:first", this), 0.3, { css:{top: "-5px"}, easing:Sine.easeOut});
  970. },
  971. function(){
  972. TweenMax.to( $(".layout2-description p", this), .6, { css:{color: baseColor}, easing:Sine.easeOut});
  973. TweenMax.to( $("div:first", this), 0.3, { css:{top: "0px"}, easing:Sine.easeOut});
  974. }
  975. );
  976. }
  977. }
  978. function animateBannerHome2( img ){ TweenMax.to( img, 0.4, {css:{opacity:"1"}, easing:Sine.easeOut}); }
  979. /*================= END HOME 2 ============================*/
  980. /*================= HOME 3 ================================*/
  981. var homeInterval = "";
  982. function moduleHome3(){
  983. var textPageInstanceHolder = $( txt_modCont);
  984. var textPageInstance = $( "#module-home-layout3", textPageInstanceHolder);
  985. var modWrapper = $("#module-wrapper", textPageInstance);
  986. if( textPageInstance.length <= 0 )return;
  987. moduleUpdate_home3();
  988. var val = parseInt( textPageInstanceHolder.css("left"), 10);
  989. textPageInstanceHolder.css("left", "100%").css("visibility", "visible");
  990. TweenMax.to( textPageInstanceHolder, .6, { css:{ left: val }, ease:Circ.easeOut });
  991. var homeLayoutVideo = $("#video-wrapper", textPageInstanceHolder);
  992. templateAddMediaVideo( homeLayoutVideo.attr("data-video-type"), homeLayoutVideo, undefined );
  993. $("#home-advertise1, #home-advertise2", textPageInstanceHolder).hover(
  994. function(){
  995. var back = $(".advertise-details", this);
  996. TweenMax.to( back, .3, { css:{ backgroundColor: "#3f3f3f" }, ease:Sine.easeOut });
  997. TweenMax.to( $("span", back), .3, { css:{ color: "#f1f1f1" }, ease:Sine.easeOut });
  998. },
  999. function(){
  1000. var back = $(".adveā€¦

Large files files are truncated, but you can click here to view the full file