PageSourceSearch

https://drhemajajoo.com/wp-content/plugins/designthemes-core-features/shortcodes/js/shortcodes.js?ver=6.7.9

js drhemajajoo.com collected 2026-09-24 12:38:49 UTC 12,487 bytes, 424 lines download raw bytes

1jQuery(document).ready(function($) {
2
3	"use strict";
4
5	var currentWidth = window.innerWidth || document.documentElement.clientWidth;
6
7	
8	/* animate number */
9	$('.dt-sc-counter').each(function(){
10
11	  var $posttext = $(this).find('.dt-sc-counter-number').attr('data-append');
12	  var $append = ''; 
13
14	  if (typeof $posttext === "undefined") {
15		  $append = $.animateNumber.numberStepFactories.append('');
16	  } else {
17		  $append = $.animateNumber.numberStepFactories.append($posttext);
18	  }
19
20	  $(this).one('inview', function (event, visible) {
21		  if(visible === true) {
22			  var val = $(this).find('.dt-sc-counter-number').attr('data-value');
23			  $(this).find('.dt-sc-counter-number').animateNumber({ number: val, numberStep: $append }, 2000);
24		  }
25	  });
26	});
27
28	/* accordion & toggle */
29	$('.dt-sc-toggle').toggle(function(){ $(this).addClass('active'); },function(){ $(this).removeClass('active'); });
30	$('.dt-sc-toggle').click(function(){ $(this).next('.dt-sc-toggle-content').slideToggle(); });
31	
32	$('.dt-sc-toggle-frame-set').each(function(){
33		var $this = $(this),
34		    $toggle = $this.find('.dt-sc-toggle-accordion');
35			
36			$toggle.click(function(){
37				if( $(this).next().is(':hidden') ) {
38					$this.find('.dt-sc-toggle-accordion').removeClass('active').next().slideUp();
39					$(this).toggleClass('active').next().slideDown();
40				}
41				return false;
42			});
43
44			// activate first item always
45			$this.find('.dt-sc-toggle-accordion:first').addClass("active");
46			$this.find('.dt-sc-toggle-accordion:first').next().slideDown();
47  	});
48
49	/* tooltip */
50	if($(".dt-sc-tooltip-bottom").length){
51	   $(".dt-sc-tooltip-bottom").each(function(){	$(this).tipTip({maxWidth: "auto"}); });
52	}
53	
54	if($(".dt-sc-tooltip-top").length){
55	   $(".dt-sc-tooltip-top").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "top"}); });
56	}
57	
58	if($(".dt-sc-tooltip-left").length){
59	   $(".dt-sc-tooltip-left").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "left"}); });
60	}
61	
62	if($(".dt-sc-tooltip-right").length){
63	   $(".dt-sc-tooltip-right").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "right"}); });
64	}
65
66	/* horizontal tabs */
67	if($('ul.dt-sc-tabs-horizontal').length > 0){
68		
69		$('ul.dt-sc-tabs-horizontal').each(function(){
70			$(this).fpTabs('> .dt-sc-tabs-horizontal-content', {
71				effect: 'fade'
72			});
73		});
74	}
75	if($('ul.dt-sc-tabs-horizontal-frame').length > 0){
76		$('ul.dt-sc-tabs-horizontal-frame').each(function(){
77			$(this).fpTabs('> .dt-sc-tabs-horizontal-frame-content', {
78				effect: 'fade'
79			});
80		});
81	}
82
83	/* vertical tabs */
84	if($('ul.dt-sc-tabs-vertical').length > 0){
85		$('ul.dt-sc-tabs-vertical').each(function(){
86			$(this).fpTabs('> .dt-sc-tabs-vertical-content', {
87				effect: 'fade'
88			});
89		});
90
91		$('.dt-sc-tabs-vertical').each(function(){
92			$(this).find("li:first").addClass('first').addClass('current');
93			$(this).find("li:last").addClass('last');
94		});
95
96		$('.dt-sc-tabs-vertical li').click(function(){
97			$(this).parent().children().removeClass('current');
98			$(this).addClass('current');
99		});
100	}
101	if($('ul.dt-sc-tabs-vertical-frame').length > 0){
102		$('ul.dt-sc-tabs-vertical-frame').each(function(){
103			$(this).fpTabs('> .dt-sc-tabs-vertical-frame-content', {
104				effect: 'fade'
105			});
106		});
107
108		$('.dt-sc-tabs-vertical-frame').each(function(){
109			$(this).find("li:first").addClass('first').addClass('current');
110			$(this).find("li:last").addClass('last');
111		});
112
113		$('.dt-sc-tabs-vertical-frame li').click(function(){
114			$(this).parent().children().removeClass('current');
115			$(this).addClass('current');
116		});
117	}
118
119	
120	/* ajax mailchimp */
121	$('form.dt-sc-subscribe-frm').on('submit', function () {
122		
123		var $this = $(this);
124		var $mc_fname = $this.find('#dt_mc_fname').val(),
125			$mc_email = $this.find('#dt_mc_emailid').val(),
126			$mc_apikey = $this.find('#dt_mc_apikey').val(),
127			$mc_listid = $this.find('#dt_mc_listid').val();
128
129		$.ajax({
130			type: "POST",
131			url: dttheme_urls.ajaxurl,
132			data:
133			{
134				action: 'dt_theme_mailchimp_subscribe',
135				mc_fname: $mc_fname,
136				mc_email: $mc_email,
137				mc_apikey: $mc_apikey,
138				mc_listid: $mc_listid
139			},
140			success: function (response) {
141				$this.parent().find('.dt_ajax_subscribe_msg').html(response);
142				$this.parent().find('.dt_ajax_subscribe_msg').slideDown('slow');
143				if (response.match('success') != null) $this.slideUp('slow');
144			}
145		});
146
147		return false;
148
149    });
150	
151	
152	//video section ilightbox
153	if($(".play-button").length) {
154		$('.play-button').iLightBox({
155					skin: 'metro-white'
156		});
157	}
158	
159	//lightbox
160	$('#inline_html_simple').iLightBox({
161				attr: 'target',
162				skin: 'metro-white cycle-lightbox-content'
163			});
164	$('#inline_html_simple2').iLightBox({
165				attr: 'target',
166				skin: 'metro-white cycle-lightbox-content'
167			});
168	$('#inline_html_simple3').iLightBox({
169				attr: 'target',
170				skin: 'metro-white cycle-lightbox-content'
171			});
172	$('#inline_html_simple4').iLightBox({
173				attr: 'target',
174				skin: 'metro-white cycle-lightbox-content'
175			});
176	$('#inline_html_simple5').iLightBox({
177				attr: 'target',
178				skin: 'metro-white cycle-lightbox-content'
179			});
180	$('#inline_html_simple6').iLightBox({
181				attr: 'target',
182				skin: 'metro-white cycle-lightbox-content'
183			});
184	//lightbox
185	
186	//remove <p></p>
187	jQuery('p:empty').remove();
188	
189	$(window).load(function(){
190
191		/* testimonial carousel */
192		if($(".carousel_items").length) {
193			$(".carousel_items .dt-sc-testimonial-carousel").each(function(){
194	
195			  var $prev = $(this).parents(".carousel_items").find(".testimonial-prev");
196			  var $next = $(this).parents(".carousel_items").find(".testimonial-next");
197	
198			  $(this).carouFredSel({
199				responsive: true,
200				auto: true,
201				width: '100%',
202				prev: $prev,
203				next: $next,
204				height: 'variable',
205				scroll: { easing: "linear", duration: 500, fx: "fade" },
206				items: { width: 1170, height: 'variable',  visible: { min: 1, max: 1 } },
207				swipe:{
208					  onTouch: true,
209					  onMouse: true
210				},
211			  });
212			});
213		}
214		
215		/* team carousel */
216		if($(".team_carousel_items").length) {
217			$(".team_carousel_items .dt-sc-team-carousel").each(function(){
218	
219			  var $scroll = $(this).parents(".dt-sc-team-wrapper").attr('data-scroll');
220			  var $visible = $(this).parents(".dt-sc-team-wrapper").attr('data-visible');
221			  
222			  if(currentWidth < 767){
223				  $scroll = $visible = 1;
224			  }
225	
226			  $(this).carouFredSel({
227				responsive: true,
228				auto: false,
229				width: '100%',
230				height: 'variable',
231				scroll: parseInt($scroll), // The number of items to scroll at once
232				items: {
233					height: 'variable',
234					visible:{
235						min: parseInt($visible) // The number of items to show at once
236					}
237				},
238				swipe:{
239					  onTouch: true,
240					  onMouse: true
241				},
242				pagination	: {
243					  container	: function() {
244						  return $(this).parents(".dt-sc-team-wrapper").find("div.carousel-arrows");
245					  }
246				  }
247			  });
248			});
249		}
250		
251		/* partners & featured products carousel */
252		if($(".dt-sc-partners-carousel").length) {
253			$(".dt-sc-partners-carousel").each(function(){
254
255				var $prev = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-prev");
256				var $next = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-next");
257				var $scroll = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-scroll');
258				var $visible = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-visible');
259				
260				if(currentWidth < 767){
261				  $scroll = $visible = 1;
262			  	}
263				
264				$(this).carouFredSel({
265					responsive: true,
266					auto: false,
267					width: '100%',
268					height: 'variable',
269					prev: $prev,
270					next: $next,
271					scroll: parseInt($scroll), // The number of items to scroll at once
272					items: {
273						height: 'variable',
274						visible:{
275							min: parseInt($visible) // The number of items to show at once
276						}
277					}
278				});
279			});
280		}
281
282		/* images carousel */
283		if($(".dt-sc-images-carousel").length) {
284			$(".dt-sc-images-carousel").each(function(){
285
286				var $prev = $(this).parents(".dt-sc-images-wrapper").find(".images-prev");
287				var $next = $(this).parents(".dt-sc-images-wrapper").find(".images-next");
288
289				$(this).carouFredSel({
290					responsive: true,
291					auto: false,
292					width: '100%',
293					height: 'variable',
294					prev: $prev,
295					next: $next,
296					scroll: 1,
297					items: {
298						width:570,
299						height: 'variable',
300						visible: { min: 1, max: 1 }
301					}
302				});
303			});
304		}
305	
306		/* twitter carousel */
307		if($('.dt-sc-twitter-carousel-wrapper').length > 0) {
308			$('.dt-sc-twitter-carousel-wrapper .dt-sc-twitter-carousel').carouFredSel({
309				width: 'auto',
310				height: 'auto',
311				scroll: 1,
312				direction: 'up',
313				items: {
314					height: 'auto',
315					visible: { min: 1, max: 1 }
316				}
317			});
318		}
319
320		/* special testimonials */
321		if($('.dt-sc-testimonial-special-wrapper').length > 0) {
322			$('.dt-sc-testimonial-special-wrapper .dt-sc-testimonial-special').carouFredSel({
323				responsive: true,
324				auto: false,
325				width: '100%',
326				pagination: {
327					container: ".dt-sc-testimonial-images",
328					anchorBuilder: false
329				},
330				height: 'auto',
331				scroll: { fx: "crossfade" },
332				items: { visible: { min: 1, max: 1 } }
333			});
334		}
335		
336		/* donutchart */
337		$(".dt-sc-donutchart").each(function(){
338			var $this = $(this);
339			var $bgColor =  ( $this.data("bgcolor") !== undefined ) ? $this.data("bgcolor") : "#5D18D6";
340			var $fgColor =  ( $this.data("fgcolor") !== undefined ) ? $this.data("fgcolor") : "#000000";
341			var $size = ( $this.data("size") !== undefined ) ? $this.data("size") : "100";
342		 
343			$this.donutchart({'size': $size, 'fgColor': $fgColor, 'bgColor': $bgColor , 'donutwidth' : 5 });
344			$this.donutchart('animate');
345		});
346	});
347
348	/* parallax section */
349	if($(".dt-sc-parallax-section").length) {
350		$('.dt-sc-parallax-section').each(function(){
351			$(this).bind('inview', function (event, visible) {
352				if(visible === true) {
353					$(this).parallax("50%", 0.5);
354				} else {
355					$(this).css('background-position', '');
356				}
357			});
358		});
359	}
360
361	/* bmi calculation */
362	$('form[name="frmbmi"]').submit(function(){
363		var This = $(this);
364		var fet = This.find('input[name="txtfeet"]').val();
365		var inc = This.find('input[name="txtinches"]').val();
366		var tinc = ( parseInt(fet) * 12 ) + parseInt(inc);
367			
368		var lbs = This.find('input[name="txtlbs"]').val();
369			
370		var bmi = ( parseFloat(lbs) / (tinc * tinc) ) * 703;
371			
372		This.find('input[name="txtbmi"]').val(parseFloat(bmi).toFixed(1));
373		return false;
374	});
375
376	/* bmi class */
377	if($('.fancyInline').length > 0) {
378		var str = $('.fancyInline').attr('href');
379		str = str.substr(0, 4);
380		if(str !== 'http') {
381			$('.fancyInline').fancybox({
382				scrolling: 'no',
383				width: 'auto',
384				height: 'auto'
385			});
386		}
387	}
388	
389	/* video manager */
390	if($(".video-section").length) {
391		
392		if($(".dt-sc-video-item").length) {
393			
394			$(".dt-sc-video-item").each(function(){
395				$(this).click(function(){
396					$('.video-overlay-inner a').attr('href', $(this).attr('data-link'));
397					$('.video-section img').attr('src', $(this).find('.dt-sc-vitem-thumb img').attr('data-full'));
398					$('.video-overlay-inner h2').html($(this).find('h2').html());
399					$('.video-overlay-inner p').html($(this).find('p').html());
400					$(this).parent('div').children().removeClass('active');
401					$(this).addClass('active');
402				});
403			});
404		}
405		
406	
407		$(".video-overlay-inner a").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000,default_width: windowWidth,default_height: windowHeight,autoplay_slideshow: false,social_tools: false,deeplinking:false});
408		var video_scroll = $(".dt-sc-video-manager-right").niceScroll({ cursorcolor:"#ffffff", cursorwidth: "2px"});
409		//video_scroll.rail.addClass('dt-sc-skin');
410		
411	}
412});
413
414/* progress bar */
415(function($){
416	$(".dt-sc-progress").one('inview', function (event, visible) {
417		var $this = $(this),
418		pvalue = $this.find('.dt-sc-bar').attr('data-value');
419		
420		if (visible == true) {
421			$this.find('.dt-sc-bar').animate({width: pvalue + "%"},600,function(){ $this.find('.dt-sc-bar-text').fadeIn(400); });
422		}
423	});
424})(jQuery);

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.