// source --> http://palmos-development.com/wp-content/plugins/rx_isotope_gallery/js/rx_isotope_gallery.js jQuery(document).ready(function(){ jQuery('.rx_isotope_ui').each(function(indx){ rx_igallery = new RxIsotopeGallery(); rx_igallery.init(jQuery(this)); }); handleBeacons(); }); function handleBeacons(){ jQuery('.genericBeaconIsotope').each(function(indx){ var beacon = jQuery(this); beacon.hover(function(e){ TweenMax.to(jQuery(this).find('.beaconCircle1'), .3, {scale:1.5, opacity: 0, ease:Elastic.EaseOut}); TweenMax.to(jQuery(this).find('.beaconCircle2'), .2, {scale:.95, opacity:.7, ease:Elastic.EaseOut}); }, function(e){ TweenMax.to(jQuery(this).find('.beaconCircle1'), .2, {scale:1, opacity: 1, ease:Elastic.EaseIn}); TweenMax.to(jQuery(this).find('.beaconCircle2'), .1, {scale:1, opacity:1, ease:Elastic.EaseOut}); }); }); } function RxIsotopeGallery(){ var rx_gallery_ui; var main_gallery; this.init = function(ui){ rx_gallery_ui = ui; initIsotopeMenu(); handleLinks(); } function handleLinks(){ main_gallery = new Array(); var isotopeItems = rx_gallery_ui.find('.isotopeContainer').children('.isotopeItem'); for(var i=0;i'+ ''; var preloaderTmpl = '
preloader
'; var containersTmpl = ''+ '

