Template:Team:Harvard BioDesign/JS
From 2014.igem.org
(Difference between revisions)
|
|
Line 1: |
Line 1: |
| <html> | | <html> |
| <head> | | <head> |
- | <style type="text/js"> | + | <style type="text/javascript"> |
| | | |
| /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license | | /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license |
Revision as of 20:19, 17 October 2014
").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;f
g?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);
/*parsed HTML*/
$(function(){
$(".maxheight").each(function(){
$(this).contents().wrapAll("");
})
$(".maxheight2").each(function(){
$(this).contents().wrapAll("");
})
$(".maxheight3").each(function(){
$(this).contents().wrapAll("");
})
})
/*add event*/
$(window).bind("resize", height_handler).bind("load", height_handler)
function height_handler(){
if($(window).width()>465){
$(".maxheight").equalHeights();
}else{
$(".maxheight").equalHeights();
}
if($(window).width()>740){
$(".maxheight2").equalHeights();
}else{
$(".maxheight2").equalHeights();
}
if($(window).width()>740){
$(".maxheight3").equalHeights();
}else{
$(".maxheight3").equalHeights();
}
}
/*glob function*/
(function($){
$.fn.equalHeights=function(minHeight,maxHeight){
tallest=(minHeight)?minHeight:0;
this.each(function(){
if($(">.box_inner", this).outerHeight()>tallest){
tallest=$(">.box_inner", this).outerHeight()
}
});
if((maxHeight)&&tallest>maxHeight) tallest=maxHeight;
return this.each(function(){$(this).height(tallest)})
}
})(jQuery);
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
//alert(jQuery.easing.default);
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
/*
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d'
).wrapInner(
''
);
var fakeHover = $('.camera_fakehover',wrap);
fakeHover.append(
''
);
if(opts.overlayer == true){
fakeHover.append(
''
)
}
fakeHover.append(
''
);
var loader;
if(opts.loader=='pie' && $.browser.msie && $.browser.version < 9){
loader = 'bar';
} else {
loader = opts.loader;
}
if(loader == 'pie'){
fakeHover.append(
''
)
} else if (loader == 'bar') {
fakeHover.append(
''
)
} else {
fakeHover.append(
''
)
}
if(opts.playPause==true){
fakeHover.append(
''
)
}
if(opts.navigation==true){
fakeHover.append(
'
'
).append(
'
'
);
}
if(opts.thumbnails==true){
wrap.append(
''
);
}
if(opts.thumbnails==true && opts.pagination!=true){
$('.camera_thumbs_cont',wrap).wrap(
''
).wrap(
''
).wrap(
''
).wrap(
''
);
}
if(opts.pagination==true){
wrap.append(
''
);
}
wrap.append(
''
);
$('.camera_caption',wrap).each(function(){
$(this).wrapInner('');
});
var pieID = 'pie_'+wrap.index(),
elem = $('.camera_src',wrap),
target = $('.camera_target',wrap),
content = $('.camera_target_content',wrap),
pieContainer = $('.camera_pie',wrap),
barContainer = $('.camera_bar',wrap),
prevNav = $('.camera_prev',wrap),
nextNav = $('.camera_next',wrap),
commands = $('.camera_commands',wrap),
pagination = $('.camera_pag',wrap),
thumbs = $('.camera_thumbs_cont',wrap);
var w,
h;
var allImg = new Array();
$('> div', elem).each( function() {
allImg.push($(this).attr('data-src'));
});
var allLinks = new Array();
$('> div', elem).each( function() {
if($(this).attr('data-link')){
allLinks.push($(this).attr('data-link'));
} else {
allLinks.push('');
}
});
var allTargets = new Array();
$('> div', elem).each( function() {
if($(this).attr('data-target')){
allTargets.push($(this).attr('data-target'));
} else {
allTargets.push('');
}
});
var allPor = new Array();
$('> div', elem).each( function() {
if($(this).attr('data-portrait')){
allPor.push($(this).attr('data-portrait'));
} else {
allPor.push('');
}
});
var allAlign= new Array();
$('> div', elem).each( function() {
if($(this).attr('data-alignment')){
allAlign.push($(this).attr('data-alignment'));
} else {
allAlign.push('');
}
});
var allThumbs = new Array();
$('> div', elem).each( function() {
if($(this).attr('data-thumb')){
allThumbs.push($(this).attr('data-thumb'));
} else {
allThumbs.push('');
}
});
var amountSlide = allImg.length;
$(content).append('');
var loopMove;
for (loopMove=0;loopMove');
if(allLinks[loopMove]!=''){
//only for Wordpress plugin
var dataBox = $('> div ',elem).eq(loopMove).attr('data-box');
if(typeof dataBox !== 'undefined' && dataBox !== false && dataBox != '') {
dataBox = 'data-box="'+$('> div ',elem).eq(loopMove).attr('data-box')+'"';
} else {
dataBox = '';
}
//
$('.camera_target_content .cameraContent:eq('+loopMove+')',wrap).append('');
}
}
$('.camera_caption',wrap).each(function(){
var ind = $(this).parent().index(),
cont = wrap.find('.cameraContent').eq(ind);
$(this).appendTo(cont);
});
target.append('');
var cameraCont = $('.cameraCont',wrap);
var loop;
for (loop=0;loop');
var div = $('> div:eq('+loop+')',elem);
target.find('.cameraSlide_'+loop).clone(div);
}
function thumbnailVisible() {
var wTh = $(thumbs).width();
$('li', thumbs).removeClass('camera_visThumb');
$('li', thumbs).each(function(){
var pos = $(this).position(),
ulW = $('ul', thumbs).outerWidth(),
offUl = $('ul', thumbs).offset().left,
offDiv = $('> div',thumbs).offset().left,
ulLeft = offDiv-offUl;
if(ulLeft>0){
$('.camera_prevThumbs',camera_thumbs_wrap).removeClass('hideNav');
} else {
$('.camera_prevThumbs',camera_thumbs_wrap).addClass('hideNav');
}
if((ulW-ulLeft)>wTh){
$('.camera_nextThumbs',camera_thumbs_wrap).removeClass('hideNav');
} else {
$('.camera_nextThumbs',camera_thumbs_wrap).addClass('hideNav');
}
var left = pos.left,
right = pos.left+($(this).width());
if(right-ulLeft<=wTh && left-ulLeft>=0){
$(this).addClass('camera_visThumb');
}
});
}
$(window).bind('load resize pageshow',function(){
thumbnailPos();
thumbnailVisible();
});
cameraCont.append('');
var started;
wrap.show();
var w = target.width();
var h = target.height();
var setPause;
$(window).bind('resize pageshow',function(){
if(started == true) {
resizeImage();
}
$('ul', thumbs).animate({'margin-top':0},0,thumbnailPos);
if(!elem.hasClass('paused')){
elem.addClass('paused');
if($('.camera_stop',camera_thumbs_wrap).length){
$('.camera_stop',camera_thumbs_wrap).hide()
$('.camera_play',camera_thumbs_wrap).show();
if(loader!='none'){
$('#'+pieID).hide();
}
} else {
if(loader!='none'){
$('#'+pieID).hide();
}
}
clearTimeout(setPause);
setPause = setTimeout(function(){
elem.removeClass('paused');
if($('.camera_play',camera_thumbs_wrap).length){
$('.camera_play',camera_thumbs_wrap).hide();
$('.camera_stop',camera_thumbs_wrap).show();
if(loader!='none'){
$('#'+pieID).fadeIn();
}
} else {
if(loader!='none'){
$('#'+pieID).fadeIn();
}
}
},1500);
}
});
function resizeImage(){
var res;
function resizeImageWork(){
w = wrap.width();
if(opts.height.indexOf('%')!=-1) {
var startH = Math.round(w / (100/parseFloat(opts.height)));
if(opts.minHeight != '' && startH < parseFloat(opts.minHeight)){
h = parseFloat(opts.minHeight);
} else {
h = startH;
}
wrap.css({height:h});
} else if (opts.height=='auto') {
h = wrap.height();
} else {
h = parseFloat(opts.height);
wrap.css({height:h});
}
$('.camerarelative',target).css({'width':w,'height':h});
$('.imgLoaded',target).each(function(){
var t = $(this),
wT = t.attr('width'),
hT = t.attr('height'),
imgLoadIn = t.index(),
mTop,
mLeft,
alignment = t.attr('data-alignment'),
portrait = t.attr('data-portrait');
if(typeof alignment === 'undefined' || alignment === false || alignment === ''){
alignment = opts.alignment;
}
if(typeof portrait === 'undefined' || portrait === false || portrait === ''){
portrait = opts.portrait;
}
if(portrait==false||portrait=='false'){
if((wT/hT)<(w/h)) {
var r = w / wT;
var d = (Math.abs(h - (hT*r)))*0.5;
switch(alignment){
case 'topLeft':
mTop = 0;
break;
case 'topCenter':
mTop = 0;
break;
case 'topRight':
mTop = 0;
break;
case 'centerLeft':
mTop = '-'+d+'px';
break;
case 'center':
mTop = '-'+d+'px';
break;
case 'centerRight':
mTop = '-'+d+'px';
break;
case 'bottomLeft':
mTop = '-'+d*2+'px';
break;
case 'bottomCenter':
mTop = '-'+d*2+'px';
break;
case 'bottomRight':
mTop = '-'+d*2+'px';
break;
}
t.css({
'height' : hT*r,
'margin-left' : 0,
'margin-top' : mTop,
'position' : 'absolute',
'visibility' : 'visible',
'width' : w
});
}
else {
var r = h / hT;
var d = (Math.abs(w - (wT*r)))*0.5;
switch(alignment){
case 'topLeft':
mLeft = 0;
break;
case 'topCenter':
mLeft = '-'+d+'px';
break;
case 'topRight':
mLeft = '-'+d*2+'px';
break;
case 'centerLeft':
mLeft = 0;
break;
case 'center':
mLeft = '-'+d+'px';
break;
case 'centerRight':
mLeft = '-'+d*2+'px';
break;
case 'bottomLeft':
mLeft = 0;
break;
case 'bottomCenter':
mLeft = '-'+d+'px';
break;
case 'bottomRight':
mLeft = '-'+d*2+'px';
break;
}
t.css({
'height' : h,
'margin-left' : mLeft,
'margin-top' : 0,
'position' : 'absolute',
'visibility' : 'visible',
'width' : wT*r
});
}
} else {
if((wT/hT)<(w/h)) {
var r = h / hT;
var d = (Math.abs(w - (wT*r)))*0.5;
switch(alignment){
case 'topLeft':
mLeft = 0;
break;
case 'topCenter':
mLeft = d+'px';
break;
case 'topRight':
mLeft = d*2+'px';
break;
case 'centerLeft':
mLeft = 0;
break;
case 'center':
mLeft = d+'px';
break;
case 'centerRight':
mLeft = d*2+'px';
break;
case 'bottomLeft':
mLeft = 0;
break;
case 'bottomCenter':
mLeft = d+'px';
break;
case 'bottomRight':
mLeft = d*2+'px';
break;
}
t.css({
'height' : h,
'margin-left' : mLeft,
'margin-top' : 0,
'position' : 'absolute',
'visibility' : 'visible',
'width' : wT*r
});
}
else {
var r = w / wT;
var d = (Math.abs(h - (hT*r)))*0.5;
switch(alignment){
case 'topLeft':
mTop = 0;
break;
case 'topCenter':
mTop = 0;
break;
case 'topRight':
mTop = 0;
break;
case 'centerLeft':
mTop = d+'px';
break;
case 'center':
mTop = d+'px';
break;
case 'centerRight':
mTop = d+'px';
break;
case 'bottomLeft':
mTop = d*2+'px';
break;
case 'bottomCenter':
mTop = d*2+'px';
break;
case 'bottomRight':
mTop = d*2+'px';
break;
}
t.css({
'height' : hT*r,
'margin-left' : 0,
'margin-top' : mTop,
'position' : 'absolute',
'visibility' : 'visible',
'width' : w
});
}
}
});
}
if (started == true) {
clearTimeout(res);
res = setTimeout(resizeImageWork,200);
} else {
resizeImageWork();
}
started = true;
}
var u,
setT;
var clickEv,
autoAdv,
navHover,
commands,
pagination;
var videoHover,
videoPresent;
if(isMobile() && opts.mobileAutoAdvance!=''){
autoAdv = opts.mobileAutoAdvance;
} else {
autoAdv = opts.autoAdvance;
}
if(autoAdv==false){
elem.addClass('paused');
}
if(isMobile() && opts.mobileNavHover!=''){
navHover = opts.mobileNavHover;
} else {
navHover = opts.navigationHover;
}
if(elem.length!=0){
var selector = $('.cameraSlide',target);
selector.wrapInner('');
var navSlide;
var barDirection = opts.barDirection;
var camera_thumbs_wrap = wrap;
$('iframe',fakeHover).each(function(){
var t = $(this);
var src = t.attr('src');
t.attr('data-src',src);
var divInd = t.parent().index('.camera_src > div');
$('.camera_target_content .cameraContent:eq('+divInd+')',wrap).append(t);
});
function imgFake() {
$('iframe',fakeHover).each(function(){
$('.camera_caption',fakeHover).show();
var t = $(this);
var cloneSrc = t.attr('data-src');
t.attr('src',cloneSrc);
var imgFakeUrl = opts.imagePath+'blank.gif';
var imgFake = new Image();
imgFake.src = imgFakeUrl;
if(opts.height.indexOf('%')!=-1) {
var startH = Math.round(w / (100/parseFloat(opts.height)));
if(opts.minHeight != '' && startH < parseFloat(opts.minHeight)){
h = parseFloat(opts.minHeight);
} else {
h = startH;
}
} else if (opts.height=='auto') {
h = wrap.height();
} else {
h = parseFloat(opts.height);
}
t.after($(imgFake).attr({'class':'imgFake','width':w,'height':h}));
var clone = t.clone();
t.remove();
$(imgFake).bind('click',function(){
if($(this).css('position')=='absolute') {
$(this).remove();
if(cloneSrc.indexOf('vimeo') != -1 || cloneSrc.indexOf('youtube') != -1) {
if(cloneSrc.indexOf('?') != -1){
autoplay = '&autoplay=1';
} else {
autoplay = '?autoplay=1';
}
} else if(cloneSrc.indexOf('dailymotion') != -1) {
if(cloneSrc.indexOf('?') != -1){
autoplay = '&autoPlay=1';
} else {
autoplay = '?autoPlay=1';
}
}
clone.attr('src',cloneSrc+autoplay);
videoPresent = true;
} else {
$(this).css({position:'absolute',top:0,left:0,zIndex:10}).after(clone);
clone.css({position:'absolute',top:0,left:0,zIndex:9});
}
});
});
}
imgFake();
if(opts.hover==true){
if(!isMobile()){
fakeHover.hover(function(){
elem.addClass('hovered');
},function(){
elem.removeClass('hovered');
});
}
}
if(navHover==true){
$(prevNav,wrap).animate({opacity:0},0);
$(nextNav,wrap).animate({opacity:0},0);
$(commands,wrap).animate({opacity:0},0);
if(isMobile()){
fakeHover.live('vmouseover',function(){
$(prevNav,wrap).animate({opacity:1},200);
$(nextNav,wrap).animate({opacity:1},200);
$(commands,wrap).animate({opacity:1},200);
});
fakeHover.live('vmouseout',function(){
$(prevNav,wrap).delay(500).animate({opacity:0},200);
$(nextNav,wrap).delay(500).animate({opacity:0},200);
$(commands,wrap).delay(500).animate({opacity:0},200);
});
} else {
fakeHover.hover(function(){
$(prevNav,wrap).animate({opacity:1},200);
$(nextNav,wrap).animate({opacity:1},200);
$(commands,wrap).animate({opacity:1},200);
},function(){
$(prevNav,wrap).animate({opacity:0},200);
$(nextNav,wrap).animate({opacity:0},200);
$(commands,wrap).animate({opacity:0},200);
});
}
}
$('.camera_stop',camera_thumbs_wrap).live('click',function(){
autoAdv = false;
elem.addClass('paused');
if($('.camera_stop',camera_thumbs_wrap).length){
$('.camera_stop',camera_thumbs_wrap).hide()
$('.camera_play',camera_thumbs_wrap).show();
if(loader!='none'){
$('#'+pieID).hide();
}
} else {
if(loader!='none'){
$('#'+pieID).hide();
}
}
});
$('.camera_play',camera_thumbs_wrap).live('click',function(){
autoAdv = true;
elem.removeClass('paused');
if($('.camera_play',camera_thumbs_wrap).length){
$('.camera_play',camera_thumbs_wrap).hide();
$('.camera_stop',camera_thumbs_wrap).show();
if(loader!='none'){
$('#'+pieID).show();
}
} else {
if(loader!='none'){
$('#'+pieID).show();
}
}
});
if(opts.pauseOnClick==true){
$('.camera_target_content',fakeHover).mouseup(function(){
autoAdv = false;
elem.addClass('paused');
$('.camera_stop',camera_thumbs_wrap).hide()
$('.camera_play',camera_thumbs_wrap).show();
$('#'+pieID).hide();
});
}
$('.cameraContent, .imgFake',fakeHover).hover(function(){
videoHover = true;
},function(){
videoHover = false;
});
$('.cameraContent, .imgFake',fakeHover).bind('click',function(){
if(videoPresent == true && videoHover == true) {
autoAdv = false;
$('.camera_caption',fakeHover).hide();
elem.addClass('paused');
$('.camera_stop',camera_thumbs_wrap).hide()
$('.camera_play',camera_thumbs_wrap).show();
$('#'+pieID).hide();
}
});
}
function shuffle(arr) {
for(
var j, x, i = arr.length; i;
j = parseInt(Math.random() * i),
x = arr[--i], arr[i] = arr[j], arr[j] = x
);
return arr;
}
function isInteger(s) {
return Math.ceil(s) == Math.floor(s);
}
if (loader != 'pie') {
barContainer.append('');
$('.camera_bar_cont',barContainer)
.animate({opacity:opts.loaderOpacity},0)
.css({'position':'absolute', 'left':0, 'right':0, 'top':0, 'bottom':0, 'background-color':opts.loaderBgColor})
.append('');
$('#'+pieID).animate({opacity:0},0);
var canvas = $('#'+pieID);
canvas.css({'position':'absolute', 'background-color':opts.loaderColor});
switch(opts.barPosition){
case 'left':
barContainer.css({right:'auto',width:opts.loaderStroke});
break;
case 'right':
barContainer.css({left:'auto',width:opts.loaderStroke});
break;
case 'top':
barContainer.css({bottom:'auto',height:opts.loaderStroke});
break;
case 'bottom':
barContainer.css({top:'auto',height:opts.loaderStroke});
break;
}
switch(barDirection){
case 'leftToRight':
canvas.css({'left':0, 'right':0, 'top':opts.loaderPadding, 'bottom':opts.loaderPadding});
break;
case 'rightToLeft':
canvas.css({'left':0, 'right':0, 'top':opts.loaderPadding, 'bottom':opts.loaderPadding});
break;
case 'topToBottom':
canvas.css({'left':opts.loaderPadding, 'right':opts.loaderPadding, 'top':0, 'bottom':0});
break;
case 'bottomToTop':
canvas.css({'left':opts.loaderPadding, 'right':opts.loaderPadding, 'top':0, 'bottom':0});
break;
}
} else {
pieContainer.append('');
var G_vmlCanvasManager;
var canvas = document.getElementById(pieID);
canvas.setAttribute("width", opts.pieDiameter);
canvas.setAttribute("height", opts.pieDiameter);
var piePosition;
switch(opts.piePosition){
case 'leftTop' :
piePosition = 'left:0; top:0;';
break;
case 'rightTop' :
piePosition = 'right:0; top:0;';
break;
case 'leftBottom' :
piePosition = 'left:0; bottom:0;';
break;
case 'rightBottom' :
piePosition = 'right:0; bottom:0;';
break;
}
canvas.setAttribute("style", "position:absolute; z-index:1002; "+piePosition);
var rad;
var radNew;
if (canvas && canvas.getContext) {
var ctx = canvas.getContext("2d");
ctx.rotate(Math.PI*(3/2));
ctx.translate(-opts.pieDiameter,0);
}
}
if(loader=='none' || autoAdv==false) {
$('#'+pieID).hide();
$('.camera_canvas_wrap',camera_thumbs_wrap).hide();
}
if($(pagination).length) {
$(pagination).append('');
var li;
for (li = 0; li < amountSlide; li++){
$('.camera_pag_ul',wrap).append(''+li+'');
}
$('.camera_pag_ul li',wrap).hover(function(){
$(this).addClass('camera_hover');
if($('.camera_thumb',this).length){
var wTh = $('.camera_thumb',this).outerWidth(),
hTh = $('.camera_thumb',this).outerHeight(),
wTt = $(this).outerWidth();
$('.camera_thumb',this).show().css({'top':'-'+hTh+'px','left':'-'+(wTh-wTt)/2+'px'}).animate({'opacity':1,'margin-top':'-3px'},200);
$('.thumb_arrow',this).show().animate({'opacity':1,'margin-top':'-3px'},200);
}
},function(){
$(this).removeClass('camera_hover');
$('.camera_thumb',this).animate({'margin-top':'-20px','opacity':0},200,function(){
$(this).css({marginTop:'5px'}).hide();
});
$('.thumb_arrow',this).animate({'margin-top':'-20px','opacity':0},200,function(){
$(this).css({marginTop:'5px'}).hide();
});
});
}
if($(thumbs).length) {
var thumbUrl;
if(!$(pagination).length) {
$(thumbs).append('');
$(thumbs).before('').before('');
$('> div',thumbs).append('');
$.each(allThumbs, function(i, val) {
if($('> div', elem).eq(i).attr('data-thumb')!='') {
var thumbUrl = $('> div', elem).eq(i).attr('data-thumb'),
newImg = new Image();
newImg.src = thumbUrl;
$('ul',thumbs).append('');
$('li.pix_thumb_'+i,thumbs).append($(newImg).attr('class','camera_thumb'));
}
});
} else {
$.each(allThumbs, function(i, val) {
if($('> div', elem).eq(i).attr('data-thumb')!='') {
var thumbUrl = $('> div', elem).eq(i).attr('data-thumb'),
newImg = new Image();
newImg.src = thumbUrl;
$('li.pag_nav_'+i,pagination).append($(newImg).attr('class','camera_thumb').css({'position':'absolute'}).animate({opacity:0},0));
$('li.pag_nav_'+i+' > img',pagination).after('');
$('li.pag_nav_'+i+' > .thumb_arrow',pagination).animate({opacity:0},0);
}
});
wrap.css({marginBottom:$(pagination).outerHeight()});
}
} else if(!$(thumbs).length && $(pagination).length) {
wrap.css({marginBottom:$(pagination).outerHeight()});
}
var firstPos = true;
function thumbnailPos() {
if($(thumbs).length && !$(pagination).length) {
var wTh = $(thumbs).outerWidth(),
owTh = $('ul > li',thumbs).outerWidth(),
pos = $('li.cameracurrent', thumbs).length ? $('li.cameracurrent', thumbs).position() : '',
ulW = ($('ul > li', thumbs).length * $('ul > li', thumbs).outerWidth()),
offUl = $('ul', thumbs).offset().left,
offDiv = $('> div', thumbs).offset().left,
ulLeft;
if(offUl<0){
ulLeft = '-'+ (offDiv-offUl);
} else {
ulLeft = offDiv-offUl;
}
if(firstPos == true) {
$('ul', thumbs).width($('ul > li', thumbs).length * $('ul > li', thumbs).outerWidth());
if($(thumbs).length && !$(pagination).lenght) {
wrap.css({marginBottom:$(thumbs).outerHeight()});
}
thumbnailVisible();
/*I repeat this two lines because of a problem with iPhones*/
$('ul', thumbs).width($('ul > li', thumbs).length * $('ul > li', thumbs).outerWidth());
if($(thumbs).length && !$(pagination).lenght) {
wrap.css({marginBottom:$(thumbs).outerHeight()});
}
/*...*/
}
firstPos = false;
var left = $('li.cameracurrent', thumbs).length ? pos.left : '',
right = $('li.cameracurrent', thumbs).length ? pos.left+($('li.cameracurrent', thumbs).outerWidth()) : '';
if(left<$('li.cameracurrent', thumbs).outerWidth()) {
left = 0;
}
if(right-ulLeft>wTh){
if((left+wTh) ').append('
');
if(autoAdv==true){
$('.camera_play',camera_thumbs_wrap).hide();
$('.camera_stop',camera_thumbs_wrap).show();
} else {
$('.camera_stop',camera_thumbs_wrap).hide();
$('.camera_play',camera_thumbs_wrap).show();
}
}
function canvasLoader() {
rad = 0;
var barWidth = $('.camera_bar_cont',camera_thumbs_wrap).width(),
barHeight = $('.camera_bar_cont',camera_thumbs_wrap).height();
if (loader != 'pie') {
switch(barDirection){
case 'leftToRight':
$('#'+pieID).css({'right':barWidth});
break;
case 'rightToLeft':
$('#'+pieID).css({'left':barWidth});
break;
case 'topToBottom':
$('#'+pieID).css({'bottom':barHeight});
break;
case 'bottomToTop':
$('#'+pieID).css({'top':barHeight});
break;
}
} else {
ctx.clearRect(0,0,opts.pieDiameter,opts.pieDiameter);
}
}
canvasLoader();
$('.moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom',fakeHover).each(function(){
$(this).css('visibility','hidden');
});
opts.onStartLoading.call(this);
nextSlide();
/*************************** FUNCTION nextSlide() ***************************/
function nextSlide(navSlide){
elem.addClass('camerasliding');
videoPresent = false;
var vis = parseFloat($('div.cameraSlide.cameracurrent',target).index());
if(navSlide>0){
var slideI = navSlide-1;
} else if (vis == amountSlide-1) {
var slideI = 0;
} else {
var slideI = vis+1;
}
var slide = $('.cameraSlide:eq('+slideI+')',target);
var slideNext = $('.cameraSlide:eq('+(slideI+1)+')',target).addClass('cameranext');
if( vis != slideI+1 ) {
slideNext.hide();
}
$('.cameraContent',fakeHover).fadeOut(600);
$('.camera_caption',fakeHover).show();
$('.camerarelative',slide).append($('> div ',elem).eq(slideI).find('> div.camera_effected'));
$('.camera_target_content .cameraContent:eq('+slideI+')',wrap).append($('> div ',elem).eq(slideI).find('> div'));
if(!$('.imgLoaded',slide).length){
var imgUrl = allImg[slideI];
var imgLoaded = new Image();
imgLoaded.src = imgUrl +"?"+ new Date().getTime();
slide.css('visibility','hidden');
slide.prepend($(imgLoaded).attr('class','imgLoaded').css('visibility','hidden'));
var wT, hT;
if (!$(imgLoaded).get(0).complete || wT == '0' || hT == '0' || typeof wT === 'undefined' || wT === false || typeof hT === 'undefined' || hT === false) {
$('.camera_loader',wrap).delay(500).fadeIn(400);
imgLoaded.onload = function() {
wT = imgLoaded.naturalWidth;
hT = imgLoaded.naturalHeight;
$(imgLoaded).attr('data-alignment',allAlign[slideI]).attr('data-portrait',allPor[slideI]);
$(imgLoaded).attr('width',wT);
$(imgLoaded).attr('height',hT);
target.find('.cameraSlide_'+slideI).hide().css('visibility','visible');
resizeImage();
nextSlide(slideI+1);
};
}
} else {
if( allImg.length > (slideI+1) && !$('.imgLoaded',slideNext).length ){
var imgUrl2 = allImg[(slideI+1)];
var imgLoaded2 = new Image();
imgLoaded2.src = imgUrl2 +"?"+ new Date().getTime();
slideNext.prepend($(imgLoaded2).attr('class','imgLoaded').css('visibility','hidden'));
imgLoaded2.onload = function() {
wT = imgLoaded2.naturalWidth;
hT = imgLoaded2.naturalHeight;
$(imgLoaded2).attr('data-alignment',allAlign[slideI+1]).attr('data-portrait',allPor[slideI+1]);
$(imgLoaded2).attr('width',wT);
$(imgLoaded2).attr('height',hT);
resizeImage();
};
}
opts.onLoaded.call(this);
if($('.camera_loader',wrap).is(':visible')){
$('.camera_loader',wrap).fadeOut(400);
} else {
$('.camera_loader',wrap).css({'visibility':'hidden'});
$('.camera_loader',wrap).fadeOut(400,function(){
$('.camera_loader',wrap).css({'visibility':'visible'});
});
}
var rows = opts.rows,
cols = opts.cols,
couples = 1,
difference = 0,
dataSlideOn,
time,
transPeriod,
fx,
easing,
randomFx = new Array('simpleFade','curtainTopLeft','curtainTopRight','curtainBottomLeft','curtainBottomRight','curtainSliceLeft','curtainSliceRight','blindCurtainTopLeft','blindCurtainTopRight','blindCurtainBottomLeft','blindCurtainBottomRight','blindCurtainSliceBottom','blindCurtainSliceTop','stampede','mosaic','mosaicReverse','mosaicRandom','mosaicSpiral','mosaicSpiralReverse','topLeftBottomRight','bottomRightTopLeft','bottomLeftTopRight','topRightBottomLeft','scrollLeft','scrollRight','scrollTop','scrollBottom','scrollHorz');
marginLeft = 0,
marginTop = 0,
opacityOnGrid = 0;
if(opts.opacityOnGrid==true){
opacityOnGrid = 0;
} else {
opacityOnGrid = 1;
}
var dataFx = $(' > div',elem).eq(slideI).attr('data-fx');
if(isMobile()&&opts.mobileFx!=''&&opts.mobileFx!='default'){
fx = opts.mobileFx;
} else {
if(typeof dataFx !== 'undefined' && dataFx!== false && dataFx!== 'default'){
fx = dataFx;
} else {
fx = opts.fx;
}
}
if(fx=='random') {
fx = shuffle(randomFx);
fx = fx[0];
} else {
fx = fx;
if(fx.indexOf(',')>0){
fx = fx.replace(/ /g,'');
fx = fx.split(',');
fx = shuffle(fx);
fx = fx[0];
}
}
dataEasing = $(' > div',elem).eq(slideI).attr('data-easing');
mobileEasing = $(' > div',elem).eq(slideI).attr('data-mobileEasing');
if(isMobile()&&opts.mobileEasing!=''&&opts.mobileEasing!='default'){
if(typeof mobileEasing !== 'undefined' && mobileEasing!== false && mobileEasing!== 'default') {
easing = mobileEasing;
} else {
easing = opts.mobileEasing;
}
} else {
if(typeof dataEasing !== 'undefined' && dataEasing!== false && dataEasing!== 'default') {
easing = dataEasing;
} else {
easing = opts.easing;
}
}
dataSlideOn = $(' > div',elem).eq(slideI).attr('data-slideOn');
if(typeof dataSlideOn !== 'undefined' && dataSlideOn!== false){
slideOn = dataSlideOn;
} else {
if(opts.slideOn=='random'){
var slideOn = new Array('next','prev');
slideOn = shuffle(slideOn);
slideOn = slideOn[0];
} else {
slideOn = opts.slideOn;
}
}
var dataTime = $(' > div',elem).eq(slideI).attr('data-time');
if(typeof dataTime !== 'undefined' && dataTime!== false && dataTime!== ''){
time = parseFloat(dataTime);
} else {
time = opts.time;
}
var dataTransPeriod = $(' > div',elem).eq(slideI).attr('data-transPeriod');
if(typeof dataTransPeriod !== 'undefined' && dataTransPeriod!== false && dataTransPeriod!== ''){
transPeriod = parseFloat(dataTransPeriod);
} else {
transPeriod = opts.transPeriod;
}
if(!$(elem).hasClass('camerastarted')){
fx = 'simpleFade';
slideOn = 'next';
easing = '';
transPeriod = 400;
$(elem).addClass('camerastarted')
}
switch(fx){
case 'simpleFade':
cols = 1;
rows = 1;
break;
case 'curtainTopLeft':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'curtainTopRight':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'curtainBottomLeft':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'curtainBottomRight':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'curtainSliceLeft':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'curtainSliceRight':
if(opts.slicedCols == 0) {
cols = opts.cols;
} else {
cols = opts.slicedCols;
}
rows = 1;
break;
case 'blindCurtainTopLeft':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'blindCurtainTopRight':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'blindCurtainBottomLeft':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'blindCurtainBottomRight':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'blindCurtainSliceTop':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'blindCurtainSliceBottom':
if(opts.slicedRows == 0) {
rows = opts.rows;
} else {
rows = opts.slicedRows;
}
cols = 1;
break;
case 'stampede':
difference = '-'+transPeriod;
break;
case 'mosaic':
difference = opts.gridDifference;
break;
case 'mosaicReverse':
difference = opts.gridDifference;
break;
case 'mosaicRandom':
break;
case 'mosaicSpiral':
difference = opts.gridDifference;
couples = 1.7;
break;
case 'mosaicSpiralReverse':
difference = opts.gridDifference;
couples = 1.7;
break;
case 'topLeftBottomRight':
difference = opts.gridDifference;
couples = 6;
break;
case 'bottomRightTopLeft':
difference = opts.gridDifference;
couples = 6;
break;
case 'bottomLeftTopRight':
difference = opts.gridDifference;
couples = 6;
break;
case 'topRightBottomLeft':
difference = opts.gridDifference;
couples = 6;
break;
case 'scrollLeft':
cols = 1;
rows = 1;
break;
case 'scrollRight':
cols = 1;
rows = 1;
break;
case 'scrollTop':
cols = 1;
rows = 1;
break;
case 'scrollBottom':
cols = 1;
rows = 1;
break;
case 'scrollHorz':
cols = 1;
rows = 1;
break;
}
var cycle = 0;
var blocks = rows*cols;
var leftScrap = w-(Math.floor(w/cols)*cols);
var topScrap = h-(Math.floor(h/rows)*rows);
var addLeft;
var addTop;
var tAppW = 0;
var tAppH = 0;
var arr = new Array();
var delay = new Array();
var order = new Array();
while(cycle < blocks){
arr.push(cycle);
delay.push(cycle);
cameraCont.append('
');
var tApp = $('.cameraappended:eq('+cycle+')',target);
if(fx=='scrollLeft' || fx=='scrollRight' || fx=='scrollTop' || fx=='scrollBottom' || fx=='scrollHorz'){
selector.eq(slideI).clone().show().appendTo(tApp);
} else {
if(slideOn=='next'){
selector.eq(slideI).clone().show().appendTo(tApp);
} else {
selector.eq(vis).clone().show().appendTo(tApp);
}
}
if(cycle%cols
.cameraSlide', tApp).css({
'height': h,
'margin-left': '-'+tAppW+'px',
'margin-top': '-'+tAppH+'px',
'width': w
});
tAppW = tAppW+tApp.width()-1;
if(cycle%cols==cols-1){
tAppH = tAppH + tApp.height() - 1;
}
cycle++;
}
switch(fx){
case 'curtainTopLeft':
break;
case 'curtainBottomLeft':
break;
case 'curtainSliceLeft':
break;
case 'curtainTopRight':
arr = arr.reverse();
break;
case 'curtainBottomRight':
arr = arr.reverse();
break;
case 'curtainSliceRight':
arr = arr.reverse();
break;
case 'blindCurtainTopLeft':
break;
case 'blindCurtainBottomLeft':
arr = arr.reverse();
break;
case 'blindCurtainSliceTop':
break;
case 'blindCurtainTopRight':
break;
case 'blindCurtainBottomRight':
arr = arr.reverse();
break;
case 'blindCurtainSliceBottom':
arr = arr.reverse();
break;
case 'stampede':
arr = shuffle(arr);
break;
case 'mosaic':
break;
case 'mosaicReverse':
arr = arr.reverse();
break;
case 'mosaicRandom':
arr = shuffle(arr);
break;
case 'mosaicSpiral':
var rows2 = rows/2, x, y, z, n=0;
for (z = 0; z < rows2; z++){
y = z;
for (x = z; x < cols - z - 1; x++) {
order[n++] = y * cols + x;
}
x = cols - z - 1;
for (y = z; y < rows - z - 1; y++) {
order[n++] = y * cols + x;
}
y = rows - z - 1;
for (x = cols - z - 1; x > z; x--) {
order[n++] = y * cols + x;
}
x = z;
for (y = rows - z - 1; y > z; y--) {
order[n++] = y * cols + x;
}
}
arr = order;
break;
case 'mosaicSpiralReverse':
var rows2 = rows/2, x, y, z, n=blocks-1;
for (z = 0; z < rows2; z++){
y = z;
for (x = z; x < cols - z - 1; x++) {
order[n--] = y * cols + x;
}
x = cols - z - 1;
for (y = z; y < rows - z - 1; y++) {
order[n--] = y * cols + x;
}
y = rows - z - 1;
for (x = cols - z - 1; x > z; x--) {
order[n--] = y * cols + x;
}
x = z;
for (y = rows - z - 1; y > z; y--) {
order[n--] = y * cols + x;
}
}
arr = order;
break;
case 'topLeftBottomRight':
for (var y = 0; y < rows; y++)
for (var x = 0; x < cols; x++) {
order.push(x + y);
}
delay = order;
break;
case 'bottomRightTopLeft':
for (var y = 0; y < rows; y++)
for (var x = 0; x < cols; x++) {
order.push(x + y);
}
delay = order.reverse();
break;
case 'bottomLeftTopRight':
for (var y = rows; y > 0; y--)
for (var x = 0; x < cols; x++) {
order.push(x + y);
}
delay = order;
break;
case 'topRightBottomLeft':
for (var y = 0; y < rows; y++)
for (var x = cols; x > 0; x--) {
order.push(x + y);
}
delay = order;
break;
}
$.each(arr, function(index, value) {
if(value%cols=0){
$(thumbs).css({visibility:'visible'});
}
if($('.cameraeased',target).length==blocks){
thumbnailPos();
$('.moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom',fakeHover).each(function(){
$(this).css('visibility','hidden');
});
selector.eq(slideI).show().css('z-index','999').removeClass('cameranext').addClass('cameracurrent');
selector.eq(vis).css('z-index','1').removeClass('cameracurrent');
$('.cameraContent',fakeHover).eq(slideI).addClass('cameracurrent');
if (vis >= 0) {
$('.cameraContent',fakeHover).eq(vis).removeClass('cameracurrent');
}
opts.onEndTransition.call(this);
if($('> div', elem).eq(slideI).attr('data-video')!='hide' && $('.cameraContent.cameracurrent .imgFake',fakeHover).length ){
$('.cameraContent.cameracurrent .imgFake',fakeHover).click();
}
var lMoveIn = selector.eq(slideI).find('.fadeIn').length;
var lMoveInContent = $('.cameraContent',fakeHover).eq(slideI).find('.moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom').length;
if (lMoveIn!=0){
$('.cameraSlide.cameracurrent .fadeIn',fakeHover).each(function(){
if($(this).attr('data-easing')!=''){
var easeMove = $(this).attr('data-easing');
} else {
var easeMove = easing;
}
var t = $(this);
if(typeof t.attr('data-outerWidth') === 'undefined' || t.attr('data-outerWidth') === false || t.attr('data-outerWidth') === '') {
var wMoveIn = t.outerWidth();
t.attr('data-outerWidth',wMoveIn);
} else {
var wMoveIn = t.attr('data-outerWidth');
}
if(typeof t.attr('data-outerHeight') === 'undefined' || t.attr('data-outerHeight') === false || t.attr('data-outerHeight') === '') {
var hMoveIn = t.outerHeight();
t.attr('data-outerHeight',hMoveIn);
} else {
var hMoveIn = t.attr('data-outerHeight');
}
//t.css('width',wMoveIn);
var pos = t.position();
var left = pos.left;
var top = pos.top;
var tClass = t.attr('class');
var ind = t.index();
var hRel = t.parents('.camerarelative').outerHeight();
var wRel = t.parents('.camerarelative').outerWidth();
if(tClass.indexOf("fadeIn") != -1) {
t.animate({opacity:0},0).css('visibility','visible').delay((time/lMoveIn)*(0.1*(ind-1))).animate({opacity:1},(time/lMoveIn)*0.15,easeMove);
} else {
t.css('visibility','visible');
}
});
}
$('.cameraContent.cameracurrent',fakeHover).show();
if (lMoveInContent!=0){
$('.cameraContent.cameracurrent .moveFromLeft, .cameraContent.cameracurrent .moveFromRight, .cameraContent.cameracurrent .moveFromTop, .cameraContent.cameracurrent .moveFromBottom, .cameraContent.cameracurrent .fadeIn, .cameraContent.cameracurrent .fadeFromLeft, .cameraContent.cameracurrent .fadeFromRight, .cameraContent.cameracurrent .fadeFromTop, .cameraContent.cameracurrent .fadeFromBottom',fakeHover).each(function(){
if($(this).attr('data-easing')!=''){
var easeMove = $(this).attr('data-easing');
} else {
var easeMove = easing;
}
var t = $(this);
var pos = t.position();
var left = pos.left;
var top = pos.top;
var tClass = t.attr('class');
var ind = t.index();
var thisH = t.outerHeight();
if(tClass.indexOf("moveFromLeft") != -1) {
t.css({'left':'-'+(w)+'px','right':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'left':pos.left},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("moveFromRight") != -1) {
t.css({'left':w+'px','right':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'left':pos.left},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("moveFromTop") != -1) {
t.css({'top':'-'+h+'px','bottom':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'top':pos.top},(time/lMoveInContent)*0.15,easeMove,function(){
t.css({top:'auto',bottom:0});
});
} else if(tClass.indexOf("moveFromBottom") != -1) {
t.css({'top':h+'px','bottom':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'top':pos.top},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("fadeFromLeft") != -1) {
t.animate({opacity:0},0).css({'left':'-'+(w)+'px','right':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'left':pos.left,opacity:1},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("fadeFromRight") != -1) {
t.animate({opacity:0},0).css({'left':(w)+'px','right':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'left':pos.left,opacity:1},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("fadeFromTop") != -1) {
t.animate({opacity:0},0).css({'top':'-'+(h)+'px','bottom':'auto'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'top':pos.top,opacity:1},(time/lMoveInContent)*0.15,easeMove,function(){
t.css({top:'auto',bottom:0});
});
} else if(tClass.indexOf("fadeFromBottom") != -1) {
t.animate({opacity:0},0).css({'bottom':'-'+thisH+'px'});
t.css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({'bottom':'0',opacity:1},(time/lMoveInContent)*0.15,easeMove);
} else if(tClass.indexOf("fadeIn") != -1) {
t.animate({opacity:0},0).css('visibility','visible').delay((time/lMoveInContent)*(0.1*(ind-1))).animate({opacity:1},(time/lMoveInContent)*0.15,easeMove);
} else {
t.css('visibility','visible');
}
});
}
$('.cameraappended',target).remove();
elem.removeClass('camerasliding');
selector.eq(vis).hide();
var barWidth = $('.camera_bar_cont',camera_thumbs_wrap).width(),
barHeight = $('.camera_bar_cont',camera_thumbs_wrap).height(),
radSum;
if (loader != 'pie') {
radSum = 0.05;
} else {
radSum = 0.005;
}
$('#'+pieID).animate({opacity:opts.loaderOpacity},200);
u = setInterval(
function(){
if(elem.hasClass('stopped')){
clearInterval(u);
}
if (loader != 'pie') {
if(rad<=1.002 && !elem.hasClass('stopped') && !elem.hasClass('paused') && !elem.hasClass('hovered')){
rad = (rad+radSum);
} else if (rad<=1 && (elem.hasClass('stopped') || elem.hasClass('paused') || elem.hasClass('stopped') || elem.hasClass('hovered'))){
rad = rad;
} else {
if(!elem.hasClass('stopped') && !elem.hasClass('paused') && !elem.hasClass('hovered')) {
clearInterval(u);
imgFake();
$('#'+pieID).animate({opacity:0},200,function(){
clearTimeout(setT);
setT = setTimeout(canvasLoader,easedTime);
nextSlide();
opts.onStartLoading.call(this);
});
}
}
switch(barDirection){
case 'leftToRight':
$('#'+pieID).animate({'right':barWidth-(barWidth*rad)},(time*radSum),'linear');
break;
case 'rightToLeft':
$('#'+pieID).animate({'left':barWidth-(barWidth*rad)},(time*radSum),'linear');
break;
case 'topToBottom':
$('#'+pieID).animate({'bottom':barHeight-(barHeight*rad)},(time*radSum),'linear');
break;
case 'bottomToTop':
$('#'+pieID).animate({'bottom':barHeight-(barHeight*rad)},(time*radSum),'linear');
break;
}
} else {
radNew = rad;
ctx.clearRect(0,0,opts.pieDiameter,opts.pieDiameter);
ctx.globalCompositeOperation = 'destination-over';
ctx.beginPath();
ctx.arc((opts.pieDiameter)/2, (opts.pieDiameter)/2, (opts.pieDiameter)/2-opts.loaderStroke,0,Math.PI*2,false);
ctx.lineWidth = opts.loaderStroke;
ctx.strokeStyle = opts.loaderBgColor;
ctx.stroke();
ctx.closePath();
ctx.globalCompositeOperation = 'source-over';
ctx.beginPath();
ctx.arc((opts.pieDiameter)/2, (opts.pieDiameter)/2, (opts.pieDiameter)/2-opts.loaderStroke,0,Math.PI*2*radNew,false);
ctx.lineWidth = opts.loaderStroke-(opts.loaderPadding*2);
ctx.strokeStyle = opts.loaderColor;
ctx.stroke();
ctx.closePath();
if(rad<=1.002 && !elem.hasClass('stopped') && !elem.hasClass('paused') && !elem.hasClass('hovered')){
rad = (rad+radSum);
} else if (rad<=1 && (elem.hasClass('stopped') || elem.hasClass('paused') || elem.hasClass('hovered'))){
rad = rad;
} else {
if(!elem.hasClass('stopped') && !elem.hasClass('paused') && !elem.hasClass('hovered')) {
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},200,function(){
clearTimeout(setT);
setT = setTimeout(canvasLoader,easedTime);
nextSlide();
opts.onStartLoading.call(this);
});
}
}
}
},time*radSum
);
}
}
if(fx=='scrollLeft' || fx=='scrollRight' || fx=='scrollTop' || fx=='scrollBottom' || fx=='scrollHorz'){
opts.onStartTransition.call(this);
easedTime = 0;
tApp.delay((((transPeriod+difference)/blocks)*delay[index]*couples)*0.5).css({
'display' : 'block',
'height': height,
'margin-left': marginLeft,
'margin-top': marginTop,
'width': width
}).animate({
'height': Math.floor((h/rows)+addTop+1),
'margin-top' : 0,
'margin-left' : 0,
'width' : Math.floor((w/cols)+addLeft+1)
},(transPeriod-difference),easing,cameraeased);
selector.eq(vis).delay((((transPeriod+difference)/blocks)*delay[index]*couples)*0.5).animate({
'margin-left': marginLeft*(-1),
'margin-top': marginTop*(-1)
},(transPeriod-difference),easing,function(){
$(this).css({'margin-top' : 0,'margin-left' : 0});
});
} else {
opts.onStartTransition.call(this);
easedTime = parseFloat(transPeriod)+parseFloat(difference);
if(slideOn=='next'){
tApp.delay((((transPeriod+difference)/blocks)*delay[index]*couples)*0.5).css({
'display' : 'block',
'height': height,
'margin-left': marginLeft,
'margin-top': marginTop,
'width': width,
'opacity' : opacityOnGrid
}).animate({
'height': Math.floor((h/rows)+addTop+1),
'margin-top' : 0,
'margin-left' : 0,
'opacity' : 1,
'width' : Math.floor((w/cols)+addLeft+1)
},(transPeriod-difference),easing,cameraeased);
} else {
selector.eq(slideI).show().css('z-index','999').addClass('cameracurrent');
selector.eq(vis).css('z-index','1').removeClass('cameracurrent');
$('.cameraContent',fakeHover).eq(slideI).addClass('cameracurrent');
$('.cameraContent',fakeHover).eq(vis).removeClass('cameracurrent');
tApp.delay((((transPeriod+difference)/blocks)*delay[index]*couples)*0.5).css({
'display' : 'block',
'height': Math.floor((h/rows)+addTop+1),
'margin-top' : 0,
'margin-left' : 0,
'opacity' : 1,
'width' : Math.floor((w/cols)+addLeft+1)
}).animate({
'height': height,
'margin-left': marginLeft,
'margin-top': marginTop,
'width': width,
'opacity' : opacityOnGrid
},(transPeriod-difference),easing,cameraeased);
}
}
});
}
}
if($(prevNav).length){
$(prevNav).click(function(){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($('.cameraSlide.cameracurrent',target).index());
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',wrap).animate({opacity:0},0);
canvasLoader();
if(idNum!=0){
nextSlide(idNum);
} else {
nextSlide(amountSlide);
}
opts.onStartLoading.call(this);
}
});
}
if($(nextNav).length){
$(nextNav).click(function(){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($('.cameraSlide.cameracurrent',target).index());
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},0);
canvasLoader();
if(idNum==amountSlide-1){
nextSlide(1);
} else {
nextSlide(idNum+2);
}
opts.onStartLoading.call(this);
}
});
}
if(isMobile()){
fakeHover.bind('swipeleft',function(event){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($('.cameraSlide.cameracurrent',target).index());
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},0);
canvasLoader();
if(idNum==amountSlide-1){
nextSlide(1);
} else {
nextSlide(idNum+2);
}
opts.onStartLoading.call(this);
}
});
fakeHover.bind('swiperight',function(event){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($('.cameraSlide.cameracurrent',target).index());
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},0);
canvasLoader();
if(idNum!=0){
nextSlide(idNum);
} else {
nextSlide(amountSlide);
}
opts.onStartLoading.call(this);
}
});
}
if($(pagination).length){
$('.camera_pag li',wrap).click(function(){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($(this).index());
var curNum = parseFloat($('.cameraSlide.cameracurrent',target).index());
if(idNum!=curNum) {
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},0);
canvasLoader();
nextSlide(idNum+1);
opts.onStartLoading.call(this);
}
}
});
}
if($(thumbs).length) {
$('.pix_thumb img',thumbs).click(function(){
if(!elem.hasClass('camerasliding')){
var idNum = parseFloat($(this).parents('li').index());
var curNum = parseFloat($('.cameracurrent',target).index());
if(idNum!=curNum) {
clearInterval(u);
imgFake();
$('#'+pieID+', .camera_canvas_wrap',camera_thumbs_wrap).animate({opacity:0},0);
$('.pix_thumb',thumbs).removeClass('cameracurrent');
$(this).parents('li').addClass('cameracurrent');
canvasLoader();
nextSlide(idNum+1);
thumbnailPos();
opts.onStartLoading.call(this);
}
}
});
$('.camera_thumbs_cont .camera_prevThumbs',camera_thumbs_wrap).hover(function(){
$(this).stop(true,false).animate({opacity:1},250);
},function(){
$(this).stop(true,false).animate({opacity:.7},250);
});
$('.camera_prevThumbs',camera_thumbs_wrap).click(function(){
var sum = 0,
wTh = $(thumbs).outerWidth(),
offUl = $('ul', thumbs).offset().left,
offDiv = $('> div', thumbs).offset().left,
ulLeft = offDiv-offUl;
$('.camera_visThumb',thumbs).each(function(){
var tW = $(this).outerWidth();
sum = sum+tW;
});
if(ulLeft-sum>0){
$('ul', thumbs).animate({'margin-left':'-'+(ulLeft-sum)+'px'},500,thumbnailVisible);
} else {
$('ul', thumbs).animate({'margin-left':0},500,thumbnailVisible);
}
});
$('.camera_thumbs_cont .camera_nextThumbs',camera_thumbs_wrap).hover(function(){
$(this).stop(true,false).animate({opacity:1},250);
},function(){
$(this).stop(true,false).animate({opacity:.7},250);
});
$('.camera_nextThumbs',camera_thumbs_wrap).click(function(){
var sum = 0,
wTh = $(thumbs).outerWidth(),
ulW = $('ul', thumbs).outerWidth(),
offUl = $('ul', thumbs).offset().left,
offDiv = $('> div', thumbs).offset().left,
ulLeft = offDiv-offUl;
$('.camera_visThumb',thumbs).each(function(){
var tW = $(this).outerWidth();
sum = sum+tW;
});
if(ulLeft+sum+sumthis.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i '}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("
",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
// jQuery Mobile framework customized for Camera slideshow, made by
// 'jquery.mobile.define.js',
// 'jquery.ui.widget.js',
// 'jquery.mobile.widget.js',
// 'jquery.mobile.media.js',
// 'jquery.mobile.support.js',
// 'jquery.mobile.vmouse.js',
// 'jquery.mobile.event.js',
// 'jquery.mobile.core.js'
window.define=function(){Array.prototype.slice.call(arguments).pop()(window.jQuery)};define(["jquery"],function(a){(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++){a(e).triggerHandler("remove")}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){if(!c){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1];f=e+"-"+b;if(!d){d=c;c=a.Widget}a.expr[":"][f]=function(c){return!!a.data(c,b)};a[e]=a[e]||{};a[e][b]=function(a,b){if(arguments.length){this._createWidget(a,b)}};var g=new c;g.options=a.extend(true,{},g.options);a[e][b].prototype=a.extend(true,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d);a.widget.bridge(b,a[e][b])};a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e==="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[true,e].concat(g)):e;if(f&&e.charAt(0)==="_"){return h}if(f){this.each(function(){var d=a.data(this,c);if(!d){throw"cannot call methods on "+c+" prior to initialization; "+"attempted to call method '"+e+"'"}if(!a.isFunction(d[e])){throw"no such method '"+e+"' for "+c+" widget instance"}var f=d[e].apply(d,g);if(f!==d&&f!==b){h=f;return false}})}else{this.each(function(){var b=a.data(this,c);if(b){b.option(e||{})._init()}else{a.data(this,c,new d(e,this))}})}return h}};a.Widget=function(a,b){if(arguments.length){this._createWidget(a,b)}};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata){b=a.metadata.get(element)[this.widgetName]}return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0){return a.extend({},this.options)}if(typeof c==="string"){if(d===b){return this.options[c]}e={};e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;if(a==="disabled"){this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();d=d||{};if(c.originalEvent){for(var f=a.event.props.length,g;f;){g=a.event.props[--f];c[g]=c.originalEvent[g]}}this.element.trigger(c,d);return!(a.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery)});define(["jquery","./jquery.ui.widget"],function(a){(function(a,b){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var c=this.element,d={};a.each(this.options,function(a){var e=c.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));if(e!==b){d[a]=e}});return d},enhanceWithin:function(b){var c=a.mobile.closestPageData(a(b)),d=c&&c.keepNativeSelector()||"";a(this.options.initSelector,b).not(d)[this.widgetName]()}})})(jQuery)});define(["jquery","./jquery.mobile.core"],function(a){(function(a,b){var c=a(window),d=a("html");a.mobile.media=function(){var b={},c=a("