1(function ($) {$(document).ready(function() { 2// Do not delete above line 3 4 /* Steps List Style ------------------------- */ 5 6 $(".steps ol li:first").addClass("first"); 7 $(".steps ol li:last").addClass("last"); 8 9 $(".steps_with_circle ol").each (function () { 10 $("li", this).each (function (i) { 11 $(this).prepend("<span>" + (i+1) + "</span>" ); 12 }); 13 }); 14 15 /* Image Slider ------------------------- */ 16 17 $(".swmsc_image_slider").each(function(){ 18 19 var $this = $(this), 20 slideAnimation = $this.attr("data-slideAnimation") || 'fade', 21 autoslideOn = $this.attr("data-autoSlide") || 0, 22 autoslideInterval = $this.attr("data-autoSlideInterval") || 7000, 23 bulletNav = $this.attr("data-bulletNavigation") || true, 24 arrowNav = $this.attr("data-arrowNavigation") || true; 25 26 if(autoslideOn === "true") { autoslideOn = true; } else { autoslideOn = false; } 27 if(bulletNav === "true") { bulletNav = true; } else { bulletNav = false; } 28 if(arrowNav === "true") { arrowNav = true; } else { arrowNav = false; } 29 30 $this.imagesLoaded( function() { 31 $this.flexslider({ 32 animation: slideAnimation, 33 slideshow: autoslideOn, 34 controlNav: bulletNav, 35 directionNav : arrowNav, 36 slideshowSpeed: autoslideInterval, 37 smoothHeight: true, 38 useCSS: false, 39 prevText: '<i class="fa fa-chevron-left"></i>', 40 nextText: '<i class="fa fa-chevron-right"></i>', 41 start: function(){ 42 $('body').removeClass('loading'); 43 } 44 }); 45 }); 46 47 }); 48 49 /* Toggles ------------------------- */ 50 51 $(".swmsc_toggle_accordion_container").each( function () { 52 if($(this).attr('data-id') === 'closed') { 53 $(this).accordion({ header: '.swmsc_toggle_box_title_accordion', collapsible: true, active: false, heightStyle: 'content', autoHeight: false }); 54 } else { 55 $(this).accordion({ header: '.swmsc_toggle_box_title_accordion', collapsible: true, heightStyle: 'content', autoHeight: false }); 56 } 57 }); 58 59 $(".swmsc_toggle_box").each( function () { 60 if($(this).attr('data-id') === 'closed') { 61 $(this).accordion({ header: '.swmsc_toggle_box_title', collapsible: true, active: false, heightStyle: 'content' }); 62 } else { 63 $(this).accordion({ header: '.swmsc_toggle_box_title', collapsible: true, heightStyle: 'content'}); 64 } 65 }); 66 67 /* Tabs ------------------------- */ 68 69 $('.swmsc_tabs').tabslet({ 70 mouseevent: 'click', 71 attribute: 'href', 72 animation: true 73 }); 74 75 /* Hide Info Boxes ------------------------- */ 76 77 function hide_boxes(){
78 $('span.swmsc_hide_boxes,span.swmsc_hide_boxes2').click(function() { 79 $(this).parent().fadeOut(); 80 }); 81 } 82 83 /* Custom Gallery ------------------------- */ 84 85 function swmsc_image_gallery() { 86 $(".swmsc_image_gallery").each(function() { 87 var $this = $(this), 88 dataGrid = $this.attr("data-grid") || 'masonry'; 89 90 $this.imagesLoaded( function() { 91 $this.isotope({ 92 itemSelector: '.swmsc_image_gallery_item', 93 layoutMode: dataGrid, 94 masonry: { 95 //custom addition 96 } 97 }); 98 99 }); 100 }); 101 102 } 103 104 /* Masonry Fit Raws Items ------------------------- */ 105 106 function swmsc_masonry_fitrow() { 107 $(".swmsc_masonry_fitrow").imagesLoaded( function() { 108 $('.swmsc_masonry_fitrow').isotope({ 109 itemSelector: '.swmsc_masonry_fitrow_item', 110 layoutMode: 'fitRows', 111 masonry: { 112 //custom addition 113 } 114 }); 115 }); 116 117 } 118 119 function swmsc_UniversalGridIsotope() { 120 if ($("#swmsc-item-entries").hasClass('isotope')) { 121 $('.swmsc_universal_grid_sort').imagesLoaded( function() { 122 $('.swmsc_universal_grid_sort').isotope({ 123 itemSelector: '.swmsc_universal_grid' 124 }); 125 }); 126 } 127 } 128 129 /* Testimonials ------------------------- */ 130 131 // testimonials slider shortcode 132 133 function swmsc_testimonialsBoxSlider() { 134 135 $(".swmsc_testimonials_box_slider").each(function() { 136 var $this = $(this), 137 arrowNav = $this.attr("data-navArrow") || true, 138 autoPlay = $this.attr("data-autoplay") || true, 139 playInterval = parseInt($this.attr("data-autoPlayTimeOut") || 5000); 140 141 if (arrowNav === "true") { arrowNav = true; } else { arrowNav = false; } 142 if (autoPlay === "true") { autoPlay = true; } else { autoPlay = false; } 143 144 $this.imagesLoaded( function() { 145 $this.owlCarousel({ 146 items:1, 147 loop:true, 148 margin:0, 149 autoplay:autoPlay, 150 autoplayTimeout:playInterval, 151 autoplayHoverPause:true, 152 nav:arrowNav, 153 navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'], 154 autoHeight:true, 155 animateOut: 'fadeOut', 156 animateIn: 'fadeIn' 157 }); 158 159 }); 160 }); 161 162 } 163 164 function swmsc_testimonialsWideSlider() { 165 166 $(".swmsc_testimonials_wide_slider").each(function() { 167 var $this = $(this), 168 arrowNav = $this.attr("data-navArrow") || true, 169 autoPlay = $this.attr("data-autoplay") || true, 170 navDots = $this.attr("data-navDots") || true, 171 playInterval = parseInt($this.attr("data-autoPlayTimeOut") || 5000); 172 173 if (arrowNav === "true") { arrowNav = true; } else { arrowNav = false; } 174 if (autoPlay === "true") { autoPlay = true; } else { autoPlay = false; } 175 if (navDots === "true") { navDots = true; } else { navDots = false; } 176 177 $this.imagesLoaded( function() { 178 $this.owlCarousel({ 179 items:1, 180 loop:true, 181 margin:0, 182 autoplay:autoPlay, 183 autoplayTimeout:playInterval, 184 autoplayHoverPause:true, 185 nav:arrowNav, 186 navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'], 187 autoHeight:true, 188 animateOut: 'fadeOut', 189 animateIn: 'fadeIn', 190 dots:navDots, 191 dotsEach:true, 192 dotData:true 193 }); 194 195 }); 196 }); 197 } 198
199 function swmsc_logoSlider() { 200 201 $(".swmsc_logo_slider").each(function() { 202 var $this = $(this), 203 arrowNav = $this.attr("data-nav") || false, 204 autoPlay = $this.attr("data-autoplay") || true, 205 rightMargin = parseInt($this.attr("data-margin") || 0), 206 playInterval = parseInt($this.attr("data-autoPlayTimeOut") || 5000), 207 desktopItems = parseInt($this.attr("data-desktop") || 5), 208 tabletItems = parseInt($this.attr("data-tablet") || 4), 209 mobileHorizontalItems = parseInt($this.attr("data-mobileHorizontal") || 2), 210 mobileVerticalItems = parseInt($this.attr("data-mobileVertical") || 1); 211 212 if (arrowNav === "true") { arrowNav = true; } else { arrowNav = false; } 213 if (autoPlay === "true") { autoPlay = true; } else { autoPlay = false; } 214 215 $this.imagesLoaded( function() { 216 $this.owlCarousel({ 217 loop:true, 218 autoplay:autoPlay, 219 autoplayTimeout:playInterval, 220 autoplayHoverPause:true, 221 margin:rightMargin, 222 responsiveClass:true, 223 nav:arrowNav, 224 navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'], 225 responsive:{ 226 0:{ items:mobileVerticalItems }, 227 321:{ items:mobileHorizontalItems }, 228 481:{ items:mobileHorizontalItems }, 229 768:{ items:tabletItems }, 230 980:{ items:desktopItems } 231 } 232 }); 233 }); 234 235 }); 236 237 } 238 239 /* Element Horizontal and Verticel Center ------------------------- */ 240 241 function swmsc_js_H_Center() { 242 243 $(".swmsc_js_center").each(function(){ 244 245 var $this = $(this); 246 elementWidth = $this.width(), 247 elementMargin = elementWidth/-2; 248 249 $this.css('margin-left',elementMargin); 250 251 }); 252 253 } 254 255 function swmsc_js_V_Center() { 256 257 $(".swmsc_js_center_top").each(function(){ 258 259 var $this = $(this); 260 elementWidth = $this.height(), 261 elementMargin = elementWidth/-2; 262 263 $this.css('margin-top',elementMargin); 264 265 }); 266 267 } 268 269 /* Tabs Widget ------------------------- */ 270 271 function swmsc_tabs_widget() { 272 $('.swmsc_widget_tabs').each(function() { 273 $(this).find(".swmsc_wid_tab_content").hide(); 274 if(document.location.hash && $(this).find("ul.swmsc_wid_tabs li a[href='"+document.location.hash+"']").length >= 1) { 275 $(this).find("ul.swmsc_wid_tabs li a[href='"+document.location.hash+"']").parent().addClass("active").show(); 276 $(this).find(document.location.hash+".swmsc_wid_tab_content").show(); 277 } else { 278 $(this).find("ul.swmsc_wid_tabs li:first").addClass("active").show(); 279 $(this).find(".swmsc_wid_tab_content:first").show(); 280 } 281 }); 282 $("ul.swmsc_wid_tabs li").click(function(e) { 283 $(this).parents('.swmsc_widget_tabs').find("ul.swmsc_wid_tabs li").removeClass("active"); 284 $(this).addClass("active"); 285 $(this).parents('.swmsc_widget_tabs').find(".swmsc_wid_tab_content").hide(); 286 var activeTab = $(this).find("a").attr("href"); 287 $(this).parents('.swmsc_widget_tabs').find(activeTab).fadeIn(); 288 e.preventDefault(); 289 }); 290 } 291 292 /* Media Lightbox ------------------------- */ 293 294 function swmsc_magnificPopup() { 295 296 $('.swmsc_popup_img').magnificPopup({ 297 type: 'image' 298 }); 299 300 $('.swmsc_popup_gallery').magnificPopup({ 301 type: 'image', 302 gallery:{ 303 enabled:true, 304 tCounter:'' 305 }, 306 zoom: { 307 enabled: true, 308 duration: 300, 309 easing: 'ease-in-out' 310 } 311 }); 312 313 $('.popup-youtube, .popup-vimeo, .popup-gmaps,.swmsc_popup_video').magnificPopup({ 314 disableOn: 700, 315 type: 'iframe', 316 mainClass: 'mfp-fade', 317 removalDelay: 160, 318 preloader: false,
319 fixedContentPos: false 320 }); 321 322 } 323 324 /* Flickr Widget ------------------------- */ 325 326 function swmsc_widget_flickr_photos() { 327 328 $(".sidebar .flickr_photos").each(function(){ 329 330 var $this = $(this), 331 swmSidebarFlickrId = $this.attr("data-flickr-id") || '90291761@N02', 332 flickrDisplayPhotos = parseInt($this.attr("data-display-photos") || 6); 333 334 $this.append('<ul id="cbox1" class="thumbs sidebar_flickr_photos ">'); 335 336 $('#cbox1').jflickrfeed({ 337 limit : flickrDisplayPhotos, 338 qstrings: { 339 id: swmSidebarFlickrId // replace example flickr id with your flickr id 340 }, 341 itemTemplate: '<li>'+'<a href="{{link}}" title="{{title}}" >' + '<img src="{{image_q}}" alt="{{title}}" />' + '</a>' + '</li>' 342 }, function(data) { 343 344 }); 345 346 $this.append('<div class="clear"></div>'); 347 348 }); 349 350 $(".footer .flickr_photos").each(function(){ 351 352 var $this = $(this), 353 flickrId = $this.attr("data-flickr-id") || '90291761@N02', 354 flickrDisplayPhotos = parseInt($this.attr("data-display-photos") || 6); 355 356 $this.append('<ul id="cbox2" class="thumbs footer_flickr_photos">'); 357 358 $('#cbox2').jflickrfeed({ 359 limit : flickrDisplayPhotos, 360 qstrings: { 361 id: flickrId // replace example flickr id with your flickr id 362 }, 363 itemTemplate: '<li>'+'<a href="{{link}}" title="{{title}}" >' + '<img src="{{image_q}}" alt="{{title}}" />' + '</a>' + '</li>' 364 }, function(data) { 365 366 }); 367 368 $this.append('<div class="clear"></div>'); 369 370 }); 371 372 } 373 374 /* Twitter Widget ------------------------- */ 375 376 function swmsc_twitter_widget() { 377 378 var $this = $('.swmsc_ft_wrap'), 379 twitterName = $this.attr("data-username") || 'softwebmedia'; 380 381 $('.swmsc_ft_wrap').tweecool({ 382 username : twitterName, 383 limit : 1, 384 profile_image_size:'_bigger' 385 }); 386 } 387 388 /* Animated Elements, Counter, Pie Chart with WayPoints ------------------------- */ 389 390 if ( typeof window['swmsc_waypoint'] !== 'function' ) { 391 function swmsc_waypoint() { 392 393 if (typeof jQuery.fn.waypoint !== 'undefined') { 394 395 var element = $('.swmsc_element_visible'), 396 isMobile = document.documentElement.ontouchstart !== undefined ? true : false; 397 398 /* Element Animations ----------------------------------------- */ 399 400 if(isMobile) { 401 element.addClass('swmsc_animation_start'); 402 } 403 else { 404 element.waypoint(function(direction) { 405 $(this).addClass('swmsc_animation_start'); 406 }, { offset: '85%' } ); 407 } 408 409 /* Stat Counter ----------------------------------------- */ 410 411 $('.swmsc_stat_counter').waypoint(function(direction) { 412 $(this).each(function(){ 413 414 var datafinalnumber = $(this).attr('data-finalNumber'), 415 dataspeed = $(this).attr('data-speed'); 416 417 $(this).find('.swmsc_counter_box_count').delay(5000).countTo({ 418 from: 0, 419 to: datafinalnumber, 420 speed: dataspeed, 421 refreshInterval: 10 422 }); 423 424 }); 425 }, { 426 triggerOnce: true, 427 offset: '90%' 428 } 429 ); 430 431 /* Pie Chart ----------------------------------------- */ 432 433 $('.swmsc_counter_circle').waypoint(function() { 434 $(this).each(function() { 435 var $element = $(this).children(".swmsc_counter_circle_text");
436 $(this).children(".swmsc_counter_circle_text").easyPieChart({ 437 barColor: $element.attr('data-trackColor'), 438 trackColor: $element.attr('data-barColor'), 439 scaleColor: false, 440 scaleLength: 5, 441 lineCap: "round", 442 lineWidth: $element.attr('data-lineWidth'), 443 size: $element.attr('data-chartSize'), 444 rotate: 0, 445 animate: $element.attr('data-speed'), 446 }); 447 }); 448 }, { 449 triggerOnce: true, 450 offset: '100%' 451 }); 452 453 454 /* Progress Bar ----------------------------------------- */ 455 456 $('.swmsc_progress_bar .swmsc_progress_bar_out').waypoint(function(direction) { 457 458 var $element = $(this); 459 460 $element.each(function () { 461 $element.animate({ 462 width: $(this).attr("data-width") + '%' 463 }, 2000); 464 }); 465 466 }, { 467 triggerOnce: true, 468 offset: '90%' 469 } 470 ); 471 472 473 } // if fn.waypoint end 474 } 475 } 476 477 /* Logo Grid ----------------------------------------- */ 478 479 function swmsc_logo_grids() { 480 481 $(".swmsc_client_logos").each(function() { 482 483 var $this = $(this), 484 totalColumn = parseInt($this.attr("data-column") || 4), 485 columnWidth = '25%', 486 logoItem = $this.children(); 487 488 if ( totalColumn == 6 ) { 489 columnWidth = '16.66%'; 490 } else if ( totalColumn == 5 ) { 491 columnWidth = '20%'; 492 } else if ( totalColumn == 4 ) { 493 columnWidth = '25%'; 494 } else if ( totalColumn == 3 ) { 495 columnWidth = '33.33%'; 496 } else if ( totalColumn == 2 ) { 497 columnWidth = '50%'; 498 } else if ( totalColumn == 1 ) { 499 columnWidth = '100%'; 500 } 501 502 $this.imagesLoaded( function() { 503 if ($(window).width() > 978) { 504 logoItem.css('width',columnWidth); 505 } else if (($(window).width() < 979) && ($(window).width() > 767)) { 506 logoItem.css('width','25%'); 507 } else if (($(window).width() < 768) && ($(window).width() > 480)) { 508 logoItem.css('width','33.33%'); 509 } else if (($(window).width() < 481) && ($(window).width() > 320)) { 510 logoItem.css('width','50%'); 511 }else if ($(window).width() < 321) { 512 logoItem.css('width','100%'); 513 } else { 514 logoItem.css('width',columnWidth); 515 } 516 }); 517 518 }); 519 520 } 521 522 /* Services Style Responsive Grid ----------------------------------------- */ 523 524 function swmsc_services_icons() { 525 526 $(".swmsc_responsive_services").each(function() { 527 528 var $this = $(this), 529 responsiveWidth = parseInt($this.attr("data-responsive") || 800), 530 elementMargin = parseInt($this.attr("data-margin") || 20)+'px'; 531 532 if ( $this.hasClass('swmsc_services_item_left') ) { 533 if ($(window).width() <= responsiveWidth) { 534 $this.addClass('swm_services_responsive'); 535 $this.find('.swmsc_services_item_holder').css('margin-bottom',elementMargin); 536 $this.find('.swmsc_services_item_holder').css('margin-right','0'); 537 } else { 538 $this.removeClass('swm_services_responsive'); 539 $this.find('.swmsc_services_item_holder').css('margin-bottom','0'); 540 $this.find('.swmsc_services_item_holder').css('margin-right',elementMargin); 541 } 542 } 543 if ( $this.hasClass('swmsc_services_item_right') ) { 544 if ($(window).width() <= responsiveWidth) { 545 $this.addClass('swm_services_responsive'); 546 $this.find('.swmsc_services_item_holder').css('margin-bottom',elementMargin); 547 $this.find('.swmsc_services_item_holder').css('margin-left','0'); 548 } else { 549 $this.removeClass('swm_services_responsive'); 550 $this.find('.swmsc_services_item_holder').css('margin-bottom','0'); 551 $this.find('.swmsc_services_item_holder').css('margin-left',elementMargin); 552 } 553 } 554 555 }); 556 557 } 558 559 /* All functions ----------------------------------------- */ 560 561 hide_boxes(); 562 swmsc_image_gallery(); 563 swmsc_masonry_fitrow(); 564 swmsc_UniversalGridIsotope(); 565 swmsc_testimonialsBoxSlider(); 566 swmsc_testimonialsWideSlider();
567 swmsc_logoSlider(); 568 swmsc_js_H_Center(); 569 swmsc_js_V_Center(); 570 swmsc_tabs_widget(); 571 swmsc_magnificPopup(); 572 swmsc_widget_flickr_photos(); 573 swmsc_twitter_widget(); 574 swmsc_waypoint(); 575 swmsc_logo_grids(); 576 swmsc_services_icons(); 577 578 $('.swmsc_tabs ul.tab-nav li a').click(function() { 579 swmsc_image_gallery(); 580 }); 581 582 $(window).resize(function () { 583 swmsc_logo_grids(); 584 swmsc_services_icons(); 585 }); 586 587/****************************************************************/ 588}); })(jQuery); 589// Do not delete above lines
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.