'+ '
'+ '
'+ ''+ ''+ ''+ '
'+ ''; var secure_scr_tmpl = '
'; var leftBtn; var closeBtn; var rightBtn; var lgthBox; var iPreloader; var initialH = 70; var preloaderSize = 28; var currentIndex = index; var secure_UI; show(); function show(){ secure_UI = jQuery(secure_scr_tmpl); secure_screen(true); lgthBox = jQuery(tmpl); lgthBox.css('top', jQuery(window).height()/2+'px'); lgthBox.appendTo('body'); iPreloader = jQuery(preloaderTmpl); iPreloader.css('opacity', 0); TweenMax.to(iPreloader, 0, {css:{scale:0}}); iPreloader.appendTo(lgthBox); jQuery(containersTmpl).appendTo(lgthBox); jQuery('#ilghtb_controls').css('opacity', 0); lightBoxResize(); TweenMax.to(lgthBox, .3, {css:{opacity:1, height: initialH, top: (jQuery(window).height()/2-initialH/2)}, delay: .2, ease:Power3.EaseIn, onComplete: function(){ lightBoxResize(); TweenMax.to(iPreloader, .2, {css:{opacity:1, scale: 1}, ease:Power3.EaseIn, onComplete: function(){ loadImage(imageFirstTime); }}); }}); leftBtn = lgthBox.find('.lightBxLeft'); closeBtn = lgthBox.find('.lightBxClose'); rightBtn = lgthBox.find('.lightBxRight'); buttonsHover(); buttonsClick(); } function buttonsHover(){ leftBtn.hover(function(e){ if(!leftValid){return;} TweenMax.to(jQuery(this), .1, {css:{opacity:.8}, ease:Power3.easeIn}); }, function(e){ if(!leftValid){return;} TweenMax.to(jQuery(this), .1, {css:{opacity:1}, ease:Power3.easeIn}); }); closeBtn.hover(function(e){ TweenMax.to(jQuery(this), .1, {css:{opacity:.8}, ease:Power3.easeIn}); }, function(e){ TweenMax.to(jQuery(this), .1, {css:{opacity:1}, ease:Power3.easeIn}); }); rightBtn.hover(function(e){ if(!rightValid){return;} TweenMax.to(jQuery(this), .1, {css:{opacity:.8}, ease:Power3.easeIn}); }, function(e){ if(!rightValid){return;} TweenMax.to(jQuery(this), .1, {css:{opacity:1}, ease:Power3.easeIn}); }); } function buttonsClick(){ leftBtn.click(function(e){ e.preventDefault(); if(!leftValid){ return; } currentIndex--; initopenNewImage(); }); closeBtn.click(function(e){ e.preventDefault(); closeLightbox(); }); rightBtn.click(function(e){ e.preventDefault(); if(!rightValid){ return; } currentIndex++; initopenNewImage(); }); } function closeLightbox(){ //secure_screen.secure(true); TweenMax.to(currentImage, .4, {css:{opacity: 0}, ease:Power3.easeIn}); TweenMax.to(jQuery('#ilghtb_caption'), .4, {css:{opacity: 0}, delay: .2, ease:Power3.easeIn}); TweenMax.to(jQuery('#ilghtb_controls'), .4, {css:{opacity: 0}, delay: .2, ease:Power3.easeIn}); TweenMax.to(lgthBox, .5, {css:{height: '2px'}, delay: .6, ease:Power3.easeIn}); TweenMax.to(lgthBox, .5, {css:{top: jQuery(window).height()/2+'px'}, delay: .6, ease:Power3.easeIn, onComplete: lightboxClosed}); } function lightboxClosed(){ //secure_screen.secure(false); TweenMax.to(lgthBox, .2, {css:{height: '0px'}, ease:Power3.easeIn, onComplete: gcc_lgtbox}); } function gcc_lgtbox(){ isActive = false; try{ lgthBox.empty(); lgthBox.remove(); lgthBox = null; gallery = null; secure_UI.remove(); secure_UI = null; }catch(e){} } function secure_screen(val){ if(val){ try{ secure_UI.remove(); }catch(e){} secure_UI.appendTo('body'); }else{ secure_UI.remove(); } } function initopenNewImage(){ //secure_screen.secure(true); validateButtons(); TweenMax.to(iPreloader, 0, {css:{opacity: 0, scale: 0}}); TweenMax.to(currentImage, .4, {css:{opacity: 0}, ease:Power3.easeIn}); TweenMax.to(iPreloader, .2, {css:{opacity: 1, scale: 1}, delay: .4, ease:Power3.easeIn, onComplete: loadNewImage}); //preloaderGIF } function loadNewImage(){ try{ currentImage.remove(); }catch(e){} loadImage(newImageLoaded); } function newImageLoaded(img){ if(gallery[currentIndex].img==null){ gallery[currentIndex].img = img; } TweenMax.to(iPreloader, .3, {css:{scale: 0, opacity: 0}, ease:Power3.easeIn}); show_lgtb_image(); } var leftValid = false; var rightValid = false; function validateButtons(){ leftBtn.css('visibility', 'visible'); rightBtn.css('visibility', 'visible'); leftBtn.removeClass('iLightboxDisabledButton'); rightBtn.removeClass('iLightboxDisabledButton'); leftBtn.css('background-color', '#'+_buttons_colors); rightBtn.css('background-color', '#'+_buttons_colors); leftValid = true; rightValid = true; if(currentIndex==0){ //leftBtn.css('visibility', 'hidden'); //leftBtn.removeClass('portfolioButtonColor'); leftBtn.addClass('iLightboxDisabledButton'); leftBtn.css('background-color', '#'+'7b7b7b'); leftValid = false; } if(currentIndex==gallery.length-1){ //rightBtn.css('visibility', 'hidden'); rightBtn.css('background-color', '#'+'7b7b7b'); rightBtn.addClass('iLightboxDisabledButton'); rightValid = false; } if(currentIndex!=gallery.length-1 && currentIndex!=0){ leftBtn.css('visibility', 'visible'); rightBtn.css('visibility', 'visible'); leftBtn.removeClass('iLightboxDisabledButton'); rightBtn.removeClass('iLightboxDisabledButton'); leftValid = true; rightValid = true; } } function imageFirstTime(img){ if(gallery[currentIndex].img==null){ gallery[currentIndex].img = img; } expandLightbox(); } function expandLightbox(){ TweenMax.to(iPreloader, .2, {css:{opacity:0, scale: 0}, ease:Power3.EaseIn}); TweenMax.to(lgthBox, .4, {css:{height:jQuery(window).height(), top: 0}, delay: .3, ease:Power3.EaseIn, onComplete: function(){ lgthBox.css('height', '100%'); show_lgtb_image(); }}); } var currentImage; var isActive; function show_lgtb_image(){ if(gallery[currentIndex].img==undefined || gallery[currentIndex].img == "" || gallery[currentIndex].img ==null){ //broken image return; } isActive = true; currentImage = gallery[currentIndex].img; currentImage.css('position', 'absolute'); currentImage.css('max-width', '80%'); currentImage.css('max-height', '80%'); currentImage.css('opacity', 0); currentImage.appendTo(jQuery('#ilghtb_img')); currentImage.bind('contextmenu', function(e) { return false; }); jQuery('#ilghtb_caption').css('opacity', 0); jQuery('#ilghtb_caption').html(gallery[currentIndex].itemDescription); lightBoxResize(); TweenMax.to(currentImage, .4, {css:{opacity: 1}, ease:Power3.easeIn}); TweenMax.to(jQuery('#ilghtb_caption'), .4, {css:{opacity: 1}, delay: .2, ease:Power3.easeIn}); TweenMax.to(jQuery('#ilghtb_controls'), .4, {css:{opacity: 1}, delay: .2, ease:Power3.easeIn}); validateButtons(); secure_screen(false); } jQuery(window).resize(function(){ lightBoxResize(); }); function loadImage(callBack){ var url = gallery[currentIndex].imgURL; var axjReq = new JQueryAJAX(); axjReq.loadImage(url, function(img){ callBack(img); }); } function lightBoxResize(){ try{ iPreloader.css('top', lgthBox.height()/2-preloaderSize/2+'px'); iPreloader.css('left', lgthBox.width()/2-preloaderSize/2+'px'); if(isActive){ if(currentImage!=null&¤tImage!=undefined){ currentImage.css('left', lgthBox.width()/2-currentImage.width()/2+'px'); currentImage.css('top', lgthBox.height()/2-currentImage.height()/2+'px'); } } jQuery('#ilghtb_controls').css('left', lgthBox.width()/2-jQuery('#ilghtb_controls').width()/2+'px'); }catch(e){} } function gcc_ilightbox(){ try{ }catch(e){} } } /* end iGallery lightbox ================================================== */ function JQueryAJAX(){ /** * load data trough get */ this.getData = function(path, successCallBack, failCallBack){ jQuery.get(path, function(response){ //first responce }).error(function() { failCallBack(); }) .success(function(response) { successCallBack(response); }) } this.loadImage = function(path, successCallBack, failCallBack){ var _url = path; var _im =jQuery(""); _im.bind("load",function(){ successCallBack(jQuery(this)); }); _im.attr('src',_url); } }; // source --> http://palmos-development.com/wp-content/plugins/rx_isotope_gallery/js/external/jquery.isotope.min.js /** * Isotope v1.5.25 * An exquisite jQuery plugin for magical layouts * http://isotope.metafizzy.co * * Commercial use requires one-time license fee * http://metafizzy.co/#licenses * * Copyright 2012 David DeSandro / Metafizzy */ (function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);