From 0e09b83a30ba68723200bee241dae5e6c7ff644e Mon Sep 17 00:00:00 2001 From: Mason James Date: Thu, 28 Apr 2016 13:54:26 +1200 Subject: [PATCH] Bug 10756 - Carousel Display of New Titles on OPAC home page add ContentFlow dir http://www.jacksasylum.eu/ContentFlow Signed-off-by: Magnus Enger Comment on the other patch. --- .../opac-tmpl/bootstrap/lib/contentflow/CHANGELOG | 269 +++ .../lib/contentflow/ContentFlowAddOn_DEFAULT.css | 154 ++ .../lib/contentflow/ContentFlowAddOn_DEFAULT.js | 290 +++ .../opac-tmpl/bootstrap/lib/contentflow/LICENSE | 19 + .../bootstrap/lib/contentflow/changelog.html | 291 +++ .../bootstrap/lib/contentflow/contentflow.css | 1 + .../bootstrap/lib/contentflow/contentflow.js | 2 + .../bootstrap/lib/contentflow/contentflow_src.css | 248 ++ .../bootstrap/lib/contentflow/contentflow_src.js | 2549 ++++++++++++++++++++ .../opac-tmpl/bootstrap/lib/contentflow/docu.html | 1018 ++++++++ .../lib/contentflow/img/1x1_0.5_black.png | Bin 0 -> 82 bytes .../bootstrap/lib/contentflow/img/blank.gif | Bin 0 -> 43 bytes .../bootstrap/lib/contentflow/img/loader.gif | Bin 0 -> 8238 bytes .../lib/contentflow/img/scrollbar_white.png | Bin 0 -> 82 bytes .../bootstrap/lib/contentflow/img/slider_white.png | Bin 0 -> 178 bytes .../opac-tmpl/bootstrap/lib/contentflow/index.html | 113 + .../bootstrap/lib/contentflow/license.html | 50 + .../bootstrap/lib/contentflow/mycontentflow.css | 3 + .../lib/contentflow/mycontentflow.css.example | 119 + .../bootstrap/lib/contentflow/pics/pic0.png | Bin 0 -> 1208 bytes .../bootstrap/lib/contentflow/pics/pic1.png | Bin 0 -> 1063 bytes .../bootstrap/lib/contentflow/pics/pic2.png | Bin 0 -> 773 bytes .../opac-tmpl/bootstrap/lib/contentflow/styles.css | 219 ++ .../opac-tmpl/bootstrap/lib/contentflow/title.png | Bin 0 -> 3947 bytes 24 files changed, 5345 insertions(+) create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/CHANGELOG create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.css create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.js create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/LICENSE create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/changelog.html create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.css create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.js create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow_src.css create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow_src.js create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/docu.html create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/img/1x1_0.5_black.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/img/blank.gif create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/img/loader.gif create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/img/scrollbar_white.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/img/slider_white.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/index.html create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/license.html create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/mycontentflow.css create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/mycontentflow.css.example create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/pics/pic0.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/pics/pic1.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/pics/pic2.png create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/styles.css create mode 100755 koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/title.png diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/CHANGELOG b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/CHANGELOG new file mode 100755 index 0000000..2910354 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/CHANGELOG @@ -0,0 +1,269 @@ +ContenFolw ChangeLog +==================== + +version 1.0 (2010/02/09) +------------------------- + + Beware: Because of a major restructuring, this release will break with older + AddOns and possibly with user defined configurations. If you have + defined your own calculation methods (calcSize, calcCoordinates, + calcRelativeItemPosition, calcZIndex or calcFontSize) you have to + rework them. + If you use AddOns please update to the new version of the AddOn. + + * moved to relative return values for the following methods: + calcSize := returns values ranging from 0.0 - 1.0 + calcCoordinates := returns values ranging from -1.0 to 1.0 + calcRelativeItemPosition := returns values ranging from -1.0 to 1.0 + + * changed the paramters of the following methods: + calcStepWidth : ( diff ) + calcSize : ( item ) + calcCoordinates : ( item ) + calcRelativeItemPosition : ( item ) + calcZIndex : ( item ) + calcFontSize : ( item ) + + * added the following properties to the item object: + next, position, pre, relativePosition, relativePositionNormed, side, size + + * better image scaling in IE7 (bicubic interpolation) + + * changed landscapeScaleFactor default value to 1.33 + + * moved from 20 to 25 redraws/recalculations/frames per second + + * refined calculation of flow size + + * speedup by internel code cleanup + + * unified AddOn configuration + + * renamed 'container' to 'Container' + + * documentation update + + + * addeded direct usage of image tags as items + + * added support for transparent PNGs on IE6 + + * added touch handling on iPhone + Dragging of the whole Flow and the scrollbar works now on the iPhone + + * added onDrawItem method + + * added fluid opacity change + - option: endOpacity + - method: calcOpacity + + * added fixItemSize option + + * added reflectionGap option + + * added scaleFactorPortrait option + + * automatic scrolling to item will now be supressed if the onclickInactiveItem + method returns 'false' + + * added conf object to flow + + + * removed server side reflections + - removed reflectionType option + reflectionHeight = 0 deactivetes the reflection + - removed negativeMarginOnFloat option + - removed reflectionServerSrc option + + * removed obsolete contentPosition option + + + * fixed FF drag problem + + * fixed addItem method + + * fixed rmItem method + + + +version 0.7.2 (2009/10/01) +------------------------- + * fixed possible conflict with jquery, prototype + * fixed Konqueror 4 init bug + * fixed iPhone init bug + * fixed IE 6,7,8 / mootools compatibility + thanks to Michael Birchler + * fixed IE6 scalefactor bug + * simplified internal click event handling + * added 'return' key to call the onclickActiveItem method + +version 0.7 (2009/04/09) +------------------------ + Beware: Because of a major restructuring, this release will break with older + AddOns and possibly with user defined configurations. If you have + defined your own methods (i.e. calcCoordinates or onclickActiveItem) + you have to move the definitions into the configuration object. + If you use AddOns please update to the new version of the AddOn. + + In any other case you can use the new version without any modification. + + * moved user definable method definitions to configuration + * speedup by reducing number of calculations + * flow element will now be centered within ContentFlow element + * better handling of large images by Canvas supporting Browsers (all except IE) + * removed reflectionOverlay option + * removed set* methods to set methods + * removed getConfig method + * added cursermove style to slider + * added "left" and "right" to position keywords (same as 'pre' and 'next') + + * added optional 'useAddOns' attribute to ContentFlow (X)HTML element + * added optional deactivation of mousewheel + * added revers mousewheel scrolling + * added optional deactivation of keyboard + * added optional deactivation of drag 'n throw + + * added keys option + * added verticalFlow option + * added contentPosition option + * added relativeItemPosition option + + * added onReachTarget method + * added onMoveTo method + * added onMakeInactive method + * added onclickInactiveItem method + + * fixed reload bug in Firefox 3 (Gecko 1.9) + * fixed keyboard actions on FireFox (Gecko) and Safari (WebKit) + * fixed refelctions on iPhone + * fixed bug in moveTo method + * fixed item positioning + * fixed bug if 'scrollInFrom' was set to 'none' + * fixed disappearing position label + + * structure cleanup + + +version 0.6 (2008/09/27) +------------------------ + This release contains major changes and could break with previous versions. + But most times it can be used as a drop-in replacement. + + * added AddOn System + + * handles now 'href' and 'target' attributes of 'item' and 'content' items + by default + + * will respect style-height attributes of ContentFlow and flow elements + (has to be defined on the element it self) + + * moved fancyScrollbar to AddOn + + * added optional 'label' element to item (will be used as slider label) + (great for time lines) + + * scrollbar will be hidden until loader is hidden + + * default loader height fixed + + * switched from array based structure to object based structure for items + + * switched from index based calculations to global position based calculations + + * merged mycontentflow.css into contentflow.css and and added mycontentflow.css.example + + * new Initialization System + - init when DOM is fully loaded + - auto init of flows + - auto loading of stylesheets + - auto load of AddOns + - background init of images + + * changed calculation methods + - added calcCoordinates + - added calcRelativeItemPosition + - removed calcPosition + + * new methods + - onMakeActive + - onclickPreButton + - onclickNextButton + + * new options + - useAddOns + - circularFlow + - activeElement + + * enhanced options + - added scaleFactorLandscape option value "max" + - flowDragFriction deactivates drag 'n throw if set to '0' + - scrollWheelSpeed deactivates scrollwheel if set to '0' + + * internal restructuring and cleanup + + * removed unneeded images + + * switched to yuicompressor for javascript compression + + * squashed many bugs + + +version 0.5.3 (2008/05/22) +------------------------ + * resize bug fixed + * renamed maxHeight configuration option to maxItemHeight + +version 0.5.2 (2008/05/21) +------------------------ + * bugfixes + +version 0.5.1 (2008/05/18) +------------------------ + * bugfixes + +version 0.5 (2008/05/18) +------------------------ + * if reflections are used images scale nicer and scrolling is more fluid + in Firefox, Safari and Opera (or any other browser which knows about 'canvas') + * added fancy scrollbar (with pre and next button) + * added maxHeight conf property + (if set content will be scaled depending on maxHeight) + * moveTo method can handle keywords like 'pre', 'next', 'start' or 'end' + * code cleanup + +version 0.4 (2008/02/12) +------------------------ + * dynamically add and remove items ! + * caption of item is now optional + * added setter for: clickActiveItem, calcSize, calcPosition, calcZIndex, calcFontSize + * added getter for: config, activeItem, numberOfItems + * squashed some bugs + * some clean up + +version 0.3 (2008/01/26) +------------------------ + * revamp of reflection handling: + - added client side reflection generation !!! + YES! Browser generated reflections without flash! + - bedder handling of reflection sizes + - bedder handling of server side reflection sources + - bedder handling of overlays in IE6 + - removed unneeded options + - added more flexible options + - fix positioning of items in IE6 + * fixed resize event handling in IE + * fixed slider-position element handling in IE6 + * fixed some minor bugs + +version 0.2 (2008/01/22) +------------------------ + * handles now node-object and node-id string on object creation + * configuration options are now given as configuration object + * auto initialization on window load + * auto detection of usage of load indicator, global caption and scrollbar + * removed obsolete configuration options + * minor cleanups + +version 0.1 (2008/01/10) +------------------------ + * initial release diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.css b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.css new file mode 100755 index 0000000..45e114c --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.css @@ -0,0 +1,154 @@ +/* ContentFlowAddOn_DEFAULT, version 1.0.0 + * (c) 2008 - 2010 Sebastian Kutsch + * + * + * This file is distributed under the terms of the MIT license. + * (see http://www.jacksasylum.eu/ContentFlow/LICENSE) + * + *--------------------------------------------------------------------------*/ + +/* + * This is an example file of an AddOn stylesheet. All values are the default + * values as they are found in 'mycontentflow.css'. + * + * It should give you a good idea which elements of the ContentFlow you can + * style and how to excess them. + * + * To use this stylesheet follow this guideline: + * + * 1. Create a new AddOn and use the addStylesheet method in the init method. + * Take a look at ContentFlowAddOn_DEFAULT.js to know how. + * So a minimal AddOn file just to apply this stylesheet would look like this: + * new ContentFlowAddOn ('ADDONNAME', { + * init: function () { this.addStylesheet(); } + * }); + * + * 2. Rename all class definitions '.ContentFlowAddOn_DEFAULT' to + * '.ContentFlowAddOn_ADDONNAME'. + * Where ADDONNAME is the name of your AddOn. + * + * 3. Make the changes you like + * + * 4. Reload your page :-) + * + */ + +/* ========== ContentFlow ========== */ +/* + * Within this file you can adjust the styling of ContentFlow + * to your personal needs. The default styling is the same as found on the + * project page. + * + */ + +.ContentFlowAddOn_DEFAULT { +} + + /* ----- styling of items ----- */ + .ContentFlowAddOn_DEFAULT .flow .item.active { + cursor: pointer; + } + .ContentFlowAddOn_DEFAULT .flow .item .caption { + font-size: 100%; + font-weight: bold; + text-align: center; + color: white; + max-height: 30%; + bottom: 10%; + background: url(img/1x1_0.5_black.png); + width: 100%; + } + * html .ContentFlowAddOn_DEFAULT .flow .item .caption { + background-image: none; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_black.png'); + } + .ContentFlowAddOn_DEFAULT .flow .item .caption a, + .ContentFlowAddOn_DEFAULT .flow .item .caption a:link, + .ContentFlowAddOn_DEFAULT .flow .item .caption a:visited, + .ContentFlowAddOn_DEFAULT .flow .item .caption a:active, + .ContentFlowAddOn_DEFAULT .flow .item .caption a:hover { + text-decoration: none; + color: white; + font-style: italic; + font-size: 0.8em; + } + .ContentFlowAddOn_DEFAULT .flow .item .caption a:hover { + text-decoration: underline; + } + .ContentFlowAddOn_DEFAULT .flow .item.active .caption { + /*display: block;*/ /* uncomment to show caption inside item */ + } + + /* ----- scrollbar ----- */ + .ContentFlowAddOn_DEFAULT .scrollbar { + width: 50%; + margin: 0px auto; + height: 16px; + background: url(img/scrollbar_white.png) left center repeat-x; + position: relative; + } + + .ContentFlowAddOn_DEFAULT .scrollbar .slider { + width: 16px; + height: 16px; + background: url(img/slider_white.png) center center no-repeat; + } + + /* only for IE <= 6 and a alphatransparent slider image */ + * html .ContentFlow .scrollbar .slider { background-image: none; } + * html .ContentFlow .scrollbar .slider .virtualSlider { + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='img/slider_white.png'); + } + + .ContentFlowAddOn_DEFAULT .scrollbar .slider .position { + top: 120%; + font-size: 16px; + font-weight: bold; + color: silver + } + + /* ----- global caption ----- */ + .ContentFlowAddOn_DEFAULT .globalCaption { + text-align: center; + font-weight: bold; + color: white; + font-size: 14px; + height: 20px; + margin: 2em auto; + } + .ContentFlowAddOn_DEFAULT .globalCaption .caption { + } + .ContentFlowAddOn_DEFAULT .globalCaption .caption a, + .ContentFlowAddOn_DEFAULT .globalCaption .caption a:link, + .ContentFlowAddOn_DEFAULT .globalCaption .caption a:visited, + .ContentFlowAddOn_DEFAULT .globalCaption .caption a:active, + .ContentFlowAddOn_DEFAULT .globalCaption .caption a:hover { + text-decoration: none; + color: white; + font-style: italic; + font-size: 0.8em; + } + + .ContentFlowAddOn_DEFAULT .globalCaption .caption a:hover { + text-decoration: underline; + } + + /* ----- load indicator ----- */ + .ContentFlowAddOn_DEFAULT .loadIndicator { + width: 100%; + height: 100%; + top: 0px; + left: 0px; + background: url(img/1x1_0.5_black.png); + } + * html .ContentFlowAddOn_DEFAULT .loadIndicator { + background-image: none; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_black.png'); + } + .ContentFlowAddOn_DEFAULT .loadIndicator .indicator { + background: url(img/loader.gif) center center no-repeat; + width: 100%; + height: 100%; + } + +/* ================================= */ diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.js b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.js new file mode 100755 index 0000000..599f751 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/ContentFlowAddOn_DEFAULT.js @@ -0,0 +1,290 @@ +/* ContentFlowAddOn_DEFAULT, version 1.0.0 + * (c) 2008 - 2010 Sebastian Kutsch + * + * + * This file is distributed under the terms of the MIT license. + * (see http://www.jacksasylum.eu/ContentFlow/LICENSE) + */ + +/* + * This is an example file of an AddOn file and will not be used by ContentFlow. + * All values are the default values of ContentFlow. + * + * To create a new AddOn follow this guideline: + * (replace ADDONNAME by the name of your AddOn) + * + * 1. rename this file to ContentFlowAddOn_ADDONNAME.js + * 2. Change the string 'DEFAULT' in the 'new ContentFlowAddOn' line to 'ADDONNAME' + * 3. Make the changes you like/need + * 4. Remove all settings you do not need (or comment out for testing). + * 5. Add 'ADDONNAME' to the load attribute of the ContentFlow script tag in your web page + * 6. Reload your page :-) + * + */ +new ContentFlowAddOn ('DEFAULT', { + + /* + * AddOn configuration object, defining the default configuration values. + */ + conf: {}, + + /* + * This function will be executed on creation of this object (on load of this file). + * It's mostly intended to automatically add additional stylesheets and javascripts. + * + * Object helper methods and parameters: + * scriptpath: basepath of this AddOn (without the filename) + * addScript(path): adds a javascript-script tag to the head with the src set to 'path' + * i.e. this.addScript(scriptpath+"MyScript.js") . + * + * addStylesheet(path): adds a css-stylesheet-link tag to the head with href set to + * 'path' i.e. this.addStylesheet(scriptpath+"MyStylesheet.css") . + * If path is omittet it defaults to : + * scriptpath+'ContentFlowAddOn_ADDONNAME.css'. + * + */ + init: function() { + // this.addScript(); + // this.addStylesheet(); + }, + + /* + * This method will be executed for each ContentFlow on the page after the + * HTML document is loaded (when the whole DOM exists). You can use it to + * add elements automatically to the flow. + * + * flow: the DOM object of the ContentFlow + * flow.Flow: the DOM object of the 'flow' element + * flow.Scrollbar: the DOM object of the 'scrollbar' element + * flow.Slider: the DOM object of the 'slider' element + * flow.globalCaption: the DOM object of the 'globalCaption' element + * + * You can access also all public methods of the flow by 'flow.METHOD' (see documentation). + */ + onloadInit: function (flow) { + }, + + /* + * This method will be executed _after_ the initialization of each ContentFlow. + */ + afterContentFlowInit: function (flow) { + }, + /* + * ContentFlow configuration. + * Will overwrite the default configuration (or configuration of previously loaded AddOns). + * For a detailed explanation of each value take a look at the documentation. + */ + ContentFlowConf: { + loadingTimeout: 30000, // milliseconds + activeElement: 'content', // item or content + + maxItemHeight: 0, // 0 == auto, >0 max item height in px + scaleFactor: 1.0, // overall scale factor of content + scaleFactorLandscape: 1.33, // scale factor of landscape images ('max' := height= maxItemHeight) + scaleFactorPortrait: 1.0, // scale factor of portraoit and square images ('max' := width = item width) + fixItemSize: false, // don't scale item size to fit image, crop image if bigger than item + relativeItemPosition: "top center", // align top/above, bottom/below, left, right, center of position coordinate + + circularFlow: true, // should the flow wrap around at begging and end? + verticalFlow: false, // turn ContentFlow 90 degree counterclockwise + visibleItems: -1, // how man item are visible on each side (-1 := auto) + endOpacity: 1, // opacity of last visible item on both sides + startItem: "center", // which item should be shown on startup? + scrollInFrom: "pre", // from where should be scrolled in? + + flowSpeedFactor: 1.0, // how fast should it scroll? + flowDragFriction: 1.0, // how hard should it be be drag the floe (0 := no dragging) + scrollWheelSpeed: 1.0, // how fast should the mouse wheel scroll. nagive values will revers the scroll direction (0:= deactivate mouse wheel) + keys: { // key => function definition, if set to {} keys ar deactivated + 13: function () { this.conf.onclickActiveItem(this._activeItem) }, + 37: function () { this.moveTo('pre') }, + 38: function () { this.moveTo('visibleNext') }, + 39: function () { this.moveTo('next') }, + 40: function () { this.moveTo('visiblePre') } + }, + + reflectionColor: "transparent", // none, transparent, overlay or hex RGB CSS style #RRGGBB + reflectionHeight: 0.5, // float (relative to original image height) + reflectionGap: 0.0, // gap between the image and the reflection + + + /* + * ==================== helper and calculation methods ==================== + * + * This section contains all user definable methods. With thees you can + * change the behavior and the visual effects of the flow. + * For an explanation of each method take a look at the documentation. + * + * BEWARE: All methods are bond to the ContentFlow!!! + * This means that the keyword 'this' refers to the ContentFlow + * which called the method. + */ + + /* ==================== actions ==================== */ + + /* + * called after the inactive item is clicked. + */ + onclickInactiveItem : function (item) {}, + + /* + * called after the active item is clicked. + */ + onclickActiveItem: function (item) { + var url, target; + + if (url = item.content.getAttribute('href')) { + target = item.content.getAttribute('target'); + } + else if (url = item.element.getAttribute('href')) { + target = item.element.getAttribute('target'); + } + else if (url = item.content.getAttribute('src')) { + target = item.content.getAttribute('target'); + } + + if (url) { + if (target) + window.open(url, target).focus(); + else + window.location.href = url; + } + }, + + /* + * called when an item becomes inactive. + */ + onMakeInactive: function (item) {}, + + /* + * called when an item becomes active. + */ + onMakeActive: function (item) {}, + + /* + * called when the target item/position is reached + */ + onReachTarget: function(item) {}, + + /* + * called when a new target is set + */ + onMoveTo: function(item) {}, + + /* + * called each item an item is drawn (after scaling and positioning) + */ + onDrawItem: function(item) {}, + + /* + * called if the pre-button is clicked. + */ + onclickPreButton: function (event) { + this.moveToIndex('pre'); + Event.stop(event); + }, + + /* + * called if the next-button is clicked. + */ + onclickNextButton: function (event) { + this.moveToIndex('next'); + Event.stop(event); + }, + + /* ==================== calculations ==================== */ + + /* + * calculates the width of the step. + */ + calcStepWidth: function(diff) { + var vI = this.conf.visibleItems; + var items = this.items.length; + items = items == 0 ? 1 : items; + if (Math.abs(diff) > vI) { + if (diff > 0) { + var stepwidth = diff - vI; + } else { + var stepwidth = diff + vI; + } + } else if (vI >= this.items.length) { + var stepwidth = diff / items; + } else { + var stepwidth = diff * ( vI / items); + } + return stepwidth; + }, + + + /* + * calculates the size of the item at its relative position x + * + * relativePosition: Math.round(Position(activeItem)) - Position(item) + * side: -1, 0, 1 :: Position(item)/Math.abs(Position(item)) or 0 + * returns a size object + */ + calcSize: function (item) { + var rP = item.relativePosition; + + var h = 1/(Math.abs(rP)+1); + var w = h; + return {width: w, height: h}; + }, + + /* + * calculates the position of an item within the flow depending on it's relative position + * + * relativePosition: Math.round(Position(activeItem)) - Position(item) + * side: -1, 0, 1 :: Position(item)/Math.abs(Position(item)) or 0 + */ + calcCoordinates: function (item) { + var rP = item.relativePosition; + //var rPN = item.relativePositionNormed; + var vI = this.conf.visibleItems; + + var f = 1 - 1/Math.exp( Math.abs(rP)*0.75); + var x = item.side * vI/(vI+1)* f; + var y = 1; + + return {x: x, y: y}; + }, + + /* + * calculates the position of an item relative to it's calculated coordinates + * x,y = 0 ==> center of item has the position calculated by + * calculateCoordinates + * + * relativePosition: Math.round(Position(activeItem)) - Position(item) + * side: -1, 0, 1 :: Position(item)/Math.abs(Position(item)) or 0 + * size: size object calculated by calcSize + */ + calcRelativeItemPosition: function (item) { + var x = 0; + var y = -1; + return {x: x, y: y}; + }, + + /* + * calculates and returns the relative z-index of an item + */ + calcZIndex: function (item) { + return -Math.abs(item.relativePositionNormed); + }, + + /* + * calculates and returns the relative font-size of an item + */ + calcFontSize: function (item) { + return item.size; + }, + + /* + * calculates and returns the opacity of an item + */ + calcOpacity: function (item) { + return Math.max(1 - ((1 - this.conf.endOpacity ) * Math.sqrt(Math.abs(item.relativePositionNormed))), this.conf.endOpacity); + } + + } + +}); diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/LICENSE b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/LICENSE new file mode 100755 index 0000000..fb0b0df --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2007 - 2010 Sebastian Kutsch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/changelog.html b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/changelog.html new file mode 100755 index 0000000..6e0ad7f --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/changelog.html @@ -0,0 +1,291 @@ + + + + + + + +

