Index: application/views/files/file_details.php =================================================================== --- application/views/files/file_details.php (revision 1) +++ application/views/files/file_details.php (working copy) @@ -1,101 +1,119 @@ -getFilename()); - project_tabbed_navigation(PROJECT_TAB_FILES); - - $files_crumbs = array( - 0 => array(lang('files'), get_url('files')) - ); // array - if($folder instanceof ProjectFolder) { - $files_crumbs[] = array($folder->getName(), $folder->getBrowseUrl()); - } // if - $files_crumbs[] = lang('file details'); - - project_crumbs($files_crumbs); - - if(ProjectFile::canAdd(logged_user(), active_project())) { - if($folder instanceof ProjectFolder) { - add_page_action(lang('add file'), $folder->getAddFileUrl()); - } else { - add_page_action(lang('add file'), get_url('files', 'add_file')); - } // if - } // if - if(ProjectFolder::canAdd(logged_user(), active_project())) { - add_page_action(lang('add folder'), get_url('files', 'add_folder')); - } // if - - add_stylesheet_to_page('project/files.css'); - -?> -
-isPrivate()) { ?> -
- -
getFilename()) ?>
-
-
<?php echo $file->getFilename() ?>
-
-getDescription())) { ?> -
getDescription()) ?>
- - - - - - -
: -getCreatedBy() instanceof User) { ?> - getRevisionNumber(), $last_revision->getCreatedBy()->getCardUrl(), $last_revision->getCreatedBy()->getDisplayName(), format_descriptive_date($last_revision->getCreatedOn())) ?> - - getRevisionNumber(), format_descriptive_date($last_revision->getCreatedOn())) ?> - -
- - -
: getProject()) ?>
-canDownload(logged_user())) $options[] = '' . lang('download') . ' (' . format_filesize($file->getFilesize()) . ')'; -if($file->canEdit(logged_user())) $options[] = '' . lang('edit') . ''; -if($file->canDelete(logged_user())) $options[] = '' . lang('delete') . '' -?> - -
- -
-
-
-
- - -
-

- - - -
-
-getCreatedBy() instanceof User) { ?> - getDownloadUrl(), $revision->getRevisionNumber(), $revision->getCreatedBy()->getCardUrl(), $revision->getCreatedBy()->getDisplayName(), format_datetime($revision->getCreatedOn())) ?> - - getDownloadUrl(), $revision->getRevisionNumber(), format_datetime($revision->getCreatedOn())) ?> - -
-getComment())) { ?> -
getComment()) ?>
- -canDownload(logged_user())) $options[] = '' . lang('download') . ' (' . format_filesize($revision->getFileSize()) . ')'; - if($revision->canEdit(logged_user())) $options[] = '' . lang('edit') . ''; - if($revision->canDelete(logged_user())) $options[] = '' . lang('delete') . ''; -?> - -
- -
- -
- - +getFilename()); + project_tabbed_navigation(PROJECT_TAB_FILES); + + $files_crumbs = array( + 0 => array(lang('files'), get_url('files')) + ); // array + if($folder instanceof ProjectFolder) { + $files_crumbs[] = array($folder->getName(), $folder->getBrowseUrl()); + } // if + $files_crumbs[] = lang('file details'); + + project_crumbs($files_crumbs); + + if(ProjectFile::canAdd(logged_user(), active_project())) { + if($folder instanceof ProjectFolder) { + add_page_action(lang('add file'), $folder->getAddFileUrl()); + } else { + add_page_action(lang('add file'), get_url('files', 'add_file')); + } // if + } // if + if(ProjectFolder::canAdd(logged_user(), active_project())) { + add_page_action(lang('add folder'), get_url('files', 'add_folder')); + } // if + + add_stylesheet_to_page('project/files.css'); + add_javascript_to_page('shadowbox-yui.js'); + add_javascript_to_page('shadowbox.js'); + +?> + +
+isPrivate()) { ?> +
+ +
getFilename()) ?>
+
+
+ canDownload(logged_user())) { +echo "getFilename(); + echo "\">"; + } + ?> + + <?php echo $file->getFilename() ?>
+
+getDescription())) { ?> +
getDescription()) ?>
+ + + + + + +
: +getCreatedBy() instanceof User) { ?> + getRevisionNumber(), $last_revision->getCreatedBy()->getCardUrl(), $last_revision->getCreatedBy()->getDisplayName(), format_descriptive_date($last_revision->getCreatedOn())) ?> + + getRevisionNumber(), format_descriptive_date($last_revision->getCreatedOn())) ?> + +
+ + +
: getProject()) ?>
+canDownload(logged_user())) $options[] = '' . lang('download') . ' (' . format_filesize($file->getFilesize()) . ')'; +if($file->canEdit(logged_user())) $options[] = '' . lang('edit') . ''; +if($file->canDelete(logged_user())) $options[] = '' . lang('delete') . '' +?> + +
+ +
+
+
+
+ + +
+

