Your IP : 216.73.216.147


Current Path : /home/lejardintz/www/media/foundry/3.1/scripts/
Upload File :
Current File : /home/lejardintz/www/media/foundry/3.1/scripts/fancybox.min.js

!function(){var moduleFactory=function($){var module=this,exports=function(){!function(window,document){var W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments)},didResize=!1,resizeTimer=null;$.extend(F,{version:"2.0.4",defaults:{padding:15,margin:20,width:800,height:600,minWidth:200,minHeight:200,maxWidth:9999,maxHeight:9999,autoSize:!0,fitToView:!0,aspectRatio:!1,topRatio:.5,fixed:!($.browser.msie&&$.browser.version<=6)&&"undefined"==typeof document.createTouch,scrolling:"auto",wrapCSS:"fancybox-default",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,modal:!1,loop:!0,ajax:{dataType:"html"},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':"")+"></iframe>",swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-item fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-item fancybox-prev"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:300,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:300,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{speedIn:0,speedOut:300,opacity:.8,css:{cursor:"pointer"},closeClick:!0},title:{type:"float"}},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},coming:null,current:null,isOpen:!1,isOpened:!1,wrap:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){$.isArray(group)||(group=group.jquery?$(group).get():[group]),group.length&&(F.close(!0),F.isActive=!0,F.opts=$.extend(!0,{},F.defaults,opts),F.group=group,F._start(F.opts.index||0))
},cancel:function(){F.coming&&!1===F.trigger("onCancel")||(F.coming=null,F.hideLoading(),F.ajaxLoad&&F.ajaxLoad.abort(),F.ajaxLoad=null,F.imgPreload&&(F.imgPreload.onload=F.imgPreload.onabort=F.imgPreload.onerror=null))},close:function(a){F.cancel(),F.current&&!1!==F.trigger("beforeClose")&&(F.unbindEvents(),!F.isOpen||a&&a[0]===!0?($(".fancybox-wrap").stop().trigger("onReset").remove(),F._afterZoomOut()):(F.isOpen=F.isOpened=!1,$(".fancybox-item").remove(),F.wrap.stop(!0).removeClass("fancybox-opened"),F.inner.css("overflow","hidden"),F.transitions[F.current.closeMethod]()))
},play:function(a){var clear=function(){clearTimeout(F.player.timer)},set=function(){clear(),F.current&&F.player.isActive&&(F.player.timer=setTimeout(F.next,F.current.playSpeed))},stop=function(){clear(),$("body").unbind(".player"),F.player.isActive=!1,F.trigger("onPlayEnd")},start=function(){F.current&&(F.current.loop||F.current.index<F.group.length-1)&&(F.player.isActive=!0,$("body").bind({"afterShow.player onUpdate.player":set,"onCancel.player beforeClose.player":stop,"beforeLoad.player":clear}),set(),F.trigger("onPlayStart"))
};F.player.isActive||a&&a[0]===!1?stop():start()},next:function(){F.current&&F.jumpto(F.current.index+1)},prev:function(){F.current&&F.jumpto(F.current.index-1)},jumpto:function(index){F.current&&(index=parseInt(index,10),F.group.length>1&&F.current.loop&&(index>=F.group.length?index=0:0>index&&(index=F.group.length-1)),"undefined"!=typeof F.group[index]&&(F.cancel(),F._start(index)))},reposition:function(a){F.isOpen&&F.wrap.css(F._getPosition(a))},update:function(){F.isOpen&&(didResize||(resizeTimer=setTimeout(function(){didResize&&(didResize=!1,F.current&&(F.current.autoSize&&(F.inner.height("auto"),F.current.height=F.inner.height()),F._setDimension(),F.current.canGrow&&F.inner.height("auto"),F.reposition(),F.trigger("onUpdate")))
},100)),didResize=!0)},toggle:function(){F.isOpen&&(F.current.fitToView=!F.current.fitToView,F.update())},hideLoading:function(){$("#fancybox-loading").remove()},showLoading:function(){F.hideLoading(),$('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo("body")},getViewport:function(){return{x:W.scrollLeft(),y:W.scrollTop(),w:W.width(),h:W.height()}},unbindEvents:function(){F.wrap&&F.wrap.unbind(".fb"),D.unbind(".fb"),W.unbind(".fb")},bindEvents:function(){var current=F.current,keys=current.keys;
current&&(W.bind("resize.fb, orientationchange.fb",F.update),keys&&D.bind("keydown.fb",function(e){var code;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||!($.inArray(e.target.tagName.toLowerCase(),["input","textarea","select","button"])<0)||(code=e.keyCode,$.inArray(code,keys.close)>-1?(F.close(),e.preventDefault()):$.inArray(code,keys.next)>-1?(F.next(),e.preventDefault()):$.inArray(code,keys.prev)>-1&&(F.prev(),e.preventDefault()))}),$.fn.mousewheel&&current.mouseWheel&&F.group.length>1&&F.wrap.bind("mousewheel.fb",function(e,delta){var target=$(e.target).get(0);
(0===target.clientHeight||target.scrollHeight===target.clientHeight&&target.scrollWidth===target.clientWidth)&&(e.preventDefault(),F[delta>0?"prev":"next"]())}))},trigger:function(event){var ret,obj=F[$.inArray(event,["onCancel","beforeLoad","afterLoad"])>-1?"coming":"current"];if(obj){if($.isFunction(obj[event])&&(ret=obj[event].apply(obj,Array.prototype.slice.call(arguments,1))),ret===!1)return!1;obj.helpers&&$.each(obj.helpers,function(helper,opts){opts&&"undefined"!=typeof F.helpers[helper]&&$.isFunction(F.helpers[helper][event])&&F.helpers[helper][event](opts,obj)
}),$.event.trigger(event+".fb")}},isImage:function(str){return str&&str.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)},isSWF:function(str){return str&&str.match(/\.(swf)(.*)?$/i)},_start:function(index){var isDom,href,type,rez,coming={},element=F.group[index]||null;return element&&"object"==typeof element&&(element.nodeType||element instanceof $)&&(isDom=!0,$.metadata&&(coming=$(element).metadata())),coming=$.extend(!0,{},F.opts,{index:index,element:element},$.isPlainObject(element)?element:coming),$.each(["href","title","content","type"],function(i,v){coming[v]=F.opts[v]||isDom&&$(element).attr(v)||coming[v]||null
}),"number"==typeof coming.margin&&(coming.margin=[coming.margin,coming.margin,coming.margin,coming.margin]),coming.modal&&$.extend(!0,coming,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:!1}}}),F.coming=coming,!1===F.trigger("beforeLoad")?(F.coming=null,void 0):(type=coming.type,href=coming.href,type||(isDom&&(rez=$(element).data("fancybox-type"),!rez&&element.className&&(rez=element.className.match(/fancybox\.(\w+)/),type=rez?rez[1]:null)),!type&&href&&(F.isImage(href)?type="image":F.isSWF(href)?type="swf":href.match(/^#/)&&(type="inline")),type||(type=isDom?"inline":"html"),coming.type=type),"inline"===type||"html"===type?(coming.content=coming.content||("inline"===type&&href?$(href):$(element)),coming.content.length||(type=null)):(coming.href=href||element,coming.href||(type=null)),coming.group=F.group,coming.isDom=isDom,"image"===type?F._loadImage():"ajax"===type?F._loadAjax():type?F._afterLoad():F._error("type"),void 0)
},_error:function(type){F.hideLoading(),$.extend(F.coming,{type:"html",autoSize:!0,minHeight:0,hasError:type,content:F.coming.tpl.error}),F._afterLoad()},_loadImage:function(){F.imgPreload=new Image,F.imgPreload.onload=function(){this.onload=this.onerror=null,F.coming.width=this.width,F.coming.height=this.height,F._afterLoad()},F.imgPreload.onerror=function(){this.onload=this.onerror=null,F._error("image")},F.imgPreload.src=F.coming.href,F.imgPreload.width||F.showLoading()},_loadAjax:function(){F.showLoading(),F.ajaxLoad=$.ajax($.extend({},F.coming.ajax,{url:F.coming.href,error:function(jqXHR,textStatus){"abort"!==textStatus?F._error("ajax",jqXHR):F.hideLoading()
},success:function(data,textStatus){"success"===textStatus&&(F.coming.content=data,F._afterLoad())}}))},_preload:function(){var group=F.group,index=F.current.index;group.length>1&&((new Image).src=$(group[index+1]||group[0]).attr("href"),(new Image).src=$(group[index-1]||group[group.length-1]).attr("href"))},_afterLoad:function(){return F.hideLoading(),F.coming&&!1!==F.trigger("afterLoad",F.current)?(F.isOpened?($(".fancybox-item").remove(),F.wrap.stop(!0).removeClass("fancybox-opened"),F.inner.css("overflow","hidden"),F.transitions[F.current.prevMethod]()):($(".fancybox-wrap").stop().trigger("onReset").remove(),F.trigger("afterClose")),F.unbindEvents(),F.isOpen=!1,F.current=F.coming,F.coming=!1,F.wrap=$(F.current.tpl.wrap).addClass("fancybox-tmp "+F.current.wrapCSS).appendTo("body"),F.outer=$(".fancybox-outer",F.wrap).css("padding",F.current.padding+"px"),F.inner=$(".fancybox-inner",F.wrap),F._setContent(),void 0):(F.coming=!1,void 0)
},_setContent:function(){var content,loadingBay,current=F.current,type=current.type;switch(type){case"inline":case"ajax":case"html":content=current.content,"inline"===type&&content instanceof $&&(content=content.show().detach(),content.parent().hasClass("fancybox-inner")&&content.parents(".fancybox-wrap").trigger("onReset").remove(),$(F.wrap).bind("onReset",function(){content.appendTo("body").hide()})),current.autoSize&&(loadingBay=$('<div class="fancybox-tmp"></div>').appendTo("body").append(content),current.width=loadingBay.width(),current.height=loadingBay.height(),loadingBay.width(F.current.width),loadingBay.height()>current.height&&(loadingBay.width(current.width+1),current.width=loadingBay.width(),current.height=loadingBay.height()),content=loadingBay.contents().detach(),loadingBay.remove());
break;case"image":content=current.tpl.image.replace("{href}",current.href),current.aspectRatio=!0;break;case"swf":content=current.tpl.swf.replace(/\{width\}/g,current.width).replace(/\{height\}/g,current.height).replace(/\{href\}/g,current.href)}if("iframe"===type){if(content=$(current.tpl.iframe.replace("{rnd}",(new Date).getTime())).attr({scrolling:current.scrolling,src:current.href}).appendTo(F.inner),current.scrolling="auto",current.autoSize)return F.wrap.width(current.width),F.showLoading(),content.data("ready",!1).bind("load",function(){var height,iframe=$(this);
try{this.contentWindow.document.location&&(height=iframe.contents().find("body").height()+12,iframe.height(height))}catch(e){current.autoSize=!1}iframe.data("ready")===!1?(F.hideLoading(),height&&(F.current.height=height),F._beforeShow(),iframe.data("ready",!0)):height&&F.update()}),void 0}else("image"===type||"swf"===type)&&(current.autoSize=!1,current.scrolling="visible"),F.inner.append(content);F._beforeShow()},_beforeShow:function(){F.trigger("beforeShow"),F._setDimension(),F.wrap.hide().removeClass("fancybox-tmp"),F.bindEvents(),F._preload(),F.transitions[F.isOpened?F.current.nextMethod:F.current.openMethod]()
},_setDimension:function(){var ratio,height_,space,wrap=F.wrap,outer=F.outer,inner=F.inner,current=F.current,viewport=F.getViewport(),margin=current.margin,padding2=2*current.padding,width=current.width,height=current.height,maxWidth=current.maxWidth,maxHeight=current.maxHeight,minWidth=current.minWidth,minHeight=current.minHeight;if(viewport.w-=margin[1]+margin[3],viewport.h-=margin[0]+margin[2],width.toString().indexOf("%")>-1&&(width=(viewport.w-padding2)*parseFloat(width)/100),height.toString().indexOf("%")>-1&&(height=(viewport.h-padding2)*parseFloat(height)/100),ratio=width/height,width+=padding2,height+=padding2,current.fitToView&&(maxWidth=Math.min(viewport.w,maxWidth),maxHeight=Math.min(viewport.h,maxHeight)),minWidth=Math.min(width,minWidth),minHeight=Math.min(height,minHeight),maxWidth=Math.max(minWidth,maxWidth),maxHeight=Math.max(minHeight,maxHeight),current.aspectRatio?(width>maxWidth&&(width=maxWidth,height=(width-padding2)/ratio+padding2),height>maxHeight&&(height=maxHeight,width=(height-padding2)*ratio+padding2),minWidth>width&&(width=minWidth,height=(width-padding2)/ratio+padding2),minHeight>height&&(height=minHeight,width=(height-padding2)*ratio+padding2)):(width=Math.max(minWidth,Math.min(width,maxWidth)),height=Math.max(minHeight,Math.min(height,maxHeight))),width=Math.round(width),height=Math.round(height),$(wrap.add(outer).add(inner)).width("auto").height("auto"),inner.width(width-padding2).height(height-padding2),wrap.width(width),height_=wrap.height(),width>maxWidth||height_>maxHeight)for(;(width>maxWidth||height_>maxHeight)&&width>minWidth&&height_>minHeight;)height-=10,current.aspectRatio?(width=Math.round((height-padding2)*ratio+padding2),minWidth>width&&(width=minWidth,height=(width-padding2)/ratio+padding2)):width-=10,inner.width(width-padding2).height(height-padding2),wrap.width(width),height_=wrap.height();
current.dim={width:width,height:height_},current.canGrow=current.autoSize&&height>minHeight&&maxHeight>height,current.canShrink=!1,current.canExpand=!1,width-padding2<current.width||height-padding2<current.height?current.canExpand=!0:(width>viewport.w||height_>viewport.h)&&width>minWidth&&height>minHeight&&(current.canShrink=!0),space=height_-padding2,F.innerSpace=space-inner.height(),F.outerSpace=space-outer.height()},_getPosition:function(a){var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:"absolute",top:margin[0]+viewport.y,left:margin[3]+viewport.x};
return current.fixed&&(!a||a[0]===!1)&&height<=viewport.h&&width<=viewport.w&&(rez={position:"fixed",top:margin[0],left:margin[3]}),rez.top=Math.ceil(Math.max(rez.top,rez.top+(viewport.h-height)*current.topRatio))+"px",rez.left=Math.ceil(Math.max(rez.left,rez.left+.5*(viewport.w-width)))+"px",rez},_afterZoomIn:function(){var current=F.current,scrolling=current.scrolling;F.isOpen=F.isOpened=!0,F.wrap.addClass("fancybox-opened").css("overflow","visible"),F.update(),F.inner.css("overflow","yes"===scrolling?"scroll":"no"===scrolling?"hidden":scrolling),(current.closeClick||current.nextClick)&&F.inner.css("cursor","pointer").bind("click.fb",current.nextClick?F.next:F.close),current.closeBtn&&$(current.tpl.closeBtn).appendTo(F.wrap).bind("click.fb",F.close),current.arrows&&F.group.length>1&&((current.loop||current.index>0)&&$(current.tpl.prev).appendTo(F.wrap).bind("click.fb",F.prev),(current.loop||current.index<F.group.length-1)&&$(current.tpl.next).appendTo(F.wrap).bind("click.fb",F.next)),F.trigger("afterShow"),F.opts.autoPlay&&!F.player.isActive&&(F.opts.autoPlay=!1,F.play())
},_afterZoomOut:function(){F.trigger("afterClose"),F.wrap.trigger("onReset").remove(),$.extend(F,{group:{},opts:{},current:null,isActive:!1,isOpened:!1,isOpen:!1,wrap:null,outer:null,inner:null})}}),F.transitions={getOrigPosition:function(){var viewport,current=F.current,element=current.element,padding=current.padding,orig=$(current.orig),pos={},width=50,height=50;return!orig.length&&current.isDom&&$(element).is(":visible")&&(orig=$(element).find("img:first"),orig.length||(orig=$(element))),orig.length?(pos=orig.offset(),orig.is("img")&&(width=orig.outerWidth(),height=orig.outerHeight())):(viewport=F.getViewport(),pos.top=viewport.y+.5*(viewport.h-height),pos.left=viewport.x+.5*(viewport.w-width)),pos={top:Math.ceil(pos.top-padding)+"px",left:Math.ceil(pos.left-padding)+"px",width:Math.ceil(width+2*padding)+"px",height:Math.ceil(height+2*padding)+"px"}
},step:function(now,fx){var ratio,innerValue,outerValue;("width"===fx.prop||"height"===fx.prop)&&(innerValue=outerValue=Math.ceil(now-2*F.current.padding),"height"===fx.prop&&(ratio=(now-fx.start)/(fx.end-fx.start),fx.start>fx.end&&(ratio=1-ratio),innerValue-=F.innerSpace*ratio,outerValue-=F.outerSpace*ratio),F.inner[fx.prop](innerValue),F.outer[fx.prop](outerValue))},zoomIn:function(){var startPos,endPos,wrap=F.wrap,current=F.current,dim=current.dim;"elastic"===current.openEffect?(endPos=$.extend({},dim,F._getPosition(!0)),delete endPos.position,startPos=this.getOrigPosition(),current.openOpacity&&(startPos.opacity=0,endPos.opacity=1),F.outer.add(F.inner).width("auto").height("auto"),wrap.css(startPos).show().animate(endPos,{duration:current.openSpeed,easing:current.openEasing,step:this.step,complete:F._afterZoomIn})):(wrap.css($.extend({},dim,F._getPosition())),"fade"===current.openEffect?wrap.fadeIn(current.openSpeed,F._afterZoomIn):(wrap.show(),F._afterZoomIn()))
},zoomOut:function(){var endPos,wrap=F.wrap,current=F.current;"elastic"===current.closeEffect?("fixed"===wrap.css("position")&&wrap.css(F._getPosition(!0)),endPos=this.getOrigPosition(),current.closeOpacity&&(endPos.opacity=0),wrap.animate(endPos,{duration:current.closeSpeed,easing:current.closeEasing,step:this.step,complete:F._afterZoomOut})):wrap.fadeOut("fade"===current.closeEffect?current.closeSpeed:0,F._afterZoomOut)},changeIn:function(){var startPos,wrap=F.wrap,current=F.current;"elastic"===current.nextEffect?(startPos=F._getPosition(!0),startPos.opacity=0,startPos.top=parseInt(startPos.top,10)-200+"px",wrap.css(startPos).show().animate({opacity:1,top:"+=200px"},{duration:current.nextSpeed,complete:F._afterZoomIn})):(wrap.css(F._getPosition()),"fade"===current.nextEffect?wrap.hide().fadeIn(current.nextSpeed,F._afterZoomIn):(wrap.show(),F._afterZoomIn()))
},changeOut:function(){var wrap=F.wrap,current=F.current,cleanUp=function(){$(this).trigger("onReset").remove()};wrap.removeClass("fancybox-opened"),"elastic"===current.prevEffect?wrap.animate({opacity:0,top:"+=200px"},{duration:current.prevSpeed,complete:cleanUp}):wrap.fadeOut("fade"===current.prevEffect?current.prevSpeed:0,cleanUp)}},F.helpers.overlay={overlay:null,update:function(){var width,scrollWidth,offsetWidth;this.overlay.width(0).height(0),$.browser.msie?(scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),width=offsetWidth>scrollWidth?W.width():scrollWidth):width=D.width(),this.overlay.width(width).height(D.height())
},beforeShow:function(opts){this.overlay||(opts=$.extend(!0,{speedIn:"fast",closeClick:!0,opacity:1,css:{background:"black"}},opts),this.overlay=$('<div id="fancybox-overlay"></div>').css(opts.css).appendTo("body"),this.update(),opts.closeClick&&this.overlay.bind("click.fb",F.close),W.bind("resize.fb",$.proxy(this.update,this)),this.overlay.fadeTo(opts.speedIn,opts.opacity))},onUpdate:function(){this.update()},afterClose:function(opts){this.overlay&&this.overlay.fadeOut(opts.speedOut||0,function(){$(this).remove()
}),this.overlay=null}},F.helpers.title={beforeShow:function(opts){var title,text=F.current.title;text&&(title=$('<div class="fancybox-title fancybox-title-'+opts.type+'-wrap">'+text+"</div>").appendTo("body"),"float"===opts.type&&(title.width(title.width()),title.wrapInner('<span class="child"></span>'),F.current.margin[2]+=Math.abs(parseInt(title.css("margin-bottom"),10))),title.appendTo("over"===opts.type?F.inner:"outside"===opts.type?F.wrap:F.outer))}},$.fn.fancybox=function(options){var index,that=$(this),selector=this.selector||"",run=function(e){var what=this,relType="rel",relVal=what[relType],idx=index;
e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault(),relVal||(relType="data-fancybox-group",relVal=$(what).attr("data-fancybox-group")),relVal&&""!==relVal&&"nofollow"!==relVal&&(what=selector.length?$(selector):that,what=what.filter("["+relType+'="'+relVal+'"]'),idx=what.index(this)),options.index=idx,F.open(what,options))};return options=options||{},index=options.index||0,selector?D.undelegate(selector,"click.fb-start").delegate(selector,"click.fb-start",run):that.unbind("click.fb-start").bind("click.fb-start",run),this
}}(window,document)};exports(),module.resolveWith(exports)};FD31.module("fancybox",moduleFactory)}();