| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 | /*Name: 			UI Elements / Lightbox - ExamplesWritten by: 	Okler Themes - (http://www.okler.net)Theme Version: 	2.0.0*/(function($) {	'use strict';	/*	Single Image	*/	$('.image-popup-vertical-fit').magnificPopup({		type: 'image',		closeOnContentClick: true,		mainClass: 'mfp-img-mobile',		image: {			verticalFit: true		}	});	$('.image-popup-no-margins').magnificPopup({		type: 'image',		closeOnContentClick: true,		closeBtnInside: false,		fixedContentPos: true,		mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side		image: {			verticalFit: true		},		zoom: {			enabled: true,			duration: 300 // don't foget to change the duration also in CSS		}	});	/*	Gallery	*/	$('.popup-gallery').magnificPopup({		delegate: 'a',		type: 'image',		tLoading: 'Loading image #%curr%...',		mainClass: 'mfp-img-mobile',		gallery: {			enabled: true,			navigateByImgClick: true,			preload: [0,1] // Will preload 0 - before current, and 1 after the current image		},		image: {			tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'		}	});	/*	Zoom Gallery	*/	$('.zoom-gallery').magnificPopup({		delegate: 'a',		type: 'image',		closeOnContentClick: false,		closeBtnInside: false,		mainClass: 'mfp-with-zoom mfp-img-mobile',		image: {			verticalFit: true,			titleSrc: function(item) {				return item.el.attr('title') + ' · <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';			}		},		gallery: {			enabled: true		},		zoom: {			enabled: true,			duration: 300, // don't foget to change the duration also in CSS			opener: function(element) {				return element.find('img');			}		}	});	/*	Popup with video or map	*/	$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({		disableOn: 700,		type: 'iframe',		mainClass: 'mfp-fade',		removalDelay: 160,		preloader: false,		fixedContentPos: false	});	/*	Dialog with CSS animation	*/	$('.popup-with-zoom-anim').magnificPopup({		type: 'inline',		fixedContentPos: false,		fixedBgPos: true,		overflowY: 'auto',		closeBtnInside: true,		preloader: false,		midClick: true,		removalDelay: 300,		mainClass: 'my-mfp-zoom-in'	});	$('.popup-with-move-anim').magnificPopup({		type: 'inline',		fixedContentPos: false,		fixedBgPos: true,		overflowY: 'auto',		closeBtnInside: true,		preloader: false,		midClick: true,		removalDelay: 300,		mainClass: 'my-mfp-slide-bottom'	});	/*	Form	*/	$('.popup-with-form').magnificPopup({		type: 'inline',		preloader: false,		focus: '#name',		// When elemened is focused, some mobile browsers in some cases zoom in		// It looks not nice, so we disable it:		callbacks: {			beforeOpen: function() {				if($(window).width() < 700) {					this.st.focus = false;				} else {					this.st.focus = '#name';				}			}		}	});	/*	Ajax	*/	$('.simple-ajax-popup').magnificPopup({		type: 'ajax'	});}).apply(this, [jQuery]);
 |