1jQuery(window).on("load", function() { 2 "use strict"; 3 4 /* ----------------------------------------- 5 FlexSlider Init 6 ----------------------------------------- */ 7 var slider = jQuery('.cisc-slider'); 8 if ( slider.length ) { 9 slider.flexslider({ 10 namespace: 'cisc-flex-', 11 selector: '.cisc-slides > li', 12 smoothHeight: true, 13 prevText: '', 14 nextText: '', 15 directionNav: false 16 }); 17 } 18}); 19 20jQuery(document).ready(function($) { 21 "use strict"; 22 23 /* ----------------------------------------- 24 Maps Init 25 ----------------------------------------- */ 26 var ci_map = $(".cisc-map"); 27 if ( ci_map.length ) { 28 ci_map.each(function() { 29 var that = $(this); 30 var lat = that.data('lat'); 31 var lng = that.data('long'); 32 var tipText = that.data('tooltip'); 33 var titleText = that.data('title'); 34 var zoom = that.data('zoom'); 35 36 ci_shortcodes_map_init(that.attr('id'), lat, lng, zoom, tipText, titleText); 37 38 }); 39 } 40 41 /* ----------------------------------------- 42 Tabs Init 43 ----------------------------------------- */ 44 var tabsNav = $(".cisc-tabs-nav").find('a'); 45 tabsNav.on('click', function(e) { 46 e.preventDefault(); 47 var that = $(this); 48 var parentTab = that.parents('.cisc-tabs'); 49 var tab = that.attr("href"); 50 51 that.addClass("cisc-active"); 52 that.parent().siblings().find('a').removeClass("cisc-active"); 53 parentTab.find('.cisc-tab-content').not(tab).hide(); 54 $(tab).fadeIn(); 55 }); 56 57 /* ----------------------------------------- 58 Accordion Init 59 ----------------------------------------- */ 60 var accordion = $(".cisc-accordion"); 61 var accordionLink = $(".cisc-accordion-panel-title").find('a'); 62 accordionLink.on('click', function(e) { 63 var that = $(this); 64 var accordion = that.parents('.cisc-accordion'); 65 var panel = that.parents('.cisc-accordion-panel'); 66 var content = that.parents('.cisc-accordion-panel').find('.cisc-accordion-panel-wrap'); 67 68 if ( that.hasClass('cisc-active') ) { 69 that.removeClass('cisc-active'); 70 content.slideUp('fast') 71 } else { 72 accordion.find('.cisc-accordion-panel a').removeClass('cisc-active'); 73 accordion.find('.cisc-accordion-panel-wrap').slideUp(); 74 that.addClass('cisc-active'); 75 content.slideDown('fast'); 76 } 77 78 e.preventDefault(); 79 }); 80 81 accordion.each(function() { 82 var that = $(this); 83 var defaultAccordion = that.find('.cisc-open'); 84 85 if ( defaultAccordion.length ) { 86 defaultAccordion.find('.cisc-accordion-panel-title a').trigger('click'); 87 } else { 88 that.find('.cisc-accordion-panel-title').first().find('a').trigger('click'); 89 } 90 }); 91 92 93}); 94 95 96function ci_shortcodes_map_init(mapID, lat, lng, zoom, tipText, titleText) { 97 'use strict'; 98 var myLatlng = new google.maps.LatLng(lat, lng); 99 var mapOptions = { 100 scrollwheel: false, 101 zoom : zoom, 102 center : myLatlng, 103 mapTypeId : google.maps.MapTypeId.ROADMAP 104 }; 105 106 var map = new google.maps.Map(document.getElementById(mapID), mapOptions); 107 108 var contentString = '<div class="content">' + tipText + '</div>'; 109 110 var infowindow = new google.maps.InfoWindow({ 111 content: contentString 112 }); 113 114 var marker = new google.maps.Marker({ 115 position: myLatlng, 116 map : map, 117 title : titleText 118 }); 119 120 google.maps.event.addListener(marker, 'click', function() { 121 infowindow.open(map,marker); 122 }); 123}
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.