PageSourceSearch

https://replication.com/wp-content/plugins/entrepreneur-shortcodes/js/init.js?ver=1.1

js replication.com collected 2026-10-09 22:12:28 UTC 3,793 bytes, 134 lines download raw bytes

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 mapOptions = {
66					scrollwheel: false,
67					/*navigationControl: false,
68					mapTypeControl: false,
69					scaleControl: false,*/
70					draggable: false,
71					zoom: $zoom,
72					mapTypeId: google.maps.MapTypeId.ROADMAP
73				};
74				
75				map = new google.maps.Map($('#'+ $map_id + ' .map_canvas')[0], mapOptions);
76				
77				map.setCenter(results[0].geometry.location);
78				
79				var marker = new google.maps.Marker({
80				  map: map, 
81				  position: results[0].geometry.location,
82				  title : $location,
83				  animation: google.maps.Animation.DROP
84				});
85				
86				var contentString = '<div class="map-infowindow">'+
87					( ($title) ? '<h3>' + $title + '</h3>' : '' ) + 
88					$location + '<br/>' +
89					'<a href="https://maps.google.com/?q='+ $location +'" target="_blank">View on Google Map</a>' +
90					'</div>';
91				
92				var infowindow = new google.maps.InfoWindow({
93				  content: contentString
94				});
95				
96				google.maps.event.addListener(map, 'click', function(e) {
97					map.setOptions({draggable: true});
98				});
99				
100				google.maps.event.addListener(marker, 'click', function() {
101					infowindow.open(map,marker);
102				});
103				
104				google.maps.event.addListenerOnce(map, 'tilesloaded', function() {
105				  infowindow.open(map, marker);
106				});
107				
108			} else {
109				$('#'+ $map_id).html("Geocode was not successful for the following reason: " + status);
110			}
111		});
112		
113	});
114
115});
116
117function mycarousel_initCallback(carousel) {
118
119	// Disable autoscrolling if the user clicks the prev or next button.
120	carousel.buttonNext.bind('click', function() {
121		carousel.startAuto(0);
122	});
123
124	carousel.buttonPrev.bind('click', function() {
125		carousel.startAuto(0);
126	});
127
128	// Pause autoscrolling if the user moves with the cursor over the clip.
129	carousel.clip.hover(function() {
130		carousel.stopAuto();
131	}, function() {
132		carousel.startAuto();
133	});
134}

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.