init.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. /*
  2. * Copyright (c) 2018 Marketify
  3. * Author: Marketify
  4. * This file is made for CURRENT TEMPLATE
  5. */
  6. jQuery(document).ready(function(){
  7. "use strict";
  8. // here all ready functions
  9. buildify_tm_menubarFixingToTop();
  10. buildify_tm_article();
  11. buildify_tm_imgtosvg();
  12. buildify_tm_magnific_popup();
  13. buildify_tm_owl_carousel();
  14. buildify_tm_miniboxes();
  15. buildify_tm_hamburger();
  16. buildify_tm_submenu();
  17. buildify_tm_totop();
  18. buildify_tm_totop_myhide();
  19. buildify_tm_portfolio();
  20. buildify_tm_filter_effect();
  21. buildify_tm_widgetscroll();
  22. buildify_tm_animate_submenu();
  23. buildify_tm_sticky_sidebar();
  24. buildify_tm_contact_form();
  25. buildify_tm_isotope();
  26. buildify_tm_fitty();
  27. buildify_tm_counerbox_shape();
  28. buildify_tm_jarallax();
  29. buildify_tm_justified();
  30. buildify_tm_about_shape();
  31. buildify_tm_sidebar_shape();
  32. buildify_tm_stickyy();
  33. jQuery(window).on('resize',function(e){
  34. e.preventDefault();
  35. buildify_tm_miniboxes();
  36. buildify_tm_widgetscroll();
  37. buildify_tm_animate_submenu();
  38. buildify_tm_isotope();
  39. buildify_tm_counerbox_shape();
  40. buildify_tm_about_shape();
  41. buildify_tm_sidebar_shape();
  42. });
  43. jQuery(window).on('scroll', function(e) {
  44. e.preventDefault();
  45. buildify_tm_totop_myhide();
  46. });
  47. jQuery(window).on('load', function(e) {
  48. e.preventDefault();
  49. buildify_tm_isotope();
  50. buildify_tm_stickyy();
  51. });
  52. });
  53. // -----------------------------------------------------
  54. // -------------------- FUNCTIONS --------------------
  55. // -----------------------------------------------------
  56. // -----------------------------------------------------
  57. // -------------------- MENUBAR ----------------------
  58. // -----------------------------------------------------
  59. function buildify_tm_menubarFixingToTop(){
  60. "use strict";
  61. var menuBar = jQuery('.buildify_tm_menubar');
  62. var menuLogo = jQuery('.buildify_tm_menubar .menu_logo');
  63. var homeButton = jQuery('.buildify_tm_home_button');
  64. var window_offset = jQuery(window).scrollTop();
  65. if(window_offset>=100){
  66. menuBar.addClass('scrolled');
  67. menuLogo.addClass('scrolled');
  68. homeButton.addClass('scrolled');
  69. }else{
  70. menuBar.removeClass('scrolled');
  71. menuLogo.removeClass('scrolled');
  72. homeButton.removeClass('scrolled');
  73. }
  74. jQuery(window).on('scroll',function(){
  75. window_offset = jQuery(window).scrollTop();
  76. if(window_offset>=100){
  77. menuBar.addClass('scrolled');
  78. menuLogo.addClass('scrolled');
  79. homeButton.addClass('scrolled');
  80. }else{
  81. menuBar.removeClass('scrolled');
  82. menuLogo.removeClass('scrolled');
  83. homeButton.removeClass('scrolled');
  84. }
  85. });
  86. }
  87. // -----------------------------------------------------
  88. // -------------------- SWIPER ------------------------
  89. // -----------------------------------------------------
  90. function buildify_tm_article(){
  91. "use strict";
  92. var swiper = new Swiper('.swiper-container', {
  93. direction:'horizontal',
  94. loop:'true',
  95. pagination: {
  96. el: '.swiper-pagination',
  97. type: 'custom',
  98. renderCustom: function (swiper, current, total) {
  99. // console.log(current);
  100. var currentIndex;
  101. if(current<10){
  102. currentIndex = '0'+ current;
  103. }else{
  104. currentIndex = current;
  105. }
  106. var totalIndex;
  107. if(total<10){
  108. totalIndex = '0'+ total;
  109. }else{
  110. totalIndex = total;
  111. }
  112. currentIndex = '<span class="current">' + currentIndex + '</span>';
  113. totalIndex = '<span class="total">' + totalIndex + '</span>';
  114. return currentIndex + '<span class="divider"> / </span>' + totalIndex;
  115. }
  116. },
  117. navigation: {
  118. nextEl: '.tm_next_button',
  119. prevEl: '.tm_prev_button',
  120. },
  121. });
  122. }
  123. // -----------------------------------------------------
  124. // --------------- IMAGE TO SVG ------------------
  125. // -----------------------------------------------------
  126. function buildify_tm_imgtosvg(){
  127. "use strict";
  128. jQuery('img.svg').each(function(){
  129. var jQueryimg = jQuery(this);
  130. var imgClass = jQueryimg.attr('class');
  131. var imgURL = jQueryimg.attr('src');
  132. jQuery.get(imgURL, function(data) {
  133. // Get the SVG tag, ignore the rest
  134. var jQuerysvg = jQuery(data).find('svg');
  135. // Add replaced image's classes to the new SVG
  136. if(typeof imgClass !== 'undefined') {
  137. jQuerysvg = jQuerysvg.attr('class', imgClass+' replaced-svg');
  138. }
  139. // Remove any invalid XML tags as per http://validator.w3.org
  140. jQuerysvg = jQuerysvg.removeAttr('xmlns:a');
  141. // Replace image with new SVG
  142. jQueryimg.replaceWith(jQuerysvg);
  143. }, 'xml');
  144. });
  145. }
  146. // -----------------------------------------------------
  147. // -------------- MAGNIFIC POPUP -----------------
  148. // -----------------------------------------------------
  149. function buildify_tm_magnific_popup(){
  150. "use strict";
  151. jQuery('.open-popup-link').magnificPopup({
  152. type:'inline',
  153. midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
  154. });
  155. jQuery('.gallery').each(function() { // the containers for all your galleries
  156. jQuery(this).magnificPopup({
  157. delegate: 'a', // the selector for gallery item
  158. type: 'image',
  159. gallery: {
  160. enabled:true
  161. }
  162. });
  163. });
  164. jQuery('.gallery_zoom').each(function() { // the containers for all your galleries
  165. jQuery(this).magnificPopup({
  166. delegate: 'a.zoom', // the selector for gallery item
  167. type: 'image',
  168. gallery: {
  169. enabled:true
  170. },
  171. removalDelay: 300,
  172. mainClass: 'mfp-fade'
  173. });
  174. });
  175. jQuery('.popup-youtube').each(function() { // the containers for all your galleries
  176. jQuery(this).magnificPopup({
  177. //type: 'iframe',
  178. disableOn: 700,
  179. type: 'iframe',
  180. mainClass: 'mfp-fade',
  181. removalDelay: 160,
  182. preloader: false,
  183. fixedContentPos: false
  184. });
  185. });
  186. }
  187. // -----------------------------------------------------
  188. // --------------- OWL CAROUSEL ------------------
  189. // -----------------------------------------------------
  190. function buildify_tm_owl_carousel(){
  191. "use strict";
  192. var carousel2 = jQuery('.buildify_tm_universal_carousel_wrap.testimonial .owl-carousel');
  193. carousel2.owlCarousel({
  194. loop:false,
  195. items: 3,
  196. lazyLoad: true,
  197. margin: 0,
  198. autoplay: false,
  199. autoplayTimeout: 6000,
  200. smartSpeed: 2000,
  201. dots: false,
  202. nav: true,
  203. navSpeed: true,
  204. responsive:{
  205. 0:{items:1},
  206. 480:{items:1},
  207. 768:{items:2},
  208. 1040:{items:2},
  209. 1200:{items:2},
  210. 1600:{items:3},
  211. 1920:{items:3}
  212. }
  213. });
  214. jQuery('.buildify_tm_universal_carousel_wrap.testimonial .custom_nav > a.prev').on('click', function(){
  215. carousel2.trigger('prev.owl.carousel');
  216. return false;
  217. });
  218. jQuery('.buildify_tm_universal_carousel_wrap.testimonial .custom_nav > a.next').on('click', function(){
  219. carousel2.trigger('next.owl.carousel');
  220. return false;
  221. });
  222. }
  223. // -----------------------------------------------------
  224. // ----------------- MINI BOXES ------------------
  225. // -----------------------------------------------------
  226. function buildify_tm_miniboxes(){
  227. "use strict";
  228. var el = jQuery('.buildify_tm_miniboxes');
  229. if(el.length){
  230. el.each(function(index, element) {
  231. var child = jQuery(element).find('.buildify_tm_minibox');
  232. child.css({height:'auto'});
  233. // Get an array of all element heights
  234. var W = jQuery(window).width();
  235. if(W > 480){
  236. var elementHeights = child.map(function() {return jQuery(this).outerHeight();}).get();
  237. // Math.max takes a variable number of arguments
  238. // `apply` is equivalent to passing each height as an argument
  239. var maxHeight = Math.max.apply(null, elementHeights);
  240. // Set each height to the max height
  241. child.css({height:maxHeight+'px'});
  242. }
  243. });
  244. }
  245. }
  246. // -----------------------------------------------------
  247. // ----------------- SUBMENUS --------------------
  248. // -----------------------------------------------------
  249. function buildify_tm_animate_submenu(){
  250. "use strict";
  251. var mainLi = jQuery('.buildify_tm_menubar .menu_nav_content > ul > li');
  252. var offsetLi = jQuery('.buildify_tm_menubar .menu_nav_content > ul > li.active1').offset().top;
  253. var winScroll = jQuery(window).scrollTop();
  254. var box = jQuery('.buildify_tm_animate_submenu');
  255. var leftPart = jQuery('.buildify_tm_leftpart_wrap').outerWidth();
  256. var RightPart = jQuery('.buildify_tm_rightpart');
  257. box.css({top:offsetLi-winScroll-10});
  258. box.css({left:leftPart});
  259. mainLi.on('mouseenter',function(){
  260. var element = jQuery(this);
  261. var submenu = element.find('.inside_menu').html();
  262. winScroll = jQuery(window).scrollTop();
  263. offsetLi = element.offset().top;
  264. box.css({top:offsetLi-winScroll-20});
  265. if(element.hasClass('active1')){
  266. box.removeClass('opened');
  267. box.html("");
  268. box.html(submenu);
  269. box.addClass('opened');
  270. }else{
  271. box.removeClass('opened').html("");
  272. }
  273. });
  274. RightPart.on('mouseenter',function(){
  275. box.removeClass('opened').html("");
  276. });
  277. }
  278. // -----------------------------------------------------
  279. // ------------------ HAMBURGER ----------------------
  280. // -----------------------------------------------------
  281. function buildify_tm_hamburger(){
  282. "use strict";
  283. var hamburger = jQuery('.hamburger');
  284. var mobileMenu = jQuery('.buildify_tm_mobile_header_wrap .navigation_wrap');
  285. hamburger.on('click',function(){
  286. var element = jQuery(this);
  287. if(element.hasClass('is-active')){
  288. element.removeClass('is-active');
  289. mobileMenu.slideUp();
  290. }else{
  291. element.addClass('is-active');
  292. mobileMenu.slideDown();
  293. }
  294. return false;
  295. });
  296. }
  297. // -----------------------------------------------------
  298. // ----------------- SUBMENU ---------------------
  299. // -----------------------------------------------------
  300. function buildify_tm_submenu(){
  301. "use strict";
  302. var nav = jQuery('ul.nav');
  303. nav.find('a').on('click', function(e){
  304. var element = jQuery(this);
  305. var parentItem = element.parent('li');
  306. var parentItems = element.parents('li');
  307. var parentUls = parentItem.parents('ul.sub_menu');
  308. var subMenu = element.next();
  309. var allSubMenusParents = nav.find('li');
  310. allSubMenusParents.removeClass('opened');
  311. if(subMenu.length){
  312. e.preventDefault();
  313. if(!(subMenu.parent('li').hasClass('active'))){
  314. if(!(parentItems.hasClass('opened'))){parentItems.addClass('opened');}
  315. allSubMenusParents.each(function(){
  316. var el = jQuery(this);
  317. if(!el.hasClass('opened')){el.find('ul.sub_menu').slideUp();}
  318. });
  319. allSubMenusParents.removeClass('active');
  320. parentUls.parent('li').addClass('active');
  321. subMenu.parent('li').addClass('active');
  322. subMenu.slideDown();
  323. // for recalculate scrollable height
  324. var scrollableE = jQuery('.scrollable');
  325. scrollableE.each(function(){
  326. var elE = jQuery(this);
  327. var hhhE = elE.height();hhhE++;
  328. setTimeout(function(){elE.css({height:hhhE});},500);
  329. setTimeout(function(){hhhE--;elE.css({height:hhhE});},600);
  330. });
  331. }else{
  332. subMenu.parent('li').removeClass('active');
  333. subMenu.slideUp();
  334. }
  335. return false;
  336. }
  337. });
  338. }
  339. // -----------------------------------------------------
  340. // ------------------ TOTOP ----------------------
  341. // -----------------------------------------------------
  342. function buildify_tm_totop(){
  343. "use strict";
  344. jQuery(".buildify_tm_totop").on('click', function(e) {
  345. e.preventDefault();
  346. jQuery("html, body").animate({ scrollTop: 0 }, 'slow');
  347. return false;
  348. });
  349. }
  350. function buildify_tm_totop_myhide(){
  351. "use strict";
  352. var toTop =jQuery(".buildify_tm_totop");
  353. if(toTop.length){
  354. var topOffSet =toTop.offset().top;
  355. if(topOffSet > 1000){
  356. toTop.addClass('opened');
  357. }else{
  358. toTop.removeClass('opened');
  359. }
  360. }
  361. }
  362. // -------------------------------------------------
  363. // -------------- PORTFOLIO ------------------
  364. // -------------------------------------------------
  365. // filterable
  366. function buildify_tm_portfolio(){
  367. "use strict";
  368. if(jQuery().isotope) {
  369. // Needed variables
  370. var list = jQuery('.buildify_tm_portfolio_list');
  371. var filter = jQuery('.buildify_tm_portfolio_filter');
  372. if(filter.length){
  373. // Isotope Filter
  374. filter.find('a').on('click', function(){
  375. var selector = jQuery(this).attr('data-filter');
  376. list.isotope({
  377. filter : selector,
  378. animationOptions : {
  379. duration : 750,
  380. easing : 'linear',
  381. queue : false
  382. }
  383. });
  384. return false;
  385. });
  386. // Change active element class
  387. filter.find('a').on('click', function() {
  388. filter.find('a').removeClass('current');
  389. jQuery(this).addClass('current');
  390. return false;
  391. });
  392. }
  393. }
  394. }
  395. function buildify_tm_filter_effect(){
  396. "use strict";
  397. var button = jQuery('.buildify_tm_projects_wrap .all_projects');
  398. var element = jQuery('.buildify_tm_projects_wrap .filter_list');
  399. button.on('click',function(){
  400. if(element.hasClass('opened')){
  401. element.removeClass('opened');
  402. element.slideUp();
  403. }else{
  404. element.addClass('opened');
  405. element.slideDown();
  406. }
  407. return false;
  408. });
  409. }
  410. // -----------------------------------------------------
  411. // ------------- WIDGET MENU SCROLL -----------------
  412. // -----------------------------------------------------
  413. function buildify_tm_widgetscroll(){
  414. "use strict";
  415. var H = jQuery(window).height();
  416. var scrollable = jQuery('.scrollable');
  417. var logoH = jQuery('.buildify_tm_menubar .menu_logo').outerHeight();
  418. var verMenu = jQuery('.menu_nav_content');
  419. verMenu.css({height:H-logoH-50});
  420. scrollable.each(function(){
  421. var element = jQuery(this);
  422. element.css({height: H-logoH-100});
  423. element.niceScroll({
  424. touchbehavior:false,
  425. cursorwidth:0,
  426. autohidemode:true,
  427. cursorborder:"0px solid #eee"
  428. });
  429. });
  430. }
  431. // -----------------------------------------------------
  432. // --------------- STICKY SIDEBAR -----------------
  433. // -----------------------------------------------------
  434. function buildify_tm_sticky_sidebar(){
  435. "use strict";
  436. jQuery('.sticky_sidebar').theiaStickySidebar({
  437. containerSelector: '', // The sidebar's container element. If not specified, it defaults to the sidebar's parent.
  438. additionalMarginTop: 50,
  439. additionalMarginBottom: 0,
  440. updateSidebarHeight: true, // Updates the sidebar's height. Use this if the background isn't showing properly, for example.
  441. minWidth: 768, // The sidebar returns to normal if its width is below this value.
  442. });
  443. }
  444. // -----------------------------------------------------
  445. // ---------------- CONTACT FORM -----------------
  446. // -----------------------------------------------------
  447. function buildify_tm_contact_form(){
  448. "use strict";
  449. jQuery(".contact_form #send_message").on('click', function(){
  450. var name = jQuery(".contact_form #name").val();
  451. var email = jQuery(".contact_form #email").val();
  452. var message = jQuery(".contact_form #message").val();
  453. var subject = jQuery(".contact_form #subject").val();
  454. var success = jQuery(".contact_form .returnmessage").data('success');
  455. jQuery(".contact_form .returnmessage").empty(); //To empty previous error/success message.
  456. //checking for blank fields
  457. if(name===''||email===''||message===''){
  458. jQuery('div.empty_notice').slideDown(500).delay(2000).slideUp(500);
  459. }
  460. else{
  461. // Returns successful data submission message when the entered information is stored in database.
  462. jQuery.post("modal/contact.php",{ ajax_name: name, ajax_email: email, ajax_message:message, ajax_subject: subject}, function(data) {
  463. jQuery(".contact_form .returnmessage").append(data);//Append returned message to message paragraph
  464. if(jQuery(".contact_form .returnmessage span.contact_error").length){
  465. jQuery(".contact_form .returnmessage").slideDown(500).delay(2000).slideUp(500);
  466. }else{
  467. jQuery(".contact_form .returnmessage").append("<span class='contact_success'>"+ success +"</span>");
  468. jQuery(".contact_form .returnmessage").slideDown(500).delay(4000).slideUp(500);
  469. }
  470. if(data===""){
  471. jQuery("#contact_form")[0].reset();//To reset form fields on success
  472. }
  473. });
  474. }
  475. return false;
  476. });
  477. }
  478. // -----------------------------------------------------
  479. // -------------- ISOTOPE MASONRY ----------------
  480. // -----------------------------------------------------
  481. function buildify_tm_isotope(){
  482. "use strict";
  483. jQuery('.masonry').isotope({
  484. itemSelector: '.item',
  485. masonry: {
  486. }
  487. });
  488. }
  489. // -----------------------------------------------------
  490. // ------------------- COUNTER -------------------
  491. // -----------------------------------------------------
  492. jQuery('.buildify_tm_counter').each(function() {
  493. "use strict";
  494. var el = jQuery(this);
  495. el.waypoint({
  496. handler: function(){
  497. if(!el.hasClass('stop')){
  498. el.addClass('stop').countTo({
  499. refreshInterval: 50,
  500. formatter: function (value, options) {
  501. return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
  502. },
  503. });
  504. }
  505. },offset:'80%'
  506. });
  507. });
  508. // -----------------------------------------------------
  509. // ------------------- FITTY -----------------------
  510. // -----------------------------------------------------
  511. function buildify_tm_fitty(){
  512. "use strict";
  513. fitty('.buildify_tm_counter_list li h3 > span', {
  514. minSize: 12,
  515. maxSize: 40
  516. });
  517. }
  518. // -----------------------------------------------------
  519. // ------------ COUNTERBOX SHAPE -------------------
  520. // -----------------------------------------------------
  521. function buildify_tm_counerbox_shape(){
  522. "use strict";
  523. var box = jQuery('.buildify_tm_counter_wrap_all .leftbox').outerWidth();
  524. var element1 = jQuery('.buildify_tm_counter_wrap_all .leftbox .roof span');
  525. var box2 = jQuery('.buildify_tm_working_process_wrap .leftbox').outerWidth();
  526. var element2 = jQuery('.buildify_tm_working_process_wrap .leftbox .roof span');
  527. var box3 = jQuery('.buildify_tm_working_process_wrap .rightbox').outerWidth();
  528. var element3 = jQuery('.buildify_tm_working_process_wrap .rightbox .roof span');
  529. element1.css({borderLeftWidth:box});
  530. element2.css({borderLeftWidth:box2});
  531. element3.css({borderLeftWidth:box3});
  532. }
  533. // -----------------------------------------------------
  534. // -------------------- JARALLAX -----------------
  535. // -----------------------------------------------------
  536. function buildify_tm_jarallax(){
  537. "use strict";
  538. jQuery('.jarallax').each(function(){
  539. var element = jQuery(this);
  540. var customSpeed = element.data('speed');
  541. if(customSpeed !== "undefined" && customSpeed !== ""){
  542. customSpeed = customSpeed;
  543. }else{
  544. customSpeed = 0.5;
  545. }
  546. element.jarallax({
  547. speed: customSpeed
  548. });
  549. });
  550. }
  551. function buildify_tm_justified(){
  552. "use strict";
  553. jQuery('.buildify_tm_justified_wrap').justifiedGallery({
  554. // images : photos,
  555. rowHeight: 300,
  556. margins:10
  557. });
  558. }
  559. // -----------------------------------------------------
  560. // ----------------- ACCORDION -------------------
  561. // -----------------------------------------------------
  562. jQuery(".buildify_tm_accordion").friendslab_accordion({
  563. showIcon: false, //boolean
  564. animation: true, //boolean
  565. closeAble: true, //boolean
  566. slideSpeed: 500 //integer, miliseconds
  567. });
  568. // -----------------------------------------------------
  569. // ----------------- ABOUT SHAPE -----------------
  570. // -----------------------------------------------------
  571. function buildify_tm_about_shape(){
  572. "use strict";
  573. var box = jQuery('.qqq').outerWidth();
  574. var boxWidth = Math.floor((box-75)*0.7);
  575. var shape = jQuery('.qqq .first');
  576. shape.css({borderLeftWidth:boxWidth});
  577. }
  578. // -----------------------------------------------------
  579. // --------------- SIDEBAR SHAPE -----------------
  580. // -----------------------------------------------------
  581. function buildify_tm_sidebar_shape(){
  582. "use strict";
  583. var box = jQuery('.buildify_tm_request_estimate_wrap .definition').outerWidth();
  584. var boxWidth = Math.floor(box*0.267); //80
  585. var boxWidth2 = box-boxWidth; //220
  586. var boxHeight = Math.floor(box*0.183);//55
  587. var shape1 = jQuery('.buildify_tm_request_estimate_wrap .first_shape .first');
  588. var shape2 = jQuery('.buildify_tm_request_estimate_wrap .first_shape .second');
  589. var shape3 = jQuery('.buildify_tm_request_estimate_wrap .first_shape .third');
  590. var shape4 = jQuery('.buildify_tm_request_estimate_wrap .second_shape .first');
  591. var shape5 = jQuery('.buildify_tm_request_estimate_wrap .second_shape .second');
  592. var shape6 = jQuery('.buildify_tm_request_estimate_wrap .second_shape .third');
  593. shape1.css({borderRightWidth:boxWidth,borderBottomWidth:boxWidth});
  594. shape2.css({borderRightWidth:boxWidth,borderBottomWidth:boxWidth});
  595. shape3.css({borderRightWidth:boxWidth,borderBottomWidth:boxHeight});
  596. shape4.css({borderLeftWidth:boxWidth2,borderBottomWidth:boxWidth});
  597. shape5.css({borderLeftWidth:boxWidth2,borderBottomWidth:boxWidth});
  598. shape6.css({borderLeftWidth:boxWidth2,borderBottomWidth:boxHeight});
  599. }
  600. function buildify_tm_stickyy(){
  601. "use strict";
  602. var el = jQuery('.fn_w_sminiboxes');
  603. if(el.length){
  604. el.each(function(index, element) {
  605. var child = jQuery(element).find('.fn_w_sminibox');
  606. child.css({height:'auto'});
  607. var W = jQuery(window).width();
  608. if(W > 1200){
  609. var elementHeights = child.map(function() {return jQuery(this).outerHeight();}).get();
  610. var maxHeight = Math.max.apply(null, elementHeights);
  611. child.css({height:maxHeight+'px'});
  612. }
  613. });
  614. }
  615. }