commit 5ed01bd42b0aaf222f3b04b611e31b3d0974b6a4 Author: Timothy Pearson Date: Mon Oct 5 13:46:54 2015 -0500 Initial import of static files diff --git a/about.php b/about.php new file mode 100644 index 0000000..25e3bcd --- /dev/null +++ b/about.php @@ -0,0 +1,60 @@ + +

The Trinity Desktop Environment (TDE) project is a computer desktop environment for Unix-like operating systems +with a primary goal of retaining the function and form of traditional desktop computers.

+ +

Project Goals

+

We seek to provide a traditional desktop environment which is . . . +

+ +

Major Features

+ + +

History

+

The TDE project began as a continuation of the K Desktop Environment (KDE) + version 3. The name Trinity was chosen partly because the word means "three" and TDE + was a continuation of KDE 3. TDE now is its own computer desktop environment + project.

+

The TDE project was founded by and is still led by Timothy Pearson. Timothy + is an experienced and skilled software developer and was the KDE 3.x coordinator + of previous Kubuntu releases.

+

Release dates:

+

TDE 3.5.11: April 29, 2010.
+TDE 3.5.12: October 3, 2010.
+TDE 3.5.13: November 1, 2011.
+TDE 3.5.13.1: October 10, 2012.
+TDE 3.5.13.2: July 21, 2013.
+TDE R14.0.0: December 16, 2014.
+TDE R14.0.1: August 30, 2015
+TDE R14.0.2: Anticipated in Q4 2015.

+

NOTE: The Trinity Desktop Environment project is not a continuation of + KDE 3.5 by KDE e.V., members of which no longer support the KDE 3 series. + Trinity is an independent fork using a separate developer community.

+

Contributors

+ diff --git a/apidocs.php b/apidocs.php new file mode 100644 index 0000000..ba121ff --- /dev/null +++ b/apidocs.php @@ -0,0 +1,46 @@ + +

+Qt3 API Index
+Qt4 API Index
+Qt3 to Qt4 porting guide

+Trinity API + +

+
+ + + + + + +
+
+ +
+
+ + + + + + +
+
+ +
+
+ + + + + + +
+
+ + diff --git a/applications.php b/applications.php new file mode 100644 index 0000000..ddcc1ed --- /dev/null +++ b/applications.php @@ -0,0 +1,480 @@ + + + + +

+


+

+

Education and Edutainment

+

Languages

+ +

Mathematics

+ +

Miscellaneous

+ +

Science

+ +

+


+

+

Games

+

Arcade

+ +

Board

+ +

Card

+ +

Kids

+ +

Tactics and Strategy

+ +

+


+

+

Graphics

+

Image Viewers

+ +

Miscellaneous

+ +

+


+

+

Internet

+

Configuration and Connection Monitoring

+ +

Email-Related

+ +

Messaging and IRC

+ +

Miscellaneous

+ +

+


+

+

Multimedia

+

Audio Creators and Players

+ +

CD and DVD Utilities

+ +

Miscellaneous

+ +

Video Players

+ +

+


+

+

Office

+

Faxes

+ +

KOffice Suite

+ +

Miscellaneous

+ +

Note Taking

+ +

+


+

+

Software Development

+

Miscellaneous

+ +

Web Development

+ +

+


+

+

System

+

Hardware

+ +

Miscellaneous

+ +

Monitors and Log Viewing

+ +

Package Management

+ +

+


+

+

Utilities

+

Accessibility

+ +

Alternate Menus and Launchers

+ +

Files and File Management

+ +

Miscellaneous

+ +

Phones and Devices

+ +

+


+

+

Panel Applets and Software Toys

+ + + diff --git a/contributors.php b/contributors.php new file mode 100644 index 0000000..c38478f --- /dev/null +++ b/contributors.php @@ -0,0 +1,54 @@ + + + The Trinity Development Team would like to thank everyone listed below for their assistance. These individuals have freely offered their time and effort to make Trinity better. Without their support Trinity would not exist in its current form. +

+

+ If we have forgotten to add your name to the list, please contact us via the trinity-devel mailing list. +

+ +

Trinity Developers

+ + + + + + + +
NameContributing Area(s)
Timothy PearsonProject administrator
Primary developer
Build farm administrator
Debian/Ubuntu packaging maintainer
Slávek BankoSRU development, management, and builds
Francois AndriotRedhat/Fedora packaging maintainer
"Woodsman"Vanilla build testing and repair
Slackware build scripts maintainer
Documentation reviewer
Testing and quality assurance
Michele CalgaroDeveloper
Documentation reviewer
Debian/testing and quality assurance
+ +

Content Distribution

+ + + + + + + + + + + + +
NameContributing Area(s)
Mike Bird (Yosemite Network)Mirror 1 [United States]
UK Mirror ServiceMirror 2 [United Kingdom]
Nathaniel TaylorMirror 3 [Sweden]
DotRiverMirror 4 [France]
Mirror 5 [France] [Last sync 1/20/2012]
Ivan GanchevMirror 6 [Bulgaria]
NetLinuxMirror 7 [United Kingdom] [Not syncing]
Friedrich-Alexander-Universität Erlangen-NürnbergMirror 8 [Germany]
+

+Active mirror list + + +

Web Team

+ + + + +
NameContributing Area(s)
E. LiddellDesign
Timothy PearsonMaintenance
+

+ +

+Past Contributors
Gone, but not forgotten...thank you for your previous support! +

+ + diff --git a/countdown.js b/countdown.js new file mode 100644 index 0000000..6d37c6b --- /dev/null +++ b/countdown.js @@ -0,0 +1,85 @@ +/* +Author: Robert Hashemian +http://www.hashemian.com/ + +You can use this code in any manner so long as the author's +name, Web address and this disclaimer is kept intact. +******************************************************** +Usage Sample: + + + +*/ + +function calcage(secs, num1, num2) { + s = ((Math.floor(secs/num1))%num2).toString(); + if (LeadingZero && s.length < 2) + s = "0" + s; + return "" + s + ""; +} + +function CountBack(secs) { + if (secs < 0) { + document.getElementById("cntdwn").innerHTML = FinishMessage; + return; + } + DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000)); + DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24)); + DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60)); + DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60)); + + document.getElementById("cntdwn").innerHTML = DisplayStr; + if (CountActive) + setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod); +} + +function putspan(backcolor, forecolor) { + document.write(""); +} + +if (typeof(BackColor)=="undefined") + BackColor = "white"; +if (typeof(ForeColor)=="undefined") + ForeColor= "black"; +if (typeof(TargetDate)=="undefined") + TargetDate = "12/31/2020 5:00 AM"; +if (typeof(DisplayFormat)=="undefined") + DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; +if (typeof(CountActive)=="undefined") + CountActive = true; +if (typeof(FinishMessage)=="undefined") + FinishMessage = ""; +if (typeof(CountStepper)!="number") + CountStepper = -1; +if (typeof(LeadingZero)=="undefined") + LeadingZero = true; + + +CountStepper = Math.ceil(CountStepper); +if (CountStepper == 0) + CountActive = false; +var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990; +putspan(BackColor, ForeColor); +var dthen = new Date(TargetDate); +var dnow = new Date(); + +var d = new Date() +var gmtHours = -d.getTimezoneOffset()/60; + +if(CountStepper>0) + ddiff = new Date(dnow-dthen); +else + ddiff = new Date(dthen-dnow); +gsecs = Math.floor(ddiff.valueOf()/1000); +CountBack(gsecs+(gmtHours*60*60)-(7*60*60)); + diff --git a/development.php b/development.php new file mode 100644 index 0000000..e320b23 --- /dev/null +++ b/development.php @@ -0,0 +1,38 @@ + +

This page is a portal to the various resources used in the development of the Trinity Desktop Environment.

+ +

Resources

+ +

Repositories

+
+ Official GIT Repository
+ Old official SVN on KDE.org
+ Commit patches from GIT
+ Obtaining the source code
+
+

Web Pages and Documentation

+
+ Developer's Area on the Wiki
+ Project Roadmap
+ API Documentation
+ Official Etherpad [a real-time collaboration tool]
+
+

Other

+
+ Nightly Builds
+ Nightly Builds Landing Page
+ Nightly Builds Installation Instructions
+ Mailing Lists
+
+

External Links

+
+ Code Stats on OpenHub
+
+

+ + diff --git a/donate.php b/donate.php new file mode 100644 index 0000000..24c7931 --- /dev/null +++ b/donate.php @@ -0,0 +1,41 @@ + + +

The Trinity project needs your support!

+

+ While Trinity is free software, making it is not free.
+ Developing and maintaining Trinity takes an enormous amount of effort, and relies heavily on both a fast + Internet connection and large, power-hungry computers for the build farm and Web services. +

+

+ If you can, please help to both assist the Trinity development team and pay for the various resources in + use by donating here: +

+
+
+ Via PayPal + + + +
+
+

+

+ Via BitCoin + Donate 50mBTC to TDE!
+ Pay to: 1H1RMzujpGC9wZPSjZ6hWqz4BxQ5dzhHti
+ Suggestion: 0.05 BTC
+ Message: Trinity Desktop Environment Donation +
+

+ Every little bit helps and is much appreciated! +

+ + diff --git a/faq.php b/faq.php new file mode 100644 index 0000000..bb4ea79 --- /dev/null +++ b/faq.php @@ -0,0 +1,50 @@ + + +

General Questions

+

1. Why another desktop environment? +

We wanted a traditional-style menu-panel-taskbar-quicklaunch desktop with a full set of features. +For the past few years, KDE and the other major Linux desktop environments have been experimenting +with new interface paradigms. There's nothing wrong with basing a DE around a new and innovative idea, +but not everyone is going to be happy with it, just as not everyone likes the sort of traditional +interface Trinity offers. + +

2. Doesn't XFCE4 fill the same niche as Trinity? What about Maté? +

XFCE4 is a lighter desktop than Trinity, meaning that it contains less code and likely requires +less hardware, but also offers fewer features. Maté is probably playing in much the same +space as we are, but a lot of us tried it when it was still Gnome 2 and decided we liked Trinity's +ancestor better. + +

3. Isn't Trinity just KDE 3.5.10 with a few cosmetic changes? +

Trinity has several features that KDE 3 didn't have, such as +Secure Attention Key support and +ICC (International Color Consortium) +color profile support. It's also been updated to work without requiring obsolete libraries like HAL, and +is available for more distributions (at the time of writing, KDE3 was no longer available for any major Linux +distribution except OpenSUSE and Gentoo). + +

4. What's your relationship with KDE e.V. (the legal entity behind KDE)? +

We don't have one. Really. We do our best not to interfere with their trademarks, and in +return they mostly pretend that we don't exist. + +

5. Should I report Trinity bugs to the KDE bug tracker? +

Please don't. We have our own bug tracker at http://bugs.trinitydesktop.org/ . +Sending our bugs to them will just annoy them, and it won't get your bug fixed. + +


+ +

Getting and Installing Trinity

+ +
+ +

The Control Panel, Desktop, and System Tray

+ +
+ +

Konqueror: File Manager and More

+ + diff --git a/faq/about.php b/faq/about.php new file mode 100644 index 0000000..3dea9f5 --- /dev/null +++ b/faq/about.php @@ -0,0 +1,40 @@ + + +
+

+

+

+

Chapter 1. About this FAQ

+

1.1. What can I do to help with this FAQ?
1.2. How do I become an FAQ maintainer?
1.1.

What can I do to help with this FAQ?

Notify us about any errors you find. Suggestions you have are + +appreciated. Send us everything that you think is unclear. When possible send us what + +you think would be a clearer solution.

Send us your solutions of those frequently-asked + +questions which are still not in this FAQ. We will + +add them as soon as practical.

Please make full use of this FAQ. + +Read this FAQ (and other + +relevant documentation) well before asking questions on the various + +TDE mailing lists or newsgroups.

1.2.

How do I become an FAQ maintainer?

Becoming an FAQ maintainer is easy + +and we are always grateful for help. :-) Send + +us an email at . + +

+ + diff --git a/faq/applications.php b/faq/applications.php new file mode 100644 index 0000000..16e51a3 --- /dev/null +++ b/faq/applications.php @@ -0,0 +1,148 @@ + + +
+

+

+

+

Chapter 11. TDE applications

+

11.1. KPPP
11.2. Konsole
11.1.

KPPP

Many TDE users report problems using KPPP. Make sure you have already checked the + +following:

+

  • Can you dialup to your ISP without using KPPP? If you cannot, then perhaps KPPP is not the culprit after + +all.

  • Have you gone through the KPPP documentation + +and followed the instructions and troubleshooting + +suggestions?

The KPPP handbook is available through the + +TDE Help Center.

If you still encounter problems, then the following might help:

+

How do I change the MTU setting in KPPP?

Open up the KPPP dialog box and select + +Setup. Choose an existing account and click + +Edit, or New to create a + +new dialup account. Select the Dial tab and + +click Arguments. Type what you want to change + +in the Argument textbox (e.g. mtu 296) and + +click Add. When you are satisfied, click + +Close.

To check whether the options took, do one of the following:

+

  • In a terminal window, run + +/sbin/ifconfig ppp0 and look + +at the reported MTU in the output. It should match your + +request.

  • Add debug and kdebug + +(each on a separate line) to your + +/etc/ppp/options file and restart your + +PPP session. You will find debugging messages in + +/var/log/messages, including MRU and MTU + +settings.

If you want, the MRU and MTU settings can be added to the + +options file, one complete setting per line, no + +quotes or dashes.

KPPP connects at a slower speed than + +normal.

The following might do the trick:

+

  • Try executing setserial + +spd_hi.

  • The default MTU value is 1500, + +which maybe too large + +for a dialup connection. Try changing it to a smaller value like + +296 + +or 576.

  • Check in your $HOME/.trinity/share/config for the + +kppprc. Ensure the correct modem speed is + +actually defined there.

11.2.

Konsole

+

How do I page-up or page-down?

Use Shift+Page Up + +and Shift+Pg + +Dn. + +

How do I copy text from Konsole to + +anything else?

Use the mouse to select the desired text. From the + +Edit menu, select Copy, or press + +Ctrl+Shift+C. This places + +the text in the TDE clipboard, Klipper. Next select + +the target application, place the mouse pointer to the + +desired location and press Ctrl+V. + +Alternately, highlight the text by dragging with the left mouse button down and + +paste by clicking with the middle mouse button (or both buttons if you are using a + +2 button mouse with 3 button emulation). + +

+

Note

Note that the copying and pasting keyboard shortcuts use the + +Shift key. That is because in traditional Unix terminals, + +Ctrl+C is used to break or stop + +a process from running.

Why can't Konsole find the 9x15 and the 2 + +console bitmap fonts installed with TDE?

FontConfig must find the three fonts + +installed in: $TDEDIR/share/fonts. + + If + +the TDE install does not install these fonts in a directory that + +already exists (e.g. /usr/share/fonts) then you must add this + +directory to the configuration file /etc/fonts/local.conf. This should be + +the first line after <fontconfig>. For example: + +

+
+<fontconfig>
+
+<dir>/usr/trinity/share/fonts</dir>
+
+</fontconfig>
+
+
+ +After adding the directory, run (as root): + +fc-cache -v and check that + +it found the directory.

+ + diff --git a/faq/configure.php b/faq/configure.php new file mode 100644 index 0000000..b1b0328 --- /dev/null +++ b/faq/configure.php @@ -0,0 +1,236 @@ + + +
+

+

+

+

Chapter 10. Configuring TDE

+

10.1. How do I set the language used by TDE?
10.2. Is there any keyboard switcher for international keyboards for + +TDE?
10.3. How do I replace the standard text login screen with the + +TDE login screen?
10.4. I would like to click the left mouse button anywhere on the + +desktop and have the TDE menu displayed.
10.5. Where do I find additional TDE themes?
10.6. How do I change MIME Types?
10.7. TDE (TDM) does not read my .bash_profile.
10.8. How do I use TrueType fonts in TDE?
10.9. Is it possible to enter, show, and work with the Euro Symbol in + +TDE?
10.10. How do I run a program at TDE startup?
10.11. How can I allow more than one user to be logged in a at a time? Can TDE do fast user switching?
10.1.

How do I set the language used by TDE?

First ensure the appropriate tde-i18n language package is installed.

Thereafter there are two ways to set the language TDE uses in the + +messages it will display:

+

Using the TDE Control Center

Open the TDE Control Center and select + +Regional & Accessibility then + +Country/Region & Language. You can select your language and location + +here. If TDE cannot find a translation in the first language + +chosen, it will fall back on the default language. This is usually + +(American) English by default.

+

Note

Using the TDE Control Center is the preferred way of choosing + +languages in TDE.

Using the LANG environment variable

The second method uses the standard locale setting on + +your system. To change the language, simply set the environment + +variable LANG accordingly. For example, if your shell + +is bash, execute + +export LANG=de + +to set German as the language used.

10.2.

Is there any keyboard switcher for international keyboards for + +TDE?

+ +Yes, configure the switcher using the TDE Control Center + +Regional & Accessibility-> + +Keyboard Layout configuration page. + +

10.3.

How do I replace the standard text login screen with the + +TDE login screen?

+

Note

Your Unix-like distribution might have its own setup tools to + +change this (e.g. YaST on SuSE Linux). This will + +be the safest way to enable the TDE login screen. However, if for some reason + +you do not wish to use these tools, the following instructions might be useful.

First, ychange to the xdm runlevel (runlevel 5 on + +Red Hat and SuSE systems) by editing your + +/etc/inittab file. In the file, there should be + +a line saying id:3:initdefault:. Change it to + +id:5:initdefault:. At the end of the file, + +comment out the following line: + +x:5:respawn:/usr/bin/X11/xdm -nodaemon and + +replace it with + +x:5:respawn:/opt/trinity/bin/tdm + +-nodaemon. + + +

Note

The location of TDM might differ on your + +system.

For changes to take effect immediately, type init + +5 (for Red Hat systems) at the shell prompt. + + +

Caution

It is risky to initiate a graphical login without + +checking beforehand whether it works. If it fails to work, you would + +be in for a hard time getting back.

+ +For FreeBSD, you should edit the file /etc/ttys + +and change one of the lines that look like + +

ttyv8   "/usr/X11R6/bin/xdm -nodaemon"  xterm   off secure
+ +to instead say ttyv8 "/usr/local/bin/tdm -nodaemon" xterm + +off secure.

10.4.

I would like to click the left mouse button anywhere on the + +desktop and have the TDE menu displayed.

Use the right mouse button to select the desktop. From the popup menu, select + +Configure Desktop. From the icon list + +select the Behavior icon. Choose the behavior of mouse clicks on the desktop. To have + +the TDE menu open from a single left mouse button click, change + +the entry labeled Left button to say + +Application Menu.

10.5.

Where do I find additional TDE themes?

Go to http://www.kde-look.org.

10.6.

How do I change MIME Types?

When using Konqueror, open a Konqueror window and choose + +Settings->Configure + +Konqueror. From the icon list select + +File Associations. Find the mime type you want to change + +(e.g. text/english or + +image/gif), and set the application preference order + +to whatever you want.

The same thing can be accomplished by using the TDE Control Center + +. Select TDE Components->File Associations.

10.7.

TDE (TDM) does not read my .bash_profile.

The login managersxdm and TDM do + +not run a login shell, so .profile, + +.bash_profile, etc. are not + +sourced. When the user logs in, xdm runs + +Xstartup as root and then + +Xsession as user. The normal practice is to add + +statements in Xsession to source the user + +profile. Please edit your Xsession and + +.xsession files.

10.8.

How do I use TrueType fonts in TDE?

Install TrueType font support into your X Window System configuration. + + + +

If you have a bunch of TrueType fonts from Microsoft + +Windows, edit the xorg.conf file to get the + +fonts from the font folder. Then configure TDE to use these new + +fonts with the Font Administrator utility.

10.9.

Is it possible to enter, show, and work with the Euro Symbol in + +TDE?

Yes. Open the TDE Control Center and select + +Regional & Accessibility, then + +Keyboard Layout. Select the Xkb Options + +tab and enable the Enable xkb options check box. Choose a compose key. + +Enable Adding Eurosign to certain keys and select the desired key.

10.10.

How do I run a program at TDE startup?

There are several ways to do that. If you want to + +run some scripts that set environment variables (for + +example, to start gpg-agent, ssh-agent and others), place the + +scripts into $TDEHOME/env/. Make sure their names end in + +.sh. $TDEHOME is + +usually a folder named .trinity + +(notice the period at the beginning) in your home + +folder. If you want scripts to be executed for all TDE users, you can + +put them under $TDEDIR/env/, where $TDEDIR is the prefix TDE is installed (you can find this out using the command + +tde-config --prefix).

If you wish to start a program after TDE has started, you may want to use the + +Autostart folder. To add + +entries to the Autostart folder: + + +

  1. Open Konqueror.

  2. Select Go->Autostart from the menubar.

  3. Right-click in the window view area and select Create New->File->Link to + +Application

  4. Click on the Application tab in + +the window that appears and enter the name of the command to run in + +the Command text box.

+ +

10.11.

How can I allow more than one user to be logged in a at a time? Can TDE do fast user switching?

Yes, when starting TDE through the graphical login mode. When starting TDE + +from the command line using startx, then toggle to a different console + +to login in.

To enable more than one user to log in at one time on the same + +computer (sometimes referred to as fast user switching) + +configure the program that logs you in to allow more than one + +session (or, in X Window System terms, display) at a time.

In TDE, this program is called TDM which stands for TDE + +Display Manager. If you are not using TDM as your login screen + +then you will need to consult the documentation for the software you are using on how to + +accomplish multiple sessions.

By default, this will be configured at installation time automatically + +if TDM supports virtual terminals on your system (currently Linux only). + +If it was not configured automatically, consult the TDM manual, section + +"Specifying permanent X-Servers". + +After modifying tdmrc, you will have to restart TDM; just + +invoke killall -HUP tdm.

+ + diff --git a/faq/contribute.php b/faq/contribute.php new file mode 100644 index 0000000..0a0ed47 --- /dev/null +++ b/faq/contribute.php @@ -0,0 +1,128 @@ + + +
+

+

+

+

Chapter 19. Contributing

+

19.1. How can I contribute to TDE?
19.2. How do I submit a bug report?
19.3. May I join the development team?
19.4. I want to program for TDE. What should I do first?
19.5. How do I get access to TDE GIT?
19.6. Can I have read-only access to the GIT repository?
19.7. Are there any GIT mirror sites for TDE?
19.1.

How can I contribute to TDE?

TDE is a free/libre software project that lives from voluntary + +contributions. Everybody is encouraged to contribute to TDE. Not + +only programmers are welcome. There are many ways in which you can + +help to improve TDE:

+

  • Test the software.

  • Send in bug reports. For more information, + +refer to How do I submit a bug + +report?.

  • Write or edit documentation and help files.

  • Translate programs, documentation, and help files. + +

  • Draw icons, wallpaper, or compose sound effects.

  • Write articles and books about TDE. If you want to + +help spread the word about TDE, send an email to + +. This will get you in touch + +with the TDE developers and packagers.

  • Program new TDE applications. Please refer to Q:19.4 for more information.

  • Of course, sponsors are also + +welcome. :-)

There are several places to look for more information if you + +want to get involved in the development. The first step is to + +subscribe to some of the mailing + +lists. You will soon see something + +that can be improved or added.

19.2.

How do I submit a bug report?

There is a bug tracking system available at http://bugs.pearsoncomputing.net/ + +and thanks for helping! The system features several query types and a + +list of all known bugs.

The easiest way to submit a bug is to select + +Help->Report + +Bug/Request Enhancement... from the menu bar of the application + +with the bug. This will open a dialog box with a link + +to the bug tracking system. Please follow the + +instructions of the bug reporting wizard.

19.3.

May I join the development team?

Please! Join our discussion list at + + + +http://www.trinitydesktop.org/mailinglist.php. Join + +Internet Relay Chat (IRC) sessions at chat.freenode.net, channel: #trinity-desktop

19.4.

I want to program for TDE. What should I do first?

Everybody is encouraged to develop software for TDE. What you + +should do first depends strongly on your experience, e.g. whether you have + +already learned C++ or have experience with the Qt toolkit and so + +on.

To get into TDE programming, you will need some basic tools: + +automake, + +autoconf, and + +cmake.

An excellent resource for learning TDE + +programming is the Qt tutorials. These are installed along with Qt. To view them, + +open $QTDIR/doc/html/index.php in + +Konqueror and bookmark the locatio. The tutorials + +can be found under "Using Qt". The source code for each lesson can be found in the $QTDIR/tutorial + +directory.

There is one thing everybody interested in + +programming for TDE should do: please subscribe to the developers + +mailing list. To subscribe, you have to send an email to + +trinity-devel-subscribe@lists.pearsoncomputing.net + +with an empty email. + + +

Important

Please read + +http://www.trinitydesktop.org/mailinglist.php. Everything + +written there applies to the development list as well.

19.5.

How do I get access to TDE GIT?

The TDE project uses GIT to develop the + +core parts of the software. Usually, when you have changed one of the + +parts (e.g. fixed a bug), and you want to commit this change, the best + +way is to create a patch against a current snapshot and send this + +patch to the developer/maintainer of the respective program.

If you are doing this more or less regularly, then contact the developers + +to obtain write access to the GIT repository: + + + +trinity-devel@lists.pearsoncomputing.net.

19.6.

Can I have read-only access to the GIT repository?

Yes. Instructions on how to get anonymous, read-only GIT + +access are here: + +http://www.trinitydesktop.org/wiki/bin/view/Developers/GIT + +

19.7.

Are there any GIT mirror sites for TDE?

No, currently there are no anonymous GIT mirror sites for TDE. + +

+ + diff --git a/faq/credits.php b/faq/credits.php new file mode 100644 index 0000000..8a29327 --- /dev/null +++ b/faq/credits.php @@ -0,0 +1,29 @@ + + +
+

+

+

+

Chapter 20. Credits and License

Many of the answers in this FAQ are taken + +from various mailing lists and newsgroups. Here is a + +big thank you to all of you who have contributed + +answers that eventually appear in this FAQ.

Special thanks go to the former FAQ + +maintainers, Rainer Endres, Mr. Lee Wee Tiong, and J. Hall.

This documentation is licensed under the terms of the GNU Free Documentation + +License.

+ + diff --git a/faq/desktop.php b/faq/desktop.php new file mode 100644 index 0000000..0a1499e --- /dev/null +++ b/faq/desktop.php @@ -0,0 +1,56 @@ + + +
+

+

+

+

Chapter 6. The desktop

+

6.1. How do I add an application to the desktop?
6.2. How do I mount/unmount a device from the desktop?
6.3. Where are the icons kept?
6.4. How do I launch applications in a particular desktop?
6.5. Where do I save my files if I want them to appear directly on + +the desktop?
6.1.

How do I add an application to the desktop?

Just choose the desired application from the TDE menu and drag and drop it to the Desktop. + +

For applications not listed in the TDE menu, + +use the right mouse button on the desktop and choose Create New->File->Link to Application... and fill in the configuration for the application you want to link to. + +

6.2.

How do I mount/unmount a device from the desktop?

First, make sure you are allowed to mount/umount the relevant device as a user. + +

Then you can add any device via right mouse button on the desktop and then choosing Create New->Link to Device and then selecting the device of the type you wish to control from the desktop. Fill in the settings for the device in the dialog that appears and click OK. You can use the resulting desktop icon to mount/unmount the device from the desktop. + +

6.3.

Where are the icons kept?

The icons can be found only in $TDEDIRS/share/icons or $HOME/.trinity/share/icons. To use icons + +stored in other locations, you must either copy them into one of the + +above-mentioned fixed TDE locations or make symlinks.

6.4.

How do I launch applications in a particular desktop?

TDE comes with a program called kstart. + +To start an xterm on the second desktop and then activate it use: + + + +kstart --desktop + +2 --activate --window "xterm" xterm.

Note that the --window option is important. It takes an + +argument which is a regular expression matching the title of the window to + +apply the settings to.

Please read kstart --help-all for more magic + +available with kstart (and there is an abundance). + +

6.5.

Where do I save my files if I want them to appear directly on + +the desktop?

$HOME/Desktop. You might + +need to refresh your desktop after you have saved your files.

+ + diff --git a/faq/filemanager.php b/faq/filemanager.php new file mode 100644 index 0000000..5c17bcd --- /dev/null +++ b/faq/filemanager.php @@ -0,0 +1,213 @@ + + +
+

+

+

+

Chapter 8. The File Manager

The default file manager in TDE is Konqueror. Please refer to + +the Konqueror Handbook for detailed information.

+

8.1. How can I change the appearance of a folder in + +Konqueror?
8.2. How can I do non-anonymous FTP transfers with Konqueror?
8.3. How do I specify the startup folder for Konqueror?
8.4. How do I rename files?
8.5. Where did the delete entry from my right-click context menu go?
8.6. How do I configure the programs that Konqueror uses to + +open different types of files?
8.7. When I try to click on a folder in Konqueror, I get the + +message: There appears to be a configuration error. You have + +associated Konqueror with inode/directory, but it cannot handle this file + +type.
8.8. What are %i and + +%m parameters in a file's Properties Command line?
8.9. How do I make Konqueror start up without a menu bar? + +I can't save a view profile when the menu bar is invisible!
8.1.

How can I change the appearance of a folder in + +Konqueror?

Right-click the folder, select Properties, + +click on the large icon in the dialog which appears, and choose another + +icon.

To change the icon displayed for entries in the + +TDE Menu, use the Menu Editor, + +located at Settings->Menu + +Editor. + +

8.2.

How can I do non-anonymous FTP transfers with Konqueror?

Normally, if you enter a URL like + +ftp://ftp.somehost.com, + +Konqueror will attempt an anonymous login to the FTP server. If you + +want to login as a particular user, enter a URL like + +ftp://username@ftp.somehost.com + +instead. Konqueror will ask for your password and connect to the + +server.

8.3.

How do I specify the startup folder for Konqueror?

With the desktop Home icon, using the right mouse button, select the icon and choose + +Properties. Select the + +URL tab. Type /whereever/you/want + +with the folder you would like Konqueror to start in.

From within Konqueror the process is similar. Ensure the Navigation Panel is active + +(press F9). From the Navigation Panel tabs, select the Home icon. + +In the Navigation Panel directory, use the right mouse button to select the top level Home Folder and select Properties.

8.4.

How do I rename files?

Simply right click on the file and select + +Rename or press the keyboard shortcut F2 with a file selected.

8.5.

Where did the delete entry from my right-click context menu go?

The Delete context menu entry that bypasses the + +Trash can is not displayed by default. To enable that menu option, go to + +Settings->Configure + +Konqueror and select + +Behaviour in the iconbar to the left. Enable the checkbox + +Show 'Delete' context menu entries which bypass the + +trashcan. + +

8.6.

How do I configure the programs that Konqueror uses to + +open different types of files?

In order to configure file associations, you should go to the + +KDE Control Center and choose the item File + +Associations under the category TDE + +Components.

+ +Suppose the default PDF viewer is now KGhostView and + +you would prefer to use KPDF as a viewer. You + +would simply type pdf in the search box at the top of + +the dialog, choose pdf in the + +application group and move + +KPDF up. In the Embedding + +tab you can also choose which component other applications will use to + +display files (for example, when viewing files in Konqueror or using + +Ark's embedded viewer). + +

8.7.

When I try to click on a folder in Konqueror, I get the + +message: There appears to be a configuration error. You have + +associated Konqueror with inode/directory, but it cannot handle this file + +type.

Make sure the embedding settings for inode/directory + +are correct: + + +

  1. In Konqueror, go to + +Settings->Configure + +Konqueror and then to the File + +Associations page.

  2. Open + +inode->directory in the tree view.

  3. Click on + +the + +Embedding tab. Make sure that Left Click + +Action is set to Show file in embedded + +viewer, and by default Icon View (konq_iconview) + +is at the top + +of Services Preference Order.

+ +

8.8.

What are %i and + +%m parameters in a file's Properties Command line?

They are used by all TDE applications (since they are implemented in + +TDEApplication and all good TDE programs create a + +TDEApplication object before they even look at the + +command line arguments).

A standard line for a TDE + +application looks like this: foo + +... %i %m -caption \"%c\". Pretty confusing, + +-but it has been designed in that way so that it can integrate legacy, + +non-TDE applications as smoothly as possible. Konqueror, when executing + +the line above, will extend the command to + +foo -icon + +something.png -miniicon something_mini.png -caption \"The + +Foo\". Both the icon and the mini-icon as well as "The + +Foo" are properties defined in the .desktop file. If + +the icons are not defined, they simply default to the executable name + +foo.

This way a user can change these things in KMenuEdit for his or her + +applications. The -caption option is important, because no + +user will accept that the menu item Editor starts + +something called kedit-0.9pl4-build47. Instead, users + +expect a window called Editor. Furthermore these + +names are localized, i.e. an American English user launches + +CD-Player and gets a window called + +CD-Player while a German user launches + +CD-Spieler and gets a window called + +CD-Spieler.

8.9.

How do I make Konqueror start up without a menu bar? + +I can't save a view profile when the menu bar is invisible!

The easiest way to do this is to edit Konqueror's + +configuration file manually. Add the following lines to + +~/.trinity/share/config/konquerorrc: + +

+
+[KonqMainWindow]
+
+MenuBar=Disabled
+
+
+ +

On restarting Konqueror, the menubar should be hidden.

+ + diff --git a/faq/getting-tde.php b/faq/getting-tde.php new file mode 100644 index 0000000..d3e60ff --- /dev/null +++ b/faq/getting-tde.php @@ -0,0 +1,62 @@ + + +
+

+

+

+

Chapter 3. Getting TDE

+

3.1. Where do I get TDE?
3.2. What is the current version?
3.3. Binary packages are not available for my distro. What do I do?
3.4. Where do I find TDE snapshots?
3.5. Where do I get Qt?
3.1.

Where do I get TDE?

The easiest way to get TDE is to install a Linux based distribution or another Unix-like operating system + +that includes TDE. + +You can find an up-to-date list of distributions that ship + +with TDE here.

The main distribution site for TDE is + +http://www.trinitydesktop.org/.

3.2.

What is the current version?

TDE is developed continually. Find the latest stable version number here.

3.3.

Binary packages are not available for my distro. What do I do?

That is always a challenging situation. Are there skilled packagers who + +might help? If you are skilled in compiling software from sources, source + +tarballs are available for each TDE release (http://www.trinitydesktop.org/releases.php). + +The development version can also be built from our GIT source tree. Use the forums + +or mailing lists to contact packagers to obtain copies of their build scripts + +that can be massaged to fit your distro.

3.4.

Where do I find TDE snapshots?

Learn more about the latest development snapshots at http://www.trinitydesktop.org/development.php. + +You might want to consider setting up your own GIT account to + +maintain the latest snapshot at all times. Please refer to http://www.trinitydesktop.org/development.php for further + +information. + +

3.5.

Where do I get Qt?

Qt is a product of the Norwegian company Trolltech. The version + +upon which TDE is based no longer is actively maintained by Trolltech. + +Maintenance is handled by the TDE developers. Get the latest Qt version + +from the TDE GIT repository at + +http://git.trinitydesktop.org/.

+ +With most Linux distributions, this version of Qt no longer is + +included or maintained and must be obtained from the TDE repositories. Because + +this version of Qt is now maintained exclusively to support TDE, the version supported + +by TDE developers is not backwards compatible with the original version from Trolltech.

+ + diff --git a/faq/index.php b/faq/index.php new file mode 100644 index 0000000..849ec52 --- /dev/null +++ b/faq/index.php @@ -0,0 +1,48 @@ + + +
+

+

+

+

TDE Frequently Asked Questions

+

+

The TDE Team

+

Revision 0.1 +

+

+

+

Permission is granted to copy, distribute and/or modify this + +document under the terms of the GNU Free Documentation License, + +Version 1.1 or any later version published by the Free Software + +Foundation; with no Invariant Sections, with no Front-Cover Texts, and + +with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

+

+

+

This is a collection of frequently asked + +questions about the Trinity Desktop Environment. Please report any bugs, + +inconsistencies, or omissions you find in this FAQ to + +. Please post + +questions to the TDE mailing lists. Questions are monitored to help + +maintain this FAQ.


+

Table of Contents

1. About this FAQ
2. Introduction
3. Getting TDE
4. Installation instructions
5. The panel
6. The desktop
7. The window manager
8. The File Manager
9. Webbrowsing with Konqueror
10. Configuring TDE
11. TDE applications
12. Troubleshooting sound problems
13. TDE with non-TDE applications
14. Useful tips
15. Miscellaneous questions
16. Qt and Licensing questions
17. Getting more information
18. Asking Questions
19. Contributing
20. Credits and License
+ + diff --git a/faq/install.php b/faq/install.php new file mode 100644 index 0000000..8765a88 --- /dev/null +++ b/faq/install.php @@ -0,0 +1,223 @@ + + +
+

+

+

+

Chapter 4. Installation instructions

These are the generic installation instructions for the Trinity + +Desktop Environment. Please complement your reading with the + +README and INSTALL text files that + +come along with the package. Please read them carefully and try to + +help yourself if anything goes wrong. If you need further + +assistance, consider joining the TDE mailing lists + +(see our web site instructions for joining the TDE + +mailing + +lists).

+

4.1. To the would-be converts
4.2. What kind of hardware do I need to run TDE ?
4.3. Available package formats
4.4. Prerequisites
4.5. Description of the base packages
4.6. Installation instructions for the different package formats
4.7. Post-installation procedures
4.8. Should I remove old version xyz before installing a new + +one?
4.9. How do I start TDE?
4.10. starttde fails with can not connect to X + +server. What is wrong?
4.11. Will I lose my current settings when I update TDE?
4.12. I updated TDE and all seemed to go fine, but when I start TDE, + +I get a blank gray screen, and nothing happens. There are errors in + +the console about DCOPserver. What's going on?
4.13. Is TDE backwards or binary compatible with KDE 3?
4.14. Is TDE backwards or binary compatible with previous releases of TDE?
4.15. Is my KDE 3 profile directory compatible with Trinity?
4.1.

To the would-be converts

You have heard rumors about TDE. Or you have seen screenshots. + +You want test TDE. Yet you know next to nothing + +about this whole alternate operating system business. Don't worry! + +You only need to do some (well, maybe not some) reading, that's all!

TDE does not run on any version of Microsoft Windows. To run + +TDE, you need to have a Unix-like operating system. Please refer to Q:2.2 for more details.

Decide on a platform and set it up for your system. This + +FAQ can not help you with this, since TDE is intended + +to run on many Unix-like platforms.

To obtain TDE, please refer to Q:3.1. If + +you encounter problems while installing TDE, please do not + +hesitate to make use of the TDE mailing lists. No question is too silly to ask, but + +remember to first look for answers in this FAQ.

Good luck and have fun!

4.2.

What kind of hardware do I need to run TDE ?

To run TDE consider at least a Pentium III processor, 512MB of memory, and 500MB of free disk space for a basic installation. A full installation will require about 3GB of hard drive storage space. While TDE will run on slower hardware, performance likely will require some patience. Generally, if your computer runs other desktop environments then the hardware probably is capable of running TDE.

4.3.

Available package formats

You can find binary and source packages for + +different distributions and operating systems on the + +Trinity web site. + +The binary packages are made by dedicated members of the TDE community. + +The only official release is the source tarball + +packages. Please refer to the READMEs and + +INSTALLs in the several binaries folders. + +Find the latest stable release + +here.

4.4.

Prerequisites

You need the Qt library as provided by the TDE developers. Previous + +versions of Qt will not work with the latest TDE. + +Please ensure you download the correct Qt. You will + +also need the header files, if you want to compile TDE + +yourself. They are all available, at no cost, from the TDE repository. + +There are optional libraries that might improve TDE if + +installed on your system. An example is OpenSSL which will enable + +Konqueror to browse web pages securely. These additional packages + +should be provided by your distributor.

4.5.

Description of the base packages

The base distribution currently consists of several + +packages. Some are required, while others are optional. Each package + +is available in each of the aforementioned package formats.

+

tqt3

Required

This package contains the foundational widget support needed by all + +TDE applications.

tqtinterface

Required

Necessary for supporting subsequent versions of Qt.

arts

Required

The core sound system for TDE

tdelibs

Required

This package contains shared libraries that are needed by all + +TDE applications.

tdebase

Required

This package contains the base applications that form the core + +of the Trinity Desktop Environment like the window manager, the terminal + +emulator, the control center, the file manager, and the panel.

aRts

Required

The aRts sound server. A powerful, network transparent sound + +server.

tdeaddons

Optional but recommended

Various plugins for Kate, Kicker, KNewsTicker, Konqueror and Noatun

tdeartwork

Optional

Additional wallpapers, themes, styles, sounds ...

tdebindings

Optional

Various bindings for other languages, including Java, Perl, Python, ...

tdegames

Optional

Various games like KMahjongg, KSnake, KAsteroids, and + +KPatience.

tdegraphics

Optional but recommended

Various graphics-related programs like PostScript previewer, + +DVI previewer, and a drawing program.

tdeutils

Optional but recommended

Various desktop tools like a calculator, an editor and other + +nifty stuff.

tdemultimedia

Optional but recommended

Multimedia applications like a CD player and a mixer.

tdenetwork

Optional

Network applications. Currently contains the instant messaging client Kopete, the + +download manager KGet, and several other network-related programs.

tdepim

Optional but recommended

Personal information management tools. Contains the email client KMail, the newsreader KNode and other related programs.

tdeadmin

Optional but recommended

System administration programs.

tdeedu

Optional

+ +Educational and entertaining applications for TDE's younger users. + +

tdeaccessibility

Optional but recommended

+ +TDE accessibility programs such as a screen magnifier and speech synthesizer front end. + +

tdetoys

Optional

Toys!

tdevelop

Optional

A complete Integrated Development Environment for TDE and Qt

tdewebdev

Optional

Web development applications. Contains such applications as Quanta, an integrated web development environment and other applications useful in web development

tdesdk

Optional

TDE Software Development Kit. Contains a collection of applications and tools used by TDE Developers.

Information about compiling all packages is available at the + + + +Trinity wiki.

Most package management tools will let you put all these + +packages in one folder and install them all at once, figuring out + +the dependencies as they go.

4.6.

Installation instructions for the different package formats

As TDE is intended for many Unix-like systems, please consult the installtion + +procedures and package management document for the system being used.

4.7.

Post-installation procedures

There should be nothing to do after installing the packages except use them! + +Nonetheless, should problems arise, there are some common problems to consider:

+

System search path

Be sure all TDE binary files are installed + +in a location listed in your system's PATH.

Library files

Be sure the TDE library files are installed in the expected locations for your + +system.

TDEDIR environment variable

Be sure the TDEDIR environment variable is correctly set.

starttde script installation

Verify the starttde script is installed to $TDEDIR/bin and therefore in your + +system's search path.

starttde script is run correctly

Be sure the starttde script is being run from within the appropriate + +xinitrc or xsession script.

This should present you with a new TDE desktop. You + +can now start to explore the wonderful world of TDE. In case you + +want to read some documentation first, there is a recommended + +"A Quick Start Guide to the Desktop" + +available in the TDE Help Center. Furthermore, every application has an online + +help that is available via the Help menu.

4.8.

Should I remove old version xyz before installing a new + +one?

In principle, this is not necessary. The various distro package managers + +should handle all dependencies.

If you compile the source code yourself, you should take more care.

4.9.

How do I start TDE?

There are only two methods of starting TDE: using a login + +manager such as TDM or from the command line, using startx. + +The respective startup scripts should contain a reference to the + +starttde script.

4.10.

starttde fails with can not connect to X + +server. What is wrong?

You probably tried to start TDE directly with starttde rather + +than letting the login manager or startx process run that script. From the command + +line the X server is started with startx. + +starttde is the + +script that should be run from your .xinitrc, .xsession, or + +.Xclients to activate the window manager and the necessary server + +daemons for TDE. See also Q:4.9.

4.11.

Will I lose my current settings when I update TDE?

You shouldn't. TDE should transport your settings + +intact. All settings should be safe.

4.12.

I updated TDE and all seemed to go fine, but when I start TDE, + +I get a blank gray screen, and nothing happens. There are errors in + +the console about DCOPserver. What's going on?

+ +TDE uses several temporary files during its operation. + +Usually these directories and files are found in the following locations:

+

  • $HOME/.DCOPserver-* (there are usually two of these; one is a symlink to the other)

  • $HOME/.trinity/socket-hostname

  • $HOME/.trinity/tmp-hostname, which normally is a symlink to the next file:

  • $TMP/tde-USER

  • $HOME/.trinity/socket-hostname, which normally is a symlink to:

  • $TMP/tdesocket-USER

If the symlinks get broken, such as when + +cron or a shutdown script is emptying the + +/tmp folder, then strange + +things will happen. These files, and the symlinks, will all be + +created automatically at the start of TDE so you can safely remove + +them while TDE is not running.

If you are only getting a gray screen when you start TDE, or if you get an error message telling you to Check your installation, then shut down X and delete all the files listed above, then try to restart X.

Normally (i.e. when not updating between TDE versions) it's + +quite safe to leave these files intact, and you may shave a few + +seconds off your TDE startup time by doing so.

4.13.

Is TDE backwards or binary compatible with KDE 3?

While many programs originally designed for KDE 3 will compile on Trinity, binary + +compatibility with KDE 3 is not a goal of TDE developers.

4.14.

Is TDE backwards or binary compatible with previous releases of TDE?

Possibly, but binary compatibility is not a project goal with major point + +releases. A package that built on a previous version of TDE but no longer builds + +on the current release should be brought to the attention of the developers.

4.15.

Is my KDE 3 profile directory compatible with Trinity?

Not quite, but don't worry. Some "scrubbing" cleanup is required to migrate + +a KDE 3 profile. For new users or those with little customization we recommend + +creating a fresh profile. For those long-time users who cringe at the thought + +of recreating their desktop, we provide a migratekde3 shell script. That script + +copies a $HOME/.kde3 profile directory to $HOME/.trinity and performs the required + +"scrubbing" cleanup. Although the script has been tested we provide the tool "as is" + +with no warranties or guarantees. (The script works really well, actually. :-))

+ + diff --git a/faq/introduction.php b/faq/introduction.php new file mode 100644 index 0000000..44c11f6 --- /dev/null +++ b/faq/introduction.php @@ -0,0 +1,154 @@ + + +
+

+

+

+

Chapter 2. Introduction

+

2.1. What is TDE?
2.2. On which platforms can I expect TDE to work?
2.3. Why should I use TDE?
2.4. Is TDE a window manager?
2.5. Is TDE a CDE, Windows or Mac + +OS clone?
2.6. On what platform is TDE based?
2.7. Is TDE free software?
2.8. Why the rebranding and renaming efforts? Why not continue calling the software KDE?
2.9. Why the change in version numbers?
2.10. How is Trinity different from KDE4?
2.1.

What is TDE?

TDE is the Trinity Desktop Environment. The project was initiated + +by Matthias Ettrich in 1996 and originally called the K Desktop Environment. + +The aim of the TDE project is to connect the power of the Unix-like operating + +systems with the comfort of a modern user interface.

For additional information about TDE, check the Trinity web site at + +About Trinity

2.2.

On which platforms can I expect TDE to work?

TDE is a Desktop Environment for all flavors of Unix-like systems. + +While most TDE developers use Linux based systems, TDE should run + +on a wide range of systems. You might need to tweak the + +source code a bit to get TDE to compile on different variant + +of Unix-like systems, or when not using the GNU development tools, in + +particular the gcc compiler.

2.3.

Why should I use TDE?

TDE provides a traditional computer desktop that is snappy and + +responsive. A project goal is to provide a highly customizable + +desktop without forcing any particular feature or effect on users. + +TDE comes with many software tools to provide a productive and enjoyable + +computer desktop system.

2.4.

Is TDE a window manager?

No, TDE is not a window manager. While TDE includes a + +sophisticated window manager (TWin), TDE is much more, providing + +a full integrated desktop environment. TDE includes a web browser, + +a file manager, a window manager, a help system, a + +configuration system, many tools and utilities, and many + +applications, including but not limited to mail + +and news clients, drawing programs, a PDF and a DVI viewer + +and so forth.

2.5.

Is TDE a CDE, Windows or Mac + +OS clone?

TDE is not a clone. Specifically TDE is not a + +Common Desktop Environment (CDE) or Windows clone. + +While developers have and will continue to glean the best features from existing + +desktop environments, TDE is a unique environment that has and + +will continue to go its own way.

2.6.

On what platform is TDE based?

TDE uses C++ and the Qt C++ crossplatform toolkit. + +The TDE development team now maintains the Qt3 toolkit, renamed TQt3.

2.7.

Is TDE free software?

Yes, TDE is free software according to the GNU General + +Public License. All TDE libraries are available under the + +LGPL making commercial software development for the + +TDE desktop possible, but all TDE applications are licensed under + +the GPL.

TDE uses the Qt C++ crossplatform + +toolkit, which, since version 2.2, is released under the + +GPL.

Both TDE and Qt can be made available on + +CD-ROM free of charge. No runtime fees of any kind are + +incurred.

2.8.

Why the rebranding and renaming efforts? Why not continue calling the software KDE?

The "KDE" name, various logos, and related efforts are trademarked by the KDE + +Foundation. Since the Trinity project is not affiliated with the KDE Foundation, + +legally we can't use their trademarks.

2.9.

Why the change in version numbers?

Trinity evolved from the last KDE 3.5 release, 3.5.10. Subsequent Trinity releases + +followed that numbering scheme. Release R14.0.0 marks a turning point in Trinity history + +because a great deal of the code infrastructure was changed. While those changes do not + +effect the usability or look-and-feel of the desktop that users enjoy, Trinity developers + +believe a change in the version scheme distinguishes when those changes occurred. An + +original project goal by users was to retain the flavor of the original KDE 3.5 desktop. + +That goal remains intact. To reflect that original goal, the last number in the original + +version scheme is retained in the new version scheme but is now the primary version number. + +While the infrastructure has changed, the desktop itself remains the same as the original + +KDE 3.5. This new version scheme indicates a modest divergence from the original KDE 3.5 + +series and that Trinity is now its own desktop environment. The new version scheme reminds + +users that Trinity retains the original KDE 3.5 design, but is moving forward as a separate + +desktop project.

2.10.

How is Trinity different from KDE4?

Both desktop environments share common roots to KDE 3.5.10, which was the last + +official release of KDE in the 3.x series. Many KDE developers wanted to break + +from that code chain and tool sets to start afresh. Thus was born KDE4. In + +addition to moving to the Qt4 tool set, the KDE developers revamped the + +underlying KDE code set.

KDE4 and Trinity have different philosophies about work flow preferences. + +KDE4 developers want to support certain work flow concepts and techniques. + +Trinity developers want to maintain a "traditional" desktop environment.

For example, KDE4 offers the following tools:

+

  • Semantic desktop through Nepomuk

  • PIM (Personal Information Management) data caching through Akonadi

  • Desktop file searching through Strigi

  • Activities, a computer desktop metaphor for managing tasks and activities

Whereas TDE offers the following:

+

  • Desktop search through the locate:/ tdeio-slave and Beagle

  • Integrated PIM suite with plugins

  • Related task management using multiple desktops

The KDE developers support alternate desktop interfaces, such as those used + +with netbooks, tablets, and smart phones. TDE provides a single interface that is + +optimized for the mouse/keyboard HCI (Human-computer interaction) model.

Both desktop environments provide an excellent choice for various work + +flows but differ in approach. Trinity leans toward user expectations of how + +desktop environments have functioned traditionally. There is a sense of + +familiarity with that environment many people like. Similarly other users prefer + +the work flow features offered by KDE4 because those features match their + +expectations of how they want their computer to behave. The difference between the + +two environments does not mean one is better, buggier, or slower — only that + +they are different and appeal to different types of people. Although sharing a + +common heritage, both desktops appeal to different groups of people. As always + +with free/libre software, there is a choice.

+ + diff --git a/faq/licensing.php b/faq/licensing.php new file mode 100644 index 0000000..3f8fa41 --- /dev/null +++ b/faq/licensing.php @@ -0,0 +1,74 @@ + + +
+

+

+

+

Chapter 16. Qt and Licensing questions

+

16.1. What is Qt, by the way?
16.2. Why does TDE use Qt?
16.3. Why does TDE not use gtk, xforms, xlib, whatever?
16.4. But Qt isn't free, is it?
16.5. Can I write commercial software for TDE?
16.6. Isn't Qt3 obsolete and "dead" technology?
16.7. Are there plans to migrate TDE to Qt4 or Qt5?
16.1.

What is Qt, by the way?

Qt is a C++-based class library to build user interfaces. It + +also includes many utility classes like string classes and classes + +to handle input and output. It + +provides most of the widgets you will see in a TDE application: + +menus, buttons, sliders, etc. Qt is a cross-platform library that + +allows developers to write code that will compile on Unix-like systems as well as + +Windows and embedded devices. Learn more about Qt at http://www.trolltech.com.

16.2.

Why does TDE use Qt?

Qt is a sophisticated toolkit that provides everything that + +needed to build a modern user interface. Qt is written in C++, thus + +allowing object-oriented development which ensures efficiency and + +code reuse in a project the size and scope of TDE. In our opinion + +there is no better toolkit available for Unix-like systems and that it + +would have been a grave mistake to try to build TDE on anything but + +the best.

16.3.

Why does TDE not use gtk, xforms, xlib, whatever?

There are a number of toolkits available. To provide a + +consistent user interface and to keep used resources such as memory to + +a minimum, TDE can use only one of them. Qt was selected for the + +reasons mentioned above.

16.4.

But Qt isn't free, is it?

Qt is free/libre. Since September 4, 2000, version 2.2 of the Qt + +libraries are licensed under the GPL, thereby + +fulfiling all aspects of free/libre software.

16.5.

Can I write commercial software for TDE?

You can use the TDE libraries to write commercial and + +closed source as well as commercial and open + +source software. If you write open source software you can + +use the Qt free edition. If you write closed source software + +you may not use the Qt free edition; you need to obtain the Qt + +professional edition from Troll Tech. For more information, please + +contact Troll Tech directly.

16.6.

Isn't Qt3 obsolete and "dead" technology?

The definition for "obsolete" varies based upon who applies the term. + +Generally the term "obsolete" means something no longer is useful or no longer + +needed. In software circles the term often means antiquated or no longer shiny. + +Usefulness often is not part of the intended meaning of the word. The term is + +used as an emotional wedge more than a factual observation.

16.7.

Are there plans to migrate TDE to Qt4 or Qt5?

There are no such plans. Porting Trinity to Qt4 is 5 to 10 years of solid work with current project manpower. Indeed, the KDE4 team of developers needed several years to port KDE and they have many more developers.

A fundamental project goal for maintaining Trinity is to keep alive the spirit and functionality of the original KDE3 concepts. Porting to Qt4 does not support that goal. Qt4 functionality is different from Qt3 (now TQt). Those differences conflict with how users want Trinity to function. The Qt4 environment is too different in focus and functionality to be used as the base toolkit of Trinity.

The idea of integrating certain portions of the Qt4 code has not been abandoned. One of the original reasons for the TQt interface layer was to keep open the possibility of adapting portions of Trinity to Qt4. That has already been done. For example, with the qt4-tqt-theme-engine package for Trinity.

More information about the philosophical and design differences between Trinity and KDE4 are available in Q:2.10 of the FAQ introduction.

+ + diff --git a/faq/misc.php b/faq/misc.php new file mode 100644 index 0000000..b4c5a3b --- /dev/null +++ b/faq/misc.php @@ -0,0 +1,122 @@ + + +
+

+

+

+

Chapter 15. Miscellaneous questions

+

15.1. Does TDE support transparency and other visual effects provided by the new composite extension to X.org?
15.2. What about TDE programs that do not have icons? How do I get + +them into the menu?
15.3. Does TDE have a graphical FTP client?
15.4. How do I exit TDE?
15.5. Is there a program that checks for new mails at my + +ISP if and only if I am online?
15.6. Is it really necessary to update to the latest version?
15.7. How do I copy and paste in TDE?
15.8. How do I convert the default Red Hat menus into a menu in the + +TDE menu?
15.9. What is GIT?
15.10. Does TDE support dual screen (Xinerama)?
15.11. How do I check which version of TDE I am using?
15.12. How do I learn about development updates?
15.13. Is there a release schedule?
15.14. Are there plans to support semantic desktops?
15.15. Are there plans to support tablet-like or special netbook desktop modes?
15.16. How do the developers propose to transition away from HAL (hardware abstraction layer)?
15.1.

Does TDE support transparency and other visual effects provided by the new composite extension to X.org?

Yes. TDE supports for the X composite extension and provides its own compositor. This allows for effects such as translucency and drop shadows for all windows, easily configurable through TWin's configuration dialog. For those using an xorg.conf file, be sure the following is included: + + + +

+
+Section "Extensions"
+
+Option  "Composite" "Enable"
+
+EndSection
+
+
+ + + + + + + +After correctly configuring xorg.conf, transparency and other effects can be enabled through the Desktop->Window Behavior KDE Control Center module, under the Translucency tab. + +

15.2.

What about TDE programs that do not have icons? How do I get + +them into the menu?

Use KMenuEdit. To access it use the right mouse button on the + +T button and select Menu Editor.

15.3.

Does TDE have a graphical FTP client?

Yes, and it is none other than your favorite file + +manager, Konqueror. You can drag and drop remote files into local + +folders.

15.4.

How do I exit TDE?

On the panel (kicker) use the left mouse button to select the T + +button and select Log Out.... Another method is to use the right mouse button + +to select an empty area of the desktop, which opens a popup menu, + +containing Log Out... as one of the options. + +Another option is to use a keyboard shortcut, which on many systems is + +Ctrl+Alt+Delete. + +A fourth option is to add the Lock/Logout button applet. + + +

Note

Depending on your configuration of the X Window System, Ctrl+Alt+Backspace + +might also exit TDE by killing the X server, but using that shortcut prevents + +session management and is recommended only for emergencies.

15.5.

Is there a program that checks for new mails at my + +ISP if and only if I am online?

KOrn will do the job. If you are not + +connected, it will just sit there (idling).

15.6.

Is it really necessary to update to the latest version?

We recommend updating to the latest stable release, or at least to stay within + +a release version. Otherwise, getting answers to questions might be challenging. + +Each release always contains bug fixes and enhancements. Often a problem with an old version + +has been fixed in a more recent release. Newer versions also fix security problems. Only seldom are bug and security fixes backported to older releases.

15.7.

How do I copy and paste in TDE?

The simplest method is to use your mouse:

+

  1. Highlight the text you want to copy by holding down the + +left mouse button and dragging across the text. This adds the selected text to the clipboard.

  2. Go to the destination area; depending on your configuration, + +you might need to click it using the left mouse button to give it + +focus.

  3. Click the middle mouse button to paste. If you have a two + +button mouse and are emulating a three button mouse, push both buttons + +simultaneously.

The standard keyboard shortcuts for copying is Ctrl+C, to cut is Ctrl+X, and to paste is Ctrl+V.

TDE provides a multiple layer clipboard called Klipper. Refer to the Klipper Handbook for further information.

15.8.

How do I convert the default Red Hat menus into a menu in the + +TDE menu?

Click on the T button and select + +System->Appfinder.

15.9.

What is GIT?

GIT is a distributed version control and source code management system. + +GIT is used to maintain source code under development. The TDE developers use GIT. + +

15.10.

Does TDE support dual screen (Xinerama)?

Yes, you need to have a multi-headed X server. + +

15.11.

How do I check which version of TDE I am using?

Start any Trinity app. Each app has a Help menu providing + +related information in the About dialog. + +

15.12.

How do I learn about development updates?

You might want to subscribe to the + + + +TDE developer's mail list. + +Refer to http://trinity-devel.pearsoncomputing.net/ + +if you want to read without subscribing.

15.13.

Is there a release schedule?

The Trinity developers strive for a six to nine month schedule but that is not rigid or set in stone.

15.14.

Are there plans to support semantic desktops?

Not at this time.

15.15.

Are there plans to support tablet-like or special netbook desktop modes?

No. The TDE team suggests a tablet-centric interface such as Unity, KDE4, or GNOME 3 for those devices.

15.16.

How do the developers propose to transition away from HAL (hardware abstraction layer)?

The Trinity team developed a new native hardware support layer that is under testing. + +That new system will be enabled by default in a future release, but is available now + +in the development sources.

+ + diff --git a/faq/more-info.php b/faq/more-info.php new file mode 100644 index 0000000..5c88724 --- /dev/null +++ b/faq/more-info.php @@ -0,0 +1,44 @@ + + +
+

+

+

+

Chapter 17. Getting more information

+

17.1. Where is the TDE homepage?
17.2. Is there a TDE mailing list?
17.3. How do I subscribe/unsubscribe to these lists?
17.4. Is there a mailing list archive?
17.1.

Where is the TDE homepage?

The TDE homepage is located at http://www.trinitydesktop.org/.

17.2.

Is there a TDE mailing list?

There are several TDE mailing lists. Each focuses on a different + +aspect of TDE. Some are for developers, so they are not + +discussed in detail. Some of the more important lists that users + +might be interested in are:

+

tde-users

For general discussion, users helping each other.

tde-announce

Announcements of TDE news

tde-devel

For developers, artists, documentation writers.

For the complete list of mailing lists available, please refer + +to http://www.trinitydesktop.org/mailinglist.php.

Please note that it is not a good idea to ask questions that are + +already answered in this FAQ.

17.3.

How do I subscribe/unsubscribe to these lists?

To subscribe, follow the directions here: + +Official Mailing Lists + +

17.4.

Is there a mailing list archive?

Yes, each list has a searchable archive: + + + + +

tde-users

General discussion archives.

tde-announce

Announcement archives.

tde-devel

Developers, artists, documentation writer archives.

+ + + +

+ + diff --git a/faq/non-tde-apps.php b/faq/non-tde-apps.php new file mode 100644 index 0000000..a4c55e6 --- /dev/null +++ b/faq/non-tde-apps.php @@ -0,0 +1,76 @@ + + +
+

+

+

+

Chapter 13. TDE with non-TDE applications

+

13.1. My non-TDE applications like Emacs and + +kterm are running amok with strange + +colors!
13.2. How can I set my default web browser to be something other + +than Konqueror?
13.3. How can I configure the style and fonts of GTK + +applications within TDE ? + +
13.1.

My non-TDE applications like Emacs and + +kterm are running amok with strange + +colors!

Start the TDE Control Center and in + +Appearance & Themes-> + +Colors, uncheck the "Apply colors to + +non-TDE applications" checkbox, and click + +Apply.

13.2.

How can I set my default web browser to be something other + +than Konqueror?

Open the KDE Control Center and + +navigate to the TDE Components->Component + +Chooser panel. Select Web + +Browser from the list on the left, then select Open + +http and https URLs in the following browser: and type in the + +name of the browser (e.g. mozilla, + +firefox, opera, etc.) + +in the textbox.

13.3.

How can I configure the style and fonts of GTK + +applications within TDE ? + +

+ +Install the qt-gtk-engine package, which is available as part of TDE. This + +theme engine makes GTK applications look like your TDE widget style + +by calling functions from Qt instead of drawing the styles itself. Once + +the theme engine has been installed, there will be a KDE Control Center module + +under Appearance & Themes->GTK + +Styles and Fonts. + +

+ + diff --git a/faq/panel.php b/faq/panel.php new file mode 100644 index 0000000..20580cc --- /dev/null +++ b/faq/panel.php @@ -0,0 +1,153 @@ + + +
+

+

+

+

Chapter 5. The panel

+

5.1. How do I add applications to the TDE panel (Kicker)?
5.2. How do I change the menu T button of + +the panel to another picture?
5.3. After updating TDE, my TDE menu appears to be empty! How can I get my menu back? + +
5.4. My desktop panel has disappeared. How can I get it + +back?
5.5. How can I start an application minimized to the system + +tray?
5.6. How do I use the Windows key to open the TDE menu?
5.1.

How do I add applications to the TDE panel (Kicker)?

There are several ways to add an application to the panel. + +The easiest is to right-click on the panel, and from the context + +menu that appears, select Add Application to + +Panel.

For more ways of adding buttons to the panel, refer to the + +Kicker Handbook.

5.2.

How do I change the menu T button of + +the panel to another picture?

The simplest way is to right-click on the panel, from the context menu + +select Configure Panel, from the icon list on the left side, + +select Menus, then inside the TDE Menu grouping, select the TDE Menu button icon. + +

5.3.

After updating TDE, my TDE menu appears to be empty! How can I get my menu back? + +

+ +User modifications to the TDE menu are stored in + +$HOME/.config/menus/applications-tdemenuedit.menu. + +Try moving this file out of the way and then issuing the + +command tdebuildsycoca + +--noincremental. This should restore you to the + +default system menus. If that is the case you'll have to recreate your customized menu. + +

5.4.

My desktop panel has disappeared. How can I get it + +back?

The panel disappearing is usually due to a crash. This might be + +caused by loading an applet that has a fatal bug or a bad installation + +of TDE and/or the panel.

The easiest way to get the panel back is to launch the + +Run Command window by pressing Alt+F2 and entering + +kicker, and then pressing the + +OK button.

If the panel continues to disappear, you may wish to either + +remove or edit by hand your + +$TDEHOME/share/config/kickerrc + +file, where $TDEHOME is usually + +~/.trinity. If you choose to edit + +by hand, start by removing the applet entry groups.

5.5.

How can I start an application minimized to the system + +tray?

Use ksystraycmd. For example, to start a Konsole hidden + +in the system tray, run ksystraycmd + +--hidden konsole. For + +more information about ksystraycmd, see the section + +Advanced Window Management in the TDE + +User Guide.

5.6.

How do I use the Windows key to open the TDE menu?

Previous versions of TDE provided a trick to allow you to + +use the Windows key both as a modifier (so you could have shortcuts + +like Win+R), and as a regular key (so that pressing + +Win on its own could open the TDE menu). This feature + +was removed for reasons of usability and accessibility, as well as + +keeping the code clean. For current versions of TDE, you have two + +options: either use a different shortcut to open the TDE menu (the + +default is Alt+F1), or remap the Win key to be a regular + +key, rather than a modifier.

If you choose to do the second, here's one way: + + + + +

  1. Find the keycode for your Win key + +using xev: Run the command + +xev in a Konsole, and + +press the Win key. Look in the output of + +xev for + +keycode n, + +where n is the keycode of the + +Win key.

  2. Use xmodmap to remap the + +Win key. An appropriate command is xmodmap + +-e 'keycode + +n=Menu'.

  3. In the KDE Control Center, go to + +Regional & + +Accessibility->Keyboard Shortcuts and set the shortcut for Popup Launch + +Menu to the Win key. You should now be + +able to popup the TDE menu by pressing the Win key.

  4. One more step is required to save the changes across + +settings: Create a file ~/.trinity/env/win-key.sh + +(create the directory if it doesn't exist), and add the + +xmodmap command you used previously to it. The + +change should now be applied every time you start TDE.

+ +

+ + diff --git a/faq/questions.php b/faq/questions.php new file mode 100644 index 0000000..c56a866 --- /dev/null +++ b/faq/questions.php @@ -0,0 +1,156 @@ + + +
+

+

+

+

Chapter 18. Asking Questions

To get an appropriate answer to questions requires asking a clear + +question in a manner that motivates people to help. Writing questions that + +appear to be rude, lazy, or uses bad or unclear language likely will result + +in your question being ignored.

+

18.1. What do I do before I ask?
18.2. Where do I ask?
18.3. How do I ask?
18.4. What do I do when told to look elsewhere?
18.1.

What do I do before I ask?

Read the documentation and FAQ for the application. There is + +a wealth of TDE documentation availible both in the help center and + +online. A lot of time and effort has gone into this documentation, and + +often the answer to your question is there. The general TDE userguide + +can be found by typing help:/khelpcenter/userguide + +into the Konqueror address bar or + +khelpcenter help:/khelpcenter/userguide with the minicli.

Search the web: Usually searching for a specific error message or + +searching mailing list archives will find a solution.

Try it and see! Look through all the application options, read the + +What's this? and tooltips for the ones you're not sure about. If you're + +really unsure about an option save your data and then try. As long as you + +use common sense you are unlikely to break anything by experimenting.

Don't be lazy. If you show the people who you are asking + +that you are able to troubleshoot and research in a logical manner, you're + +showing them you're a reasonable person who is worth their time to + +help. It's your problem and not theirs so the legwork is yours to do. Save + +your helpers as much time as you can.

18.2.

Where do I ask?

Usually the best place to ask a question is on the + +IRC channels and mailing lists devoted to user + +questions. Don't post simple questions about using TDE to the devel + +channels and mailing lists, these are for technical discussions. Some good + +places are chat.freenode.net, channel: #trinity-desktop, and the TDE mailing + +lists. + +

18.3.

How do I ask?

Try to word your questions in a manner that gives the most + +information possible and is polite and courteous. Don't ask to ask, just + +ask!

Q: TDE sucks, it's slow

This is not a question that is likely to get you a useful answer. It does + +not give any useful information about troubleshooting the problem, and it + +starts out attacking the software in a way that isn't productive.

Q: Since updating TDE on Slackware Linux using sources, I have + +noticed it's being really slow sometimes + +applications take up to 20 seconds to launch. I am using the same user + +configuration as I had with the previous version. I have tried as a new + +user. I can't find anything about this on the mailing lists or by a web + +search. Could anyone point me to some information that could help?

This question is polite, contains information to help people + +troubleshoot the problem and shows your helpers what avenues you have + +already tried.

Don't presume automatically that the problem is the fault of + +TDE. Otherwise you likely will annoy people.

Use clear language with correct spelling. Watch out for any + +ambiguities and make sure you think about what you say before you write + +it. If you are asked for clarification, give it as best you can. TDE is a + +project where many of the users and developers are not native english + +speakers and if you don't use correct english, misunderstandings might + +ensue. Be patient. Use the language appropriate to the channel or mailing list you are + +in if you don't, people who might have been able to help you might + +ignore your message because it is not in a language they understand.

Include all information that could be relevant, even when you're not + +sure. Have you updated other software or hardware on your system, + +particularly system libraries or a new kernel? These things could affect how + +TDE performs. Even when you cannot see a connecting cause, someone else might.

Don't paraphrase error messages. Paste in the exact error, and if it's + +more than a line or two don't paste them directly into an + +IRC channel. Use an online paste service. If you + +must type the messages by hand, be sure you are accurate. When you provide + +faulty information, your helpers cannot help you as easily.

Follow through on your solution! Tell people when the solution worked, or when you have + +solved the problem yourself. This helps everybody involved know when + +solutions work and helps other users who might be searching for a similar + +solution to the problem.

18.4.

What do I do when told to look elsewhere?

Possibly you have not followed the above + +advice. You've not done your research, and the solution probably is one the + +helper knows very well to be easy to find. When provided a web link to an + +FAQ or documentation don't say, No, I don't + +want to have to read this I want you to just tell me. That response + +is considered bad manners. People who don't provide effort to learn often + +find others have little incentive to help.

Use common courtesy. TDE users and developers volunteer their time + +out of an already very busy schedule, and like to + +know that you are appreciating they are helping you for free. Be + +polite, say please and thank you, be constructive, and try to be pleasant and + +friendly.

Does this seem like a lot of trouble to ask a question? If you want + +to be able to feel that people owe you an answer or support, then you're + +quite welcome to pay for commercial support from companies that support + +TDE on Unix-like platforms. If you don't want to pay money, then pay the + +people who do this for free with your politeness and appreciation. :-)

If you think the answer to your question should be included in the + +TDE FAQ please feel free to submit any patches or suggestions to the + +TDE FAQ Maintainer, at

+ + diff --git a/faq/sound.php b/faq/sound.php new file mode 100644 index 0000000..306e5b5 --- /dev/null +++ b/faq/sound.php @@ -0,0 +1,72 @@ + + +
+

+

+

+

Chapter 12. Troubleshooting sound problems

TDE uses the aRts sound system which is complex and powerful, + +making it difficult for some users to troubleshoot when things go + +wrong. Here are some tips to help you diagnose what it's doing when your + +sound misbehaves :

+

12.1. How can I troubleshoot sound related problems in TDE?
12.2. + +I've updated to the latest version of TDE keeping my previous configuration and my system sounds don't work anymore!
12.1.

How can I troubleshoot sound related problems in TDE?

To check that sound is working independently of aRts, make + +sure that artsd isn't running and then try playing sound + +through XMMS or another multimedia application + +that isn't a part of TDE. If that application doesn't play sound, then + +your general sound setup is probably broken and it's not a TDE + +problem.

Try playing sound with + +artsplay + +/path/to/some/soundfile. Try various + +formats, ogg, mp3 and wav. Any error messages there might be useful in + +pointing you in the right direction.

Try setting the aRts output method to OSS. In the + +KDE Control Center go to Sound & Multimedia->Sound System. On the + +Hardware tab, under Select the audio + +device choose Open Sound System. If you are + +running alsa this will use the OSS + +emulation, which may give better or worse results.

Running artsd -l + +0 from a terminal will give you a lot of debug output, + +some of which might help you to diagnose the problem. Trying this in + +conjunction with using artsplay in a second terminal can give a wealth of information. If an artsd instance is already running, exit it with artsshell + +terminate

12.2.

+ +I've updated to the latest version of TDE keeping my previous configuration and my system sounds don't work anymore!

+ +Assuming you've installed aRts correctly and you still have the codecs installed your previous TDE installation needed, possibly there is a problem with your knotifyrc. To confirm this, try temporarily + +renaming the file. A new one will be created when starting TDE. + +

+ + diff --git a/faq/tips.php b/faq/tips.php new file mode 100644 index 0000000..fa7b52f --- /dev/null +++ b/faq/tips.php @@ -0,0 +1,96 @@ + + +
+

+

+

+

Chapter 14. Useful tips

+

14.1. Reading documentation in TDE
14.2. Move or resize windows quickly
14.3. Killing windows in TDE
14.4. What if something is so wrong that I can't even get the skull + +& crossbones cursor? How do I get out of a total lockup?
14.1.

Reading documentation in TDE

Pop up the Run Command window (Alt+F2 by + +default) and type: + + +

  • man:command for man pages. It + +even unpacks on the fly if the man pages are gzipped.

  • info:command for info + +pages.

  • help:kdeappname for TDE + +application help pages.

+ +

You can enter any of these in the Location text + +box in Konqueror.

Uou can use the TDE Help Center. Start the TDE Help Center by selecting Help from the TDE menu. Once the TDE Help Center has loaded, the window on the left will contain an entry called + +Unix manual pages. Select that entry to browse through all the installed manual pages on your + +system.

14.2.

Move or resize windows quickly

To move a window, use Alt+left mouse + +button. Alt+right mouse + +button will resize the window. Last but not least, Alt+middle mouse button + +raises/lowers the window. The TDE Control Center + +allows you to change these mouse bindings. Please refer to + +"Windows, How To Work Them" in the Trinity user guide for more information.

14.3.

Killing windows in TDE

There is a standard keybinding (Ctrl+Alt+Esc) + +that changes the mouse pointer to a skull & crossbones cursor. Click that cursor on a + +window to kill it. The keybindings are viewable/changeable from the + +TDE Control Center. + + + + +

Caution

Using this option kills the program forcibly. Data might be lost, + +and some processes related to the program might remain active. Use only as a + +last resort.

+ +

14.4.

What if something is so wrong that I can't even get the skull + +& crossbones cursor? How do I get out of a total lockup?

These kind of locks tend to occur when an application locks up + +while it has a so called mouse/keyboard grab. When that + +happens you can try to select a virtual text console with Ctrl+Alt+F1 and login. With the + +following command you will get a list of all running processes:

        ps -aux | more

By killing the process that has the mousegrab, your desktop will + +come to life again. Unfortunately you can't see which process that is, + +so you will have to find out through trial and error. To kill a process + +use:

        kill -9 pid

Here pid is the process id of the + +process, which is the first number on each line reported by + +ps -aux.

You can switch back to the desktop with Ctrl+Alt+F7 (or + +F8 through F9 depending on your + +operating system) to see if things work again. When you press + +Alt+Tab you should get a + +response from the window manager. If not, you need to get back to the + +text console and try to kill another process.

+ + diff --git a/faq/webbrowser.php b/faq/webbrowser.php new file mode 100644 index 0000000..62f8cd4 --- /dev/null +++ b/faq/webbrowser.php @@ -0,0 +1,201 @@ + + +
+

+

+

+

Chapter 9. Webbrowsing with Konqueror

Konqueror is TDE's default web browser. Please refer to + +Konqueror Handbook for detailed information.

+

9.1. Where does the name Konqueror come from?
9.2. Can I run Konqueror without running TDE?
9.3. Why doesn't Konqueror show the contents of an image's ALT attribute in a tooltip?
9.4. How do I use Konqueror as a web browser with a proxy?
9.5. How do I import bookmarks from another browser into Konqueror ?
9.6. How can I make Konqueror only show certain bookmarks in the bookmarks toolbar?
9.7. How do I fool a site into believing Konqueror is Netscape or + +some other browser?
9.8. Konqueror is taking a really long time to load web pages -- mdash; what + +could cause this?
9.9. How do I configure Konqueror to run Java applets?
9.10. How do I block unrequested popup windows in Konqueror?
9.11. Why doesn't my banking site work with Konqueror? It pops up a new + +window with the login screen in other browsers, but not in + +Konqueror.
9.12. Can Konqueror use user-specified stylesheets, like those in the + +Firefox adblock extension?
9.13. + +Why does Konqueror display a plain grey square when I try to view flash animations, even though the flash plugin is installed? + +
9.14. When I try to open a web page with Konqueror, I get the + +message: There appears to be a configuration error. You have + +associated Konqueror with text/html, but it cannot handle this file + +type.
9.1.

Where does the name Konqueror come from?

It's a word play on the other browsers' names. After the Navigator + +and the Explorer comes the Conqueror.

9.2.

Can I run Konqueror without running TDE?

Yes. Install Qt, tdelibs, and tdebase. From your window manager launch Konqueror. It should work just fine, but if it doesn't (TDE developers don't often test that use case), report the problem to http://bugs.pearsoncomputing.net/. Before reporting a bug, try running "tdeinit" before running Konqueror. This is of course the same for any other TDE application running in + +a non TDE setup.

9.3.

Why doesn't Konqueror show the contents of an image's ALT attribute in a tooltip?

+ +There is no standard that states the ALT attribute should appear as a tooltip. The specification calls for ALT to be displayed in place of the image, as in text-mode only browsers such at lynx or w3m. Abusing the ALT attribute is bad for accessibility. Tooltips are supposed to come from the TITLE attribute and this is implemented in Konqueror. + +

9.4.

How do I use Konqueror as a web browser with a proxy?

Konqueror can be used with HTTP and FTP proxies. To set + +up the proxy server in Konqueror, select + +Settings->Configure + +Konqueror... from the Konqueror menu and + +select the Proxy option.

9.5.

How do I import bookmarks from another browser into Konqueror ?

To import bookmarks from another browser into Konqueror, from the menu + +bar select Bookmarks, then select Edit Bookmarks. + +In the Bookmark Editor, select + +File then select Import. Select + +the browser from which you would like to import bookmarks. In the Open dialog, + +navigate to the location of the folder or file your bookmarks are + +located. + +

9.6.

How can I make Konqueror only show certain bookmarks in the bookmarks toolbar?

In Konqueror select Settings->Configure + +Konqueror.... Then select Web Behaviour from the icon list. Under the Bookmarks heading, place a check in the box next to Show only marked bookmarks in bookmark toolbar.

In the Bookmark Editor an option to Show in Toolbar appears on clicking with the right mouse button on any bookmark entry or in the Edit menu when the entry is highlighted. Folders can also be shown in the bookmarks toolbar in much the same way.

9.7.

How do I fool a site into believing Konqueror is Netscape or + +some other browser?

That is called setting the user agent. In Konqueror, select + +Settings->Configure + +Konqueror.... In the icon list, select + +Browser Identification. Default + +and site-specific browser identifications can be set there.

9.8.

Konqueror is taking a really long time to load web pages -- mdash; what + +could cause this?

Quite often Konqueror loading web pages slowly is caused by + +DNS servers with broken IPV6 + +support. Adding the following to /etc/profile or any + +other script that is sourced on login should solve this problem: + +

+
+export TDE_NO_IPV6=true
+
+
+ +for bourne compatible shells, and for C-style shells: + +
+
+setenv TDE_NO_IPV6 true
+
+
+ +

9.9.

How do I configure Konqueror to run Java applets?

From Konqueror's menubar choose + +Settings->Configure + +Konqueror.... + +From the icon list select Java & Javascript. Set the + +Path to Java executable.

9.10.

How do I block unrequested popup windows in Konqueror?

Konqueror provides a 'smart' policy for JavaScript popups. From the + +Konqueror main window, selectSettings->Configure + +Konqueror.... Then + +Java & JavaScript. On the + +JavaScript tab, under Global JavaScript + +Policies, set the radio button beside Open new + +windows: to Smart. + +

9.11.

Why doesn't my banking site work with Konqueror? It pops up a new + +window with the login screen in other browsers, but not in + +Konqueror.

+ +Make sure you have Javascript enabled, and the default JavaScript web popups + +policy set to Ask or Allow. The + +Smart policy is not always sufficient for some banks. + +Many banks also require Java support. + +

9.12.

Can Konqueror use user-specified stylesheets, like those in the + +Firefox adblock extension?

Yes, you can set Konqueror to use any kind of valid + +css stylesheet to filter webcontent or improve accessibility. + +From the Konqueror main window simply click + +Settings->Configure + +Konqueror... and select + +Stylesheets. Set the radio button to + +Use user-defined stylesheet and browse to where the + +stylesheet you want to use is located. Alternately, select + +Use accessibility stylesheet defined in "Customize" + +tab and then set your own options.

9.13.

+ +Why does Konqueror display a plain grey square when I try to view flash animations, even though the flash plugin is installed? + +

+ +Under the latest versions of X.org, having the composite extension loaded can cause problems with the flash plugin. Try disabling the composite extension and see whether normal flash operation is restored. + +

9.14.

When I try to open a web page with Konqueror, I get the + +message: There appears to be a configuration error. You have + +associated Konqueror with text/html, but it cannot handle this file + +type.

Make sure the embedding settings for the text/html + +MIME type are correct: + + +

  1. In Konqueror, go to + +Settings->Configure + +Konqueror.... In the icon list select File + +Associations.

  2. Open + +text->html in the tree view.

  3. Click on the + +Embedding tab. Make sure that Left Click + +Action is set to Show file in embedded + +viewer, and that TDEHTML (tdehtml) is at the top + +of Services Preference Order.

+ +

+ + diff --git a/faq/windowmanager.php b/faq/windowmanager.php new file mode 100644 index 0000000..4a41cb8 --- /dev/null +++ b/faq/windowmanager.php @@ -0,0 +1,94 @@ + + +
+

+

+

+

Chapter 7. The window manager

The default window manager provided by TDE is the Trinity Window + +Manager (TWin). Please refer to + +"Windows, How To Work Them" in the Trinity user guide for more information.

+

7.1. Are there keyboard shortcuts for TWin operations?
7.2. Can I define my own set of keyboard shortcuts?
7.3. When I "iconify" a window, it disappears. Where does it + +go?
7.4. How do I maximize windows only vertically or horizontally?
7.5. What is shading a window?
7.6. How can I start an application with special window options, like + +maximized/minimized/to stay on top?
7.1.

Are there keyboard shortcuts for TWin operations?

Yes. Please use to the Trinity Control Center (KControl), + +Regional & Accessibility-> + +Keyboard Shortcuts, for the + +list of available shortcuts.

7.2.

Can I define my own set of keyboard shortcuts?

Yes. Launch the + +TDE Control Center and select + +Regional & Accessibility->Keyboard Shortcuts to + +configure window manager bindings like maximizing windows, etc.. + +

7.3.

When I "iconify" a window, it disappears. Where does it + +go?

With many X Window System GUIs, the minimize button (a little dot) will + +erase the window that the program is running in and create, instead, + +an icon on the desktop. TDE does not do this. Instead, when a + +window is iconified it is simply hidden (but the program is still + +running).

There are a few ways to access disappeared windows:

+

  • If you are running the taskbar part of Kicker, + +you can choose to have a list of tasks displayed on your desktop. + +Iconified tasks will have their names displayed in gray.

  • If you click the middle mouse button on the root window (i.e., + +the background of the desktop), TWin will give you a list + +of all available tasks.

7.4.

How do I maximize windows only vertically or horizontally?

Provided your window is not already maximized, clicking on the + +maximize button with the left mouse button/middle mouse button/right mouse button will + +maximize fully/vertically/horizontally respectively.

7.5.

What is shading a window?

By shading a window we mean rolling up the window leaving just + +the title bar visible. You can do this by double clicking on the + +window title bar.

7.6.

How can I start an application with special window options, like + +maximized/minimized/to stay on top?

Use the kstart command. As an example, to + +open KCalc with the Stay on Top option, use: + +

% kstart --ontop kcalc
+ +

For maximized windows, use the --maximize + +option, for minimized windows, use --iconify. You can + +see a full list of kstart options with + +kstart + +--help-all.

+

Warning

If you're using kstart to start + +applications at TDE startup, you should use the + +--window option. See the TDE User Guide, section + +Advanced Window Management for more information about + +this feature.

+ + diff --git a/favicon.ico b/favicon.ico new file mode 100755 index 0000000..bdc13a4 Binary files /dev/null and b/favicon.ico differ diff --git a/features.php b/features.php new file mode 100644 index 0000000..161fd70 --- /dev/null +++ b/features.php @@ -0,0 +1,38 @@ + + + diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..eea0703 --- /dev/null +++ b/footer.php @@ -0,0 +1,22 @@ +'); + date_default_timezone_set('UTC'); #else the interpreter whines + echo('

The handbooks are the primary help files provided with Trinity. Browse the most recent versions +on-line here: +

Welcome to Trinity +
Trinity Users' Manual +
Application Manuals +
Applet Manuals +
Control Center Modules +
Ioslaves +
Konqueror Plugins +
Tutorials + + diff --git a/header.php b/header.php new file mode 100644 index 0000000..5ff365f --- /dev/null +++ b/header.php @@ -0,0 +1,120 @@ + array("_" => $maindir . "index.php", + "News" => $maindir . "news.php", + "Features" => $maindir . "features.php", + "About" => $maindir . "about.php", + "Contact" => $maindir . "support.php", + "Screenshots" => $maindir . "screenshots.php", + ), + "Get Trinity" => array("_" => $maindir . "releases.php", + "Packages" => $maindir . "releases.php", + "LiveCDs" => "https://wiki.trinitydesktop.org/LiveCDs", + ), + "Documentation" => array("_" => $maindir . "./docs/index.php", + "FAQ" => $maindir . "faq/index.php", + "Installation" => "https://wiki.trinitydesktop.org/Category:Documentation#Installing_from_a_Package_Manager", + "Applications" => $maindir . "applications.php", +# "Handbooks" => $maindir . "handbooks.php", + ), + "Bugs" => array("_" => "https://bugs.trinitydesktop.org/buglist.cgi?quicksearch=ALL"), + "Wiki" => array("_" => "https://wiki.trinitydesktop.org/"), + "Support" => array("_" => $maindir . "support.php", + "Wiki" => "https://wiki.trinitydesktop.org/", + "Bugs" => "https://bugs.trinitydesktop.org/buglist.cgi?quicksearch=ALL", + "Docs" => "https://wiki.trinitydesktop.org/Category:Documentation", + "Mailing Lists" => $maindir . "mailinglist.php", + "Service Alerts" => $maindir . "servicealerts/", + ), + "Development" => array("_" => $maindir . "development.php", + "GIT" => "http://mirror.git.trinitydesktop.org/cgit/", + "Commit History" => "/patches", + "Packaging GIT" => "http://mirror.git.trinitydesktop.org/cgit/tde-packaging/", + "uLab GIT" => "http://mirror.git.trinitydesktop.org/cgit/ulab/", + "Secure GIT" => "https://git.trinitydesktop.org/cgit/", + "Nightly Builds" => "https://quickbuild.pearsoncomputing.net/~trinity/+archive/ubuntu/trinity-nightly-builds/", + "API Docs" => $maindir . "apidocs.php", + "Related Projects" => $maindir . "relatedprojects.php", + "Supported RFEs" => $maindir . "crfe/", + "Get Involved" => $maindir . "helpwanted.php", + "CLAs" => $maindir . "cla/", + "TDE Team" => $maindir . "contributors.php", + "Donations" => $maindir . "donate.php", + ), + ); +?> +"; + echo ""; + echo ""; + echo " $pageTitle"; + echo " "; + if ($navItem == "Screenshots") { + echo " "; + echo " "; + } + echo " "; + echo ""; +?> + +

+ "; + } +?> +
+
+
+ +
+
+ + diff --git a/helpwanted.php b/helpwanted.php new file mode 100644 index 0000000..095c84f --- /dev/null +++ b/helpwanted.php @@ -0,0 +1,42 @@ + + +

Getting Involved with Trinity Development

+ +

+ So you think you have what it takes to become a Trinity + Desktop Developer? Great! Getting started with a new project + can be intimidating, but here at the Trinity project we love new + developers! If you have any area of expertise that you think + could be helpful, we encourage you to speak up. The first + thing to do is poke around the website, the wiki, and the + mailing list logs in order to get acquainted with the project. + Emailing the developers mailing list is the best way to be + recognized and start helping out. Patches are always welcome + as well as new ideas. We look forward to your contributions! +

+

+ Note that for legal reasons you need to sign a CLA before submitting patches or making commits. We do not transfer copyright; the CLA simply formalizes our rights to use your open-source work in our open-source project. +

+

+ While all are welcome, the Trinity team is currently looking for help in the following specific areas: +

+
    +
  • Application bugfixes +
  • Bluetooth support +
  • Language translation/support +
  • Artwork +
  • UI design review +
+

+ If you believe you can assist in these areas, please contact us. +

+ diff --git a/highslide/graphics/close.png b/highslide/graphics/close.png new file mode 100644 index 0000000..4de4396 Binary files /dev/null and b/highslide/graphics/close.png differ diff --git a/highslide/graphics/closeX.png b/highslide/graphics/closeX.png new file mode 100644 index 0000000..cf5d018 Binary files /dev/null and b/highslide/graphics/closeX.png differ diff --git a/highslide/graphics/controlbar-black-border.gif b/highslide/graphics/controlbar-black-border.gif new file mode 100644 index 0000000..e2403fe Binary files /dev/null and b/highslide/graphics/controlbar-black-border.gif differ diff --git a/highslide/graphics/controlbar-text-buttons.png b/highslide/graphics/controlbar-text-buttons.png new file mode 100644 index 0000000..d2f72e0 Binary files /dev/null and b/highslide/graphics/controlbar-text-buttons.png differ diff --git a/highslide/graphics/controlbar-white-small.gif b/highslide/graphics/controlbar-white-small.gif new file mode 100644 index 0000000..462fce7 Binary files /dev/null and b/highslide/graphics/controlbar-white-small.gif differ diff --git a/highslide/graphics/controlbar-white.gif b/highslide/graphics/controlbar-white.gif new file mode 100644 index 0000000..1f143f5 Binary files /dev/null and b/highslide/graphics/controlbar-white.gif differ diff --git a/highslide/graphics/controlbar2.gif b/highslide/graphics/controlbar2.gif new file mode 100644 index 0000000..39ad652 Binary files /dev/null and b/highslide/graphics/controlbar2.gif differ diff --git a/highslide/graphics/controlbar3.gif b/highslide/graphics/controlbar3.gif new file mode 100644 index 0000000..3eebb81 Binary files /dev/null and b/highslide/graphics/controlbar3.gif differ diff --git a/highslide/graphics/controlbar4-hover.gif b/highslide/graphics/controlbar4-hover.gif new file mode 100644 index 0000000..ca08b59 Binary files /dev/null and b/highslide/graphics/controlbar4-hover.gif differ diff --git a/highslide/graphics/controlbar4.gif b/highslide/graphics/controlbar4.gif new file mode 100644 index 0000000..7a3ad34 Binary files /dev/null and b/highslide/graphics/controlbar4.gif differ diff --git a/highslide/graphics/fullexpand.gif b/highslide/graphics/fullexpand.gif new file mode 100644 index 0000000..26d9ed0 Binary files /dev/null and b/highslide/graphics/fullexpand.gif differ diff --git a/highslide/graphics/geckodimmer.png b/highslide/graphics/geckodimmer.png new file mode 100644 index 0000000..309bb27 Binary files /dev/null and b/highslide/graphics/geckodimmer.png differ diff --git a/highslide/graphics/icon.gif b/highslide/graphics/icon.gif new file mode 100644 index 0000000..b74a073 Binary files /dev/null and b/highslide/graphics/icon.gif differ diff --git a/highslide/graphics/loader.gif b/highslide/graphics/loader.gif new file mode 100644 index 0000000..0b31f6f Binary files /dev/null and b/highslide/graphics/loader.gif differ diff --git a/highslide/graphics/loader.white.gif b/highslide/graphics/loader.white.gif new file mode 100644 index 0000000..f2a1bc0 Binary files /dev/null and b/highslide/graphics/loader.white.gif differ diff --git a/highslide/graphics/outlines/Outlines.psd b/highslide/graphics/outlines/Outlines.psd new file mode 100644 index 0000000..5405651 Binary files /dev/null and b/highslide/graphics/outlines/Outlines.psd differ diff --git a/highslide/graphics/outlines/beveled.png b/highslide/graphics/outlines/beveled.png new file mode 100644 index 0000000..fc428f4 Binary files /dev/null and b/highslide/graphics/outlines/beveled.png differ diff --git a/highslide/graphics/outlines/drop-shadow.png b/highslide/graphics/outlines/drop-shadow.png new file mode 100644 index 0000000..0186c2e Binary files /dev/null and b/highslide/graphics/outlines/drop-shadow.png differ diff --git a/highslide/graphics/outlines/glossy-dark.png b/highslide/graphics/outlines/glossy-dark.png new file mode 100644 index 0000000..3c64c0d Binary files /dev/null and b/highslide/graphics/outlines/glossy-dark.png differ diff --git a/highslide/graphics/outlines/outer-glow.png b/highslide/graphics/outlines/outer-glow.png new file mode 100644 index 0000000..288d43f Binary files /dev/null and b/highslide/graphics/outlines/outer-glow.png differ diff --git a/highslide/graphics/outlines/rounded-black.png b/highslide/graphics/outlines/rounded-black.png new file mode 100644 index 0000000..a77e65d Binary files /dev/null and b/highslide/graphics/outlines/rounded-black.png differ diff --git a/highslide/graphics/outlines/rounded-white.png b/highslide/graphics/outlines/rounded-white.png new file mode 100644 index 0000000..0d4b817 Binary files /dev/null and b/highslide/graphics/outlines/rounded-white.png differ diff --git a/highslide/graphics/resize.gif b/highslide/graphics/resize.gif new file mode 100644 index 0000000..9100de7 Binary files /dev/null and b/highslide/graphics/resize.gif differ diff --git a/highslide/graphics/scrollarrows.png b/highslide/graphics/scrollarrows.png new file mode 100644 index 0000000..b3d5575 Binary files /dev/null and b/highslide/graphics/scrollarrows.png differ diff --git a/highslide/graphics/zoomin.cur b/highslide/graphics/zoomin.cur new file mode 100644 index 0000000..cb79124 Binary files /dev/null and b/highslide/graphics/zoomin.cur differ diff --git a/highslide/graphics/zoomout.cur b/highslide/graphics/zoomout.cur new file mode 100644 index 0000000..acf6199 Binary files /dev/null and b/highslide/graphics/zoomout.cur differ diff --git a/highslide/highslide-full.js b/highslide/highslide-full.js new file mode 100644 index 0000000..dfaec6a --- /dev/null +++ b/highslide/highslide-full.js @@ -0,0 +1,3293 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash +Author: Torstein Hønsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +var hs = { +// Language strings +lang : { + cssDirection: 'ltr', + loadingText : 'Loading...', + loadingTitle : 'Click to cancel', + focusTitle : 'Click to bring to front', + fullExpandTitle : 'Expand to actual size (f)', + creditsText : 'Powered by Highslide JS', + creditsTitle : 'Go to the Highslide JS homepage', + previousText : 'Previous', + nextText : 'Next', + moveText : 'Move', + closeText : 'Close', + closeTitle : 'Close (esc)', + resizeTitle : 'Resize', + playText : 'Play', + playTitle : 'Play slideshow (spacebar)', + pauseText : 'Pause', + pauseTitle : 'Pause slideshow (spacebar)', + previousTitle : 'Previous (arrow left)', + nextTitle : 'Next (arrow right)', + moveTitle : 'Move', + fullExpandText : '1:1', + number: 'Image %1 of %2', + restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.' +}, +// See http://highslide.com/ref for examples of settings +graphicsDir : 'highslide/graphics/', +expandCursor : 'zoomin.cur', // null disables +restoreCursor : 'zoomout.cur', // null disables +expandDuration : 250, // milliseconds +restoreDuration : 250, +marginLeft : 15, +marginRight : 15, +marginTop : 15, +marginBottom : 15, +zIndexCounter : 1001, // adjust to other absolutely positioned elements +loadingOpacity : 0.75, +allowMultipleInstances: true, +numberOfImagesToPreload : 5, +outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only +outlineStartOffset : 3, // ends at 10 +padToMinWidth : false, // pad the popup width to make room for wide caption +fullExpandPosition : 'bottom right', +fullExpandOpacity : 1, +showCredits : true, // you can set this to false if you want +creditsHref : 'http://highslide.com/', +creditsTarget : '_self', +enableKeyListener : true, +openerTagNames : ['a', 'area'], // Add more to allow slideshow indexing +transitions : [], +transitionDuration: 250, +dimmingOpacity: 0, // Lightbox style dimming background +dimmingDuration: 50, // 0 for instant dimming + +allowWidthReduction : false, +allowHeightReduction : true, +preserveContent : true, // Preserve changes made to the content and position of HTML popups. +objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion. +cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup. +anchor : 'auto', // where the image expands from +align : 'auto', // position in the client (overrides anchor) +targetX: null, // the id of a target element +targetY: null, +dragByHeading: true, +minWidth: 200, +minHeight: 200, +allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight +outlineType : 'drop-shadow', // set null to disable outlines +skin : { + controls: + '
' + , + contentWrapper: + '
'+ + '
'+ + '' +}, +// END OF YOUR SETTINGS + + +// declare internal properties +preloadTheseImages : [], +continuePreloading: true, +expanders : [], +overrides : [ + 'allowSizeReduction', + 'useBox', + 'anchor', + 'align', + 'targetX', + 'targetY', + 'outlineType', + 'outlineWhileAnimating', + 'captionId', + 'captionText', + 'captionEval', + 'captionOverlay', + 'headingId', + 'headingText', + 'headingEval', + 'headingOverlay', + 'creditsPosition', + 'dragByHeading', + 'autoplay', + 'numberPosition', + 'transitions', + 'dimmingOpacity', + + 'width', + 'height', + + 'contentId', + 'allowWidthReduction', + 'allowHeightReduction', + 'preserveContent', + 'maincontentId', + 'maincontentText', + 'maincontentEval', + 'objectType', + 'cacheAjax', + 'objectWidth', + 'objectHeight', + 'objectLoadTime', + 'swfOptions', + 'wrapperClassName', + 'minWidth', + 'minHeight', + 'maxWidth', + 'maxHeight', + 'slideshowGroup', + 'easing', + 'easingClose', + 'fadeInOut', + 'src' +], +overlays : [], +idCounter : 0, +oPos : { + x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], + y: ['above', 'top', 'middle', 'bottom', 'below'] +}, +mouse: {}, +headingOverlay: {}, +captionOverlay: {}, +swfOptions: { flashvars: {}, params: {}, attributes: {} }, +timers : [], + +slideshows : [], + +pendingOutlines : {}, +sleeping : [], +preloadTheseAjax : [], +cacheBindings : [], +cachedGets : {}, +clones : {}, +onReady: [], +uaVersion: parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +safari : /Safari/.test(navigator.userAgent), +geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), + +$ : function (id) { + if (id) return document.getElementById(id); +}, + +push : function (arr, val) { + arr[arr.length] = val; +}, + +createElement : function (tag, attribs, styles, parent, nopad) { + var el = document.createElement(tag); + if (attribs) hs.extend(el, attribs); + if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); + if (styles) hs.setStyles(el, styles); + if (parent) parent.appendChild(el); + return el; +}, + +extend : function (el, attribs) { + for (var x in attribs) el[x] = attribs[x]; + return el; +}, + +setStyles : function (el, styles) { + for (var x in styles) { + if (hs.ie && x == 'opacity') { + if (styles[x] > 0.99) el.style.removeAttribute('filter'); + else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; + } + else el.style[x] = styles[x]; + } +}, +animate: function(el, prop, opt) { + var start, + end, + unit; + if (typeof opt != 'object' || opt === null) { + var args = arguments; + opt = { + duration: args[2], + easing: args[3], + complete: args[4] + }; + } + if (typeof opt.duration != 'number') opt.duration = 250; + opt.easing = Math[opt.easing] || Math.easeInQuad; + opt.curAnim = hs.extend({}, prop); + for (var name in prop) { + var e = new hs.fx(el, opt , name ); + + start = parseFloat(hs.css(el, name)) || 0; + end = parseFloat(prop[name]); + unit = name != 'opacity' ? 'px' : ''; + + e.custom( start, end, unit ); + } +}, +css: function(el, prop) { + if (document.defaultView) { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop); + + } else { + if (prop == 'opacity') prop = 'filter'; + var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })]; + if (prop == 'filter') + val = val.replace(/alpha\(opacity=([0-9]+)\)/, + function (a, b) { return b / 100 }); + return val === '' ? 1 : val; + } +}, + +getPageSize : function () { + var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' + ? d.documentElement : d.body; + + + var b = d.body; + var xScroll = (w.innerWidth && w.scrollMaxX) + ? w.innerWidth + w.scrollMaxX : Math.max(b.scrollWidth, b.offsetWidth), + yScroll = (w.innerHeight && window.scrollMaxY) + ? w.innerHeight + w.scrollMaxY : Math.max(b.scrollHeight, b.offsetHeight), + pageWidth = hs.ie ? iebody.scrollWidth : + (d.documentElement.clientWidth || self.innerWidth), + pageHeight = hs.ie ? Math.max(iebody.scrollHeight, iebody.clientHeight) : + (d.documentElement.clientHeight || self.innerHeight); + + var width = hs.ie ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = hs.ie ? iebody.clientHeight : self.innerHeight; + + hs.page = { + pageWidth: Math.max(pageWidth, xScroll), + pageHeight: Math.max(pageHeight, yScroll), + width: width, + height: height, + scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, + scrollTop: hs.ie ? iebody.scrollTop : pageYOffset + } +}, + +getPosition : function(el) { + if (/area/i.test(el.tagName)) { + var imgs = document.getElementsByTagName('img'); + for (var i = 0; i < imgs.length; i++) { + var u = imgs[i].useMap; + if (u && u.replace(/^.*?#/, '') == el.parentNode.name) { + el = imgs[i]; + break; + } + } + } + var p = { x: el.offsetLeft, y: el.offsetTop }; + while (el.offsetParent) { + el = el.offsetParent; + p.x += el.offsetLeft; + p.y += el.offsetTop; + if (el != document.body && el != document.documentElement) { + p.x -= el.scrollLeft; + p.y -= el.scrollTop; + } + } + return p; +}, + +expand : function(a, params, custom, type) { + if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); + if (typeof a.getParams == 'function') return params; + if (type == 'html') { + for (var i = 0; i < hs.sleeping.length; i++) { + if (hs.sleeping[i] && hs.sleeping[i].a == a) { + hs.sleeping[i].awake(); + hs.sleeping[i] = null; + return false; + } + } + hs.hasHtmlExpanders = true; + } + try { + new hs.Expander(a, params, custom, type); + return false; + } catch (e) { return true; } +}, + +htmlExpand : function(a, params, custom) { + return hs.expand(a, params, custom, 'html'); +}, + +getSelfRendered : function() { + return hs.createElement('div', { + className: 'highslide-html-content', + innerHTML: hs.replaceLang(hs.skin.contentWrapper) + }); +}, +getElementByClass : function (el, tagName, className) { + var els = el.getElementsByTagName(tagName); + for (var i = 0; i < els.length; i++) { + if ((new RegExp(className)).test(els[i].className)) { + return els[i]; + } + } + return null; +}, +replaceLang : function(s) { + s = s.replace(/\s/g, ' '); + var re = /{hs\.lang\.([^}]+)\}/g, + matches = s.match(re), + lang; + if (matches) for (var i = 0; i < matches.length; i++) { + lang = matches[i].replace(re, "$1"); + if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]); + } + return s; +}, + + +setClickEvents : function () { + var els = document.getElementsByTagName('a'); + for (var i = 0; i < els.length; i++) { + var type = hs.isUnobtrusiveAnchor(els[i]); + if (type && !els[i].hsHasSetClick) { + (function(){ + var t = type; + if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) { + els[i].onclick =(type == 'image') ?function() { return hs.expand(this) }: + function() { return hs.htmlExpand(this, { objectType: t } );}; + } + })(); + els[i].hsHasSetClick = true; + } + } + hs.getAnchors(); +}, +isUnobtrusiveAnchor: function(el) { + if (el.rel == 'highslide') return 'image'; + else if (el.rel == 'highslide-ajax') return 'ajax'; + else if (el.rel == 'highslide-iframe') return 'iframe'; + else if (el.rel == 'highslide-swf') return 'swf'; +}, + +getCacheBinding : function (a) { + for (var i = 0; i < hs.cacheBindings.length; i++) { + if (hs.cacheBindings[i][0] == a) { + var c = hs.cacheBindings[i][1]; + hs.cacheBindings[i][1] = c.cloneNode(1); + return c; + } + } + return null; +}, + +preloadAjax : function (e) { + var arr = hs.getAnchors(); + for (var i = 0; i < arr.htmls.length; i++) { + var a = arr.htmls[i]; + if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax')) + hs.push(hs.preloadTheseAjax, a); + } + + hs.preloadAjaxElement(0); +}, + +preloadAjaxElement : function (i) { + if (!hs.preloadTheseAjax[i]) return; + var a = hs.preloadTheseAjax[i]; + var cache = hs.getNode(hs.getParam(a, 'contentId')); + if (!cache) cache = hs.getSelfRendered(); + var ajax = new hs.Ajax(a, cache, 1); + ajax.onError = function () { }; + ajax.onLoad = function () { + hs.push(hs.cacheBindings, [a, cache]); + hs.preloadAjaxElement(i + 1); + }; + ajax.run(); +}, + +focusTopmost : function() { + var topZ = 0, + topmostKey = -1, + expanders = hs.expanders, + exp, + zIndex; + for (var i = 0; i < expanders.length; i++) { + exp = expanders[i]; + if (exp) { + zIndex = exp.wrapper.style.zIndex; + if (zIndex && zIndex > topZ) { + topZ = zIndex; + topmostKey = i; + } + } + } + if (topmostKey == -1) hs.focusKey = -1; + else expanders[topmostKey].focus(); +}, + +getParam : function (a, param) { + a.getParams = a.onclick; + var p = a.getParams ? a.getParams() : null; + a.getParams = null; + + return (p && typeof p[param] != 'undefined') ? p[param] : + (typeof hs[param] != 'undefined' ? hs[param] : null); +}, + +getSrc : function (a) { + var src = hs.getParam(a, 'src'); + if (src) return src; + return a.href; +}, + +getNode : function (id) { + var node = hs.$(id), clone = hs.clones[id], a = {}; + if (!node && !clone) return null; + if (!clone) { + clone = node.cloneNode(true); + clone.id = ''; + hs.clones[id] = clone; + return node; + } else { + return clone.cloneNode(true); + } +}, + +discardElement : function(d) { + if (d) hs.garbageBin.appendChild(d); + hs.garbageBin.innerHTML = ''; +}, +dim : function(exp) { + if (!hs.dimmer) { + hs.dimmer = hs.createElement ('div', + { + className: 'highslide-dimming', + owner: '', + onclick: function() { + if (hs.fireEvent(hs, 'onDimmerClick')) + + hs.close(); + } + }, { + position: 'absolute', + visibility: 'visible', + left: 0, + opacity: 0 + }, hs.container, true); + hs.addEventListener(window, 'resize', hs.setDimmerSize); + } + hs.dimmer.style.display = ''; + hs.setDimmerSize(); + hs.dimmer.owner += '|'+ exp.key; + if (hs.geckoMac && hs.dimmingGeckoFix) + hs.setStyles(hs.dimmer, { + background: 'url('+ hs.graphicsDir + 'geckodimmer.png)', + opacity: 1 + }); + else + hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration); +}, +undim : function(key) { + if (!hs.dimmer) return; + if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, ''); + + if ( + (typeof key != 'undefined' && hs.dimmer.owner != '') + || (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity')) + ) return; + if (hs.geckoMac && hs.dimmingGeckoFix) + hs.setStyles(hs.dimmer, { background: 'none', width: 0, height: 0 }); + else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { + hs.setStyles(hs.dimmer, { display: 'none', width: 0, height: 0 }); + }); +}, +setDimmerSize : function(exp) { + hs.getPageSize(); + if (!hs.dimmer) return; + var h = (hs.ie && exp && exp.wrapper) ? + parseInt(exp.wrapper.style.top) + parseInt(exp.wrapper.style.height)+ (exp.outline ? exp.outline.offset : 0) : 0; + hs.setStyles(hs.dimmer, { + width: hs.page.pageWidth +'px', + height: Math.max(hs.page.pageHeight, h) +'px' + }); +}, +transit : function (adj, exp) { + var last = exp = exp || hs.getExpander(); + if (hs.upcoming) return false; + else hs.last = last; + try { + hs.upcoming = adj; + adj.onclick(); + } catch (e){ + hs.last = hs.upcoming = null; + } + try { + if (!adj || exp.transitions[1] != 'crossfade') + exp.close(); + } catch (e) {} + return false; +}, + +previousOrNext : function (el, op) { + var exp = hs.getExpander(el); + if (exp) { + adj = exp.getAdjacentAnchor(op); + return hs.transit(adj, exp); + } else return false; +}, + +previous : function (el) { + return hs.previousOrNext(el, -1); +}, + +next : function (el) { + return hs.previousOrNext(el, 1); +}, + +keyHandler : function(e) { + if (!e) e = window.event; + if (!e.target) e.target = e.srcElement; // ie + if (typeof e.target.form != 'undefined') return true; // form element has focus + if (!hs.fireEvent(hs, 'onKeyDown', e)) return true; + var exp = hs.getExpander(); + + var op = null; + switch (e.keyCode) { + case 70: // f + if (exp) exp.doFullExpand(); + return true; + case 32: // Space + op = 2; + break; + case 34: // Page Down + case 39: // Arrow right + case 40: // Arrow down + op = 1; + break; + case 8: // Backspace + case 33: // Page Up + case 37: // Arrow left + case 38: // Arrow up + op = -1; + break; + case 27: // Escape + case 13: // Enter + op = 0; + } + if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + if (!hs.enableKeyListener) return true; + + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + if (exp) { + if (op == 0) { + exp.close(); + } else if (op == 2) { + if (exp.slideshow) exp.slideshow.hitSpace(); + } else { + if (exp.slideshow) exp.slideshow.pause(); + hs.previousOrNext(exp.key, op); + } + return false; + } + } + return true; +}, + + +registerOverlay : function (overlay) { + hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } )); +}, + + +addSlideshow : function (options) { + var sg = options.slideshowGroup; + if (typeof sg == 'object') { + for (var i = 0; i < sg.length; i++) { + var o = {}; + for (var x in options) o[x] = options[x]; + o.slideshowGroup = sg[i]; + hs.push(hs.slideshows, o); + } + } else { + hs.push(hs.slideshows, options); + } +}, + +getWrapperKey : function (element, expOnly) { + var el, re = /^highslide-wrapper-([0-9]+)$/; + // 1. look in open expanders + el = element; + while (el.parentNode) { + if (el.hsKey !== undefined) return el.hsKey; + if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); + el = el.parentNode; + } + // 2. look in thumbnail + if (!expOnly) { + el = element; + while (el.parentNode) { + if (el.tagName && hs.isHsAnchor(el)) { + for (var key = 0; key < hs.expanders.length; key++) { + var exp = hs.expanders[key]; + if (exp && exp.a == el) return key; + } + } + el = el.parentNode; + } + } + return null; +}, + +getExpander : function (el, expOnly) { + if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; + if (typeof el == 'number') return hs.expanders[el] || null; + if (typeof el == 'string') el = hs.$(el); + return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; +}, + +isHsAnchor : function (a) { + return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); +}, + +reOrder : function () { + for (var i = 0; i < hs.expanders.length; i++) + if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); +}, +fireEvent : function (obj, evt, args) { + return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true; +}, + +mouseClickHandler : function(e) +{ + if (!e) e = window.event; + if (e.button > 1) return true; + if (!e.target) e.target = e.srcElement; + + var el = e.target; + while (el.parentNode + && !(/highslide-(image|move|html|resize)/.test(el.className))) + { + el = el.parentNode; + } + var exp = hs.getExpander(el); + if (exp && (exp.isClosing || !exp.isExpanded)) return true; + + if (exp && e.type == 'mousedown') { + if (e.target.form) return true; + var match = el.className.match(/highslide-(image|move|resize)/); + if (match) { + hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos, + height: exp.y.size, clickX: e.clientX, clickY: e.clientY }; + + + hs.addEventListener(document, 'mousemove', hs.dragHandler); + if (e.preventDefault) e.preventDefault(); // FF + + if (/highslide-(image|html)-blur/.test(exp.content.className)) { + exp.focus(); + hs.hasFocused = true; + } + return false; + } + else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) { + exp.focus(); + exp.doShowHide('hidden'); + } + } else if (e.type == 'mouseup') { + + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + if (hs.dragArgs) { + if (hs.styleRestoreCursor && hs.dragArgs.type == 'image') + hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; + var hasDragged = hs.dragArgs.hasDragged; + + if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { + if (hs.fireEvent(exp, 'onImageClick')) + exp.close(); + } + else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { + hs.dragArgs.exp.doShowHide('hidden'); + } + + if (hs.dragArgs.exp.releaseMask) + hs.dragArgs.exp.releaseMask.style.display = 'none'; + + if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs); + if (hasDragged) hs.setDimmerSize(exp); + + hs.hasFocused = false; + hs.dragArgs = null; + + } else if (/highslide-image-blur/.test(el.className)) { + el.style.cursor = hs.styleRestoreCursor; + } + } + return false; +}, + +dragHandler : function(e) +{ + if (!hs.dragArgs) return true; + if (!e) e = window.event; + var a = hs.dragArgs, exp = a.exp; + if (exp.iframe) { + if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null, + { position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px', + left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'), + opacity: .01 }, + exp.wrapper, true); + if (exp.releaseMask.style.display == 'none') + exp.releaseMask.style.display = ''; + } + + a.dX = e.clientX - a.clickX; + a.dY = e.clientY - a.clickY; + + var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); + if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) + || (distance > (hs.dragSensitivity || 5)); + + if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { + if (!hs.fireEvent(exp, 'onDrag', a)) return false; + + if (a.type == 'resize') exp.resize(a); + else { + exp.moveTo(a.left + a.dX, a.top + a.dY); + if (a.type == 'image') exp.content.style.cursor = 'move'; + } + } + return false; +}, + +wrapperMouseHandler : function (e) { + try { + if (!e) e = window.event; + var over = /mouseover/i.test(e.type); + if (!e.target) e.target = e.srcElement; // ie + if (hs.ie) e.relatedTarget = + over ? e.fromElement : e.toElement; // ie + var exp = hs.getExpander(e.target); + if (!exp.isExpanded) return; + if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp + || hs.dragArgs) return; + hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e); + for (var i = 0; i < exp.overlays.length; i++) (function() { + var o = hs.$('hsId'+ exp.overlays[i]); + if (o && o.hideOnMouseOut) { + if (over) hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur); + } + })(); + } catch (e) {} +}, +addEventListener : function (el, event, func) { + if (el == document && event == 'ready') hs.push(hs.onReady, func); + try { + el.addEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + el.attachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = func; + } + } +}, + +removeEventListener : function (el, event, func) { + try { + el.removeEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = null; + } + } +}, + +preloadFullImage : function (i) { + if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { + var img = document.createElement('img'); + img.onload = function() { + img = null; + hs.preloadFullImage(i + 1); + }; + img.src = hs.preloadTheseImages[i]; + } +}, +preloadImages : function (number) { + if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; + + var arr = hs.getAnchors(); + for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { + hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); + } + + // preload outlines + if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); + else + + hs.preloadFullImage(0); + + // preload cursor + if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); +}, + + +init : function () { + if (!hs.container) { + + hs.getPageSize(); + hs.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:'; + for (var x in hs.langDefaults) { + if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; + else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') + hs.lang[x] = hs.langDefaults[x]; + } + + hs.container = hs.createElement('div', { + className: 'highslide-container' + }, { + position: 'absolute', + left: 0, + top: 0, + width: '100%', + zIndex: hs.zIndexCounter, + direction: 'ltr' + }, + document.body, + true + ); + hs.loading = hs.createElement('a', { + className: 'highslide-loading', + title: hs.lang.loadingTitle, + innerHTML: hs.lang.loadingText, + href: 'javascript:;' + }, { + position: 'absolute', + top: '-9999px', + opacity: hs.loadingOpacity, + zIndex: 1 + }, hs.container + ); + hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); + hs.viewport = hs.createElement('div', { + className: 'highslide-viewport' + }, { + visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden' + }, hs.container, 1 + ); + hs.clearing = hs.createElement('div', null, + { clear: 'both', paddingTop: '1px' }, null, true); + + // http://www.robertpenner.com/easing/ + Math.linearTween = function (t, b, c, d) { + return c*t/d + b; + }; + Math.easeInQuad = function (t, b, c, d) { + return c*(t/=d)*t + b; + }; + Math.easeOutQuad = function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }; + + hs.hideSelects = hs.ieLt7; + hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' + || (hs.ie && hs.uaVersion < 5.5)); + hs.fireEvent(this, 'onActivate'); + } +}, +ready : function() { + if (hs.isReady) return; + hs.isReady = true; + + for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i](); +}, + +updateAnchors : function() { + var el, els, all = [], images = [], htmls = [],groups = {}, re; + + for (var i = 0; i < hs.openerTagNames.length; i++) { + els = document.getElementsByTagName(hs.openerTagNames[i]); + for (var j = 0; j < els.length; j++) { + el = els[j]; + re = hs.isHsAnchor(el); + if (re) { + hs.push(all, el); + if (re[0] == 'hs.expand') hs.push(images, el); + else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el); + var g = hs.getParam(el, 'slideshowGroup') || 'none'; + if (!groups[g]) groups[g] = []; + hs.push(groups[g], el); + } + } + } + hs.anchors = { all: all, groups: groups, images: images, htmls: htmls }; + return hs.anchors; + +}, + +getAnchors : function() { + return hs.anchors || hs.updateAnchors(); +}, + + +close : function(el) { + var exp = hs.getExpander(el); + if (exp) exp.close(); + return false; +} +}; // end hs object +hs.fx = function( elem, options, prop ){ + this.options = options; + this.elem = elem; + this.prop = prop; + + if (!options.orig) options.orig = {}; +}; +hs.fx.prototype = { + update: function(){ + (hs.fx.step[this.prop] || hs.fx.step._default)(this); + + if (this.options.step) + this.options.step.call(this.elem, this.now, this); + + }, + custom: function(from, to, unit){ + this.startTime = (new Date()).getTime(); + this.start = from; + this.end = to; + this.unit = unit;// || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + + var self = this; + function t(gotoEnd){ + return self.step(gotoEnd); + } + + t.elem = this.elem; + + if ( t() && hs.timers.push(t) == 1 ) { + hs.timerId = setInterval(function(){ + var timers = hs.timers; + + for ( var i = 0; i < timers.length; i++ ) + if ( !timers[i]() ) + timers.splice(i--, 1); + + if ( !timers.length ) { + clearInterval(hs.timerId); + } + }, 13); + } + }, + step: function(gotoEnd){ + var t = (new Date()).getTime(); + if ( gotoEnd || t >= this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + var done = true; + for ( var i in this.options.curAnim ) + if ( this.options.curAnim[i] !== true ) + done = false; + + if ( done ) { + if (this.options.complete) this.options.complete.call(this.elem); + } + return false; + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + this.pos = this.options.easing(n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + this.update(); + } + return true; + } + +}; + +hs.extend( hs.fx, { + step: { + + opacity: function(fx){ + hs.setStyles(fx.elem, { opacity: fx.now }); + }, + + _default: function(fx){ + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + else + fx.elem[ fx.prop ] = fx.now; + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; + if (!outlineType) { + if (onLoad) onLoad(); + return; + } + + hs.init(); + this.table = hs.createElement( + 'table', { + cellSpacing: 0 + }, { + visibility: 'hidden', + position: 'absolute', + borderCollapse: 'collapse', + width: 0 + }, + hs.container, + true + ); + var tbody = hs.createElement('tbody', null, null, this.table, 1); + + this.td = []; + for (var i = 0; i <= 8; i++) { + if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); + this.td[i] = hs.createElement('td', null, null, tr, true); + var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; + hs.setStyles(this.td[i], style); + } + this.td[4].className = outlineType +' highslide-outline'; + + this.preloadGraphic(); +}; + +hs.Outline.prototype = { +preloadGraphic : function () { + var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; + + var appendTo = hs.safari ? hs.container : null; + this.graphic = hs.createElement('img', null, { position: 'absolute', + top: '-9999px' }, appendTo, true); // for onload trigger + + var pThis = this; + this.graphic.onload = function() { pThis.onGraphicLoad(); }; + + this.graphic.src = src; +}, + +onGraphicLoad : function () { + var o = this.offset = this.graphic.width / 4, + pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], + dim = { height: (2*o) +'px', width: (2*o) +'px' }; + for (var i = 0; i <= 8; i++) { + if (pos[i]) { + if (this.hasAlphaImageLoader) { + var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; + var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); + hs.createElement ('div', null, { + filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", + position: 'absolute', + width: w, + height: this.graphic.height +'px', + left: (pos[i][0]*o)+'px', + top: (pos[i][1]*o)+'px' + }, + div, + true); + } else { + hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); + } + + if (window.opera && (i == 3 || i ==5)) + hs.createElement('div', null, dim, this.td[i], true); + + hs.setStyles (this.td[i], dim); + } + } + this.graphic = null; + if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); + hs.pendingOutlines[this.outlineType] = this; + if (this.onLoad) this.onLoad(); +}, + +setPosition : function (pos, offset, vis, dur, easing) { + var exp = this.exp, + stl = exp.wrapper.style, + offset = offset || 0, + pos = pos || { + x: exp.x.pos + offset, + y: exp.y.pos + offset, + w: exp.x.get('wsize') - 2 * offset, + h: exp.y.get('wsize') - 2 * offset + }; + if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) + ? 'visible' : 'hidden'; + hs.setStyles(this.table, { + left: (pos.x - this.offset) +'px', + top: (pos.y - this.offset) +'px', + width: (pos.w + 2 * this.offset) +'px' + }); + + pos.w -= 2 * this.offset; + pos.h -= 2 * this.offset; + hs.setStyles (this.td[4], { + width: pos.w >= 0 ? pos.w +'px' : 0, + height: pos.h >= 0 ? pos.h +'px' : 0 + }); + if (this.hasAlphaImageLoader) this.td[3].style.height + = this.td[5].style.height = this.td[4].style.height; + +}, + +destroy : function(hide) { + if (hide) this.table.style.visibility = 'hidden'; + else hs.discardElement(this.table); +} +}; + +hs.Dimension = function(exp, dim) { + this.exp = exp; + this.dim = dim; + this.ucwh = dim == 'x' ? 'Width' : 'Height'; + this.wh = this.ucwh.toLowerCase(); + this.uclt = dim == 'x' ? 'Left' : 'Top'; + this.lt = this.uclt.toLowerCase(); + this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; + this.rb = this.ucrb.toLowerCase(); + this.p1 = this.p2 = 0; +}; +hs.Dimension.prototype = { +get : function(key) { + switch (key) { + case 'loadingPos': + return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; + case 'loadingPosXfade': + return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2; + case 'wsize': + return this.size + 2 * this.cb + this.p1 + this.p2; + case 'fitsize': + return this.clientSize - this.marginMin - this.marginMax; + case 'maxsize': + return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ; + case 'opos': + return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); + case 'osize': + return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); + case 'imgPad': + return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; + + } +}, +calcBorders: function() { + // correct for borders + this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; + this.marginMax = hs['margin'+ this.ucrb]; +}, +calcThumb: function() { + this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : + this.exp.el['offset'+ this.ucwh]; + this.tpos = this.exp.tpos[this.dim]; + this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; + if (this.tpos < 1) { + this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; + }; +}, +calcExpanded: function() { + var exp = this.exp; + this.justify = 'auto'; + + // get alignment + if (exp.align == 'center') this.justify = 'center'; + else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null; + else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max'; + + + // size and position + this.pos = this.tpos - this.cb + this.tb; + this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full); + this.minSize = exp.allowSizeReduction ? + Math.min(exp['min'+ this.ucwh], this.full) :this.full; + if (exp.isImage && exp.useBox) { + this.size = exp[this.wh]; + this.imgSize = this.full; + } + if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth; + this.target = exp['target'+ this.dim.toUpperCase()]; + this.marginMin = hs['margin'+ this.uclt]; + this.scroll = hs.page['scroll'+ this.uclt]; + this.clientSize = hs.page[this.wh]; +}, +setSize: function(i) { + var exp = this.exp; + if (exp.isImage && (exp.useBox || hs.padToMinWidth)) { + this.imgSize = i; + this.size = Math.max(this.size, this.imgSize); + exp.content.style[this.lt] = this.get('imgPad')+'px'; + } else + this.size = i; + + exp.content.style[this.wh] = i +'px'; + exp.wrapper.style[this.wh] = this.get('wsize') +'px'; + if (exp.outline) exp.outline.setPosition(); + if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px'; + if (exp.isHtml) { + var d = exp.scrollerDiv; + if (this.sizeDiff === undefined) + this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh]; + d.style[this.wh] = (this.size - this.sizeDiff) +'px'; + + if (this.dim == 'x') exp.mediumContent.style.width = 'auto'; + if (exp.body) exp.body.style[this.wh] = 'auto'; + } + if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true); + if (this.dim == 'x' && exp.slideshow && exp.isImage) { + if (i == this.full) exp.slideshow.disable('full-expand'); + else exp.slideshow.enable('full-expand'); + } +}, +setPos: function(i) { + this.pos = i; + this.exp.wrapper.style[this.lt] = i +'px'; + + if (this.exp.outline) this.exp.outline.setPosition(); + +} +}; + +hs.Expander = function(a, params, custom, contentType) { + if (document.readyState && hs.ie && !hs.isReady) { + hs.addEventListener(document, 'ready', function() { + new hs.Expander(a, params, custom, contentType); + }); + return; + } + this.a = a; + this.custom = custom; + this.contentType = contentType || 'image'; + this.isHtml = (contentType == 'html'); + this.isImage = !this.isHtml; + + hs.continuePreloading = false; + this.overlays = []; + this.last = hs.last; + hs.last = null; + hs.init(); + var key = this.key = hs.expanders.length; + // override inline parameters + for (var i = 0; i < hs.overrides.length; i++) { + var name = hs.overrides[i]; + this[name] = params && typeof params[name] != 'undefined' ? + params[name] : hs[name]; + } + if (!this.src) this.src = a.href; + + // get thumb + var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a; + el = this.thumb = el.getElementsByTagName('img')[0] || el; + this.thumbsUserSetId = el.id || a.id; + if (!hs.fireEvent(this, 'onInit')) return true; + + // check if already open + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].a == a + && !(this.last && this.transitions[1] == 'crossfade')) { + hs.expanders[i].focus(); + return false; + } + } + + // cancel other + if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { + hs.expanders[i].cancelLoading(); + } + } + hs.expanders[key] = this; + if (!hs.allowMultipleInstances && !hs.upcoming) { + if (hs.expanders[key-1]) hs.expanders[key-1].close(); + if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) + hs.expanders[hs.focusKey].close(); + } + + // initiate metrics + this.el = el; + this.tpos = hs.getPosition(el); + hs.getPageSize(); + var x = this.x = new hs.Dimension(this, 'x'); + x.calcThumb(); + var y = this.y = new hs.Dimension(this, 'y'); + y.calcThumb(); + if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el); + this.wrapper = hs.createElement( + 'div', { + id: 'highslide-wrapper-'+ this.key, + className: 'highslide-wrapper '+ this.wrapperClassName + }, { + visibility: 'hidden', + position: 'absolute', + zIndex: hs.zIndexCounter += 2 + }, null, true ); + + this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; + if (this.contentType == 'image' && this.outlineWhileAnimating == 2) + this.outlineWhileAnimating = 0; + + // get the outline + if (!this.outlineType + || (this.last && this.isImage && this.transitions[1] == 'crossfade')) { + this[this.contentType +'Create'](); + + } else if (hs.pendingOutlines[this.outlineType]) { + this.connectOutline(); + this[this.contentType +'Create'](); + + } else { + this.showLoading(); + var exp = this; + new hs.Outline(this.outlineType, + function () { + exp.connectOutline(); + exp[exp.contentType +'Create'](); + } + ); + } + return true; +}; + +hs.Expander.prototype = { +error : function(e) { + //alert ('Line '+ e.lineNumber +': '+ e.message); + window.location.href = this.src; +}, + +connectOutline : function() { + var outline = this.outline = hs.pendingOutlines[this.outlineType]; + outline.exp = this; + outline.table.style.zIndex = this.wrapper.style.zIndex - 1; + hs.pendingOutlines[this.outlineType] = null; +}, + +showLoading : function() { + if (this.onLoadStarted || this.loading) return; + + this.loading = hs.loading; + var exp = this; + this.loading.onclick = function() { + exp.cancelLoading(); + }; + + + if (!hs.fireEvent(this, 'onShowLoading')) return; + var exp = this, + l = this.x.get('loadingPos') +'px', + t = this.y.get('loadingPos') +'px'; + if (!tgt && this.last && this.transitions[1] == 'crossfade') + var tgt = this.last; + if (tgt) { + l = tgt.x.get('loadingPosXfade') +'px'; + t = tgt.y.get('loadingPosXfade') +'px'; + this.loading.style.zIndex = hs.zIndexCounter++; + } + setTimeout(function () { + if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} + , 100); +}, + +imageCreate : function() { + var exp = this; + + var img = document.createElement('img'); + this.content = img; + img.onload = function () { + if (hs.expanders[exp.key]) exp.contentLoaded(); + }; + if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; + img.className = 'highslide-image'; + hs.setStyles(img, { + visibility: 'hidden', + display: 'block', + position: 'absolute', + maxWidth: '9999px', + zIndex: 3 + }); + img.title = hs.lang.restoreTitle; + if (hs.safari) hs.container.appendChild(img); + if (hs.ie && hs.flushImgSize) img.src = null; + img.src = this.src; + + this.showLoading(); +}, + +htmlCreate : function () { + if (!hs.fireEvent(this, 'onBeforeGetContent')) return; + + this.content = hs.getCacheBinding(this.a); + if (!this.content) + this.content = hs.getNode(this.contentId); + if (!this.content) + this.content = hs.getSelfRendered(); + this.getInline(['maincontent']); + if (this.maincontent) { + var body = hs.getElementByClass(this.content, 'div', 'highslide-body'); + if (body) body.appendChild(this.maincontent); + this.maincontent.style.display = 'block'; + } + hs.fireEvent(this, 'onAfterGetContent'); + + var innerContent = this.innerContent = this.content; + + if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent); + + // the content tree + hs.container.appendChild(this.wrapper); + hs.setStyles( this.wrapper, { + position: 'static', + padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px' + }); + this.content = hs.createElement( + 'div', { + className: 'highslide-html' + }, { + position: 'relative', + zIndex: 3, + overflow: 'hidden' + }, + this.wrapper + ); + this.mediumContent = hs.createElement('div', null, null, this.content, 1); + this.mediumContent.appendChild(innerContent); + + hs.setStyles (innerContent, { + position: 'relative', + display: 'block', + direction: hs.lang.cssDirection || '' + }); + if (this.width) innerContent.style.width = this.width +'px'; + if (this.height) hs.setStyles(innerContent, { + height: this.height +'px', + overflow: 'hidden' + }); + if (innerContent.offsetWidth < this.minWidth) + innerContent.style.width = this.minWidth +'px'; + + + + if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) { + this.showLoading(); + var ajax = new hs.Ajax(this.a, innerContent); + var exp = this; + ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); }; + ajax.onError = function () { location.href = exp.src; }; + ajax.run(); + } + else + + if (this.objectType == 'iframe' && this.objectLoadTime == 'before') { + this.writeExtendedContent(); + } + else + this.contentLoaded(); +}, + +contentLoaded : function() { + try { + if (!this.content) return; + this.content.onload = null; + if (this.onLoadStarted) return; + else this.onLoadStarted = true; + + var x = this.x, y = this.y; + + if (this.loading) { + hs.setStyles(this.loading, { top: '-9999px' }); + this.loading = null; + hs.fireEvent(this, 'onHideLoading'); + } + if (this.isImage) { + x.full = this.content.width; + y.full = this.content.height; + + hs.setStyles(this.content, { + width: x.t +'px', + height: y.t +'px' + }); + this.wrapper.appendChild(this.content); + hs.container.appendChild(this.wrapper); + } else if (this.htmlGetSize) this.htmlGetSize(); + + x.calcBorders(); + y.calcBorders(); + + hs.setStyles (this.wrapper, { + left: (x.tpos + x.tb - x.cb) +'px', + top: (y.tpos + x.tb - y.cb) +'px' + }); + + + this.initSlideshow(); + this.getOverlays(); + + var ratio = x.full / y.full; + + x.calcExpanded(); + this.justify(x); + + y.calcExpanded(); + this.justify(y); + if (this.isHtml) this.htmlSizeOperations(); + if (this.overlayBox) this.sizeOverlayBox(0, 1); + + if (this.allowSizeReduction) { + if (this.isImage) + this.correctRatio(ratio); + else this.fitOverlayBox(); + var ss = this.slideshow; + if (ss && this.last && ss.controls && ss.fixedControls) { + var pos = ss.overlayOptions.position || '', p; + for (var dim in hs.oPos) for (var i = 0; i < 5; i++) { + p = this[dim]; + if (pos.match(hs.oPos[dim][i])) { + p.pos = this.last[dim].pos + + (this.last[dim].p1 - p.p1) + + (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i]; + if (ss.fixedControls == 'fit') { + if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax) + p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2; + if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin; + } + } + } + } + if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) { + this.createFullExpand(); + if (this.overlays.length == 1) this.sizeOverlayBox(); + } + } + this.show(); + + } catch (e) { + this.error(e); + } +}, + + +setObjContainerSize : function(parent, auto) { + var c = hs.getElementByClass(parent, 'DIV', 'highslide-body'); + if (/(iframe|swf)/.test(this.objectType)) { + if (this.objectWidth) c.style.width = this.objectWidth +'px'; + if (this.objectHeight) c.style.height = this.objectHeight +'px'; + } +}, + +writeExtendedContent : function () { + if (this.hasExtendedContent) return; + var exp = this; + this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); + if (this.objectType == 'iframe') { + this.showLoading(); + var ruler = hs.clearing.cloneNode(1); + this.body.appendChild(ruler); + this.newWidth = this.innerContent.offsetWidth; + if (!this.objectWidth) this.objectWidth = ruler.offsetWidth; + var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight, + h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom, + onload = this.objectLoadTime == 'before' ? + ' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : ''; + + this.body.innerHTML += ''; + this.ruler = this.body.getElementsByTagName('div')[0]; + this.iframe = this.body.getElementsByTagName('iframe')[0]; + + if (this.objectLoadTime == 'after') this.correctIframeSize(); + + } + if (this.objectType == 'swf') { + this.body.id = this.body.id || 'hs-flash-id-' + this.key; + var a = this.swfOptions; + if (!a.params) a.params = {}; + if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent'; + if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight, + a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes); + } + this.hasExtendedContent = true; +}, +htmlGetSize : function() { + if (this.iframe && !this.objectHeight) { // loadtime before + this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px'; + } + this.innerContent.appendChild(hs.clearing); + if (!this.x.full) this.x.full = this.innerContent.offsetWidth; + this.y.full = this.innerContent.offsetHeight; + this.innerContent.removeChild(hs.clearing); + if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug + this.newHeight = parseInt(this.innerContent.currentStyle.height); + } + hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'}); + hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'}); +}, + +getIframePageHeight : function() { + var h; + try { + var doc = this.iframe.contentDocument || this.iframe.contentWindow.document; + var clearing = doc.createElement('div'); + clearing.style.clear = 'both'; + doc.body.appendChild(clearing); + h = clearing.offsetTop; + if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop) + + parseInt(doc.body.currentStyle.marginBottom) - 1; + } catch (e) { // other domain + h = 300; + } + return h; +}, +correctIframeSize : function () { + var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth; + hs.discardElement(this.ruler); + if (wDiff < 0) wDiff = 0; + + var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight; + hs.setStyles(this.iframe, { + width: Math.abs(this.x.size - wDiff) +'px', + height: Math.abs(this.y.size - hDiff) +'px' + }); + hs.setStyles(this.body, { + width: this.iframe.style.width, + height: this.iframe.style.height + }); + + this.scrollingContent = this.iframe; + this.scrollerDiv = this.scrollingContent; +}, +htmlSizeOperations : function () { + + this.setObjContainerSize(this.innerContent); + + + if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent(); + + // handle minimum size + if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full; + if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full; + this.scrollerDiv = this.innerContent; + hs.setStyles(this.mediumContent, { + position: 'relative', + width: this.x.size +'px' + }); + hs.setStyles(this.innerContent, { + border: 'none', + width: 'auto', + height: 'auto' + }); + var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); + if (node && !/(iframe|swf)/.test(this.objectType)) { + var cNode = node; // wrap to get true size + node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true); + cNode.parentNode.insertBefore(node, cNode); + node.appendChild(hs.clearing); // IE6 + node.appendChild(cNode); + + var wDiff = this.innerContent.offsetWidth - node.offsetWidth; + var hDiff = this.innerContent.offsetHeight - node.offsetHeight; + node.removeChild(hs.clearing); + + var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug + hs.setStyles(node, { + width: (this.x.size - wDiff - kdeBugCorr) +'px', + height: (this.y.size - hDiff) +'px', + overflow: 'auto', + position: 'relative' + } + ); + if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) { + node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px'; + } + this.scrollingContent = node; + this.scrollerDiv = this.scrollingContent; + } + if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize(); + if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content; + + if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) { + this.x.size += 17; // room for scrollbars + } + if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) { + setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}", + hs.expandDuration); + } +}, + +getImageMapAreaCorrection : function(area) { + var c = area.coords.split(','); + for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]); + + if (area.shape.toLowerCase() == 'circle') { + this.x.tpos += c[0] - c[2]; + this.y.tpos += c[1] - c[2]; + this.x.t = this.y.t = 2 * c[2]; + } else { + var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1]; + for (var i = 0; i < c.length; i++) { + if (i % 2 == 0) { + minX = Math.min(minX, c[i]); + maxX = Math.max(maxX, c[i]); + } else { + minY = Math.min(minY, c[i]); + maxY = Math.max(maxY, c[i]); + } + } + this.x.tpos += minX; + this.x.t = maxX - minX; + this.y.tpos += minY; + this.y.t = maxY - minY; + } +}, +justify : function (p, moveOnly) { + var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; + + if (tgt && tgt.match(/ /)) { + tgtArr = tgt.split(' '); + tgt = tgtArr[0]; + } + if (tgt && hs.$(tgt)) { + p.pos = hs.getPosition(hs.$(tgt))[dim]; + if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/)) + p.pos += parseInt(tgtArr[1]); + if (p.size < p.minSize) p.size = p.minSize; + + } else if (p.justify == 'auto' || p.justify == 'center') { + + var hasMovedMin = false; + + var allowReduce = p.exp.allowSizeReduction; + if (p.justify == 'center') + p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2); + else + p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); + if (p.pos < p.scroll + p.marginMin) { + p.pos = p.scroll + p.marginMin; + hasMovedMin = true; + } + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { + if (!moveOnly && hasMovedMin && allowReduce) { + p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } else if (p.get('wsize') < p.get('fitsize')) { + p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); + } else { // image larger than viewport + p.pos = p.scroll + p.marginMin; + if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } + } + + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + + + } else if (p.justify == 'max') { + p.pos = Math.floor(p.pos - p.size + p.t); + } + + + if (p.pos < p.marginMin) { + var tmpMin = p.pos; + p.pos = p.marginMin; + + if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); + + } +}, + +correctRatio : function(ratio) { + var x = this.x, + y = this.y, + changed = false, + xSize = Math.min(x.full, x.size), + ySize = Math.min(y.full, y.size), + useBox = (this.useBox || hs.padToMinWidth); + + if (xSize / ySize > ratio) { // width greater + xSize = ySize * ratio; + if (xSize < x.minSize) { // below minWidth + xSize = x.minSize; + ySize = xSize / ratio; + } + changed = true; + + } else if (xSize / ySize < ratio) { // height greater + ySize = xSize / ratio; + changed = true; + } + + if (hs.padToMinWidth && x.full < x.minSize) { + x.imgSize = x.full; + y.size = y.imgSize = y.full; + } else if (this.useBox) { + x.imgSize = xSize; + y.imgSize = ySize; + } else { + x.size = xSize; + y.size = ySize; + } + this.fitOverlayBox(useBox ? null : ratio); + if (useBox && y.size < y.imgSize) { + y.imgSize = y.size; + x.imgSize = y.size * ratio; + } + if (changed || useBox) { + x.pos = x.tpos - x.cb + x.tb; + x.minSize = x.size; + this.justify(x, true); + + y.pos = y.tpos - y.cb + y.tb; + y.minSize = y.size; + this.justify(y, true); + if (this.overlayBox) this.sizeOverlayBox(); + } +}, +fitOverlayBox : function(ratio) { + var x = this.x, y = this.y; + if (this.overlayBox) { + while (y.size > this.minHeight && x.size > this.minWidth + && y.get('wsize') > y.get('fitsize')) { + y.size -= 10; + if (ratio) x.size = y.size * ratio; + this.sizeOverlayBox(0, 1); + } + } +}, + +reflow : function () { + if (this.scrollerDiv) { + var h = /iframe/i.test(this.scrollerDiv.tagName) ? this.getIframePageHeight() + 1 +'px' : 'auto'; + if (this.body) this.body.style.height = h; + this.scrollerDiv.style.height = h; + this.y.setSize(this.innerContent.offsetHeight); + hs.setDimmerSize(this); + } +}, + +show : function () { + var x = this.x, y = this.y; + this.doShowHide('hidden'); + hs.fireEvent(this, 'onBeforeExpand'); + if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb(); + + // Apply size change + this.changeSize( + 1, { + wrapper: { + width : x.get('wsize'), + height : y.get('wsize'), + left: x.pos, + top: y.pos + }, + content: { + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad'), + width:x.imgSize ||x.size, + height:y.imgSize ||y.size + } + }, + hs.expandDuration + ); +}, + +changeSize : function(up, to, dur) { + // transition + var trans = this.transitions, + other = up ? (this.last ? this.last.a : null) : hs.upcoming, + t = (trans[1] && other + && hs.getParam(other, 'transitions')[1] == trans[1]) ? + trans[1] : trans[0]; + + if (this[t] && t != 'expand') { + this[t](up, to); + return; + } + + if (this.outline && !this.outlineWhileAnimating) { + if (up) this.outline.setPosition(); + else this.outline.destroy( + (this.isHtml && this.preserveContent)); + } + + + if (!up) this.destroyOverlays(); + + var exp = this, + x = exp.x, + y = exp.y, + easing = this.easing; + if (!up) easing = this.easingClose || easing; + var after = up ? + function() { + + if (exp.outline) exp.outline.table.style.visibility = "visible"; + setTimeout(function() { + exp.afterExpand(); + }, 50); + } : + function() { + exp.afterClose(); + }; + if (up) hs.setStyles( this.wrapper, { + width: x.t +'px', + height: y.t +'px' + }); + if (up && this.isHtml) { + hs.setStyles(this.wrapper, { + left: (x.tpos - x.cb + x.tb) +'px', + top: (y.tpos - y.cb + y.tb) +'px' + }); + } + if (this.fadeInOut) { + hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 }); + hs.extend(to.wrapper, { opacity: up }); + } + hs.animate( this.wrapper, to.wrapper, { + duration: dur, + easing: easing, + step: function(val, args) { + if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') { + var fac = up ? args.pos : 1 - args.pos; + var pos = { + w: x.t + (x.get('wsize') - x.t) * fac, + h: y.t + (y.get('wsize') - y.t) * fac, + x: x.tpos + (x.pos - x.tpos) * fac, + y: y.tpos + (y.pos - y.tpos) * fac + }; + exp.outline.setPosition(pos, 0, 1); + } + if (exp.isHtml) { + if (args.prop == 'left') + exp.mediumContent.style.left = (x.pos - val) +'px'; + if (args.prop == 'top') + exp.mediumContent.style.top = (y.pos - val) +'px'; + } + } + }); + hs.animate( this.content, to.content, dur, easing, after); + if (up) { + this.wrapper.style.visibility = 'visible'; + this.content.style.visibility = 'visible'; + if (this.isHtml) this.innerContent.style.visibility = 'visible'; + this.a.className += ' highslide-active-anchor'; + } +}, + + + +fade : function(up, to) { + this.outlineWhileAnimating = false; + var exp = this, t = up ? hs.expandDuration : 0; + + if (up) { + hs.animate(this.wrapper, to.wrapper, 0); + hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' }); + hs.animate(this.content, to.content, 0); + this.content.style.visibility = 'visible'; + + hs.animate(this.wrapper, { opacity: 1 }, t, null, + function() { exp.afterExpand(); }); + } + + if (this.outline) { + this.outline.table.style.zIndex = this.wrapper.style.zIndex; + var dir = up || -1, + offset = this.outline.offset, + startOff = up ? 3 : offset, + endOff = up? offset : 3; + for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) { + (function() { + var o = up ? endOff - i : startOff - i; + setTimeout(function() { + exp.outline.setPosition(0, o, 1); + }, t); + })(); + } + } + + + if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50); + else { + setTimeout( function() { + if (exp.outline) exp.outline.destroy(exp.preserveContent); + + exp.destroyOverlays(); + + hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){ + exp.afterClose(); + }); + }, t); + } +}, + +crossfade : function (up, to) { + if (!up) return; + var exp = this, + dur = hs.transitionDuration, + last = exp.last, + x = exp.x, + y = exp.y, + lastX = last.x, + lastY = last.y, + overlayBox = exp.overlayBox, + wrapper = this.wrapper, + content = this.content; + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + this.outline = last.outline; + if (this.outline) this.outline.exp = exp; + last.outline = null; + last.wrapper.style.overflow = 'hidden'; + hs.setStyles(wrapper, { + left: lastX.pos +'px', + top: lastY.pos +'px', + width: lastX.get('wsize') +'px', + height: lastY.get('wsize') +'px' + }); + hs.setStyles(content, { + display: 'none', + width: (x.imgSize || x.size) +'px', + height: (y.imgSize || y.size) +'px', + left: (x.p1 + x.get('imgPad')) +'px', + top: (y.p1 + y.get('imgPad')) + 'px' + }); + var fadeBox = hs.createElement('div', { + className: 'highslide-image' + }, { + position: 'absolute', + zIndex: 4, + overflow: 'hidden', + display: 'none', + left: (lastX.p1 + lastX.get('imgPad')) +'px', + top: (lastY.p1 + lastY.get('imgPad')) +'px', + width: (lastX.imgSize || lastX.size) +'px', + height: (lastY.imgSize || lastY.size) +'px' + }); + if (this.isHtml) hs.setStyles(this.mediumContent, { + left: 0, + top: 0 + }); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o.style.visibility == 'hidden') o.style.display = 'none'; + } + if (overlayBox) hs.setStyles(overlayBox, { + overflow: 'visible', + left: (lastX.p1 + lastX.cb) +'px', + top: (lastY.p1 + lastY.cb) +'px', + width: lastX.size +'px', + height: lastY.size +'px' + }); + var names = { oldImg: last, newImg: this }; + for (var n in names) { + this[n] = names[n].content.cloneNode(1); + hs.setStyles(this[n], { + position: 'absolute', + border: 0, + visibility: 'visible' + }); + fadeBox.appendChild(this[n]); + } + hs.setStyles(this.oldImg, { + left: 0, + top: 0 + }); + hs.setStyles(this.newImg, { + display: 'block', + opacity: 0, + left: (x.pos - lastX.pos + x.p1 - lastX.p1 + x.get('imgPad') - lastX.get('imgPad')) +'px', + top: (y.pos - lastY.pos + y.p1 - lastY.p1 + y.get('imgPad') - lastY.get('imgPad')) +'px' + }); + wrapper.appendChild(fadeBox); + if (overlayBox) { + overlayBox.className = ''; + wrapper.appendChild(overlayBox); + } + fadeBox.style.display = ''; + last.content.style.display = 'none'; + + if (hs.safari) { + var match = navigator.userAgent.match(/Safari\/([0-9]{3})/); + if (match && parseInt(match[1]) < 525) wrapper.style.visibility = 'visible'; + } + function end() { + wrapper.style.visibility = content.style.visibility = 'visible'; + content.style.display = 'block'; + fadeBox.style.display = 'none'; + exp.a.className += ' highslide-active-anchor'; + exp.afterExpand(); + last.afterClose(); + exp.last = null; + } + hs.animate(last.wrapper, { + left: x.pos, + top: y.pos, + width: x.get('wsize'), + height: y.get('wsize') + }, dur); + + hs.animate(fadeBox, { + width: x.imgSize || x.size, + height: y.imgSize || y.size, + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad') + }, dur); + + hs.animate(this.oldImg, { + left: (lastX.pos - x.pos + lastX.p1 - x.p1 + lastX.get('imgPad') - x.get('imgPad')), + top: (lastY.pos - y.pos + lastY.p1 - y.p1 + lastY.get('imgPad') - y.get('imgPad')) + }, dur); + + hs.animate(this.newImg, { + opacity: 1, + left: 0, + top: 0 + }, dur); + if (overlayBox) hs.animate(overlayBox, { + left: x.p1 + x.cb, + top: y.p1 + y.cb, + width: x.size, + height: y.size + }, dur); + if (this.outline) var wrapStep = function(val, args) { + if (args.prop == 'top') { + var stl = exp.wrapper.style; + var pos = { + w: parseInt(stl.width), + h: parseInt(stl.height), + x: parseInt(stl.left), + y: parseInt(stl.top) + }; + exp.outline.setPosition(pos); + } + }; + hs.animate(wrapper, to.wrapper, { + duration: dur, + complete: end, + step: wrapStep + }); + + fadeBox.style.visibility = 'visible'; +}, +reuseOverlay : function(o, el) { + if (!this.last) return false; + for (var i = 0; i < this.last.overlays.length; i++) { + var oDiv = hs.$('hsId'+ this.last.overlays[i]); + if (oDiv && oDiv.hsId == o.hsId) { + this.genOverlayBox(); + oDiv.reuse = this.key; + hs.push(this.overlays, this.last.overlays[i]); + return true; + } + } + return false; +}, + + +afterExpand : function() { + this.isExpanded = true; + this.focus(); + + if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent(); + if (this.iframe) { + try { + var exp = this, + doc = this.iframe.contentDocument || this.iframe.contentWindow.document; + hs.addEventListener(doc, 'mousedown', function () { + if (hs.focusKey != exp.key) exp.focus(); + }); + } catch(e) {} + if (hs.ie && typeof this.isClosing != 'boolean') // first open + this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout + } + if (this.dimmingOpacity) hs.dim(this); + if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; + this.prepareNextOutline(); + var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; + this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') + && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); + if (this.overlayBox) this.showOverlays(); + hs.fireEvent(this, 'onAfterExpand'); + +}, + + +prepareNextOutline : function() { + var key = this.key; + var outlineType = this.outlineType; + new hs.Outline(outlineType, + function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); +}, + + +preloadNext : function() { + var next = this.getAdjacentAnchor(1); + if (next && next.onclick.toString().match(/hs\.expand/)) + var img = hs.createElement('img', { src: hs.getSrc(next) }); +}, + + +getAdjacentAnchor : function(op) { + var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; + + /*< ? if ($cfg->slideshow) : ?>s*/ + if (!as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + /*< ? endif ?>s*/ + return as[current + op] || null; +}, + +getAnchorIndex : function() { + var arr = hs.getAnchors().groups[this.slideshowGroup || 'none']; + if (arr) for (var i = 0; i < arr.length; i++) { + if (arr[i] == this.a) return i; + } + return null; +}, + + +getNumber : function() { + if (this[this.numberPosition]) { + var arr = hs.anchors.groups[this.slideshowGroup || 'none']; + if (arr) { + var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length); + this[this.numberPosition].innerHTML = + '
'+ s +'
'+ this[this.numberPosition].innerHTML; + } + } +}, +initSlideshow : function() { + if (!this.last) { + for (var i = 0; i < hs.slideshows.length; i++) { + var ss = hs.slideshows[i], sg = ss.slideshowGroup; + if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup) + this.slideshow = new hs.Slideshow(this.key, ss); + } + } else { + this.slideshow = this.last.slideshow; + } + var ss = this.slideshow; + if (!ss) return; + var key = ss.expKey = this.key; + + ss.checkFirstAndLast(); + ss.disable('full-expand'); + if (ss.controls) { + var o = ss.overlayOptions || {}; + o.overlayId = ss.controls; + o.hsId = 'controls'; + this.createOverlay(o); + } + if (ss.thumbstrip) ss.thumbstrip.add(this); + if (!this.last && this.autoplay) ss.play(true); + if (ss.autoplay) { + ss.autoplay = setTimeout(function() { + hs.next(key); + }, (ss.interval || 500)); + } +}, + +cancelLoading : function() { + hs.discardElement (this.wrapper); + hs.expanders[this.key] = null; + if (hs.upcoming == this.a) hs.upcoming = null; + hs.undim(this.key); + if (this.loading) hs.loading.style.left = '-9999px'; + hs.fireEvent(this, 'onHideLoading'); +}, + +writeCredits : function () { + if (this.credits) return; + this.credits = hs.createElement('a', { + href: hs.creditsHref, + target: hs.creditsTarget, + className: 'highslide-credits', + innerHTML: hs.lang.creditsText, + title: hs.lang.creditsTitle + }); + this.createOverlay({ + overlayId: this.credits, + position: this.creditsPosition || 'top left', + hsId: 'credits' + }); +}, + +getInline : function(types, addOverlay) { + for (var i = 0; i < types.length; i++) { + var type = types[i], s = null; + if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return; + else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return; + if (!this[type +'Id'] && this.thumbsUserSetId) + this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; + if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']); + if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { + s = eval(this[type +'Eval']); + } catch (e) {} + if (!this[type] && this[type +'Text']) { + s = this[type +'Text']; + } + if (!this[type] && !s) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + this[type] = next.cloneNode(1); + break; + } + next = next.nextSibling; + } + } + if (!this[type] && !s && this.numberPosition == type) s = '\n'; + + if (!this[type] && s) this[type] = hs.createElement('div', + { className: 'highslide-'+ type, innerHTML: s } ); + + if (addOverlay && this[type]) { + var o = { position: (type == 'heading') ? 'above' : 'below' }; + for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; + o.overlayId = this[type]; + this.createOverlay(o); + } + } +}, + + +// on end move and resize +doShowHide : function(visibility) { + if (hs.hideSelects) this.showHideElements('SELECT', visibility); + if (hs.hideIframes) this.showHideElements('IFRAME', visibility); + if (hs.geckoMac) this.showHideElements('*', visibility); +}, +showHideElements : function (tagName, visibility) { + var els = document.getElementsByTagName(tagName); + var prop = tagName == '*' ? 'overflow' : 'visibility'; + for (var i = 0; i < els.length; i++) { + if (prop == 'visibility' || (document.defaultView.getComputedStyle( + els[i], "").getPropertyValue('overflow') == 'auto' + || els[i].getAttribute('hidden-by') != null)) { + var hiddenBy = els[i].getAttribute('hidden-by'); + if (visibility == 'visible' && hiddenBy) { + hiddenBy = hiddenBy.replace('['+ this.key +']', ''); + els[i].setAttribute('hidden-by', hiddenBy); + if (!hiddenBy) els[i].style[prop] = els[i].origProp; + } else if (visibility == 'hidden') { // hide if behind + var elPos = hs.getPosition(els[i]); + elPos.w = els[i].offsetWidth; + elPos.h = els[i].offsetHeight; + if (!this.dimmingOpacity) { // hide all if dimming + + var clearsX = (elPos.x + elPos.w < this.x.get('opos') + || elPos.x > this.x.get('opos') + this.x.get('osize')); + var clearsY = (elPos.y + elPos.h < this.y.get('opos') + || elPos.y > this.y.get('opos') + this.y.get('osize')); + } + var wrapperKey = hs.getWrapperKey(els[i]); + if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image + if (!hiddenBy) { + els[i].setAttribute('hidden-by', '['+ this.key +']'); + els[i].origProp = els[i].style[prop]; + els[i].style[prop] = 'hidden'; + + } else if (hiddenBy.indexOf('['+ this.key +']') == -1) { + els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); + } + } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) + && wrapperKey != this.key) { // on move + els[i].setAttribute('hidden-by', ''); + els[i].style[prop] = els[i].origProp || ''; + } else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) { + els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); + } + + } + } + } +}, + +focus : function() { + this.wrapper.style.zIndex = hs.zIndexCounter += 2; + // blur others + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && i == hs.focusKey) { + var blurExp = hs.expanders[i]; + blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; + if (blurExp.isImage) { + blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; + blurExp.content.title = hs.lang.focusTitle; + } + hs.fireEvent(blurExp, 'onBlur'); + } + } + + // focus this + if (this.outline) this.outline.table.style.zIndex + = this.wrapper.style.zIndex - 1; + this.content.className = 'highslide-'+ this.contentType; + if (this.isImage) { + this.content.title = hs.lang.restoreTitle; + + if (hs.restoreCursor) { + hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; + if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand'; + this.content.style.cursor = hs.styleRestoreCursor; + } + } + hs.focusKey = this.key; + hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + hs.fireEvent(this, 'onFocus'); +}, +moveTo: function(x, y) { + this.x.setPos(x); + this.y.setPos(y); +}, +resize : function (e) { + var w, h, r = e.width / e.height; + w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); + if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; + h = this.isHtml ? e.height + e.dY : w / r; + if (h < Math.min(this.minHeight, this.y.full)) { + h = Math.min(this.minHeight, this.y.full); + if (this.isImage) w = h * r; + } + this.resizeTo(w, h); +}, +resizeTo: function(w, h) { + this.y.setSize(h); + this.x.setSize(w); +}, + +close : function() { + if (this.isClosing || !this.isExpanded) return; + if (this.transitions[1] == 'crossfade' && hs.upcoming) { + hs.getExpander(hs.upcoming).cancelLoading(); + hs.upcoming = null; + } + if (!hs.fireEvent(this, 'onBeforeClose')) return; + this.isClosing = true; + if (this.slideshow && !hs.upcoming) this.slideshow.pause(); + + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + + try { + if (this.isHtml) this.htmlPrepareClose(); + this.content.style.cursor = 'default'; + this.changeSize( + 0, { + wrapper: { + width : this.x.t, + height : this.y.t, + left: this.x.tpos - this.x.cb + this.x.tb, + top: this.y.tpos - this.y.cb + this.y.tb + }, + content: { + left: 0, + top: 0, + width: this.x.t, + height: this.y.t + } + }, hs.restoreDuration + ); + } catch (e) { this.afterClose(); } +}, + +htmlPrepareClose : function() { + if (hs.geckoMac) { // bad redraws + if (!hs.mask) hs.mask = hs.createElement('div', null, + { position: 'absolute' }, hs.container); + hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px', + left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' }); + } + if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {} + + if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject(); + if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent) + this.scrollerDiv.style.overflow = 'hidden'; +}, + +destroyObject : function () { + if (hs.ie && this.iframe) + try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {} + if (this.objectType == 'swf') swfobject.removeSWF(this.body.id); + this.body.innerHTML = ''; +}, + +sleep : function() { + if (this.outline) this.outline.table.style.display = 'none'; + this.releaseMask = null; + this.wrapper.style.display = 'none'; + hs.push(hs.sleeping, this); +}, + +awake : function() {try { + + hs.expanders[this.key] = this; + + if (!hs.allowMultipleInstances &&hs.focusKey != this.key) { + try { hs.expanders[hs.focusKey].close(); } catch (e){} + } + + var z = hs.zIndexCounter++, stl = { display: '', zIndex: z }; + hs.setStyles (this.wrapper, stl); + this.isClosing = false; + + var o = this.outline || 0; + if (o) { + if (!this.outlineWhileAnimating) stl.visibility = 'hidden'; + hs.setStyles (o.table, stl); + } + if (this.slideshow) { + this.initSlideshow(); + } + + this.show(); +} catch (e) {} + + +}, + +createOverlay : function (o) { + var el = o.overlayId, + relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position)); + if (typeof el == 'string') el = hs.getNode(el); + if (o.html) el = hs.createElement('div', { innerHTML: o.html }); + if (!el || typeof el == 'string') return; + if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return; + el.style.display = 'block'; + o.hsId = o.hsId || o.overlayId; + if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return; + this.genOverlayBox(); + var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; + if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; + var overlay = hs.createElement( + 'div', { + id: 'hsId'+ hs.idCounter++, + hsId: o.hsId + }, { + position: 'absolute', + visibility: 'hidden', + width: width, + direction: hs.lang.cssDirection || '', + opacity: 0 + }, + relToVP ? hs.viewport :this.overlayBox, + true + ); + if (relToVP) overlay.hsKey = this.key; + + overlay.appendChild(el); + hs.extend(overlay, { + opacity: 1, + offsetX: 0, + offsetY: 0, + dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250 + }); + hs.extend(overlay, o); + + if (this.gotOverlays) { + this.positionOverlay(overlay); + if (!overlay.hideOnMouseOut || this.mouseIsOver) + hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur); + } + hs.push(this.overlays, hs.idCounter - 1); +}, +positionOverlay : function(overlay) { + var p = overlay.position || 'middle center', + relToVP = (overlay.relativeTo == 'viewport'), + offX = overlay.offsetX, + offY = overlay.offsetY; + if (relToVP) { + hs.viewport.style.display = 'block'; + overlay.hsKey = this.key; + if (overlay.offsetWidth > overlay.parentNode.offsetWidth) + overlay.style.width = '100%'; + } else + if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay); + if (/left$/.test(p)) overlay.style.left = offX +'px'; + + if (/center$/.test(p)) hs.setStyles (overlay, { + left: '50%', + marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px' + }); + + if (/right$/.test(p)) overlay.style.right = - offX +'px'; + + if (/^leftpanel$/.test(p)) { + hs.setStyles(overlay, { + right: '100%', + marginRight: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p1 = overlay.offsetWidth; + + } else if (/^rightpanel$/.test(p)) { + hs.setStyles(overlay, { + left: '100%', + marginLeft: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p2 = overlay.offsetWidth; + } + var parOff = overlay.parentNode.offsetHeight; + overlay.style.height = 'auto'; + if (relToVP && overlay.offsetHeight > parOff) + overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%'; + + if (/^top/.test(p)) overlay.style.top = offY +'px'; + if (/^middle/.test(p)) hs.setStyles (overlay, { + top: '50%', + marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px' + }); + if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px'; + if (/^above$/.test(p)) { + hs.setStyles(overlay, { + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + bottom: '100%', + marginBottom: this.y.cb +'px', + width: 'auto' + }); + this.y.p1 = overlay.offsetHeight; + + } else if (/^below$/.test(p)) { + hs.setStyles(overlay, { + position: 'relative', + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + top: '100%', + marginTop: this.y.cb +'px', + width: 'auto' + }); + this.y.p2 = overlay.offsetHeight; + overlay.style.position = 'absolute'; + } +}, + +getOverlays : function() { + this.getInline(['heading', 'caption'], true); + this.getNumber(); + if (this.caption) hs.fireEvent(this, 'onAfterGetCaption'); + if (this.heading) hs.fireEvent(this, 'onAfterGetHeading'); + if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move'; + if (hs.showCredits) this.writeCredits(); + for (var i = 0; i < hs.overlays.length; i++) { + var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; + if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) + || (sg && sg === this.slideshowGroup)) { + if (this.isImage || (this.isHtml && o.useOnHtml)) + this.createOverlay(o); + } + } + var os = []; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (/panel$/.test(o.position)) this.positionOverlay(o); + else hs.push(os, o); + } + for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); + this.gotOverlays = true; +}, +genOverlayBox : function() { + if (!this.overlayBox) this.overlayBox = hs.createElement ( + 'div', { + className: this.wrapperClassName + }, { + position : 'absolute', + width: (this.x.size || (this.useBox ? this.width : null) + || this.x.full) +'px', + height: (this.y.size || this.y.full) +'px', + visibility : 'hidden', + overflow : 'hidden', + zIndex : hs.ie ? 4 : null + }, + hs.container, + true + ); +}, +sizeOverlayBox : function(doWrapper, doPanels) { + var overlayBox = this.overlayBox, + x = this.x, + y = this.y; + hs.setStyles( overlayBox, { + width: x.size +'px', + height: y.size +'px' + }); + if (doWrapper || doPanels) { + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat'); + if (o && /^(above|below)$/.test(o.position)) { + if (ie6) { + o.style.width = (overlayBox.offsetWidth + 2 * x.cb + + x.p1 + x.p2) +'px'; + } + y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight; + } + if (o && ie6 && /^(left|right)panel$/.test(o.position)) { + o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px'; + } + } + } + if (doWrapper) { + hs.setStyles(this.content, { + top: y.p1 +'px' + }); + hs.setStyles(overlayBox, { + top: (y.p1 + y.cb) +'px' + }); + } +}, + +showOverlays : function() { + var b = this.overlayBox; + b.className = ''; + hs.setStyles(b, { + top: (this.y.p1 + this.y.cb) +'px', + left: (this.x.p1 + this.x.cb) +'px', + overflow : 'visible' + }); + if (hs.safari) b.style.visibility = 'visible'; + this.wrapper.appendChild (b); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + o.style.zIndex = o.hsId == 'controls' ? 5 : 4; + if (!o.hideOnMouseOut || this.mouseIsOver) { + o.style.visibility = 'visible'; + hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: o.opacity }, o.dur); + } + } +}, + +destroyOverlays : function() { + if (!this.overlays.length) return; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o.parentNode == hs.viewport) hs.discardElement(o); + } + if (this.slideshow) { + var c = this.slideshow.controls; + if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); + } + if (this.isHtml && this.preserveContent) { + this.overlayBox.style.top = '-9999px'; + hs.container.appendChild(this.overlayBox); + } else + hs.discardElement(this.overlayBox); +}, + + + +createFullExpand : function () { + if (this.slideshow && this.slideshow.controls) { + this.slideshow.enable('full-expand'); + return; + } + this.fullExpandLabel = hs.createElement( + 'a', { + href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', + title: hs.lang.fullExpandTitle, + className: 'highslide-full-expand' + } + ); + if (!hs.fireEvent(this, 'onCreateFullExpand')) return; + + this.createOverlay({ + overlayId: this.fullExpandLabel, + position: hs.fullExpandPosition, + hideOnMouseOut: true, + opacity: hs.fullExpandOpacity + }); +}, + +doFullExpand : function () { + try { + if (!hs.fireEvent(this, 'onDoFullExpand')) return; + if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); + + this.focus(); + var xSize = this.x.size; + this.resizeTo(this.x.full, this.y.full); + + var xpos = this.x.pos - (this.x.size - xSize) / 2; + if (xpos < hs.marginLeft) xpos = hs.marginLeft; + + this.moveTo(xpos, this.y.pos); + this.doShowHide('hidden'); + hs.setDimmerSize(this); + + } catch (e) { + this.error(e); + } +}, + + +afterClose : function () { + this.a.className = this.a.className.replace('highslide-active-anchor', ''); + + this.doShowHide('visible'); + + if (this.isHtml && this.preserveContent + && this.transitions[1] != 'crossfade') { + this.sleep(); + } else { + if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); + + hs.discardElement(this.wrapper); + } + if (hs.mask) hs.mask.style.display = 'none'; + if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none'; + + if (this.dimmingOpacity) hs.undim(this.key); + hs.fireEvent(this, 'onAfterClose'); + hs.expanders[this.key] = null; + hs.reOrder(); +} + +}; + + +// hs.Ajax object prototype +hs.Ajax = function (a, content, pre) { + this.a = a; + this.content = content; + this.pre = pre; +}; + +hs.Ajax.prototype = { +run : function () { + if (!this.src) this.src = hs.getSrc(this.a); + if (this.src.match('#')) { + var arr = this.src.split('#'); + this.src = arr[0]; + this.id = arr[1]; + } + if (hs.cachedGets[this.src]) { + this.cachedGet = hs.cachedGets[this.src]; + if (this.id) this.getElementContent(); + else this.loadHTML(); + return; + } + try { this.xmlHttp = new XMLHttpRequest(); } + catch (e) { + try { this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } + catch (e) { + try { this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } + catch (e) { this.onError(); } + } + } + var pThis = this; + this.xmlHttp.onreadystatechange = function() { + if(pThis.xmlHttp.readyState == 4) { + if (pThis.id) pThis.getElementContent(); + else pThis.loadHTML(); + } + }; + var src = this.src; + if (hs.forceAjaxReload) + src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); + this.xmlHttp.open('GET', src, true); + this.xmlHttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + this.xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + this.xmlHttp.send(null); +}, + +getElementContent : function() { + hs.init(); + var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null; + + this.iframe = hs.createElement('iframe', attribs, + { position: 'absolute', top: '-9999px' }, hs.container); + + this.loadHTML(); +}, + +loadHTML : function() { + var s = this.cachedGet || this.xmlHttp.responseText; + if (this.pre) hs.cachedGets[this.src] = s; + if (!hs.ie || hs.uaVersion >= 5.5) { + s = s.replace(/\s/g, ' ').replace( + new RegExp(']*>', 'gi'), '').replace( + new RegExp(']*>.*?', 'gi'), ''); + + if (this.iframe) { + var doc = this.iframe.contentDocument; + if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document; + if (!doc) { // Opera + var pThis = this; + setTimeout(function() { pThis.loadHTML(); }, 25); + return; + } + doc.open(); + doc.write(s); + doc.close(); + try { s = doc.getElementById(this.id).innerHTML; } catch (e) { + try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera + } + hs.discardElement(this.iframe); + } else { + s = s.replace(new RegExp('^.*?]*>(.*?).*?$', 'i'), '$1'); + } + } + hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; + this.onLoad(); + for (var x in this) this[x] = null; +} +}; + + +hs.Slideshow = function (expKey, options) { + if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors(); + this.expKey = expKey; + for (var x in options) this[x] = options[x]; + if (this.useControls) this.getControls(); + if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this); +}; +hs.Slideshow.prototype = { +getControls: function() { + this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) }, + null, hs.container); + + var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close']; + this.btn = {}; + var pThis = this; + for (var i = 0; i < buttons.length; i++) { + this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]); + this.enable(buttons[i]); + } + this.btn.pause.style.display = 'none'; + //this.disable('full-expand'); +}, +checkFirstAndLast: function() { + if (this.repeat || !this.controls) return; + var exp = hs.expanders[this.expKey], + cur = exp.getAnchorIndex(), + re = /disabled$/; + if (cur == 0) + this.disable('previous'); + else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className)) + this.enable('previous'); + if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) { + this.disable('next'); + this.disable('play'); + } else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) { + this.enable('next'); + this.enable('play'); + } +}, +enable: function(btn) { + if (!this.btn) return; + var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/; + a.onclick = function() { + sls[btn](); + return false; + }; + if (re.test(a.className)) a.className = a.className.replace(re, ''); +}, +disable: function(btn) { + if (!this.btn) return; + var a = this.btn[btn].getElementsByTagName('a')[0]; + a.onclick = function() { return false; }; + if (!/disabled$/.test(a.className)) a.className += ' disabled'; +}, +hitSpace: function() { + if (this.autoplay) this.pause(); + else this.play(); +}, +play: function(wait) { + if (this.btn) { + this.btn.play.style.display = 'none'; + this.btn.pause.style.display = ''; + } + + this.autoplay = true; + if (!wait) hs.next(this.expKey); +}, +pause: function() { + if (this.btn) { + this.btn.pause.style.display = 'none'; + this.btn.play.style.display = ''; + } + + clearTimeout(this.autoplay); + this.autoplay = null; +}, +previous: function() { + this.pause(); + hs.previous(this.btn.previous); +}, +next: function() { + this.pause(); + hs.next(this.btn.next); +}, +move: function() {}, +'full-expand': function() { + hs.getExpander().doFullExpand(); +}, +close: function() { + hs.close(this.btn.close); +} +}; +hs.Thumbstrip = function(slideshow) { + function add (exp) { + hs.extend(options || {}, { + overlayId: dom, + hsId: 'thumbstrip' + }); + if (hs.ieLt7) options.fade = 0; + exp.createOverlay(options); + hs.setStyles(dom.parentNode, { overflow: 'hidden' }); + }; + + function scroll (delta) { + selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7)); + }; + + function selectThumb (i, scrollBy) { + if (i === undefined) for (var j = 0; j < group.length; j++) { + if (group[j] == hs.expanders[slideshow.expKey].a) { + i = j; + break; + } + } + if (i === undefined) return; + var as = dom.getElementsByTagName('a'), + active = as[i], + cell = active.parentNode, + left = isX ? 'Left' : 'Top', + right = isX ? 'Right' : 'Bottom', + width = isX ? 'Width' : 'Height', + offsetLeft = 'offset' + left, + offsetWidth = 'offset' + width, + overlayWidth = div.parentNode.parentNode[offsetWidth], + minTblPos = overlayWidth - table[offsetWidth], + curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0, + tblPos = curTblPos, + mgnRight = 20; + if (scrollBy !== undefined) { + tblPos = curTblPos - scrollBy; + if (tblPos > 0) tblPos = 0; + if (tblPos < minTblPos) tblPos = minTblPos; + + } else { + for (var j = 0; j < as.length; j++) as[j].className = ''; + active.className = 'highslide-active-anchor'; + var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft], + activeRight = cell[offsetLeft] + cell[offsetWidth] + + (as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0); + if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight; + else if (activeLeft < -curTblPos) tblPos = -activeLeft; + } + var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos; + hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad'); + hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad'); + scrollUp.style.display = tblPos < 0 ? 'block' : 'none'; + scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none'; + }; + + + // initialize + var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'], + options = slideshow.thumbstrip, + mode = options.mode || 'horizontal', + floatMode = (mode == 'float'), + tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'], + isX = (mode == 'horizontal'), + dom = hs.createElement('div', { + className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode, + innerHTML: + '
'+ + '<'+ tree[0] +'><'+ tree[1] +'>
'+ + '
'+ + '
'+ + '
' + }, { + display: 'none' + }, hs.container), + domCh = dom.childNodes, + div = domCh[0], + scrollUp = domCh[1], + scrollDown = domCh[2], + marker = domCh[3], + table = div.firstChild, + tbody = dom.getElementsByTagName(tree[1])[0], + tr; + for (var i = 0; i < group.length; i++) { + if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody); + (function(){ + var a = group[i], + cell = hs.createElement(tree[3], null, null, tr), + pI = i; + hs.createElement('a', { + href: a.href, + onclick: function() { + hs.getExpander(this).focus(); + return hs.transit(a); + }, + innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML + }, null, cell); + })(); + } + + if (!floatMode) { + scrollUp.onclick = function () { scroll(-1); }; + scrollDown.onclick = function() { scroll(1); }; + hs.addEventListener(tbody, document.onmousewheel !== undefined ? + 'mousewheel' : 'DOMMouseScroll', function(e) { + var delta = 0; + e = e || window.event; + if (e.wheelDelta) { + delta = e.wheelDelta/120; + if (hs.opera) delta = -delta; + } else if (e.detail) { + delta = -e.detail/3; + } + if (delta) scroll(-delta * 0.2); + if (e.preventDefault) e.preventDefault(); + e.returnValue = false; + }); + } + + return { + add: add, + selectThumb: selectThumb + } +}; +if (hs.ie) { + (function () { + try { + document.documentElement.doScroll('left'); + } catch (e) { + setTimeout(arguments.callee, 50); + return; + } + hs.ready(); + })(); +} +hs.addEventListener(document, 'DOMContentLoaded', hs.ready); +hs.addEventListener(window, 'load', hs.ready); +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; + +// set handlers +hs.addEventListener(window, 'load', function() { + if (hs.expandCursor) { + var sel = '.highslide img', + dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'; + + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]); + + if (!hs.ie) { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } else { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } + } +}); +hs.addEventListener(window, 'resize', function() { + hs.getPageSize(); + if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) { + var node = hs.viewport.childNodes[i], + exp = hs.getExpander(node); + exp.positionOverlay(node); + if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb(); + } +}); +hs.addEventListener(document, 'mousemove', function(e) { + hs.mouse = { x: e.clientX, y: e.clientY }; +}); +hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); +hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); +hs.addEventListener(document, 'ready', hs.setClickEvents); +hs.addEventListener(window, 'load', hs.preloadImages); +hs.addEventListener(window, 'load', hs.preloadAjax); \ No newline at end of file diff --git a/highslide/highslide-full.packed.js b/highslide/highslide-full.packed.js new file mode 100644 index 0000000..57029e1 --- /dev/null +++ b/highslide/highslide-full.packed.js @@ -0,0 +1,28 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash +packed +Author: Torstein Hønsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('A m={14:{9B:\'aL\',aw:\'eE...\',av:\'9S 2a eF\',bt:\'9S 2a eG 2a eH\',8J:\'eP 2a eW I (f)\',cv:\'eX by aj a7\',cr:\'eY 2a eZ aj a7 ei\',8N:\'a8\',91:\'a6\',98:\'ac\',8R:\'aM\',8Z:\'aM (ez)\',am:\'eA\',a3:\'a9\',al:\'a9 1p (ab)\',ae:\'aa\',ah:\'aa 1p (ab)\',8M:\'a8 (9E Y)\',93:\'a6 (9E 3i)\',94:\'ac\',ag:\'1:1\',3Q:\'ft %1 fC %2\',7Q:\'9S 2a 2f 2L, fe ad fj 2a 3B. d4 9E dk O 1G ad 35.\'},5m:\'M/d6/\',8B:\'d3.56\',69:\'cZ.56\',7f:63,9o:63,4Y:15,9O:15,6b:15,6v:15,4p:db,ay:0.75,9d:L,8p:5,3U:2,cO:3,5G:1i,bp:\'4i 3i\',bn:1,bf:L,ck:\'cT://M.dl/\',ch:\'dM\',b7:L,8F:[\'a\',\'5c\'],3g:[],cq:63,4m:0,96:50,71:1i,7T:L,4E:L,3O:\'5r\',8W:L,4c:\'28\',9q:\'28\',9Y:H,9W:H,9G:L,4H:ak,6k:ak,5v:L,1X:\'e7-e8\',8U:{2N:\'<5s>\'+\'<1J 1Z="M-35">\'+\'\'+\'<1A>{m.14.8N}\'+\'\'+\'<1J 1Z="M-3G">\'+\'\'+\'<1A>{m.14.a3}\'+\'\'+\'<1J 1Z="M-3h">\'+\'\'+\'<1A>{m.14.ae}\'+\'\'+\'<1J 1Z="M-1G">\'+\'\'+\'<1A>{m.14.91}\'+\'\'+\'<1J 1Z="M-3B">\'+\'\'+\'<1A>{m.14.98}\'+\'\'+\'<1J 1Z="M-1d-2H">\'+\'\'+\'<1A>{m.14.ag}\'+\'\'+\'<1J 1Z="M-2f">\'+\'\'+\'<1A>{m.14.8R}\'+\'\'+\'\',aQ:\'<5s>\'+\'<1J 1Z="M-35">\'+\'\'+\'<1A>{m.14.8N}\'+\'\'+\'<1J 1Z="M-1G">\'+\'\'+\'<1A>{m.14.91}\'+\'\'+\'<1J 1Z="M-3B">\'+\'\'+\'<1A>{m.14.98}\'+\'\'+\'<1J 1Z="M-2f">\'+\'\'+\'<1A>{m.14.8R}\'+\'\'+\'\'+\'\'+\'\'+\'<1A 1Z="M-3L" 2k="{m.14.am}"><1A>\'+\'\'},6e:[],86:L,11:[],88:[\'5v\',\'3A\',\'4c\',\'9q\',\'9Y\',\'9W\',\'1X\',\'3U\',\'dG\',\'dy\',\'dx\',\'a2\',\'dq\',\'dp\',\'do\',\'9V\',\'ct\',\'9G\',\'45\',\'5t\',\'3g\',\'4m\',\'K\',\'N\',\'8e\',\'71\',\'7T\',\'4E\',\'dm\',\'dn\',\'dr\',\'2J\',\'8W\',\'3Y\',\'5e\',\'3O\',\'89\',\'9J\',\'4H\',\'6k\',\'aq\',\'ds\',\'2R\',\'2S\',\'cj\',\'cp\',\'1e\'],1L:[],6p:0,8f:{x:[\'br\',\'Y\',\'4A\',\'3i\',\'bq\'],y:[\'5A\',\'V\',\'9T\',\'4i\',\'7s\']},79:{},9V:{},a2:{},89:{an:{},2e:{},b5:{}},47:[],5u:[],4F:{},4K:[],7k:[],5i:[],6Q:{},8Y:{},7r:[],3X:9r((5d.6M.6f().2y(/.+(?:9Z|du|dt|1z)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1z:(19.5H&&!1U.3F),4o:/cw/.1c(5d.6M),5p:/dK.+9Z:1\\.[0-8].+dL/.1c(5d.6M),$:C(1D){q(1D)D 19.8S(1D)},2o:C(2b,3e){2b[2b.W]=3e},18:C(ai,3W,46,5M,b9){A el=19.18(ai);q(3W)m.3E(el,3W);q(b9)m.S(el,{7Z:0,8c:\'1r\',9t:0});q(46)m.S(el,46);q(5M)5M.1V(el);D el},3E:C(el,3W){O(A x 3j 3W)el[x]=3W[x];D el},S:C(el,46){O(A x 3j 46){q(m.1z&&x==\'1w\'){q(46[x]>0.99)el.E.e1(\'6g\');J el.E.6g=\'aT(1w=\'+(46[x]*2W)+\')\'}J el.E[x]=46[x]}},24:C(el,1y,3u){A 4D,3Z,4C;q(1I 3u!=\'72\'||3u===H){A 2K=bW;3u={41:2K[2],2S:2K[3],6G:2K[4]}}q(1I 3u.41!=\'3Q\')3u.41=63;3u.2S=1j[3u.2S]||1j.au;3u.6y=m.3E({},1y);O(A 3d 3j 1y){A e=1H m.fx(el,3u,3d);4D=9r(m.8L(el,3d))||0;3Z=9r(1y[3d]);4C=3d!=\'1w\'?\'F\':\'\';e.3t(4D,3Z,4C)}},8L:C(el,1y){q(19.7N){D 19.7N.cf(el,H).bw(1y)}J{q(1y==\'1w\')1y=\'6g\';A 3e=el.5L[1y.26(/\\-(\\w)/g,C(a,b){D b.aE()})];q(1y==\'6g\')3e=3e.26(/aT\\(1w=([0-9]+)\\)/,C(a,b){D b/2W});D 3e===\'\'?1:3e}},6d:C(){A d=19,w=1U,4e=d.9I&&d.9I!=\'bd\'?d.5n:d.1k;A b=d.1k;A aR=(w.6Y&&w.aU)?w.6Y+w.aU:1j.2Q(b.aW,b.1M),aO=(w.6N&&1U.aV)?w.6N+w.aV:1j.2Q(b.aS,b.1Q),6V=m.1z?4e.aW:(d.5n.8K||54.6Y),6U=m.1z?1j.2Q(4e.aS,4e.8I):(d.5n.8I||54.6N);A K=m.1z?4e.8K:(d.5n.8K||54.6Y),N=m.1z?4e.8I:54.6N;m.3V={6V:1j.2Q(6V,aR),6U:1j.2Q(6U,aO),K:K,N:N,7B:m.1z?4e.7B:dO,7A:m.1z?4e.7A:dN}},6n:C(el){q(/5c/i.1c(el.3T)){A 6O=19.2z(\'1S\');O(A i=0;i<6O.W;i++){A u=6O[i].dR;q(u&&u.26(/^.*?#/,\'\')==el.29.3d){el=6O[i];5f}}}A p={x:el.4I,y:el.7L};4Q(el.aP){el=el.aP;p.x+=el.4I;p.y+=el.7L;q(el!=19.1k&&el!=19.5n){p.x-=el.7B;p.y-=el.7A}}D p},2H:C(a,2e,3t,Z){q(!a)a=m.18(\'a\',H,{1m:\'1r\'},m.2g);q(1I a.65==\'C\')D 2e;q(Z==\'3y\'){O(A i=0;i8P){8P=1F;6P=i}}}q(6P==-1)m.31=-1;J 11[6P].3I()},4b:C(a,61){a.65=a.2p;A p=a.65?a.65():H;a.65=H;D(p&&1I p[61]!=\'1T\')?p[61]:(1I m[61]!=\'1T\'?m[61]:H)},7x:C(a){A 1e=m.4b(a,\'1e\');q(1e)D 1e;D a.23},5W:C(1D){A 1R=m.$(1D),4t=m.8Y[1D],a={};q(!1R&&!4t)D H;q(!4t){4t=1R.4Z(L);4t.1D=\'\';m.8Y[1D]=4t;D 1R}J{D 4t.4Z(L)}},3H:C(d){q(d)m.8H.1V(d);m.8H.2h=\'\'},1B:C(B){q(!m.2F){m.2F=m.18(\'R\',{1b:\'M-cL\',62:\'\',2p:C(){q(m.1x(m,\'de\'))m.2f()}},{1n:\'2r\',1o:\'22\',Y:0,1w:0},m.2g,L);m.2l(1U,\'3L\',m.4T)}m.2F.E.1m=\'\';m.4T();m.2F.62+=\'|\'+B.P;q(m.5p&&m.b6)m.S(m.2F,{6A:\'7a(\'+m.5m+\'dc.aJ)\',1w:1});J m.24(m.2F,{1w:B.4m},m.96)},8r:C(P){q(!m.2F)D;q(1I P!=\'1T\')m.2F.62=m.2F.62.26(\'|\'+P,\'\');q((1I P!=\'1T\'&&m.2F.62!=\'\')||(m.2u&&m.4b(m.2u,\'4m\')))D;q(m.5p&&m.b6)m.S(m.2F,{6A:\'1r\',K:0,N:0});J m.24(m.2F,{1w:0},m.96,H,C(){m.S(m.2F,{1m:\'1r\',K:0,N:0})})},4T:C(B){m.6d();q(!m.2F)D;A h=(m.1z&&B&&B.Q)?2v(B.Q.E.V)+2v(B.Q.E.N)+(B.1a?B.1a.1s:0):0;m.S(m.2F,{K:m.3V.6V+\'F\',N:1j.2Q(m.3V.6U,h)+\'F\'})},9v:C(4V,B){A 1f=B=B||m.2Y();q(m.2u)D 1i;J m.1f=1f;1C{m.2u=4V;4V.2p()}1E(e){m.1f=m.2u=H}1C{q(!4V||B.3g[1]!=\'4f\')B.2f()}1E(e){}D 1i},7j:C(el,2m){A B=m.2Y(el);q(B){4V=B.8a(2m);D m.9v(4V,B)}J D 1i},35:C(el){D m.7j(el,-1)},1G:C(el){D m.7j(el,1)},6x:C(e){q(!e)e=1U.2E;q(!e.2G)e.2G=e.8x;q(1I e.2G.95!=\'1T\')D L;q(!m.1x(m,\'d2\',e))D L;A B=m.2Y();A 2m=H;aC(e.d1){2c 70:q(B)B.6L();D L;2c 32:2m=2;5f;2c 34:2c 39:2c 40:2m=1;5f;2c 8:2c 33:2c 37:2c 38:2m=-1;5f;2c 27:2c 13:2m=0}q(2m!==H){q(2m!=2)m.5j(19,1U.3F?\'9z\':\'9y\',m.6x);q(!m.b7)D L;q(e.5h)e.5h();J e.bR=1i;q(B){q(2m==0){B.2f()}J q(2m==2){q(B.1p)B.1p.ca()}J{q(B.1p)B.1p.3h();m.7j(B.P,2m)}D 1i}}D L},dd:C(16){m.2o(m.1L,m.3E(16,{21:\'21\'+m.6p++}))},cY:C(1v){A 3c=1v.2R;q(1I 3c==\'72\'){O(A i=0;i<3c.W;i++){A o={};O(A x 3j 1v)o[x]=1v[x];o.2R=3c[i];m.2o(m.5u,o)}}J{m.2o(m.5u,1v)}},87:C(7l,7D){A el,2n=/^M-Q-([0-9]+)$/;el=7l;4Q(el.29){q(el.6o!==1T)D el.6o;q(el.1D&&2n.1c(el.1D))D el.1D.26(2n,"$1");el=el.29}q(!7D){el=7l;4Q(el.29){q(el.3T&&m.6F(el)){O(A P=0;P1)D L;q(!e.2G)e.2G=e.8x;A el=e.2G;4Q(el.29&&!(/M-(2L|3B|3y|3L)/.1c(el.1b))){el=el.29}A B=m.2Y(el);q(B&&(B.5X||!B.5w))D L;q(B&&e.Z==\'8G\'){q(e.2G.95)D L;A 2y=el.1b.2y(/M-(2L|3B|3L)/);q(2y){m.2D={B:B,Z:2y[1],Y:B.x.G,K:B.x.I,V:B.y.G,N:B.y.I,b3:e.77,aZ:e.7n};m.2l(19,\'76\',m.6Z);q(e.5h)e.5h();q(/M-(2L|3y)-7J/.1c(B.T.1b)){B.3I();m.92=L}D 1i}J q(/M-3y/.1c(el.1b)&&m.31!=B.P){B.3I();B.4W(\'1q\')}}J q(e.Z==\'bU\'){m.5j(19,\'76\',m.6Z);q(m.2D){q(m.53&&m.2D.Z==\'2L\')m.2D.B.T.E.4M=m.53;A 3z=m.2D.3z;q(!3z&&!m.92&&!/(3B|3L)/.1c(m.2D.Z)){q(m.1x(B,\'dS\'))B.2f()}J q(3z||(!3z&&m.b4)){m.2D.B.4W(\'1q\')}q(m.2D.B.3S)m.2D.B.3S.E.1m=\'1r\';q(3z)m.1x(m.2D.B,\'fi\',m.2D);q(3z)m.4T(B);m.92=1i;m.2D=H}J q(/M-2L-7J/.1c(el.1b)){el.E.4M=m.53}}D 1i},6Z:C(e){q(!m.2D)D L;q(!e)e=1U.2E;A a=m.2D,B=a.B;q(B.1h){q(!B.3S)B.3S=m.18(\'R\',H,{1n:\'2r\',K:B.x.I+\'F\',N:B.y.I+\'F\',Y:B.x.cb+\'F\',V:B.y.cb+\'F\',1F:4,6A:(m.1z?\'fg\':\'1r\'),1w:.ff},B.Q,L);q(B.3S.E.1m==\'1r\')B.3S.E.1m=\'\'}a.dX=e.77-a.b3;a.dY=e.7n-a.aZ;A 8w=1j.fo(1j.b0(a.dX,2)+1j.b0(a.dY,2));q(!a.3z)a.3z=(a.Z!=\'2L\'&&8w>0)||(8w>(m.fl||5));q(a.3z&&e.77>5&&e.7n>5){q(!m.1x(B,\'fd\',a))D 1i;q(a.Z==\'3L\')B.3L(a);J{B.8t(a.Y+a.dX,a.V+a.dY);q(a.Z==\'2L\')B.T.E.4M=\'3B\'}}D 1i},az:C(e){1C{q(!e)e=1U.2E;A 5V=/f6/i.1c(e.Z);q(!e.2G)e.2G=e.8x;q(m.1z)e.8y=5V?e.f5:e.f4;A B=m.2Y(e.2G);q(!B.5w)D;q(!B||!e.8y||m.2Y(e.8y,L)==B||m.2D)D;m.1x(B,5V?\'f3\':\'f7\',e);O(A i=0;i=k.1v.41+k.9Q){k.4r=k.3Z;k.G=k.9R=1;k.9P();k.1v.6y[k.1y]=L;A 9M=L;O(A i 3j k.1v.6y)q(k.1v.6y[i]!==L)9M=1i;q(9M){q(k.1v.6G)k.1v.6G.ar(k.30)}D 1i}J{A n=t-k.9Q;k.9R=n/k.1v.41;k.G=k.1v.2S(n,0,1,k.1v.41);k.4r=k.4D+((k.3Z-k.4D)*k.G);k.9P()}D L}};m.3E(m.fx,{3J:{1w:C(fx){m.S(fx.30,{1w:fx.4r})},aA:C(fx){q(fx.30.E&&fx.30.E[fx.1y]!=H)fx.30.E[fx.1y]=fx.4r+fx.4C;J fx.30[fx.1y]=fx.4r}}});m.5U=C(1X,3s){k.3s=3s;k.1X=1X;A v=m.3X,43;k.9p=m.1z&&v>=5.5&&v<7;q(!1X){q(3s)3s();D}m.6R();k.2i=m.18(\'2i\',{ey:0},{1o:\'1q\',1n:\'2r\',ex:\'eq\',K:0},m.2g,L);A 4g=m.18(\'4g\',H,H,k.2i,1);k.2I=[];O(A i=0;i<=8;i++){q(i%3==0)43=m.18(\'43\',H,{N:\'28\'},4g,L);k.2I[i]=m.18(\'2I\',H,H,43,L);A E=i!=4?{ep:0,eh:0}:{1n:\'4j\'};m.S(k.2I[i],E)}k.2I[4].1b=1X+\' M-1a\';k.aI()};m.5U.58={aI:C(){A 1e=m.5m+(m.ef||"ed/")+k.1X+".aJ";A aK=m.4o?m.2g:H;k.3M=m.18(\'1S\',H,{1n:\'2r\',V:\'-4h\'},aK,L);A 3x=k;k.3M.4L=C(){3x.aG()};k.3M.1e=1e},aG:C(){A o=k.1s=k.3M.K/4,G=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1B={N:(2*o)+\'F\',K:(2*o)+\'F\'};O(A i=0;i<=8;i++){q(G[i]){q(k.9p){A w=(i==1||i==7)?\'2W%\':k.3M.K+\'F\';A R=m.18(\'R\',H,{K:\'2W%\',N:\'2W%\',1n:\'4j\',2q:\'1q\'},k.2I[i],L);m.18(\'R\',H,{6g:"em:ek.bH.eB(eC=eT, 1e=\'"+k.3M.1e+"\')",1n:\'2r\',K:w,N:k.3M.N+\'F\',Y:(G[i][0]*o)+\'F\',V:(G[i][1]*o)+\'F\'},R,L)}J{m.S(k.2I[i],{6A:\'7a(\'+k.3M.1e+\') \'+(G[i][0]*o)+\'F \'+(G[i][1]*o)+\'F\'})}q(1U.3F&&(i==3||i==5))m.18(\'R\',H,1B,k.2I[i],L);m.S(k.2I[i],1B)}}k.3M=H;q(m.4F[k.1X])m.4F[k.1X].6a();m.4F[k.1X]=k;q(k.3s)k.3s()},4B:C(G,1s,aF,2B,2S){A B=k.B,3C=B.Q.E,1s=1s||0,G=G||{x:B.x.G+1s,y:B.y.G+1s,w:B.x.U(\'1W\')-2*1s,h:B.y.U(\'1W\')-2*1s};q(aF)k.2i.E.1o=(G.h>=4*k.1s)?\'22\':\'1q\';m.S(k.2i,{Y:(G.x-k.1s)+\'F\',V:(G.y-k.1s)+\'F\',K:(G.w+2*k.1s)+\'F\'});G.w-=2*k.1s;G.h-=2*k.1s;m.S(k.2I[4],{K:G.w>=0?G.w+\'F\':0,N:G.h>=0?G.h+\'F\':0});q(k.9p)k.2I[3].E.N=k.2I[5].E.N=k.2I[4].E.N},6a:C(aB){q(aB)k.2i.E.1o=\'1q\';J m.3H(k.2i)}};m.6q=C(B,1B){k.B=B;k.1B=1B;k.3p=1B==\'x\'?\'bN\':\'bM\';k.3l=k.3p.6f();k.5Z=1B==\'x\'?\'bZ\':\'bY\';k.6w=k.5Z.6f();k.9u=1B==\'x\'?\'bO\':\'bP\';k.aD=k.9u.6f();k.1g=k.3o=0};m.6q.58={U:C(P){aC(P){2c\'8b\':D k.1N+k.3k+(k.t-m.2s[\'1s\'+k.3p])/2;2c\'8k\':D k.G+k.cb+k.1g+(k.I-m.2s[\'1s\'+k.3p])/2;2c\'1W\':D k.I+2*k.cb+k.1g+k.3o;2c\'5a\':D k.4l-k.3n-k.4n;2c\'7F\':D k.U(\'5a\')-2*k.cb-k.1g-k.3o;2c\'60\':D k.G-(k.B.1a?k.B.1a.1s:0);2c\'82\':D k.U(\'1W\')+(k.B.1a?2*k.B.1a.1s:0);2c\'2j\':D k.1Y?1j.5g((k.I-k.1Y)/2):0}},7E:C(){k.cb=(k.B.T[\'1s\'+k.3p]-k.t)/2;k.4n=m[\'9t\'+k.9u]},7U:C(){k.t=k.B.el[k.3l]?2v(k.B.el[k.3l]):k.B.el[\'1s\'+k.3p];k.1N=k.B.1N[k.1B];k.3k=(k.B.el[\'1s\'+k.3p]-k.t)/2;q(k.1N<1){k.1N=(m.3V[k.3l]/2)+m.3V[\'2d\'+k.5Z]}},7I:C(){A B=k.B;k.2O=\'28\';q(B.9q==\'4A\')k.2O=\'4A\';J q(1H 4y(k.6w).1c(B.4c))k.2O=H;J q(1H 4y(k.aD).1c(B.4c))k.2O=\'2Q\';k.G=k.1N-k.cb+k.3k;k.I=1j.3q(k.1d,B[\'2Q\'+k.3p]||k.1d);k.2Z=B.5v?1j.3q(B[\'3q\'+k.3p],k.1d):k.1d;q(B.2M&&B.3A){k.I=B[k.3l];k.1Y=k.1d}q(k.1B==\'x\'&&m.5G)k.2Z=B.4H;k.2G=B[\'2G\'+k.1B.aE()];k.3n=m[\'9t\'+k.5Z];k.2d=m.3V[\'2d\'+k.5Z];k.4l=m.3V[k.3l]},6z:C(i){A B=k.B;q(B.2M&&(B.3A||m.5G)){k.1Y=i;k.I=1j.2Q(k.I,k.1Y);B.T.E[k.6w]=k.U(\'2j\')+\'F\'}J k.I=i;B.T.E[k.3l]=i+\'F\';B.Q.E[k.3l]=k.U(\'1W\')+\'F\';q(B.1a)B.1a.4B();q(B.3S)B.3S.E[k.3l]=i+\'F\';q(B.2C){A d=B.2t;q(k.7S===1T)k.7S=B.1t[\'1s\'+k.3p]-d[\'1s\'+k.3p];d.E[k.3l]=(k.I-k.7S)+\'F\';q(k.1B==\'x\')B.42.E.K=\'28\';q(B.1k)B.1k.E[k.3l]=\'28\'}q(k.1B==\'x\'&&B.1u)B.4R(L);q(k.1B==\'x\'&&B.1p&&B.2M){q(i==k.1d)B.1p.57(\'1d-2H\');J B.1p.4u(\'1d-2H\')}},9a:C(i){k.G=i;k.B.Q.E[k.6w]=i+\'F\';q(k.B.1a)k.B.1a.4B()}};m.5x=C(a,2e,3t,3f){q(19.cg&&m.1z&&!m.7K){m.2l(19,\'4q\',C(){1H m.5x(a,2e,3t,3f)});D}k.a=a;k.3t=3t;k.3f=3f||\'2L\';k.2C=(3f==\'3y\');k.2M=!k.2C;m.86=1i;k.1L=[];k.1f=m.1f;m.1f=H;m.6R();A P=k.P=m.11.W;O(A i=0;ip.2d+p.4l-p.4n)p.G=p.2d+p.4l-p.I-p.3n-p.4n-p.1g-p.3o;q(p.G(k.x.1Y||k.x.I)){k.bj();q(k.1L.W==1)k.4R()}}k.9j()}1E(e){k.8s(e)}},7O:C(5M,28){A c=m.4G(5M,\'6J\',\'M-1k\');q(/(1h|3D)/.1c(k.2J)){q(k.3Y)c.E.K=k.3Y+\'F\';q(k.5e)c.E.N=k.5e+\'F\'}},6T:C(){q(k.aN)D;A B=k;k.1k=m.4G(k.1t,\'6J\',\'M-1k\');q(k.2J==\'1h\'){k.5Q();A 5k=m.3v.4Z(1);k.1k.1V(5k);k.fc=k.1t.1M;q(!k.3Y)k.3Y=5k.1M;A 55=k.1t.1Q-k.1k.1Q,h=k.5e||m.3V.N-55-m.6b-m.6v,4L=k.3O==\'5r\'?\' 4L="q (m.11[\'+k.P+\']) m.11[\'+k.P+\'].5q()" \':\'\';k.1k.2h+=\'<1h 3d="m\'+(1H 7z()).7C()+\'" cX="0" P="\'+k.P+\'" \'+\' cR="L" E="K:\'+k.3Y+\'F; N:\'+h+\'F" \'+4L+\' 1e="\'+k.1e+\'">\';k.5k=k.1k.2z(\'R\')[0];k.1h=k.1k.2z(\'1h\')[0];q(k.3O==\'5z\')k.7R()}q(k.2J==\'3D\'){k.1k.1D=k.1k.1D||\'m-dg-1D-\'+k.P;A a=k.89;q(!a.2e)a.2e={};q(1I a.2e.b1==\'1T\')a.2e.b1=\'cP\';q(9g)9g.cJ(k.1e,k.1k.1D,k.3Y,k.5e,a.da||\'7\',a.eb,a.an,a.2e,a.b5)}k.aN=L},83:C(){q(k.1h&&!k.5e){k.1h.E.N=k.1k.E.N=k.7X()+\'F\'}k.1t.1V(m.3v);q(!k.x.1d)k.x.1d=k.1t.1M;k.y.1d=k.1t.1Q;k.1t.8C(m.3v);q(m.1z&&k.9X>2v(k.1t.5L.N)){k.9X=2v(k.1t.5L.N)}m.S(k.Q,{1n:\'2r\',7Z:\'0\'});m.S(k.T,{K:k.x.t+\'F\',N:k.y.t+\'F\'})},7X:C(){A h;1C{A 2A=k.1h.8Q||k.1h.67.19;A 3v=2A.18(\'R\');3v.E.a1=\'a0\';2A.1k.1V(3v);h=3v.7L;q(m.1z)h+=2v(2A.1k.5L.6b)+2v(2A.1k.5L.6v)-1}1E(e){h=dJ}D h},7R:C(){A 4U=k.1t.1M-k.5k.1M;m.3H(k.5k);q(4U<0)4U=0;A 55=k.1t.1Q-k.1h.1Q;m.S(k.1h,{K:1j.9s(k.x.I-4U)+\'F\',N:1j.9s(k.y.I-55)+\'F\'});m.S(k.1k,{K:k.1h.E.K,N:k.1h.E.N});k.59=k.1h;k.2t=k.59},af:C(){k.7O(k.1t);q(k.2J==\'3D\'&&k.3O==\'5r\')k.6T();q(k.x.I1R.1Q){1R.E.K=(2v(1R.E.K)+78)+\'F\'}k.59=1R;k.2t=k.59}q(k.1h&&k.3O==\'5r\')k.7R();q(!k.59&&k.y.Ik.2t.29.1Q){49("1C { m.11["+k.P+"].2t.E.2q = \'28\'; } 1E(e) {}",m.7f)}},cm:C(5c){A c=5c.eo.8u(\',\');O(A i=0;ip.2d+p.4l-p.4n){q(!5o&&7Y&&5l){p.I=p.U(1B==\'y\'?\'5a\':\'7F\')}J q(p.U(\'1W\')2T){ 3b=4a*2T;q(3bk.6k&&x.I>k.4H&&y.U(\'1W\')>y.U(\'5a\')){y.I-=10;q(2T)x.I=y.I*2T;k.4R(0,1)}}},dQ:C(){q(k.2t){A h=/1h/i.1c(k.2t.3T)?k.7X()+1+\'F\':\'28\';q(k.1k)k.1k.E.N=h;k.2t.E.N=h;k.y.6z(k.1t.1Q);m.4T(k)}},9j:C(){A x=k.x,y=k.y;k.4W(\'1q\');m.1x(k,\'dP\');q(k.1p&&k.1p.2X)k.1p.2X.4X();k.9w(1,{Q:{K:x.U(\'1W\'),N:y.U(\'1W\'),Y:x.G,V:y.G},T:{Y:x.1g+x.U(\'2j\'),V:y.1g+y.U(\'2j\'),K:x.1Y||x.I,N:y.1Y||y.I}},m.7f)},9w:C(1K,2a,2B){A 5F=k.3g,8n=1K?(k.1f?k.1f.a:H):m.2u,t=(5F[1]&&8n&&m.4b(8n,\'3g\')[1]==5F[1])?5F[1]:5F[0];q(k[t]&&t!=\'2H\'){k[t](1K,2a);D}q(k.1a&&!k.3U){q(1K)k.1a.4B();J k.1a.6a((k.2C&&k.4E))}q(!1K)k.8D();A B=k,x=B.x,y=B.y,2S=k.2S;q(!1K)2S=k.cj||2S;A 5z=1K?C(){q(B.1a)B.1a.2i.E.1o="22";49(C(){B.6S()},50)}:C(){B.5R()};q(1K)m.S(k.Q,{K:x.t+\'F\',N:y.t+\'F\'});q(1K&&k.2C){m.S(k.Q,{Y:(x.1N-x.cb+x.3k)+\'F\',V:(y.1N-y.cb+y.3k)+\'F\'})}q(k.cp){m.S(k.Q,{1w:1K?0:1});m.3E(2a.Q,{1w:1K})}m.24(k.Q,2a.Q,{41:2B,2S:2S,3J:C(3e,2K){q(B.1a&&B.3U&&2K.1y==\'V\'){A 5E=1K?2K.G:1-2K.G;A G={w:x.t+(x.U(\'1W\')-x.t)*5E,h:y.t+(y.U(\'1W\')-y.t)*5E,x:x.1N+(x.G-x.1N)*5E,y:y.1N+(y.G-y.1N)*5E};B.1a.4B(G,0,1)}q(B.2C){q(2K.1y==\'Y\')B.42.E.Y=(x.G-3e)+\'F\';q(2K.1y==\'V\')B.42.E.V=(y.G-3e)+\'F\'}}});m.24(k.T,2a.T,2B,2S,5z);q(1K){k.Q.E.1o=\'22\';k.T.E.1o=\'22\';q(k.2C)k.1t.E.1o=\'22\';k.a.1b+=\' M-4z-4c\'}},6i:C(1K,2a){k.3U=1i;A B=k,t=1K?m.7f:0;q(1K){m.24(k.Q,2a.Q,0);m.S(k.Q,{1w:0,1o:\'22\'});m.24(k.T,2a.T,0);k.T.E.1o=\'22\';m.24(k.Q,{1w:1},t,H,C(){B.6S()})}q(k.1a){k.1a.2i.E.1F=k.Q.E.1F;A 7d=1K||-1,1s=k.1a.1s,8m=1K?3:1s,8i=1K?1s:3;O(A i=8m;7d*i<=7d*8i;i+=7d,t+=25){(C(){A o=1K?8i-i:8m-i;49(C(){B.1a.4B(0,o,1)},t)})()}}q(1K){}J{49(C(){q(B.1a)B.1a.6a(B.4E);B.8D();m.24(B.Q,{1w:0},m.9o,H,C(){B.5R()})},t)}},4f:C(1K,2a){q(!1K)D;A B=k,2B=m.cq,1f=B.1f,x=B.x,y=B.y,2w=1f.x,2x=1f.y,1u=B.1u,Q=k.Q,T=k.T;m.5j(19,\'76\',m.6Z);k.1a=1f.1a;q(k.1a)k.1a.B=B;1f.1a=H;1f.Q.E.2q=\'1q\';m.S(Q,{Y:2w.G+\'F\',V:2x.G+\'F\',K:2w.U(\'1W\')+\'F\',N:2x.U(\'1W\')+\'F\'});m.S(T,{1m:\'1r\',K:(x.1Y||x.I)+\'F\',N:(y.1Y||y.I)+\'F\',Y:(x.1g+x.U(\'2j\'))+\'F\',V:(y.1g+y.U(\'2j\'))+\'F\'});A 4w=m.18(\'R\',{1b:\'M-2L\'},{1n:\'2r\',1F:4,2q:\'1q\',1m:\'1r\',Y:(2w.1g+2w.U(\'2j\'))+\'F\',V:(2x.1g+2x.U(\'2j\'))+\'F\',K:(2w.1Y||2w.I)+\'F\',N:(2x.1Y||2x.I)+\'F\'});q(k.2C)m.S(k.42,{Y:0,V:0});O(A i=0;i\'+s+\'\'+k[k.5t].2h}}},9i:C(){q(!k.1f){O(A i=0;ik.x.U(\'60\')+k.x.U(\'82\'));A bu=(3R.y+3R.hk.y.U(\'60\')+k.y.U(\'82\'))}A 6t=m.87(1l[i]);q(!ba&&!bu&&6t!=k.P){q(!2V){1l[i].5D(\'1q-by\',\'[\'+k.P+\']\');1l[i].84=1l[i].E[1y];1l[i].E[1y]=\'1q\'}J q(2V.bs(\'[\'+k.P+\']\')==-1){1l[i].5D(\'1q-by\',2V+\'[\'+k.P+\']\')}}J q((2V==\'[\'+k.P+\']\'||m.31==6t)&&6t!=k.P){1l[i].5D(\'1q-by\',\'\');1l[i].E[1y]=1l[i].84||\'\'}J q(2V&&2V.bs(\'[\'+k.P+\']\')>-1){1l[i].5D(\'1q-by\',2V.26(\'[\'+k.P+\']\',\'\'))}}}}},3I:C(){k.Q.E.1F=m.4p+=2;O(A i=0;i16.29.1M)16.E.K=\'2W%\'}J q(16.29!=k.1u)k.1u.1V(16);q(/Y$/.1c(p))16.E.Y=6l+\'F\';q(/4A$/.1c(p))m.S(16,{Y:\'50%\',4Y:(6l-1j.5g(16.1M/2))+\'F\'});q(/3i$/.1c(p))16.E.3i=-6l+\'F\';q(/^br$/.1c(p)){m.S(16,{3i:\'2W%\',9O:k.x.cb+\'F\',V:-k.y.cb+\'F\',4i:-k.y.cb+\'F\',2q:\'28\'});k.x.1g=16.1M}J q(/^bq$/.1c(p)){m.S(16,{Y:\'2W%\',4Y:k.x.cb+\'F\',V:-k.y.cb+\'F\',4i:-k.y.cb+\'F\',2q:\'28\'});k.x.3o=16.1M}A 9U=16.29.1Q;16.E.N=\'28\';q(52&&16.1Q>9U)16.E.N=m.5b?9U+\'F\':\'2W%\';q(/^V/.1c(p))16.E.V=6C+\'F\';q(/^9T/.1c(p))m.S(16,{V:\'50%\',6b:(6C-1j.5g(16.1Q/2))+\'F\'});q(/^4i/.1c(p))16.E.4i=-6C+\'F\';q(/^5A$/.1c(p)){m.S(16,{Y:(-k.x.1g-k.x.cb)+\'F\',3i:(-k.x.3o-k.x.cb)+\'F\',4i:\'2W%\',6v:k.y.cb+\'F\',K:\'28\'});k.y.1g=16.1Q}J q(/^7s$/.1c(p)){m.S(16,{1n:\'4j\',Y:(-k.x.1g-k.x.cb)+\'F\',3i:(-k.x.3o-k.x.cb)+\'F\',V:\'2W%\',6b:k.y.cb+\'F\',K:\'28\'});k.y.3o=16.1Q;16.E.1n=\'2r\'}},bg:C(){k.9N([\'4S\',\'9D\'],L);k.bh();q(k.9D)m.1x(k,\'f0\');q(k.4S)m.1x(k,\'fF\');q(k.4S&&k.9G)k.4S.1b+=\' M-3B\';q(m.bf)k.be();O(A i=0;i=5.5){s=s.26(/\\s/g,\' \').26(1H 4y(\']*>\',\'c1\'),\'\').26(1H 4y(\']*>.*?\',\'c1\'),\'\');q(k.1h){A 2A=k.1h.8Q;q(!2A&&k.1h.67)2A=k.1h.67.19;q(!2A){A 3x=k;49(C(){3x.66()},25);D}2A.c6();2A.cV(s);2A.2f();1C{s=2A.8S(k.1D).2h}1E(e){1C{s=k.1h.19.8S(k.1D).2h}1E(e){}}m.3H(k.1h)}J{s=s.26(1H 4y(\'^.*?<1k[^>]*>(.*?).*?$\',\'i\'),\'$1\')}}m.4G(k.T,\'6J\',\'M-1k\').2h=s;k.3s();O(A x 3j k)k[x]=H}};m.8X=C(4d,1v){q(m.cI!==1i)m.8T();k.4d=4d;O(A x 3j 1v)k[x]=1v[x];q(k.cH)k.c7();q(k.2X)k.2X=m.c9(k)};m.8X.58={c7:C(){k.2N=m.18(\'R\',{2h:m.8V(m.8U.2N)},H,m.2g);A 5Y=[\'3G\',\'3h\',\'35\',\'1G\',\'3B\',\'1d-2H\',\'2f\'];k.1O={};A 3x=k;O(A i=0;i<5Y.W;i++){k.1O[5Y[i]]=m.4G(k.2N,\'1J\',\'M-\'+5Y[i]);k.4u(5Y[i])}k.1O.3h.E.1m=\'1r\'},cd:C(){q(k.ce||!k.2N)D;A B=m.11[k.4d],56=B.6H(),2n=/6K$/;q(56==0)k.57(\'35\');J q(2n.1c(k.1O.35.2z(\'a\')[0].1b))k.4u(\'35\');q(56+1==m.4N.3m[B.2R||\'1r\'].W){k.57(\'1G\');k.57(\'3G\')}J q(2n.1c(k.1O.1G.2z(\'a\')[0].1b)){k.4u(\'1G\');k.4u(\'3G\')}},4u:C(1O){q(!k.1O)D;A cc=k,a=k.1O[1O].2z(\'a\')[0],2n=/6K$/;a.2p=C(){cc[1O]();D 1i};q(2n.1c(a.1b))a.1b=a.1b.26(2n,\'\')},57:C(1O){q(!k.1O)D;A a=k.1O[1O].2z(\'a\')[0];a.2p=C(){D 1i};q(!/6K$/.1c(a.1b))a.1b+=\' 6K\'},ca:C(){q(k.45)k.3h();J k.3G()},3G:C(c8){q(k.1O){k.1O.3G.E.1m=\'1r\';k.1O.3h.E.1m=\'\'}k.45=L;q(!c8)m.1G(k.4d)},3h:C(){q(k.1O){k.1O.3h.E.1m=\'1r\';k.1O.3G.E.1m=\'\'}dW(k.45);k.45=H},35:C(){k.3h();m.35(k.1O.35)},1G:C(){k.3h();m.1G(k.1O.1G)},3B:C(){},\'1d-2H\':C(){m.2Y().6L()},2f:C(){m.2f(k.1O.2f)}};m.c9=C(1p){C 7h(B){m.3E(1v||{},{4x:4J,21:\'2X\'});q(m.5b)1v.6i=0;B.4k(1v);m.S(4J.29,{2q:\'1q\'})};C 2d(3N){4X(1T,1j.5g(3N*4J[3K?\'1M\':\'1Q\']*0.7))};C 4X(i,9C){q(i===1T)O(A j=0;j<5J.W;j++){q(5J[j]==m.11[1p.4d].a){i=j;5f}}q(i===1T)D;A as=4J.2z(\'a\'),4z=as[i],48=4z.29,Y=3K?\'bZ\':\'bY\',3i=3K?\'bO\':\'bP\',K=3K?\'bN\':\'bM\',4I=\'1s\'+Y,1M=\'1s\'+K,7e=R.29.29[1M],7c=7e-2i[1M],5y=2v(2i.E[3K?\'Y\':\'V\'])||0,2U=5y,dZ=20;q(9C!==1T){2U=5y-9C;q(2U>0)2U=0;q(2U<7c)2U=7c}J{O(A j=0;j0?as[i-1].29[4I]:48[4I],9m=48[4I]+48[1M]+(as[i+1]?as[i+1].29[1M]:0);q(9m>7e-5y)2U=7e-9m;J q(9e<-5y)2U=-9e}A 9f=48[4I]+(48[1M]-7g[1M])/2+2U;m.24(2i,3K?{Y:2U}:{V:2U},H,\'9h\');m.24(7g,3K?{Y:9f}:{V:9f},H,\'9h\');8A.E.1m=2U<0?\'3w\':\'1r\';8v.E.1m=(2U>7c)?\'3w\':\'1r\'};A 5J=m.4N.3m[m.11[1p.4d].2R||\'1r\'],1v=1p.2X,5N=1v.5N||\'bJ\',9L=(5N==\'e9\'),44=9L?[\'R\',\'5s\',\'1J\',\'1A\']:[\'2i\',\'4g\',\'43\',\'2I\'],3K=(5N==\'bJ\'),4J=m.18(\'R\',{1b:\'M-2X M-2X-\'+5N,2h:\'\'+\'<\'+44[0]+\'><\'+44[1]+\'>\'+\'\'+\'\'+\'\'},{1m:\'1r\'},m.2g),5P=4J.74,R=5P[0],8A=5P[1],8v=5P[2],7g=5P[3],2i=R.e3,4g=4J.2z(44[1])[0],43;O(A i=0;i<5J.W;i++){q(i==0||!3K)43=m.18(44[2],H,H,4g);(C(){A a=5J[i],48=m.18(44[3],H,H,43),e4=i;m.18(\'a\',{23:a.23,2p:C(){m.2Y(k).3I();D m.9v(a)},2h:m.bK?m.bK(a):a.2h},H,48)})()}q(!9L){8A.2p=C(){2d(-1)};8v.2p=C(){2d(1)};m.2l(4g,19.dw!==1T?\'dH\':\'dI\',C(e){A 3N=0;e=e||1U.2E;q(e.bL){3N=e.bL/dE;q(m.3F)3N=-3N}J q(e.bQ){3N=-e.bQ/3}q(3N)2d(-3N*0.2);q(e.5h)e.5h();e.bR=1i})}D{7h:7h,4X:4X}};q(m.1z){(C(){1C{19.5n.dB(\'Y\')}1E(e){49(bW.dD,50);D}m.4q()})()}m.2l(19,\'dA\',m.4q);m.2l(1U,\'7v\',m.4q);m.7b=m.14;A dv=m.5x;m.2l(1U,\'7v\',C(){q(m.8B){A 9F=\'.M 1S\',9A=\'4M: 7a(\'+m.5m+m.8B+\'), 73 !e2;\';A E=m.18(\'E\',{Z:\'ea/8L\'},H,19.2z(\'e0\')[0]);q(!m.1z){E.1V(19.d5(9F+" {"+9A+"}"))}J{A 1f=19.bX[19.bX.W-1];q(1I(1f.bV)=="72")1f.bV(9F,9A)}}});m.2l(1U,\'3L\',C(){m.6d();q(m.36)O(A i=0;iHighslide JS', + creditsTitle : 'Go to the Highslide JS homepage', + previousText : 'Previous', + nextText : 'Next', + moveText : 'Move', + closeText : 'Close', + closeTitle : 'Close (esc)', + resizeTitle : 'Resize', + playText : 'Play', + playTitle : 'Play slideshow (spacebar)', + pauseText : 'Pause', + pauseTitle : 'Pause slideshow (spacebar)', + previousTitle : 'Previous (arrow left)', + nextTitle : 'Next (arrow right)', + moveTitle : 'Move', + fullExpandText : '1:1', + number: 'Image %1 of %2', + restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.' +}, + +// See http://highslide.com/ref for examples of settings +graphicsDir : 'highslide/graphics/', +expandCursor : 'zoomin.cur', // null disables +restoreCursor : 'zoomout.cur', // null disables +expandDuration : 250, // milliseconds +restoreDuration : 250, +marginLeft : 15, +marginRight : 15, +marginTop : 15, +marginBottom : 15, +zIndexCounter : 1001, // adjust to other absolutely positioned elements +loadingOpacity : 0.75, +allowMultipleInstances: true, +numberOfImagesToPreload : 5, +outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only +outlineStartOffset : 3, // ends at 10 +padToMinWidth : false, // pad the popup width to make room for wide caption +fullExpandPosition : 'bottom right', +fullExpandOpacity : 1, +showCredits : true, // you can set this to false if you want +creditsHref : 'http://highslide.com/', +creditsTarget : '_self', +enableKeyListener : true, +openerTagNames : ['a'], // Add more to allow slideshow indexing +transitions : [], +transitionDuration: 250, +dimmingOpacity: 0, // Lightbox style dimming background +dimmingDuration: 50, // 0 for instant dimming + +anchor : 'auto', // where the image expands from +align : 'auto', // position in the client (overrides anchor) +targetX: null, // the id of a target element +targetY: null, +dragByHeading: true, +minWidth: 200, +minHeight: 200, +allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight +outlineType : 'drop-shadow', // set null to disable outlines +skin : { + controls: + '
' +}, +// END OF YOUR SETTINGS + + +// declare internal properties +preloadTheseImages : [], +continuePreloading: true, +expanders : [], +overrides : [ + 'allowSizeReduction', + 'useBox', + 'anchor', + 'align', + 'targetX', + 'targetY', + 'outlineType', + 'outlineWhileAnimating', + 'captionId', + 'captionText', + 'captionEval', + 'captionOverlay', + 'headingId', + 'headingText', + 'headingEval', + 'headingOverlay', + 'creditsPosition', + 'dragByHeading', + 'autoplay', + 'numberPosition', + 'transitions', + 'dimmingOpacity', + + 'width', + 'height', + + 'wrapperClassName', + 'minWidth', + 'minHeight', + 'maxWidth', + 'maxHeight', + 'slideshowGroup', + 'easing', + 'easingClose', + 'fadeInOut', + 'src' +], +overlays : [], +idCounter : 0, +oPos : { + x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], + y: ['above', 'top', 'middle', 'bottom', 'below'] +}, +mouse: {}, +headingOverlay: {}, +captionOverlay: {}, +timers : [], + +slideshows : [], + +pendingOutlines : {}, +clones : {}, +onReady: [], +uaVersion: parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +safari : /Safari/.test(navigator.userAgent), +geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), + +$ : function (id) { + if (id) return document.getElementById(id); +}, + +push : function (arr, val) { + arr[arr.length] = val; +}, + +createElement : function (tag, attribs, styles, parent, nopad) { + var el = document.createElement(tag); + if (attribs) hs.extend(el, attribs); + if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); + if (styles) hs.setStyles(el, styles); + if (parent) parent.appendChild(el); + return el; +}, + +extend : function (el, attribs) { + for (var x in attribs) el[x] = attribs[x]; + return el; +}, + +setStyles : function (el, styles) { + for (var x in styles) { + if (hs.ie && x == 'opacity') { + if (styles[x] > 0.99) el.style.removeAttribute('filter'); + else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; + } + else el.style[x] = styles[x]; + } +}, +animate: function(el, prop, opt) { + var start, + end, + unit; + if (typeof opt != 'object' || opt === null) { + var args = arguments; + opt = { + duration: args[2], + easing: args[3], + complete: args[4] + }; + } + if (typeof opt.duration != 'number') opt.duration = 250; + opt.easing = Math[opt.easing] || Math.easeInQuad; + opt.curAnim = hs.extend({}, prop); + for (var name in prop) { + var e = new hs.fx(el, opt , name ); + + start = parseFloat(hs.css(el, name)) || 0; + end = parseFloat(prop[name]); + unit = name != 'opacity' ? 'px' : ''; + + e.custom( start, end, unit ); + } +}, +css: function(el, prop) { + if (document.defaultView) { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop); + + } else { + if (prop == 'opacity') prop = 'filter'; + var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })]; + if (prop == 'filter') + val = val.replace(/alpha\(opacity=([0-9]+)\)/, + function (a, b) { return b / 100 }); + return val === '' ? 1 : val; + } +}, + +getPageSize : function () { + var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' + ? d.documentElement : d.body; + + + var b = d.body; + var xScroll = (w.innerWidth && w.scrollMaxX) + ? w.innerWidth + w.scrollMaxX : Math.max(b.scrollWidth, b.offsetWidth), + yScroll = (w.innerHeight && window.scrollMaxY) + ? w.innerHeight + w.scrollMaxY : Math.max(b.scrollHeight, b.offsetHeight), + pageWidth = hs.ie ? iebody.scrollWidth : + (d.documentElement.clientWidth || self.innerWidth), + pageHeight = hs.ie ? Math.max(iebody.scrollHeight, iebody.clientHeight) : + (d.documentElement.clientHeight || self.innerHeight); + + var width = hs.ie ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = hs.ie ? iebody.clientHeight : self.innerHeight; + + hs.page = { + pageWidth: Math.max(pageWidth, xScroll), + pageHeight: Math.max(pageHeight, yScroll), + width: width, + height: height, + scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, + scrollTop: hs.ie ? iebody.scrollTop : pageYOffset + } +}, + +getPosition : function(el) { + var p = { x: el.offsetLeft, y: el.offsetTop }; + while (el.offsetParent) { + el = el.offsetParent; + p.x += el.offsetLeft; + p.y += el.offsetTop; + if (el != document.body && el != document.documentElement) { + p.x -= el.scrollLeft; + p.y -= el.scrollTop; + } + } + return p; +}, + +expand : function(a, params, custom, type) { + if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); + if (typeof a.getParams == 'function') return params; + try { + new hs.Expander(a, params, custom); + return false; + } catch (e) { return true; } +}, +getElementByClass : function (el, tagName, className) { + var els = el.getElementsByTagName(tagName); + for (var i = 0; i < els.length; i++) { + if ((new RegExp(className)).test(els[i].className)) { + return els[i]; + } + } + return null; +}, +replaceLang : function(s) { + s = s.replace(/\s/g, ' '); + var re = /{hs\.lang\.([^}]+)\}/g, + matches = s.match(re), + lang; + if (matches) for (var i = 0; i < matches.length; i++) { + lang = matches[i].replace(re, "$1"); + if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]); + } + return s; +}, + + +focusTopmost : function() { + var topZ = 0, + topmostKey = -1, + expanders = hs.expanders, + exp, + zIndex; + for (var i = 0; i < expanders.length; i++) { + exp = expanders[i]; + if (exp) { + zIndex = exp.wrapper.style.zIndex; + if (zIndex && zIndex > topZ) { + topZ = zIndex; + topmostKey = i; + } + } + } + if (topmostKey == -1) hs.focusKey = -1; + else expanders[topmostKey].focus(); +}, + +getParam : function (a, param) { + a.getParams = a.onclick; + var p = a.getParams ? a.getParams() : null; + a.getParams = null; + + return (p && typeof p[param] != 'undefined') ? p[param] : + (typeof hs[param] != 'undefined' ? hs[param] : null); +}, + +getSrc : function (a) { + var src = hs.getParam(a, 'src'); + if (src) return src; + return a.href; +}, + +getNode : function (id) { + var node = hs.$(id), clone = hs.clones[id], a = {}; + if (!node && !clone) return null; + if (!clone) { + clone = node.cloneNode(true); + clone.id = ''; + hs.clones[id] = clone; + return node; + } else { + return clone.cloneNode(true); + } +}, + +discardElement : function(d) { + if (d) hs.garbageBin.appendChild(d); + hs.garbageBin.innerHTML = ''; +}, +dim : function(exp) { + if (!hs.dimmer) { + hs.dimmer = hs.createElement ('div', + { + className: 'highslide-dimming', + owner: '', + onclick: function() { + + hs.close(); + } + }, { + position: 'absolute', + visibility: 'visible', + left: 0, + opacity: 0 + }, hs.container, true); + hs.addEventListener(window, 'resize', hs.setDimmerSize); + } + hs.dimmer.style.display = ''; + hs.setDimmerSize(); + hs.dimmer.owner += '|'+ exp.key; + if (hs.geckoMac && hs.dimmingGeckoFix) + hs.setStyles(hs.dimmer, { + background: 'url('+ hs.graphicsDir + 'geckodimmer.png)', + opacity: 1 + }); + else + hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration); +}, +undim : function(key) { + if (!hs.dimmer) return; + if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, ''); + + if ( + (typeof key != 'undefined' && hs.dimmer.owner != '') + || (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity')) + ) return; + if (hs.geckoMac && hs.dimmingGeckoFix) + hs.setStyles(hs.dimmer, { background: 'none', width: 0, height: 0 }); + else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { + hs.setStyles(hs.dimmer, { display: 'none', width: 0, height: 0 }); + }); +}, +setDimmerSize : function(exp) { + hs.getPageSize(); + if (!hs.dimmer) return; + var h = (hs.ie && exp && exp.wrapper) ? + parseInt(exp.wrapper.style.top) + parseInt(exp.wrapper.style.height)+ (exp.outline ? exp.outline.offset : 0) : 0; + hs.setStyles(hs.dimmer, { + width: hs.page.pageWidth +'px', + height: Math.max(hs.page.pageHeight, h) +'px' + }); +}, +transit : function (adj, exp) { + var last = exp = exp || hs.getExpander(); + if (hs.upcoming) return false; + else hs.last = last; + try { + hs.upcoming = adj; + adj.onclick(); + } catch (e){ + hs.last = hs.upcoming = null; + } + try { + if (!adj || exp.transitions[1] != 'crossfade') + exp.close(); + } catch (e) {} + return false; +}, + +previousOrNext : function (el, op) { + var exp = hs.getExpander(el); + if (exp) { + adj = exp.getAdjacentAnchor(op); + return hs.transit(adj, exp); + } else return false; +}, + +previous : function (el) { + return hs.previousOrNext(el, -1); +}, + +next : function (el) { + return hs.previousOrNext(el, 1); +}, + +keyHandler : function(e) { + if (!e) e = window.event; + if (!e.target) e.target = e.srcElement; // ie + if (typeof e.target.form != 'undefined') return true; // form element has focus + var exp = hs.getExpander(); + + var op = null; + switch (e.keyCode) { + case 70: // f + if (exp) exp.doFullExpand(); + return true; + case 32: // Space + op = 2; + break; + case 34: // Page Down + case 39: // Arrow right + case 40: // Arrow down + op = 1; + break; + case 8: // Backspace + case 33: // Page Up + case 37: // Arrow left + case 38: // Arrow up + op = -1; + break; + case 27: // Escape + case 13: // Enter + op = 0; + } + if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + if (!hs.enableKeyListener) return true; + + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + if (exp) { + if (op == 0) { + exp.close(); + } else if (op == 2) { + if (exp.slideshow) exp.slideshow.hitSpace(); + } else { + if (exp.slideshow) exp.slideshow.pause(); + hs.previousOrNext(exp.key, op); + } + return false; + } + } + return true; +}, + + +registerOverlay : function (overlay) { + hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } )); +}, + + +addSlideshow : function (options) { + var sg = options.slideshowGroup; + if (typeof sg == 'object') { + for (var i = 0; i < sg.length; i++) { + var o = {}; + for (var x in options) o[x] = options[x]; + o.slideshowGroup = sg[i]; + hs.push(hs.slideshows, o); + } + } else { + hs.push(hs.slideshows, options); + } +}, + +getWrapperKey : function (element, expOnly) { + var el, re = /^highslide-wrapper-([0-9]+)$/; + // 1. look in open expanders + el = element; + while (el.parentNode) { + if (el.hsKey !== undefined) return el.hsKey; + if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); + el = el.parentNode; + } + // 2. look in thumbnail + if (!expOnly) { + el = element; + while (el.parentNode) { + if (el.tagName && hs.isHsAnchor(el)) { + for (var key = 0; key < hs.expanders.length; key++) { + var exp = hs.expanders[key]; + if (exp && exp.a == el) return key; + } + } + el = el.parentNode; + } + } + return null; +}, + +getExpander : function (el, expOnly) { + if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; + if (typeof el == 'number') return hs.expanders[el] || null; + if (typeof el == 'string') el = hs.$(el); + return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; +}, + +isHsAnchor : function (a) { + return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); +}, + +reOrder : function () { + for (var i = 0; i < hs.expanders.length; i++) + if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); +}, + +mouseClickHandler : function(e) +{ + if (!e) e = window.event; + if (e.button > 1) return true; + if (!e.target) e.target = e.srcElement; + + var el = e.target; + while (el.parentNode + && !(/highslide-(image|move|html|resize)/.test(el.className))) + { + el = el.parentNode; + } + var exp = hs.getExpander(el); + if (exp && (exp.isClosing || !exp.isExpanded)) return true; + + if (exp && e.type == 'mousedown') { + if (e.target.form) return true; + var match = el.className.match(/highslide-(image|move|resize)/); + if (match) { + hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos, + height: exp.y.size, clickX: e.clientX, clickY: e.clientY }; + + + hs.addEventListener(document, 'mousemove', hs.dragHandler); + if (e.preventDefault) e.preventDefault(); // FF + + if (/highslide-(image|html)-blur/.test(exp.content.className)) { + exp.focus(); + hs.hasFocused = true; + } + return false; + } + } else if (e.type == 'mouseup') { + + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + if (hs.dragArgs) { + if (hs.styleRestoreCursor && hs.dragArgs.type == 'image') + hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; + var hasDragged = hs.dragArgs.hasDragged; + + if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { + exp.close(); + } + else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { + hs.dragArgs.exp.doShowHide('hidden'); + } + if (hasDragged) hs.setDimmerSize(exp); + + hs.hasFocused = false; + hs.dragArgs = null; + + } else if (/highslide-image-blur/.test(el.className)) { + el.style.cursor = hs.styleRestoreCursor; + } + } + return false; +}, + +dragHandler : function(e) +{ + if (!hs.dragArgs) return true; + if (!e) e = window.event; + var a = hs.dragArgs, exp = a.exp; + + a.dX = e.clientX - a.clickX; + a.dY = e.clientY - a.clickY; + + var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); + if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) + || (distance > (hs.dragSensitivity || 5)); + + if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { + + if (a.type == 'resize') exp.resize(a); + else { + exp.moveTo(a.left + a.dX, a.top + a.dY); + if (a.type == 'image') exp.content.style.cursor = 'move'; + } + } + return false; +}, + +wrapperMouseHandler : function (e) { + try { + if (!e) e = window.event; + var over = /mouseover/i.test(e.type); + if (!e.target) e.target = e.srcElement; // ie + if (hs.ie) e.relatedTarget = + over ? e.fromElement : e.toElement; // ie + var exp = hs.getExpander(e.target); + if (!exp.isExpanded) return; + if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp + || hs.dragArgs) return; + for (var i = 0; i < exp.overlays.length; i++) (function() { + var o = hs.$('hsId'+ exp.overlays[i]); + if (o && o.hideOnMouseOut) { + if (over) hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur); + } + })(); + } catch (e) {} +}, +addEventListener : function (el, event, func) { + if (el == document && event == 'ready') hs.push(hs.onReady, func); + try { + el.addEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + el.attachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = func; + } + } +}, + +removeEventListener : function (el, event, func) { + try { + el.removeEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = null; + } + } +}, + +preloadFullImage : function (i) { + if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { + var img = document.createElement('img'); + img.onload = function() { + img = null; + hs.preloadFullImage(i + 1); + }; + img.src = hs.preloadTheseImages[i]; + } +}, +preloadImages : function (number) { + if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; + + var arr = hs.getAnchors(); + for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { + hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); + } + + // preload outlines + if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); + else + + hs.preloadFullImage(0); + + // preload cursor + if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); +}, + + +init : function () { + if (!hs.container) { + + hs.getPageSize(); + hs.ieLt7 = hs.ie && hs.uaVersion < 7; + for (var x in hs.langDefaults) { + if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; + else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') + hs.lang[x] = hs.langDefaults[x]; + } + + hs.container = hs.createElement('div', { + className: 'highslide-container' + }, { + position: 'absolute', + left: 0, + top: 0, + width: '100%', + zIndex: hs.zIndexCounter, + direction: 'ltr' + }, + document.body, + true + ); + hs.loading = hs.createElement('a', { + className: 'highslide-loading', + title: hs.lang.loadingTitle, + innerHTML: hs.lang.loadingText, + href: 'javascript:;' + }, { + position: 'absolute', + top: '-9999px', + opacity: hs.loadingOpacity, + zIndex: 1 + }, hs.container + ); + hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); + hs.viewport = hs.createElement('div', { + className: 'highslide-viewport' + }, { + visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden' + }, hs.container, 1 + ); + + // http://www.robertpenner.com/easing/ + Math.linearTween = function (t, b, c, d) { + return c*t/d + b; + }; + Math.easeInQuad = function (t, b, c, d) { + return c*(t/=d)*t + b; + }; + Math.easeOutQuad = function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }; + + hs.hideSelects = hs.ieLt7; + hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' + || (hs.ie && hs.uaVersion < 5.5)); + } +}, +ready : function() { + if (hs.isReady) return; + hs.isReady = true; + + for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i](); +}, + +updateAnchors : function() { + var el, els, all = [], images = [],groups = {}, re; + + for (var i = 0; i < hs.openerTagNames.length; i++) { + els = document.getElementsByTagName(hs.openerTagNames[i]); + for (var j = 0; j < els.length; j++) { + el = els[j]; + re = hs.isHsAnchor(el); + if (re) { + hs.push(all, el); + if (re[0] == 'hs.expand') hs.push(images, el); + var g = hs.getParam(el, 'slideshowGroup') || 'none'; + if (!groups[g]) groups[g] = []; + hs.push(groups[g], el); + } + } + } + hs.anchors = { all: all, groups: groups, images: images }; + return hs.anchors; + +}, + +getAnchors : function() { + return hs.anchors || hs.updateAnchors(); +}, + + +close : function(el) { + var exp = hs.getExpander(el); + if (exp) exp.close(); + return false; +} +}; // end hs object +hs.fx = function( elem, options, prop ){ + this.options = options; + this.elem = elem; + this.prop = prop; + + if (!options.orig) options.orig = {}; +}; +hs.fx.prototype = { + update: function(){ + (hs.fx.step[this.prop] || hs.fx.step._default)(this); + + if (this.options.step) + this.options.step.call(this.elem, this.now, this); + + }, + custom: function(from, to, unit){ + this.startTime = (new Date()).getTime(); + this.start = from; + this.end = to; + this.unit = unit;// || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + + var self = this; + function t(gotoEnd){ + return self.step(gotoEnd); + } + + t.elem = this.elem; + + if ( t() && hs.timers.push(t) == 1 ) { + hs.timerId = setInterval(function(){ + var timers = hs.timers; + + for ( var i = 0; i < timers.length; i++ ) + if ( !timers[i]() ) + timers.splice(i--, 1); + + if ( !timers.length ) { + clearInterval(hs.timerId); + } + }, 13); + } + }, + step: function(gotoEnd){ + var t = (new Date()).getTime(); + if ( gotoEnd || t >= this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + var done = true; + for ( var i in this.options.curAnim ) + if ( this.options.curAnim[i] !== true ) + done = false; + + if ( done ) { + if (this.options.complete) this.options.complete.call(this.elem); + } + return false; + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + this.pos = this.options.easing(n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + this.update(); + } + return true; + } + +}; + +hs.extend( hs.fx, { + step: { + + opacity: function(fx){ + hs.setStyles(fx.elem, { opacity: fx.now }); + }, + + _default: function(fx){ + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + else + fx.elem[ fx.prop ] = fx.now; + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; + if (!outlineType) { + if (onLoad) onLoad(); + return; + } + + hs.init(); + this.table = hs.createElement( + 'table', { + cellSpacing: 0 + }, { + visibility: 'hidden', + position: 'absolute', + borderCollapse: 'collapse', + width: 0 + }, + hs.container, + true + ); + var tbody = hs.createElement('tbody', null, null, this.table, 1); + + this.td = []; + for (var i = 0; i <= 8; i++) { + if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); + this.td[i] = hs.createElement('td', null, null, tr, true); + var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; + hs.setStyles(this.td[i], style); + } + this.td[4].className = outlineType +' highslide-outline'; + + this.preloadGraphic(); +}; + +hs.Outline.prototype = { +preloadGraphic : function () { + var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; + + var appendTo = hs.safari ? hs.container : null; + this.graphic = hs.createElement('img', null, { position: 'absolute', + top: '-9999px' }, appendTo, true); // for onload trigger + + var pThis = this; + this.graphic.onload = function() { pThis.onGraphicLoad(); }; + + this.graphic.src = src; +}, + +onGraphicLoad : function () { + var o = this.offset = this.graphic.width / 4, + pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], + dim = { height: (2*o) +'px', width: (2*o) +'px' }; + for (var i = 0; i <= 8; i++) { + if (pos[i]) { + if (this.hasAlphaImageLoader) { + var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; + var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); + hs.createElement ('div', null, { + filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", + position: 'absolute', + width: w, + height: this.graphic.height +'px', + left: (pos[i][0]*o)+'px', + top: (pos[i][1]*o)+'px' + }, + div, + true); + } else { + hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); + } + + if (window.opera && (i == 3 || i ==5)) + hs.createElement('div', null, dim, this.td[i], true); + + hs.setStyles (this.td[i], dim); + } + } + this.graphic = null; + if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); + hs.pendingOutlines[this.outlineType] = this; + if (this.onLoad) this.onLoad(); +}, + +setPosition : function (pos, offset, vis, dur, easing) { + var exp = this.exp, + stl = exp.wrapper.style, + offset = offset || 0, + pos = pos || { + x: exp.x.pos + offset, + y: exp.y.pos + offset, + w: exp.x.get('wsize') - 2 * offset, + h: exp.y.get('wsize') - 2 * offset + }; + if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) + ? 'visible' : 'hidden'; + hs.setStyles(this.table, { + left: (pos.x - this.offset) +'px', + top: (pos.y - this.offset) +'px', + width: (pos.w + 2 * this.offset) +'px' + }); + + pos.w -= 2 * this.offset; + pos.h -= 2 * this.offset; + hs.setStyles (this.td[4], { + width: pos.w >= 0 ? pos.w +'px' : 0, + height: pos.h >= 0 ? pos.h +'px' : 0 + }); + if (this.hasAlphaImageLoader) this.td[3].style.height + = this.td[5].style.height = this.td[4].style.height; + +}, + +destroy : function(hide) { + if (hide) this.table.style.visibility = 'hidden'; + else hs.discardElement(this.table); +} +}; + +hs.Dimension = function(exp, dim) { + this.exp = exp; + this.dim = dim; + this.ucwh = dim == 'x' ? 'Width' : 'Height'; + this.wh = this.ucwh.toLowerCase(); + this.uclt = dim == 'x' ? 'Left' : 'Top'; + this.lt = this.uclt.toLowerCase(); + this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; + this.rb = this.ucrb.toLowerCase(); + this.p1 = this.p2 = 0; +}; +hs.Dimension.prototype = { +get : function(key) { + switch (key) { + case 'loadingPos': + return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; + case 'loadingPosXfade': + return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2; + case 'wsize': + return this.size + 2 * this.cb + this.p1 + this.p2; + case 'fitsize': + return this.clientSize - this.marginMin - this.marginMax; + case 'maxsize': + return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ; + case 'opos': + return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); + case 'osize': + return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); + case 'imgPad': + return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; + + } +}, +calcBorders: function() { + // correct for borders + this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; + this.marginMax = hs['margin'+ this.ucrb]; +}, +calcThumb: function() { + this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : + this.exp.el['offset'+ this.ucwh]; + this.tpos = this.exp.tpos[this.dim]; + this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; + if (this.tpos < 1) { + this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; + }; +}, +calcExpanded: function() { + var exp = this.exp; + this.justify = 'auto'; + + // get alignment + if (exp.align == 'center') this.justify = 'center'; + else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null; + else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max'; + + + // size and position + this.pos = this.tpos - this.cb + this.tb; + this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full); + this.minSize = exp.allowSizeReduction ? + Math.min(exp['min'+ this.ucwh], this.full) :this.full; + if (exp.isImage && exp.useBox) { + this.size = exp[this.wh]; + this.imgSize = this.full; + } + if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth; + this.target = exp['target'+ this.dim.toUpperCase()]; + this.marginMin = hs['margin'+ this.uclt]; + this.scroll = hs.page['scroll'+ this.uclt]; + this.clientSize = hs.page[this.wh]; +}, +setSize: function(i) { + var exp = this.exp; + if (exp.isImage && (exp.useBox || hs.padToMinWidth)) { + this.imgSize = i; + this.size = Math.max(this.size, this.imgSize); + exp.content.style[this.lt] = this.get('imgPad')+'px'; + } else + this.size = i; + + exp.content.style[this.wh] = i +'px'; + exp.wrapper.style[this.wh] = this.get('wsize') +'px'; + if (exp.outline) exp.outline.setPosition(); + if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true); + if (this.dim == 'x' && exp.slideshow && exp.isImage) { + if (i == this.full) exp.slideshow.disable('full-expand'); + else exp.slideshow.enable('full-expand'); + } +}, +setPos: function(i) { + this.pos = i; + this.exp.wrapper.style[this.lt] = i +'px'; + + if (this.exp.outline) this.exp.outline.setPosition(); + +} +}; + +hs.Expander = function(a, params, custom, contentType) { + if (document.readyState && hs.ie && !hs.isReady) { + hs.addEventListener(document, 'ready', function() { + new hs.Expander(a, params, custom, contentType); + }); + return; + } + this.a = a; + this.custom = custom; + this.contentType = contentType || 'image'; + this.isImage = !this.isHtml; + + hs.continuePreloading = false; + this.overlays = []; + this.last = hs.last; + hs.last = null; + hs.init(); + var key = this.key = hs.expanders.length; + // override inline parameters + for (var i = 0; i < hs.overrides.length; i++) { + var name = hs.overrides[i]; + this[name] = params && typeof params[name] != 'undefined' ? + params[name] : hs[name]; + } + if (!this.src) this.src = a.href; + + // get thumb + var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a; + el = this.thumb = el.getElementsByTagName('img')[0] || el; + this.thumbsUserSetId = el.id || a.id; + + // check if already open + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].a == a + && !(this.last && this.transitions[1] == 'crossfade')) { + hs.expanders[i].focus(); + return false; + } + } + + // cancel other + if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { + hs.expanders[i].cancelLoading(); + } + } + hs.expanders[key] = this; + if (!hs.allowMultipleInstances && !hs.upcoming) { + if (hs.expanders[key-1]) hs.expanders[key-1].close(); + if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) + hs.expanders[hs.focusKey].close(); + } + + // initiate metrics + this.el = el; + this.tpos = hs.getPosition(el); + hs.getPageSize(); + var x = this.x = new hs.Dimension(this, 'x'); + x.calcThumb(); + var y = this.y = new hs.Dimension(this, 'y'); + y.calcThumb(); + this.wrapper = hs.createElement( + 'div', { + id: 'highslide-wrapper-'+ this.key, + className: 'highslide-wrapper '+ this.wrapperClassName + }, { + visibility: 'hidden', + position: 'absolute', + zIndex: hs.zIndexCounter += 2 + }, null, true ); + + this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; + if (this.contentType == 'image' && this.outlineWhileAnimating == 2) + this.outlineWhileAnimating = 0; + + // get the outline + if (!this.outlineType + || (this.last && this.isImage && this.transitions[1] == 'crossfade')) { + this[this.contentType +'Create'](); + + } else if (hs.pendingOutlines[this.outlineType]) { + this.connectOutline(); + this[this.contentType +'Create'](); + + } else { + this.showLoading(); + var exp = this; + new hs.Outline(this.outlineType, + function () { + exp.connectOutline(); + exp[exp.contentType +'Create'](); + } + ); + } + return true; +}; + +hs.Expander.prototype = { +error : function(e) { + //alert ('Line '+ e.lineNumber +': '+ e.message); + window.location.href = this.src; +}, + +connectOutline : function() { + var outline = this.outline = hs.pendingOutlines[this.outlineType]; + outline.exp = this; + outline.table.style.zIndex = this.wrapper.style.zIndex - 1; + hs.pendingOutlines[this.outlineType] = null; +}, + +showLoading : function() { + if (this.onLoadStarted || this.loading) return; + + this.loading = hs.loading; + var exp = this; + this.loading.onclick = function() { + exp.cancelLoading(); + }; + var exp = this, + l = this.x.get('loadingPos') +'px', + t = this.y.get('loadingPos') +'px'; + if (!tgt && this.last && this.transitions[1] == 'crossfade') + var tgt = this.last; + if (tgt) { + l = tgt.x.get('loadingPosXfade') +'px'; + t = tgt.y.get('loadingPosXfade') +'px'; + this.loading.style.zIndex = hs.zIndexCounter++; + } + setTimeout(function () { + if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} + , 100); +}, + +imageCreate : function() { + var exp = this; + + var img = document.createElement('img'); + this.content = img; + img.onload = function () { + if (hs.expanders[exp.key]) exp.contentLoaded(); + }; + if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; + img.className = 'highslide-image'; + hs.setStyles(img, { + visibility: 'hidden', + display: 'block', + position: 'absolute', + maxWidth: '9999px', + zIndex: 3 + }); + img.title = hs.lang.restoreTitle; + if (hs.safari) hs.container.appendChild(img); + if (hs.ie && hs.flushImgSize) img.src = null; + img.src = this.src; + + this.showLoading(); +}, + +contentLoaded : function() { + try { + if (!this.content) return; + this.content.onload = null; + if (this.onLoadStarted) return; + else this.onLoadStarted = true; + + var x = this.x, y = this.y; + + if (this.loading) { + hs.setStyles(this.loading, { top: '-9999px' }); + this.loading = null; + } + x.full = this.content.width; + y.full = this.content.height; + + hs.setStyles(this.content, { + width: x.t +'px', + height: y.t +'px' + }); + this.wrapper.appendChild(this.content); + hs.container.appendChild(this.wrapper); + + x.calcBorders(); + y.calcBorders(); + + hs.setStyles (this.wrapper, { + left: (x.tpos + x.tb - x.cb) +'px', + top: (y.tpos + x.tb - y.cb) +'px' + }); + + + this.initSlideshow(); + this.getOverlays(); + + var ratio = x.full / y.full; + + x.calcExpanded(); + this.justify(x); + + y.calcExpanded(); + this.justify(y); + if (this.overlayBox) this.sizeOverlayBox(0, 1); + + if (this.allowSizeReduction) { + this.correctRatio(ratio); + var ss = this.slideshow; + if (ss && this.last && ss.controls && ss.fixedControls) { + var pos = ss.overlayOptions.position || '', p; + for (var dim in hs.oPos) for (var i = 0; i < 5; i++) { + p = this[dim]; + if (pos.match(hs.oPos[dim][i])) { + p.pos = this.last[dim].pos + + (this.last[dim].p1 - p.p1) + + (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i]; + if (ss.fixedControls == 'fit') { + if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax) + p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2; + if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin; + } + } + } + } + if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) { + this.createFullExpand(); + if (this.overlays.length == 1) this.sizeOverlayBox(); + } + } + this.show(); + + } catch (e) { + this.error(e); + } +}, + +justify : function (p, moveOnly) { + var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; + + if (tgt && tgt.match(/ /)) { + tgtArr = tgt.split(' '); + tgt = tgtArr[0]; + } + if (tgt && hs.$(tgt)) { + p.pos = hs.getPosition(hs.$(tgt))[dim]; + if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/)) + p.pos += parseInt(tgtArr[1]); + if (p.size < p.minSize) p.size = p.minSize; + + } else if (p.justify == 'auto' || p.justify == 'center') { + + var hasMovedMin = false; + + var allowReduce = p.exp.allowSizeReduction; + if (p.justify == 'center') + p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2); + else + p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); + if (p.pos < p.scroll + p.marginMin) { + p.pos = p.scroll + p.marginMin; + hasMovedMin = true; + } + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { + if (!moveOnly && hasMovedMin && allowReduce) { + p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } else if (p.get('wsize') < p.get('fitsize')) { + p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); + } else { // image larger than viewport + p.pos = p.scroll + p.marginMin; + if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } + } + + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + + + } else if (p.justify == 'max') { + p.pos = Math.floor(p.pos - p.size + p.t); + } + + + if (p.pos < p.marginMin) { + var tmpMin = p.pos; + p.pos = p.marginMin; + + if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); + + } +}, + +correctRatio : function(ratio) { + var x = this.x, + y = this.y, + changed = false, + xSize = Math.min(x.full, x.size), + ySize = Math.min(y.full, y.size), + useBox = (this.useBox || hs.padToMinWidth); + + if (xSize / ySize > ratio) { // width greater + xSize = ySize * ratio; + if (xSize < x.minSize) { // below minWidth + xSize = x.minSize; + ySize = xSize / ratio; + } + changed = true; + + } else if (xSize / ySize < ratio) { // height greater + ySize = xSize / ratio; + changed = true; + } + + if (hs.padToMinWidth && x.full < x.minSize) { + x.imgSize = x.full; + y.size = y.imgSize = y.full; + } else if (this.useBox) { + x.imgSize = xSize; + y.imgSize = ySize; + } else { + x.size = xSize; + y.size = ySize; + } + this.fitOverlayBox(useBox ? null : ratio); + if (useBox && y.size < y.imgSize) { + y.imgSize = y.size; + x.imgSize = y.size * ratio; + } + if (changed || useBox) { + x.pos = x.tpos - x.cb + x.tb; + x.minSize = x.size; + this.justify(x, true); + + y.pos = y.tpos - y.cb + y.tb; + y.minSize = y.size; + this.justify(y, true); + if (this.overlayBox) this.sizeOverlayBox(); + } +}, +fitOverlayBox : function(ratio) { + var x = this.x, y = this.y; + if (this.overlayBox) { + while (y.size > this.minHeight && x.size > this.minWidth + && y.get('wsize') > y.get('fitsize')) { + y.size -= 10; + if (ratio) x.size = y.size * ratio; + this.sizeOverlayBox(0, 1); + } + } +}, + +show : function () { + var x = this.x, y = this.y; + this.doShowHide('hidden'); + if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb(); + + // Apply size change + this.changeSize( + 1, { + wrapper: { + width : x.get('wsize'), + height : y.get('wsize'), + left: x.pos, + top: y.pos + }, + content: { + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad'), + width:x.imgSize ||x.size, + height:y.imgSize ||y.size + } + }, + hs.expandDuration + ); +}, + +changeSize : function(up, to, dur) { + // transition + var trans = this.transitions, + other = up ? (this.last ? this.last.a : null) : hs.upcoming, + t = (trans[1] && other + && hs.getParam(other, 'transitions')[1] == trans[1]) ? + trans[1] : trans[0]; + + if (this[t] && t != 'expand') { + this[t](up, to); + return; + } + + if (this.outline && !this.outlineWhileAnimating) { + if (up) this.outline.setPosition(); + else this.outline.destroy(); + } + + + if (!up) this.destroyOverlays(); + + var exp = this, + x = exp.x, + y = exp.y, + easing = this.easing; + if (!up) easing = this.easingClose || easing; + var after = up ? + function() { + + if (exp.outline) exp.outline.table.style.visibility = "visible"; + setTimeout(function() { + exp.afterExpand(); + }, 50); + } : + function() { + exp.afterClose(); + }; + if (up) hs.setStyles( this.wrapper, { + width: x.t +'px', + height: y.t +'px' + }); + if (this.fadeInOut) { + hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 }); + hs.extend(to.wrapper, { opacity: up }); + } + hs.animate( this.wrapper, to.wrapper, { + duration: dur, + easing: easing, + step: function(val, args) { + if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') { + var fac = up ? args.pos : 1 - args.pos; + var pos = { + w: x.t + (x.get('wsize') - x.t) * fac, + h: y.t + (y.get('wsize') - y.t) * fac, + x: x.tpos + (x.pos - x.tpos) * fac, + y: y.tpos + (y.pos - y.tpos) * fac + }; + exp.outline.setPosition(pos, 0, 1); + } + } + }); + hs.animate( this.content, to.content, dur, easing, after); + if (up) { + this.wrapper.style.visibility = 'visible'; + this.content.style.visibility = 'visible'; + this.a.className += ' highslide-active-anchor'; + } +}, + + + +fade : function(up, to) { + this.outlineWhileAnimating = false; + var exp = this, t = up ? hs.expandDuration : 0; + + if (up) { + hs.animate(this.wrapper, to.wrapper, 0); + hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' }); + hs.animate(this.content, to.content, 0); + this.content.style.visibility = 'visible'; + + hs.animate(this.wrapper, { opacity: 1 }, t, null, + function() { exp.afterExpand(); }); + } + + if (this.outline) { + this.outline.table.style.zIndex = this.wrapper.style.zIndex; + var dir = up || -1, + offset = this.outline.offset, + startOff = up ? 3 : offset, + endOff = up? offset : 3; + for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) { + (function() { + var o = up ? endOff - i : startOff - i; + setTimeout(function() { + exp.outline.setPosition(0, o, 1); + }, t); + })(); + } + } + + + if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50); + else { + setTimeout( function() { + if (exp.outline) exp.outline.destroy(exp.preserveContent); + + exp.destroyOverlays(); + + hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){ + exp.afterClose(); + }); + }, t); + } +}, + +crossfade : function (up, to) { + if (!up) return; + var exp = this, + dur = hs.transitionDuration, + last = exp.last, + x = exp.x, + y = exp.y, + lastX = last.x, + lastY = last.y, + overlayBox = exp.overlayBox, + wrapper = this.wrapper, + content = this.content; + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + this.outline = last.outline; + if (this.outline) this.outline.exp = exp; + last.outline = null; + last.wrapper.style.overflow = 'hidden'; + hs.setStyles(wrapper, { + left: lastX.pos +'px', + top: lastY.pos +'px', + width: lastX.get('wsize') +'px', + height: lastY.get('wsize') +'px' + }); + hs.setStyles(content, { + display: 'none', + width: (x.imgSize || x.size) +'px', + height: (y.imgSize || y.size) +'px', + left: (x.p1 + x.get('imgPad')) +'px', + top: (y.p1 + y.get('imgPad')) + 'px' + }); + var fadeBox = hs.createElement('div', { + className: 'highslide-image' + }, { + position: 'absolute', + zIndex: 4, + overflow: 'hidden', + display: 'none', + left: (lastX.p1 + lastX.get('imgPad')) +'px', + top: (lastY.p1 + lastY.get('imgPad')) +'px', + width: (lastX.imgSize || lastX.size) +'px', + height: (lastY.imgSize || lastY.size) +'px' + }); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o.style.visibility == 'hidden') o.style.display = 'none'; + } + if (overlayBox) hs.setStyles(overlayBox, { + overflow: 'visible', + left: (lastX.p1 + lastX.cb) +'px', + top: (lastY.p1 + lastY.cb) +'px', + width: lastX.size +'px', + height: lastY.size +'px' + }); + var names = { oldImg: last, newImg: this }; + for (var n in names) { + this[n] = names[n].content.cloneNode(1); + hs.setStyles(this[n], { + position: 'absolute', + border: 0, + visibility: 'visible' + }); + fadeBox.appendChild(this[n]); + } + hs.setStyles(this.oldImg, { + left: 0, + top: 0 + }); + hs.setStyles(this.newImg, { + display: 'block', + opacity: 0, + left: (x.pos - lastX.pos + x.p1 - lastX.p1 + x.get('imgPad') - lastX.get('imgPad')) +'px', + top: (y.pos - lastY.pos + y.p1 - lastY.p1 + y.get('imgPad') - lastY.get('imgPad')) +'px' + }); + wrapper.appendChild(fadeBox); + if (overlayBox) { + overlayBox.className = ''; + wrapper.appendChild(overlayBox); + } + fadeBox.style.display = ''; + last.content.style.display = 'none'; + + if (hs.safari) { + var match = navigator.userAgent.match(/Safari\/([0-9]{3})/); + if (match && parseInt(match[1]) < 525) wrapper.style.visibility = 'visible'; + } + function end() { + wrapper.style.visibility = content.style.visibility = 'visible'; + content.style.display = 'block'; + fadeBox.style.display = 'none'; + exp.a.className += ' highslide-active-anchor'; + exp.afterExpand(); + last.afterClose(); + exp.last = null; + } + hs.animate(last.wrapper, { + left: x.pos, + top: y.pos, + width: x.get('wsize'), + height: y.get('wsize') + }, dur); + + hs.animate(fadeBox, { + width: x.imgSize || x.size, + height: y.imgSize || y.size, + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad') + }, dur); + + hs.animate(this.oldImg, { + left: (lastX.pos - x.pos + lastX.p1 - x.p1 + lastX.get('imgPad') - x.get('imgPad')), + top: (lastY.pos - y.pos + lastY.p1 - y.p1 + lastY.get('imgPad') - y.get('imgPad')) + }, dur); + + hs.animate(this.newImg, { + opacity: 1, + left: 0, + top: 0 + }, dur); + if (overlayBox) hs.animate(overlayBox, { + left: x.p1 + x.cb, + top: y.p1 + y.cb, + width: x.size, + height: y.size + }, dur); + if (this.outline) var wrapStep = function(val, args) { + if (args.prop == 'top') { + var stl = exp.wrapper.style; + var pos = { + w: parseInt(stl.width), + h: parseInt(stl.height), + x: parseInt(stl.left), + y: parseInt(stl.top) + }; + exp.outline.setPosition(pos); + } + }; + hs.animate(wrapper, to.wrapper, { + duration: dur, + complete: end, + step: wrapStep + }); + + fadeBox.style.visibility = 'visible'; +}, +reuseOverlay : function(o, el) { + if (!this.last) return false; + for (var i = 0; i < this.last.overlays.length; i++) { + var oDiv = hs.$('hsId'+ this.last.overlays[i]); + if (oDiv && oDiv.hsId == o.hsId) { + this.genOverlayBox(); + oDiv.reuse = this.key; + hs.push(this.overlays, this.last.overlays[i]); + return true; + } + } + return false; +}, + + +afterExpand : function() { + this.isExpanded = true; + this.focus(); + if (this.dimmingOpacity) hs.dim(this); + if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; + this.prepareNextOutline(); + var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; + this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') + && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); + if (this.overlayBox) this.showOverlays(); + +}, + + +prepareNextOutline : function() { + var key = this.key; + var outlineType = this.outlineType; + new hs.Outline(outlineType, + function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); +}, + + +preloadNext : function() { + var next = this.getAdjacentAnchor(1); + if (next && next.onclick.toString().match(/hs\.expand/)) + var img = hs.createElement('img', { src: hs.getSrc(next) }); +}, + + +getAdjacentAnchor : function(op) { + var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; + + /*< ? if ($cfg->slideshow) : ?>s*/ + if (!as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + /*< ? endif ?>s*/ + return as[current + op] || null; +}, + +getAnchorIndex : function() { + var arr = hs.getAnchors().groups[this.slideshowGroup || 'none']; + if (arr) for (var i = 0; i < arr.length; i++) { + if (arr[i] == this.a) return i; + } + return null; +}, + + +getNumber : function() { + if (this[this.numberPosition]) { + var arr = hs.anchors.groups[this.slideshowGroup || 'none']; + if (arr) { + var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length); + this[this.numberPosition].innerHTML = + '
'+ s +'
'+ this[this.numberPosition].innerHTML; + } + } +}, +initSlideshow : function() { + if (!this.last) { + for (var i = 0; i < hs.slideshows.length; i++) { + var ss = hs.slideshows[i], sg = ss.slideshowGroup; + if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup) + this.slideshow = new hs.Slideshow(this.key, ss); + } + } else { + this.slideshow = this.last.slideshow; + } + var ss = this.slideshow; + if (!ss) return; + var key = ss.expKey = this.key; + + ss.checkFirstAndLast(); + ss.disable('full-expand'); + if (ss.controls) { + var o = ss.overlayOptions || {}; + o.overlayId = ss.controls; + o.hsId = 'controls'; + this.createOverlay(o); + } + if (ss.thumbstrip) ss.thumbstrip.add(this); + if (!this.last && this.autoplay) ss.play(true); + if (ss.autoplay) { + ss.autoplay = setTimeout(function() { + hs.next(key); + }, (ss.interval || 500)); + } +}, + +cancelLoading : function() { + hs.discardElement (this.wrapper); + hs.expanders[this.key] = null; + if (hs.upcoming == this.a) hs.upcoming = null; + hs.undim(this.key); + if (this.loading) hs.loading.style.left = '-9999px'; +}, + +writeCredits : function () { + if (this.credits) return; + this.credits = hs.createElement('a', { + href: hs.creditsHref, + target: hs.creditsTarget, + className: 'highslide-credits', + innerHTML: hs.lang.creditsText, + title: hs.lang.creditsTitle + }); + this.createOverlay({ + overlayId: this.credits, + position: this.creditsPosition || 'top left', + hsId: 'credits' + }); +}, + +getInline : function(types, addOverlay) { + for (var i = 0; i < types.length; i++) { + var type = types[i], s = null; + if (!this[type +'Id'] && this.thumbsUserSetId) + this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; + if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']); + if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { + s = eval(this[type +'Eval']); + } catch (e) {} + if (!this[type] && this[type +'Text']) { + s = this[type +'Text']; + } + if (!this[type] && !s) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + this[type] = next.cloneNode(1); + break; + } + next = next.nextSibling; + } + } + if (!this[type] && !s && this.numberPosition == type) s = '\n'; + + if (!this[type] && s) this[type] = hs.createElement('div', + { className: 'highslide-'+ type, innerHTML: s } ); + + if (addOverlay && this[type]) { + var o = { position: (type == 'heading') ? 'above' : 'below' }; + for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; + o.overlayId = this[type]; + this.createOverlay(o); + } + } +}, + + +// on end move and resize +doShowHide : function(visibility) { + if (hs.hideSelects) this.showHideElements('SELECT', visibility); + if (hs.hideIframes) this.showHideElements('IFRAME', visibility); + if (hs.geckoMac) this.showHideElements('*', visibility); +}, +showHideElements : function (tagName, visibility) { + var els = document.getElementsByTagName(tagName); + var prop = tagName == '*' ? 'overflow' : 'visibility'; + for (var i = 0; i < els.length; i++) { + if (prop == 'visibility' || (document.defaultView.getComputedStyle( + els[i], "").getPropertyValue('overflow') == 'auto' + || els[i].getAttribute('hidden-by') != null)) { + var hiddenBy = els[i].getAttribute('hidden-by'); + if (visibility == 'visible' && hiddenBy) { + hiddenBy = hiddenBy.replace('['+ this.key +']', ''); + els[i].setAttribute('hidden-by', hiddenBy); + if (!hiddenBy) els[i].style[prop] = els[i].origProp; + } else if (visibility == 'hidden') { // hide if behind + var elPos = hs.getPosition(els[i]); + elPos.w = els[i].offsetWidth; + elPos.h = els[i].offsetHeight; + if (!this.dimmingOpacity) { // hide all if dimming + + var clearsX = (elPos.x + elPos.w < this.x.get('opos') + || elPos.x > this.x.get('opos') + this.x.get('osize')); + var clearsY = (elPos.y + elPos.h < this.y.get('opos') + || elPos.y > this.y.get('opos') + this.y.get('osize')); + } + var wrapperKey = hs.getWrapperKey(els[i]); + if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image + if (!hiddenBy) { + els[i].setAttribute('hidden-by', '['+ this.key +']'); + els[i].origProp = els[i].style[prop]; + els[i].style[prop] = 'hidden'; + + } else if (hiddenBy.indexOf('['+ this.key +']') == -1) { + els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); + } + } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) + && wrapperKey != this.key) { // on move + els[i].setAttribute('hidden-by', ''); + els[i].style[prop] = els[i].origProp || ''; + } else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) { + els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); + } + + } + } + } +}, + +focus : function() { + this.wrapper.style.zIndex = hs.zIndexCounter += 2; + // blur others + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && i == hs.focusKey) { + var blurExp = hs.expanders[i]; + blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; + blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; + blurExp.content.title = hs.lang.focusTitle; + } + } + + // focus this + if (this.outline) this.outline.table.style.zIndex + = this.wrapper.style.zIndex - 1; + this.content.className = 'highslide-'+ this.contentType; + this.content.title = hs.lang.restoreTitle; + + if (hs.restoreCursor) { + hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; + if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand'; + this.content.style.cursor = hs.styleRestoreCursor; + } + + hs.focusKey = this.key; + hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); +}, +moveTo: function(x, y) { + this.x.setPos(x); + this.y.setPos(y); +}, +resize : function (e) { + var w, h, r = e.width / e.height; + w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); + if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; + h = w / r; + if (h < Math.min(this.minHeight, this.y.full)) { + h = Math.min(this.minHeight, this.y.full); + if (this.isImage) w = h * r; + } + this.resizeTo(w, h); +}, +resizeTo: function(w, h) { + this.y.setSize(h); + this.x.setSize(w); +}, + +close : function() { + if (this.isClosing || !this.isExpanded) return; + if (this.transitions[1] == 'crossfade' && hs.upcoming) { + hs.getExpander(hs.upcoming).cancelLoading(); + hs.upcoming = null; + } + this.isClosing = true; + if (this.slideshow && !hs.upcoming) this.slideshow.pause(); + + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + + try { + this.content.style.cursor = 'default'; + this.changeSize( + 0, { + wrapper: { + width : this.x.t, + height : this.y.t, + left: this.x.tpos - this.x.cb + this.x.tb, + top: this.y.tpos - this.y.cb + this.y.tb + }, + content: { + left: 0, + top: 0, + width: this.x.t, + height: this.y.t + } + }, hs.restoreDuration + ); + } catch (e) { this.afterClose(); } +}, + +createOverlay : function (o) { + var el = o.overlayId, + relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position)); + if (typeof el == 'string') el = hs.getNode(el); + if (o.html) el = hs.createElement('div', { innerHTML: o.html }); + if (!el || typeof el == 'string') return; + el.style.display = 'block'; + o.hsId = o.hsId || o.overlayId; + if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return; + this.genOverlayBox(); + var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; + if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; + var overlay = hs.createElement( + 'div', { + id: 'hsId'+ hs.idCounter++, + hsId: o.hsId + }, { + position: 'absolute', + visibility: 'hidden', + width: width, + direction: hs.lang.cssDirection || '', + opacity: 0 + }, + relToVP ? hs.viewport :this.overlayBox, + true + ); + if (relToVP) overlay.hsKey = this.key; + + overlay.appendChild(el); + hs.extend(overlay, { + opacity: 1, + offsetX: 0, + offsetY: 0, + dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250 + }); + hs.extend(overlay, o); + + if (this.gotOverlays) { + this.positionOverlay(overlay); + if (!overlay.hideOnMouseOut || this.mouseIsOver) + hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur); + } + hs.push(this.overlays, hs.idCounter - 1); +}, +positionOverlay : function(overlay) { + var p = overlay.position || 'middle center', + relToVP = (overlay.relativeTo == 'viewport'), + offX = overlay.offsetX, + offY = overlay.offsetY; + if (relToVP) { + hs.viewport.style.display = 'block'; + overlay.hsKey = this.key; + if (overlay.offsetWidth > overlay.parentNode.offsetWidth) + overlay.style.width = '100%'; + } else + if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay); + if (/left$/.test(p)) overlay.style.left = offX +'px'; + + if (/center$/.test(p)) hs.setStyles (overlay, { + left: '50%', + marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px' + }); + + if (/right$/.test(p)) overlay.style.right = - offX +'px'; + + if (/^leftpanel$/.test(p)) { + hs.setStyles(overlay, { + right: '100%', + marginRight: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p1 = overlay.offsetWidth; + + } else if (/^rightpanel$/.test(p)) { + hs.setStyles(overlay, { + left: '100%', + marginLeft: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p2 = overlay.offsetWidth; + } + var parOff = overlay.parentNode.offsetHeight; + overlay.style.height = 'auto'; + if (relToVP && overlay.offsetHeight > parOff) + overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%'; + + if (/^top/.test(p)) overlay.style.top = offY +'px'; + if (/^middle/.test(p)) hs.setStyles (overlay, { + top: '50%', + marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px' + }); + if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px'; + if (/^above$/.test(p)) { + hs.setStyles(overlay, { + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + bottom: '100%', + marginBottom: this.y.cb +'px', + width: 'auto' + }); + this.y.p1 = overlay.offsetHeight; + + } else if (/^below$/.test(p)) { + hs.setStyles(overlay, { + position: 'relative', + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + top: '100%', + marginTop: this.y.cb +'px', + width: 'auto' + }); + this.y.p2 = overlay.offsetHeight; + overlay.style.position = 'absolute'; + } +}, + +getOverlays : function() { + this.getInline(['heading', 'caption'], true); + this.getNumber(); + if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move'; + if (hs.showCredits) this.writeCredits(); + for (var i = 0; i < hs.overlays.length; i++) { + var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; + if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) + || (sg && sg === this.slideshowGroup)) { + this.createOverlay(o); + } + } + var os = []; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (/panel$/.test(o.position)) this.positionOverlay(o); + else hs.push(os, o); + } + for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); + this.gotOverlays = true; +}, +genOverlayBox : function() { + if (!this.overlayBox) this.overlayBox = hs.createElement ( + 'div', { + className: this.wrapperClassName + }, { + position : 'absolute', + width: (this.x.size || (this.useBox ? this.width : null) + || this.x.full) +'px', + height: (this.y.size || this.y.full) +'px', + visibility : 'hidden', + overflow : 'hidden', + zIndex : hs.ie ? 4 : null + }, + hs.container, + true + ); +}, +sizeOverlayBox : function(doWrapper, doPanels) { + var overlayBox = this.overlayBox, + x = this.x, + y = this.y; + hs.setStyles( overlayBox, { + width: x.size +'px', + height: y.size +'px' + }); + if (doWrapper || doPanels) { + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat'); + if (o && /^(above|below)$/.test(o.position)) { + if (ie6) { + o.style.width = (overlayBox.offsetWidth + 2 * x.cb + + x.p1 + x.p2) +'px'; + } + y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight; + } + if (o && ie6 && /^(left|right)panel$/.test(o.position)) { + o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px'; + } + } + } + if (doWrapper) { + hs.setStyles(this.content, { + top: y.p1 +'px' + }); + hs.setStyles(overlayBox, { + top: (y.p1 + y.cb) +'px' + }); + } +}, + +showOverlays : function() { + var b = this.overlayBox; + b.className = ''; + hs.setStyles(b, { + top: (this.y.p1 + this.y.cb) +'px', + left: (this.x.p1 + this.x.cb) +'px', + overflow : 'visible' + }); + if (hs.safari) b.style.visibility = 'visible'; + this.wrapper.appendChild (b); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + o.style.zIndex = o.hsId == 'controls' ? 5 : 4; + if (!o.hideOnMouseOut || this.mouseIsOver) { + o.style.visibility = 'visible'; + hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: o.opacity }, o.dur); + } + } +}, + +destroyOverlays : function() { + if (!this.overlays.length) return; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (o.parentNode == hs.viewport) hs.discardElement(o); + } + if (this.slideshow) { + var c = this.slideshow.controls; + if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); + } + hs.discardElement(this.overlayBox); +}, + + + +createFullExpand : function () { + if (this.slideshow && this.slideshow.controls) { + this.slideshow.enable('full-expand'); + return; + } + this.fullExpandLabel = hs.createElement( + 'a', { + href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', + title: hs.lang.fullExpandTitle, + className: 'highslide-full-expand' + } + ); + + this.createOverlay({ + overlayId: this.fullExpandLabel, + position: hs.fullExpandPosition, + hideOnMouseOut: true, + opacity: hs.fullExpandOpacity + }); +}, + +doFullExpand : function () { + try { + if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); + + this.focus(); + var xSize = this.x.size; + this.resizeTo(this.x.full, this.y.full); + + var xpos = this.x.pos - (this.x.size - xSize) / 2; + if (xpos < hs.marginLeft) xpos = hs.marginLeft; + + this.moveTo(xpos, this.y.pos); + this.doShowHide('hidden'); + hs.setDimmerSize(this); + + } catch (e) { + this.error(e); + } +}, + + +afterClose : function () { + this.a.className = this.a.className.replace('highslide-active-anchor', ''); + + this.doShowHide('visible'); + if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); + + hs.discardElement(this.wrapper); + if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none'; + + if (this.dimmingOpacity) hs.undim(this.key); + hs.expanders[this.key] = null; + hs.reOrder(); +} + +}; + + +hs.Slideshow = function (expKey, options) { + if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors(); + this.expKey = expKey; + for (var x in options) this[x] = options[x]; + if (this.useControls) this.getControls(); + if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this); +}; +hs.Slideshow.prototype = { +getControls: function() { + this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) }, + null, hs.container); + + var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close']; + this.btn = {}; + var pThis = this; + for (var i = 0; i < buttons.length; i++) { + this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]); + this.enable(buttons[i]); + } + this.btn.pause.style.display = 'none'; + //this.disable('full-expand'); +}, +checkFirstAndLast: function() { + if (this.repeat || !this.controls) return; + var exp = hs.expanders[this.expKey], + cur = exp.getAnchorIndex(), + re = /disabled$/; + if (cur == 0) + this.disable('previous'); + else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className)) + this.enable('previous'); + if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) { + this.disable('next'); + this.disable('play'); + } else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) { + this.enable('next'); + this.enable('play'); + } +}, +enable: function(btn) { + if (!this.btn) return; + var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/; + a.onclick = function() { + sls[btn](); + return false; + }; + if (re.test(a.className)) a.className = a.className.replace(re, ''); +}, +disable: function(btn) { + if (!this.btn) return; + var a = this.btn[btn].getElementsByTagName('a')[0]; + a.onclick = function() { return false; }; + if (!/disabled$/.test(a.className)) a.className += ' disabled'; +}, +hitSpace: function() { + if (this.autoplay) this.pause(); + else this.play(); +}, +play: function(wait) { + if (this.btn) { + this.btn.play.style.display = 'none'; + this.btn.pause.style.display = ''; + } + + this.autoplay = true; + if (!wait) hs.next(this.expKey); +}, +pause: function() { + if (this.btn) { + this.btn.pause.style.display = 'none'; + this.btn.play.style.display = ''; + } + + clearTimeout(this.autoplay); + this.autoplay = null; +}, +previous: function() { + this.pause(); + hs.previous(this.btn.previous); +}, +next: function() { + this.pause(); + hs.next(this.btn.next); +}, +move: function() {}, +'full-expand': function() { + hs.getExpander().doFullExpand(); +}, +close: function() { + hs.close(this.btn.close); +} +}; +hs.Thumbstrip = function(slideshow) { + function add (exp) { + hs.extend(options || {}, { + overlayId: dom, + hsId: 'thumbstrip' + }); + if (hs.ieLt7) options.fade = 0; + exp.createOverlay(options); + hs.setStyles(dom.parentNode, { overflow: 'hidden' }); + }; + + function scroll (delta) { + selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7)); + }; + + function selectThumb (i, scrollBy) { + if (i === undefined) for (var j = 0; j < group.length; j++) { + if (group[j] == hs.expanders[slideshow.expKey].a) { + i = j; + break; + } + } + if (i === undefined) return; + var as = dom.getElementsByTagName('a'), + active = as[i], + cell = active.parentNode, + left = isX ? 'Left' : 'Top', + right = isX ? 'Right' : 'Bottom', + width = isX ? 'Width' : 'Height', + offsetLeft = 'offset' + left, + offsetWidth = 'offset' + width, + overlayWidth = div.parentNode.parentNode[offsetWidth], + minTblPos = overlayWidth - table[offsetWidth], + curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0, + tblPos = curTblPos, + mgnRight = 20; + if (scrollBy !== undefined) { + tblPos = curTblPos - scrollBy; + if (tblPos > 0) tblPos = 0; + if (tblPos < minTblPos) tblPos = minTblPos; + + } else { + for (var j = 0; j < as.length; j++) as[j].className = ''; + active.className = 'highslide-active-anchor'; + var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft], + activeRight = cell[offsetLeft] + cell[offsetWidth] + + (as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0); + if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight; + else if (activeLeft < -curTblPos) tblPos = -activeLeft; + } + var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos; + hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad'); + hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad'); + scrollUp.style.display = tblPos < 0 ? 'block' : 'none'; + scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none'; + }; + + + // initialize + var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'], + options = slideshow.thumbstrip, + mode = options.mode || 'horizontal', + floatMode = (mode == 'float'), + tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'], + isX = (mode == 'horizontal'), + dom = hs.createElement('div', { + className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode, + innerHTML: + '
'+ + '<'+ tree[0] +'><'+ tree[1] +'>
'+ + '
'+ + '
'+ + '
' + }, { + display: 'none' + }, hs.container), + domCh = dom.childNodes, + div = domCh[0], + scrollUp = domCh[1], + scrollDown = domCh[2], + marker = domCh[3], + table = div.firstChild, + tbody = dom.getElementsByTagName(tree[1])[0], + tr; + for (var i = 0; i < group.length; i++) { + if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody); + (function(){ + var a = group[i], + cell = hs.createElement(tree[3], null, null, tr), + pI = i; + hs.createElement('a', { + href: a.href, + onclick: function() { + hs.getExpander(this).focus(); + return hs.transit(a); + }, + innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML + }, null, cell); + })(); + } + + if (!floatMode) { + scrollUp.onclick = function () { scroll(-1); }; + scrollDown.onclick = function() { scroll(1); }; + hs.addEventListener(tbody, document.onmousewheel !== undefined ? + 'mousewheel' : 'DOMMouseScroll', function(e) { + var delta = 0; + e = e || window.event; + if (e.wheelDelta) { + delta = e.wheelDelta/120; + if (hs.opera) delta = -delta; + } else if (e.detail) { + delta = -e.detail/3; + } + if (delta) scroll(-delta * 0.2); + if (e.preventDefault) e.preventDefault(); + e.returnValue = false; + }); + } + + return { + add: add, + selectThumb: selectThumb + } +}; +if (hs.ie) { + (function () { + try { + document.documentElement.doScroll('left'); + } catch (e) { + setTimeout(arguments.callee, 50); + return; + } + hs.ready(); + })(); +} +hs.addEventListener(document, 'DOMContentLoaded', hs.ready); +hs.addEventListener(window, 'load', hs.ready); +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; + +// set handlers +hs.addEventListener(window, 'load', function() { + if (hs.expandCursor) { + var sel = '.highslide img', + dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'; + + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]); + + if (!hs.ie) { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } else { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } + } +}); +hs.addEventListener(window, 'resize', function() { + hs.getPageSize(); + if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) { + var node = hs.viewport.childNodes[i], + exp = hs.getExpander(node); + exp.positionOverlay(node); + if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb(); + } +}); +hs.addEventListener(document, 'mousemove', function(e) { + hs.mouse = { x: e.clientX, y: e.clientY }; +}); +hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); +hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); + +hs.addEventListener(document, 'ready', hs.getAnchors); +hs.addEventListener(window, 'load', hs.preloadImages); \ No newline at end of file diff --git a/highslide/highslide-with-gallery.packed.js b/highslide/highslide-with-gallery.packed.js new file mode 100644 index 0000000..dc4c37c --- /dev/null +++ b/highslide/highslide-with-gallery.packed.js @@ -0,0 +1,28 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +slideshow +positioning +transitions +viewport +thumbstrip +packed +Author: Torstein Hønsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u m={17:{9Q:\'9e\',96:\'be...\',95:\'6O 1N bd\',9W:\'6O 1N bc 1N bb\',6u:\'bf 1N bg H (f)\',a5:\'bj by a2 a3\',a6:\'bi 1N bh a2 a3 ba\',9y:\'9A\',8j:\'9z\',8r:\'9u\',8k:\'9Y\',8l:\'9Y (b9)\',b3:\'b2\',8s:\'9B\',9d:\'9B 1f (9E)\',8h:\'9C\',8q:\'9C 1f (9E)\',ap:\'9A (7j T)\',8g:\'9z (7j 2M)\',8t:\'9u\',8p:\'1:1\',3i:\'b1 %1 b0 %2\',7p:\'6O 1N 2c 2B, b4 af b5 1N 3c. b8 7j b7 M 1v af 2V.\'},4v:\'P/b6/\',6A:\'bk.4m\',4J:\'bl.4m\',6P:4H,8f:4H,5k:15,9I:15,7L:15,9J:15,4r:bB,98:0.75,8Z:K,6E:5,3w:2,aZ:3,4U:1g,aD:\'4c 2M\',aA:1,a0:K,aF:\'bA://P.bz/\',ax:\'bx\',au:K,72:[\'a\'],2Y:[],a7:4H,3R:0,7F:50,3y:\'2I\',6z:\'2I\',91:G,92:G,7N:K,4E:am,4M:am,5c:K,1C:\'bC-bD\',aQ:{2p:\'<7P>\'+\'<1W 2n="P-2V">\'+\'\'+\'<22>{m.17.9y}\'+\'\'+\'<1W 2n="P-3f">\'+\'\'+\'<22>{m.17.8s}\'+\'\'+\'<1W 2n="P-2L">\'+\'\'+\'<22>{m.17.8h}\'+\'\'+\'<1W 2n="P-1v">\'+\'\'+\'<22>{m.17.8j}\'+\'\'+\'<1W 2n="P-3c">\'+\'\'+\'<22>{m.17.8r}\'+\'\'+\'<1W 2n="P-1d-2C">\'+\'\'+\'<22>{m.17.8p}\'+\'\'+\'<1W 2n="P-2c">\'+\'\'+\'<22>{m.17.8k}\'+\'\'+\'\'},59:[],6X:K,U:[],6V:[\'5c\',\'36\',\'3y\',\'6z\',\'91\',\'92\',\'1C\',\'3w\',\'bG\',\'bF\',\'bE\',\'9a\',\'bw\',\'bv\',\'bp\',\'9b\',\'9x\',\'7N\',\'3z\',\'4N\',\'2Y\',\'3R\',\'L\',\'W\',\'7y\',\'4E\',\'4M\',\'8o\',\'bo\',\'2w\',\'2t\',\'at\',\'ak\',\'1K\'],1r:[],5J:0,84:{x:[\'9M\',\'T\',\'3P\',\'2M\',\'9H\'],y:[\'4I\',\'S\',\'7M\',\'4c\',\'63\']},6i:{},9b:{},9a:{},3C:[],4P:[],44:{},7o:{},5y:[],3X:7S((4V.5S.5V().26(/.+(?:97|bn|bm|1A)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1A:(19.58&&!1J.3o),4x:/ah/.1b(4V.5S),5N:/bq.+97:1\\.[0-8].+br/.1b(4V.5S),$:A(24){q(24)C 19.bu(24)},2y:A(2k,3n){2k[2k.R]=3n},1a:A(8C,4e,3q,7Y,8E){u B=19.1a(8C);q(4e)m.3e(B,4e);q(8E)m.V(B,{bt:0,ad:\'1s\',7b:0});q(3q)m.V(B,3q);q(7Y)7Y.2F(B);C B},3e:A(B,4e){M(u x 2W 4e)B[x]=4e[x];C B},V:A(B,3q){M(u x 2W 3q){q(m.1A&&x==\'1k\'){q(3q[x]>0.99)B.E.bs(\'4Z\');I B.E.4Z=\'8G(1k=\'+(3q[x]*2m)+\')\'}I B.E[x]=3q[x]}},1H:A(B,1n,2X){u 49,3E,3W;q(1x 2X!=\'6d\'||2X===G){u 2Z=8w;2X={3F:2Z[2],2t:2Z[3],5F:2Z[4]}}q(1x 2X.3F!=\'3i\')2X.3F=4H;2X.2t=1e[2X.2t]||1e.8z;2X.5Q=m.3e({},1n);M(u 30 2W 1n){u e=2d m.1F(B,2X,30);49=7S(m.6C(B,30))||0;3E=7S(1n[30]);3W=30!=\'1k\'?\'F\':\'\';e.3v(49,3E,3W)}},6C:A(B,1n){q(19.7V){C 19.7V.9m(B,G).9n(1n)}I{q(1n==\'1k\')1n=\'4Z\';u 3n=B.bH[1n.2e(/\\-(\\w)/g,A(a,b){C b.8U()})];q(1n==\'4Z\')3n=3n.2e(/8G\\(1k=([0-9]+)\\)/,A(a,b){C b/2m});C 3n===\'\'?1:3n}},57:A(){u d=19,w=1J,3p=d.88&&d.88!=\'9q\'?d.4w:d.5r;u b=d.5r;u 8F=(w.5u&&w.8P)?w.5u+w.8P:1e.2P(b.8L,b.1V),8A=(w.5o&&1J.8M)?w.5o+w.8M:1e.2P(b.8H,b.31),5z=m.1A?3p.8L:(d.4w.7A||4l.5u),5A=m.1A?1e.2P(3p.8H,3p.73):(d.4w.73||4l.5o);u L=m.1A?3p.7A:(d.4w.7A||4l.5u),W=m.1A?3p.73:4l.5o;m.3I={5z:1e.2P(5z,8F),5A:1e.2P(5A,8A),L:L,W:W,5Z:m.1A?3p.5Z:aX,5q:m.1A?3p.5q:aY}},5K:A(B){u p={x:B.3N,y:B.ao};4g(B.8X){B=B.8X;p.x+=B.3N;p.y+=B.ao;q(B!=19.5r&&B!=19.4w){p.x-=B.5Z;p.y-=B.5q}}C p},2C:A(a,2R,3v,16){q(!a)a=m.1a(\'a\',G,{1o:\'1s\'},m.2a);q(1x a.54==\'A\')C 2R;2g{2d m.51(a,2R,3v);C 1g}2i(e){C K}},aL:A(B,4t,Z){u 1h=B.2N(4t);M(u i=0;i<1h.R;i++){q((2d 5P(Z)).1b(1h[i].Z)){C 1h[i]}}C G},aS:A(s){s=s.2e(/\\s/g,\' \');u 1Y=/{m\\.17\\.([^}]+)\\}/g,55=s.26(1Y),17;q(55)M(u i=0;i<55.R;i++){17=55[i].2e(1Y,"$1");q(1x m.17[17]!=\'1G\')s=s.2e(55[i],m.17[17])}C s},9L:A(){u 81=0,5w=-1,U=m.U,z,1z;M(u i=0;i81){81=1z;5w=i}}}q(5w==-1)m.3r=-1;I U[5w].4a()},4X:A(a,53){a.54=a.2E;u p=a.54?a.54():G;a.54=G;C(p&&1x p[53]!=\'1G\')?p[53]:(1x m[53]!=\'1G\'?m[53]:G)},7n:A(a){u 1K=m.4X(a,\'1K\');q(1K)C 1K;C a.23},8c:A(24){u 3s=m.$(24),3M=m.7o[24],a={};q(!3s&&!3M)C G;q(!3M){3M=3s.5G(K);3M.24=\'\';m.7o[24]=3M;C 3s}I{C 3M.5G(K)}},3Q:A(d){q(d)m.85.2F(d);m.85.2O=\'\'},1p:A(z){q(!m.28){m.28=m.1a(\'Y\',{Z:\'P-aV\',52:\'\',2E:A(){m.2c()}},{1m:\'2l\',1c:\'1I\',T:0,1k:0},m.2a,K);m.21(1J,\'3u\',m.5m)}m.28.E.1o=\'\';m.5m();m.28.52+=\'|\'+z.O;q(m.5N&&m.a1)m.V(m.28,{6R:\'6p(\'+m.4v+\'aU.8B)\',1k:1});I m.1H(m.28,{1k:z.3R},m.7F)},7h:A(O){q(!m.28)C;q(1x O!=\'1G\')m.28.52=m.28.52.2e(\'|\'+O,\'\');q((1x O!=\'1G\'&&m.28.52!=\'\')||(m.1S&&m.4X(m.1S,\'3R\')))C;q(m.5N&&m.a1)m.V(m.28,{6R:\'1s\',L:0,W:0});I m.1H(m.28,{1k:0},m.7F,G,A(){m.V(m.28,{1o:\'1s\',L:0,W:0})})},5m:A(z){m.57();q(!m.28)C;u h=(m.1A&&z&&z.N)?2U(z.N.E.S)+2U(z.N.E.W)+(z.X?z.X.1j:0):0;m.V(m.28,{L:m.3I.5z+\'F\',W:1e.2P(m.3I.5A,h)+\'F\'})},6S:A(4j,z){u 11=z=z||m.2s();q(m.1S)C 1g;I m.11=11;2g{m.1S=4j;4j.2E()}2i(e){m.11=m.1S=G}2g{q(!4j||z.2Y[1]!=\'3O\')z.2c()}2i(e){}C 1g},5C:A(B,1P){u z=m.2s(B);q(z){4j=z.6N(1P);C m.6S(4j,z)}I C 1g},2V:A(B){C m.5C(B,-1)},1v:A(B){C m.5C(B,1)},5B:A(e){q(!e)e=1J.2b;q(!e.2h)e.2h=e.6x;q(1x e.2h.9V!=\'1G\')C K;u z=m.2s();u 1P=G;93(e.aW){1L 70:q(z)z.6g();C K;1L 32:1P=2;5b;1L 34:1L 39:1L 40:1P=1;5b;1L 8:1L 33:1L 37:1L 38:1P=-1;5b;1L 27:1L 13:1P=0}q(1P!==G){q(1P!=2)m.4o(19,1J.3o?\'7G\':\'7K\',m.5B);q(!m.au)C K;q(e.4B)e.4B();I e.8v=1g;q(z){q(1P==0){z.2c()}I q(1P==2){q(z.1f)z.1f.aJ()}I{q(z.1f)z.1f.2L();m.5C(z.O,1P)}C 1g}}C K},cI:A(Q){m.2y(m.1r,m.3e(Q,{1E:\'1E\'+m.5J++}))},cH:A(1i){u 2D=1i.2w;q(1x 2D==\'6d\'){M(u i=0;i<2D.R;i++){u o={};M(u x 2W 1i)o[x]=1i[x];o.2w=2D[i];m.2y(m.4P,o)}}I{m.2y(m.4P,1i)}},8b:A(7C,5n){u B,1Y=/^P-N-([0-9]+)$/;B=7C;4g(B.1Q){q(B.6s!==1G)C B.6s;q(B.24&&1Y.1b(B.24))C B.24.2e(1Y,"$1");B=B.1Q}q(!5n){B=7C;4g(B.1Q){q(B.4t&&m.5U(B)){M(u O=0;O1)C K;q(!e.2h)e.2h=e.6x;u B=e.2h;4g(B.1Q&&!(/P-(2B|3c|5x|3u)/.1b(B.Z))){B=B.1Q}u z=m.2s(B);q(z&&(z.7I||!z.4C))C K;q(z&&e.16==\'ag\'){q(e.2h.9V)C K;u 26=B.Z.26(/P-(2B|3c|3u)/);q(26){m.2Q={z:z,16:26[1],T:z.x.D,L:z.x.H,S:z.y.D,W:z.y.H,9t:e.6j,9w:e.6k};m.21(19,\'6c\',m.5L);q(e.4B)e.4B();q(/P-(2B|5x)-7B/.1b(z.18.Z)){z.4a();m.80=K}C 1g}}I q(e.16==\'8K\'){m.4o(19,\'6c\',m.5L);q(m.2Q){q(m.4k&&m.2Q.16==\'2B\')m.2Q.z.18.E.45=m.4k;u 3a=m.2Q.3a;q(!3a&&!m.80&&!/(3c|3u)/.1b(m.2Q.16)){z.2c()}I q(3a||(!3a&&m.cM)){m.2Q.z.5j(\'1q\')}q(3a)m.5m(z);m.80=1g;m.2Q=G}I q(/P-2B-7B/.1b(B.Z)){B.E.45=m.4k}}C 1g},5L:A(e){q(!m.2Q)C K;q(!e)e=1J.2b;u a=m.2Q,z=a.z;a.5T=e.6j-a.9t;a.76=e.6k-a.9w;u 6v=1e.cL(1e.aI(a.5T,2)+1e.aI(a.76,2));q(!a.3a)a.3a=(a.16!=\'2B\'&&6v>0)||(6v>(m.cF||5));q(a.3a&&e.6j>5&&e.6k>5){q(a.16==\'3u\')z.3u(a);I{z.7e(a.T+a.5T,a.S+a.76);q(a.16==\'2B\')z.18.E.45=\'3c\'}}C 1g},8i:A(e){2g{q(!e)e=1J.2b;u 5p=/cE/i.1b(e.16);q(!e.2h)e.2h=e.6x;q(m.1A)e.7Z=5p?e.cz:e.cy;u z=m.2s(e.2h);q(!z.4C)C;q(!z||!e.7Z||m.2s(e.7Z,K)==z||m.2Q)C;M(u i=0;i=k.1i.3F+k.7s){k.3V=k.3E;k.D=k.7v=1;k.7z();k.1i.5Q[k.1n]=K;u 7u=K;M(u i 2W k.1i.5Q)q(k.1i.5Q[i]!==K)7u=1g;q(7u){q(k.1i.5F)k.1i.5F.8y(k.2A)}C 1g}I{u n=t-k.7s;k.7v=n/k.1i.3F;k.D=k.1i.2t(n,0,1,k.1i.3F);k.3V=k.49+((k.3E-k.49)*k.D);k.7z()}C K}};m.3e(m.1F,{3k:{1k:A(1F){m.V(1F.2A,{1k:1F.3V})},8x:A(1F){q(1F.2A.E&&1F.2A.E[1F.1n]!=G)1F.2A.E[1F.1n]=1F.3V+1F.3W;I 1F.2A[1F.1n]=1F.3V}}});m.5i=A(1C,4b){k.4b=4b;k.1C=1C;u v=m.3X,3B;k.6F=m.1A&&v>=5.5&&v<7;q(!1C){q(4b)4b();C}m.6U();k.1U=m.1a(\'1U\',{cT:0},{1c:\'1q\',1m:\'2l\',cv:\'bZ\',L:0},m.2a,K);u 47=m.1a(\'47\',G,G,k.1U,1);k.2f=[];M(u i=0;i<=8;i++){q(i%3==0)3B=m.1a(\'3B\',G,{W:\'2I\'},47,K);k.2f[i]=m.1a(\'2f\',G,G,3B,K);u E=i!=4?{bY:0,bX:0}:{1m:\'7H\'};m.V(k.2f[i],E)}k.2f[4].Z=1C+\' P-X\';k.8D()};m.5i.5g={8D:A(){u 1K=m.4v+(m.bW||"c0/")+k.1C+".8B";u 8R=m.4x?m.2a:G;k.3b=m.1a(\'1y\',G,{1m:\'2l\',S:\'-4F\'},8R,K);u 6W=k;k.3b.5W=A(){6W.8S()};k.3b.1K=1K},8S:A(){u o=k.1j=k.3b.L/4,D=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1p={W:(2*o)+\'F\',L:(2*o)+\'F\'};M(u i=0;i<=8;i++){q(D[i]){q(k.6F){u w=(i==1||i==7)?\'2m%\':k.3b.L+\'F\';u Y=m.1a(\'Y\',G,{L:\'2m%\',W:\'2m%\',1m:\'7H\',2J:\'1q\'},k.2f[i],K);m.1a(\'Y\',G,{4Z:"c1:c5.c4.c3(c2=bV, 1K=\'"+k.3b.1K+"\')",1m:\'2l\',L:w,W:k.3b.W+\'F\',T:(D[i][0]*o)+\'F\',S:(D[i][1]*o)+\'F\'},Y,K)}I{m.V(k.2f[i],{6R:\'6p(\'+k.3b.1K+\') \'+(D[i][0]*o)+\'F \'+(D[i][1]*o)+\'F\'})}q(1J.3o&&(i==3||i==5))m.1a(\'Y\',G,1p,k.2f[i],K);m.V(k.2f[i],1p)}}k.3b=G;q(m.44[k.1C])m.44[k.1C].5h();m.44[k.1C]=k;q(k.4b)k.4b()},3S:A(D,1j,9c,29,2t){u z=k.z,4z=z.N.E,1j=1j||0,D=D||{x:z.x.D+1j,y:z.y.D+1j,w:z.x.J(\'1B\')-2*1j,h:z.y.J(\'1B\')-2*1j};q(9c)k.1U.E.1c=(D.h>=4*k.1j)?\'1I\':\'1q\';m.V(k.1U,{T:(D.x-k.1j)+\'F\',S:(D.y-k.1j)+\'F\',L:(D.w+2*k.1j)+\'F\'});D.w-=2*k.1j;D.h-=2*k.1j;m.V(k.2f[4],{L:D.w>=0?D.w+\'F\':0,W:D.h>=0?D.h+\'F\':0});q(k.6F)k.2f[3].E.W=k.2f[5].E.W=k.2f[4].E.W},5h:A(94){q(94)k.1U.E.1c=\'1q\';I m.3Q(k.1U)}};m.5X=A(z,1p){k.z=z;k.1p=1p;k.3d=1p==\'x\'?\'ab\':\'aj\';k.3H=k.3d.5V();k.4S=1p==\'x\'?\'ai\':\'ac\';k.5Y=k.4S.5V();k.6y=1p==\'x\'?\'a8\':\'a9\';k.8V=k.6y.5V();k.14=k.2T=0};m.5X.5g={J:A(O){93(O){1L\'6Q\':C k.1R+k.3l+(k.t-m.1Z[\'1j\'+k.3d])/2;1L\'6L\':C k.D+k.cb+k.14+(k.H-m.1Z[\'1j\'+k.3d])/2;1L\'1B\':C k.H+2*k.cb+k.14+k.2T;1L\'4p\':C k.3U-k.2S-k.3Y;1L\'7O\':C k.J(\'4p\')-2*k.cb-k.14-k.2T;1L\'4K\':C k.D-(k.z.X?k.z.X.1j:0);1L\'8a\':C k.J(\'1B\')+(k.z.X?2*k.z.X.1j:0);1L\'1O\':C k.1D?1e.4s((k.H-k.1D)/2):0}},7Q:A(){k.cb=(k.z.18[\'1j\'+k.3d]-k.t)/2;k.3Y=m[\'7b\'+k.6y]},83:A(){k.t=k.z.B[k.3H]?2U(k.z.B[k.3H]):k.z.B[\'1j\'+k.3d];k.1R=k.z.1R[k.1p];k.3l=(k.z.B[\'1j\'+k.3d]-k.t)/2;q(k.1R<1){k.1R=(m.3I[k.3H]/2)+m.3I[\'1M\'+k.4S]}},6J:A(){u z=k.z;k.2x=\'2I\';q(z.6z==\'3P\')k.2x=\'3P\';I q(2d 5P(k.5Y).1b(z.3y))k.2x=G;I q(2d 5P(k.8V).1b(z.3y))k.2x=\'2P\';k.D=k.1R-k.cb+k.3l;k.H=1e.3G(k.1d,z[\'2P\'+k.3d]||k.1d);k.2o=z.5c?1e.3G(z[\'3G\'+k.3d],k.1d):k.1d;q(z.3t&&z.36){k.H=z[k.3H];k.1D=k.1d}q(k.1p==\'x\'&&m.4U)k.2o=z.4E;k.2h=z[\'2h\'+k.1p.8U()];k.2S=m[\'7b\'+k.4S];k.1M=m.3I[\'1M\'+k.4S];k.3U=m.3I[k.3H]},7E:A(i){u z=k.z;q(z.3t&&(z.36||m.4U)){k.1D=i;k.H=1e.2P(k.H,k.1D);z.18.E[k.5Y]=k.J(\'1O\')+\'F\'}I k.H=i;z.18.E[k.3H]=i+\'F\';z.N.E[k.3H]=k.J(\'1B\')+\'F\';q(z.X)z.X.3S();q(k.1p==\'x\'&&z.1l)z.4h(K);q(k.1p==\'x\'&&z.1f&&z.3t){q(i==k.1d)z.1f.4y(\'1d-2C\');I z.1f.3T(\'1d-2C\')}},7D:A(i){k.D=i;k.z.N.E[k.5Y]=i+\'F\';q(k.z.X)k.z.X.3S()}};m.51=A(a,2R,3v,35){q(19.bM&&m.1A&&!m.79){m.21(19,\'4d\',A(){2d m.51(a,2R,3v,35)});C}k.a=a;k.3v=3v;k.35=35||\'2B\';k.3t=!k.bL;m.6X=1g;k.1r=[];k.11=m.11;m.11=G;m.6U();u O=k.O=m.U.R;M(u i=0;ip.1M+p.3U-p.3Y)p.D=p.1M+p.3U-p.H-p.2S-p.3Y-p.14-p.2T;q(p.D(k.x.1D||k.x.H)){k.aG();q(k.1r.R==1)k.4h()}}k.av()}2i(e){k.7c(e)}},2x:A(p,4A){u 3L,2q=p.2h,1p=p==k.x?\'x\':\'y\';q(2q&&2q.26(/ /)){3L=2q.cn(\' \');2q=3L[0]}q(2q&&m.$(2q)){p.D=m.5K(m.$(2q))[1p];q(3L&&3L[1]&&3L[1].26(/^[-]?[0-9]+F$/))p.D+=2U(3L[1]);q(p.Hp.1M+p.3U-p.3Y){q(!4A&&7J&&4q){p.H=p.J(1p==\'y\'?\'4p\':\'7O\')}I q(p.J(\'1B\')2v){ 2H=3x*2v;q(2Hk.4M&&x.H>k.4E&&y.J(\'1B\')>y.J(\'4p\')){y.H-=10;q(2v)x.H=y.H*2v;k.4h(0,1)}}},av:A(){u x=k.x,y=k.y;k.5j(\'1q\');q(k.1f&&k.1f.2r)k.1f.2r.4n();k.7q(1,{N:{L:x.J(\'1B\'),W:y.J(\'1B\'),T:x.D,S:y.D},18:{T:x.14+x.J(\'1O\'),S:y.14+y.J(\'1O\'),L:x.1D||x.H,W:y.1D||y.H}},m.6P)},7q:A(1w,1N,29){u 4O=k.2Y,6K=1w?(k.11?k.11.a:G):m.1S,t=(4O[1]&&6K&&m.4X(6K,\'2Y\')[1]==4O[1])?4O[1]:4O[0];q(k[t]&&t!=\'2C\'){k[t](1w,1N);C}q(k.X&&!k.3w){q(1w)k.X.3S();I k.X.5h()}q(!1w)k.6G();u z=k,x=z.x,y=z.y,2t=k.2t;q(!1w)2t=k.at||2t;u aa=1w?A(){q(z.X)z.X.1U.E.1c="1I";4i(A(){z.5D()},50)}:A(){z.5f()};q(1w)m.V(k.N,{L:x.t+\'F\',W:y.t+\'F\'});q(k.ak){m.V(k.N,{1k:1w?0:1});m.3e(1N.N,{1k:1w})}m.1H(k.N,1N.N,{3F:29,2t:2t,3k:A(3n,2Z){q(z.X&&z.3w&&2Z.1n==\'S\'){u 4W=1w?2Z.D:1-2Z.D;u D={w:x.t+(x.J(\'1B\')-x.t)*4W,h:y.t+(y.J(\'1B\')-y.t)*4W,x:x.1R+(x.D-x.1R)*4W,y:y.1R+(y.D-y.1R)*4W};z.X.3S(D,0,1)}}});m.1H(k.18,1N.18,29,2t,aa);q(1w){k.N.E.1c=\'1I\';k.18.E.1c=\'1I\';k.a.Z+=\' P-3Z-3y\'}},5l:A(1w,1N){k.3w=1g;u z=k,t=1w?m.6P:0;q(1w){m.1H(k.N,1N.N,0);m.V(k.N,{1k:0,1c:\'1I\'});m.1H(k.18,1N.18,0);k.18.E.1c=\'1I\';m.1H(k.N,{1k:1},t,G,A(){z.5D()})}q(k.X){k.X.1U.E.1z=k.N.E.1z;u 5M=1w||-1,1j=k.X.1j,6D=1w?3:1j,6w=1w?1j:3;M(u i=6D;5M*i<=5M*6w;i+=5M,t+=25){(A(){u o=1w?6w-i:6D-i;4i(A(){z.X.3S(0,o,1)},t)})()}}q(1w){}I{4i(A(){q(z.X)z.X.5h(z.ct);z.6G();m.1H(z.N,{1k:0},m.8f,G,A(){z.5f()})},t)}},3O:A(1w,1N){q(!1w)C;u z=k,29=m.a7,11=z.11,x=z.x,y=z.y,1X=11.x,1T=11.y,1l=z.1l,N=k.N,18=k.18;m.4o(19,\'6c\',m.5L);k.X=11.X;q(k.X)k.X.z=z;11.X=G;11.N.E.2J=\'1q\';m.V(N,{T:1X.D+\'F\',S:1T.D+\'F\',L:1X.J(\'1B\')+\'F\',W:1T.J(\'1B\')+\'F\'});m.V(18,{1o:\'1s\',L:(x.1D||x.H)+\'F\',W:(y.1D||y.H)+\'F\',T:(x.14+x.J(\'1O\'))+\'F\',S:(y.14+y.J(\'1O\'))+\'F\'});u 3K=m.1a(\'Y\',{Z:\'P-2B\'},{1m:\'2l\',1z:4,2J:\'1q\',1o:\'1s\',T:(1X.14+1X.J(\'1O\'))+\'F\',S:(1T.14+1T.J(\'1O\'))+\'F\',L:(1X.1D||1X.H)+\'F\',W:(1T.1D||1T.H)+\'F\'});M(u i=0;i\'+s+\'\'+k[k.4N].2O}}},az:A(){q(!k.11){M(u i=0;ik.x.J(\'4K\')+k.x.J(\'8a\'));u 9o=(3m.y+3m.hk.y.J(\'4K\')+k.y.J(\'8a\'))}u 5I=m.8b(1h[i]);q(!9p&&!9o&&5I!=k.O){q(!2z){1h[i].4L(\'1q-by\',\'[\'+k.O+\']\');1h[i].7T=1h[i].E[1n];1h[i].E[1n]=\'1q\'}I q(2z.9G(\'[\'+k.O+\']\')==-1){1h[i].4L(\'1q-by\',2z+\'[\'+k.O+\']\')}}I q((2z==\'[\'+k.O+\']\'||m.3r==5I)&&5I!=k.O){1h[i].4L(\'1q-by\',\'\');1h[i].E[1n]=1h[i].7T||\'\'}I q(2z&&2z.9G(\'[\'+k.O+\']\')>-1){1h[i].4L(\'1q-by\',2z.2e(\'[\'+k.O+\']\',\'\'))}}}}},4a:A(){k.N.E.1z=m.4r+=2;M(u i=0;iQ.1Q.1V)Q.E.L=\'2m%\'}I q(Q.1Q!=k.1l)k.1l.2F(Q);q(/T$/.1b(p))Q.E.T=6q+\'F\';q(/3P$/.1b(p))m.V(Q,{T:\'50%\',5k:(6q-1e.4s(Q.1V/2))+\'F\'});q(/2M$/.1b(p))Q.E.2M=-6q+\'F\';q(/^9M$/.1b(p)){m.V(Q,{2M:\'2m%\',9I:k.x.cb+\'F\',S:-k.y.cb+\'F\',4c:-k.y.cb+\'F\',2J:\'2I\'});k.x.14=Q.1V}I q(/^9H$/.1b(p)){m.V(Q,{T:\'2m%\',5k:k.x.cb+\'F\',S:-k.y.cb+\'F\',4c:-k.y.cb+\'F\',2J:\'2I\'});k.x.2T=Q.1V}u 7w=Q.1Q.31;Q.E.W=\'2I\';q(4u&&Q.31>7w)Q.E.W=m.5e?7w+\'F\':\'2m%\';q(/^S/.1b(p))Q.E.S=6n+\'F\';q(/^7M/.1b(p))m.V(Q,{S:\'50%\',7L:(6n-1e.4s(Q.31/2))+\'F\'});q(/^4c/.1b(p))Q.E.4c=-6n+\'F\';q(/^4I$/.1b(p)){m.V(Q,{T:(-k.x.14-k.x.cb)+\'F\',2M:(-k.x.2T-k.x.cb)+\'F\',4c:\'2m%\',9J:k.y.cb+\'F\',L:\'2I\'});k.y.14=Q.31}I q(/^63$/.1b(p)){m.V(Q,{1m:\'7H\',T:(-k.x.14-k.x.cb)+\'F\',2M:(-k.x.2T-k.x.cb)+\'F\',S:\'2m%\',7L:k.y.cb+\'F\',L:\'2I\'});k.y.2T=Q.31;Q.E.1m=\'2l\'}},9S:A(){k.9T([\'6a\',\'ci\'],K);k.a4();q(k.6a&&k.7N)k.6a.Z+=\' P-3c\';q(m.a0)k.9U();M(u i=0;i0)2u=0;q(2u<69)2u=69}I{M(u j=0;j0?as[i-1].1Q[3N]:3A[3N],7X=3A[3N]+3A[1V]+(as[i+1]?as[i+1].1Q[1V]:0);q(7X>6o-4Y)2u=6o-7X;I q(8d<-4Y)2u=-8d}u 89=3A[3N]+(3A[1V]-6t[1V])/2+2u;m.1H(1U,3j?{T:2u}:{S:2u},G,\'7t\');m.1H(6t,3j?{T:89}:{S:89},G,\'7t\');6Y.E.1o=2u<0?\'43\':\'1s\';7k.E.1o=(2u>69)?\'43\':\'1s\'};u 4R=m.42.2K[m.U[1f.3J].2w||\'1s\'],1i=1f.2r,4T=1i.4T||\'an\',71=(4T==\'cq\'),3D=71?[\'Y\',\'7P\',\'1W\',\'22\']:[\'1U\',\'47\',\'3B\',\'2f\'],3j=(4T==\'an\'),41=m.1a(\'Y\',{Z:\'P-2r P-2r-\'+4T,2O:\'\'+\'<\'+3D[0]+\'><\'+3D[1]+\'>\'+\'\'+\'\'+\'\'},{1o:\'1s\'},m.2a),4Q=41.67,Y=4Q[0],6Y=4Q[1],7k=4Q[2],6t=4Q[3],1U=Y.c7,47=41.2N(3D[1])[0],3B;M(u i=0;i<4R.R;i++){q(i==0||!3j)3B=m.1a(3D[2],G,G,47);(A(){u a=4R[i],3A=m.1a(3D[3],G,G,3B),c6=i;m.1a(\'a\',{23:a.23,2E:A(){m.2s(k).4a();C m.6S(a)},2O:m.9f?m.9f(a):a.2O},G,3A)})()}q(!71){6Y.2E=A(){1M(-1)};7k.2E=A(){1M(1)};m.21(47,19.bN!==1G?\'bI\':\'bU\',A(e){u 3g=0;e=e||1J.2b;q(e.8W){3g=e.8W/cw;q(m.3o)3g=-3g}I q(e.8u){3g=-e.8u/3}q(3g)1M(-3g*0.2);q(e.4B)e.4B();e.8v=1g})}C{62:62,4n:4n}};q(m.1A){(A(){2g{19.4w.cU(\'T\')}2i(e){4i(8w.cS,50);C}m.4d()})()}m.21(19,\'cW\',m.4d);m.21(1J,\'7W\',m.4d);m.68=m.17;u cX=m.51;m.21(1J,\'7W\',A(){q(m.6A){u 7d=\'.P 1y\',86=\'45: 6p(\'+m.4v+m.6A+\'), 6r !cD;\';u E=m.1a(\'E\',{16:\'cB/6C\'},G,19.2N(\'cA\')[0]);q(!m.1A){E.2F(19.cO(7d+" {"+86+"}"))}I{u 11=19.al[19.al.R-1];q(1x(11.9K)=="6d")11.9K(7d,86)}}});m.21(1J,\'3u\',A(){m.57();q(m.2G)M(u i=0;iHighslide JS', + creditsTitle : 'Go to the Highslide JS homepage', + previousText : 'Previous', + nextText : 'Next', + moveText : 'Move', + closeText : 'Close', + closeTitle : 'Close (esc)', + resizeTitle : 'Resize', + playText : 'Play', + playTitle : 'Play slideshow (spacebar)', + pauseText : 'Pause', + pauseTitle : 'Pause slideshow (spacebar)', + previousTitle : 'Previous (arrow left)', + nextTitle : 'Next (arrow right)', + moveTitle : 'Move', + fullExpandText : '1:1', + restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.' +}, +// See http://highslide.com/ref for examples of settings +graphicsDir : 'highslide/graphics/', +expandCursor : 'zoomin.cur', // null disables +restoreCursor : 'zoomout.cur', // null disables +expandDuration : 250, // milliseconds +restoreDuration : 250, +marginLeft : 15, +marginRight : 15, +marginTop : 15, +marginBottom : 15, +zIndexCounter : 1001, // adjust to other absolutely positioned elements +loadingOpacity : 0.75, +allowMultipleInstances: true, +numberOfImagesToPreload : 5, +outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only +outlineStartOffset : 3, // ends at 10 +padToMinWidth : false, // pad the popup width to make room for wide caption +fullExpandPosition : 'bottom right', +fullExpandOpacity : 1, +showCredits : true, // you can set this to false if you want +creditsHref : 'http://highslide.com/', +creditsTarget : '_self', +enableKeyListener : true, +openerTagNames : ['a'], // Add more to allow slideshow indexing + +allowWidthReduction : false, +allowHeightReduction : true, +preserveContent : true, // Preserve changes made to the content and position of HTML popups. +objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion. +cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup. +dragByHeading: true, +minWidth: 200, +minHeight: 200, +allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight +outlineType : 'drop-shadow', // set null to disable outlines +skin : { + contentWrapper: + '
'+ + '
'+ + '' +}, +// END OF YOUR SETTINGS + + +// declare internal properties +preloadTheseImages : [], +continuePreloading: true, +expanders : [], +overrides : [ + 'allowSizeReduction', + 'useBox', + 'outlineType', + 'outlineWhileAnimating', + 'captionId', + 'captionText', + 'captionEval', + 'captionOverlay', + 'headingId', + 'headingText', + 'headingEval', + 'headingOverlay', + 'creditsPosition', + 'dragByHeading', + + 'width', + 'height', + + 'contentId', + 'allowWidthReduction', + 'allowHeightReduction', + 'preserveContent', + 'maincontentId', + 'maincontentText', + 'maincontentEval', + 'objectType', + 'cacheAjax', + 'objectWidth', + 'objectHeight', + 'objectLoadTime', + 'swfOptions', + 'wrapperClassName', + 'minWidth', + 'minHeight', + 'maxWidth', + 'maxHeight', + 'slideshowGroup', + 'easing', + 'easingClose', + 'fadeInOut', + 'src' +], +overlays : [], +idCounter : 0, +oPos : { + x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], + y: ['above', 'top', 'middle', 'bottom', 'below'] +}, +mouse: {}, +headingOverlay: {}, +captionOverlay: {}, +swfOptions: { flashvars: {}, params: {}, attributes: {} }, +timers : [], + +pendingOutlines : {}, +sleeping : [], +preloadTheseAjax : [], +cacheBindings : [], +cachedGets : {}, +clones : {}, +onReady: [], +uaVersion: parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +safari : /Safari/.test(navigator.userAgent), +geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), + +$ : function (id) { + if (id) return document.getElementById(id); +}, + +push : function (arr, val) { + arr[arr.length] = val; +}, + +createElement : function (tag, attribs, styles, parent, nopad) { + var el = document.createElement(tag); + if (attribs) hs.extend(el, attribs); + if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); + if (styles) hs.setStyles(el, styles); + if (parent) parent.appendChild(el); + return el; +}, + +extend : function (el, attribs) { + for (var x in attribs) el[x] = attribs[x]; + return el; +}, + +setStyles : function (el, styles) { + for (var x in styles) { + if (hs.ie && x == 'opacity') { + if (styles[x] > 0.99) el.style.removeAttribute('filter'); + else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; + } + else el.style[x] = styles[x]; + } +}, +animate: function(el, prop, opt) { + var start, + end, + unit; + if (typeof opt != 'object' || opt === null) { + var args = arguments; + opt = { + duration: args[2], + easing: args[3], + complete: args[4] + }; + } + if (typeof opt.duration != 'number') opt.duration = 250; + opt.easing = Math[opt.easing] || Math.easeInQuad; + opt.curAnim = hs.extend({}, prop); + for (var name in prop) { + var e = new hs.fx(el, opt , name ); + + start = parseFloat(hs.css(el, name)) || 0; + end = parseFloat(prop[name]); + unit = name != 'opacity' ? 'px' : ''; + + e.custom( start, end, unit ); + } +}, +css: function(el, prop) { + if (document.defaultView) { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop); + + } else { + if (prop == 'opacity') prop = 'filter'; + var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })]; + if (prop == 'filter') + val = val.replace(/alpha\(opacity=([0-9]+)\)/, + function (a, b) { return b / 100 }); + return val === '' ? 1 : val; + } +}, + +getPageSize : function () { + var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' + ? d.documentElement : d.body; + + var width = hs.ie ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = hs.ie ? iebody.clientHeight : self.innerHeight; + + hs.page = { + width: width, + height: height, + scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, + scrollTop: hs.ie ? iebody.scrollTop : pageYOffset + } +}, + +getPosition : function(el) { + var p = { x: el.offsetLeft, y: el.offsetTop }; + while (el.offsetParent) { + el = el.offsetParent; + p.x += el.offsetLeft; + p.y += el.offsetTop; + if (el != document.body && el != document.documentElement) { + p.x -= el.scrollLeft; + p.y -= el.scrollTop; + } + } + return p; +}, + +expand : function(a, params, custom, type) { + if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); + if (typeof a.getParams == 'function') return params; + if (type == 'html') { + for (var i = 0; i < hs.sleeping.length; i++) { + if (hs.sleeping[i] && hs.sleeping[i].a == a) { + hs.sleeping[i].awake(); + hs.sleeping[i] = null; + return false; + } + } + hs.hasHtmlExpanders = true; + } + try { + new hs.Expander(a, params, custom, type); + return false; + } catch (e) { return true; } +}, + +htmlExpand : function(a, params, custom) { + return hs.expand(a, params, custom, 'html'); +}, + +getSelfRendered : function() { + return hs.createElement('div', { + className: 'highslide-html-content', + innerHTML: hs.replaceLang(hs.skin.contentWrapper) + }); +}, +getElementByClass : function (el, tagName, className) { + var els = el.getElementsByTagName(tagName); + for (var i = 0; i < els.length; i++) { + if ((new RegExp(className)).test(els[i].className)) { + return els[i]; + } + } + return null; +}, +replaceLang : function(s) { + s = s.replace(/\s/g, ' '); + var re = /{hs\.lang\.([^}]+)\}/g, + matches = s.match(re), + lang; + if (matches) for (var i = 0; i < matches.length; i++) { + lang = matches[i].replace(re, "$1"); + if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]); + } + return s; +}, + + +getCacheBinding : function (a) { + for (var i = 0; i < hs.cacheBindings.length; i++) { + if (hs.cacheBindings[i][0] == a) { + var c = hs.cacheBindings[i][1]; + hs.cacheBindings[i][1] = c.cloneNode(1); + return c; + } + } + return null; +}, + +preloadAjax : function (e) { + var arr = hs.getAnchors(); + for (var i = 0; i < arr.htmls.length; i++) { + var a = arr.htmls[i]; + if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax')) + hs.push(hs.preloadTheseAjax, a); + } + + hs.preloadAjaxElement(0); +}, + +preloadAjaxElement : function (i) { + if (!hs.preloadTheseAjax[i]) return; + var a = hs.preloadTheseAjax[i]; + var cache = hs.getNode(hs.getParam(a, 'contentId')); + if (!cache) cache = hs.getSelfRendered(); + var ajax = new hs.Ajax(a, cache, 1); + ajax.onError = function () { }; + ajax.onLoad = function () { + hs.push(hs.cacheBindings, [a, cache]); + hs.preloadAjaxElement(i + 1); + }; + ajax.run(); +}, + +focusTopmost : function() { + var topZ = 0, + topmostKey = -1, + expanders = hs.expanders, + exp, + zIndex; + for (var i = 0; i < expanders.length; i++) { + exp = expanders[i]; + if (exp) { + zIndex = exp.wrapper.style.zIndex; + if (zIndex && zIndex > topZ) { + topZ = zIndex; + topmostKey = i; + } + } + } + if (topmostKey == -1) hs.focusKey = -1; + else expanders[topmostKey].focus(); +}, + +getParam : function (a, param) { + a.getParams = a.onclick; + var p = a.getParams ? a.getParams() : null; + a.getParams = null; + + return (p && typeof p[param] != 'undefined') ? p[param] : + (typeof hs[param] != 'undefined' ? hs[param] : null); +}, + +getSrc : function (a) { + var src = hs.getParam(a, 'src'); + if (src) return src; + return a.href; +}, + +getNode : function (id) { + var node = hs.$(id), clone = hs.clones[id], a = {}; + if (!node && !clone) return null; + if (!clone) { + clone = node.cloneNode(true); + clone.id = ''; + hs.clones[id] = clone; + return node; + } else { + return clone.cloneNode(true); + } +}, + +discardElement : function(d) { + if (d) hs.garbageBin.appendChild(d); + hs.garbageBin.innerHTML = ''; +}, +transit : function (adj, exp) { + var last = exp = exp || hs.getExpander(); + if (hs.upcoming) return false; + else hs.last = last; + try { + hs.upcoming = adj; + adj.onclick(); + } catch (e){ + hs.last = hs.upcoming = null; + } + try { + exp.close(); + } catch (e) {} + return false; +}, + +previousOrNext : function (el, op) { + var exp = hs.getExpander(el); + if (exp) { + adj = exp.getAdjacentAnchor(op); + return hs.transit(adj, exp); + } else return false; +}, + +previous : function (el) { + return hs.previousOrNext(el, -1); +}, + +next : function (el) { + return hs.previousOrNext(el, 1); +}, + +keyHandler : function(e) { + if (!e) e = window.event; + if (!e.target) e.target = e.srcElement; // ie + if (typeof e.target.form != 'undefined') return true; // form element has focus + var exp = hs.getExpander(); + + var op = null; + switch (e.keyCode) { + case 70: // f + if (exp) exp.doFullExpand(); + return true; + case 32: // Space + case 34: // Page Down + case 39: // Arrow right + case 40: // Arrow down + op = 1; + break; + case 8: // Backspace + case 33: // Page Up + case 37: // Arrow left + case 38: // Arrow up + op = -1; + break; + case 27: // Escape + case 13: // Enter + op = 0; + } + if (op !== null) {hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + if (!hs.enableKeyListener) return true; + + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + if (exp) { + if (op == 0) { + exp.close(); + } else { + hs.previousOrNext(exp.key, op); + } + return false; + } + } + return true; +}, + + +registerOverlay : function (overlay) { + hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } )); +}, + + +getWrapperKey : function (element, expOnly) { + var el, re = /^highslide-wrapper-([0-9]+)$/; + // 1. look in open expanders + el = element; + while (el.parentNode) { + if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); + el = el.parentNode; + } + // 2. look in thumbnail + if (!expOnly) { + el = element; + while (el.parentNode) { + if (el.tagName && hs.isHsAnchor(el)) { + for (var key = 0; key < hs.expanders.length; key++) { + var exp = hs.expanders[key]; + if (exp && exp.a == el) return key; + } + } + el = el.parentNode; + } + } + return null; +}, + +getExpander : function (el, expOnly) { + if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; + if (typeof el == 'number') return hs.expanders[el] || null; + if (typeof el == 'string') el = hs.$(el); + return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; +}, + +isHsAnchor : function (a) { + return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); +}, + +reOrder : function () { + for (var i = 0; i < hs.expanders.length; i++) + if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); +}, + +mouseClickHandler : function(e) +{ + if (!e) e = window.event; + if (e.button > 1) return true; + if (!e.target) e.target = e.srcElement; + + var el = e.target; + while (el.parentNode + && !(/highslide-(image|move|html|resize)/.test(el.className))) + { + el = el.parentNode; + } + var exp = hs.getExpander(el); + if (exp && (exp.isClosing || !exp.isExpanded)) return true; + + if (exp && e.type == 'mousedown') { + if (e.target.form) return true; + var match = el.className.match(/highslide-(image|move|resize)/); + if (match) { + hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos, + height: exp.y.size, clickX: e.clientX, clickY: e.clientY }; + + + hs.addEventListener(document, 'mousemove', hs.dragHandler); + if (e.preventDefault) e.preventDefault(); // FF + + if (/highslide-(image|html)-blur/.test(exp.content.className)) { + exp.focus(); + hs.hasFocused = true; + } + return false; + } + else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) { + exp.focus(); + exp.doShowHide('hidden'); + } + } else if (e.type == 'mouseup') { + + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + if (hs.dragArgs) { + if (hs.styleRestoreCursor && hs.dragArgs.type == 'image') + hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; + var hasDragged = hs.dragArgs.hasDragged; + + if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { + exp.close(); + } + else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { + hs.dragArgs.exp.doShowHide('hidden'); + } + + if (hs.dragArgs.exp.releaseMask) + hs.dragArgs.exp.releaseMask.style.display = 'none'; + + hs.hasFocused = false; + hs.dragArgs = null; + + } else if (/highslide-image-blur/.test(el.className)) { + el.style.cursor = hs.styleRestoreCursor; + } + } + return false; +}, + +dragHandler : function(e) +{ + if (!hs.dragArgs) return true; + if (!e) e = window.event; + var a = hs.dragArgs, exp = a.exp; + if (exp.iframe) { + if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null, + { position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px', + left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'), + opacity: .01 }, + exp.wrapper, true); + if (exp.releaseMask.style.display == 'none') + exp.releaseMask.style.display = ''; + } + + a.dX = e.clientX - a.clickX; + a.dY = e.clientY - a.clickY; + + var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); + if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) + || (distance > (hs.dragSensitivity || 5)); + + if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { + + if (a.type == 'resize') exp.resize(a); + else { + exp.moveTo(a.left + a.dX, a.top + a.dY); + if (a.type == 'image') exp.content.style.cursor = 'move'; + } + } + return false; +}, + +wrapperMouseHandler : function (e) { + try { + if (!e) e = window.event; + var over = /mouseover/i.test(e.type); + if (!e.target) e.target = e.srcElement; // ie + if (hs.ie) e.relatedTarget = + over ? e.fromElement : e.toElement; // ie + var exp = hs.getExpander(e.target); + if (!exp.isExpanded) return; + if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp + || hs.dragArgs) return; + for (var i = 0; i < exp.overlays.length; i++) (function() { + var o = hs.$('hsId'+ exp.overlays[i]); + if (o && o.hideOnMouseOut) { + if (over) hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur); + } + })(); + } catch (e) {} +}, +addEventListener : function (el, event, func) { + if (el == document && event == 'ready') hs.push(hs.onReady, func); + try { + el.addEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + el.attachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = func; + } + } +}, + +removeEventListener : function (el, event, func) { + try { + el.removeEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = null; + } + } +}, + +preloadFullImage : function (i) { + if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { + var img = document.createElement('img'); + img.onload = function() { + img = null; + hs.preloadFullImage(i + 1); + }; + img.src = hs.preloadTheseImages[i]; + } +}, +preloadImages : function (number) { + if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; + + var arr = hs.getAnchors(); + for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { + hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); + } + + // preload outlines + if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); + else + + hs.preloadFullImage(0); + + // preload cursor + if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); +}, + + +init : function () { + if (!hs.container) { + + hs.getPageSize(); + hs.ieLt7 = hs.ie && hs.uaVersion < 7; + hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:'; + for (var x in hs.langDefaults) { + if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; + else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') + hs.lang[x] = hs.langDefaults[x]; + } + + hs.container = hs.createElement('div', { + className: 'highslide-container' + }, { + position: 'absolute', + left: 0, + top: 0, + width: '100%', + zIndex: hs.zIndexCounter, + direction: 'ltr' + }, + document.body, + true + ); + hs.loading = hs.createElement('a', { + className: 'highslide-loading', + title: hs.lang.loadingTitle, + innerHTML: hs.lang.loadingText, + href: 'javascript:;' + }, { + position: 'absolute', + top: '-9999px', + opacity: hs.loadingOpacity, + zIndex: 1 + }, hs.container + ); + hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); + hs.clearing = hs.createElement('div', null, + { clear: 'both', paddingTop: '1px' }, null, true); + + // http://www.robertpenner.com/easing/ + Math.linearTween = function (t, b, c, d) { + return c*t/d + b; + }; + Math.easeInQuad = function (t, b, c, d) { + return c*(t/=d)*t + b; + }; + + hs.hideSelects = hs.ieLt7; + hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' + || (hs.ie && hs.uaVersion < 5.5)); + } +}, +ready : function() { + if (hs.isReady) return; + hs.isReady = true; + + for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i](); +}, + +updateAnchors : function() { + var el, els, all = [], images = [], htmls = [],groups = {}, re; + + for (var i = 0; i < hs.openerTagNames.length; i++) { + els = document.getElementsByTagName(hs.openerTagNames[i]); + for (var j = 0; j < els.length; j++) { + el = els[j]; + re = hs.isHsAnchor(el); + if (re) { + hs.push(all, el); + if (re[0] == 'hs.expand') hs.push(images, el); + else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el); + var g = hs.getParam(el, 'slideshowGroup') || 'none'; + if (!groups[g]) groups[g] = []; + hs.push(groups[g], el); + } + } + } + hs.anchors = { all: all, groups: groups, images: images, htmls: htmls }; + return hs.anchors; + +}, + +getAnchors : function() { + return hs.anchors || hs.updateAnchors(); +}, + + +close : function(el) { + var exp = hs.getExpander(el); + if (exp) exp.close(); + return false; +} +}; // end hs object +hs.fx = function( elem, options, prop ){ + this.options = options; + this.elem = elem; + this.prop = prop; + + if (!options.orig) options.orig = {}; +}; +hs.fx.prototype = { + update: function(){ + (hs.fx.step[this.prop] || hs.fx.step._default)(this); + + if (this.options.step) + this.options.step.call(this.elem, this.now, this); + + }, + custom: function(from, to, unit){ + this.startTime = (new Date()).getTime(); + this.start = from; + this.end = to; + this.unit = unit;// || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + + var self = this; + function t(gotoEnd){ + return self.step(gotoEnd); + } + + t.elem = this.elem; + + if ( t() && hs.timers.push(t) == 1 ) { + hs.timerId = setInterval(function(){ + var timers = hs.timers; + + for ( var i = 0; i < timers.length; i++ ) + if ( !timers[i]() ) + timers.splice(i--, 1); + + if ( !timers.length ) { + clearInterval(hs.timerId); + } + }, 13); + } + }, + step: function(gotoEnd){ + var t = (new Date()).getTime(); + if ( gotoEnd || t >= this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + var done = true; + for ( var i in this.options.curAnim ) + if ( this.options.curAnim[i] !== true ) + done = false; + + if ( done ) { + if (this.options.complete) this.options.complete.call(this.elem); + } + return false; + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + this.pos = this.options.easing(n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + this.update(); + } + return true; + } + +}; + +hs.extend( hs.fx, { + step: { + + opacity: function(fx){ + hs.setStyles(fx.elem, { opacity: fx.now }); + }, + + _default: function(fx){ + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + else + fx.elem[ fx.prop ] = fx.now; + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; + if (!outlineType) { + if (onLoad) onLoad(); + return; + } + + hs.init(); + this.table = hs.createElement( + 'table', { + cellSpacing: 0 + }, { + visibility: 'hidden', + position: 'absolute', + borderCollapse: 'collapse', + width: 0 + }, + hs.container, + true + ); + var tbody = hs.createElement('tbody', null, null, this.table, 1); + + this.td = []; + for (var i = 0; i <= 8; i++) { + if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); + this.td[i] = hs.createElement('td', null, null, tr, true); + var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; + hs.setStyles(this.td[i], style); + } + this.td[4].className = outlineType +' highslide-outline'; + + this.preloadGraphic(); +}; + +hs.Outline.prototype = { +preloadGraphic : function () { + var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; + + var appendTo = hs.safari ? hs.container : null; + this.graphic = hs.createElement('img', null, { position: 'absolute', + top: '-9999px' }, appendTo, true); // for onload trigger + + var pThis = this; + this.graphic.onload = function() { pThis.onGraphicLoad(); }; + + this.graphic.src = src; +}, + +onGraphicLoad : function () { + var o = this.offset = this.graphic.width / 4, + pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], + dim = { height: (2*o) +'px', width: (2*o) +'px' }; + for (var i = 0; i <= 8; i++) { + if (pos[i]) { + if (this.hasAlphaImageLoader) { + var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; + var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); + hs.createElement ('div', null, { + filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", + position: 'absolute', + width: w, + height: this.graphic.height +'px', + left: (pos[i][0]*o)+'px', + top: (pos[i][1]*o)+'px' + }, + div, + true); + } else { + hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); + } + + if (window.opera && (i == 3 || i ==5)) + hs.createElement('div', null, dim, this.td[i], true); + + hs.setStyles (this.td[i], dim); + } + } + this.graphic = null; + if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); + hs.pendingOutlines[this.outlineType] = this; + if (this.onLoad) this.onLoad(); +}, + +setPosition : function (pos, offset, vis, dur, easing) { + var exp = this.exp, + stl = exp.wrapper.style, + offset = offset || 0, + pos = pos || { + x: exp.x.pos + offset, + y: exp.y.pos + offset, + w: exp.x.get('wsize') - 2 * offset, + h: exp.y.get('wsize') - 2 * offset + }; + if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) + ? 'visible' : 'hidden'; + hs.setStyles(this.table, { + left: (pos.x - this.offset) +'px', + top: (pos.y - this.offset) +'px', + width: (pos.w + 2 * this.offset) +'px' + }); + + pos.w -= 2 * this.offset; + pos.h -= 2 * this.offset; + hs.setStyles (this.td[4], { + width: pos.w >= 0 ? pos.w +'px' : 0, + height: pos.h >= 0 ? pos.h +'px' : 0 + }); + if (this.hasAlphaImageLoader) this.td[3].style.height + = this.td[5].style.height = this.td[4].style.height; + +}, + +destroy : function(hide) { + if (hide) this.table.style.visibility = 'hidden'; + else hs.discardElement(this.table); +} +}; + +hs.Dimension = function(exp, dim) { + this.exp = exp; + this.dim = dim; + this.ucwh = dim == 'x' ? 'Width' : 'Height'; + this.wh = this.ucwh.toLowerCase(); + this.uclt = dim == 'x' ? 'Left' : 'Top'; + this.lt = this.uclt.toLowerCase(); + this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; + this.rb = this.ucrb.toLowerCase(); + this.p1 = this.p2 = 0; +}; +hs.Dimension.prototype = { +get : function(key) { + switch (key) { + case 'loadingPos': + return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; + case 'wsize': + return this.size + 2 * this.cb + this.p1 + this.p2; + case 'fitsize': + return this.clientSize - this.marginMin - this.marginMax; + case 'maxsize': + return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ; + case 'opos': + return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); + case 'osize': + return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); + case 'imgPad': + return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; + + } +}, +calcBorders: function() { + // correct for borders + this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; + this.marginMax = hs['margin'+ this.ucrb]; +}, +calcThumb: function() { + this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : + this.exp.el['offset'+ this.ucwh]; + this.tpos = this.exp.tpos[this.dim]; + this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; + if (this.tpos < 1) { + this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; + }; +}, +calcExpanded: function() { + var exp = this.exp; + this.justify = 'auto'; + + + // size and position + this.pos = this.tpos - this.cb + this.tb; + this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full); + this.minSize = exp.allowSizeReduction ? + Math.min(exp['min'+ this.ucwh], this.full) :this.full; + if (exp.isImage && exp.useBox) { + this.size = exp[this.wh]; + this.imgSize = this.full; + } + if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth; + this.marginMin = hs['margin'+ this.uclt]; + this.scroll = hs.page['scroll'+ this.uclt]; + this.clientSize = hs.page[this.wh]; +}, +setSize: function(i) { + var exp = this.exp; + if (exp.isImage && (exp.useBox || hs.padToMinWidth)) { + this.imgSize = i; + this.size = Math.max(this.size, this.imgSize); + exp.content.style[this.lt] = this.get('imgPad')+'px'; + } else + this.size = i; + + exp.content.style[this.wh] = i +'px'; + exp.wrapper.style[this.wh] = this.get('wsize') +'px'; + if (exp.outline) exp.outline.setPosition(); + if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px'; + if (exp.isHtml) { + var d = exp.scrollerDiv; + if (this.sizeDiff === undefined) + this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh]; + d.style[this.wh] = (this.size - this.sizeDiff) +'px'; + + if (this.dim == 'x') exp.mediumContent.style.width = 'auto'; + if (exp.body) exp.body.style[this.wh] = 'auto'; + } + if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true); +}, +setPos: function(i) { + this.pos = i; + this.exp.wrapper.style[this.lt] = i +'px'; + + if (this.exp.outline) this.exp.outline.setPosition(); + +} +}; + +hs.Expander = function(a, params, custom, contentType) { + if (document.readyState && hs.ie && !hs.isReady) { + hs.addEventListener(document, 'ready', function() { + new hs.Expander(a, params, custom, contentType); + }); + return; + } + this.a = a; + this.custom = custom; + this.contentType = contentType || 'image'; + this.isHtml = (contentType == 'html'); + this.isImage = !this.isHtml; + + hs.continuePreloading = false; + this.overlays = []; + hs.init(); + var key = this.key = hs.expanders.length; + // override inline parameters + for (var i = 0; i < hs.overrides.length; i++) { + var name = hs.overrides[i]; + this[name] = params && typeof params[name] != 'undefined' ? + params[name] : hs[name]; + } + if (!this.src) this.src = a.href; + + // get thumb + var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a; + el = this.thumb = el.getElementsByTagName('img')[0] || el; + this.thumbsUserSetId = el.id || a.id; + + // check if already open + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].a == a) { + hs.expanders[i].focus(); + return false; + } + } + + // cancel other + if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { + hs.expanders[i].cancelLoading(); + } + } + hs.expanders[key] = this; + if (!hs.allowMultipleInstances && !hs.upcoming) { + if (hs.expanders[key-1]) hs.expanders[key-1].close(); + if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) + hs.expanders[hs.focusKey].close(); + } + + // initiate metrics + this.el = el; + this.tpos = hs.getPosition(el); + hs.getPageSize(); + var x = this.x = new hs.Dimension(this, 'x'); + x.calcThumb(); + var y = this.y = new hs.Dimension(this, 'y'); + y.calcThumb(); + this.wrapper = hs.createElement( + 'div', { + id: 'highslide-wrapper-'+ this.key, + className: 'highslide-wrapper '+ this.wrapperClassName + }, { + visibility: 'hidden', + position: 'absolute', + zIndex: hs.zIndexCounter += 2 + }, null, true ); + + this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; + if (this.contentType == 'image' && this.outlineWhileAnimating == 2) + this.outlineWhileAnimating = 0; + + // get the outline + if (!this.outlineType) { + this[this.contentType +'Create'](); + + } else if (hs.pendingOutlines[this.outlineType]) { + this.connectOutline(); + this[this.contentType +'Create'](); + + } else { + this.showLoading(); + var exp = this; + new hs.Outline(this.outlineType, + function () { + exp.connectOutline(); + exp[exp.contentType +'Create'](); + } + ); + } + return true; +}; + +hs.Expander.prototype = { +error : function(e) { + //alert ('Line '+ e.lineNumber +': '+ e.message); + window.location.href = this.src; +}, + +connectOutline : function() { + var outline = this.outline = hs.pendingOutlines[this.outlineType]; + outline.exp = this; + outline.table.style.zIndex = this.wrapper.style.zIndex - 1; + hs.pendingOutlines[this.outlineType] = null; +}, + +showLoading : function() { + if (this.onLoadStarted || this.loading) return; + + this.loading = hs.loading; + var exp = this; + this.loading.onclick = function() { + exp.cancelLoading(); + }; + var exp = this, + l = this.x.get('loadingPos') +'px', + t = this.y.get('loadingPos') +'px'; + setTimeout(function () { + if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} + , 100); +}, + +imageCreate : function() { + var exp = this; + + var img = document.createElement('img'); + this.content = img; + img.onload = function () { + if (hs.expanders[exp.key]) exp.contentLoaded(); + }; + if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; + img.className = 'highslide-image'; + hs.setStyles(img, { + visibility: 'hidden', + display: 'block', + position: 'absolute', + maxWidth: '9999px', + zIndex: 3 + }); + img.title = hs.lang.restoreTitle; + if (hs.safari) hs.container.appendChild(img); + if (hs.ie && hs.flushImgSize) img.src = null; + img.src = this.src; + + this.showLoading(); +}, + +htmlCreate : function () { + + this.content = hs.getCacheBinding(this.a); + if (!this.content) + this.content = hs.getNode(this.contentId); + if (!this.content) + this.content = hs.getSelfRendered(); + this.getInline(['maincontent']); + if (this.maincontent) { + var body = hs.getElementByClass(this.content, 'div', 'highslide-body'); + if (body) body.appendChild(this.maincontent); + this.maincontent.style.display = 'block'; + } + + var innerContent = this.innerContent = this.content; + + if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent); + + // the content tree + hs.container.appendChild(this.wrapper); + hs.setStyles( this.wrapper, { + position: 'static', + padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px' + }); + this.content = hs.createElement( + 'div', { + className: 'highslide-html' + }, { + position: 'relative', + zIndex: 3, + overflow: 'hidden' + }, + this.wrapper + ); + this.mediumContent = hs.createElement('div', null, null, this.content, 1); + this.mediumContent.appendChild(innerContent); + + hs.setStyles (innerContent, { + position: 'relative', + display: 'block', + direction: hs.lang.cssDirection || '' + }); + if (this.width) innerContent.style.width = this.width +'px'; + if (this.height) hs.setStyles(innerContent, { + height: this.height +'px', + overflow: 'hidden' + }); + if (innerContent.offsetWidth < this.minWidth) + innerContent.style.width = this.minWidth +'px'; + + + + if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) { + this.showLoading(); + var ajax = new hs.Ajax(this.a, innerContent); + var exp = this; + ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); }; + ajax.onError = function () { location.href = exp.src; }; + ajax.run(); + } + else + + if (this.objectType == 'iframe' && this.objectLoadTime == 'before') { + this.writeExtendedContent(); + } + else + this.contentLoaded(); +}, + +contentLoaded : function() { + try { + if (!this.content) return; + this.content.onload = null; + if (this.onLoadStarted) return; + else this.onLoadStarted = true; + + var x = this.x, y = this.y; + + if (this.loading) { + hs.setStyles(this.loading, { top: '-9999px' }); + this.loading = null; + } + if (this.isImage) { + x.full = this.content.width; + y.full = this.content.height; + + hs.setStyles(this.content, { + width: x.t +'px', + height: y.t +'px' + }); + this.wrapper.appendChild(this.content); + hs.container.appendChild(this.wrapper); + } else if (this.htmlGetSize) this.htmlGetSize(); + + x.calcBorders(); + y.calcBorders(); + + hs.setStyles (this.wrapper, { + left: (x.tpos + x.tb - x.cb) +'px', + top: (y.tpos + x.tb - y.cb) +'px' + }); + this.getOverlays(); + + var ratio = x.full / y.full; + + x.calcExpanded(); + this.justify(x); + + y.calcExpanded(); + this.justify(y); + if (this.isHtml) this.htmlSizeOperations(); + if (this.overlayBox) this.sizeOverlayBox(0, 1); + + if (this.allowSizeReduction) { + if (this.isImage) + this.correctRatio(ratio); + else this.fitOverlayBox(); + if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) { + this.createFullExpand(); + if (this.overlays.length == 1) this.sizeOverlayBox(); + } + } + this.show(); + + } catch (e) { + this.error(e); + } +}, + + +setObjContainerSize : function(parent, auto) { + var c = hs.getElementByClass(parent, 'DIV', 'highslide-body'); + if (/(iframe|swf)/.test(this.objectType)) { + if (this.objectWidth) c.style.width = this.objectWidth +'px'; + if (this.objectHeight) c.style.height = this.objectHeight +'px'; + } +}, + +writeExtendedContent : function () { + if (this.hasExtendedContent) return; + var exp = this; + this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); + if (this.objectType == 'iframe') { + this.showLoading(); + var ruler = hs.clearing.cloneNode(1); + this.body.appendChild(ruler); + this.newWidth = this.innerContent.offsetWidth; + if (!this.objectWidth) this.objectWidth = ruler.offsetWidth; + var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight, + h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom, + onload = this.objectLoadTime == 'before' ? + ' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : ''; + + this.body.innerHTML += ''; + this.ruler = this.body.getElementsByTagName('div')[0]; + this.iframe = this.body.getElementsByTagName('iframe')[0]; + + if (this.objectLoadTime == 'after') this.correctIframeSize(); + + } + if (this.objectType == 'swf') { + this.body.id = this.body.id || 'hs-flash-id-' + this.key; + var a = this.swfOptions; + if (!a.params) a.params = {}; + if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent'; + if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight, + a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes); + } + this.hasExtendedContent = true; +}, +htmlGetSize : function() { + if (this.iframe && !this.objectHeight) { // loadtime before + this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px'; + } + this.innerContent.appendChild(hs.clearing); + if (!this.x.full) this.x.full = this.innerContent.offsetWidth; + this.y.full = this.innerContent.offsetHeight; + this.innerContent.removeChild(hs.clearing); + if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug + this.newHeight = parseInt(this.innerContent.currentStyle.height); + } + hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'}); + hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'}); +}, + +getIframePageHeight : function() { + var h; + try { + var doc = this.iframe.contentDocument || this.iframe.contentWindow.document; + var clearing = doc.createElement('div'); + clearing.style.clear = 'both'; + doc.body.appendChild(clearing); + h = clearing.offsetTop; + if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop) + + parseInt(doc.body.currentStyle.marginBottom) - 1; + } catch (e) { // other domain + h = 300; + } + return h; +}, +correctIframeSize : function () { + var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth; + hs.discardElement(this.ruler); + if (wDiff < 0) wDiff = 0; + + var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight; + hs.setStyles(this.iframe, { + width: Math.abs(this.x.size - wDiff) +'px', + height: Math.abs(this.y.size - hDiff) +'px' + }); + hs.setStyles(this.body, { + width: this.iframe.style.width, + height: this.iframe.style.height + }); + + this.scrollingContent = this.iframe; + this.scrollerDiv = this.scrollingContent; +}, +htmlSizeOperations : function () { + + this.setObjContainerSize(this.innerContent); + + + if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent(); + + // handle minimum size + if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full; + if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full; + this.scrollerDiv = this.innerContent; + hs.setStyles(this.mediumContent, { + position: 'relative', + width: this.x.size +'px' + }); + hs.setStyles(this.innerContent, { + border: 'none', + width: 'auto', + height: 'auto' + }); + var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); + if (node && !/(iframe|swf)/.test(this.objectType)) { + var cNode = node; // wrap to get true size + node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true); + cNode.parentNode.insertBefore(node, cNode); + node.appendChild(hs.clearing); // IE6 + node.appendChild(cNode); + + var wDiff = this.innerContent.offsetWidth - node.offsetWidth; + var hDiff = this.innerContent.offsetHeight - node.offsetHeight; + node.removeChild(hs.clearing); + + var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug + hs.setStyles(node, { + width: (this.x.size - wDiff - kdeBugCorr) +'px', + height: (this.y.size - hDiff) +'px', + overflow: 'auto', + position: 'relative' + } + ); + if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) { + node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px'; + } + this.scrollingContent = node; + this.scrollerDiv = this.scrollingContent; + } + if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize(); + if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content; + + if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) { + this.x.size += 17; // room for scrollbars + } + if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) { + setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}", + hs.expandDuration); + } +}, + +justify : function (p, moveOnly) { + var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; + + var hasMovedMin = false; + + var allowReduce = p.exp.allowSizeReduction; + p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); + if (p.pos < p.scroll + p.marginMin) { + p.pos = p.scroll + p.marginMin; + hasMovedMin = true; + } + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { + if (!moveOnly && hasMovedMin && allowReduce) { + p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } else if (p.get('wsize') < p.get('fitsize')) { + p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); + } else { // image larger than viewport + p.pos = p.scroll + p.marginMin; + if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } + } + + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + + + + if (p.pos < p.marginMin) { + var tmpMin = p.pos; + p.pos = p.marginMin; + + if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); + + } +}, + +correctRatio : function(ratio) { + var x = this.x, + y = this.y, + changed = false, + xSize = Math.min(x.full, x.size), + ySize = Math.min(y.full, y.size), + useBox = (this.useBox || hs.padToMinWidth); + + if (xSize / ySize > ratio) { // width greater + xSize = ySize * ratio; + if (xSize < x.minSize) { // below minWidth + xSize = x.minSize; + ySize = xSize / ratio; + } + changed = true; + + } else if (xSize / ySize < ratio) { // height greater + ySize = xSize / ratio; + changed = true; + } + + if (hs.padToMinWidth && x.full < x.minSize) { + x.imgSize = x.full; + y.size = y.imgSize = y.full; + } else if (this.useBox) { + x.imgSize = xSize; + y.imgSize = ySize; + } else { + x.size = xSize; + y.size = ySize; + } + this.fitOverlayBox(useBox ? null : ratio); + if (useBox && y.size < y.imgSize) { + y.imgSize = y.size; + x.imgSize = y.size * ratio; + } + if (changed || useBox) { + x.pos = x.tpos - x.cb + x.tb; + x.minSize = x.size; + this.justify(x, true); + + y.pos = y.tpos - y.cb + y.tb; + y.minSize = y.size; + this.justify(y, true); + if (this.overlayBox) this.sizeOverlayBox(); + } +}, +fitOverlayBox : function(ratio) { + var x = this.x, y = this.y; + if (this.overlayBox) { + while (y.size > this.minHeight && x.size > this.minWidth + && y.get('wsize') > y.get('fitsize')) { + y.size -= 10; + if (ratio) x.size = y.size * ratio; + this.sizeOverlayBox(0, 1); + } + } +}, + +show : function () { + var x = this.x, y = this.y; + this.doShowHide('hidden'); + + // Apply size change + this.changeSize( + 1, { + wrapper: { + width : x.get('wsize'), + height : y.get('wsize'), + left: x.pos, + top: y.pos + }, + content: { + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad'), + width:x.imgSize ||x.size, + height:y.imgSize ||y.size + } + }, + hs.expandDuration + ); +}, + +changeSize : function(up, to, dur) { + + if (this.outline && !this.outlineWhileAnimating) { + if (up) this.outline.setPosition(); + else this.outline.destroy( + (this.isHtml && this.preserveContent)); + } + + + if (!up) this.destroyOverlays(); + + var exp = this, + x = exp.x, + y = exp.y, + easing = this.easing; + if (!up) easing = this.easingClose || easing; + var after = up ? + function() { + + if (exp.outline) exp.outline.table.style.visibility = "visible"; + setTimeout(function() { + exp.afterExpand(); + }, 50); + } : + function() { + exp.afterClose(); + }; + if (up) hs.setStyles( this.wrapper, { + width: x.t +'px', + height: y.t +'px' + }); + if (up && this.isHtml) { + hs.setStyles(this.wrapper, { + left: (x.tpos - x.cb + x.tb) +'px', + top: (y.tpos - y.cb + y.tb) +'px' + }); + } + if (this.fadeInOut) { + hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 }); + hs.extend(to.wrapper, { opacity: up }); + } + hs.animate( this.wrapper, to.wrapper, { + duration: dur, + easing: easing, + step: function(val, args) { + if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') { + var fac = up ? args.pos : 1 - args.pos; + var pos = { + w: x.t + (x.get('wsize') - x.t) * fac, + h: y.t + (y.get('wsize') - y.t) * fac, + x: x.tpos + (x.pos - x.tpos) * fac, + y: y.tpos + (y.pos - y.tpos) * fac + }; + exp.outline.setPosition(pos, 0, 1); + } + if (exp.isHtml) { + if (args.prop == 'left') + exp.mediumContent.style.left = (x.pos - val) +'px'; + if (args.prop == 'top') + exp.mediumContent.style.top = (y.pos - val) +'px'; + } + } + }); + hs.animate( this.content, to.content, dur, easing, after); + if (up) { + this.wrapper.style.visibility = 'visible'; + this.content.style.visibility = 'visible'; + if (this.isHtml) this.innerContent.style.visibility = 'visible'; + this.a.className += ' highslide-active-anchor'; + } +}, + + + + +afterExpand : function() { + this.isExpanded = true; + this.focus(); + + if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent(); + if (this.iframe) { + try { + var exp = this, + doc = this.iframe.contentDocument || this.iframe.contentWindow.document; + hs.addEventListener(doc, 'mousedown', function () { + if (hs.focusKey != exp.key) exp.focus(); + }); + } catch(e) {} + if (hs.ie && typeof this.isClosing != 'boolean') // first open + this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout + } + if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; + this.prepareNextOutline(); + var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; + this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') + && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); + if (this.overlayBox) this.showOverlays(); + +}, + + +prepareNextOutline : function() { + var key = this.key; + var outlineType = this.outlineType; + new hs.Outline(outlineType, + function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); +}, + + +preloadNext : function() { + var next = this.getAdjacentAnchor(1); + if (next && next.onclick.toString().match(/hs\.expand/)) + var img = hs.createElement('img', { src: hs.getSrc(next) }); +}, + + +getAdjacentAnchor : function(op) { + var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; + + /*< ? if ($cfg->slideshow) : ?>s*/ + if (!as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + /*< ? endif ?>s*/ + return as[current + op] || null; +}, + +getAnchorIndex : function() { + var arr = hs.getAnchors().groups[this.slideshowGroup || 'none']; + if (arr) for (var i = 0; i < arr.length; i++) { + if (arr[i] == this.a) return i; + } + return null; +}, + + +cancelLoading : function() { + hs.discardElement (this.wrapper); + hs.expanders[this.key] = null; + if (this.loading) hs.loading.style.left = '-9999px'; +}, + +writeCredits : function () { + this.credits = hs.createElement('a', { + href: hs.creditsHref, + target: hs.creditsTarget, + className: 'highslide-credits', + innerHTML: hs.lang.creditsText, + title: hs.lang.creditsTitle + }); + this.createOverlay({ + overlayId: this.credits, + position: this.creditsPosition || 'top left' + }); +}, + +getInline : function(types, addOverlay) { + for (var i = 0; i < types.length; i++) { + var type = types[i], s = null; + if (!this[type +'Id'] && this.thumbsUserSetId) + this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; + if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']); + if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { + s = eval(this[type +'Eval']); + } catch (e) {} + if (!this[type] && this[type +'Text']) { + s = this[type +'Text']; + } + if (!this[type] && !s) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + this[type] = next.cloneNode(1); + break; + } + next = next.nextSibling; + } + } + + if (!this[type] && s) this[type] = hs.createElement('div', + { className: 'highslide-'+ type, innerHTML: s } ); + + if (addOverlay && this[type]) { + var o = { position: (type == 'heading') ? 'above' : 'below' }; + for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; + o.overlayId = this[type]; + this.createOverlay(o); + } + } +}, + + +// on end move and resize +doShowHide : function(visibility) { + if (hs.hideSelects) this.showHideElements('SELECT', visibility); + if (hs.hideIframes) this.showHideElements('IFRAME', visibility); + if (hs.geckoMac) this.showHideElements('*', visibility); +}, +showHideElements : function (tagName, visibility) { + var els = document.getElementsByTagName(tagName); + var prop = tagName == '*' ? 'overflow' : 'visibility'; + for (var i = 0; i < els.length; i++) { + if (prop == 'visibility' || (document.defaultView.getComputedStyle( + els[i], "").getPropertyValue('overflow') == 'auto' + || els[i].getAttribute('hidden-by') != null)) { + var hiddenBy = els[i].getAttribute('hidden-by'); + if (visibility == 'visible' && hiddenBy) { + hiddenBy = hiddenBy.replace('['+ this.key +']', ''); + els[i].setAttribute('hidden-by', hiddenBy); + if (!hiddenBy) els[i].style[prop] = els[i].origProp; + } else if (visibility == 'hidden') { // hide if behind + var elPos = hs.getPosition(els[i]); + elPos.w = els[i].offsetWidth; + elPos.h = els[i].offsetHeight; + + + var clearsX = (elPos.x + elPos.w < this.x.get('opos') + || elPos.x > this.x.get('opos') + this.x.get('osize')); + var clearsY = (elPos.y + elPos.h < this.y.get('opos') + || elPos.y > this.y.get('opos') + this.y.get('osize')); + var wrapperKey = hs.getWrapperKey(els[i]); + if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image + if (!hiddenBy) { + els[i].setAttribute('hidden-by', '['+ this.key +']'); + els[i].origProp = els[i].style[prop]; + els[i].style[prop] = 'hidden'; + + } else if (hiddenBy.indexOf('['+ this.key +']') == -1) { + els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); + } + } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) + && wrapperKey != this.key) { // on move + els[i].setAttribute('hidden-by', ''); + els[i].style[prop] = els[i].origProp || ''; + } else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) { + els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); + } + + } + } + } +}, + +focus : function() { + this.wrapper.style.zIndex = hs.zIndexCounter += 2; + // blur others + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && i == hs.focusKey) { + var blurExp = hs.expanders[i]; + blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; + if (blurExp.isImage) { + blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; + blurExp.content.title = hs.lang.focusTitle; + } + } + } + + // focus this + if (this.outline) this.outline.table.style.zIndex + = this.wrapper.style.zIndex - 1; + this.content.className = 'highslide-'+ this.contentType; + if (this.isImage) { + this.content.title = hs.lang.restoreTitle; + + if (hs.restoreCursor) { + hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; + if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand'; + this.content.style.cursor = hs.styleRestoreCursor; + } + } + hs.focusKey = this.key; + hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); +}, +moveTo: function(x, y) { + this.x.setPos(x); + this.y.setPos(y); +}, +resize : function (e) { + var w, h, r = e.width / e.height; + w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); + if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; + h = this.isHtml ? e.height + e.dY : w / r; + if (h < Math.min(this.minHeight, this.y.full)) { + h = Math.min(this.minHeight, this.y.full); + if (this.isImage) w = h * r; + } + this.resizeTo(w, h); +}, +resizeTo: function(w, h) { + this.y.setSize(h); + this.x.setSize(w); +}, + +close : function() { + if (this.isClosing || !this.isExpanded) return; + this.isClosing = true; + + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + + try { + if (this.isHtml) this.htmlPrepareClose(); + this.content.style.cursor = 'default'; + this.changeSize( + 0, { + wrapper: { + width : this.x.t, + height : this.y.t, + left: this.x.tpos - this.x.cb + this.x.tb, + top: this.y.tpos - this.y.cb + this.y.tb + }, + content: { + left: 0, + top: 0, + width: this.x.t, + height: this.y.t + } + }, hs.restoreDuration + ); + } catch (e) { this.afterClose(); } +}, + +htmlPrepareClose : function() { + if (hs.geckoMac) { // bad redraws + if (!hs.mask) hs.mask = hs.createElement('div', null, + { position: 'absolute' }, hs.container); + hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px', + left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' }); + } + if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {} + + if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject(); + if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent) + this.scrollerDiv.style.overflow = 'hidden'; +}, + +destroyObject : function () { + if (hs.ie && this.iframe) + try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {} + if (this.objectType == 'swf') swfobject.removeSWF(this.body.id); + this.body.innerHTML = ''; +}, + +sleep : function() { + if (this.outline) this.outline.table.style.display = 'none'; + this.releaseMask = null; + this.wrapper.style.display = 'none'; + hs.push(hs.sleeping, this); +}, + +awake : function() {try { + + hs.expanders[this.key] = this; + + if (!hs.allowMultipleInstances &&hs.focusKey != this.key) { + try { hs.expanders[hs.focusKey].close(); } catch (e){} + } + + var z = hs.zIndexCounter++, stl = { display: '', zIndex: z }; + hs.setStyles (this.wrapper, stl); + this.isClosing = false; + + var o = this.outline || 0; + if (o) { + if (!this.outlineWhileAnimating) stl.visibility = 'hidden'; + hs.setStyles (o.table, stl); + } + + this.show(); +} catch (e) {} + + +}, + +createOverlay : function (o) { + var el = o.overlayId; + if (typeof el == 'string') el = hs.getNode(el); + if (o.html) el = hs.createElement('div', { innerHTML: o.html }); + if (!el || typeof el == 'string') return; + el.style.display = 'block'; + this.genOverlayBox(); + var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; + if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; + var overlay = hs.createElement( + 'div', { + id: 'hsId'+ hs.idCounter++, + hsId: o.hsId + }, { + position: 'absolute', + visibility: 'hidden', + width: width, + direction: hs.lang.cssDirection || '', + opacity: 0 + },this.overlayBox, + true + ); + + overlay.appendChild(el); + hs.extend(overlay, { + opacity: 1, + offsetX: 0, + offsetY: 0, + dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250 + }); + hs.extend(overlay, o); + + if (this.gotOverlays) { + this.positionOverlay(overlay); + if (!overlay.hideOnMouseOut || this.mouseIsOver) + hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur); + } + hs.push(this.overlays, hs.idCounter - 1); +}, +positionOverlay : function(overlay) { + var p = overlay.position || 'middle center', + offX = overlay.offsetX, + offY = overlay.offsetY; + if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay); + if (/left$/.test(p)) overlay.style.left = offX +'px'; + + if (/center$/.test(p)) hs.setStyles (overlay, { + left: '50%', + marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px' + }); + + if (/right$/.test(p)) overlay.style.right = - offX +'px'; + + if (/^leftpanel$/.test(p)) { + hs.setStyles(overlay, { + right: '100%', + marginRight: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p1 = overlay.offsetWidth; + + } else if (/^rightpanel$/.test(p)) { + hs.setStyles(overlay, { + left: '100%', + marginLeft: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p2 = overlay.offsetWidth; + } + + if (/^top/.test(p)) overlay.style.top = offY +'px'; + if (/^middle/.test(p)) hs.setStyles (overlay, { + top: '50%', + marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px' + }); + if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px'; + if (/^above$/.test(p)) { + hs.setStyles(overlay, { + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + bottom: '100%', + marginBottom: this.y.cb +'px', + width: 'auto' + }); + this.y.p1 = overlay.offsetHeight; + + } else if (/^below$/.test(p)) { + hs.setStyles(overlay, { + position: 'relative', + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + top: '100%', + marginTop: this.y.cb +'px', + width: 'auto' + }); + this.y.p2 = overlay.offsetHeight; + overlay.style.position = 'absolute'; + } +}, + +getOverlays : function() { + this.getInline(['heading', 'caption'], true); + if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move'; + if (hs.showCredits) this.writeCredits(); + for (var i = 0; i < hs.overlays.length; i++) { + var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; + if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) + || (sg && sg === this.slideshowGroup)) { + if (this.isImage || (this.isHtml && o.useOnHtml)) + this.createOverlay(o); + } + } + var os = []; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (/panel$/.test(o.position)) this.positionOverlay(o); + else hs.push(os, o); + } + for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); + this.gotOverlays = true; +}, +genOverlayBox : function() { + if (!this.overlayBox) this.overlayBox = hs.createElement ( + 'div', { + className: this.wrapperClassName + }, { + position : 'absolute', + width: (this.x.size || (this.useBox ? this.width : null) + || this.x.full) +'px', + height: (this.y.size || this.y.full) +'px', + visibility : 'hidden', + overflow : 'hidden', + zIndex : hs.ie ? 4 : null + }, + hs.container, + true + ); +}, +sizeOverlayBox : function(doWrapper, doPanels) { + var overlayBox = this.overlayBox, + x = this.x, + y = this.y; + hs.setStyles( overlayBox, { + width: x.size +'px', + height: y.size +'px' + }); + if (doWrapper || doPanels) { + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat'); + if (o && /^(above|below)$/.test(o.position)) { + if (ie6) { + o.style.width = (overlayBox.offsetWidth + 2 * x.cb + + x.p1 + x.p2) +'px'; + } + y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight; + } + if (o && ie6 && /^(left|right)panel$/.test(o.position)) { + o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px'; + } + } + } + if (doWrapper) { + hs.setStyles(this.content, { + top: y.p1 +'px' + }); + hs.setStyles(overlayBox, { + top: (y.p1 + y.cb) +'px' + }); + } +}, + +showOverlays : function() { + var b = this.overlayBox; + b.className = ''; + hs.setStyles(b, { + top: (this.y.p1 + this.y.cb) +'px', + left: (this.x.p1 + this.x.cb) +'px', + overflow : 'visible' + }); + if (hs.safari) b.style.visibility = 'visible'; + this.wrapper.appendChild (b); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + o.style.zIndex = 4; + if (!o.hideOnMouseOut || this.mouseIsOver) { + o.style.visibility = 'visible'; + hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: o.opacity }, o.dur); + } + } +}, + +destroyOverlays : function() { + if (!this.overlays.length) return; + if (this.isHtml && this.preserveContent) { + this.overlayBox.style.top = '-9999px'; + hs.container.appendChild(this.overlayBox); + } else + hs.discardElement(this.overlayBox); +}, + + + +createFullExpand : function () { + this.fullExpandLabel = hs.createElement( + 'a', { + href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', + title: hs.lang.fullExpandTitle, + className: 'highslide-full-expand' + } + ); + + this.createOverlay({ + overlayId: this.fullExpandLabel, + position: hs.fullExpandPosition, + hideOnMouseOut: true, + opacity: hs.fullExpandOpacity + }); +}, + +doFullExpand : function () { + try { + if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); + + this.focus(); + var xSize = this.x.size; + this.resizeTo(this.x.full, this.y.full); + + var xpos = this.x.pos - (this.x.size - xSize) / 2; + if (xpos < hs.marginLeft) xpos = hs.marginLeft; + + this.moveTo(xpos, this.y.pos); + this.doShowHide('hidden'); + + } catch (e) { + this.error(e); + } +}, + + +afterClose : function () { + this.a.className = this.a.className.replace('highslide-active-anchor', ''); + + this.doShowHide('visible'); + + if (this.isHtml && this.preserveContent) { + this.sleep(); + } else { + if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); + + hs.discardElement(this.wrapper); + } + if (hs.mask) hs.mask.style.display = 'none'; + + hs.expanders[this.key] = null; + hs.reOrder(); +} + +}; + + +// hs.Ajax object prototype +hs.Ajax = function (a, content, pre) { + this.a = a; + this.content = content; + this.pre = pre; +}; + +hs.Ajax.prototype = { +run : function () { + if (!this.src) this.src = hs.getSrc(this.a); + if (this.src.match('#')) { + var arr = this.src.split('#'); + this.src = arr[0]; + this.id = arr[1]; + } + if (hs.cachedGets[this.src]) { + this.cachedGet = hs.cachedGets[this.src]; + if (this.id) this.getElementContent(); + else this.loadHTML(); + return; + } + try { this.xmlHttp = new XMLHttpRequest(); } + catch (e) { + try { this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } + catch (e) { + try { this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } + catch (e) { this.onError(); } + } + } + var pThis = this; + this.xmlHttp.onreadystatechange = function() { + if(pThis.xmlHttp.readyState == 4) { + if (pThis.id) pThis.getElementContent(); + else pThis.loadHTML(); + } + }; + var src = this.src; + if (hs.forceAjaxReload) + src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); + this.xmlHttp.open('GET', src, true); + this.xmlHttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + this.xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + this.xmlHttp.send(null); +}, + +getElementContent : function() { + hs.init(); + var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null; + + this.iframe = hs.createElement('iframe', attribs, + { position: 'absolute', top: '-9999px' }, hs.container); + + this.loadHTML(); +}, + +loadHTML : function() { + var s = this.cachedGet || this.xmlHttp.responseText; + if (this.pre) hs.cachedGets[this.src] = s; + if (!hs.ie || hs.uaVersion >= 5.5) { + s = s.replace(/\s/g, ' ').replace( + new RegExp(']*>', 'gi'), '').replace( + new RegExp(']*>.*?', 'gi'), ''); + + if (this.iframe) { + var doc = this.iframe.contentDocument; + if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document; + if (!doc) { // Opera + var pThis = this; + setTimeout(function() { pThis.loadHTML(); }, 25); + return; + } + doc.open(); + doc.write(s); + doc.close(); + try { s = doc.getElementById(this.id).innerHTML; } catch (e) { + try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera + } + hs.discardElement(this.iframe); + } else { + s = s.replace(new RegExp('^.*?]*>(.*?).*?$', 'i'), '$1'); + } + } + hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; + this.onLoad(); + for (var x in this) this[x] = null; +} +}; +if (hs.ie) { + (function () { + try { + document.documentElement.doScroll('left'); + } catch (e) { + setTimeout(arguments.callee, 50); + return; + } + hs.ready(); + })(); +} +hs.addEventListener(document, 'DOMContentLoaded', hs.ready); +hs.addEventListener(window, 'load', hs.ready); +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; + +// set handlers +hs.addEventListener(window, 'load', function() { + if (hs.expandCursor) { + var sel = '.highslide img', + dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'; + + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]); + + if (!hs.ie) { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } else { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } + } +}); +hs.addEventListener(window, 'resize', function() { + hs.getPageSize(); +}); +hs.addEventListener(document, 'mousemove', function(e) { + hs.mouse = { x: e.clientX, y: e.clientY }; +}); +hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); +hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); + +hs.addEventListener(document, 'ready', hs.getAnchors); +hs.addEventListener(window, 'load', hs.preloadImages); +hs.addEventListener(window, 'load', hs.preloadAjax); \ No newline at end of file diff --git a/highslide/highslide-with-html.packed.js b/highslide/highslide-with-html.packed.js new file mode 100644 index 0000000..720570c --- /dev/null +++ b/highslide/highslide-with-html.packed.js @@ -0,0 +1,28 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +inline +ajax +iframe +flash +packed +Author: Torstein Hønsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u m={1d:{6s:\'98\',8Q:\'aU...\',8U:\'6X 29 aT\',a0:\'6X 29 aO 29 aQ\',9Z:\'aR 29 aY I (f)\',9o:\'b5 by 8j 8i\',9f:\'b6 29 b3 8j 8i aZ\',8z:\'8v\',8y:\'8W\',8K:\'8X\',8B:\'8g\',8D:\'8g (b1)\',97:\'aN\',az:\'8e\',aA:\'8e 5P (8b)\',aB:\'87\',aL:\'87 5P (8b)\',8A:\'8v (79 1e)\',8x:\'8W (79 2K)\',8E:\'8X\',bD:\'1:1\',7k:\'6X 29 2f 2u, bH 8S bE 29 3L. bs 79 bg V 1T 8S 6b.\'},4n:\'R/bc/\',6B:\'ba.7g\',4D:\'bb.7g\',6m:61,a2:61,47:15,6G:15,4i:15,69:15,3T:bp,8R:0.75,7u:J,7J:5,3k:2,bq:3,4l:1i,9Y:\'3H 2K\',9k:1,9M:J,9z:\'bn://R.bm/\',9p:\'bk\',8u:J,7t:[\'a\'],5q:1i,6I:J,4c:J,2W:\'4A\',7A:J,7Z:J,3y:8Y,4E:8Y,4w:J,1x:\'bA-aG\',8o:{8q:\'<1h 3a="R-aM"><92>\'+\'<3b 3a="R-6b">\'+\'\'+\'<2m>{m.1d.8z}\'+\'\'+\'<3b 3a="R-1T">\'+\'\'+\'<2m>{m.1d.8y}\'+\'\'+\'<3b 3a="R-3L">\'+\'\'+\'<2m>{m.1d.8K}\'+\'\'+\'<3b 3a="R-2f">\'+\'\'+\'<2m>{m.1d.8B}\'+\'\'+\'\'+\'<1h 3a="R-14">\'+\'<1h 3a="R-bx"><1h>\'+\'<2m 3a="R-3p" 2q="{m.1d.97}"><2m>\'+\'\'},4z:[],6Q:J,N:[],6R:[\'4w\',\'2F\',\'1x\',\'3k\',\'bL\',\'bI\',\'bz\',\'8f\',\'bl\',\'bj\',\'bo\',\'8n\',\'9g\',\'7Z\',\'K\',\'M\',\'6j\',\'5q\',\'6I\',\'4c\',\'bi\',\'bh\',\'b9\',\'2c\',\'7A\',\'36\',\'3W\',\'2W\',\'6d\',\'7N\',\'3y\',\'4E\',\'8s\',\'bf\',\'41\',\'23\',\'9t\',\'9q\',\'S\'],1P:[],64:0,br:{x:[\'9O\',\'1e\',\'6o\',\'2K\',\'9w\'],y:[\'53\',\'16\',\'73\',\'3H\',\'68\']},5v:{},8n:{},8f:{},6d:{ai:{},1D:{},an:{}},3c:[],3C:{},3B:[],63:[],3S:[],5g:{},6K:{},5i:[],3z:7q((4y.83.5r().2U(/.+(?:8h|bG|bF|1q)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1q:(U.4x&&!1F.35),4Y:/bJ/.19(4y.83),7B:/bC.+8h:1\\.[0-8].+bw/.19(4y.83),$:B(1p){q(1p)D U.6N(1p)},1Y:B(1L,2L){1L[1L.18]=2L},Z:B(8T,3j,3l,4s,8J){u C=U.Z(8T);q(3j)m.3g(C,3j);q(8J)m.P(C,{7e:0,ad:\'2d\',6M:0});q(3l)m.P(C,3l);q(4s)4s.1H(C);D C},3g:B(C,3j){V(u x 3r 3j)C[x]=3j[x];D C},P:B(C,3l){V(u x 3r 3l){q(m.1q&&x==\'1z\'){q(3l[x]>0.99)C.F.b8(\'4j\');L C.F.4j=\'8O(1z=\'+(3l[x]*2y)+\')\'}L C.F[x]=3l[x]}},3N:B(C,1m,2D){u 3t,49,3I;q(1w 2D!=\'7a\'||2D===G){u 2H=9U;2D={3w:2H[2],23:2H[3],7U:2H[4]}}q(1w 2D.3w!=\'3Q\')2D.3w=61;2D.23=1s[2D.23]||1s.96;2D.5a=m.3g({},1m);V(u 2w 3r 1m){u e=1u m.1B(C,2D,2w);3t=7q(m.6c(C,2w))||0;49=7q(1m[2w]);3I=2w!=\'1z\'?\'E\':\'\';e.2I(3t,49,3I)}},6c:B(C,1m){q(U.7r){D U.7r.9m(C,G).9l(1m)}L{q(1m==\'1z\')1m=\'4j\';u 2L=C.4I[1m.1Q(/\\-(\\w)/g,B(a,b){D b.aI()})];q(1m==\'4j\')2L=2L.1Q(/8O\\(1z=([0-9]+)\\)/,B(a,b){D b/2y});D 2L===\'\'?1:2L}},5z:B(){u d=U,w=1F,4S=d.7I&&d.7I!=\'9J\'?d.59:d.14;u K=m.1q?4S.8P:(d.59.8P||57.aD),M=m.1q?4S.ax:57.aw;m.3F={K:K,M:M,5D:m.1q?4S.5D:av,5F:m.1q?4S.5F:ay}},7s:B(C){u p={x:C.8a,y:C.6V};43(C.88){C=C.88;p.x+=C.8a;p.y+=C.6V;q(C!=U.14&&C!=U.59){p.x-=C.5D;p.y-=C.5F}}D p},4T:B(a,1D,2I,T){q(!a)a=m.Z(\'a\',G,{1N:\'2d\'},m.1R);q(1w a.4W==\'B\')D 1D;q(T==\'2E\'){V(u i=0;i7T){7T=1y;60=i}}}q(60==-1)m.2i=-1;L N[60].30()},4f:B(a,4X){a.4W=a.2M;u p=a.4W?a.4W():G;a.4W=G;D(p&&1w p[4X]!=\'2b\')?p[4X]:(1w m[4X]!=\'2b\'?m[4X]:G)},5o:B(a){u S=m.4f(a,\'S\');q(S)D S;D a.2r},4m:B(1p){u 1E=m.$(1p),3M=m.6K[1p],a={};q(!1E&&!3M)D G;q(!3M){3M=1E.4J(J);3M.1p=\'\';m.6K[1p]=3M;D 1E}L{D 3M.4J(J)}},3e:B(d){q(d)m.7o.1H(d);m.7o.2n=\'\'},8l:B(4M,A){u 3v=A=A||m.3m();q(m.3K)D 1i;L m.3v=3v;1n{m.3K=4M;4M.2M()}1o(e){m.3v=m.3K=G}1n{A.2f()}1o(e){}D 1i},5X:B(C,20){u A=m.3m(C);q(A){4M=A.6x(20);D m.8l(4M,A)}L D 1i},6b:B(C){D m.5X(C,-1)},1T:B(C){D m.5X(C,1)},58:B(e){q(!e)e=1F.1X;q(!e.2l)e.2l=e.7F;q(1w e.2l.6i!=\'2b\')D J;u A=m.3m();u 20=G;94(e.aP){1G 70:q(A)A.7X();D J;1G 32:1G 34:1G 39:1G 40:20=1;7P;1G 8:1G 33:1G 37:1G 38:20=-1;7P;1G 27:1G 13:20=0}q(20!==G){m.4L(U,1F.35?\'7z\':\'7y\',m.58);q(!m.8u)D J;q(e.65)e.65();L e.aW=1i;q(A){q(20==0){A.2f()}L{m.5X(A.Q,20)}D 1i}}D J},aV:B(11){m.1Y(m.1P,m.3g(11,{2R:\'2R\'+m.64++}))},7v:B(6H,5S){u C,2s=/^R-Y-([0-9]+)$/;C=6H;43(C.2S){q(C.1p&&2s.19(C.1p))D C.1p.1Q(2s,"$1");C=C.2S}q(!5S){C=6H;43(C.2S){q(C.4a&&m.56(C)){V(u Q=0;Q1)D J;q(!e.2l)e.2l=e.7F;u C=e.2l;43(C.2S&&!(/R-(2u|3L|2E|3p)/.19(C.1l))){C=C.2S}u A=m.3m(C);q(A&&(A.4k||!A.4P))D J;q(A&&e.T==\'6f\'){q(e.2l.6i)D J;u 2U=C.1l.2U(/R-(2u|3L|3p)/);q(2U){m.2e={A:A,T:2U[1],1e:A.x.H,K:A.x.I,16:A.y.H,M:A.y.I,8V:e.5u,8N:e.5N};m.1O(U,\'6S\',m.84);q(e.65)e.65();q(/R-(2u|2E)-7h/.19(A.O.1l)){A.30();m.7c=J}D 1i}L q(/R-2E/.19(C.1l)&&m.2i!=A.Q){A.30();A.45(\'1k\')}}L q(e.T==\'91\'){m.4L(U,\'6S\',m.84);q(m.2e){q(m.3O&&m.2e.T==\'2u\')m.2e.A.O.F.3u=m.3O;u 3h=m.2e.3h;q(!3h&&!m.7c&&!/(3L|3p)/.19(m.2e.T)){A.2f()}L q(3h||(!3h&&m.8c)){m.2e.A.45(\'1k\')}q(m.2e.A.2X)m.2e.A.2X.F.1N=\'2d\';m.7c=1i;m.2e=G}L q(/R-2u-7h/.19(C.1l)){C.F.3u=m.3O}}D 1i},84:B(e){q(!m.2e)D J;q(!e)e=1F.1X;u a=m.2e,A=a.A;q(A.W){q(!A.2X)A.2X=m.Z(\'1h\',G,{1c:\'21\',K:A.x.I+\'E\',M:A.y.I+\'E\',1e:A.x.cb+\'E\',16:A.y.cb+\'E\',1y:4,8L:(m.1q?\'cS\':\'2d\'),1z:.cN},A.Y,J);q(A.2X.F.1N==\'2d\')A.2X.F.1N=\'\'}a.5k=e.5u-a.8V;a.5h=e.5N-a.8N;u 7m=1s.bN(1s.95(a.5k,2)+1s.95(a.5h,2));q(!a.3h)a.3h=(a.T!=\'2u\'&&7m>0)||(7m>(m.d0||5));q(a.3h&&e.5u>5&&e.5N>5){q(a.T==\'3p\')A.3p(a);L{A.7f(a.1e+a.5k,a.16+a.5h);q(a.T==\'2u\')A.O.F.3u=\'3L\'}}D 1i},8p:B(e){1n{q(!e)e=1F.1X;u 5G=/cX/i.19(e.T);q(!e.2l)e.2l=e.7F;q(m.1q)e.7D=5G?e.cM:e.cL;u A=m.3m(e.2l);q(!A.4P)D;q(!A||!e.7D||m.3m(e.7D,J)==A||m.2e)D;V(u i=0;i=k.1J.3w+k.85){k.3J=k.49;k.H=k.82=1;k.6u();k.1J.5a[k.1m]=J;u 7V=J;V(u i 3r k.1J.5a)q(k.1J.5a[i]!==J)7V=1i;q(7V){q(k.1J.7U)k.1J.7U.8t(k.2j)}D 1i}L{u n=t-k.85;k.82=n/k.1J.3w;k.H=k.1J.23(n,0,1,k.1J.3w);k.3J=k.3t+((k.49-k.3t)*k.H);k.6u()}D J}};m.3g(m.1B,{2Z:{1z:B(1B){m.P(1B.2j,{1z:1B.3J})},8m:B(1B){q(1B.2j.F&&1B.2j.F[1B.1m]!=G)1B.2j.F[1B.1m]=1B.3J+1B.3I;L 1B.2j[1B.1m]=1B.3J}}});m.4O=B(1x,2N){k.2N=2N;k.1x=1x;u v=m.3z,5M;k.72=m.1q&&v>=5.5&&v<7;q(!1x){q(2N)2N();D}m.5n();k.2k=m.Z(\'2k\',{cd:0},{1r:\'1k\',1c:\'21\',cc:\'c9\',K:0},m.1R,J);u 6p=m.Z(\'6p\',G,G,k.2k,1);k.28=[];V(u i=0;i<=8;i++){q(i%3==0)5M=m.Z(\'5M\',G,{M:\'1V\'},6p,J);k.28[i]=m.Z(\'28\',G,G,5M,J);u F=i!=4?{c1:0,c0:0}:{1c:\'3G\'};m.P(k.28[i],F)}k.28[4].1l=1x+\' R-1j\';k.8H()};m.4O.4R={8H:B(){u S=m.4n+(m.bS||"bR/")+k.1x+".bQ";u 8I=m.4Y?m.1R:G;k.2P=m.Z(\'1v\',G,{1c:\'21\',16:\'-3x\'},8I,J);u 2Y=k;k.2P.3s=B(){2Y.8G()};k.2P.S=S},8G:B(){u o=k.1t=k.2P.K/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1K={M:(2*o)+\'E\',K:(2*o)+\'E\'};V(u i=0;i<=8;i++){q(H[i]){q(k.72){u w=(i==1||i==7)?\'2y%\':k.2P.K+\'E\';u 1h=m.Z(\'1h\',G,{K:\'2y%\',M:\'2y%\',1c:\'3G\',24:\'1k\'},k.28[i],J);m.Z(\'1h\',G,{4j:"bP:bT.ap.bU(bZ=bY, S=\'"+k.2P.S+"\')",1c:\'21\',K:w,M:k.2P.M+\'E\',1e:(H[i][0]*o)+\'E\',16:(H[i][1]*o)+\'E\'},1h,J)}L{m.P(k.28[i],{8L:\'6r(\'+k.2P.S+\') \'+(H[i][0]*o)+\'E \'+(H[i][1]*o)+\'E\'})}q(1F.35&&(i==3||i==5))m.Z(\'1h\',G,1K,k.28[i],J);m.P(k.28[i],1K)}}k.2P=G;q(m.3C[k.1x])m.3C[k.1x].5L();m.3C[k.1x]=k;q(k.2N)k.2N()},4t:B(H,1t,8w,3d,23){u A=k.A,4u=A.Y.F,1t=1t||0,H=H||{x:A.x.H+1t,y:A.y.H+1t,w:A.x.1a(\'1M\')-2*1t,h:A.y.1a(\'1M\')-2*1t};q(8w)k.2k.F.1r=(H.h>=4*k.1t)?\'2o\':\'1k\';m.P(k.2k,{1e:(H.x-k.1t)+\'E\',16:(H.y-k.1t)+\'E\',K:(H.w+2*k.1t)+\'E\'});H.w-=2*k.1t;H.h-=2*k.1t;m.P(k.28[4],{K:H.w>=0?H.w+\'E\':0,M:H.h>=0?H.h+\'E\':0});q(k.72)k.28[3].F.M=k.28[5].F.M=k.28[4].F.M},5L:B(90){q(90)k.2k.F.1r=\'1k\';L m.3e(k.2k)}};m.5A=B(A,1K){k.A=A;k.1K=1K;k.2G=1K==\'x\'?\'bV\':\'bW\';k.2t=k.2G.5r();k.4K=1K==\'x\'?\'cf\':\'cg\';k.6O=k.4K.5r();k.6W=1K==\'x\'?\'cz\':\'cy\';k.cx=k.6W.5r();k.1U=k.2V=0};m.5A.4R={1a:B(Q){94(Q){1G\'71\':D k.1C+k.2v+(k.t-m.22[\'1t\'+k.2G])/2;1G\'1M\':D k.I+2*k.cb+k.1U+k.2V;1G\'4d\':D k.5t-k.3q-k.5s;1G\'74\':D k.1a(\'4d\')-2*k.cb-k.1U-k.2V;1G\'4B\':D k.H-(k.A.1j?k.A.1j.1t:0);1G\'7O\':D k.1a(\'1M\')+(k.A.1j?2*k.A.1j.1t:0);1G\'5K\':D k.1W?1s.5U((k.I-k.1W)/2):0}},6E:B(){k.cb=(k.A.O[\'1t\'+k.2G]-k.t)/2;k.5s=m[\'6M\'+k.6W]},7b:B(){k.t=k.A.C[k.2t]?4e(k.A.C[k.2t]):k.A.C[\'1t\'+k.2G];k.1C=k.A.1C[k.1K];k.2v=(k.A.C[\'1t\'+k.2G]-k.t)/2;q(k.1C<1){k.1C=(m.3F[k.2t]/2)+m.3F[\'3o\'+k.4K]}},6F:B(){u A=k.A;k.4g=\'1V\';k.H=k.1C-k.cb+k.2v;k.I=1s.3i(k.1b,A[\'7x\'+k.2G]||k.1b);k.2z=A.4w?1s.3i(A[\'3i\'+k.2G],k.1b):k.1b;q(A.2B&&A.2F){k.I=A[k.2t];k.1W=k.1b}q(k.1K==\'x\'&&m.4l)k.2z=A.3y;k.3q=m[\'6M\'+k.4K];k.3o=m.3F[\'3o\'+k.4K];k.5t=m.3F[k.2t]},7L:B(i){u A=k.A;q(A.2B&&(A.2F||m.4l)){k.1W=i;k.I=1s.7x(k.I,k.1W);A.O.F[k.6O]=k.1a(\'5K\')+\'E\'}L k.I=i;A.O.F[k.2t]=i+\'E\';A.Y.F[k.2t]=k.1a(\'1M\')+\'E\';q(A.1j)A.1j.4t();q(A.2X)A.2X.F[k.2t]=i+\'E\';q(A.1Z){u d=A.2a;q(k.6L===2b)k.6L=A.1g[\'1t\'+k.2G]-d[\'1t\'+k.2G];d.F[k.2t]=(k.I-k.6L)+\'E\';q(k.1K==\'x\')A.3D.F.K=\'1V\';q(A.14)A.14.F[k.2t]=\'1V\'}q(k.1K==\'x\'&&A.1A)A.3V(J)},7w:B(i){k.H=i;k.A.Y.F[k.6O]=i+\'E\';q(k.A.1j)k.A.1j.4t()}};m.4v=B(a,1D,2I,2A){q(U.al&&m.1q&&!m.6U){m.1O(U,\'3A\',B(){1u m.4v(a,1D,2I,2A)});D}k.a=a;k.2I=2I;k.2A=2A||\'2u\';k.1Z=(2A==\'2E\');k.2B=!k.1Z;m.6Q=1i;k.1P=[];m.5n();u Q=k.Q=m.N.18;V(u i=0;i(k.x.1W||k.x.I)){k.9V();q(k.1P.18==1)k.3V()}}k.7W()}1o(e){k.6h(e)}},6J:B(4s,1V){u c=m.3Y(4s,\'5Z\',\'R-14\');q(/(W|3f)/.19(k.2c)){q(k.36)c.F.K=k.36+\'E\';q(k.3W)c.F.M=k.3W+\'E\'}},5J:B(){q(k.am)D;u A=k;k.14=m.3Y(k.1g,\'5Z\',\'R-14\');q(k.2c==\'W\'){k.4o();u 3Z=m.2C.4J(1);k.14.1H(3Z);k.cp=k.1g.26;q(!k.36)k.36=3Z.26;u 3P=k.1g.1I-k.14.1I,h=k.3W||m.3F.M-3P-m.4i-m.69,3s=k.2W==\'4A\'?\' 3s="q (m.N[\'+k.Q+\']) m.N[\'+k.Q+\'].4h()" \':\'\';k.14.2n+=\'\';k.3Z=k.14.3E(\'1h\')[0];k.W=k.14.3E(\'W\')[0];q(k.2W==\'4G\')k.7d()}q(k.2c==\'3f\'){k.14.1p=k.14.1p||\'m-cs-1p-\'+k.Q;u a=k.6d;q(!a.1D)a.1D={};q(1w a.1D.aj==\'2b\')a.1D.aj=\'ci\';q(7l)7l.ch(k.S,k.14.1p,k.36,k.3W,a.ct||\'7\',a.cu,a.ai,a.1D,a.an)}k.am=J},6T:B(){q(k.W&&!k.3W){k.W.F.M=k.14.F.M=k.ag()+\'E\'}k.1g.1H(m.2C);q(!k.x.1b)k.x.1b=k.1g.26;k.y.1b=k.1g.1I;k.1g.ae(m.2C);q(m.1q&&k.ah>4e(k.1g.4I.M)){k.ah=4e(k.1g.4I.M)}m.P(k.Y,{1c:\'21\',7e:\'0\'});m.P(k.O,{K:k.x.t+\'E\',M:k.y.t+\'E\'})},ag:B(){u h;1n{u 1S=k.W.7K||k.W.4Z.U;u 2C=1S.Z(\'1h\');2C.F.ab=\'aa\';1S.14.1H(2C);h=2C.6V;q(m.1q)h+=4e(1S.14.4I.4i)+4e(1S.14.4I.69)-1}1o(e){h=cF}D h},7d:B(){u 3R=k.1g.26-k.3Z.26;m.3e(k.3Z);q(3R<0)3R=0;u 3P=k.1g.1I-k.W.1I;m.P(k.W,{K:1s.7H(k.x.I-3R)+\'E\',M:1s.7H(k.y.I-3P)+\'E\'});m.P(k.14,{K:k.W.F.K,M:k.W.F.M});k.3X=k.W;k.2a=k.3X},ac:B(){k.6J(k.1g);q(k.2c==\'3f\'&&k.2W==\'4A\')k.5J();q(k.x.I1E.1I){1E.F.K=(4e(1E.F.K)+5p)+\'E\'}k.3X=1E;k.2a=k.3X}q(k.W&&k.2W==\'4A\')k.7d();q(!k.3X&&k.y.Ik.2a.2S.1I){4C("1n { m.N["+k.Q+"].2a.F.24 = \'1V\'; } 1o(e) {}",m.6m)}},4g:B(p,48){u cv,bX=p.2l,1K=p==k.x?\'x\':\'y\';u 6Z=1i;u 46=p.A.4w;p.H=1s.5U(p.H-((p.1a(\'1M\')-p.t)/2));q(p.Hp.3o+p.5t-p.5s){q(!48&&6Z&&46){p.I=p.1a(1K==\'y\'?\'4d\':\'74\')}L q(p.1a(\'1M\')2g){ 2p=3n*2g;q(2pk.4E&&x.I>k.3y&&y.1a(\'1M\')>y.1a(\'4d\')){y.I-=10;q(2g)x.I=y.I*2g;k.3V(0,1)}}},7W:B(){u x=k.x,y=k.y;k.45(\'1k\');k.7E(1,{Y:{K:x.1a(\'1M\'),M:y.1a(\'1M\'),1e:x.H,16:y.H},O:{1e:x.1U+x.1a(\'5K\'),16:y.1U+y.1a(\'5K\'),K:x.1W||x.I,M:y.1W||y.I}},m.6m)},7E:B(2x,29,3d){q(k.1j&&!k.3k){q(2x)k.1j.4t();L k.1j.5L((k.1Z&&k.4c))}q(!2x)k.a5();u A=k,x=A.x,y=A.y,23=k.23;q(!2x)23=k.9t||23;u 4G=2x?B(){q(A.1j)A.1j.2k.F.1r="2o";4C(B(){A.a8()},50)}:B(){A.6g()};q(2x)m.P(k.Y,{K:x.t+\'E\',M:y.t+\'E\'});q(2x&&k.1Z){m.P(k.Y,{1e:(x.1C-x.cb+x.2v)+\'E\',16:(y.1C-y.cb+y.2v)+\'E\'})}q(k.9q){m.P(k.Y,{1z:2x?0:1});m.3g(29.Y,{1z:2x})}m.3N(k.Y,29.Y,{3w:3d,23:23,2Z:B(2L,2H){q(A.1j&&A.3k&&2H.1m==\'16\'){u 4p=2x?2H.H:1-2H.H;u H={w:x.t+(x.1a(\'1M\')-x.t)*4p,h:y.t+(y.1a(\'1M\')-y.t)*4p,x:x.1C+(x.H-x.1C)*4p,y:y.1C+(y.H-y.1C)*4p};A.1j.4t(H,0,1)}q(A.1Z){q(2H.1m==\'1e\')A.3D.F.1e=(x.H-2L)+\'E\';q(2H.1m==\'16\')A.3D.F.16=(y.H-2L)+\'E\'}}});m.3N(k.O,29.O,3d,23,4G);q(2x){k.Y.F.1r=\'2o\';k.O.F.1r=\'2o\';q(k.1Z)k.1g.F.1r=\'2o\';k.a.1l+=\' R-9r-9s\'}},a8:B(){k.4P=J;k.30();q(k.1Z&&k.2W==\'4G\')k.5J();q(k.W){1n{u A=k,1S=k.W.7K||k.W.4Z.U;m.1O(1S,\'6f\',B(){q(m.2i!=A.Q)A.30()})}1o(e){}q(m.1q&&1w k.4k!=\'cH\')k.W.F.K=(k.36-1)+\'E\'}q(m.3K&&m.3K==k.a)m.3K=G;k.9x();u p=m.3F,6y=m.5v.x+p.5D,6t=m.5v.y+p.5F;k.7j=k.x.H<6y&&6yk.x.1a(\'4B\')+k.x.1a(\'7O\'));u 9E=(2T.y+2T.hk.y.1a(\'4B\')+k.y.1a(\'7O\'));u 5e=m.7v(1f[i]);q(!9D&&!9E&&5e!=k.Q){q(!2h){1f[i].4H(\'1k-by\',\'[\'+k.Q+\']\');1f[i].7n=1f[i].F[1m];1f[i].F[1m]=\'1k\'}L q(2h.9X(\'[\'+k.Q+\']\')==-1){1f[i].4H(\'1k-by\',2h+\'[\'+k.Q+\']\')}}L q((2h==\'[\'+k.Q+\']\'||m.2i==5e)&&5e!=k.Q){1f[i].4H(\'1k-by\',\'\');1f[i].F[1m]=1f[i].7n||\'\'}L q(2h&&2h.9X(\'[\'+k.Q+\']\')>-1){1f[i].4H(\'1k-by\',2h.1Q(\'[\'+k.Q+\']\',\'\'))}}}}},30:B(){k.Y.F.1y=m.3T+=2;V(u i=0;i=5.5){s=s.1Q(/\\s/g,\' \').1Q(1u 4q(\']*>\',\'9S\'),\'\').1Q(1u 4q(\'<9T[^>]*>.*?\',\'9S\'),\'\');q(k.W){u 1S=k.W.7K;q(!1S&&k.W.4Z)1S=k.W.4Z.U;q(!1S){u 2Y=k;4C(B(){2Y.4V()},25);D}1S.9Q();1S.aS(s);1S.2f();1n{s=1S.6N(k.1p).2n}1o(e){1n{s=k.W.U.6N(k.1p).2n}1o(e){}}m.3e(k.W)}L{s=s.1Q(1u 4q(\'^.*?<14[^>]*>(.*?).*?$\',\'i\'),\'$1\')}}m.3Y(k.O,\'5Z\',\'R-14\').2n=s;k.2N();V(u x 3r k)k[x]=G}};q(m.1q){(B(){1n{U.59.cQ(\'1e\')}1o(e){4C(9U.cU,50);D}m.3A()})()}m.1O(U,\'cZ\',m.3A);m.1O(1F,\'5I\',m.3A);m.5c=m.1d;u c2=m.4v;m.1O(1F,\'5I\',B(){q(m.6B){u 6l=\'.R 1v\',6q=\'3u: 6r(\'+m.4n+m.6B+\'), 5O !c8;\';u F=m.Z(\'F\',{T:\'ce/6c\'},G,U.3E(\'ca\')[0]);q(!m.1q){F.1H(U.bO(6l+" {"+6q+"}"))}L{u 3v=U.au[U.au.18-1];q(1w(3v.ak)=="7a")3v.ak(6l,6q)}}});m.1O(1F,\'3p\',B(){m.5z()});m.1O(U,\'6S\',B(e){m.5v={x:e.5u,y:e.5N}});m.1O(U,\'6f\',m.7p);m.1O(U,\'91\',m.7p);m.1O(U,\'3A\',m.4N);m.1O(1F,\'5I\',m.8M);m.1O(1F,\'5I\',m.9B);',62,811,'||||||||||||||||||||this||hs||||if||||var||||||exp|function|el|return|px|style|null|pos|size|true|width|else|height|expanders|content|setStyles|key|highslide|src|type|document|for|iframe||wrapper|createElement||overlay|||body||top||length|test|get|full|position|lang|left|els|innerContent|div|false|outline|hidden|className|prop|try|catch|id|ie|visibility|Math|offset|new|img|typeof|outlineType|zIndex|opacity|overlayBox|fx|tpos|params|node|window|case|appendChild|offsetHeight|options|dim|arr|wsize|display|addEventListener|overlays|replace|container|doc|next|p1|auto|imgSize|event|push|isHtml|op|absolute|loading|easing|overflow||offsetWidth||td|to|scrollerDiv|undefined|objectType|none|dragArgs|close|ratio|hiddenBy|focusKey|elem|table|target|span|innerHTML|visible|xSize|title|href|re|wh|image|tb|name|up|100|minSize|contentType|isImage|clearing|opt|html|useBox|ucwh|args|custom|ajax|right|val|onclick|onLoad|xmlHttp|graphic|func|hsId|parentNode|elPos|match|p2|objectLoadTime|releaseMask|pThis|step|focus|groups||||opera|objectWidth||||class|li|timers|dur|discardElement|swf|extend|hasDragged|min|attribs|outlineWhileAnimating|styles|getExpander|ySize|scroll|resize|marginMin|in|onload|start|cursor|last|duration|9999px|minWidth|uaVersion|ready|sleeping|pendingOutlines|mediumContent|getElementsByTagName|page|relative|bottom|unit|now|upcoming|move|clone|animate|styleRestoreCursor|hDiff|number|wDiff|cacheBindings|zIndexCounter|cNode|sizeOverlayBox|objectHeight|scrollingContent|getElementByClass|ruler||slideshowGroup|blurExp|while|htmls|doShowHide|allowReduce|marginLeft|moveOnly|end|tagName|images|preserveContent|fitsize|parseInt|getParam|justify|contentLoaded|marginTop|filter|isClosing|padToMinWidth|getNode|graphicsDir|showLoading|fac|RegExp|block|parent|setPosition|stl|Expander|allowSizeReduction|all|navigator|preloadTheseImages|before|opos|setTimeout|restoreCursor|minHeight|on|after|setAttribute|currentStyle|cloneNode|uclt|removeEventListener|adj|getAnchors|Outline|isExpanded|mask|prototype|iebody|expand|createOverlay|loadHTML|getParams|param|safari|contentWindow||matches|cache|above|hideOnMouseOut|onLoadStarted|isHsAnchor|self|keyHandler|documentElement|curAnim|gotoEnd|langDefaults|overlayId|wrapperKey|fullExpandLabel|cachedGets|dY|onReady|preloadFullImage|dX|showHideElements|pre|init|getSrc|kdeBugCorr|allowWidthReduction|toLowerCase|marginMax|clientSize|clientX|mouse|Date|getTime|maincontent|getPageSize|Dimension|Ajax|changed|scrollLeft|xpos|scrollTop|over|anchors|load|writeExtendedContent|imgPad|destroy|tr|clientY|pointer|slideshow|Id|thumbsUserSetId|expOnly|offX|round|offY|ieLt7|previousOrNext|tId|DIV|topmostKey|250|positionOverlay|preloadTheseAjax|idCounter|preventDefault|sg|os|below|marginBottom|heading|previous|css|swfOptions|getSelfRendered|mousedown|afterClose|error|form|contentId|fitOverlayBox|sel|expandDuration|getCacheBinding|center|tbody|dec|url|cssDirection|mY|update|resizeTo|direction|getAdjacentAnchor|mX|fade|location|expandCursor|getElementContent|getInline|calcBorders|calcExpanded|marginRight|element|allowHeightReduction|setObjContainerSize|clones|sizeDiff|margin|getElementById|lt|onError|continuePreloading|overrides|mousemove|htmlGetSize|isReady|offsetTop|ucrb|Click|connectOutline|hasMovedMin||loadingPos|hasAlphaImageLoader|middle|maxsize||run|Create|thumbnailId|arrow|object|calcThumb|hasFocused|correctIframeSize|padding|moveTo|cur|blur|preloadAjaxElement|mouseIsOver|restoreTitle|swfobject|distance|origProp|garbageBin|mouseClickHandler|parseFloat|defaultView|getPosition|openerTagNames|allowMultipleInstances|getWrapperKey|setPos|max|keydown|keypress|cacheAjax|geckoMac|panel|relatedTarget|changeSize|srcElement|ie6|abs|compatMode|numberOfImagesToPreload|contentDocument|setSize|doWrapper|wrapperClassName|osize|break|credits|types|string|topZ|complete|done|show|doFullExpand|cancelLoading|dragByHeading|Text|current|state|userAgent|dragHandler|startTime|thumb|Pause|offsetParent|focusTopmost|offsetLeft|spacebar|hasHtmlExpanders|timerId|Play|captionOverlay|Close|rv|JS|Highslide|detachEvent|transit|_default|headingOverlay|skin|wrapperMouseHandler|contentWrapper|replaceLang|maxWidth|call|enableKeyListener|Previous|vis|nextTitle|nextText|previousText|previousTitle|closeText|htmlExpand|closeTitle|moveTitle|updateAnchors|onGraphicLoad|preloadGraphic|appendTo|nopad|moveText|background|preloadImages|clickY|alpha|clientWidth|loadingText|loadingOpacity|and|tag|loadingTitle|clickX|Next|Move|200|from|hide|mouseup|ul|orig|switch|pow|easeInQuad|resizeTitle|ltr||KDE|nextSibling|addOverlay|Eval|ie6SSL|creditsTitle|creditsPosition|Overlay|hideSelects|getAttribute|fullExpandOpacity|getPropertyValue|getComputedStyle|hideIframes|creditsText|creditsTarget|fadeInOut|active|anchor|easingClose|setRequestHeader|sleep|rightpanel|prepareNextOutline|getAnchorIndex|creditsHref|toString|preloadAjax|preloadNext|clearsX|clearsY|awake|gotOverlays|genOverlayBox|doPanels|BackCompat|destroyObject|writeCredits|showCredits|offsetY|leftpanel|offsetX|open|getOverlays|gi|script|arguments|createFullExpand|javascript|indexOf|fullExpandPosition|fullExpandTitle|focusTitle|cachedGet|restoreDuration|htmlPrepareClose|showOverlays|destroyOverlays|hand|XMLHttpRequest|afterExpand|XMLHTTP|both|clear|htmlSizeOperations|border|removeChild|ActiveXObject|getIframePageHeight|newHeight|flashvars|wmode|addRule|readyState|hasExtendedContent|attributes|vendor|Microsoft|correctRatio|tmpMin||reOrder|styleSheets|pageXOffset|innerHeight|clientHeight|pageYOffset|playText|playTitle|pauseText|responseText|innerWidth|Content|application|shadow|www|toUpperCase|Type|link|pauseTitle|header|Resize|bring|keyCode|front|Expand|write|cancel|Loading|registerOverlay|returnValue|caption|actual|homepage|forceAjaxReload|esc|dummy|the|useOnHtml|Powered|Go|blank|removeAttribute|maincontentEval|zoomin|zoomout|graphics|split|Requested|maxHeight|keys|maincontentText|maincontentId|headingText|_self|headingId|com|http|headingEval|1001|outlineStartOffset|oPos|Use|urlencoded|With|send|Gecko|footer||captionEval|drop|about|Macintosh|fullExpandText|drag|ra|it|click|captionText|Safari|Msxml2|captionId|onreadystatechange|sqrt|createTextNode|progid|png|outlines|outlinesDir|DXImageTransform|AlphaImageLoader|Width|Height|tgt|scale|sizingMethod|fontSize|lineHeight|HsExpander|repeat|clearInterval|eval|splice|htmlE|important|collapse|HEAD||borderCollapse|cellSpacing|text|Left|Top|embedSWF|transparent|oncontextmenu|blockRightClick|imageCreate|flushImgSize|htmlCreate|frameborder|newWidth|static|allowtransparency|flash|version|expressInstallSwfurl|tgtArr|GET|rb|Bottom|Right|insertBefore|nodeName|onmouseout|onmouseover|allowSimultaneousLoading|300|setInterval|boolean|protocol|SELECT|https|toElement|fromElement|01|default|attachEvent|doScroll|200px|white|StopPlay|callee|button|xpand|mouseover|removeSWF|DOMContentLoaded|dragSensitivity|IFRAME|paddingTop|1px|linearTween'.split('|'),0,{})) diff --git a/highslide/highslide.css b/highslide/highslide.css new file mode 100644 index 0000000..7adc169 --- /dev/null +++ b/highslide/highslide.css @@ -0,0 +1,877 @@ + +.highslide-container div { + font-family: Verdana, Helvetica; + font-size: 10pt; +} +.highslide-container table { + background: none; +} +.highslide { + outline: none; + text-decoration: none; +} +.highslide img { +/* border: 2px solid silver; */ + border: none; +} +.highslide:hover img { + border-color: gray; +} +.highslide-active-anchor img { + visibility: hidden; +} +.highslide-gallery .highslide-active-anchor img { + border-color: black; + visibility: visible; + cursor: default; +} +.highslide-image { + border-width: 2px; + border-style: solid; + border-color: white; + background: gray; +} +.highslide-wrapper, .highslide-outline { + background: white; +} +.glossy-dark { + background: #111; +} + +.highslide-image-blur { +} +.highslide-number { + font-weight: bold; + color: gray; + font-size: .9em; +} +.highslide-caption { + display: none; + font-size: 1em; + padding: 5px; + /*background: white;*/ +} +.highslide-heading { + display: none; + font-weight: bold; + margin: 0.4em; +} +.highslide-dimming { + position: absolute; + background: black; +} +a.highslide-full-expand { + background: url(graphics/fullexpand.gif) no-repeat; + display: block; + margin: 0 10px 10px 0; + width: 34px; + height: 34px; +} +.highslide-loading { + display: block; + color: black; + font-size: 9px; + font-weight: bold; + text-transform: uppercase; + text-decoration: none; + padding: 3px; + border: 1px solid white; + background-color: white; + padding-left: 22px; + background-image: url(graphics/loader.white.gif); + background-repeat: no-repeat; + background-position: 3px 1px; +} +a.highslide-credits, +a.highslide-credits i { + padding: 2px; + color: silver; + text-decoration: none; + font-size: 10px; +} +a.highslide-credits:hover, +a.highslide-credits:hover i { + color: white; + background-color: gray; +} +.highslide-move, .highslide-move * { + cursor: move; +} + +.highslide-viewport { + display: none; + position: fixed; + width: 100%; + height: 100%; + z-index: 1; + background: none; + left: 0; + top: 0; +} +.highslide-overlay { + display: none; +} +.hidden-container { + display: none; +} +/* Example of a semitransparent, offset closebutton */ +.closebutton { + position: relative; + top: -15px; + left: 15px; + width: 30px; + height: 30px; + cursor: pointer; + background: url(graphics/close.png); + /* NOTE! For IE6, you also need to update the highslide-ie6.css file. */ +} + +/*****************************************************************************/ +/* Thumbnail boxes for the galleries. */ +/* Remove these if you are not using a gallery. */ +/*****************************************************************************/ +.highslide-gallery ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.highslide-gallery ul li { + display: block; + position: relative; + float: left; + width: 106px; + height: 106px; + border: 1px solid silver; + background: #ededed; + margin: 2px; + line-height: 0; + overflow: hidden; +} +.highslide-gallery ul a { + position: absolute; + top: 50%; + left: 50%; +} +.highslide-gallery ul img { + position: relative; + top: -50%; + left: -50%; +} +html>/**/body .highslide-gallery ul li { + display: table; + text-align: center; +} +html>/**/body .highslide-gallery ul li { + text-align: center; +} +html>/**/body .highslide-gallery ul a { + position: static; + display: table-cell; + vertical-align: middle; +} +html>/**/body .highslide-gallery ul img { + position: static; +} + +/*****************************************************************************/ +/* Controls for the galleries. */ +/* Remove these if you are not using a gallery */ +/*****************************************************************************/ +.highslide-controls { + width: 195px; + height: 40px; + background: url(graphics/controlbar-white.gif) 0 -90px no-repeat; + margin: 20px 15px 10px 0; +} +.highslide-controls ul { + position: relative; + left: 15px; + height: 40px; + list-style: none; + margin: 0; + padding: 0; + background: url(graphics/controlbar-white.gif) right -90px no-repeat; + +} +.highslide-controls li { + float: left; + padding: 5px 0; + margin:0; +} +.highslide-controls a { + background-image: url(graphics/controlbar-white.gif); + display: block; + float: left; + height: 30px; + width: 30px; + outline: none; +} +.highslide-controls a.disabled { + cursor: default; +} +.highslide-controls a.disabled span { + cursor: default; +} +.highslide-controls a span { + /* hide the text for these graphic buttons */ + display: none; + cursor: pointer; +} + + +/* The CSS sprites for the controlbar - see http://www.google.com/search?q=css+sprites */ +.highslide-controls .highslide-previous a { + background-position: 0 0; +} +.highslide-controls .highslide-previous a:hover { + background-position: 0 -30px; +} +.highslide-controls .highslide-previous a.disabled { + background-position: 0 -60px !important; +} +.highslide-controls .highslide-play a { + background-position: -30px 0; +} +.highslide-controls .highslide-play a:hover { + background-position: -30px -30px; +} +.highslide-controls .highslide-play a.disabled { + background-position: -30px -60px !important; +} +.highslide-controls .highslide-pause a { + background-position: -60px 0; +} +.highslide-controls .highslide-pause a:hover { + background-position: -60px -30px; +} +.highslide-controls .highslide-next a { + background-position: -90px 0; +} +.highslide-controls .highslide-next a:hover { + background-position: -90px -30px; +} +.highslide-controls .highslide-next a.disabled { + background-position: -90px -60px !important; +} +.highslide-controls .highslide-move a { + background-position: -120px 0; +} +.highslide-controls .highslide-move a:hover { + background-position: -120px -30px; +} +.highslide-controls .highslide-full-expand a { + background-position: -150px 0; +} +.highslide-controls .highslide-full-expand a:hover { + background-position: -150px -30px; +} +.highslide-controls .highslide-full-expand a.disabled { + background-position: -150px -60px !important; +} +.highslide-controls .highslide-close a { + background-position: -180px 0; +} +.highslide-controls .highslide-close a:hover { + background-position: -180px -30px; +} + +/*****************************************************************************/ +/* Styles for the HTML popups */ +/* Remove these if you are not using Highslide HTML */ +/*****************************************************************************/ +.highslide-maincontent { + display: none; +} +.highslide-html { + background-color: white; +} +.highslide-html-content { + display: none; + width: 400px; + padding: 0 5px 5px 5px; +} +.highslide-header { + padding-bottom: 5px; +} +.highslide-header ul { + margin: 0; + padding: 0; + text-align: right; +} +.highslide-header ul li { + display: inline; + padding-left: 1em; +} +.highslide-header ul li.highslide-previous, .highslide-header ul li.highslide-next { + display: none; +} +.highslide-header a { + font-weight: bold; + color: gray; + text-transform: uppercase; + text-decoration: none; +} +.highslide-header a:hover { + color: black; +} +.highslide-header .highslide-move a { + cursor: move; +} +.highslide-footer { + height: 16px; +} +.highslide-footer .highslide-resize { + display: block; + float: right; + margin-top: 5px; + height: 11px; + width: 11px; + background: url(graphics/resize.gif) no-repeat; +} +.highslide-footer .highslide-resize span { + display: none; +} +.highslide-body { +} +.highslide-resize { + cursor: nw-resize; +} + +/*****************************************************************************/ +/* Styles for the Individual wrapper class names. */ +/* See www.highslide.com/ref/hs.wrapperClassName */ +/* You can safely remove the class name themes you don't use */ +/*****************************************************************************/ + +/* hs.wrapperClassName = 'draggable-header' */ +.draggable-header .highslide-header { + height: 18px; + border-bottom: 1px solid #dddddd; +} +.draggable-header .highslide-heading { + position: absolute; + margin: 2px 0.4em; +} + +.draggable-header .highslide-header .highslide-move { + cursor: move; + display: block; + height: 16px; + position: absolute; + right: 24px; + top: 0; + width: 100%; + z-index: 1; +} +.draggable-header .highslide-header .highslide-move * { + display: none; +} +.draggable-header .highslide-header .highslide-close { + position: absolute; + right: 2px; + top: 2px; + z-index: 2; + padding: 0; +} +.draggable-header .highslide-header .highslide-close a { + display: block; + height: 16px; + width: 16px; + background-image: url(graphics/closeX.png); +} +.draggable-header .highslide-header .highslide-close a:hover { + background-position: 0 16px; +} +.draggable-header .highslide-header .highslide-close span { + display: none; +} +.draggable-header .highslide-maincontent { + padding-top: 1em; +} + +/* hs.wrapperClassName = 'titlebar' */ +.titlebar .highslide-header { + height: 18px; + border-bottom: 1px solid #dddddd; +} +.titlebar .highslide-heading { + position: absolute; + margin: 1px 0.4em; + color: #666666; +} + +.titlebar .highslide-header .highslide-move { + cursor: move; + display: block; + height: 16px; + position: absolute; + right: 24px; + top: 0; + width: 100%; + z-index: 1; +} +.titlebar .highslide-header .highslide-move * { + display: none; +} +.titlebar .highslide-header li { + position: relative; + top: 3px; + z-index: 2; + padding: 0 0 0 1em; +} +.titlebar .highslide-maincontent { + padding-top: 1em; +} + +/* hs.wrapperClassName = 'no-footer' */ +.no-footer .highslide-footer { + display: none; +} + +/* hs.wrapperClassName = 'wide-border' */ +.wide-border { + background: white; +} +.wide-border .highslide-image { + border-width: 10px; +} +.wide-border .highslide-caption { + padding: 0 10px 10px 10px; +} + +/* hs.wrapperClassName = 'borderless' */ +.borderless .highslide-image { + border: none; +} +.borderless .highslide-caption { + border-bottom: 1px solid white; + border-top: 1px solid white; + background: silver; +} + +/* hs.wrapperClassName = 'outer-glow' */ +.outer-glow { + background: #444; +} +.outer-glow .highslide-image { + border: 5px solid #444444; +} +.outer-glow .highslide-caption { + border: 5px solid #444444; + border-top: none; + padding: 5px; + background-color: gray; +} + +/* hs.wrapperClassName = 'colored-border' */ +.colored-border { + background: white; +} +.colored-border .highslide-image { + border: 2px solid green; +} +.colored-border .highslide-caption { + border: 2px solid green; + border-top: none; +} + +/* hs.wrapperClassName = 'dark' */ +.dark { + background: #111; +} +.dark .highslide-image { + border-color: black black #202020 black; + background: gray; +} +.dark .highslide-caption { + color: white; + background: #111; +} +.dark .highslide-controls, +.dark .highslide-controls ul, +.dark .highslide-controls a { + background-image: url(graphics/controlbar-black-border.gif); +} + +/* hs.wrapperClassName = 'floating-caption' */ +.floating-caption .highslide-caption { + position: absolute; + padding: 1em 0 0 0; + background: none; + color: white; + border: none; + font-weight: bold; +} + +/* hs.wrapperClassName = 'controls-in-heading' */ +.controls-in-heading .highslide-heading { + color: gray; + font-weight: bold; + height: 20px; + overflow: hidden; + cursor: default; + padding: 0 0 0 22px; + margin: 0; + background: url(graphics/icon.gif) no-repeat 0 1px; +} +.controls-in-heading .highslide-controls { + width: 105px; + height: 20px; + position: relative; + margin: 0; + top: -23px; + left: 7px; + background: none; +} +.controls-in-heading .highslide-controls ul { + position: static; + height: 20px; + background: none; +} +.controls-in-heading .highslide-controls li { + padding: 0; +} +.controls-in-heading .highslide-controls a { + background-image: url(graphics/controlbar-white-small.gif); + height: 20px; + width: 20px; +} + +.controls-in-heading .highslide-controls .highslide-move { + display: none; +} + +.controls-in-heading .highslide-controls .highslide-previous a { + background-position: 0 0; +} +.controls-in-heading .highslide-controls .highslide-previous a:hover { + background-position: 0 -20px; +} +.controls-in-heading .highslide-controls .highslide-previous a.disabled { + background-position: 0 -40px !important; +} +.controls-in-heading .highslide-controls .highslide-play a { + background-position: -20px 0; +} +.controls-in-heading .highslide-controls .highslide-play a:hover { + background-position: -20px -20px; +} +.controls-in-heading .highslide-controls .highslide-play a.disabled { + background-position: -20px -40px !important; +} +.controls-in-heading .highslide-controls .highslide-pause a { + background-position: -40px 0; +} +.controls-in-heading .highslide-controls .highslide-pause a:hover { + background-position: -40px -20px; +} +.controls-in-heading .highslide-controls .highslide-next a { + background-position: -60px 0; +} +.controls-in-heading .highslide-controls .highslide-next a:hover { + background-position: -60px -20px; +} +.controls-in-heading .highslide-controls .highslide-next a.disabled { + background-position: -60px -40px !important; +} +.controls-in-heading .highslide-controls .highslide-full-expand a { + background-position: -100px 0; +} +.controls-in-heading .highslide-controls .highslide-full-expand a:hover { + background-position: -100px -20px; +} +.controls-in-heading .highslide-controls .highslide-full-expand a.disabled { + background-position: -100px -40px !important; +} +.controls-in-heading .highslide-controls .highslide-close a { + background-position: -120px 0; +} +.controls-in-heading .highslide-controls .highslide-close a:hover { + background-position: -120px -20px; +} + +/*****************************************************************************/ +/* Styles for text based controls. */ +/* You can safely remove this if you don't use text based controls */ +/*****************************************************************************/ + +.text-controls .highslide-controls { + width: auto; + height: auto; + margin: 0; + text-align: center; + background: none; +} +.text-controls ul { + position: static; + background: none; + height: auto; + left: 0; +} +.text-controls .highslide-move { + display: none; +} +.text-controls li { + background-image: url(graphics/controlbar-text-buttons.png); + background-position: right top !important; + padding: 0; + margin-left: 15px; + display: block; + width: auto; +} +.text-controls a { + background: url(graphics/controlbar-text-buttons.png) no-repeat; + background-position: left top !important; + position: relative; + left: -10px; + display: block; + width: auto; + height: auto; + text-decoration: none !important; +} +.text-controls a span { + background: url(graphics/controlbar-text-buttons.png) no-repeat; + margin: 1px 2px 1px 10px; + display: block; + min-width: 4em; + height: 18px; + line-height: 18px; + padding: 1px 0 1px 18px; + color: #333; + font-family: "Trebuchet MS", Arial, sans-serif; + font-size: 12px; + font-weight: bold; + white-space: nowrap; +} +.text-controls .highslide-next { + margin-right: 1em; +} +.text-controls .highslide-full-expand a span { + min-width: 0; + margin: 1px 0; + padding: 1px 0 1px 10px; +} +.text-controls .highslide-close a span { + min-width: 0; +} +.text-controls a:hover span { + color: black; +} +.text-controls a.disabled span { + color: #999; +} + +.text-controls .highslide-previous span { + background-position: 0 -40px; +} +.text-controls .highslide-previous a.disabled { + background-position: left top !important; +} +.text-controls .highslide-previous a.disabled span { + background-position: 0 -140px; +} +.text-controls .highslide-play span { + background-position: 0 -60px; +} +.text-controls .highslide-play a.disabled { + background-position: left top !important; +} +.text-controls .highslide-play a.disabled span { + background-position: 0 -160px; +} +.text-controls .highslide-pause span { + background-position: 0 -80px; +} +.text-controls .highslide-next span { + background-position: 0 -100px; +} +.text-controls .highslide-next a.disabled { + background-position: left top !important; +} +.text-controls .highslide-next a.disabled span { + background-position: 0 -200px; +} +.text-controls .highslide-full-expand span { + background: none; +} +.text-controls .highslide-full-expand a.disabled { + background-position: left top !important; +} +.text-controls .highslide-close span { + background-position: 0 -120px; +} + + +/*****************************************************************************/ +/* Styles for the thumbstrip. */ +/* See www.highslide.com/ref/hs.addSlideshow */ +/* You can safely remove this if you don't use a thumbstrip */ +/*****************************************************************************/ + +.highslide-thumbstrip { + height: 100%; +} +.highslide-thumbstrip div { + overflow: hidden; +} +.highslide-thumbstrip table { + position: relative; + padding: 0; + border-collapse: collapse; +} +.highslide-thumbstrip td { + padding: 1px; + /*text-align: center;*/ +} +.highslide-thumbstrip a { + outline: none; +} +.highslide-thumbstrip img { + display: block; + border: 1px solid gray; + margin: 0 auto; +} +.highslide-thumbstrip .highslide-active-anchor img { + visibility: visible; +} +.highslide-thumbstrip .highslide-marker { + position: absolute; + width: 0; + height: 0; + border-width: 0; + border-style: solid; + border-color: transparent; /* change this to actual background color in highslide-ie6.css */ +} +.highslide-thumbstrip-horizontal div { + width: auto; + /* width: 100% breaks in small strips in IE */ +} +.highslide-thumbstrip-horizontal .highslide-scroll-up { + display: none; + position: absolute; + top: 3px; + left: 3px; + width: 25px; + height: 42px; +} +.highslide-thumbstrip-horizontal .highslide-scroll-up div { + margin-bottom: 10px; + cursor: pointer; + background: url(graphics/scrollarrows.png) left center no-repeat; + height: 42px; +} +.highslide-thumbstrip-horizontal .highslide-scroll-down { + display: none; + position: absolute; + top: 3px; + right: 3px; + width: 25px; + height: 42px; +} +.highslide-thumbstrip-horizontal .highslide-scroll-down div { + margin-bottom: 10px; + cursor: pointer; + background: url(graphics/scrollarrows.png) center right no-repeat; + height: 42px; +} +.highslide-thumbstrip-horizontal table { + margin: 2px 0 10px 0; +} +.highslide-viewport .highslide-thumbstrip-horizontal table { + margin-left: 10px; +} +.highslide-thumbstrip-horizontal img { + width: auto; + height: 40px; +} +.highslide-thumbstrip-horizontal .highslide-marker { + top: 47px; + border-left-width: 6px; + border-right-width: 6px; + border-bottom: 6px solid gray; +} +.highslide-viewport .highslide-thumbstrip-horizontal .highslide-marker { + margin-left: 10px; +} +.dark .highslide-thumbstrip-horizontal .highslide-marker, .highslide-viewport .highslide-thumbstrip-horizontal .highslide-marker { + border-bottom-color: white !important; +} +.highslide-thumbstrip-vertical div { + height: 100%; +} +.highslide-thumbstrip-vertical a { + display: block; +} +.highslide-thumbstrip-vertical .highslide-scroll-up { + display: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 25px; +} +.highslide-thumbstrip-vertical .highslide-scroll-up div { + margin-left: 10px; + cursor: pointer; + background: url(graphics/scrollarrows.png) top center no-repeat; + height: 25px; +} +.highslide-thumbstrip-vertical .highslide-scroll-down { + display: none; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 25px; +} +.highslide-thumbstrip-vertical .highslide-scroll-down div { + margin-left: 10px; + cursor: pointer; + background: url(graphics/scrollarrows.png) bottom center no-repeat; + height: 25px; +} +.highslide-thumbstrip-vertical table { + margin: 10px 0 0 10px; +} +.highslide-thumbstrip-vertical img { + max-width: 60px; +} +.highslide-thumbstrip-vertical .highslide-marker { + left: 0; + margin-top: 8px; + border-top-width: 6px; + border-bottom-width: 6px; + border-left: 6px solid gray; +} +.dark .highslide-thumbstrip-vertical .highslide-marker, .highslide-viewport .highslide-thumbstrip-vertical .highslide-marker { + border-left-color: white; +} + +.highslide-viewport .highslide-thumbstrip-float { + overflow: auto; +} +.highslide-thumbstrip-float ul { + margin: 2px 0; + padding: 0; +} +.highslide-thumbstrip-float li { + display: block; + height: 60px; + margin: 0 2px; + list-style: none; + float: left; +} +.highslide-thumbstrip-float img { + display: inline; + border-color: silver; + max-height: 56px; +} +.highslide-thumbstrip-float .highslide-active-anchor img { + border-color: black; +} +.highslide-thumbstrip-float .highslide-scroll-up div, .highslide-thumbstrip-float .highslide-scroll-down div { + display: none; +} +.highslide-thumbstrip-float .highslide-marker { + display: none; +} \ No newline at end of file diff --git a/highslide/highslide.js b/highslide/highslide.js new file mode 100644 index 0000000..43419b6 --- /dev/null +++ b/highslide/highslide.js @@ -0,0 +1,1872 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +Author: Torstein H�nsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +var hs = { +// Language strings +lang : { + cssDirection: 'ltr', + loadingText : 'Loading...', + loadingTitle : 'Click to cancel', + focusTitle : 'Click to bring to front', + fullExpandTitle : 'Expand to actual size (f)', + creditsText : 'Powered by Highslide JS', + creditsTitle : 'Go to the Highslide JS homepage', + restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.' +}, +// See http://highslide.com/ref for examples of settings +graphicsDir : 'highslide/graphics/', +expandCursor : 'zoomin.cur', // null disables +restoreCursor : 'zoomout.cur', // null disables +expandDuration : 250, // milliseconds +restoreDuration : 250, +marginLeft : 15, +marginRight : 15, +marginTop : 15, +marginBottom : 15, +zIndexCounter : 1001, // adjust to other absolutely positioned elements +loadingOpacity : 0.75, +allowMultipleInstances: true, +numberOfImagesToPreload : 5, +outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only +outlineStartOffset : 3, // ends at 10 +padToMinWidth : false, // pad the popup width to make room for wide caption +fullExpandPosition : 'bottom right', +fullExpandOpacity : 1, +showCredits : true, // you can set this to false if you want +creditsHref : 'http://highslide.com/', +creditsTarget : '_self', +enableKeyListener : true, +openerTagNames : ['a'], // Add more to allow slideshow indexing + +dragByHeading: true, +minWidth: 200, +minHeight: 200, +allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight +outlineType : 'drop-shadow', // set null to disable outlines +// END OF YOUR SETTINGS + + +// declare internal properties +preloadTheseImages : [], +continuePreloading: true, +expanders : [], +overrides : [ + 'allowSizeReduction', + 'useBox', + 'outlineType', + 'outlineWhileAnimating', + 'captionId', + 'captionText', + 'captionEval', + 'captionOverlay', + 'headingId', + 'headingText', + 'headingEval', + 'headingOverlay', + 'creditsPosition', + 'dragByHeading', + + 'width', + 'height', + + 'wrapperClassName', + 'minWidth', + 'minHeight', + 'maxWidth', + 'maxHeight', + 'slideshowGroup', + 'easing', + 'easingClose', + 'fadeInOut', + 'src' +], +overlays : [], +idCounter : 0, +oPos : { + x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], + y: ['above', 'top', 'middle', 'bottom', 'below'] +}, +mouse: {}, +headingOverlay: {}, +captionOverlay: {}, +timers : [], + +pendingOutlines : {}, +clones : {}, +onReady: [], +uaVersion: parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), +ie : (document.all && !window.opera), +safari : /Safari/.test(navigator.userAgent), +geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), + +$ : function (id) { + if (id) return document.getElementById(id); +}, + +push : function (arr, val) { + arr[arr.length] = val; +}, + +createElement : function (tag, attribs, styles, parent, nopad) { + var el = document.createElement(tag); + if (attribs) hs.extend(el, attribs); + if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); + if (styles) hs.setStyles(el, styles); + if (parent) parent.appendChild(el); + return el; +}, + +extend : function (el, attribs) { + for (var x in attribs) el[x] = attribs[x]; + return el; +}, + +setStyles : function (el, styles) { + for (var x in styles) { + if (hs.ie && x == 'opacity') { + if (styles[x] > 0.99) el.style.removeAttribute('filter'); + else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; + } + else el.style[x] = styles[x]; + } +}, +animate: function(el, prop, opt) { + var start, + end, + unit; + if (typeof opt != 'object' || opt === null) { + var args = arguments; + opt = { + duration: args[2], + easing: args[3], + complete: args[4] + }; + } + if (typeof opt.duration != 'number') opt.duration = 250; + opt.easing = Math[opt.easing] || Math.easeInQuad; + opt.curAnim = hs.extend({}, prop); + for (var name in prop) { + var e = new hs.fx(el, opt , name ); + + start = parseFloat(hs.css(el, name)) || 0; + end = parseFloat(prop[name]); + unit = name != 'opacity' ? 'px' : ''; + + e.custom( start, end, unit ); + } +}, +css: function(el, prop) { + if (document.defaultView) { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop); + + } else { + if (prop == 'opacity') prop = 'filter'; + var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })]; + if (prop == 'filter') + val = val.replace(/alpha\(opacity=([0-9]+)\)/, + function (a, b) { return b / 100 }); + return val === '' ? 1 : val; + } +}, + +getPageSize : function () { + var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' + ? d.documentElement : d.body; + + var width = hs.ie ? iebody.clientWidth : + (d.documentElement.clientWidth || self.innerWidth), + height = hs.ie ? iebody.clientHeight : self.innerHeight; + + hs.page = { + width: width, + height: height, + scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, + scrollTop: hs.ie ? iebody.scrollTop : pageYOffset + } +}, + +getPosition : function(el) { + var p = { x: el.offsetLeft, y: el.offsetTop }; + while (el.offsetParent) { + el = el.offsetParent; + p.x += el.offsetLeft; + p.y += el.offsetTop; + if (el != document.body && el != document.documentElement) { + p.x -= el.scrollLeft; + p.y -= el.scrollTop; + } + } + return p; +}, + +expand : function(a, params, custom, type) { + if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); + if (typeof a.getParams == 'function') return params; + try { + new hs.Expander(a, params, custom); + return false; + } catch (e) { return true; } +}, + + +focusTopmost : function() { + var topZ = 0, + topmostKey = -1, + expanders = hs.expanders, + exp, + zIndex; + for (var i = 0; i < expanders.length; i++) { + exp = expanders[i]; + if (exp) { + zIndex = exp.wrapper.style.zIndex; + if (zIndex && zIndex > topZ) { + topZ = zIndex; + topmostKey = i; + } + } + } + if (topmostKey == -1) hs.focusKey = -1; + else expanders[topmostKey].focus(); +}, + +getParam : function (a, param) { + a.getParams = a.onclick; + var p = a.getParams ? a.getParams() : null; + a.getParams = null; + + return (p && typeof p[param] != 'undefined') ? p[param] : + (typeof hs[param] != 'undefined' ? hs[param] : null); +}, + +getSrc : function (a) { + var src = hs.getParam(a, 'src'); + if (src) return src; + return a.href; +}, + +getNode : function (id) { + var node = hs.$(id), clone = hs.clones[id], a = {}; + if (!node && !clone) return null; + if (!clone) { + clone = node.cloneNode(true); + clone.id = ''; + hs.clones[id] = clone; + return node; + } else { + return clone.cloneNode(true); + } +}, + +discardElement : function(d) { + if (d) hs.garbageBin.appendChild(d); + hs.garbageBin.innerHTML = ''; +}, +transit : function (adj, exp) { + var last = exp = exp || hs.getExpander(); + if (hs.upcoming) return false; + else hs.last = last; + try { + hs.upcoming = adj; + adj.onclick(); + } catch (e){ + hs.last = hs.upcoming = null; + } + try { + exp.close(); + } catch (e) {} + return false; +}, + +previousOrNext : function (el, op) { + var exp = hs.getExpander(el); + if (exp) { + adj = exp.getAdjacentAnchor(op); + return hs.transit(adj, exp); + } else return false; +}, + +previous : function (el) { + return hs.previousOrNext(el, -1); +}, + +next : function (el) { + return hs.previousOrNext(el, 1); +}, + +keyHandler : function(e) { + if (!e) e = window.event; + if (!e.target) e.target = e.srcElement; // ie + if (typeof e.target.form != 'undefined') return true; // form element has focus + var exp = hs.getExpander(); + + var op = null; + switch (e.keyCode) { + case 70: // f + if (exp) exp.doFullExpand(); + return true; + case 32: // Space + case 34: // Page Down + case 39: // Arrow right + case 40: // Arrow down + op = 1; + break; + case 8: // Backspace + case 33: // Page Up + case 37: // Arrow left + case 38: // Arrow up + op = -1; + break; + case 27: // Escape + case 13: // Enter + op = 0; + } + if (op !== null) {hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + if (!hs.enableKeyListener) return true; + + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + if (exp) { + if (op == 0) { + exp.close(); + } else { + hs.previousOrNext(exp.key, op); + } + return false; + } + } + return true; +}, + + +registerOverlay : function (overlay) { + hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } )); +}, + + +getWrapperKey : function (element, expOnly) { + var el, re = /^highslide-wrapper-([0-9]+)$/; + // 1. look in open expanders + el = element; + while (el.parentNode) { + if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); + el = el.parentNode; + } + // 2. look in thumbnail + if (!expOnly) { + el = element; + while (el.parentNode) { + if (el.tagName && hs.isHsAnchor(el)) { + for (var key = 0; key < hs.expanders.length; key++) { + var exp = hs.expanders[key]; + if (exp && exp.a == el) return key; + } + } + el = el.parentNode; + } + } + return null; +}, + +getExpander : function (el, expOnly) { + if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; + if (typeof el == 'number') return hs.expanders[el] || null; + if (typeof el == 'string') el = hs.$(el); + return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; +}, + +isHsAnchor : function (a) { + return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); +}, + +reOrder : function () { + for (var i = 0; i < hs.expanders.length; i++) + if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); +}, + +mouseClickHandler : function(e) +{ + if (!e) e = window.event; + if (e.button > 1) return true; + if (!e.target) e.target = e.srcElement; + + var el = e.target; + while (el.parentNode + && !(/highslide-(image|move|html|resize)/.test(el.className))) + { + el = el.parentNode; + } + var exp = hs.getExpander(el); + if (exp && (exp.isClosing || !exp.isExpanded)) return true; + + if (exp && e.type == 'mousedown') { + if (e.target.form) return true; + var match = el.className.match(/highslide-(image|move|resize)/); + if (match) { + hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos, + height: exp.y.size, clickX: e.clientX, clickY: e.clientY }; + + + hs.addEventListener(document, 'mousemove', hs.dragHandler); + if (e.preventDefault) e.preventDefault(); // FF + + if (/highslide-(image|html)-blur/.test(exp.content.className)) { + exp.focus(); + hs.hasFocused = true; + } + return false; + } + } else if (e.type == 'mouseup') { + + hs.removeEventListener(document, 'mousemove', hs.dragHandler); + + if (hs.dragArgs) { + if (hs.styleRestoreCursor && hs.dragArgs.type == 'image') + hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; + var hasDragged = hs.dragArgs.hasDragged; + + if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { + exp.close(); + } + else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { + hs.dragArgs.exp.doShowHide('hidden'); + } + + hs.hasFocused = false; + hs.dragArgs = null; + + } else if (/highslide-image-blur/.test(el.className)) { + el.style.cursor = hs.styleRestoreCursor; + } + } + return false; +}, + +dragHandler : function(e) +{ + if (!hs.dragArgs) return true; + if (!e) e = window.event; + var a = hs.dragArgs, exp = a.exp; + + a.dX = e.clientX - a.clickX; + a.dY = e.clientY - a.clickY; + + var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); + if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) + || (distance > (hs.dragSensitivity || 5)); + + if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { + + if (a.type == 'resize') exp.resize(a); + else { + exp.moveTo(a.left + a.dX, a.top + a.dY); + if (a.type == 'image') exp.content.style.cursor = 'move'; + } + } + return false; +}, + +wrapperMouseHandler : function (e) { + try { + if (!e) e = window.event; + var over = /mouseover/i.test(e.type); + if (!e.target) e.target = e.srcElement; // ie + if (hs.ie) e.relatedTarget = + over ? e.fromElement : e.toElement; // ie + var exp = hs.getExpander(e.target); + if (!exp.isExpanded) return; + if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp + || hs.dragArgs) return; + for (var i = 0; i < exp.overlays.length; i++) (function() { + var o = hs.$('hsId'+ exp.overlays[i]); + if (o && o.hideOnMouseOut) { + if (over) hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur); + } + })(); + } catch (e) {} +}, +addEventListener : function (el, event, func) { + if (el == document && event == 'ready') hs.push(hs.onReady, func); + try { + el.addEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + el.attachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = func; + } + } +}, + +removeEventListener : function (el, event, func) { + try { + el.removeEventListener(event, func, false); + } catch (e) { + try { + el.detachEvent('on'+ event, func); + } catch (e) { + el['on'+ event] = null; + } + } +}, + +preloadFullImage : function (i) { + if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { + var img = document.createElement('img'); + img.onload = function() { + img = null; + hs.preloadFullImage(i + 1); + }; + img.src = hs.preloadTheseImages[i]; + } +}, +preloadImages : function (number) { + if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; + + var arr = hs.getAnchors(); + for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { + hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); + } + + // preload outlines + if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); + else + + hs.preloadFullImage(0); + + // preload cursor + if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); +}, + + +init : function () { + if (!hs.container) { + + hs.getPageSize(); + hs.ieLt7 = hs.ie && hs.uaVersion < 7; + for (var x in hs.langDefaults) { + if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; + else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') + hs.lang[x] = hs.langDefaults[x]; + } + + hs.container = hs.createElement('div', { + className: 'highslide-container' + }, { + position: 'absolute', + left: 0, + top: 0, + width: '100%', + zIndex: hs.zIndexCounter, + direction: 'ltr' + }, + document.body, + true + ); + hs.loading = hs.createElement('a', { + className: 'highslide-loading', + title: hs.lang.loadingTitle, + innerHTML: hs.lang.loadingText, + href: 'javascript:;' + }, { + position: 'absolute', + top: '-9999px', + opacity: hs.loadingOpacity, + zIndex: 1 + }, hs.container + ); + hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); + + // http://www.robertpenner.com/easing/ + Math.linearTween = function (t, b, c, d) { + return c*t/d + b; + }; + Math.easeInQuad = function (t, b, c, d) { + return c*(t/=d)*t + b; + }; + + hs.hideSelects = hs.ieLt7; + hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' + || (hs.ie && hs.uaVersion < 5.5)); + } +}, +ready : function() { + if (hs.isReady) return; + hs.isReady = true; + + for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i](); +}, + +updateAnchors : function() { + var el, els, all = [], images = [],groups = {}, re; + + for (var i = 0; i < hs.openerTagNames.length; i++) { + els = document.getElementsByTagName(hs.openerTagNames[i]); + for (var j = 0; j < els.length; j++) { + el = els[j]; + re = hs.isHsAnchor(el); + if (re) { + hs.push(all, el); + if (re[0] == 'hs.expand') hs.push(images, el); + var g = hs.getParam(el, 'slideshowGroup') || 'none'; + if (!groups[g]) groups[g] = []; + hs.push(groups[g], el); + } + } + } + hs.anchors = { all: all, groups: groups, images: images }; + return hs.anchors; + +}, + +getAnchors : function() { + return hs.anchors || hs.updateAnchors(); +}, + + +close : function(el) { + var exp = hs.getExpander(el); + if (exp) exp.close(); + return false; +} +}; // end hs object +hs.fx = function( elem, options, prop ){ + this.options = options; + this.elem = elem; + this.prop = prop; + + if (!options.orig) options.orig = {}; +}; +hs.fx.prototype = { + update: function(){ + (hs.fx.step[this.prop] || hs.fx.step._default)(this); + + if (this.options.step) + this.options.step.call(this.elem, this.now, this); + + }, + custom: function(from, to, unit){ + this.startTime = (new Date()).getTime(); + this.start = from; + this.end = to; + this.unit = unit;// || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + + var self = this; + function t(gotoEnd){ + return self.step(gotoEnd); + } + + t.elem = this.elem; + + if ( t() && hs.timers.push(t) == 1 ) { + hs.timerId = setInterval(function(){ + var timers = hs.timers; + + for ( var i = 0; i < timers.length; i++ ) + if ( !timers[i]() ) + timers.splice(i--, 1); + + if ( !timers.length ) { + clearInterval(hs.timerId); + } + }, 13); + } + }, + step: function(gotoEnd){ + var t = (new Date()).getTime(); + if ( gotoEnd || t >= this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + var done = true; + for ( var i in this.options.curAnim ) + if ( this.options.curAnim[i] !== true ) + done = false; + + if ( done ) { + if (this.options.complete) this.options.complete.call(this.elem); + } + return false; + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + this.pos = this.options.easing(n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + this.update(); + } + return true; + } + +}; + +hs.extend( hs.fx, { + step: { + + opacity: function(fx){ + hs.setStyles(fx.elem, { opacity: fx.now }); + }, + + _default: function(fx){ + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + else + fx.elem[ fx.prop ] = fx.now; + } + } +}); + +hs.Outline = function (outlineType, onLoad) { + this.onLoad = onLoad; + this.outlineType = outlineType; + var v = hs.uaVersion, tr; + + this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; + if (!outlineType) { + if (onLoad) onLoad(); + return; + } + + hs.init(); + this.table = hs.createElement( + 'table', { + cellSpacing: 0 + }, { + visibility: 'hidden', + position: 'absolute', + borderCollapse: 'collapse', + width: 0 + }, + hs.container, + true + ); + var tbody = hs.createElement('tbody', null, null, this.table, 1); + + this.td = []; + for (var i = 0; i <= 8; i++) { + if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); + this.td[i] = hs.createElement('td', null, null, tr, true); + var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; + hs.setStyles(this.td[i], style); + } + this.td[4].className = outlineType +' highslide-outline'; + + this.preloadGraphic(); +}; + +hs.Outline.prototype = { +preloadGraphic : function () { + var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; + + var appendTo = hs.safari ? hs.container : null; + this.graphic = hs.createElement('img', null, { position: 'absolute', + top: '-9999px' }, appendTo, true); // for onload trigger + + var pThis = this; + this.graphic.onload = function() { pThis.onGraphicLoad(); }; + + this.graphic.src = src; +}, + +onGraphicLoad : function () { + var o = this.offset = this.graphic.width / 4, + pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], + dim = { height: (2*o) +'px', width: (2*o) +'px' }; + for (var i = 0; i <= 8; i++) { + if (pos[i]) { + if (this.hasAlphaImageLoader) { + var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; + var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); + hs.createElement ('div', null, { + filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", + position: 'absolute', + width: w, + height: this.graphic.height +'px', + left: (pos[i][0]*o)+'px', + top: (pos[i][1]*o)+'px' + }, + div, + true); + } else { + hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); + } + + if (window.opera && (i == 3 || i ==5)) + hs.createElement('div', null, dim, this.td[i], true); + + hs.setStyles (this.td[i], dim); + } + } + this.graphic = null; + if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); + hs.pendingOutlines[this.outlineType] = this; + if (this.onLoad) this.onLoad(); +}, + +setPosition : function (pos, offset, vis, dur, easing) { + var exp = this.exp, + stl = exp.wrapper.style, + offset = offset || 0, + pos = pos || { + x: exp.x.pos + offset, + y: exp.y.pos + offset, + w: exp.x.get('wsize') - 2 * offset, + h: exp.y.get('wsize') - 2 * offset + }; + if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) + ? 'visible' : 'hidden'; + hs.setStyles(this.table, { + left: (pos.x - this.offset) +'px', + top: (pos.y - this.offset) +'px', + width: (pos.w + 2 * this.offset) +'px' + }); + + pos.w -= 2 * this.offset; + pos.h -= 2 * this.offset; + hs.setStyles (this.td[4], { + width: pos.w >= 0 ? pos.w +'px' : 0, + height: pos.h >= 0 ? pos.h +'px' : 0 + }); + if (this.hasAlphaImageLoader) this.td[3].style.height + = this.td[5].style.height = this.td[4].style.height; + +}, + +destroy : function(hide) { + if (hide) this.table.style.visibility = 'hidden'; + else hs.discardElement(this.table); +} +}; + +hs.Dimension = function(exp, dim) { + this.exp = exp; + this.dim = dim; + this.ucwh = dim == 'x' ? 'Width' : 'Height'; + this.wh = this.ucwh.toLowerCase(); + this.uclt = dim == 'x' ? 'Left' : 'Top'; + this.lt = this.uclt.toLowerCase(); + this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; + this.rb = this.ucrb.toLowerCase(); + this.p1 = this.p2 = 0; +}; +hs.Dimension.prototype = { +get : function(key) { + switch (key) { + case 'loadingPos': + return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; + case 'wsize': + return this.size + 2 * this.cb + this.p1 + this.p2; + case 'fitsize': + return this.clientSize - this.marginMin - this.marginMax; + case 'maxsize': + return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ; + case 'opos': + return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); + case 'osize': + return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); + case 'imgPad': + return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; + + } +}, +calcBorders: function() { + // correct for borders + this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; + this.marginMax = hs['margin'+ this.ucrb]; +}, +calcThumb: function() { + this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : + this.exp.el['offset'+ this.ucwh]; + this.tpos = this.exp.tpos[this.dim]; + this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; + if (this.tpos < 1) { + this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; + }; +}, +calcExpanded: function() { + var exp = this.exp; + this.justify = 'auto'; + + + // size and position + this.pos = this.tpos - this.cb + this.tb; + this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full); + this.minSize = exp.allowSizeReduction ? + Math.min(exp['min'+ this.ucwh], this.full) :this.full; + if (exp.isImage && exp.useBox) { + this.size = exp[this.wh]; + this.imgSize = this.full; + } + if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth; + this.marginMin = hs['margin'+ this.uclt]; + this.scroll = hs.page['scroll'+ this.uclt]; + this.clientSize = hs.page[this.wh]; +}, +setSize: function(i) { + var exp = this.exp; + if (exp.isImage && (exp.useBox || hs.padToMinWidth)) { + this.imgSize = i; + this.size = Math.max(this.size, this.imgSize); + exp.content.style[this.lt] = this.get('imgPad')+'px'; + } else + this.size = i; + + exp.content.style[this.wh] = i +'px'; + exp.wrapper.style[this.wh] = this.get('wsize') +'px'; + if (exp.outline) exp.outline.setPosition(); + if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true); +}, +setPos: function(i) { + this.pos = i; + this.exp.wrapper.style[this.lt] = i +'px'; + + if (this.exp.outline) this.exp.outline.setPosition(); + +} +}; + +hs.Expander = function(a, params, custom, contentType) { + if (document.readyState && hs.ie && !hs.isReady) { + hs.addEventListener(document, 'ready', function() { + new hs.Expander(a, params, custom, contentType); + }); + return; + } + this.a = a; + this.custom = custom; + this.contentType = contentType || 'image'; + this.isImage = !this.isHtml; + + hs.continuePreloading = false; + this.overlays = []; + hs.init(); + var key = this.key = hs.expanders.length; + // override inline parameters + for (var i = 0; i < hs.overrides.length; i++) { + var name = hs.overrides[i]; + this[name] = params && typeof params[name] != 'undefined' ? + params[name] : hs[name]; + } + if (!this.src) this.src = a.href; + + // get thumb + var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a; + el = this.thumb = el.getElementsByTagName('img')[0] || el; + this.thumbsUserSetId = el.id || a.id; + + // check if already open + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].a == a) { + hs.expanders[i].focus(); + return false; + } + } + + // cancel other + if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { + hs.expanders[i].cancelLoading(); + } + } + hs.expanders[key] = this; + if (!hs.allowMultipleInstances && !hs.upcoming) { + if (hs.expanders[key-1]) hs.expanders[key-1].close(); + if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) + hs.expanders[hs.focusKey].close(); + } + + // initiate metrics + this.el = el; + this.tpos = hs.getPosition(el); + hs.getPageSize(); + var x = this.x = new hs.Dimension(this, 'x'); + x.calcThumb(); + var y = this.y = new hs.Dimension(this, 'y'); + y.calcThumb(); + this.wrapper = hs.createElement( + 'div', { + id: 'highslide-wrapper-'+ this.key, + className: 'highslide-wrapper '+ this.wrapperClassName + }, { + visibility: 'hidden', + position: 'absolute', + zIndex: hs.zIndexCounter += 2 + }, null, true ); + + this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; + if (this.contentType == 'image' && this.outlineWhileAnimating == 2) + this.outlineWhileAnimating = 0; + + // get the outline + if (!this.outlineType) { + this[this.contentType +'Create'](); + + } else if (hs.pendingOutlines[this.outlineType]) { + this.connectOutline(); + this[this.contentType +'Create'](); + + } else { + this.showLoading(); + var exp = this; + new hs.Outline(this.outlineType, + function () { + exp.connectOutline(); + exp[exp.contentType +'Create'](); + } + ); + } + return true; +}; + +hs.Expander.prototype = { +error : function(e) { + //alert ('Line '+ e.lineNumber +': '+ e.message); + window.location.href = this.src; +}, + +connectOutline : function() { + var outline = this.outline = hs.pendingOutlines[this.outlineType]; + outline.exp = this; + outline.table.style.zIndex = this.wrapper.style.zIndex - 1; + hs.pendingOutlines[this.outlineType] = null; +}, + +showLoading : function() { + if (this.onLoadStarted || this.loading) return; + + this.loading = hs.loading; + var exp = this; + this.loading.onclick = function() { + exp.cancelLoading(); + }; + var exp = this, + l = this.x.get('loadingPos') +'px', + t = this.y.get('loadingPos') +'px'; + setTimeout(function () { + if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} + , 100); +}, + +imageCreate : function() { + var exp = this; + + var img = document.createElement('img'); + this.content = img; + img.onload = function () { + if (hs.expanders[exp.key]) exp.contentLoaded(); + }; + if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; + img.className = 'highslide-image'; + hs.setStyles(img, { + visibility: 'hidden', + display: 'block', + position: 'absolute', + maxWidth: '9999px', + zIndex: 3 + }); +// img.title = hs.lang.restoreTitle; + if (hs.safari) hs.container.appendChild(img); + if (hs.ie && hs.flushImgSize) img.src = null; + img.src = this.src; + + this.showLoading(); +}, + +contentLoaded : function() { + try { + if (!this.content) return; + this.content.onload = null; + if (this.onLoadStarted) return; + else this.onLoadStarted = true; + + var x = this.x, y = this.y; + + if (this.loading) { + hs.setStyles(this.loading, { top: '-9999px' }); + this.loading = null; + } + x.full = this.content.width; + y.full = this.content.height; + + hs.setStyles(this.content, { + width: x.t +'px', + height: y.t +'px' + }); + this.wrapper.appendChild(this.content); + hs.container.appendChild(this.wrapper); + + x.calcBorders(); + y.calcBorders(); + + hs.setStyles (this.wrapper, { + left: (x.tpos + x.tb - x.cb) +'px', + top: (y.tpos + x.tb - y.cb) +'px' + }); + this.getOverlays(); + + var ratio = x.full / y.full; + + x.calcExpanded(); + this.justify(x); + + y.calcExpanded(); + this.justify(y); + if (this.overlayBox) this.sizeOverlayBox(0, 1); + + if (this.allowSizeReduction) { + this.correctRatio(ratio); + if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) { + this.createFullExpand(); + if (this.overlays.length == 1) this.sizeOverlayBox(); + } + } + this.show(); + + } catch (e) { + this.error(e); + } +}, + +justify : function (p, moveOnly) { + var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; + + var hasMovedMin = false; + + var allowReduce = p.exp.allowSizeReduction; + p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); + if (p.pos < p.scroll + p.marginMin) { + p.pos = p.scroll + p.marginMin; + hasMovedMin = true; + } + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { + if (!moveOnly && hasMovedMin && allowReduce) { + p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } else if (p.get('wsize') < p.get('fitsize')) { + p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); + } else { // image larger than viewport + p.pos = p.scroll + p.marginMin; + if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); + } + } + + if (!moveOnly && p.size < p.minSize) { + p.size = p.minSize; + allowReduce = false; + } + + + + if (p.pos < p.marginMin) { + var tmpMin = p.pos; + p.pos = p.marginMin; + + if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); + + } +}, + +correctRatio : function(ratio) { + var x = this.x, + y = this.y, + changed = false, + xSize = Math.min(x.full, x.size), + ySize = Math.min(y.full, y.size), + useBox = (this.useBox || hs.padToMinWidth); + + if (xSize / ySize > ratio) { // width greater + xSize = ySize * ratio; + if (xSize < x.minSize) { // below minWidth + xSize = x.minSize; + ySize = xSize / ratio; + } + changed = true; + + } else if (xSize / ySize < ratio) { // height greater + ySize = xSize / ratio; + changed = true; + } + + if (hs.padToMinWidth && x.full < x.minSize) { + x.imgSize = x.full; + y.size = y.imgSize = y.full; + } else if (this.useBox) { + x.imgSize = xSize; + y.imgSize = ySize; + } else { + x.size = xSize; + y.size = ySize; + } + this.fitOverlayBox(useBox ? null : ratio); + if (useBox && y.size < y.imgSize) { + y.imgSize = y.size; + x.imgSize = y.size * ratio; + } + if (changed || useBox) { + x.pos = x.tpos - x.cb + x.tb; + x.minSize = x.size; + this.justify(x, true); + + y.pos = y.tpos - y.cb + y.tb; + y.minSize = y.size; + this.justify(y, true); + if (this.overlayBox) this.sizeOverlayBox(); + } +}, +fitOverlayBox : function(ratio) { + var x = this.x, y = this.y; + if (this.overlayBox) { + while (y.size > this.minHeight && x.size > this.minWidth + && y.get('wsize') > y.get('fitsize')) { + y.size -= 10; + if (ratio) x.size = y.size * ratio; + this.sizeOverlayBox(0, 1); + } + } +}, + +show : function () { + var x = this.x, y = this.y; + this.doShowHide('hidden'); + + // Apply size change + this.changeSize( + 1, { + wrapper: { + width : x.get('wsize'), + height : y.get('wsize'), + left: x.pos, + top: y.pos + }, + content: { + left: x.p1 + x.get('imgPad'), + top: y.p1 + y.get('imgPad'), + width:x.imgSize ||x.size, + height:y.imgSize ||y.size + } + }, + hs.expandDuration + ); +}, + +changeSize : function(up, to, dur) { + + if (this.outline && !this.outlineWhileAnimating) { + if (up) this.outline.setPosition(); + else this.outline.destroy(); + } + + + if (!up) this.destroyOverlays(); + + var exp = this, + x = exp.x, + y = exp.y, + easing = this.easing; + if (!up) easing = this.easingClose || easing; + var after = up ? + function() { + + if (exp.outline) exp.outline.table.style.visibility = "visible"; + setTimeout(function() { + exp.afterExpand(); + }, 50); + } : + function() { + exp.afterClose(); + }; + if (up) hs.setStyles( this.wrapper, { + width: x.t +'px', + height: y.t +'px' + }); + if (this.fadeInOut) { + hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 }); + hs.extend(to.wrapper, { opacity: up }); + } + hs.animate( this.wrapper, to.wrapper, { + duration: dur, + easing: easing, + step: function(val, args) { + if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') { + var fac = up ? args.pos : 1 - args.pos; + var pos = { + w: x.t + (x.get('wsize') - x.t) * fac, + h: y.t + (y.get('wsize') - y.t) * fac, + x: x.tpos + (x.pos - x.tpos) * fac, + y: y.tpos + (y.pos - y.tpos) * fac + }; + exp.outline.setPosition(pos, 0, 1); + } + } + }); + hs.animate( this.content, to.content, dur, easing, after); + if (up) { + this.wrapper.style.visibility = 'visible'; + this.content.style.visibility = 'visible'; + this.a.className += ' highslide-active-anchor'; + } +}, + + + + +afterExpand : function() { + this.isExpanded = true; + this.focus(); + if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; + this.prepareNextOutline(); + var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; + this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') + && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); + if (this.overlayBox) this.showOverlays(); + +}, + + +prepareNextOutline : function() { + var key = this.key; + var outlineType = this.outlineType; + new hs.Outline(outlineType, + function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); +}, + + +preloadNext : function() { + var next = this.getAdjacentAnchor(1); + if (next && next.onclick.toString().match(/hs\.expand/)) + var img = hs.createElement('img', { src: hs.getSrc(next) }); +}, + + +getAdjacentAnchor : function(op) { + var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; + + /*< ? if ($cfg->slideshow) : ?>s*/ + if (!as[current + op] && this.slideshow && this.slideshow.repeat) { + if (op == 1) return as[0]; + else if (op == -1) return as[as.length-1]; + } + /*< ? endif ?>s*/ + return as[current + op] || null; +}, + +getAnchorIndex : function() { + var arr = hs.getAnchors().groups[this.slideshowGroup || 'none']; + if (arr) for (var i = 0; i < arr.length; i++) { + if (arr[i] == this.a) return i; + } + return null; +}, + + +cancelLoading : function() { + hs.discardElement (this.wrapper); + hs.expanders[this.key] = null; + if (this.loading) hs.loading.style.left = '-9999px'; +}, + +writeCredits : function () { + this.credits = hs.createElement('a', { + href: hs.creditsHref, + target: hs.creditsTarget, + className: 'highslide-credits', + innerHTML: hs.lang.creditsText, + title: hs.lang.creditsTitle + }); + this.createOverlay({ + overlayId: this.credits, + position: this.creditsPosition || 'top left' + }); +}, + +getInline : function(types, addOverlay) { + for (var i = 0; i < types.length; i++) { + var type = types[i], s = null; + if (!this[type +'Id'] && this.thumbsUserSetId) + this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; + if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']); + if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { + s = eval(this[type +'Eval']); + } catch (e) {} + if (!this[type] && this[type +'Text']) { + s = this[type +'Text']; + } + if (!this[type] && !s) { + var next = this.a.nextSibling; + while (next && !hs.isHsAnchor(next)) { + if ((new RegExp('highslide-'+ type)).test(next.className || null)) { + this[type] = next.cloneNode(1); + break; + } + next = next.nextSibling; + } + } + + if (!this[type] && s) this[type] = hs.createElement('div', + { className: 'highslide-'+ type, innerHTML: s } ); + + if (addOverlay && this[type]) { + var o = { position: (type == 'heading') ? 'above' : 'below' }; + for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; + o.overlayId = this[type]; + this.createOverlay(o); + } + } +}, + + +// on end move and resize +doShowHide : function(visibility) { + if (hs.hideSelects) this.showHideElements('SELECT', visibility); + if (hs.hideIframes) this.showHideElements('IFRAME', visibility); + if (hs.geckoMac) this.showHideElements('*', visibility); +}, +showHideElements : function (tagName, visibility) { + var els = document.getElementsByTagName(tagName); + var prop = tagName == '*' ? 'overflow' : 'visibility'; + for (var i = 0; i < els.length; i++) { + if (prop == 'visibility' || (document.defaultView.getComputedStyle( + els[i], "").getPropertyValue('overflow') == 'auto' + || els[i].getAttribute('hidden-by') != null)) { + var hiddenBy = els[i].getAttribute('hidden-by'); + if (visibility == 'visible' && hiddenBy) { + hiddenBy = hiddenBy.replace('['+ this.key +']', ''); + els[i].setAttribute('hidden-by', hiddenBy); + if (!hiddenBy) els[i].style[prop] = els[i].origProp; + } else if (visibility == 'hidden') { // hide if behind + var elPos = hs.getPosition(els[i]); + elPos.w = els[i].offsetWidth; + elPos.h = els[i].offsetHeight; + + + var clearsX = (elPos.x + elPos.w < this.x.get('opos') + || elPos.x > this.x.get('opos') + this.x.get('osize')); + var clearsY = (elPos.y + elPos.h < this.y.get('opos') + || elPos.y > this.y.get('opos') + this.y.get('osize')); + var wrapperKey = hs.getWrapperKey(els[i]); + if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image + if (!hiddenBy) { + els[i].setAttribute('hidden-by', '['+ this.key +']'); + els[i].origProp = els[i].style[prop]; + els[i].style[prop] = 'hidden'; + + } else if (hiddenBy.indexOf('['+ this.key +']') == -1) { + els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); + } + } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) + && wrapperKey != this.key) { // on move + els[i].setAttribute('hidden-by', ''); + els[i].style[prop] = els[i].origProp || ''; + } else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) { + els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); + } + + } + } + } +}, + +focus : function() { + this.wrapper.style.zIndex = hs.zIndexCounter += 2; + // blur others + for (var i = 0; i < hs.expanders.length; i++) { + if (hs.expanders[i] && i == hs.focusKey) { + var blurExp = hs.expanders[i]; + blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; + blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; + blurExp.content.title = hs.lang.focusTitle; + } + } + + // focus this + if (this.outline) this.outline.table.style.zIndex + = this.wrapper.style.zIndex - 1; + this.content.className = 'highslide-'+ this.contentType; +// this.content.title = hs.lang.restoreTitle; + + if (hs.restoreCursor) { + hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; + if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand'; + this.content.style.cursor = hs.styleRestoreCursor; + } + + hs.focusKey = this.key; + hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); +}, +moveTo: function(x, y) { + this.x.setPos(x); + this.y.setPos(y); +}, +resize : function (e) { + var w, h, r = e.width / e.height; + w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); + if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; + h = w / r; + if (h < Math.min(this.minHeight, this.y.full)) { + h = Math.min(this.minHeight, this.y.full); + if (this.isImage) w = h * r; + } + this.resizeTo(w, h); +}, +resizeTo: function(w, h) { + this.y.setSize(h); + this.x.setSize(w); +}, + +close : function() { + if (this.isClosing || !this.isExpanded) return; + this.isClosing = true; + + hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); + + try { + this.content.style.cursor = 'default'; + this.changeSize( + 0, { + wrapper: { + width : this.x.t, + height : this.y.t, + left: this.x.tpos - this.x.cb + this.x.tb, + top: this.y.tpos - this.y.cb + this.y.tb + }, + content: { + left: 0, + top: 0, + width: this.x.t, + height: this.y.t + } + }, hs.restoreDuration + ); + } catch (e) { this.afterClose(); } +}, + +createOverlay : function (o) { + var el = o.overlayId; + if (typeof el == 'string') el = hs.getNode(el); + if (o.html) el = hs.createElement('div', { innerHTML: o.html }); + if (!el || typeof el == 'string') return; + el.style.display = 'block'; + this.genOverlayBox(); + var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; + if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; + var overlay = hs.createElement( + 'div', { + id: 'hsId'+ hs.idCounter++, + hsId: o.hsId + }, { + position: 'absolute', + visibility: 'hidden', + width: width, + direction: hs.lang.cssDirection || '', + opacity: 0 + },this.overlayBox, + true + ); + + overlay.appendChild(el); + hs.extend(overlay, { + opacity: 1, + offsetX: 0, + offsetY: 0, + dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250 + }); + hs.extend(overlay, o); + + if (this.gotOverlays) { + this.positionOverlay(overlay); + if (!overlay.hideOnMouseOut || this.mouseIsOver) + hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur); + } + hs.push(this.overlays, hs.idCounter - 1); +}, +positionOverlay : function(overlay) { + var p = overlay.position || 'middle center', + offX = overlay.offsetX, + offY = overlay.offsetY; + if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay); + if (/left$/.test(p)) overlay.style.left = offX +'px'; + + if (/center$/.test(p)) hs.setStyles (overlay, { + left: '50%', + marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px' + }); + + if (/right$/.test(p)) overlay.style.right = - offX +'px'; + + if (/^leftpanel$/.test(p)) { + hs.setStyles(overlay, { + right: '100%', + marginRight: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p1 = overlay.offsetWidth; + + } else if (/^rightpanel$/.test(p)) { + hs.setStyles(overlay, { + left: '100%', + marginLeft: this.x.cb +'px', + top: - this.y.cb +'px', + bottom: - this.y.cb +'px', + overflow: 'auto' + }); + this.x.p2 = overlay.offsetWidth; + } + + if (/^top/.test(p)) overlay.style.top = offY +'px'; + if (/^middle/.test(p)) hs.setStyles (overlay, { + top: '50%', + marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px' + }); + if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px'; + if (/^above$/.test(p)) { + hs.setStyles(overlay, { + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + bottom: '100%', + marginBottom: this.y.cb +'px', + width: 'auto' + }); + this.y.p1 = overlay.offsetHeight; + + } else if (/^below$/.test(p)) { + hs.setStyles(overlay, { + position: 'relative', + left: (- this.x.p1 - this.x.cb) +'px', + right: (- this.x.p2 - this.x.cb) +'px', + top: '100%', + marginTop: this.y.cb +'px', + width: 'auto' + }); + this.y.p2 = overlay.offsetHeight; + overlay.style.position = 'absolute'; + } +}, + +getOverlays : function() { + this.getInline(['heading', 'caption'], true); + if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move'; + if (hs.showCredits) this.writeCredits(); + for (var i = 0; i < hs.overlays.length; i++) { + var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; + if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) + || (sg && sg === this.slideshowGroup)) { + this.createOverlay(o); + } + } + var os = []; + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + if (/panel$/.test(o.position)) this.positionOverlay(o); + else hs.push(os, o); + } + for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); + this.gotOverlays = true; +}, +genOverlayBox : function() { + if (!this.overlayBox) this.overlayBox = hs.createElement ( + 'div', { + className: this.wrapperClassName + }, { + position : 'absolute', + width: (this.x.size || (this.useBox ? this.width : null) + || this.x.full) +'px', + height: (this.y.size || this.y.full) +'px', + visibility : 'hidden', + overflow : 'hidden', + zIndex : hs.ie ? 4 : null + }, + hs.container, + true + ); +}, +sizeOverlayBox : function(doWrapper, doPanels) { + var overlayBox = this.overlayBox, + x = this.x, + y = this.y; + hs.setStyles( overlayBox, { + width: x.size +'px', + height: y.size +'px' + }); + if (doWrapper || doPanels) { + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat'); + if (o && /^(above|below)$/.test(o.position)) { + if (ie6) { + o.style.width = (overlayBox.offsetWidth + 2 * x.cb + + x.p1 + x.p2) +'px'; + } + y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight; + } + if (o && ie6 && /^(left|right)panel$/.test(o.position)) { + o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px'; + } + } + } + if (doWrapper) { + hs.setStyles(this.content, { + top: y.p1 +'px' + }); + hs.setStyles(overlayBox, { + top: (y.p1 + y.cb) +'px' + }); + } +}, + +showOverlays : function() { + var b = this.overlayBox; + b.className = ''; + hs.setStyles(b, { + top: (this.y.p1 + this.y.cb) +'px', + left: (this.x.p1 + this.x.cb) +'px', + overflow : 'visible' + }); + if (hs.safari) b.style.visibility = 'visible'; + this.wrapper.appendChild (b); + for (var i = 0; i < this.overlays.length; i++) { + var o = hs.$('hsId'+ this.overlays[i]); + o.style.zIndex = 4; + if (!o.hideOnMouseOut || this.mouseIsOver) { + o.style.visibility = 'visible'; + hs.setStyles(o, { visibility: 'visible', display: '' }); + hs.animate(o, { opacity: o.opacity }, o.dur); + } + } +}, + +destroyOverlays : function() { + if (!this.overlays.length) return; + hs.discardElement(this.overlayBox); +}, + + + +createFullExpand : function () { + this.fullExpandLabel = hs.createElement( + 'a', { + href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', + title: hs.lang.fullExpandTitle, + className: 'highslide-full-expand' + } + ); + + this.createOverlay({ + overlayId: this.fullExpandLabel, + position: hs.fullExpandPosition, + hideOnMouseOut: true, + opacity: hs.fullExpandOpacity + }); +}, + +doFullExpand : function () { + try { + if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); + + this.focus(); + var xSize = this.x.size; + this.resizeTo(this.x.full, this.y.full); + + var xpos = this.x.pos - (this.x.size - xSize) / 2; + if (xpos < hs.marginLeft) xpos = hs.marginLeft; + + this.moveTo(xpos, this.y.pos); + this.doShowHide('hidden'); + + } catch (e) { + this.error(e); + } +}, + + +afterClose : function () { + this.a.className = this.a.className.replace('highslide-active-anchor', ''); + + this.doShowHide('visible'); + if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); + + hs.discardElement(this.wrapper); + + hs.expanders[this.key] = null; + hs.reOrder(); +} + +}; +if (hs.ie) { + (function () { + try { + document.documentElement.doScroll('left'); + } catch (e) { + setTimeout(arguments.callee, 50); + return; + } + hs.ready(); + })(); +} +hs.addEventListener(document, 'DOMContentLoaded', hs.ready); +hs.addEventListener(window, 'load', hs.ready); +hs.langDefaults = hs.lang; +// history +var HsExpander = hs.Expander; + +// set handlers +hs.addEventListener(window, 'load', function() { + if (hs.expandCursor) { + var sel = '.highslide img', + dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'; + + var style = hs.createElement('style', { type: 'text/css' }, null, + document.getElementsByTagName('HEAD')[0]); + + if (!hs.ie) { + style.appendChild(document.createTextNode(sel + " {" + dec + "}")); + } else { + var last = document.styleSheets[document.styleSheets.length - 1]; + if (typeof(last.addRule) == "object") last.addRule(sel, dec); + } + } +}); +hs.addEventListener(window, 'resize', function() { + hs.getPageSize(); +}); +hs.addEventListener(document, 'mousemove', function(e) { + hs.mouse = { x: e.clientX, y: e.clientY }; +}); +hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); +hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); + +hs.addEventListener(document, 'ready', hs.getAnchors); +hs.addEventListener(window, 'load', hs.preloadImages); \ No newline at end of file diff --git a/highslide/highslide.packed.js b/highslide/highslide.packed.js new file mode 100644 index 0000000..73904a5 --- /dev/null +++ b/highslide/highslide.packed.js @@ -0,0 +1,28 @@ +/****************************************************************************** +Name: Highslide JS +Version: 4.1.5 (June 26 2009) +Config: default +packed +Author: Torstein Hønsi +Support: http://highslide.com/support + +Licence: +Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 +License (http://creativecommons.org/licenses/by-nc/2.5/). + +You are free: + * to copy, distribute, display, and perform the work + * to make derivative works + +Under the following conditions: + * Attribution. You must attribute the work in the manner specified by the + author or licensor. + * Noncommercial. You may not use this work for commercial purposes. + +* For any reuse or distribution, you must make clear to others the license + terms of this work. +* Any of these conditions can be waived if you get permission from the + copyright holder. + +Your fair use and other rights are in no way affected by the above. +******************************************************************************/ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u m={1B:{89:\'6S\',6H:\'8N...\',6M:\'5A 1K 8M\',7u:\'5A 1K 8L 1K 8K\',84:\'8P 1K 8Q I (f)\',8f:\'8V 2s 6U 6V\',7L:\'8W 1K 8H 6U 6V 8z\',64:\'5A 1K 2i 1W, 8G 7g 8F 1K 3i. 8E 8A 8D R 1M 7g 76.\'},3A:\'1c/8C/\',5t:\'8v.6f\',3O:\'8T.6f\',8o:4J,88:4J,3B:15,7R:15,5V:15,7U:15,3U:9w,6Q:0.75,8u:G,5N:5,2D:2,8Y:3,3M:19,85:\'2F 2e\',7M:1,7W:G,7B:\'9i://1c.9j/\',7F:\'9p\',74:G,5S:[\'a\'],51:G,3w:6P,3P:6P,3u:G,1i:\'9u-9v\',3F:[],6e:G,K:[],5r:[\'3u\',\'25\',\'1i\',\'2D\',\'9t\',\'9s\',\'9q\',\'79\',\'9g\',\'94\',\'8Z\',\'6Z\',\'7K\',\'51\',\'L\',\'14\',\'5g\',\'3w\',\'3P\',\'8l\',\'91\',\'2Y\',\'1I\',\'7k\',\'8i\',\'1k\'],1w:[],4G:0,96:{x:[\'80\',\'18\',\'6A\',\'2e\',\'7O\'],y:[\'3T\',\'Y\',\'6p\',\'2F\',\'4K\']},4x:{},6Z:{},79:{},2m:[],2L:{},5n:{},43:[],36:6a((4v.55.4n().2W(/.+(?:6F|9e|98|1m)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1m:(O.3G&&!1s.2P),4D:/9a/.17(4v.55),7l:/9b.+6F:1\\.[0-8].+9d/.17(4v.55),$:A(1x){q(1x)C O.90(1x)},28:A(29,2z){29[29.S]=2z},X:A(6T,35,2n,6y,6D){u B=O.X(6T);q(35)m.2p(B,35);q(6D)m.T(B,{93:0,95:\'3e\',5l:0});q(2n)m.T(B,2n);q(6y)6y.2j(B);C B},2p:A(B,35){R(u x 31 35)B[x]=35[x];C B},T:A(B,2n){R(u x 31 2n){q(m.1m&&x==\'1n\'){q(2n[x]>0.99)B.F.9r(\'3Z\');J B.F.3Z=\'7e(1n=\'+(2n[x]*1T)+\')\'}J B.F[x]=2n[x]}},3m:A(B,Z,26){u 2G,3h,2H;q(1q 26!=\'6s\'||26===H){u 2y=8q;26={2R:2y[2],1I:2y[3],6j:2y[4]}}q(1q 26.2R!=\'3c\')26.2R=4J;26.1I=1f[26.1I]||1f.6C;26.4q=m.2p({},Z);R(u 23 31 Z){u e=1V m.1l(B,26,23);2G=6a(m.53(B,23))||0;3h=6a(Z[23]);2H=23!=\'1n\'?\'E\':\'\';e.2x(2G,3h,2H)}},53:A(B,Z){q(O.60){C O.60.7m(B,H).7s(Z)}J{q(Z==\'1n\')Z=\'3Z\';u 2z=B.9o[Z.2U(/\\-(\\w)/g,A(a,b){C b.9h()})];q(Z==\'3Z\')2z=2z.2U(/7e\\(1n=([0-9]+)\\)/,A(a,b){C b/1T});C 2z===\'\'?1:2z}},4P:A(){u d=O,w=1s,3Y=d.5L&&d.5L!=\'7S\'?d.4c:d.66;u L=m.1m?3Y.6B:(d.4c.6B||47.9k),14=m.1m?3Y.9l:47.9n;m.2Z={L:L,14:14,4g:m.1m?3Y.4g:9m,4h:m.1m?3Y.4h:8x}},5T:A(B){u p={x:B.7c,y:B.6L};3g(B.7d){B=B.7d;p.x+=B.7c;p.y+=B.6L;q(B!=O.66&&B!=O.4c){p.x-=B.4g;p.y-=B.4h}}C p},46:A(a,1X,2x,M){q(!a)a=m.X(\'a\',H,{3n:\'3e\'},m.1U);q(1q a.3S==\'A\')C 1X;1H{1V m.3J(a,1X,2x);C 19}1C(e){C G}},72:A(){u 5u=0,4T=-1,K=m.K,z,1r;R(u i=0;i5u){5u=1r;4T=i}}}q(4T==-1)m.2B=-1;J K[4T].3t()},5Z:A(a,3K){a.3S=a.30;u p=a.3S?a.3S():H;a.3S=H;C(p&&1q p[3K]!=\'22\')?p[3K]:(1q m[3K]!=\'22\'?m[3K]:H)},57:A(a){u 1k=m.5Z(a,\'1k\');q(1k)C 1k;C a.3s},5O:A(1x){u 4B=m.$(1x),2K=m.5n[1x],a={};q(!4B&&!2K)C H;q(!2K){2K=4B.6h(G);2K.1x=\'\';m.5n[1x]=2K;C 4B}J{C 2K.6h(G)}},3f:A(d){q(d)m.65.2j(d);m.65.3E=\'\'},6W:A(3x,z){u 2Q=z=z||m.2q();q(m.2I)C 19;J m.2Q=2Q;1H{m.2I=3x;3x.30()}1C(e){m.2Q=m.2I=H}1H{z.2i()}1C(e){}C 19},4I:A(B,1F){u z=m.2q(B);q(z){3x=z.56(1F);C m.6W(3x,z)}J C 19},76:A(B){C m.4I(B,-1)},1M:A(B){C m.4I(B,1)},4S:A(e){q(!e)e=1s.1E;q(!e.1R)e.1R=e.6n;q(1q e.1R.6G!=\'22\')C G;u z=m.2q();u 1F=H;7j(e.8y){1p 70:q(z)z.5h();C G;1p 32:1p 34:1p 39:1p 40:1F=1;5W;1p 8:1p 33:1p 37:1p 38:1F=-1;5W;1p 27:1p 13:1F=0}q(1F!==H){m.3H(O,1s.2P?\'6b\':\'6c\',m.4S);q(!m.74)C G;q(e.4V)e.4V();J e.8X=19;q(z){q(1F==0){z.2i()}J{m.4I(z.Q,1F)}C 19}}C G},8U:A(N){m.28(m.1w,m.2p(N,{2b:\'2b\'+m.4G++}))},5Q:A(58,4z){u B,2N=/^1c-U-([0-9]+)$/;B=58;3g(B.2E){q(B.1x&&2N.17(B.1x))C B.1x.2U(2N,"$1");B=B.2E}q(!4z){B=58;3g(B.2E){q(B.4m&&m.4s(B)){R(u Q=0;Q1)C G;q(!e.1R)e.1R=e.6n;u B=e.1R;3g(B.2E&&!(/1c-(1W|3i|4w|2O)/.17(B.1h))){B=B.2E}u z=m.2q(B);q(z&&(z.6d||!z.3X))C G;q(z&&e.M==\'7Z\'){q(e.1R.6G)C G;u 2W=B.1h.2W(/1c-(1W|3i|2O)/);q(2W){m.1S={z:z,M:2W[1],18:z.x.D,L:z.x.I,Y:z.y.D,14:z.y.I,6R:e.4L,6O:e.4N};m.1D(O,\'5K\',m.5M);q(e.4V)e.4V();q(/1c-(1W|4w)-6g/.17(z.W.1h)){z.3t();m.54=G}C 19}}J q(e.M==\'7P\'){m.3H(O,\'5K\',m.5M);q(m.1S){q(m.3a&&m.1S.M==\'1W\')m.1S.z.W.F.2M=m.3a;u 2o=m.1S.2o;q(!2o&&!m.54&&!/(3i|2O)/.17(m.1S.M)){z.2i()}J q(2o||(!2o&&m.9W)){m.1S.z.3D(\'1g\')}m.54=19;m.1S=H}J q(/1c-1W-6g/.17(B.1h)){B.F.2M=m.3a}}C 19},5M:A(e){q(!m.1S)C G;q(!e)e=1s.1E;u a=m.1S,z=a.z;a.41=e.4L-a.6R;a.6o=e.4N-a.6O;u 6u=1f.ab(1f.6E(a.41,2)+1f.6E(a.6o,2));q(!a.2o)a.2o=(a.M!=\'1W\'&&6u>0)||(6u>(m.ae||5));q(a.2o&&e.4L>5&&e.4N>5){q(a.M==\'2O\')z.2O(a);J{z.5Y(a.18+a.41,a.Y+a.6o);q(a.M==\'1W\')z.W.F.2M=\'3i\'}}C 19},8j:A(e){1H{q(!e)e=1s.1E;u 4H=/ag/i.17(e.M);q(!e.1R)e.1R=e.6n;q(m.1m)e.6w=4H?e.9x:e.aa;u z=m.2q(e.1R);q(!z.3X)C;q(!z||!e.6w||m.2q(e.6w,G)==z||m.1S)C;R(u i=0;i=k.1u.2R+k.6k){k.2V=k.3h;k.D=k.6q=1;k.5B();k.1u.4q[k.Z]=G;u 6l=G;R(u i 31 k.1u.4q)q(k.1u.4q[i]!==G)6l=19;q(6l){q(k.1u.6j)k.1u.6j.7f(k.1Q)}C 19}J{u n=t-k.6k;k.6q=n/k.1u.2R;k.D=k.1u.1I(n,0,1,k.1u.2R);k.2V=k.2G+((k.3h-k.2G)*k.D);k.5B()}C G}};m.2p(m.1l,{2t:{1n:A(1l){m.T(1l.1Q,{1n:1l.2V})},6K:A(1l){q(1l.1Q.F&&1l.1Q.F[1l.Z]!=H)1l.1Q.F[1l.Z]=1l.2V+1l.2H;J 1l.1Q[1l.Z]=1l.2V}}});m.3Q=A(1i,2T){k.2T=2T;k.1i=1i;u v=m.36,4e;k.5J=m.1m&&v>=5.5&&v<7;q(!1i){q(2T)2T();C}m.5s();k.21=m.X(\'21\',{9U:0},{1b:\'1g\',1d:\'20\',9P:\'9O\',L:0},m.1U,G);u 59=m.X(\'59\',H,H,k.21,1);k.1L=[];R(u i=0;i<=8;i++){q(i%3==0)4e=m.X(\'4e\',H,{14:\'2v\'},59,G);k.1L[i]=m.X(\'1L\',H,H,4e,G);u F=i!=4?{9Q:0,9R:0}:{1d:\'6t\'};m.T(k.1L[i],F)}k.1L[4].1h=1i+\' 1c-1a\';k.6N()};m.3Q.4u={6N:A(){u 1k=m.3A+(m.9T||"9S/")+k.1i+".9G";u 6I=m.4D?m.1U:H;k.2h=m.X(\'1e\',H,{1d:\'20\',Y:\'-3V\'},6I,G);u 6J=k;k.2h.4k=A(){6J.7a()};k.2h.1k=1k},7a:A(){u o=k.1j=k.2h.L/4,D=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1A={14:(2*o)+\'E\',L:(2*o)+\'E\'};R(u i=0;i<=8;i++){q(D[i]){q(k.5J){u w=(i==1||i==7)?\'1T%\':k.2h.L+\'E\';u 1O=m.X(\'1O\',H,{L:\'1T%\',14:\'1T%\',1d:\'6t\',2S:\'1g\'},k.1L[i],G);m.X(\'1O\',H,{3Z:"9Y:9X.9D.9y(9z=9F, 1k=\'"+k.2h.1k+"\')",1d:\'20\',L:w,14:k.2h.14+\'E\',18:(D[i][0]*o)+\'E\',Y:(D[i][1]*o)+\'E\'},1O,G)}J{m.T(k.1L[i],{9K:\'5p(\'+k.2h.1k+\') \'+(D[i][0]*o)+\'E \'+(D[i][1]*o)+\'E\'})}q(1s.2P&&(i==3||i==5))m.X(\'1O\',H,1A,k.1L[i],G);m.T(k.1L[i],1A)}}k.2h=H;q(m.2L[k.1i])m.2L[k.1i].4i();m.2L[k.1i]=k;q(k.2T)k.2T()},3v:A(D,1j,78,2A,1I){u z=k.z,9H=z.U.F,1j=1j||0,D=D||{x:z.x.D+1j,y:z.y.D+1j,w:z.x.P(\'1v\')-2*1j,h:z.y.P(\'1v\')-2*1j};q(78)k.21.F.1b=(D.h>=4*k.1j)?\'1Y\':\'1g\';m.T(k.21,{18:(D.x-k.1j)+\'E\',Y:(D.y-k.1j)+\'E\',L:(D.w+2*k.1j)+\'E\'});D.w-=2*k.1j;D.h-=2*k.1j;m.T(k.1L[4],{L:D.w>=0?D.w+\'E\':0,14:D.h>=0?D.h+\'E\':0});q(k.5J)k.1L[3].F.14=k.1L[5].F.14=k.1L[4].F.14},4i:A(7b){q(7b)k.21.F.1b=\'1g\';J m.3f(k.21)}};m.42=A(z,1A){k.z=z;k.1A=1A;k.2k=1A==\'x\'?\'am\':\'ao\';k.2C=k.2k.4n();k.3C=1A==\'x\'?\'an\':\'aj\';k.5q=k.3C.4n();k.5G=1A==\'x\'?\'ak\':\'ap\';k.aq=k.5G.4n();k.1y=k.2f=0};m.42.4u={P:A(Q){7j(Q){1p\'5H\':C k.1t+k.2d+(k.t-m.1G[\'1j\'+k.2k])/2;1p\'1v\':C k.I+2*k.V+k.1y+k.2f;1p\'3k\':C k.4p-k.2J-k.4t;1p\'5i\':C k.P(\'3k\')-2*k.V-k.1y-k.2f;1p\'3W\':C k.D-(k.z.1a?k.z.1a.1j:0);1p\'5P\':C k.P(\'1v\')+(k.z.1a?2*k.z.1a.1j:0);1p\'48\':C k.1z?1f.4R((k.I-k.1z)/2):0}},5F:A(){k.V=(k.z.W[\'1j\'+k.2k]-k.t)/2;k.4t=m[\'5l\'+k.5G]},5k:A(){k.t=k.z.B[k.2C]?a8(k.z.B[k.2C]):k.z.B[\'1j\'+k.2k];k.1t=k.z.1t[k.1A];k.2d=(k.z.B[\'1j\'+k.2k]-k.t)/2;q(k.1t<1){k.1t=(m.2Z[k.2C]/2)+m.2Z[\'2r\'+k.3C]}},5E:A(){u z=k.z;k.3j=\'2v\';k.D=k.1t-k.V+k.2d;k.I=1f.2w(k.16,z[\'67\'+k.2k]||k.16);k.1Z=z.3u?1f.2w(z[\'2w\'+k.2k],k.16):k.16;q(z.3b&&z.25){k.I=z[k.2C];k.1z=k.16}q(k.1A==\'x\'&&m.3M)k.1Z=z.3w;k.2J=m[\'5l\'+k.3C];k.2r=m.2Z[\'2r\'+k.3C];k.4p=m.2Z[k.2C]},63:A(i){u z=k.z;q(z.3b&&(z.25||m.3M)){k.1z=i;k.I=1f.67(k.I,k.1z);z.W.F[k.5q]=k.P(\'48\')+\'E\'}J k.I=i;z.W.F[k.2C]=i+\'E\';z.U.F[k.2C]=k.P(\'1v\')+\'E\';q(z.1a)z.1a.3v();q(k.1A==\'x\'&&z.1o)z.3p(G)},68:A(i){k.D=i;k.z.U.F[k.5q]=i+\'E\';q(k.z.1a)k.z.1a.3v()}};m.3J=A(a,1X,2x,24){q(O.a4&&m.1m&&!m.5v){m.1D(O,\'2X\',A(){1V m.3J(a,1X,2x,24)});C}k.a=a;k.2x=2x;k.24=24||\'1W\';k.3b=!k.af;m.6e=19;k.1w=[];m.5s();u Q=k.Q=m.K.S;R(u i=0;i(k.x.1z||k.x.I)){k.83();q(k.1w.S==1)k.3p()}}k.8k()}1C(e){k.5R(e)}},3j:A(p,3q){u a1,9J=p.1R,1A=p==k.x?\'x\':\'y\';u 5z=19;u 3l=p.z.3u;p.D=1f.4R(p.D-((p.P(\'1v\')-p.t)/2));q(p.Dp.2r+p.4p-p.4t){q(!3q&&5z&&3l){p.I=p.P(1A==\'y\'?\'3k\':\'5i\')}J q(p.P(\'1v\')1N){ 1P=2u*1N;q(1Pk.3P&&x.I>k.3w&&y.P(\'1v\')>y.P(\'3k\')){y.I-=10;q(1N)x.I=y.I*1N;k.3p(0,1)}}},8k:A(){u x=k.x,y=k.y;k.3D(\'1g\');k.61(1,{U:{L:x.P(\'1v\'),14:y.P(\'1v\'),18:x.D,Y:y.D},W:{18:x.1y+x.P(\'48\'),Y:y.1y+y.P(\'48\'),L:x.1z||x.I,14:y.1z||y.I}},m.8o)},61:A(2a,1K,2A){q(k.1a&&!k.2D){q(2a)k.1a.3v();J k.1a.4i()}q(!2a)k.87();u z=k,x=z.x,y=z.y,1I=k.1I;q(!2a)1I=k.7k||1I;u 8n=2a?A(){q(z.1a)z.1a.21.F.1b="1Y";52(A(){z.8s()},50)}:A(){z.69()};q(2a)m.T(k.U,{L:x.t+\'E\',14:y.t+\'E\'});q(k.8i){m.T(k.U,{1n:2a?0:1});m.2p(1K.U,{1n:2a})}m.3m(k.U,1K.U,{2R:2A,1I:1I,2t:A(2z,2y){q(z.1a&&z.2D&&2y.Z==\'Y\'){u 3y=2a?2y.D:1-2y.D;u D={w:x.t+(x.P(\'1v\')-x.t)*3y,h:y.t+(y.P(\'1v\')-y.t)*3y,x:x.1t+(x.D-x.1t)*3y,y:y.1t+(y.D-y.1t)*3y};z.1a.3v(D,0,1)}}});m.3m(k.W,1K.W,2A,1I,8n);q(2a){k.U.F.1b=\'1Y\';k.W.F.1b=\'1Y\';k.a.1h+=\' 1c-7n-7y\'}},8s:A(){k.3X=G;k.3t();q(m.2I&&m.2I==k.a)m.2I=H;k.8h();u p=m.2Z,5b=m.4x.x+p.4g,5d=m.4x.y+p.4h;k.5o=k.x.D<5b&&5bk.x.P(\'3W\')+k.x.P(\'5P\'));u 7v=(2g.y+2g.hk.y.P(\'3W\')+k.y.P(\'5P\'));u 44=m.5Q(11[i]);q(!7w&&!7v&&44!=k.Q){q(!1J){11[i].3z(\'1g-2s\',\'[\'+k.Q+\']\');11[i].62=11[i].F[Z];11[i].F[Z]=\'1g\'}J q(1J.7t(\'[\'+k.Q+\']\')==-1){11[i].3z(\'1g-2s\',1J+\'[\'+k.Q+\']\')}}J q((1J==\'[\'+k.Q+\']\'||m.2B==44)&&44!=k.Q){11[i].3z(\'1g-2s\',\'\');11[i].F[Z]=11[i].62||\'\'}J q(1J&&1J.7t(\'[\'+k.Q+\']\')>-1){11[i].3z(\'1g-2s\',1J.2U(\'[\'+k.Q+\']\',\'\'))}}}}},3t:A(){k.U.F.1r=m.3U+=2;R(u i=0;i + +

Efficient. Productive.

+The Trinity Desktop Environment (TDE) project is a computer desktop environment for Unix-like operating systems +with a primary goal of retaining the function and form of traditional desktop computers. +

+

+ Introductory Screenshot + +

More Screenshots +

+RSS Feed

Latest News

+$file: "; + + $data = file_get_contents("news/$file"); //read the file + $data = str_replace("http://", "https://", $data); //force https images and links + $convert = explode("\n", $data); //create array separate by new line + for ($i=0;$i'; //write value by index + if ($i == 0) { + echo ""; + } + if ($i == $newscollapsedlines) { + echo ''; + echo ''; + echo ''; + echo ''; + echo '
'; + } + else { + echo ''; + echo '
'; + } + } + echo "


"; + echo "

"; + echo '

'; + closedir($handle); +} +?> + + diff --git a/mailing_lists/index.php b/mailing_lists/index.php new file mode 100644 index 0000000..c565536 --- /dev/null +++ b/mailing_lists/index.php @@ -0,0 +1,78 @@ + + +

General discussion ("high" traffic): trinity-users
+ To send a message to the list, send it to trinity-users@lists.pearsoncomputing.net
+ To subscribe, send an empty Email to trinity-users-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-users-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-users.pearsoncomputing.net +

+

Trinity project announcements (low traffic): trinity-announce
+ To subscribe, send an empty Email to trinity-announce-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-announce-unsubscribe@lists.pearsoncomputing.net
+ Web Archive: http://trinity-announce.pearsoncomputing.net +

+

Trinity developers list (moderate traffic): trinity-devel
+ To send a message to the list, send it to trinity-devel@lists.pearsoncomputing.net
+ To subscribe, send an empty Email to trinity-devel-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-devel-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-devel.pearsoncomputing.net +

+

Trinity automated commit notification list ("high" traffic): trinity-commits
+ To subscribe, send an empty Email to trinity-commits-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-commits-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-commits.pearsoncomputing.net +

+ + +

Mailing List Etiquette

+
+

When you reply to a message on these lists, please avoid top-posting as in this example:

+
+    
+        HAL has been deprecated in newer kernel releases, so 
+        it should be deprecated in Trinity as well.
+
+        Tim
+
+        -----Original Message-----
+        From: Curious [mailto:curious@example.com]
+        Sent: Tuesday, January 6, 2010 2:54 AM
+        To: Tim
+        Cc: trinity-devel@lists.pearsoncomputing.net
+        Subject: Re: HAL usage
+
+        Should HAL be used in upcoming Trinity releases instead 
+        of the newer udev/upower interface?
+
+        This might be easier than a full rewrite of HAL-dependent 
+        code.
+
+        Sincerely,
+
+        I. M. Curious
+    
+
+ +

Instead, please add your reply to the bottom of the original thread, or interleave your response + with snippets of the original message. +

This is an example of why top posting is considered impolite (as seen on linux-kernel):

+
+    
+        A: Because it messes up the order in which people normally 
+            read text.
+        Q: Why is top-posting such a bad thing?
+        A: Top-posting.
+        Q: What is the most annoying thing in e-mail?
+    
+
+ + diff --git a/mailinglist.php b/mailinglist.php new file mode 100644 index 0000000..c565536 --- /dev/null +++ b/mailinglist.php @@ -0,0 +1,78 @@ + + +

General discussion ("high" traffic): trinity-users
+ To send a message to the list, send it to trinity-users@lists.pearsoncomputing.net
+ To subscribe, send an empty Email to trinity-users-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-users-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-users.pearsoncomputing.net +

+

Trinity project announcements (low traffic): trinity-announce
+ To subscribe, send an empty Email to trinity-announce-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-announce-unsubscribe@lists.pearsoncomputing.net
+ Web Archive: http://trinity-announce.pearsoncomputing.net +

+

Trinity developers list (moderate traffic): trinity-devel
+ To send a message to the list, send it to trinity-devel@lists.pearsoncomputing.net
+ To subscribe, send an empty Email to trinity-devel-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-devel-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-devel.pearsoncomputing.net +

+

Trinity automated commit notification list ("high" traffic): trinity-commits
+ To subscribe, send an empty Email to trinity-commits-subscribe@lists.pearsoncomputing.net
+ To unsubscribe, send an empty Email to trinity-commits-unsubscribe@lists.pearsoncomputing.net
+ Web archive: http://trinity-commits.pearsoncomputing.net +

+ + +

Mailing List Etiquette

+
+

When you reply to a message on these lists, please avoid top-posting as in this example:

+
+    
+        HAL has been deprecated in newer kernel releases, so 
+        it should be deprecated in Trinity as well.
+
+        Tim
+
+        -----Original Message-----
+        From: Curious [mailto:curious@example.com]
+        Sent: Tuesday, January 6, 2010 2:54 AM
+        To: Tim
+        Cc: trinity-devel@lists.pearsoncomputing.net
+        Subject: Re: HAL usage
+
+        Should HAL be used in upcoming Trinity releases instead 
+        of the newer udev/upower interface?
+
+        This might be easier than a full rewrite of HAL-dependent 
+        code.
+
+        Sincerely,
+
+        I. M. Curious
+    
+
+ +

Instead, please add your reply to the bottom of the original thread, or interleave your response + with snippets of the original message. +

This is an example of why top posting is considered impolite (as seen on linux-kernel):

+
+    
+        A: Because it messes up the order in which people normally 
+            read text.
+        Q: Why is top-posting such a bad thing?
+        A: Top-posting.
+        Q: What is the most annoying thing in e-mail?
+    
+
+ + diff --git a/mainstyle.css b/mainstyle.css new file mode 100644 index 0000000..cef4f30 --- /dev/null +++ b/mainstyle.css @@ -0,0 +1,164 @@ +BODY {background-color:white; + /*font-family:"Times New Roman", "Libre Serif", serif; font-size:12pt;*/ + /*font-family:"Arial", "Libre Sans", sans-serif; font-size:10pt;*/ + /*font-family:Verdana, sans-serif; font-size:14pt;*/ + color:black; + height:100%; + margin:0px; + padding:0px; + background-image:url(media/back.png); + background-repeat:repeat-y; + background-position:top left; + } +IMG {border-width:0px} +H1 {color:white; + font-size:30pt; + text-shadow: black 0px 0px 5px;} +H2 {font-weight:bold; + font-size:larger} +H3 {font-weight:bold; + font-size:100%} +PRE {border:1px solid #001c7b; + background-color:#cfe1f6; + white-space:pre-line; + padding:2px} +.spacer {margin-top:3ex} +A:link {color:#001c7b; + text-decoration:none; + font-weight:bold} +A:visited {color:#001c7b; + text-decoration:none; + font-weight:bold} +A:hover {color:#001c7b; + text-decoration:underline; + font-weight:bold} + +#all-wrapper{margin:0px; + padding:0px; + } +#banner {height:150px; + width:100%; + background-color:#01306f; + background-image:url(media/bannerchunk.png); + background-repeat:repeat-x; + background-position:bottom left; + font-family:"Arial", "Libre Sans", sans-serif; font-size:11pt;} +#bannerimg {position:absolute; + top:0px; + right:0px; + border:0px; + margin:0px; + z-index:3} +#logowrap {position:relative; + top:-12px; + left:85px; + width:200px; + z-index:4} +#logo {position:relative; + top:27px; + left:-62px; + height:125px; + width:125px} +#titlewrap {position:relative; + top:-120px; + text-align:left; + margin-left:25ex; + margin-right:4ex; + height:131px; + z-index:6} +#titlenotif {position:absolute; + top:120px; + right:50px; + z-index:6; + } +#title {position:relative; + z-index:6; + top:15px; + } +#sidebar {background-color:#1f4ca4; + width:170px; + font-family:"Arial", "Libre Sans", sans-serif; font-size:11pt; + } +#sidetext {position:absolute; + top:150px; + width:150px; + padding-bottom:4ex; + padding-right:10px; + padding-left:10px; + overflow:visible; + background-color:#01306f; + background-image:url(media/gradient2.png); + background-repeat:repeat-x; + background-position:bottom left; + } +.navhead {font-size:larger; + font-weight:bold; + font-style:italic; + margin-left:1ex; + margin-top:1ex; + margin-bottom:0px} +.nav {font-weight:bold; + margin-left:3ex; + margin-top:0px; + margin-bottom:0px; + padding:0px} +.nav A:link {color:white} +.nav A:visited {color:white} +.nav A:hover {color:white} +.navhead A:link {color:#cfe1f6} +.navhead A:visited {color:#cfe1f6} +.navhead A:hover {color:#cfe1f6} +.notifhead {font-size:smaller; + font-weight:normal; + margin-left:1ex; + margin-top:1ex; + margin-bottom:0px} +.notifhead A:link {color:lime} +.notifhead A:visited {color:lime} +.notifhead A:hover {color:lime} +#curpage {border:solid 1px white} +#main {width:100%;} +#intermediate {background-color:white; + margin-left:170px; + } +#textblock {padding:4ex; + margin-right:auto; + margin-left:auto; +/* max-width:125ex;*/ + } +.snapwrapper {position:relative; + left:50%; + height:320px; + width:420px;} +.snap {height:225px; + width:366px; + z-index:6; + box-shadow: 10px 10px 10px 5px rgba(0,0,0,0.4)} +/*.snapshadow {width:400px; + height:30px; + position:relative; + left:-200px;}*/ +#introsnap {position:relative; + left:-183px; + text-align:center} +#rssicon {height:1.25em; + width:1.25em; + float:left; + padding-right:5px} +#copyright {font-size:x-small} + +.floatleft {float: left} +.floatright {float: right} +.clearall {clear: both} +.hidden {display: none; + overflow:hide} + +.tmain {padding-right:2ex} + +/*patches table*/ +.patchtable TR TD {vertical-align:top} +.patchtable TR TH {text-align:left; + font-weight:bold; + vertical-align:top} +.patchtable {width:100%;} +/*.patchtable TR TD:last-child {width:50%;}*/ diff --git a/media/back.png b/media/back.png new file mode 100644 index 0000000..095a7b5 Binary files /dev/null and b/media/back.png differ diff --git a/media/bannerchunk.png b/media/bannerchunk.png new file mode 100644 index 0000000..f439973 Binary files /dev/null and b/media/bannerchunk.png differ diff --git a/media/bannerswoosh.png b/media/bannerswoosh.png new file mode 100644 index 0000000..6af9ea9 Binary files /dev/null and b/media/bannerswoosh.png differ diff --git a/media/gradient2.png b/media/gradient2.png new file mode 100644 index 0000000..b06ae5a Binary files /dev/null and b/media/gradient2.png differ diff --git a/media/news-javascript.php b/media/news-javascript.php new file mode 100644 index 0000000..60cf8ad --- /dev/null +++ b/media/news-javascript.php @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/media/rsync_logo.jpg b/media/rsync_logo.jpg new file mode 100644 index 0000000..70e7cba Binary files /dev/null and b/media/rsync_logo.jpg differ diff --git a/media/screenshots/large/tde1.png b/media/screenshots/large/tde1.png new file mode 100644 index 0000000..f566168 Binary files /dev/null and b/media/screenshots/large/tde1.png differ diff --git a/media/screenshots/large/tde2.png b/media/screenshots/large/tde2.png new file mode 100644 index 0000000..74b40fa Binary files /dev/null and b/media/screenshots/large/tde2.png differ diff --git a/media/screenshots/large/tde3.png b/media/screenshots/large/tde3.png new file mode 100644 index 0000000..a929719 Binary files /dev/null and b/media/screenshots/large/tde3.png differ diff --git a/media/screenshots/large/tde4.png b/media/screenshots/large/tde4.png new file mode 100644 index 0000000..0300e2d Binary files /dev/null and b/media/screenshots/large/tde4.png differ diff --git a/media/screenshots/large/tde4_mainpage.png b/media/screenshots/large/tde4_mainpage.png new file mode 100644 index 0000000..a0b2354 Binary files /dev/null and b/media/screenshots/large/tde4_mainpage.png differ diff --git a/media/screenshots/large/tde5.png b/media/screenshots/large/tde5.png new file mode 100644 index 0000000..b172605 Binary files /dev/null and b/media/screenshots/large/tde5.png differ diff --git a/media/screenshots/small/tde1.png b/media/screenshots/small/tde1.png new file mode 100644 index 0000000..d31f7e4 Binary files /dev/null and b/media/screenshots/small/tde1.png differ diff --git a/media/screenshots/small/tde2.png b/media/screenshots/small/tde2.png new file mode 100644 index 0000000..9b4604c Binary files /dev/null and b/media/screenshots/small/tde2.png differ diff --git a/media/screenshots/small/tde3.png b/media/screenshots/small/tde3.png new file mode 100644 index 0000000..ae44d57 Binary files /dev/null and b/media/screenshots/small/tde3.png differ diff --git a/media/screenshots/small/tde4.png b/media/screenshots/small/tde4.png new file mode 100644 index 0000000..7a300cf Binary files /dev/null and b/media/screenshots/small/tde4.png differ diff --git a/media/screenshots/small/tde5.png b/media/screenshots/small/tde5.png new file mode 100644 index 0000000..466359d Binary files /dev/null and b/media/screenshots/small/tde5.png differ diff --git a/media/tde-logo.png b/media/tde-logo.png new file mode 100755 index 0000000..22ad9f3 Binary files /dev/null and b/media/tde-logo.png differ diff --git a/media/tde-rss.png b/media/tde-rss.png new file mode 100644 index 0000000..74a27f6 Binary files /dev/null and b/media/tde-rss.png differ diff --git a/media/tde-rss.svgz b/media/tde-rss.svgz new file mode 100644 index 0000000..343b3d0 Binary files /dev/null and b/media/tde-rss.svgz differ diff --git a/mirrors.php b/mirrors.php new file mode 100644 index 0000000..c38478f --- /dev/null +++ b/mirrors.php @@ -0,0 +1,54 @@ + + + The Trinity Development Team would like to thank everyone listed below for their assistance. These individuals have freely offered their time and effort to make Trinity better. Without their support Trinity would not exist in its current form. +

+

+ If we have forgotten to add your name to the list, please contact us via the trinity-devel mailing list. +

+ +

Trinity Developers

+ + + + + + + +
NameContributing Area(s)
Timothy PearsonProject administrator
Primary developer
Build farm administrator
Debian/Ubuntu packaging maintainer
Slávek BankoSRU development, management, and builds
Francois AndriotRedhat/Fedora packaging maintainer
"Woodsman"Vanilla build testing and repair
Slackware build scripts maintainer
Documentation reviewer
Testing and quality assurance
Michele CalgaroDeveloper
Documentation reviewer
Debian/testing and quality assurance
+ +

Content Distribution

+ + + + + + + + + + + + +
NameContributing Area(s)
Mike Bird (Yosemite Network)Mirror 1 [United States]
UK Mirror ServiceMirror 2 [United Kingdom]
Nathaniel TaylorMirror 3 [Sweden]
DotRiverMirror 4 [France]
Mirror 5 [France] [Last sync 1/20/2012]
Ivan GanchevMirror 6 [Bulgaria]
NetLinuxMirror 7 [United Kingdom] [Not syncing]
Friedrich-Alexander-Universität Erlangen-NürnbergMirror 8 [Germany]
+

+Active mirror list + + +

Web Team

+ + + + +
NameContributing Area(s)
E. LiddellDesign
Timothy PearsonMaintenance
+

+ +

+Past Contributors
Gone, but not forgotten...thank you for your previous support! +

+ + diff --git a/news.php b/news.php new file mode 100644 index 0000000..ef25704 --- /dev/null +++ b/news.php @@ -0,0 +1,63 @@ + + +$file: "; + + $data = file_get_contents("news/$file"); //read the file + $data = str_replace("http://", "https://", $data); //force https images and links + $convert = explode("\n", $data); //create array separate by new line + for ($i=0;$i'; //write value by index + if ($i == 0){ + echo ""; + } + if ($i == $newscollapsedlines) { + echo '

'; + echo ''; + echo ''; + echo ''; + echo '
'; + } + else { + echo ''; + echo '
'; + } + echo "


"; + echo "

"; + } + } + echo "
"; + closedir($handle); +} + +?> + + diff --git a/newsentry.php b/newsentry.php new file mode 100644 index 0000000..c4fe2f4 --- /dev/null +++ b/newsentry.php @@ -0,0 +1,81 @@ + + +'; + echo "

$file: "; + + $data = file_get_contents($prefix . "/$file"); //read the file + $convert = explode("\n", $data); //create array separate by new line + for ($i=0;$i'; //write value by index + if ($i == 0){ + echo "

"; + } + } + echo '
'; + } +} + +if ($handle = opendir('./news/')) { +$filenames = array(); +while ($file = readdir($handle)) { + $filenames[] = $file; +} +rsort($filenames); + +$entryfound = 0; +foreach($filenames as $file) { + if ($file == $_GET["entry"]) { + writeNewsEntry($file, 'news'); + $entryfound = 1; + } +} +closedir($handle); + +if ($entryfound == 0) { + if ($handle = opendir('./rssentries/')) { + $filenames = array(); + while ($file = readdir($handle)) { + $filenames[] = $file; + } + rsort($filenames); + + $entryfound = 0; + foreach($filenames as $file) { + if ($file == $_GET["entry"]) { + writeNewsEntry($file, 'rssentries'); + $entryfound = 1; + } + } + closedir($handle); + + if ($entryfound == 0) { + echo 'Requested news entry not found!'; + echo "

"; + } + } +} + +echo 'Go back to News'; +echo "

"; +} +?> + + + + diff --git a/ocs/karamba-providers.xml b/ocs/karamba-providers.xml new file mode 100644 index 0000000..b4456ee --- /dev/null +++ b/ocs/karamba-providers.xml @@ -0,0 +1,22 @@ + + + + opendesktop + https://api.opendesktop.org/v1/ + openDesktop.org + + https://opendesktop.org/terms/ + https://opendesktop.org/usermanager/new.php + + + + + + + + + + + + + diff --git a/ocs/providers.xml b/ocs/providers.xml new file mode 100644 index 0000000..b4456ee --- /dev/null +++ b/ocs/providers.xml @@ -0,0 +1,22 @@ + + + + opendesktop + https://api.opendesktop.org/v1/ + openDesktop.org + + https://opendesktop.org/terms/ + https://opendesktop.org/usermanager/new.php + + + + + + + + + + + + + diff --git a/past_contributors.php b/past_contributors.php new file mode 100644 index 0000000..b13abfa --- /dev/null +++ b/past_contributors.php @@ -0,0 +1,37 @@ + +

The Trinity Development Team would like to thank everyone listed below for their help. These +individuals have, in the past, freely offered their time and effort to make Trinity better. Without their +support Trinity would not exist in its current form.

+

If we have forgotten to add your name to the list, please contact us via the +trinity-devel mailing list.

+ + +

Trinity Developers

+ + + +
NameContributing Area(s)
Serghei AmelianGeneral functionality enhancements
CMake build system developer/maintainer
+ +

Content Distribution

+ + + + + +
NameContributing Area(s)
University of IdahoMirror 1 [United States]
Jens DunzweilerMirror 2 [Germany]
Inga MusteKubuntu LiveCD mirror
+ +

Web Team

+ + + + +
NameContributing Area(s)
Calvin MorrisonWebsite design
Inga MusteWebsite design
+ + + + diff --git a/relatedprojects.php b/relatedprojects.php new file mode 100644 index 0000000..ffa03d1 --- /dev/null +++ b/relatedprojects.php @@ -0,0 +1,31 @@ + + +

+ These are projects related to the Trinity Desktop Environment. They have either been + developed specifically for Trinity, or have been patched to work correctly with Trinity. +

+ +

libcaldav

+

+ Trinity utilizes a patched version of libcaldav from libcaldav's Sourceforge site.

+ libcaldev is a client library that adds support for the CalDAV protocol (rfc4791). The + object is to have a library which fully implements the protocol so that it is easy + to integrate CalDAV support into any PIM application. The latest patched sources + and Debian binaries are available from our GIT system: Go there now! +

+ +

libcarddav

+

+ Libcarddav is a portable CardDAV client implementation originally developed for the Trinity + PIM suite. It incorporates full list, get, add, modify, and delete functionality per the + latest CardDAV standards. Build dependencies are minimal, requiring only libcurl. The latest + sources and Debian binaries are available on our GIT system: + Go there now! +

+ + diff --git a/releases.php b/releases.php new file mode 100644 index 0000000..393ce10 --- /dev/null +++ b/releases.php @@ -0,0 +1,54 @@ + + +

The Trinity Desktop Environment follows an unscheduled "release when ready" system, which depends on +the number of required changes to the core and how many open bugs we have, rather than picking a +calendar date. We try to get stable releases out every few months, and major releases once or twice a year. +This page details our currently active releases. For tentative information on future releases, please read +the Project Roadmap. +

+

Select an official release version below to get release notes and download links


+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VersionDate
→ R14.0.1 [Current]08/30/2015
→ R14.0.012/16/2014
→ 3.5.13.207/21/2013
→ 3.5.13.110/11/2012
→ 3.5.1311/01/2011
→ 3.5.1210/03/2010
→ 3.5.1104/29/2010
+ + diff --git a/releases/3.5.11/index.php b/releases/3.5.11/index.php new file mode 100644 index 0000000..7ea38c5 --- /dev/null +++ b/releases/3.5.11/index.php @@ -0,0 +1,22 @@ + + +

Trinity v3.5.11 Release Information

+What's New in Trinity 3.5.11 +

+Official Installation Instructions for Ubuntu Lucid +

+Download Source Tarball (~650MB compressed/~1.3GB deflated) + + diff --git a/releases/3.5.12/index.php b/releases/3.5.12/index.php new file mode 100644 index 0000000..e47af80 --- /dev/null +++ b/releases/3.5.12/index.php @@ -0,0 +1,24 @@ + + +

Trinity v3.5.12 Release Information

+What's New in Trinity 3.5.12 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for Slackware +

+Download Source Tarballs + + diff --git a/releases/3.5.13.1/index.php b/releases/3.5.13.1/index.php new file mode 100644 index 0000000..de37cf5 --- /dev/null +++ b/releases/3.5.13.1/index.php @@ -0,0 +1,26 @@ + + +Trinity v3.5.13.1 Release Information +

Trinity v3.5.13.1 Release Information

+What's New in Trinity 3.5.13.1 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for RedHat
+Official Installation Instructions for Fedora
+

+Download Source Tarballs + + diff --git a/releases/3.5.13.2/index.php b/releases/3.5.13.2/index.php new file mode 100644 index 0000000..6e62ead --- /dev/null +++ b/releases/3.5.13.2/index.php @@ -0,0 +1,26 @@ + + +Trinity v3.5.13.2 Release Information +

Trinity v3.5.13.2 Release Information

+What's New in Trinity 3.5.13.2 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for RedHat
+Official Installation Instructions for Fedora
+

+Download Source Tarballs + + diff --git a/releases/3.5.13/index.php b/releases/3.5.13/index.php new file mode 100644 index 0000000..224b508 --- /dev/null +++ b/releases/3.5.13/index.php @@ -0,0 +1,26 @@ + + +Trinity v3.5.13 Release Information +

Trinity v3.5.13 Release Information

+What's New in Trinity 3.5.13 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for RedHat
+Official Installation Instructions for Fedora
+

+Download Source Tarballs + + diff --git a/releases/R14.0.0/index.php b/releases/R14.0.0/index.php new file mode 100644 index 0000000..62e60f0 --- /dev/null +++ b/releases/R14.0.0/index.php @@ -0,0 +1,26 @@ + + +Trinity R14.0.0 Release Information +

Trinity R14.0.0 Release Information

+What's New in Trinity R14.0.0 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for RedHat
+Official Installation Instructions for Fedora
+

+Download Source Tarballs + + diff --git a/releases/R14.0.1/index.html b/releases/R14.0.1/index.html new file mode 100644 index 0000000..dc47591 --- /dev/null +++ b/releases/R14.0.1/index.html @@ -0,0 +1,12 @@ + +Trinity R14.0.1 Release Information +

Trinity R14.0.1 Release Information

+What's New in Trinity R14.0.1 +

+Official Installation Instructions for Debian
+Official Installation Instructions for Ubuntu
+Official Installation Instructions for RedHat
+Official Installation Instructions for Fedora
+

+Download Source Tarballs + diff --git a/reskin.pl b/reskin.pl new file mode 100644 index 0000000..6ff74aa --- /dev/null +++ b/reskin.pl @@ -0,0 +1,50 @@ +#!/usr/bin/perl + +use File::Copy; + +#get target directory and list the files +my $nav = $ARGV[0]; +my $topdir = $ARGV[1]; +my $dir = $ARGV[2]; +my $outdir = $ARGV[3]; +opendir $dirhandle, $dir or die "Couldn't open dir $dir: $!"; +my @files = readdir $dirhandle; #list of files in $dir +closedir $dirhandle; +@files = sort(@files); + +#for each .html file in the target, do: +foreach $file (@files) { + if ($file =~ /([^\/]+).html$/) { + my $infile = "$dir/$file"; + my $outfile = "$outdir/$1.php"; + + print("$file -> $1.php\n"); + + open $filehandle, "<", $infile or die "Couldn't read file: $!"; + open $outfile, ">", $outfile or die "Couldn't write file: $!"; + + while ($line = <$filehandle>) { + $line =~ s/\.html/\.php/g; + $line =~ s/\<\/?span[^\>]*?\>//g; + $line =~ /

(.*?)<\/h1>/i; + $head = $1; + $line =~ s/style\=\"[^"]*\"//g; + $line =~ s/\
//gi; + $line =~ s/.*?\<table width="100%" class="header"\>/<?php\n include("$topdir\/tde-head-and-foot.php");\n doHeader("$head", "Documentation", "$nav", "$topdir\/");\n?>\n<STYLE>\n .question {font-weight:bold;}\n TD {padding-top:10px}\n<\/STYLE>\n\<table width="100%" class="header"\>/gi; + $line =~ s/<\/body><\/html>/\n<?php\n doFooter();\n?>\n/gi; + $line =~ s/[\x80-\xff]//g; + $line =~ s/h1[^\>]*?\>/h2\>/gi; + $line =~ s/\<\/div\>/\n\<\/div\>/gi; + $line =~ s/Chapter(\d+)\./Chapter $1. /gi; + print $outfile "$line\n"; + } + + close $filehandle; + close $outfile; + } + elsif ($file =~ /([^\/]+).png$/) { + print("copying image $file\n"); + copy("$dir/$file", "$outdir/$file"); + } +} diff --git a/rss.php b/rss.php new file mode 100755 index 0000000..f2baab8 --- /dev/null +++ b/rss.php @@ -0,0 +1,77 @@ +<?php + +// (c) 2014 Timothy Pearson +// All Rights Reserved + +function processDir($dirname, $phpfile) { + if ($handle = opendir("./" . $dirname . "/")) { + + $filenames = array(); + while ($file = readdir($handle)) { + $filenames[] = $file; + } + rsort($filenames); + + foreach($filenames as $file) { + // sort($handle, SORT_NUMERIC); + if (($file != ".") && ($file != "..") && ($file{0} != '.')) { + echo " <item>\n"; + $datestring = $file; + $datestring = str_replace(".", "-", $datestring); + $datetime = strtotime($datestring); + $datestring = date(DATE_RSS, $datetime); + echo " <pubDate>$datestring</pubDate>\n"; + + $data = file_get_contents($dirname . "/$file"); //read the file + $convert = explode("\n", $data); //create array separate by new line + for ($i=0;$i<count($convert);$i++) { + $title = " <title>"; + if ($i != 0) { + $linestring = strip_tags($convert[$i]); + $linestring = str_replace("<", "<", $linestring); + $linestring = str_replace(">", ">", $linestring); + echo $linestring. "<br>\n"; //write value by index + } + else { + $title = $title . strip_tags($convert[$i]) . "\n"; + echo $title; + echo " '; +// } + } + echo " ]]>\n"; +// if (count($convert) > $newscollapsedlines) { + echo " http://www.trinitydesktop.org/newsentry.php?entry=" . $file . "\n"; + echo " http://www.trinitydesktop.org/newsentry.php?entry=" . $file . "\n"; +// } + echo " \n"; + } + } + + closedir($handle); + } +} + +header('Content-type: application/rss+xml'); + +/*echo "\n";*/ +echo "\n"; +echo "\n"; +echo " \n"; +echo " \n"; +echo " Trinity Desktop Environment News\n"; +echo " http://www.trinitydesktop.org/\n"; +echo " News of the Trinity Desktop Environment, a full-featured professional desktop for Linux.\n"; +echo " en\n"; + +processDir('news', 'newsentry.php'); +processDir('rssentries', 'rssentry.php'); + +echo " \n"; +echo "\n"; + +?> + + diff --git a/screenshots.css b/screenshots.css new file mode 100644 index 0000000..52c8ed5 --- /dev/null +++ b/screenshots.css @@ -0,0 +1,7 @@ + .sc_img_holder {float: left; + margin: 5px 5px 5px 0px; + padding: 5px 5px 5px 0px;} + .sc_img {clear: both; + margin-bottom: 5px;} + .sc_txt {display: inline; + text-align: center;} \ No newline at end of file diff --git a/screenshots.js b/screenshots.js new file mode 100644 index 0000000..89b75a0 --- /dev/null +++ b/screenshots.js @@ -0,0 +1,15 @@ + hs.registerOverlay({ + html: '
', + position: 'top right', + fade: 2 // fading the semi-transparent overlay looks bad in IE + }); + + hs.wrapperClassName = 'borderless'; + hs.graphicsDir = 'highslide/graphics/'; + hs.align = 'center'; + hs.transitions = ['expand', 'crossfade']; + hs.outlineType = 'rounded-white'; + hs.fadeInOut = true; + hs.showCredits = false; + hs.numberPosition = 'caption'; + hs.dimmingOpacity = 0.75; diff --git a/screenshots.php b/screenshots.php new file mode 100644 index 0000000..612e79e --- /dev/null +++ b/screenshots.php @@ -0,0 +1,59 @@ + + +

+This page contains screenshots of the latest Trinity release running under various Linux distributions. If you have a particularly interesting Trinity desktop and would like to see it displayed here, please contact us. +

+

+ + + + +

+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+

+ diff --git a/secret_whispers_0f_a_n3w_p0w3r.png b/secret_whispers_0f_a_n3w_p0w3r.png new file mode 100644 index 0000000..0cd2f1c Binary files /dev/null and b/secret_whispers_0f_a_n3w_p0w3r.png differ diff --git a/support.php b/support.php new file mode 100644 index 0000000..5a2f7e5 --- /dev/null +++ b/support.php @@ -0,0 +1,25 @@ + + +

Feel free to contact us with questions, comments or problems. We are looking for developers, so +if you are interested, please let us know. The best way to get in touch with the Trinity project is +through one of the options below:

+ +

Internet Relay Chat

+

network: chat.freenode.net
+channel: #trinity-desktop +

This channel is publicly logged. A full channel log can be accessed here.

+ +

Mailing Lists

+

You can contact the project users and developers via one or more of our mailing lists.

+ +

Bugs

+

Bugs should be reported to our bug tracker which is available +here.

+ + + diff --git a/tde-head-and-foot.php b/tde-head-and-foot.php new file mode 100644 index 0000000..e344bf9 --- /dev/null +++ b/tde-head-and-foot.php @@ -0,0 +1,8 @@ + diff --git a/template.php b/template.php new file mode 100644 index 0000000..0d5a36e --- /dev/null +++ b/template.php @@ -0,0 +1,8 @@ + + +