jQuery(function($){
// external links in new tab
$(document.links).filter(function() {
return this.hostname != window.location.hostname;
}).attr('target', '_blank');
$('.noop>a').click(function(e){
e.preventDefault();
});
// youtube in popup?
$('.youtube, .vimeo, .gmaps, .artist_youtube, .artist_vimeo').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
// fixedContentPos: false,
callbacks: {
open: function() {
$('.sc-player.playing a.sc-pause').click();
}
},
iframe: {
markup: '
', // HTML markup of popup, `mfp-close` will be replaced by the close button
patterns: {
youtube: {
index: 'youtube.com/watch', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index).
id: 'v=', // String that splits URL in a two parts, second part should be %id%
// Or null - full URL will be returned
// Or a function that should return %id%, for example:
// id: function(url) { return 'parsed id'; }
src: '//http://www.youtube.com/embed/%id%?autoplay=1&vq=large' // URL that will be set as a source for iframe.
},
vimeo: {
index: 'vimeo.com/',
id: '/',
src: '//http://player.vimeo.com/video/%id%?autoplay=1'
},
gmaps: {
index: '//http://maps.google./',
src: '%id%&output=embed'
}
// you may add here more sources
},
srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src".
}
});
$('.image-popup-no-margins, .image-popup').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
// }
});
var bglist = '0184-1600.jpg,0395-1600.jpg,0422-1600.jpg,0489-1600.jpg,0507-1600.jpg,0595-1600.jpg,0622-1600.jpg,0676-1600.jpg,2015-116-1600.jpg,2015-55-1600.jpg,2015-66-1600.jpg,2015-72-1600.jpg,2015-81-1600.jpg,2015-84-1600.jpg,0475-1600.jpg,2015-87-1600.jpg,2015-54-1600.jpg,e14-1600.jpg';
var slides = [];
// no fancy stuff for smallr/touch devices
var ua = navigator.userAgent;
function is_touch_device() {
return !!('ontouchstart' in window) ? 1 : 0;
}
// if ( (screen.width<=699) || is_touch_device() || ua.match(/(Opera\ Mini|iPhone|iPod|iPad|BlackBerry)/) ) {
if ( (screen.width<=699) ) { // || ua.match(/(Opera\ Mini|BlackBerry)/) ) {
$.each( bglist.split(','), function( i, v) {
slides.push({
image : '/thumb/'+screen.width+'x'+screen.height+'/theme/rel16/img/bg2016/'+v, title : '', thumb : '', url : ''
});
});
} else {
$.each( bglist.split(','), function( i, v) {
slides.push({
image : '/theme/rel16/img/bg2016/'+v, title : '', thumb : '', url : ''
});
});
}
// supersized
$.supersized({
// Functionality
slide_interval : 45000, // Length between transitions
transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousl Left
transition_speed : 2000, // Speed of transition
fit_portrait : 0,
keyboard_nav : 0,
random : 1,
start_slide : 0,
// Components
slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
slides : slides
/* slides : [ // Slideshow Images
{image : '/theme/rel15/img/bg2015/02.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/21.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/24.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/26.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/82.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/51.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/75.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/85b.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/90.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/92.jpg', title : '', thumb : '', url : ''},
{image : '/theme/rel15/img/bg2015/61.jpg', title : '', thumb : '', url : ''}
] */
});
/*
// hash navigation
$(document).on('click', 'a[href*="#"]', function() {
var slashedHash = '#/' + this.hash.slice(1);
if ( this.hash ) {
if ( slashedHash === location.hash ) {
$.smoothScroll({scrollTarget: this.hash});
} else {
$.bbq.pushState(slashedHash);
}
return false;
}
});
$(window).bind('hashchange', function(event) {
var tgt = location.hash.replace(/^#\/?/,'');
if ( document.getElementById(tgt) ) {
$.smoothScroll({scrollTarget: '#' + tgt});
}
});
$(window).trigger('hashchange');
//$('#icon-menu').scrollspy();
*/
});