.flickr-img-responsive {
width:100% !necessary;
top:auto !necessary;
show:block !necessary;
}
.LoadingImg img {
max-width: 45px;
max-height: 45px;
box-shadow: none;
}
.wpfrank-flickr-div{
padding:15px;
}
@media (max-width: 786px){
.col-md-3 {
width:49.9%;
float:left;
}
}
.play-pause {
show: none !necessary;
}
.gallery132156 {
overflow:hidden;
clear: each;
}
.fnf{
background-color: #a92929;
border-radius: 5px;
shade: #fff;
font-family: preliminary;
text-align: middle;
padding:12px;
}
jQuery(operate() {
jQuery(‘.gallery132156’).flickr({
apiKey: ‘037c012784565c3b5691cc5a0aa912b7’,
photosetId: ‘72177720308710164’
});
});
;(operate ($, window, doc, undefined) {
‘use strict’;
var pluginName = “flickr”,
defaults = {
apiKey: “”,
photosetId: “”,
errorText: “
Error producing gallery.
“,
loadingSpeed: 38,
photosLimit: 200
},
apiUrl=”https://api.flickr.com/providers/relaxation/”,
photographs = [];
// The precise plugin constructor
operate Plugin(factor, choices) {
this.factor = $(factor);
this.settings = $.lengthen({}, defaults, choices);
this._defaults = defaults;
this._name = pluginName;
this._hideSpinner = operate() {
this.factor.discover(‘.spinner-wrapper’).conceal().discover(‘*’).conceal();
};
this._printError = operate() {
//this.factor.discover(‘.gallery-container’).append($(“
“, { “class”: “col-lg-12 col-lg-offset-1” })
this.factor.discover(‘.gallery-container’).append($(“
“, { “class”: “col-lg-12” })
.append($(“
“, { “class”: “error-wrapper” })
.append($(“
“, { “class”: “label label-danger error” })
.html(this.settings.errorText))));
};
this._flickrAnimate = operate() {
this.factor.discover(‘.gallery-container img’).every($.proxy(operate(index, el) {
var picture = el;
setTimeout(operate() {
$(picture).mother or father().fadeIn();
}, this.settings.loadingSpeed * index);
}, this));
};
this._printGallery = operate(photographs) {
var factor = this.factor.discover(‘.gallery-container’);
$.every(photographs, operate(key, photograph) {
var img = $(‘
‘, { ‘class’: ‘thumb img-thumbnail flickr-img-responsive’, src: photograph.thumbnail, ‘alt’: photograph.title });
factor.append($(‘
‘, { ‘class’: ‘ col-md-3 col-sm-4 col-center wpfrank-flickr-div’ })
.append($(‘
‘, { ‘class’: ”, href: photograph.href, ‘data-gallery’: ”, ‘title’: photograph.title }).conceal()
.append(img)));
});
factor.imagesLoaded()
.finished($.proxy(this._flickrAnimate, this))
.all the time($.proxy(this._hideSpinner, this));
};
this._flickrPhotoset = operate(photoset) {
var _this = this;
photographs[photoset.id] = [];
$.every(photoset.photograph, operate(key, photograph) {
// Restrict variety of photographs.
if(key >= _this.settings.photosLimit) {
return false;
}
photographs[photoset.id][key] = {
thumbnail: ‘https://farm’ + photograph.farm + ‘.static.flickr.com/’ + photograph.server + ‘/’ + photograph.id + ‘_’ + photograph.secret + ‘_q.jpg’,
href: ‘https://farm’ + photograph.farm + ‘.static.flickr.com/’ + photograph.server + ‘/’ + photograph.id + ‘_’ + photograph.secret + ‘_b.jpg’,
title: photograph.title
};
});
this._printGallery(photographs[photoset.id]);
};
this._onFlickrResponse = operate(response) {
if(response.stat === “okay”) {
this._flickrPhotoset(response.photoset);
}
else {
this._hideSpinner();
this._printError();
}
};
this._flickrRequest = operate(methodology, knowledge) {
var url = apiUrl + “?format=json&jsoncallback=?&methodology=” + methodology + “&api_key=” + this.settings.apiKey;
$.every(knowledge, operate(key, worth) {
url += “&” + key + “=” + worth;
});
$.ajax({
dataType: “json”,
url: url,
context: this,
success: this._onFlickrResponse
});
};
this._flickrInit = operate () {
this._flickrRequest(‘flickr.photosets.getPhotos’, {
photoset_id: this.settings.photosetId
});
};
// Init
this.init();
}
Plugin.prototype = {
init: operate () {
this._flickrInit();
}
};
// Wrapper
$.fn[pluginName] = operate (choices) {
this.every(operate () {
if (!$.knowledge(this, “plugin_” + pluginName)) {
$.knowledge(this, “plugin_” + pluginName, new Plugin(this, choices));
}
});
// Chain
return this;
};
})(jQuery, window, doc);
jQuery(operate() {
// Set blueimp gallery choices
jQuery.lengthen(blueimp.Gallery.prototype.choices, {
useBootstrapModal: false,
hidePageScrollbars: false
});
});