+

version 1.0.0

+ + + +
+ContenFolw ChangeLog
+====================
+
+version 1.0 (2010/02/09)
+-------------------------
+
+ Beware: Because of a major restructuring, this release will break with older
+         AddOns and possibly with user defined configurations. If you have
+         defined your own calculation methods (calcSize, calcCoordinates,
+         calcRelativeItemPosition, calcZIndex or calcFontSize) you have to
+         rework them.
+         If you use AddOns please update to the new version of the AddOn.
+
+ * moved to relative return values for the following methods:
+   calcSize := returns values ranging from 0.0 - 1.0
+   calcCoordinates := returns values ranging from -1.0 to 1.0
+   calcRelativeItemPosition := returns values ranging from -1.0 to 1.0
+
+ * changed the paramters of the following methods:
+   calcStepWidth   : ( diff )
+   calcSize        : ( item )
+   calcCoordinates : ( item )
+   calcRelativeItemPosition : ( item )
+   calcZIndex      : ( item )
+   calcFontSize    : ( item )
+
+ * added the following properties to the item object:
+   next, position, pre, relativePosition, relativePositionNormed, side, size
+
+ * better image scaling in IE7 (bicubic interpolation)
+
+ * changed landscapeScaleFactor default value to 1.33
+
+ * moved from 20 to 25 redraws/recalculations/frames per second
+
+ * refined calculation of flow size
+
+ * speedup by internel code cleanup
+
+ * unified AddOn configuration
+
+ * renamed 'container' to 'Container'
+
+ * documentation update
+
+
+ * addeded direct usage of image tags as items
+
+ * added support for transparent PNGs on IE6
+
+ * added touch handling on iPhone
+   Dragging of the whole Flow and the scrollbar works now on the iPhone
+
+ * added onDrawItem method
+
+ * added fluid opacity change
+   - option: endOpacity
+   - method: calcOpacity
+
+ * added fixItemSize option
+
+ * added reflectionGap option
+
+ * added scaleFactorPortrait option
+
+ * automatic scrolling to item will now be supressed if the onclickInactiveItem
+   method returns 'false'
+
+ * added conf object to flow
+
+
+ * removed server side reflections
+   - removed reflectionType option
+     reflectionHeight = 0 deactivetes the reflection
+   - removed negativeMarginOnFloat option
+   - removed reflectionServerSrc option
+
+ * removed obsolete contentPosition option
+
+
+ * fixed FF drag problem
+
+ * fixed addItem method
+
+ * fixed rmItem method
+
+
+
+version 0.7.2 (2009/10/01)
+-------------------------
+ * fixed possible conflict with jquery, prototype
+ * fixed Konqueror 4 init bug
+ * fixed iPhone init bug
+ * fixed IE 6,7,8 / mootools compatibility
+   thanks to Michael Birchler
+ * fixed IE6 scalefactor bug
+ * simplified internal click event handling
+ * added 'return' key to call the onclickActiveItem method
+
+version 0.7 (2009/04/09)
+------------------------
+ Beware: Because of a major restructuring, this release will break with older
+         AddOns and possibly with user defined configurations. If you have
+         defined your own methods (i.e. calcCoordinates or onclickActiveItem)
+         you have to move the definitions into the configuration object.
+         If you use AddOns please update to the new version of the AddOn.
+
+         In any other case you can use the new version without any modification.
+
+ * moved user definable method definitions to configuration
+ * speedup by reducing number of calculations
+ * flow element will now be centered within ContentFlow element
+ * better handling of large images by Canvas supporting Browsers (all except IE)
+ * removed reflectionOverlay option
+ * removed set* methods to set methods
+ * removed getConfig method
+ * added cursermove style to slider
+ * added "left" and "right" to position keywords (same as 'pre' and 'next')
+
+ * added optional 'useAddOns' attribute to ContentFlow (X)HTML element
+ * added optional deactivation of mousewheel
+ * added revers mousewheel scrolling
+ * added optional deactivation of keyboard
+ * added optional deactivation of drag 'n throw
+
+ * added keys option
+ * added verticalFlow option
+ * added contentPosition option
+ * added relativeItemPosition option
+
+ * added onReachTarget method
+ * added onMoveTo method
+ * added onMakeInactive method
+ * added onclickInactiveItem method
+
+ * fixed reload bug in Firefox 3 (Gecko 1.9)
+ * fixed keyboard actions on FireFox (Gecko) and Safari (WebKit)
+ * fixed refelctions on iPhone
+ * fixed bug in moveTo method
+ * fixed item positioning
+ * fixed bug if 'scrollInFrom' was set to 'none'
+ * fixed disappearing position label
+
+ * structure cleanup
+
+
+version 0.6 (2008/09/27)
+------------------------
+ This release contains major changes and could break with previous versions.
+ But most times it can be used as a drop-in replacement.
+
+ * added AddOn System
+
+ * handles now 'href' and 'target' attributes of 'item' and 'content' items
+   by default
+
+ * will respect style-height attributes of ContentFlow and flow elements
+   (has to be defined on the element it self)
+
+ * moved fancyScrollbar to AddOn
+
+ * added optional 'label' element to item (will be used as slider label)
+   (great for time lines)
+
+ * scrollbar will be hidden until loader is hidden
+
+ * default loader height fixed
+
+ * switched from array based structure to object based structure for items
+
+ * switched from index based calculations to global position based calculations
+
+ * merged mycontentflow.css into contentflow.css and and added mycontentflow.css.example
+
+ * new Initialization System
+   - init when DOM is fully loaded
+   - auto init of flows
+   - auto loading of stylesheets
+   - auto load of AddOns
+   - background init of images
+
+ * changed calculation methods
+   - added calcCoordinates
+   - added calcRelativeItemPosition
+   - removed calcPosition
+
+ * new methods
+   - onMakeActive
+   - onclickPreButton
+   - onclickNextButton
+
+ * new options
+   - useAddOns
+   - circularFlow
+   - activeElement
+
+ * enhanced options
+   - added scaleFactorLandscape option value "max"
+   - flowDragFriction deactivates drag 'n throw if set to '0'
+   - scrollWheelSpeed deactivates scrollwheel if set to '0'
+
+ * internal restructuring and cleanup
+
+ * removed unneeded images
+
+ * switched to yuicompressor for javascript compression
+
+ * squashed many bugs
+
+
+version 0.5.3 (2008/05/22)
+------------------------
+ * resize bug fixed
+ * renamed maxHeight configuration option to maxItemHeight
+
+version 0.5.2 (2008/05/21)
+------------------------
+ * bugfixes
+
+version 0.5.1 (2008/05/18)
+------------------------
+ * bugfixes
+
+version 0.5 (2008/05/18)
+------------------------
+ * if reflections are used images scale nicer and scrolling is more fluid
+   in Firefox, Safari and Opera (or any other browser which knows about 'canvas')
+ * added fancy scrollbar (with pre and next button)
+ * added maxHeight conf property
+   (if set content will be scaled depending on maxHeight)
+ * moveTo method can handle keywords like 'pre', 'next', 'start' or 'end'
+ * code cleanup
+
+version 0.4 (2008/02/12)
+------------------------
+ * dynamically add and remove items !
+ * caption of item is now optional
+ * added setter for: clickActiveItem, calcSize, calcPosition, calcZIndex, calcFontSize
+ * added getter for: config, activeItem, numberOfItems
+ * squashed some bugs
+ * some clean up
+
+version 0.3 (2008/01/26)
+------------------------
+ * revamp of reflection handling:
+   - added client side reflection generation !!!
+     YES! Browser generated reflections without flash!
+   - bedder handling of reflection sizes
+   - bedder handling of server side reflection sources
+   - bedder handling of overlays in IE6
+   - removed unneeded options
+   - added more flexible options
+   - fix positioning of items in IE6
+ * fixed resize event handling in IE
+ * fixed slider-position element handling in IE6
+ * fixed some minor bugs
+
+version 0.2 (2008/01/22)
+------------------------
+ * handles now node-object and node-id string on object creation
+ * configuration options are now given as configuration object
+ * auto initialization on window load
+ * auto detection of usage of load indicator, global caption and scrollbar
+ * removed obsolete configuration options
+ * minor cleanups
+
+version 0.1 (2008/01/10)
+------------------------
+ * initial release
+
+
diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.css b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.css new file mode 100755 index 0000000..e97ef6a --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.css @@ -0,0 +1 @@ +.ContentFlow .flow .item canvas.content{height:100%;width:100%}.ContentFlow .flow .item.active{cursor:pointer}.ContentFlow .flow .item .caption{font-size:100%;font-weight:700;text-align:center;color:#FFF;max-height:30%;bottom:10%;background:url(img/1x1_0.5_black.png);width:100%;position:absolute;display:none}* html .ContentFlow .flow .item .caption{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_black.png')}.ContentFlow .scrollbar{width:50%;height:16px;background:url(img/scrollbar_white.png) left center repeat-x;overflow:visible;position:relative;z-index:1;visibility:hidden;margin:10px auto 0}.ContentFlow .scrollbar .slider{width:16px;height:16px;background:url(img/slider_white.png) center center no-repeat;cursor:move;position:absolute}* html .ContentFlow .scrollbar .slider{background-image:none}* html .ContentFlow .scrollbar .slider .virtualSlider{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='img/slider_white.png');height:100%}.ContentFlow .scrollbar .slider .position{top:120%;font-size:16px;font-weight:700;color:silver;position:absolute;text-align:center}.ContentFlow .globalCaption{text-align:center;font-weight:700;color:#FFF;font-size:14px;height:20px;position:relative;z-index:1;margin:2em auto}.ContentFlow .loadIndicator{width:100%;height:100%;top:0;left:0;background:#000;position:absolute;z-index:65000}.ContentFlow .loadIndicator .indicator{background:url(img/loader.gif) center center no-repeat;width:100%;height:100%}* html .ContentFlow .loadIndicator .indicator{height:100px}.ContentFlow{position:relative;overflow:hidden}.ContentFlow *{margin:0;padding:0}.ContentFlow img{-ms-interpolation-mode:bicubic}.ContentFlow .mouseoverCheckElement{position:absolute;width:0;height:0;left:0;visibility:hidden}.ContentFlow:hover .mouseoverCheckElement{left:1px}.ContentFlow .flow{position:relative;z-index:0;visibility:hidden;width:100%;margin:0 auto}.ContentFlow .flow.hidden{visibility:hidden}.ContentFlow .flow .item{position:absolute;visibility:hidden;top:0;left:0}.ContentFlow .flow .item div.content{width:100%;height:100%}.ContentFlow .flow .item .label{display:none}.ContentFlow .flow .item canvas.reflection{margin-top:-1px}.ContentFlow .flow .item img.content,.ContentFlow .flow .item img.reflection,.ContentFlow .flow .item canvas.reflection{width:100%}.ContentFlow .flow .item .caption a,.ContentFlow .flow .item .caption a:link,.ContentFlow .flow .item .caption a:visited,.ContentFlow .flow .item .caption a:active,.ContentFlow .flow .item .caption a:hover,.ContentFlow .globalCaption .caption a,.ContentFlow .globalCaption .caption a:link,.ContentFlow .globalCaption .caption a:visited,.ContentFlow .globalCaption .caption a:active,.ContentFlow .globalCaption .caption a:hover{color:#FFF;font-size:0.8em;font-style:italic;text-decoration:none}.ContentFlow .flow .item .caption a:hover,.ContentFlow .globalCaption .caption a:hover{text-decoration:underline}.ContentFlow .flow .item .content,.ContentFlow .flow .item .reflection{display:block} diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.js b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.js new file mode 100755 index 0000000..8e7a18b --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/lib/contentflow/contentflow.js @@ -0,0 +1,2 @@ +/* ContentFlow, version 1.0.0 | (c) 2007 - 2010 Sebastian Kutsch | | ContentFlow is distributed under the terms of the MIT license. | (see http://www.jacksasylum.eu/ContentFlow/LICENSE) */ +var ContentFlowGlobal={Flows:new Array,AddOns:{},scriptName:"contentflow.js",scriptElement:null,Browser:new (function(){this.Opera=window.opera?true:false;this.IE=document.all&&!this.Opera?true:false;this.IE6=this.IE&&typeof (window.XMLHttpRequest)=="undefined"?true:false;this.IE8=this.IE&&typeof (document.querySelectorAll)!="undefined"?true:false;this.IE7=this.IE&&!this.IE6&&!this.IE8?true:false;this.WebKit=/WebKit/i.test(navigator.userAgent)?true:false,this.iPhone=/iPhone|iPod/i.test(navigator.userAgent)?true:false;this.Chrome=/Chrome/i.test(navigator.userAgent)?true:false;this.Safari=/Safari/i.test(navigator.userAgent)&&!this.Chrome?true:false;this.Konqueror=navigator.vendor=="KDE"?true:false;this.Konqueror4=this.Konqueror&&/native code/.test(document.getElementsByClassName)?true:false;this.Gecko=!this.WebKit&&navigator.product=="Gecko"?true:false;this.Gecko19=this.Gecko&&Array.reduce?true:false})(),getAddOnConf:function(A){if(this.AddOns[A]){return this.AddOns[A].conf}else{return{}}},setAddOnConf:function(B,A){this.AddOns[B].setConfig(A)},getScriptElement:function(D){var C=new RegExp(D);var A=document.getElementsByTagName("script");for(var B=0;B<\/script>')}else{var A=document.createElement("script");A.src=B;A.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(A)}},addScripts:function(C,B){for(var A=0;A')}},addStylesheets:function(C,B){for(var A=0;A<\/script>");var B=document.getElementById("__ie_cf_onload");B.onreadystatechange=function(){if(this.readyState=="complete"){E.onloadInit()}}}}window.addEvent("load",E.onloadInit,false)},onloadInit:function(){if(arguments.callee.done){return }for(var C=0;C0){this.addReflection()}this.initClick()}.bind(this);if(this.content.complete&&this.content.width>0){G()}else{this.content.onload=G}}else{this.initClick()}};ContentFlowItem.prototype={Browser:ContentFlowGlobal.Browser,makeActive:function(){this.element.addClassName("active");this.CFobj.conf.onMakeActive(this)},makeInactive:function(){this.element.removeClassName("active");this.CFobj.conf.onMakeInactive(this)},initClick:function(){var A=this.clickItem;this[this._activeElement].addEvent("click",A,false)},setImageFormat:function(A){if(this.Browser.IE6||this.Browser.IE7){A.style.width="auto"}A.origProportion=A.width/A.height;A.setAttribute("origProportion",A.width/A.height);if(this.Browser.IE6||this.Browser.IE7){A.style.width=""}if(A.origProportion<=1){A.addClassName("portray")}else{A.addClassName("landscape")}},addReflection:function(){var F=this.CFobj;var S;var K=this.content;if(this.Browser.IE){var Q="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";if(F._reflectionColorRGB){if(F.conf.reflectionColor=="transparent"){var N=S=this.reflection=document.createElement("img");S.src=K.src}else{S=this.reflection=document.createElement("div");var N=document.createElement("img");N.src=K.src;S.width=N.width;S.height=N.height;N.style.width="100%";N.style.height="100%";var M=F._reflectionColorRGB;S.style.backgroundColor="#"+M.hR+M.hG+M.hB;S.appendChild(N)}Q+=" progid:DXImageTransform.Microsoft.Alpha(opacity=0, finishOpacity=50, style=1, finishX=0, startY="+F.conf.reflectionHeight*100+" finishY=0)"}else{var N=S=this.reflection=document.createElement("img");S.src=K.src}Q+=" progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22="+1/F.conf.reflectionHeight+")";if(ContentFlowGlobal.Browser.IE6){if(K.src.match(/\.png$/)){K.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";K.filterString="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";Q+=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";K.origSrc=K.src;K.src="img/blank.gif";N.src="img/blank.gif"}}S.filterString=Q;N.style.filter=Q}else{if(F._reflectionWithinImage){var D=this.canvas=$CF(document.createElement("canvas"))}else{var D=S=this.reflection=document.createElement("canvas")}if(D.getContext){if(F._reflectionWithinImage){for(var R=0;RC){if(D>0){var B=D-C}else{var B=D+C}}else{if(C>=this.items.length){var B=D/A}else{var B=D*(C/A)}}return B},calcSize:function(D){var B=D.relativePosition;var C=1/(Math.abs(B)+1);var A=C;return{width:A,height:C}},calcCoordinates:function(C){var B=C.relativePosition;var E=this.conf.visibleItems;var D=1-1/Math.exp(Math.abs(B)*0.75);var A=C.side*E/(E+1)*D;var F=1;return{x:A,y:F}},calcZIndex:function(A){return -Math.abs(A.relativePositionNormed)},calcFontSize:function(A){return A.size.height},calcOpacity:function(A){return Math.max(1-((1-this.conf.endOpacity)*Math.sqrt(Math.abs(A.relativePositionNormed))),this.conf.endOpacity)}},_checkIndex:function(A){A=Math.max(A,0);A=Math.min(A,this.itemsLastIndex);return A},_setLastIndex:function(){this.itemsLastIndex=this.items.length-1},_getItemByIndex:function(A){return this.items[this._checkIndex(A)]},_getItemByPosition:function(A){return this._getItemByIndex(this._getIndexByPosition(A))},_getPositionByIndex:function(B){if(!this.conf.circularFlow){return this._checkIndex(B)}var A=this._getIndexByPosition(this._currentPosition);var C=B-A;if(Math.abs(C)>C+this.items.length){C+=this.items.length}else{if(Math.abs(C)>(Math.abs(C-this.items.length))){C-=this.items.length}}return this._currentPosition+C},_getIndexByPosition:function(A){if(A<0){var C=0}else{var C=1}var B=(Math.round(A)+C)%this.items.length;if(B>0){B-=C}else{if(B<0){B+=this.items.length-C}else{if(A<0){B=0}else{B=this.items.length-1}}}return B},_getIndexByKeyWord:function(B,D,A){if(D){var C=D}else{if(this._activeItem){var C=this._activeItem.index}else{var C=0}}if(isNaN(B)){switch(B){case"first":case"start":C=0;break;case"last":case"end":C=this.itemsLastIndex;break;case"middle":case"center":C=Math.round(this.itemsLastIndex/2);break;case"right":case"next":C+=1;break;case"left":case"pre":case"previous":C-=1;break;case"visible":case"visiblePre":case"visibleLeft":C-=this.conf.visibleItems;break;case"visibleNext":case"visibleRight":C+=this.conf.visibleItems;break;default:C=C}}else{C=B}if(A!=false){C=this._checkIndex(C)}return C},_setCaptionLabel:function(A){if(this.Position&&!this.Slider.locked){this.Position.setLabel(A)}this._setGlobalCaption()},getAddOnConf:function(A){return ContentFlowGlobal.getAddOnConf(A)},setAddOnConf:function(B,A){ContentFlowGlobal.setAddOnConf(B,A)},init:function(){if(this.isInit){return }this._init()},setConfig:function(A){if(!A){return }var E=this._defaultConf;for(var F in A){if(E[F]=="undefined"){continue}switch(F){case"scrollInFrom":case"startItem":if(typeof (A[F])=="number"||typeof (A[F])=="string"){this.conf[F]=A[F]}break;default:if(typeof (E[F]==A[F])){if(typeof A[F]=="function"){this.conf[F]=A[F].bind(this)}else{this.conf[F]=A[F]}}}}switch(this.conf.reflectionColor){case this.conf.reflectionColor.search(/#[0-9a-fA-F]{6}/)>=0?this.conf.reflectionColor:this.conf.reflectionColor+"x":this._reflectionColorRGB={hR:this.conf.reflectionColor.slice(1,3),hG:this.conf.reflectionColor.slice(3,5),hB:this.conf.reflectionColor.slice(5,7),iR:parseInt(this.conf.reflectionColor.slice(1,3),16),iG:parseInt(this.conf.reflectionColor.slice(3,5),16),iB:parseInt(this.conf.reflectionColor.slice(5,7),16)};break;case"none":case"transparent":default:this._reflectionColor="transparent";this._reflectionColorRGB={hR:0,hG:0,hB:0,iR:0,iG:0,iB:0};break}if(this.items){if(this.conf.visibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1)}if(this.conf.relativeItemPosition){var C={x:{left:function(J){return -1},center:function(J){return 0},right:function(J){return 1}},y:{top:function(J){return -1},center:function(J){return 0},bottom:function(J){return 1}}};var I=this.conf.relativeItemPosition;I=I.replace(/above/,"top").replace(/below/,"bottom");var H,G=null;H=I.match(/left|right/);G=I.match(/top|bottom/);c=I.match(/center/);if(!H){if(c){H="center"}else{H="center"}}if(!G){if(c){G="center"}else{G="top"}}var D=C.x[H];var B=C.y[G];this.conf.calcRelativeItemPosition=function(K){var J=D(K.size);var L=B(K.size);return{x:J,y:L}};this.conf.relativeItemPosition=null}if(this._reflectionType&&this._reflectionType!="clientside"){this.conf.reflectionHeight=0}},getItem:function(A){return this.items[this._checkIndex(Math.round(A))]},getActiveItem:function(){return this._activeItem},getNumberOfItems:function(){return this.items.length},resize:function(){this._initSizes();this._initStep()},moveToPosition:function(B,A){if(!this.conf.circularFlow){B=this._checkIndex(B)}this._targetPosition=B;this.conf.onMoveTo(this._getItemByPosition(B));this._initStep(false,A)},moveToIndex:function(A){this._targetPosition=Math.round(this._getPositionByIndex(this._getIndexByKeyWord(A,this._activeItem.index,!this.conf.circularFlow)));this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep()},moveToItem:function(B){var A;if(B.itemIndex){A=B.itemIndex}else{A=B.index}this.moveToIndex(A)},moveTo:function(A){if(typeof A=="object"){this.moveToItem(A)}else{if(isNaN(A)||(A==Math.floor(A)&&A0){K.pre=this.items[G-1];K.pre.next=K}}this._setLastIndex();if(this.conf.circularFlow&&this.items.length>0){var L=this.items[0];L.pre=this.items[this.items.length-1];L.pre.next=L}this._initGUI();if(this._activeElement!="content"){this._activeElement="element"}if(this.conf.visibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1);this._targetPosition=this._getIndexByKeyWord(this.conf.startItem,0);var I=this._getIndexByKeyWord(this.conf.scrollInFrom,this._targetPosition);switch(this.conf.scrollInFrom){case"next":case"right":I-=0.5;break;case"pre":case"previous":case"left":I+=0.5;break}this._currentPosition=I;var E=new Date();var D=this;var C=window.setInterval(function(){if(D._imagesToLoad==0||new Date()-E>D._loadingTimeout){clearInterval(C);D._activeItem=D.getItem(D._currentPosition);if(D._activeItem){D._activeItem.makeActive();D._setCaptionLabel(D._activeItem.index)}D.Flow.style.visibility="visible";if(D.loadIndicator){D.loadIndicator.style.display="none"}if(D.Scrollbar){D.Scrollbar.style.visibility="visible"}D.resize();for(var O=0;O0){L(O)}})}else{window.addEvent("keydown",function(O){if(D.offsetLeft>0){L(O)}})}}else{this.Container.addEvent("keydown",L)}}else{this.Container.onkeydown=L}}if(this.conf.flowDragFriction>0){var E=function(R){var U=R;if(R.touches){U=R.touches[0]}var Q=U.clientX;var P=U.clientY;if(this.conf.verticalFlow){var V=P-this.Flow.mouseY;var T=this.Flow.dimensions.height}else{var V=Q-this.Flow.mouseX;var T=this.Flow.dimensions.width}var O=(V/T)*(2*this.conf.visibleItems+1);var S=this._currentPosition-O*2*this.conf.visibleItems/this.conf.flowDragFriction;this.Flow.mouseX=Q;this.Flow.mouseY=P;this.moveToPosition(S,true)}.bind(this);var N=function(){};var H=function(P){var O=Math.round(this._targetPosition);if(Math.abs(O-this._currentPosition)>0.001){this.moveToPosition(O)}}.bind(this);this.Flow.makeDraggable(E,N,H)}if(this.Scrollbar){var M=function(R){if(!R){var R=window.event}if(!this.Scrollbar.clickLocked){var Q=R.clientX;var P=Q-this.Scrollbar.position.left;var O=Math.round(P/this.Scrollbar.dimensions.width*this.itemsLastIndex);this.moveToIndex(O)}else{this.Scrollbar.clickLocked=false}}.bind(this);this.Scrollbar.addObserver("click",M)}if(this.Slider){if(this.Browser.IE6){var B=document.createElement("div");B.className="virtualSlider";this.Slider.appendChild(B)}this.Slider.setPosition=function(O){O=O-Math.floor(O)+this._getIndexByPosition(Math.floor(O));if(Math.round(O)<0){O=this.itemsLastIndex}else{if(O<=0){O=0}else{if(Math.round(O)>this.itemsLastIndex){O=0}else{if(O>=this.itemsLastIndex){O=this.itemsLastIndex}}}}if(this.items.length>1){var P=(O/this.itemsLastIndex)*this.Scrollbar.dimensions.width}else{var P=0.5*this.Scrollbar.dimensions.width}this.Slider.style.left=P-this.Slider.center.x+"px";this.Slider.style.top=this.Scrollbar.center.y-this.Slider.center.y+"px"}.bind(this);var N=function(O){this.Scrollbar.clickLocked=true}.bind(this);var E=function(P){var Q=P;if(P.touches){Q=P.touches[0]}var O=this._checkIndex((Q.clientX-this.Scrollbar.position.left)/this.Scrollbar.dimensions.width*this.itemsLastIndex);this._targetPosition=this._getPositionByIndex(O);this.Slider.setPosition(O);if(this.Position){this.Position.setLabel(O)}this._initStep(true,true)}.bind(this);var H=function(O){this._targetPosition=Math.round(this._targetPosition);this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep(true)}.bind(this);this.Slider.makeDraggable(E,N,H)}if(this.Position){this.Position.setLabel=function(O){O=this._checkIndex(Math.round(O));if(this.items&&this.items[O].label){this.Position.innerHTML=this.items[O].label.innerHTML}else{this.Position.innerHTML=O+1}}.bind(this)}this.globalCaption=this.Container.getChildrenByClassName("globalCaption")[0];this.loadIndicator=this.Container.getChildrenByClassName("loadIndicator")[0]},_initSizes:function(A){this._initMaxHeight();var E=this._initScrollbarSize();if(!this.conf.verticalFlow&&this.Container.style.height&&this.Container.style.height!="auto"){this.maxHeight-=E}if(!this._activeItem){return }var D=this._findBiggestItem();var F=this.Flow.findPos();if(this.conf.verticalFlow){this.Flow.style.width=D.width.width+"px";this.Flow.style.height=3*D.width.width*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{this.Flow.style.height=D.height.height+(D.height.top-F.top)+"px"}var C=this.conf.verticalFlow?D.width.width:D.height.height;var B=C/(1+this.conf.reflectionHeight+this.conf.reflectionGap);this.Flow.style.marginBottom=-(C-B)+"px";this.Flow.dimensions=this.Flow.getDimensions();if(!this.Browser.IE6){if(this.conf.verticalFlow&&this.Container.clientWidthG){G=E}if(H>maxW){maxW=H}}}else{F.innerHTML=" ";G=F.clientHeight;maxW=F.clientWidth}F.innerHTML=K;F.setDimensions();F.style.width=maxW+"px";F.style.left=(I.dimensions.width-maxW)/2+"px";var A=F.position.top-I.position.top;if(A>0){A+=-C.dimensions.height+G;C.style.marginBottom=A+"px"}else{A*=-1;C.style.marginTop=A+"px"}B+=A}}}else{B=0}return B},_initMaxHeight:function(){if(this.conf.verticalFlow){var G=screen.width/screen.height;var D=this.Container.style.width;var E=this.Container.clientWidth;var C=this.Flow.style.width;var F=this.Flow.clientWidth;var A=this.Flow.clientHeight}else{var G=screen.height/screen.width;var D=this.Container.style.height;var E=this.Container.clientHeight;var C=this.Flow.style.height;var F=this.Flow.clientHeight;var A=this.Flow.clientWidth}if(this.ContainerOldDim){D=this.ContainerOldDim}if(this.FlowOldDim){C=this.FlowOldDim}this.ContainerOldDim="auto";this.FlowOldDim="auto";if(this.conf.maxItemHeight<=0){this.maxHeight=A/3*G/1*this.conf.scaleFactor;if(this.conf.verticalFlow&&(this.maxHeight==0||this.maxHeight>F)){this.maxHeight=F}if(D&&D!="auto"){var H=this.conf.verticalFlow?0:this.conf.reflectionGap;var B=this.conf.verticalFlow?0:this.conf.reflectionHeight;this.maxHeight=E/(this.conf.scaleFactor*(1+B+H));this.ContainerOldDim=D}else{if(C&&C!="auto"){var H=this.conf.verticalFlow?0:this.conf.reflectionGap;this.maxHeight=F/(this.conf.scaleFactor*(1+this.conf.reflectionHeight+H));this.FlowOldDim=C}}}else{this.maxHeight=this.conf.maxItemHeight}},_findBiggestItem:function(){var G=this._activeItem;var A=G.pre;var B=G.next;var E=maxFlowSize={width:{width:0,left:0,height:0,top:0,item:null,rI:0},height:{width:0,left:0,height:0,top:0,item:null,rI:0}};var F=function(N,J){var M=N.element;M.style.display="block";var O=M.findPos();var L=M.clientHeight;var K=M.clientWidth;if(L+O.top>=E.height.height+E.height.top){E.height.height=L;E.height.top=O.top;E.height.item=N;E.height.rI=J}if(K+O.left>=E.width.width+E.width.left){E.width.width=K;E.width.left=O.left;E.width.item=N;E.width.rI=J}M.style.display="none"};var H=this._currentPosition;this._currentPosition=this.conf.visibleItems+1;for(var C=-this.conf.visibleItems;C<=this.conf.visibleItems;C++){G.element.style.display="none";this._positionItem(G,C);F(G,C)}var D=E.height.rI;for(var C=0;C0.001){this._currentPosition+=this.conf.flowSpeedFactor*this.conf.calcStepWidth(D,C,this.items.length,this.conf.visibleItems);var A=this.items[(this._getIndexByPosition(this._currentPosition))];if(A&&A!=this._activeItem){if(this._activeItem){this._activeItem.makeInactive()}this._activeItem=A;this._activeItem.makeActive();this._setCaptionLabel(this._activeItem.index);if(Math.abs(this._targetPosition-this._currentPosition)<=0.5){this.conf.onReachTarget(this._activeItem)}}this._positionItems();var B=this._step.bind(this);window.setTimeout(B,this._millisecondsPerStep)}else{if(!this._holdPos){if(this.Slider){this.Slider.locked=false}this._currentPosition=Math.round(this._currentPosition);if(this.Position&&!this.Slider.locked&&this._activeItem){this._setCaptionLabel(this._activeItem.index)}this._positionItems();this._stepLock=false}else{this._stepLock=false}}if(this.Slider&&!this.Slider.locked){this.Slider.setPosition(this._currentPosition)}},_positionItems:function(){if(this._lastStart){var E=this._lastStart;while(E){E.element.style.display="none";E=E.next;if(E==this._lastStart){break}if(E&&E.pre==this._lastEnd){break}}}else{this._lastStart=this._activeItem}if(!this._activeItem){return }var C=this._activeItem;var B=C.pre;var D=C.next;this._positionItem(C,0);for(var A=1;A<=this.conf.visibleItems&&2*A0?M/I.visibleItems:0;var B=M<0?-1:1;B*=M==0?0:1;S.side=B;var J=I.calcSize(S);J.height=Math.max(J.height,0);J.width=Math.max(J.width,0);if(S.content.origProportion){J=this._scaleImageSize(S,J)}S.size=J;var P=S.coordinates=I.calcCoordinates(S);var H=S.relativeItemPosition=I.calcRelativeItemPosition(S);var K=S.zIndex=I.calcZIndex(S);var C=S.fontSize=I.calcFontSize(S);var D=S.opacity=I.calcOpacity(S);J.height*=this.maxHeight;J.width*=this.maxHeight;var R=N?J.height:J.width;var O=N?J.width:J.height;var G=this.Flow.center.x*(1+P.x)+(H.x-1)*R/2;var F=this.maxHeight/2*(1+P.y)+(H.y-1)*O/2;E.left=(N?F:G)+"px";E.top=(N?G:F)+"px";this._setItemSize(S,J);if(I.endOpacity!=1){this._setItemOpacity(S)}if(!this.Browser.IE){E.fontSize=(C*100)+"%"}E.zIndex=32768+Math.round(K*this.items.length);I.onDrawItem(S);E.visibility="visible";E.display="block"},_scaleImageSize:function(N,P,I){var E=this.conf.scaleFactorLandscape;var D=this.conf.scaleFactorPortrait;var M=this.conf.verticalFlow;var B=N.content.origProportion;var C=P.width;var L=P.height;var H=N.content;if(M){if(B<=1){if(E!="max"&&E!=1){L*=E;C=Math.min(L*B,I?I:1)}L=C/B}else{if(B>1){if(D=="max"){L=I?I:1}else{if(D!=1){C*=D;L=Math.min(C/B,I?I:1)}else{L=C/B}}C=L*B}}}else{if(B>1){if(E!="max"&&E!=1){C*=E;L=Math.min(C/B,I?I:1)}C=L*B}else{if(B<=1){if(D=="max"){C=I?I:1}else{if(D!=1){L*=D;C=Math.min(L*B,I?I:1)}else{C=L*B}}L=C/B}}}L=isNaN(L)?0:L;C=isNaN(C)?0:C;if(!I&&this.conf.fixItemSize){var A=P.width/P.height;var I=Math.max(P.width,P.height);var O=this._scaleImageSize(N,{width:I,height:I},I);if(A<1){L=O.height/P.height;C=L*B/A}else{C=O.width/P.width;L=C/B*A}var G=L*100;var K=C*100;var J=(1-C)/2*100;var F=(1-L)/A*100*(M?0.5:1);H.style.height=G+"%";if(N.reflection){N.reflection.style.height=G*this.conf.reflectionHeight+"%"}H.style.width=K+"%";if(N.reflection){N.reflection.style.width=K+"%"}H.style.marginLeft=J+"%";if(N.reflection){N.reflection.style.marginLeft=J+"%"}H.style.marginTop=F+"%";N.element.style.overflow="hidden";return P}else{return{width:C,height:L}}},_setItemSize:(function(){if(ContentFlowGlobal.Browser.IE){var A=function(E,C){if(!this.conf.fixItemSize){E.content.style.height=C.height+"px"}else{if(ContentFlowGlobal.Browser.IE6){var D=parseInt(E.content.style.height)/100;E.content.style.height=C.height*D+"px";var B=parseInt(E.content.style.marginTop)/100;E.content.style.marginTop=C.height*B+"px"}}if(E.reflection){var D=parseInt(E.content.style.height);E.reflection.style.height=D*this.conf.reflectionHeight+"px";E.reflection.style.marginTop=D*this.conf.reflectionGap+"px"}E.element.style.width=C.width+"px";E.element.style.height=C.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}}else{var A=function(C,B){if(C.reflection){C.element.style.height=B.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px";C.reflection.style.marginTop=B.height*this.conf.reflectionGap+"px"}else{if(this._reflectionWithinImage){C.element.style.height=B.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{C.element.style.height=B.height+"px"}}C.element.style.width=B.width+"px"}}return A})(),_setItemOpacity:(function(){if(ContentFlowGlobal.Browser.IE6){var A=function(C){if(C.content.origSrc&&C.content.origSrc.match(/\.png$/)){var B=C.content.src;C.content.src=C.content.origSrc;C.content.style.filter=C.content.filterString+" progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")";C.content.src=B}else{C.content.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")"}if(C.reflection){C.reflection.style.filter=C.reflection.filterString+"progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")"}}}else{if(ContentFlowGlobal.Browser.IE){var A=function(B){B.element.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+B.opacity+")"}}else{var A=function(B){B.element.style.opacity=B.opacity}}}return A})()};if(!Function.bind){Function.prototype.bind=function(A){var B=this;return function(){return B.apply(A,arguments)}}}if(!Math.erf2){Math.erf2=function(A){var B=-(8*(Math.PI-3)/(3*Math.PI*(Math.PI-4)));var C=A*A;var D=1-Math.pow(Math.E,-C*(4/Math.PI+B*C)/(1+B*C));return D}}if(!Math._2PI05){Math._2PI05=Math.sqrt(2*Math.PI)}if(!Math.normDist){Math.normDist=function(A,C,B){if(!C){var C=1}if(!B){var B=0}if(!A){var A=-B}return 1/(C*Math._2PI05)*Math.pow(Math.E,-(A-B)*(A-B)/(2*C*C))}}if(!Math.normedNormDist){Math.normedNormDist=function(A,C,B){return this.normDist(A,C,B)/this.normDist(B,C,B)}}if(!Math.exp){Math.exp=function(A){return Math.pow(Math.E,A)}}if(!Math.ln){Math.ln=Math.log}if(!Math.log2){Math.log2=function(A){return Math.log(A)/Math.LN2}}if(!Math.log10){Math.log10=function(A){return Math.log(A)/Math.LN10}}if(!Math.logerithm){Math.logerithm=function(B,A){if(!A||A==Math.E){return Math.log(B)}else{if(A==2){return Math.log2(B)}else{if(A==10){return Math.log10(B)}else{return Math.log(B)/Math.log(A)}}}}}if(!Event){var Event={}}if(!Event.stop){Event.stop=function(A){A.cancelBubble=true;if(A.preventDefault){A.preventDefault()}if(A.stopPropagation){A.stopPropagation()}return false}}if(document.all&&!window.opera){window.$CF=function(A){if(typeof A=="string"){return window.$CF(document.getElementById(A))}else{if(CFElement.prototype.extend&&A&&!A.extend){CFElement.prototype.extend(A)}}return A}}else{window.$CF=function(A){return A}}if(!window.HTMLElement){CFElement={};CFElement.prototype={};CFElement.prototype.extend=function(A){for(var B in this){if(!A[B]){A[B]=this[B]}}}}else{CFElement=window.HTMLElement}if(!CFElement.findPos){CFElement.prototype.findPos=function(){var B=this;var C=curtop=0;try{if(B.offsetParent){C=B.offsetLeft;curtop=B.offsetTop;while(B=B.offsetParent){C+=B.offsetLeft;curtop+=B.offsetTop}}}catch(A){}return{left:C,top:curtop}}}if(!CFElement.getDimensions){CFElement.prototype.getDimensions=function(){return{width:this.clientWidth,height:this.clientHeight}}}if(!CFElement.hasClassName){CFElement.prototype.hasClassName=function(A){return(new RegExp("\\b"+A+"\\b").test(this.className))}}if(!CFElement.addClassName){CFElement.prototype.addClassName=function(A){if(!this.hasClassName(A)){this.className+=(this.className?" ":"")+A}}}if(!CFElement.removeClassName){CFElement.prototype.removeClassName=function(A){this.className=this.className.replace(new RegExp("\\b"+A+"\\b"),"").replace(/\s\s/g," ")}}if(!CFElement.toggleClassName){CFElement.prototype.toggleClassName=function(A){if(this.hasClassName(A)){this.removeClassName(A)}else{this.addClassName(A)}}}if(!CFElement.getChildrenByClassName){CFElement.prototype.getChildrenByClassName=function(C){var B=new Array();for(var A=0;A