+ + + +
+
+getCreatedBy() instanceof User) { ?> + getDownloadUrl(), $revision->getRevisionNumber(), $revision->getCreatedBy()->getCardUrl(), $revision->getCreatedBy()->getDisplayName(), format_datetime($revision->getCreatedOn())) ?> + + getDownloadUrl(), $revision->getRevisionNumber(), format_datetime($revision->getCreatedOn())) ?> + +
+getComment())) { ?> +
getComment()) ?>
+ +canDownload(logged_user())) $options[] = '' . lang('download') . ' (' . format_filesize($revision->getFileSize()) . ')'; + if($revision->canEdit(logged_user())) $options[] = '' . lang('edit') . ''; + if($revision->canDelete(logged_user())) $options[] = '' . lang('delete') . ''; +?> + +
+ +
+ +
+ + getDetailsUrl()) ?> \ No newline at end of file Index: public/assets/javascript/shadowbox-yui.js =================================================================== --- public/assets/javascript/shadowbox-yui.js (revision 0) +++ public/assets/javascript/shadowbox-yui.js (revision 0) @@ -0,0 +1 @@ +if(typeof YAHOO=="undefined"){throw"Unable to load Shadowbox, core YUI utilities (yahoo, dom, event, anim) not found."}var Shadowbox={};Shadowbox.lib=function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;return{getStyle:function(D,C){return B.getStyle(D,C)},setStyle:function(F,E,G){if(typeof E!="object"){var C={};C[E]=G;E=C}for(var D in E){B.setStyle(F,D,E[D])}},get:function(C){return B.get(C)},remove:function(C){C.parentNode.removeChild(C)},getTarget:function(C){return A.getTarget(C.browserEvent||C)},preventDefault:function(C){A.preventDefault(C.browserEvent||C)},addEvent:function(E,C,D){A.addListener(E,C,D)},removeEvent:function(E,C,D){A.removeListener(E,C,D)},animate:function(C,G,F,H){var E=new YAHOO.util.Anim(C,G,F,YAHOO.util.Easing.easeOut);if(typeof H=="function"){var D=function(){E.onComplete.unsubscribe(D);H.call(E,E)};E.onComplete.subscribe(D,E,true)}E.animate()}}}() \ No newline at end of file Index: public/assets/javascript/shadowbox.js =================================================================== --- public/assets/javascript/shadowbox.js (revision 0) +++ public/assets/javascript/shadowbox.js (revision 0) @@ -0,0 +1 @@ +if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox, no base library adapter found."}(function(){var options={loadingImage:"images/loading.gif",animate:true,flvPlayer:"flvplayer.swf",overlayColor:"#000",overlayOpacity:0.85,overlayBgImage:"images/overlay-85.png",autoplayMovies:true,showMovieControls:true,resizeDuration:0.35,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:"default",viewportPadding:20,handleLgImages:"resize",initialHeight:160,initialWidth:320,enableKeys:true,keysClose:["c","q",27],keysNext:["n",39],keysPrev:["p",37],onOpen:null,onFinish:null,onClose:null,handleUnsupported:"link",skipSetup:false,errors:{templates:{single:'You must install the {1} browser plugin to view this content.',shared:'You must install both the {1} and {3} browser plugins to view this content.',either:'You must install either the {1} or the {3} browser plugin to view this content.'},fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},skin:{main:'
',counter:'
',nav:{close:'
Close
',next:'
Next
',prev:'
Previous
'}}};var default_options=null;var SL=Shadowbox.lib;var RE={resize:/(img|swf|flv)/,swf:/\.swf\s*$/i,flv:/\.flv\s*$/i,domain:/:\/\/(.*?)[:\/]/,rel:/^shadowbox/i,gallery:/^shadowbox\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var current_gallery=null;var current=null;var optimal_height=options.initialHeight;var optimal_width=options.initialWidth;var current_height=0;var current_width=0;var preloader=null;var initialized=false;var activated=false;var drag=null;var draggable=null;var overlay_img_needed=null;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isIE=ua.indexOf("msie")>-1,isIE7=ua.indexOf("msie 7")>-1,isBorderBox=isIE&&!isStrict,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&!!(document.evaluate),isGecko=!isSafari&&ua.indexOf("gecko")>-1,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1);var absolute_pos=isIE&&!isIE7;var plugins=null;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i-1){detected=true;break}}return detected};var f4m=detectPlugin("Flip4Mac");var plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m}}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo){detected=true}}catch(e){}return detected};var plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var apply=function(orig,ext){for(var p in ext){orig[p]=ext[p]}return orig};var getViewportHeight=function(){var height=window.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=isStrict?document.documentElement.clientHeight:document.body.clientHeight}return height};var getViewportWidth=function(){var width=window.innerWidth;var mode=document.compatMode;if(mode||isIE){width=isStrict?document.documentElement.clientWidth:document.body.clientWidth}return width};var getDocumentHeight=function(){var scrollHeight=isStrict?document.documentElement.scrollHeight:document.body.scrollHeight;return Math.max(scrollHeight,getViewportHeight())};var getDocumentWidth=function(){var scrollWidth=isStrict?document.documentElement.scrollWidth:document.body.scrollWidth;return Math.max(scrollWidth,getViewportWidth())};var clearOpacity=function(el){if(isIE){if(typeof el.style.filter=="string"&&(/alpha/i).test(el.style.filter)){el.style.filter=""}}else{el.style.opacity="";el.style["-moz-opacity"]="";el.style["-khtml-opacity"]=""}};var fadeIn=function(el,endingOpacity,duration,callback){if(options.animate){SL.setStyle(el,"opacity",0);el.style.visibility="visible";SL.animate(el,{opacity:{to:endingOpacity}},duration,function(){if(endingOpacity==1){clearOpacity(el)}if(typeof callback=="function"){callback()}})}else{if(endingOpacity==1){clearOpacity(el)}else{SL.setStyle(el,"opacity",endingOpacity)}el.style.visibility="visible";if(typeof callback=="function"){callback()}}};var fadeOut=function(el,duration,callback){var cb=function(){el.style.visibility="hidden";clearOpacity(el);if(typeof callback=="function"){callback()}};if(options.animate){SL.animate(el,{opacity:{to:0}},duration,cb)}else{cb()}};var appendHTML=function(el,html){el=SL.get(el);if(el.insertAdjacentHTML){el.insertAdjacentHTML("BeforeEnd",html);return el.lastChild}if(el.lastChild){var range=el.ownerDocument.createRange();range.setStartAfter(el.lastChild);var frag=range.createContextualFragment(html);el.appendChild(frag);return el.lastChild}else{el.innerHTML=html;return el.lastChild}};var overwriteHTML=function(el,html){el=SL.get(el);el.innerHTML=html;return el.firstChild};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,"height"),10)||0;if(!isBorderBox){h+=parseInt(SL.getStyle(el,"padding-top"),10)+parseInt(SL.getStyle(el,"padding-bottom"),10)+parseInt(SL.getStyle(el,"border-top-width"),10)+parseInt(SL.getStyle(el,"border-bottom-width"),10)}}return h};var getComputedWidth=function(el){var w=Math.max(el.offsetWidth,el.clientWidth);if(!w){w=parseInt(SL.getStyle(el,"width"),10)||0;if(!isBorderBox){w+=parseInt(SL.getStyle(el,"padding-left"),10)+parseInt(SL.getStyle(el,"padding-right"),10)+parseInt(SL.getStyle(el,"border-left-width"),10)+parseInt(SL.getStyle(el,"border-right-width"),10)}}return w};var getPlayerType=function(url){if(RE.img.test(url)){return"img"}var this_domain=(domain_match=url.match(RE.domain))?(document.domain==domain_match[1]):false;var q_index=url.indexOf("?");if(q_index>-1){url=url.substring(0,q_index)}if(RE.swf.test(url)){return(plugins.fla)?"swf":"unsupported-swf"}else{if(RE.flv.test(url)){return(plugins.fla)?"flv":"unsupported-flv"}else{if(RE.qt.test(url)){return(plugins.qt)?"qt":"unsupported-qt"}else{if(RE.wmp.test(url)){if(plugins.wmp){return"wmp"}else{if(plugins.f4m){return"qt"}else{if(isMac){return(plugins.qt?"unsupported-f4m":"unsupported-qtf4m")}return"unsupported-wmp"}}}else{if(RE.qtwmp.test(url)){if(plugins.qt){return"qt"}else{if(plugins.wmp){return"wmp"}else{return(isMac)?"unsupported-qt":"unsupported-qtwmp"}}}else{if(!this_domain||RE.iframe.test(url)){return"iframe"}}}}}}return"unsupported"};var getGallery=function(link){var key=link.shadowboxCacheKey;var name=cache[key].gallery;if(!name){return[[cache[key]],0]}else{var gallery=[],index;for(var i=0,len=cache.length;i1){if(options.continuous){appendHTML(tool_i,options.skin.nav.next);appendHTML(tool_i,options.skin.nav.prev)}else{if((current_gallery.length-1)>current){appendHTML(tool_i,options.skin.nav.next)}if(current>0){appendHTML(tool_i,options.skin.nav.prev)}}}}if(current_gallery.length>1&&options.displayCounter){appendHTML(tool_i,options.skin.counter);var counter="";if(options.counterType=="skip"){for(var i=0,len=current_gallery.length;i"}}else{counter=(current+1)+" of "+current_gallery.length}overwriteHTML("shadowbox_counter",counter)}};var hideBars=function(callback){var title_m=getComputedHeight(SL.get("shadowbox_title"));var tool_m=0-getComputedHeight(SL.get("shadowbox_toolbar"));var title_i=SL.get("shadowbox_title_inner");var tool_i=SL.get("shadowbox_toolbar_inner");if(callback){SL.animate(title_i,{marginTop:{to:title_m}},0.2);SL.animate(tool_i,{marginTop:{to:tool_m}},0.2,callback)}else{SL.setStyle(title_i,"marginTop",title_m+"px");SL.setStyle(tool_i,"marginTop",tool_m+"px")}};var showBars=function(callback){var title_i=SL.get("shadowbox_title_inner");if(options.animate){if(title_i.innerHTML!=""){SL.animate(title_i,{marginTop:{to:0}},0.35)}SL.animate(SL.get("shadowbox_toolbar_inner"),{marginTop:{to:0}},0.35,callback)}else{if(title_i.innerHTML!=""){SL.setStyle(title_i,"margin-top","0px")}SL.setStyle(SL.get("shadowbox_toolbar_inner"),"margin-top","0px");callback()}};var resetDrag=function(){drag={x:0,y:0,start_x:null,start_y:null}};var toggleDrag=function(on){if(on){resetDrag();var styles=["position:absolute","cursor:"+(isGecko?"-moz-grab":"move")];styles.push(isIE?"background-color:#fff;filter:alpha(opacity=0)":"background-color:transparent");appendHTML("shadowbox_body_inner",'
');SL.addEvent(SL.get("shadowbox_drag_layer"),"mousedown",listenDrag)}else{var d=SL.get("shadowbox_drag_layer");if(d){SL.removeEvent(d,"mousedown",listenDrag);SL.remove(d)}}};var listenDrag=function(ev){drag.start_x=ev.clientX;drag.start_y=ev.clientY;draggable=SL.get("shadowbox_content");SL.addEvent(document,"mousemove",positionDrag);SL.addEvent(document,"mouseup",unlistenDrag);if(isGecko){SL.setStyle(SL.get("shadowbox_drag_layer"),"cursor","-moz-grabbing")}};var unlistenDrag=function(){SL.removeEvent(document,"mousemove",positionDrag);SL.removeEvent(document,"mouseup",unlistenDrag);if(isGecko){SL.setStyle(SL.get("shadowbox_drag_layer"),"cursor","-moz-grab")}};var positionDrag=function(ev){var move_y=ev.clientY-drag.start_y;drag.start_y=drag.start_y+move_y;drag.y=Math.max(Math.min(0,drag.y+move_y),current_height-optimal_height);SL.setStyle(draggable,"top",drag.y+"px");var move_x=ev.clientX-drag.start_x;drag.start_x=drag.start_x+move_x;drag.x=Math.max(Math.min(0,drag.x+move_x),current_width-optimal_width);SL.setStyle(draggable,"left",drag.x+"px")};var setContent=function(obj){var id="shadowbox_content";var content=SL.get(id);if(content){switch(content.tagName.toUpperCase()){case"OBJECT":var link=current_gallery[(obj?current-1:current)];if(link.type=="wmp"&&isIE){try{shadowbox_content.controls.stop();shadowbox_content.URL="non-existent.wmv";window.shadowbox_content=function(){}}catch(e){}}else{if(link.type=="qt"&&isSafari){try{document.shadowbox_content.Stop()}catch(e){}content.innerHTML=""}}setTimeout(function(){SL.remove(content)},10);break;case"IFRAME":SL.remove(content);if(isGecko){delete window.frames[id]}break;default:SL.remove(content)}}if(obj){if(!obj.id){obj.id=id}return appendHTML("shadowbox_body_inner",Shadowbox.createHTML(obj))}return null};var loadContent=function(){var link=current_gallery[current];if(!link){return }buildBars();switch(link.type){case"img":preloader=new Image();preloader.onload=function(){var h=link.height?parseInt(link.height,10):preloader.height;var w=link.width?parseInt(link.width,10):preloader.width;resizeContent(preloader.height,preloader.width,function(dims){showBars(function(){setContent({tag:"img",height:dims.i_height,width:dims.i_width,src:link.href,style:"position:absolute"});if(dims.enableDrag&&options.handleLgImages=="drag"){toggleDrag(true);SL.setStyle(SL.get("shadowbox_drag_layer"),{height:dims.i_height+"px",width:dims.i_width+"px"})}finishContent()})});preloader.onload=function(){}};preloader.src=link.href;break;case"swf":case"flv":case"qt":case"wmp":var markup=Shadowbox.movieMarkup(link);resizeContent(markup.height,markup.width,function(){showBars(function(){setContent(markup);finishContent()})});break;case"iframe":var h=link.height?parseInt(link.height,10):getViewportHeight();var w=link.width?parseInt(link.width,10):getViewportWidth();var content={tag:"iframe",name:"shadowbox_content",height:"100%",width:"100%",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"};resizeContent(h,w,function(dims){showBars(function(){setContent(content);var win=(isIE)?SL.get("shadowbox_content").contentWindow:window.frames["shadowbox_content"];win.location=link.href;finishContent()})});break;case"msg":var h=options.initialHeight;var w=options.initialWidth;var content={tag:"div",cls:"shadowbox_message",html:link.message};resizeContent(h,w,function(){showBars(function(){setContent(content);finishContent()})});break;case"unsupported":throw"Content type cannot be determined for "+link.href;break}if(current_gallery.length>0){var next=current_gallery[current+1];if(!next){next=current_gallery[0]}if(next.type=="img"){var preload_next=new Image();preload_next.src=next.href}var prev=current_gallery[current-1];if(!prev){prev=current_gallery[current_gallery.length-1]}if(prev.type=="img"){var preload_prev=new Image();preload_prev.src=prev.href}}};var finishContent=function(){var link=current_gallery[current];if(!link){return }hideLoading(function(){listenKeyboard(true);if(options.onFinish&&typeof options.onFinish=="function"){options.onFinish(link.el)}})};var resizeContent=function(height,width,callback){optimal_height=height;optimal_width=width;var resizable=RE.resize.test(current_gallery[current].type);var dims=getDimensions(optimal_height,optimal_width,resizable);if(callback){adjustWidth(dims.width,true,function(){adjustHeight(dims.height,dims.top,true,function(){callback(dims)})})}else{adjustWidth(dims.width,false);adjustHeight(dims.height,dims.top,false);if(options.handleLgImages=="resize"&&resizable){var content=SL.get("shadowbox_content");content.height=dims.i_height;content.width=dims.i_width}}};var getDimensions=function(o_height,o_width,resizable){if(typeof resizable=="undefined"){resizable=false}var height=o_height=parseInt(o_height);var width=o_width=parseInt(o_width);var shadowbox_b=SL.get("shadowbox_body");var view_height=getViewportHeight();var extra_height=parseInt(SL.getStyle(shadowbox_b,"border-top-width"),10)+parseInt(SL.getStyle(shadowbox_b,"border-bottom-width"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-top"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-bottom"),10)+getComputedHeight(SL.get("shadowbox_title"))+getComputedHeight(SL.get("shadowbox_toolbar"))+(2*options.viewportPadding);if((height+extra_height)>=view_height){height=view_height-extra_height}var view_width=getViewportWidth();var extra_body_width=parseInt(SL.getStyle(shadowbox_b,"border-left-width"),10)+parseInt(SL.getStyle(shadowbox_b,"border-right-width"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-left"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-right"),10);var extra_width=extra_body_width+(2*options.viewportPadding);if((width+extra_width)>=view_width){width=view_width-extra_width}var enableDrag=false;var i_height=o_height;var i_width=o_width;var handle=options.handleLgImages;if(resizable&&(handle=="resize"||handle=="drag")){var change_h=(o_height-height)/o_height;var change_w=(o_width-width)/o_width;if(handle=="resize"){if(change_h>change_w){width=Math.round((o_width/o_height)*height)}else{if(change_w>change_h){height=Math.round((o_height/o_width)*width)}}i_width=width;i_height=height}else{var link=current_gallery[current];if(link){enableDrag=link.type=="img"&&(change_h>0||change_w>0)}}}return{height:height,width:width+extra_body_width,i_height:i_height,i_width:i_width,top:((view_height-(height+extra_height))/2)+options.viewportPadding,enableDrag:enableDrag}};var centerVertically=function(){var shadowbox=SL.get("shadowbox");var scroll=document.documentElement.scrollTop;var s_top=scroll+Math.round((getViewportHeight()-(shadowbox.offsetHeight||0))/2);SL.setStyle(shadowbox,"top",s_top+"px")};var adjustHeight=function(height,top,animate,callback){height=parseInt(height);current_height=height;var sbi=SL.get("shadowbox_body_inner");if(animate&&options.animate){SL.animate(sbi,{height:{to:height}},options.resizeDuration,callback)}else{SL.setStyle(sbi,"height",height+"px");if(typeof callback=="function"){callback()}}if(absolute_pos){centerVertically();SL.addEvent(window,"scroll",centerVertically);top+=document.documentElement.scrollTop}var shadowbox=SL.get("shadowbox");if(animate&&options.animate){SL.animate(shadowbox,{top:{to:top}},options.resizeDuration)}else{SL.setStyle(shadowbox,"top",top+"px")}};var adjustWidth=function(width,animate,callback){width=parseInt(width);current_width=width;var shadowbox=SL.get("shadowbox");if(animate&&options.animate){SL.animate(shadowbox,{width:{to:width}},options.resizeDuration,callback)}else{SL.setStyle(shadowbox,"width",width+"px");if(typeof callback=="function"){callback()}}};var listenKeyboard=function(on){if(!options.enableKeys){return }if(on){document.onkeydown=handleKey}else{document.onkeydown=""}};var assertKey=function(valid,key,code){return(valid.indexOf(key)!=-1||valid.indexOf(code)!=-1)};var handleKey=function(e){var code=e?e.which:event.keyCode;var key=String.fromCharCode(code).toLowerCase();if(assertKey(options.keysClose,key,code)){Shadowbox.close()}else{if(assertKey(options.keysPrev,key,code)){Shadowbox.previous()}else{if(assertKey(options.keysNext,key,code)){Shadowbox.next()}}}};var toggleTroubleElements=function(on){var vis=(on?"visible":"hidden");var selects=document.getElementsByTagName("select");for(i=0,len=selects.length;i\n"}return html};Shadowbox.getPlugins=function(){return plugins};Shadowbox.getOptions=function(){return options}})();Array.prototype.indexOf=Array.prototype.indexOf||function(C){for(var B=0,A=this.length;B