PageSourceSearch

https://pharmacapitalpartners.com/js/functions.js

js pharmacapitalpartners.com collected 2026-10-09 02:00:29 UTC 13,119 bytes, 381 lines download raw bytes

1// If JavaScript is enabled remove 'no-js' class and give 'js' class
2jQuery('html').removeClass('no-js').addClass('js');
3
4// Add .osx class to html if on Os/x
5if ( navigator.appVersion.indexOf("Mac")!=-1 ) 
6	jQuery('html').addClass('osx');
7
8// When DOM is fully loaded
9jQuery(document).ready(function($) {
10  "use strict";
11
12
13/* --------------------------------------------------------	
14	 External Links
15   --------------------------------------------------------	*/	
16
17	  $(window).load(function() {
18			$('a[rel=external]').attr('target','_blank');	
19		});
20
21/* --------------------------------------------------------	
22	 Tooltips
23   --------------------------------------------------------	*/	
24
25    $('body').tooltip({
26        delay: { show: 300, hide: 0 },
27        selector: '[data-toggle=tooltip]:not([disabled])'
28    });
29    
30/* --------------------------------------------------------	
31	 Back To Top
32   --------------------------------------------------------	*/	
33    
34		$('.back-to-top').click(function () {
35			$('body,html').animate({
36				scrollTop: 0
37			}, 800);
38			return false;
39		}); 
40    
41/* --------------------------------------------------------	
42	 Inc Dec
43   --------------------------------------------------------	*/	
44    
45    $(function() {
46      $(".inc").click(function() { var $button = $(this); var old = $button.parent().find("input").val(); var newVal = parseFloat(old) + 1; $button.parent().find("input").val(newVal); }); 
47      
48      $(".dec").click(function() { var $button = $(this); var old = $button.parent().find("input").val(); var newVal = parseFloat(old) - 1; $button.parent().find("input").val(newVal); }); 
49    }); 
50    
51/* --------------------------------------------------------	
52	 Dynamic Progress Bar
53   --------------------------------------------------------	*/
54  
55    $(window).load(function(){    
56      $('.bar').css('width',  function(){ return ($(this).attr('data-percentage')+'%')});
57    });
58    
59/* --------------------------------------------------------	
60	 Back To Top Button
61   --------------------------------------------------------	*/	
62
63	(function() {   
64  		$('<a id="back-to-top"></a>').appendTo($('body'));
65
66			$(window).scroll(function() {
67				if($(this).scrollTop() != 0) {
68					$('#back-to-top').fadeIn();	
69				} else {
70					$('#back-to-top').fadeOut();
71				}
72			});
73			
74			$('#back-to-top').click(function() {
75				$('body,html').animate({scrollTop:0},800);
76			});	        
77	})();  
78
79/* --------------------------------------------------------	
80	 Responsive Navigation
81   --------------------------------------------------------	*/	
82
83  jQuery('header nav').meanmenu({
84    meanMenuClose: "X", // single character you want to represent the close menu button
85    meanMenuCloseSize: "22px", // set font size of close button
86    meanMenuOpen: "<span /><span /><span />", // text/markup you want when menu is closed
87    meanRevealPosition: "right", // left right or center positions
88    meanRevealPositionDistance: "0", // Tweak the position of the menu
89    meanRevealColour: "", // override CSS colours for the reveal background
90    meanRevealHoverColour: "", // override CSS colours for the reveal hover
91    meanScreenWidth: "1025", // set the screen width you want meanmenu to kick in at
92    meanNavPush: "", // set a height here in px, em or % if you want to budge your layout now the navigation is missing.
93    meanShowChildren: true, // true to show children in the menu, false to hide them
94    meanExpandableChildren: true, // true to allow expand/collapse children
95    meanExpand: "+", // single character you want to represent the expand for ULs
96    meanContract: "-", // single character you want to represent the contract for ULs
97    meanRemoveAttrs: false // true to remove classes and IDs, false to keep them
98  });
99
100  //Move Nav
101   
102  $(window).scroll(function(){ 
103   if ($(this).scrollTop() > 50){ 
104  	$('.navbar').addClass("navbar-move");
105    $('.navbar .nav > li > a').addClass("menu-scroll-a");
106    $('.logo').addClass("navbar-move");
107   } 
108   else{
109  	$('.navbar').removeClass("navbar-move");
110    $('.navbar .nav > li > a').removeClass("menu-scroll-a");
111    $('.logo').removeClass("navbar-move");
112   }
113  }); 
114  
115/* --------------------------------------------------------	
116	 Owl Carousel
117   --------------------------------------------------------	*/
118    
119  $(".carousel-top-navigation").owlCarousel({
120    slideSpeed : 600,
121    paginationSpeed: 2000, 
122    autoPlay: false,
123    items : 6,
124    itemsDesktop : [1199,5],
125    itemsDesktopSmall : [960,4],
126    itemsTablet: [768,3],
127    itemsMobile : [480,2],
128    navigation:true,
129    pagination:false,
130    navigationText : false
131  });                
132  
133/* --------------------------------------------------------	
134	 Magnific Popup
135   --------------------------------------------------------	*/ 
136
137    $('.image-link').magnificPopup({type:'image'});
138
139  	$('.popup-gallery').magnificPopup({
140  		delegate: 'a',
141  		type: 'image',
142  		tLoading: 'Loading image #%curr%...',
143  		mainClass: 'mfp-img-mobile',
144  		gallery: {
145  			enabled: true,
146  			navigateByImgClick: true,
147  			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
148  		},
149  		image: {
150  			tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
151  			titleSrc: function(item) {
152  				return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
153  			}
154  		}
155  	});
156
157/* --------------------------------------------------------	
158	 Portfolio 
159   --------------------------------------------------------	*/	
160  
161  (function() {
162   
163    $(window).load(function(){
164    	// container
165    	var $container = $('#portfolio-items');
166    	function filter_projects(tag)
167    	{
168    	  // filter projects
169    	  $container.isotope({ filter: tag });
170    	  // clear active class
171    	  $('li.act').removeClass('act');
172    	  // add active class to filter selector
173    	  $('#portfolio-filter').find("[data-filter='" + tag + "']").parent().addClass('act');
174    	}
175    	if ($container.length) {
176    		// conver data-tags to classes
177    		$('.project').each(function(){
178    			var $this = $(this);
179    			var tags = $this.data('tags');
180    			if (tags) {
181    				var classes = tags.split(',');
182    				for (var i = classes.length - 1; i >= 0; i--) {
183    					$this.addClass(classes[i]);
184    				};
185    			}
186    		})
187    		// initialize isotope
188    		$container.isotope({
189    		  // options...
190    		  itemSelector : '.project',
191    		  layoutMode   : 'fitRows'
192    		});
193    		// filter items
194    		$('#portfolio-filter li a').click(function(){
195    			var selector = $(this).attr('data-filter');
196    			filter_projects(selector);
197    			return false;
198    		});
199    		// filter tags if location.has is available. e.g. http://example.com/work.html#design will filter projects within this category
200    		if (window.location.hash!='')
201    		{
202    			filter_projects( '.' + window.location.hash.replace('#','') );
203    		}
204    	}
205      
206    })
207
208	})();
209
210/* --------------------------------------------------------	
211	 Parallax
212   --------------------------------------------------------	*/	
213
214    var detectmob = false;	
215    if(navigator.userAgent.match(/Android/i)
216      || navigator.userAgent.match(/webOS/i)
217      || navigator.userAgent.match(/iPhone/i)
218      || navigator.userAgent.match(/iPad/i)
219      || navigator.userAgent.match(/iPod/i)
220      || navigator.userAgent.match(/BlackBerry/i)
221      || navigator.userAgent.match(/Windows Phone/i)) {							
222        detectmob = true;
223    }
224    
225    if (detectmob === true) {
226      $( '.parallax' ).each(function(){
227    			$(this).addClass('parallax-mobile');
228    	});
229    }
230    else {
231        $( '#parallax-one' ).parallax();
232        $( '#parallax-two' ).parallax();
233        $( '#parallax-three' ).parallax();
234    }  
235
236/* --------------------------------------------------------	
237	 Flex Initialize
238   --------------------------------------------------------	*/	
239
240    $(window).load(function() {
241    
242      $('.flex-1').flexslider({
243        animation: "slide",
244        slideshow: false,
245        useCSS : false,
246        animationLoop: true 	
247      });
248     
249      jQuery('.flex-1 .flex-direction-nav .flex-next').html('<i class="fa fa-angle-right"></i>');
250      jQuery('.flex-1 .flex-direction-nav .flex-prev').html('<i class="fa fa-angle-left"></i>'); 
251     
252      $('.flex-2').flexslider({
253        animationLoop: false,
254    		animation: 'slide',
255        useCSS : false
256    	 });     
257    
258      $('.flex-3').flexslider({
259        animation: "slide",
260        slideshow: false,
261        useCSS : false,
262        animationLoop: false 	
263      });
264     
265      jQuery('.flex-3 .flex-direction-nav .flex-next').html('<i class="fa fa-angle-right"></i>');
266      jQuery('.flex-3 .flex-direction-nav .flex-prev').html('<i class="fa fa-angle-left"></i>'); 
267    
268      $('.flex-4').flexslider({
269        animationLoop: false,
270    		animation: 'slide',
271        slideshow: false,
272        useCSS : false
273    	 }); 
274    
275    }); 
276
277/* --------------------------------------------------------	
278	 Fitvids
279   --------------------------------------------------------	*/	
280
281    $(window).load(function() {
282      $("body").fitVids();
283    });
284
285/* --------------------------------------------------------	
286	 Refine Slider
287   --------------------------------------------------------	*/	
288  
289  $(window).load(function() {
290  
291    //main slider
292    $('.main-slider-direct-nav').refineSlide({
293      maxWidth              : 1920,      // Max slider width - should be set to image width
294      transition            : 'random',  // String (default 'cubeV'): Transition type ('custom', random', 'cubeH', 'cubeV', 'fade', 'sliceH', 'sliceV', 'slideH', 'slideV', 'scale', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV')
295      fallback3d            : 'random', // String (default 'sliceV'): Fallback for browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms)
296      customTransitions     : [],       // Arr (Custom transitions wrapper)
297      perspective           : 1000,     // Perspective (used for 3d transforms)
298      useThumbs             : false,     // Bool (default true): Navigation type thumbnails
299      useArrows             : true,    // Bool (default false): Navigation type previous and next arrows
300      thumbMargin           : 3,        // Int (default 3): Percentage width of thumb margin
301      autoPlay              : false,    // Int (default false): Auto-cycle slider
302      delay                 : 5000,     // Int (default 5000) Time between slides in ms
303      transitionDuration    : 800,      // Int (default 800): Transition length in ms
304      startSlide            : 0,        // Int (default 0): First slide
305      keyNav                : true,     // Bool (default true): Use left/right arrow keys to switch slide
306      captionWidth          : 50,       // Int (default 50): Percentage of slide taken by caption
307      arrowTemplate         : '<div class="rs-arrows"><a href="#" class="rs-prev"></a><a href="#" class="rs-next"></a></div>', // String: The markup used for arrow controls (if arrows are used). Must use classes '.rs-next' & '.rs-prev'
308      onInit                : function () {}, // Func: User-defined, fires with slider initialisation
309      onChange              : function () {}, // Func: User-defined, fires with transition start
310      afterChange           : function () {}  // Func: User-defined, fires after transition end
311  
312    });
313    jQuery('.rs-arrows .rs-next').html('<i class="fa fa-angle-right"></i>');
314    jQuery('.rs-arrows .rs-prev').html('<i class="fa fa-angle-left"></i>');
315  
316  });      
317  
318/* --------------------------------------------------------	
319	 SLY Effects
320   --------------------------------------------------------	*/
321
322  (function () {
323  
324		var $frame = $('#effects');
325		var $wrap  = $frame.parent();
326    
327		// Call Sly on frame
328		$frame.sly({
329			horizontal: 1,
330			itemNav: 'forceCentered',
331			smart: 1,
332			activateMiddle: 1,
333			activateOn: 'click',
334			mouseDragging: 1,
335			touchDragging: 1,
336			releaseSwing: 1,
337		  cycleBy:       'items', // Enable automatic cycling by 'items' or 'pages'.
338		  cycleInterval: 5000, // Delay between cycles in milliseconds.
339		  pauseOnHover:  0,    // Pause cycling when mouse hovers over the FRAME.
340		  startPaused:   0,    // Whether to start in paused sate.      
341			startAt: 3,
342			scrollBar: $wrap.find('.scrollbar'),
343			scrollBy: 1,
344			speed: 300,
345			elasticBounds: 1,
346	 		easing: 'swing',
347			dragHandle: 1,
348			dynamicHandle: 1,
349			clickBar: 1,
350  
351			// Buttons
352			prev: $wrap.find('.prev'),
353			next: $wrap.find('.next')
354		});
355
356    // reload on resize
357    $(window).resize(function(e) {
358      
359      $frame.sly('reload');       
360       
361    });
362
363  })();    
364
365/* --------------------------------------------------------	
366	 Layer Slider
367   --------------------------------------------------------	
368
369	$('#layerslider').layerSlider({
370		skinsPath : 'layerslider/skins/',
371		skin : 'fullwidth',
372		thumbnailNavigation : 'hover',
373		hoverPrevNext : true,
374    touchNav : true,   
375    hoverBottomNav : true,  
376		responsive : true
377    
378	});
379*/
380
381});

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.