1jQuery(document).ready(function($) { "use strict"; 2 3 // Frame 4 $('.su-frame-align-center, .su-frame-align-none').each(function() { 5 var frame_width = $(this).find('img').width(); 6 $(this).css('width', frame_width + 12); 7 }); 8 9 // Spoiler 10 $('.su-spoiler .su-spoiler-title').click(function() { 11 12 var // Spoiler elements 13 spoiler = $(this).parent('.su-spoiler').filter(':first'), 14 title = spoiler.children('.su-spoiler-title'), 15 content = spoiler.children('.su-spoiler-content'), 16 isAccordion = ( spoiler.parent('.su-accordion').length > 0 ) ? true : false; 17 18 if ( spoiler.hasClass('su-spoiler-open') ) { 19 if ( !isAccordion ) { 20 content.hide(200); 21 spoiler.removeClass('su-spoiler-open'); 22 } 23 } 24 else { 25 spoiler.parent('.su-accordion').children('.su-spoiler').removeClass('su-spoiler-open'); 26 spoiler.parent('.su-accordion').find('.su-spoiler-content').hide(200); 27 content.show(100); 28 spoiler.addClass('su-spoiler-open'); 29 } 30 }); 31 32 // Tabs 33 $('.su-tabs-nav').delegate('span:not(.su-tabs-current)', 'click', function() { 34 $(this).addClass('su-tabs-current').siblings().removeClass('su-tabs-current') 35 .parents('.su-tabs').find('.su-tabs-pane').hide().eq($(this).index()).show(); 36 }); 37 $('.su-tabs-pane').hide(); 38 $('.su-tabs-nav span:first-child').addClass('su-tabs-current'); 39 $('.su-tabs-panes .su-tabs-pane:first-child').show(); 40 41 // Tables 42 $('.su-table tr:even').addClass('su-even'); 43 44 // Google Maps 45 $('.googlemap').each( function() { 46 47 var $map_id = $(this).attr('id'), 48 $title = $(this).find('.title').val(), 49 $location = $(this).find('.location').val(), 50 $zoom = parseInt( $(this).find('.zoom').val() ), 51 geocoder, map; 52 53 var mapOptions = { 54 scrollwheel: false, 55 zoom: $zoom, 56 mapTypeId: google.maps.MapTypeId.ROADMAP 57 }; 58 59 geocoder = new google.maps.Geocoder(); 60 61 geocoder.geocode( { 'address': $location}, function(results, status) { 62 63 if (status == google.maps.GeocoderStatus.OK) { 64 65 var latitude = results[0].geometry.location.lat(); 66 67 var longitude = results[0].geometry.location.lng(); 68 69 70 71 var latlng = new google.maps.LatLng(latitude, longitude); 72 73 var mapOptions = { 74 scrollwheel: false, 75 center: latlng, 76 /*navigationControl: false, 77 mapTypeControl: false, 78 scaleControl: false,*/ 79 draggable: false, 80 zoom: $zoom, 81 mapTypeId: google.maps.MapTypeId.ROADMAP 82 }; 83 84 map = new google.maps.Map($('#'+ $map_id + ' .map_canvas')[0], mapOptions); 85 86 var latlng = new google.maps.LatLng(latitude, longitude); 87 //map.setCenter(latlng); 88 89 //map.setCenter(results[0].geometry.location); 90 91 var marker = new google.maps.Marker({ 92 map: map, 93 //position: results[0].geometry.location, 94 position: latlng, 95 title : $location, 96 animation: google.maps.Animation.DROP 97 }); 98 99 var contentString = '<div class="map-infowindow">'+ 100 ( ($title) ? '<h3>' + $title + '</h3>' : '' ) + 101 $location + '<br/>' + 102 '<a href="https://maps.google.com/?q='+ $location +'" target="_blank">View on Google Map</a>' + 103 '</div>'; 104 105 var infowindow = new google.maps.InfoWindow({ 106 content: contentString 107 }); 108 109 google.maps.event.addListener(map, 'click', function(e) { 110 map.setOptions({draggable: true}); 111 }); 112 113 google.maps.event.addListener(marker, 'click', function() { 114 infowindow.open(map,marker); 115 }); 116 117 google.maps.event.addListenerOnce(map, 'tilesloaded', function() { 118 infowindow.open(map, marker); 119 }); 120 121 } else { 122 $('#'+ $map_id).html("Geocode was not successful for the following reason: " + status); 123 } 124 }); 125 126 }); 127 128}); 129 130function mycarousel_initCallback(carousel) { 131 132 // Disable autoscrolling if the user clicks the prev or next button. 133 carousel.buttonNext.bind('click', function() { 134 carousel.startAuto(0); 135 }); 136 137 carousel.buttonPrev.bind('click', function() { 138 carousel.startAuto(0); 139 }); 140 141 // Pause autoscrolling if the user moves with the cursor over the clip. 142 carousel.clip.hover(function() { 143 carousel.stopAuto(); 144 }, function() { 145 carousel.startAuto(); 146 }); 147}
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.